From 3dc8403e10366db1152eaf78390296412716f2c1 Mon Sep 17 00:00:00 2001 From: Julian Taylor Date: Mon, 7 Nov 2022 09:05:14 +0100 Subject: [PATCH 001/189] [Python] pass api_client configuration to model deserialize (#13922) The if not passed the models create a new configuration object which configures logging and determines cpu count every time. This causes extreme performance issues when deserializing larger sets of items. See also https://github.com/kubernetes-client/python/issues/1921 --- .../src/main/resources/python-legacy/api_client.mustache | 1 + .../client/petstore/python-asyncio/petstore_api/api_client.py | 1 + samples/client/petstore/python-legacy/petstore_api/api_client.py | 1 + .../client/petstore/python-tornado/petstore_api/api_client.py | 1 + .../client/petstore/python-legacy/petstore_api/api_client.py | 1 + 5 files changed, 5 insertions(+) diff --git a/modules/openapi-generator/src/main/resources/python-legacy/api_client.mustache b/modules/openapi-generator/src/main/resources/python-legacy/api_client.mustache index d5b8a6f254..de0ef4b946 100644 --- a/modules/openapi-generator/src/main/resources/python-legacy/api_client.mustache +++ b/modules/openapi-generator/src/main/resources/python-legacy/api_client.mustache @@ -715,6 +715,7 @@ class ApiClient(object): value = data[klass.attribute_map[attr]] kwargs[attr] = self.__deserialize(value, attr_type) + kwargs["local_vars_configuration"] = self.configuration instance = klass(**kwargs) if has_discriminator: diff --git a/samples/client/petstore/python-asyncio/petstore_api/api_client.py b/samples/client/petstore/python-asyncio/petstore_api/api_client.py index 6bdc318161..7b655dd277 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/api_client.py +++ b/samples/client/petstore/python-asyncio/petstore_api/api_client.py @@ -692,6 +692,7 @@ class ApiClient(object): value = data[klass.attribute_map[attr]] kwargs[attr] = self.__deserialize(value, attr_type) + kwargs["local_vars_configuration"] = self.configuration instance = klass(**kwargs) if has_discriminator: diff --git a/samples/client/petstore/python-legacy/petstore_api/api_client.py b/samples/client/petstore/python-legacy/petstore_api/api_client.py index 072c932db7..10d903cb0d 100644 --- a/samples/client/petstore/python-legacy/petstore_api/api_client.py +++ b/samples/client/petstore/python-legacy/petstore_api/api_client.py @@ -691,6 +691,7 @@ class ApiClient(object): value = data[klass.attribute_map[attr]] kwargs[attr] = self.__deserialize(value, attr_type) + kwargs["local_vars_configuration"] = self.configuration instance = klass(**kwargs) if has_discriminator: diff --git a/samples/client/petstore/python-tornado/petstore_api/api_client.py b/samples/client/petstore/python-tornado/petstore_api/api_client.py index 714686f8d6..2b978d96a8 100644 --- a/samples/client/petstore/python-tornado/petstore_api/api_client.py +++ b/samples/client/petstore/python-tornado/petstore_api/api_client.py @@ -693,6 +693,7 @@ class ApiClient(object): value = data[klass.attribute_map[attr]] kwargs[attr] = self.__deserialize(value, attr_type) + kwargs["local_vars_configuration"] = self.configuration instance = klass(**kwargs) if has_discriminator: diff --git a/samples/openapi3/client/petstore/python-legacy/petstore_api/api_client.py b/samples/openapi3/client/petstore/python-legacy/petstore_api/api_client.py index 072c932db7..10d903cb0d 100755 --- a/samples/openapi3/client/petstore/python-legacy/petstore_api/api_client.py +++ b/samples/openapi3/client/petstore/python-legacy/petstore_api/api_client.py @@ -691,6 +691,7 @@ class ApiClient(object): value = data[klass.attribute_map[attr]] kwargs[attr] = self.__deserialize(value, attr_type) + kwargs["local_vars_configuration"] = self.configuration instance = klass(**kwargs) if has_discriminator: From 9f1fa0e44012a11f85d8360cfe5f634530e49e57 Mon Sep 17 00:00:00 2001 From: Nathan Baulch Date: Tue, 8 Nov 2022 00:30:24 +1100 Subject: [PATCH 002/189] Fix another batch of spelling typos (#13915) * Fix typos * Remove repeated words * Minor grammar fixes --- .../workflows/samples-java-client-jdk11.yaml | 2 +- .github/workflows/samples-kotlin-client.yaml | 2 +- .gitpod.yml | 2 +- .../aspnetcore-6.0-project4Models.yaml | 2 +- bin/configs/java-camel-petstore-new.yaml | 2 +- .../java-webclient-nullable-array.yaml | 2 +- bin/configs/swift5-deprecated.yaml | 2 +- bin/utils/test_file_list.yaml | 4 +- docs/customization.md | 6 +- docs/generators/aspnetcore.md | 2 +- docs/generators/java-camel.md | 2 +- docs/generators/wsdl-schema.md | 2 +- docs/migration-from-swagger-codegen.md | 4 +- docs/migration-guide.adoc | 2 +- docs/new-generator.md | 2 +- docs/online.md | 2 +- docs/roadmap.adoc | 2 +- docs/roadmap.md | 4 +- docs/templating.md | 2 +- docs/usage.md | 2 +- .../examples/camel.xml | 4 +- .../src/main/resources/openapi.yaml | 2 +- .../examples/swagger.yaml | 2 +- .../src/test/resources/default/petstore.yaml | 2 +- .../test/resources/petstore-on-classpath.yaml | 2 +- .../openapitools/codegen/DefaultCodegen.java | 2 +- .../codegen/InlineModelResolver.java | 4 +- .../codegen/languages/AbstractPhpCodegen.java | 2 +- .../languages/AspNetCoreServerCodegen.java | 26 +++---- .../languages/CSharpNetCoreClientCodegen.java | 2 +- .../languages/DartDioClientCodegen.java | 2 +- .../languages/JavaCamelServerCodegen.java | 10 +-- .../codegen/languages/JavaClientCodegen.java | 2 +- .../codegen/languages/KtormSchemaCodegen.java | 4 +- .../languages/PythonClientCodegen.java | 20 +++--- .../codegen/languages/RClientCodegen.java | 2 +- .../languages/ScalaSttpClientCodegen.java | 8 +-- .../codegen/languages/WsdlSchemaCodegen.java | 2 +- .../mustache/OptionalParameterLambda.java | 2 +- .../mustache/RequiredParameterLambda.java | 2 +- .../codegen/utils/ModelUtils.java | 10 +-- .../validations/oas/RuleConfiguration.java | 6 +- .../main/resources/C-libcurl/cJSON.c.mustache | 2 +- .../main/resources/Eiffel/api_client.mustache | 2 +- .../native/additional_properties.mustache | 2 +- .../Java/libraries/okhttp-gson/pojo.mustache | 2 +- .../cxf-ext/CXF2InterfaceComparator.mustache | 2 +- .../cxf/CXF2InterfaceComparator.mustache | 2 +- .../resources/JavaJaxRS/spec/README.mustache | 4 +- .../spec/libraries/helidon/README.mustache | 2 +- .../spec/libraries/kumuluzee/README.mustache | 2 +- .../libraries/openliberty/README.mustache | 2 +- .../spec/libraries/quarkus/README.mustache | 2 +- .../spec/libraries/thorntail/README.mustache | 2 +- .../Javascript-Flowtyped/README.mustache | 2 +- .../Javascript/partial_model_oneof.mustache | 6 +- .../aspnetcore/3.0/Project.csproj.mustache | 8 +-- .../aspnetcore/3.0/Solution.mustache | 8 +-- .../model-validation-body.mustache | 2 +- .../cpp-tizen-client/Doxyfile.mustache | 4 +- .../ApiClient.mustache | 4 +- .../ClientUtils.mustache | 2 +- .../Configuration.mustache | 6 +- .../HttpSigningConfiguration.mustache | 26 +++---- .../IReadableConfiguration.mustache | 2 +- .../RequestOptions.mustache | 2 +- .../git_push.sh.mustache | 2 +- .../libraries/httpclient/ApiClient.mustache | 12 ++-- .../httpclient/RequestOptions.mustache | 2 +- .../libraries/httpclient/api.mustache | 12 ++-- .../libraries/httpclient/model.mustache | 4 +- .../modelAnyOf.mustache | 2 +- .../modelOneOf.mustache | 2 +- .../csharp-netcore-functions/nuspec.mustache | 2 +- .../csharp-netcore/RequestOptions.mustache | 2 +- .../generichost/ApiException.mustache | 2 +- .../generichost/ApiResponse`1.mustache | 2 +- .../HttpSigningConfiguration.mustache | 18 ++--- .../libraries/generichost/README.mustache | 2 +- .../libraries/generichost/api.mustache | 4 +- .../generichost/git_push.ps1.mustache | 2 +- .../httpclient/RequestOptions.mustache | 2 +- .../built_value/class_serializer.mustache | 2 +- .../libraries/jvm-volley/README.mustache | 4 +- .../libraries/jvm-volley/auth/oauth.mustache | 2 +- .../request/RequestFactory.mustache | 2 +- .../utils/openapiRouter.mustache | 2 +- .../resources/php-slim-server/index.mustache | 2 +- .../resources/php/ObjectSerializer.mustache | 4 +- .../powershell/http_signature_auth.mustache | 2 +- .../resources/protobuf-schema/README.mustache | 6 +- .../resources/python-aiohttp/README.mustache | 2 +- .../python-prior/__init__models.mustache | 2 +- .../python/__init__models.handlebars | 2 +- .../resources/python/api_client.handlebars | 4 +- .../resources/python/configuration.handlebars | 4 +- .../resources/python/git_push.sh.handlebars | 2 +- .../main/resources/python/schemas.handlebars | 34 ++++----- .../main/resources/python/signing.handlebars | 2 +- .../src/main/resources/r/ApiResponse.mustache | 2 +- .../src/main/resources/r/api.mustache | 2 +- .../src/main/resources/r/api_client.mustache | 4 +- .../r/libraries/httr2/api_client.mustache | 8 +-- .../src/main/resources/r/modelAnyOf.mustache | 2 +- .../main/resources/r/modelGeneric.mustache | 4 +- .../src/main/resources/r/modelOneOf.mustache | 2 +- .../resources/rust-server/models.mustache | 2 +- .../scala-akka-client/apiInvoker.mustache | 2 +- .../src/main/resources/scalatra/web.xml | 2 +- .../main/resources/swift5/APIHelper.mustache | 2 +- .../src/main/resources/swift5/api.mustache | 6 +- .../resources/typescript-aurelia/README.md | 2 +- .../typescript-fetch/runtime.mustache | 14 ++-- .../codegen/DefaultCodegenTest.java | 2 +- .../jaxrs/JavaJAXRSSpecServerCodegenTest.java | 4 +- .../java/spring/SpringCodegenTest.java | 4 +- .../codegen/swift5/Swift5ModelEnumTest.java | 6 +- .../typescript/SharedTypeScriptTest.java | 2 +- .../TypeScriptNodeModelTest.java | 4 +- .../test/resources/2_0/globalSecurity.json | 2 +- .../2_0/long_description_issue_7839.json | 2 +- .../src/test/resources/2_0/petstore-bash.json | 2 +- .../test/resources/2_0/petstore-nullable.yaml | 2 +- .../src/test/resources/2_0/petstore-orig.json | 2 +- .../test/resources/2_0/petstore-proto.yaml | 2 +- .../resources/2_0/petstore-vendor-mime.yaml | 2 +- .../2_0/petstore-with-date-field.yaml | 2 +- ...r-testing-playframework-with-security.yaml | 2 +- ...s-models-for-testing-saga-and-records.yaml | 2 +- ...dels-for-testing-with-spring-pageable.yaml | 4 +- ...ith-fake-endpoints-models-for-testing.yaml | 4 +- ...th-operations-without-required-params.yaml | 2 +- .../2_0/petstore-with-spring-pageable.yaml | 2 +- .../src/test/resources/2_0/petstore.json | 2 +- .../src/test/resources/2_0/petstore.yaml | 2 +- .../resources/2_0/petstore_issue_7999.json | 2 +- ...ith-fake-endpoints-models-for-testing.yaml | 4 +- ...ith-fake-endpoints-models-for-testing.yaml | 2 +- .../2_0/rust-server/rust-server-test.yaml | 2 +- ...ith-fake-endpoints-models-for-testing.yaml | 4 +- .../test/resources/3_0/asciidoc/api-docs.json | 2 +- .../resources/3_0/aspnetcore/petstore.yaml | 2 +- .../resources/3_0/avro-schema/petstore.yaml | 2 +- .../test/resources/3_0/cpp-qt/petstore.yaml | 2 +- .../test/resources/3_0/crystal/petstore.yaml | 2 +- ...odels-for-testing-with-http-signature.yaml | 4 +- ...odels-for-testing-with-http-signature.yaml | 4 +- .../src/test/resources/3_0/elm.yaml | 2 +- ...odels-for-testing-with-http-signature.yaml | 6 +- .../3_0/helidon/petstore-for-testing.yaml | 4 +- .../petstore-no-multipart-for-testing.yaml | 2 +- .../resources/3_0/inline_model_resolver.yaml | 2 +- .../src/test/resources/3_0/issue_11772.yml | 2 +- .../src/test/resources/3_0/issue_13025.yaml | 2 +- .../src/test/resources/3_0/issue_3248.yaml | 4 +- .../src/test/resources/3_0/issue_5381.yaml | 2 +- .../src/test/resources/3_0/issue_6762.yaml | 4 +- .../src/test/resources/3_0/issue_7361.yaml | 2 +- ...sting-with-http-signature-okhttp-gson.yaml | 4 +- ...odels-for-testing-with-http-signature.yaml | 4 +- ...ith-fake-endpoints-models-for-testing.yaml | 4 +- .../resources/3_0/kotlin/reserved_words.yaml | 2 +- .../src/test/resources/3_0/mapSchemas.yaml | 2 +- .../3_0/micronaut/roles-extension-test.yaml | 2 +- .../oneof_polymorphism_and_inheritance.yaml | 2 +- .../3_0/petstore-with-complex-headers.yaml | 2 +- ...l => petstore-with-deprecated-fields.yaml} | 2 +- ...odels-for-testing-with-http-signature.yaml | 4 +- ...ith-fake-endpoints-models-for-testing.yaml | 4 +- .../3_0/petstore-with-nullable-required.yaml | 2 +- .../petstore-with-object-as-parameter.yaml | 2 +- .../src/test/resources/3_0/petstore.json | 2 +- .../src/test/resources/3_0/petstore.yaml | 2 +- .../resources/3_0/petstore_oas3_test.yaml | 2 +- ...odels-for-testing-with-http-signature.yaml | 4 +- .../resources/3_0/powershell/petstore.yaml | 2 +- .../test/resources/3_0/protobuf/petstore.yaml | 2 +- ...odels-for-testing-with-http-signature.yaml | 6 +- ...odels-for-testing-with-http-signature.yaml | 6 +- .../src/test/resources/3_0/r/petstore.yaml | 2 +- .../test/resources/3_0/response-tests.yaml | 2 +- .../3_0/rust-server/no-example-v3.yaml | 2 +- .../src/test/resources/3_0/rust/petstore.yaml | 2 +- .../resources/3_0/scala-akka/petstore.yaml | 2 +- .../test/resources/3_0/scala/petstore.yaml | 2 +- .../resources/3_0/schema-unalias-test.yml | 2 +- .../test/resources/3_0/server-required.yaml | 2 +- .../date-time-parameter-types-for-testing.yml | 2 +- .../unit_test_spec/3_0_3_unit_test_spec.yaml | 2 +- .../src/test/resources/3_0/wsdl/petstore.yaml | 2 +- .../src/test/resources/3_1/petstore.yaml | 2 +- .../typescript/node-es5-expected/api.ts | 2 +- .../typescript/node-es5-spec.json | 2 +- .../petstore-expected/api/store.service.ts | 2 +- .../typescript/petstore-spec.json | 2 +- .../src/test/resources/petstore.json | 2 +- .../Org.OpenAPITools/Client/RequestOptions.cs | 2 +- .../R-httr2-wrapper/.openapi-generator-ignore | 2 +- .../R/allof_tag_api_response.R | 4 +- .../petstore/R-httr2-wrapper/R/animal.R | 4 +- .../petstore/R-httr2-wrapper/R/any_of_pig.R | 2 +- .../R/any_of_primitive_type_test.R | 2 +- .../petstore/R-httr2-wrapper/R/api_client.R | 8 +-- .../petstore/R-httr2-wrapper/R/api_response.R | 2 +- .../petstore/R-httr2-wrapper/R/basque_pig.R | 4 +- .../client/petstore/R-httr2-wrapper/R/cat.R | 4 +- .../petstore/R-httr2-wrapper/R/cat_all_of.R | 4 +- .../petstore/R-httr2-wrapper/R/category.R | 4 +- .../petstore/R-httr2-wrapper/R/danish_pig.R | 4 +- .../client/petstore/R-httr2-wrapper/R/date.R | 4 +- .../client/petstore/R-httr2-wrapper/R/dog.R | 4 +- .../petstore/R-httr2-wrapper/R/dog_all_of.R | 4 +- .../petstore/R-httr2-wrapper/R/format_test.R | 4 +- .../petstore/R-httr2-wrapper/R/mammal.R | 2 +- .../R-httr2-wrapper/R/model_api_response.R | 4 +- .../R-httr2-wrapper/R/nested_one_of.R | 4 +- .../R/one_of_primitive_type_test.R | 2 +- .../client/petstore/R-httr2-wrapper/R/order.R | 4 +- .../client/petstore/R-httr2-wrapper/R/pet.R | 4 +- .../client/petstore/R-httr2-wrapper/R/pig.R | 2 +- .../petstore/R-httr2-wrapper/R/special.R | 4 +- .../petstore/R-httr2-wrapper/R/store_api.R | 2 +- .../client/petstore/R-httr2-wrapper/R/tag.R | 4 +- .../R-httr2-wrapper/R/update_pet_request.R | 4 +- .../client/petstore/R-httr2-wrapper/R/user.R | 4 +- .../client/petstore/R-httr2-wrapper/R/whale.R | 4 +- .../client/petstore/R-httr2-wrapper/R/zebra.R | 4 +- .../petstore/R-httr2-wrapper/docs/StoreApi.md | 2 +- .../tests/testthat/test_petstore.R | 2 +- .../tests/testthat/test_store_api.R | 2 +- .../R-httr2/.openapi-generator-ignore | 2 +- .../R-httr2/R/allof_tag_api_response.R | 2 +- samples/client/petstore/R-httr2/R/animal.R | 2 +- .../client/petstore/R-httr2/R/any_of_pig.R | 2 +- .../R-httr2/R/any_of_primitive_type_test.R | 2 +- .../client/petstore/R-httr2/R/api_client.R | 8 +-- .../client/petstore/R-httr2/R/api_response.R | 2 +- .../client/petstore/R-httr2/R/basque_pig.R | 2 +- samples/client/petstore/R-httr2/R/cat.R | 2 +- .../client/petstore/R-httr2/R/cat_all_of.R | 2 +- samples/client/petstore/R-httr2/R/category.R | 2 +- .../client/petstore/R-httr2/R/danish_pig.R | 2 +- samples/client/petstore/R-httr2/R/date.R | 2 +- samples/client/petstore/R-httr2/R/dog.R | 2 +- .../client/petstore/R-httr2/R/dog_all_of.R | 2 +- .../client/petstore/R-httr2/R/format_test.R | 2 +- samples/client/petstore/R-httr2/R/mammal.R | 2 +- .../petstore/R-httr2/R/model_api_response.R | 2 +- .../client/petstore/R-httr2/R/nested_one_of.R | 2 +- .../R-httr2/R/one_of_primitive_type_test.R | 2 +- samples/client/petstore/R-httr2/R/order.R | 2 +- samples/client/petstore/R-httr2/R/pet.R | 2 +- samples/client/petstore/R-httr2/R/pig.R | 2 +- samples/client/petstore/R-httr2/R/special.R | 2 +- samples/client/petstore/R-httr2/R/store_api.R | 2 +- samples/client/petstore/R-httr2/R/tag.R | 2 +- .../petstore/R-httr2/R/update_pet_request.R | 2 +- samples/client/petstore/R-httr2/R/user.R | 2 +- samples/client/petstore/R-httr2/R/whale.R | 2 +- samples/client/petstore/R-httr2/R/zebra.R | 2 +- .../client/petstore/R-httr2/docs/StoreApi.md | 2 +- .../client/petstore/R-httr2/man/StoreApi.Rd | 2 +- .../R-httr2/tests/testthat/test_petstore.R | 2 +- .../R-httr2/tests/testthat/test_store_api.R | 2 +- .../petstore/R/.openapi-generator-ignore | 2 +- .../petstore/R/R/allof_tag_api_response.R | 4 +- samples/client/petstore/R/R/animal.R | 4 +- samples/client/petstore/R/R/any_of_pig.R | 2 +- .../petstore/R/R/any_of_primitive_type_test.R | 2 +- samples/client/petstore/R/R/api_client.R | 4 +- samples/client/petstore/R/R/api_response.R | 2 +- samples/client/petstore/R/R/basque_pig.R | 4 +- samples/client/petstore/R/R/cat.R | 4 +- samples/client/petstore/R/R/cat_all_of.R | 4 +- samples/client/petstore/R/R/category.R | 4 +- samples/client/petstore/R/R/danish_pig.R | 4 +- samples/client/petstore/R/R/date.R | 4 +- samples/client/petstore/R/R/dog.R | 4 +- samples/client/petstore/R/R/dog_all_of.R | 4 +- samples/client/petstore/R/R/format_test.R | 4 +- samples/client/petstore/R/R/mammal.R | 2 +- .../client/petstore/R/R/model_api_response.R | 4 +- samples/client/petstore/R/R/nested_one_of.R | 4 +- .../petstore/R/R/one_of_primitive_type_test.R | 2 +- samples/client/petstore/R/R/order.R | 4 +- samples/client/petstore/R/R/pet.R | 4 +- samples/client/petstore/R/R/pig.R | 2 +- samples/client/petstore/R/R/special.R | 4 +- samples/client/petstore/R/R/store_api.R | 2 +- samples/client/petstore/R/R/tag.R | 4 +- .../client/petstore/R/R/update_pet_request.R | 4 +- samples/client/petstore/R/R/user.R | 4 +- samples/client/petstore/R/R/whale.R | 4 +- samples/client/petstore/R/R/zebra.R | 4 +- samples/client/petstore/R/docs/StoreApi.md | 2 +- .../petstore/R/tests/testthat/test_petstore.R | 2 +- .../R/tests/testthat/test_store_api.R | 2 +- .../petstore/ada/.openapi-generator-ignore | 2 +- .../src/client/samples-petstore-clients.adb | 2 +- .../src/client/samples-petstore-clients.ads | 2 +- .../android/httpclient/docs/StoreApi.md | 2 +- .../org/openapitools/client/api/StoreApi.java | 2 +- .../petstore/android/volley/docs/StoreApi.md | 2 +- .../org/openapitools/client/api/StoreApi.java | 4 +- .../main/default/classes/OASStoreApi.cls | 2 +- .../main/default/classes/OASStoreApiTest.cls | 2 +- .../async-scala/.openapi-generator-ignore | 2 +- samples/client/petstore/bash/client.sh | 48 ++++++------- samples/client/petstore/bash/docs/StoreApi.md | 2 +- samples/client/petstore/bash/petstore-cli | 4 +- samples/client/petstore/c/CMakeLists.txt | 6 +- samples/client/petstore/c/api/StoreAPI.c | 2 +- samples/client/petstore/c/api/StoreAPI.h | 2 +- samples/client/petstore/c/docs/StoreAPI.md | 2 +- samples/client/petstore/c/external/cJSON.c | 2 +- .../petstore/c/unit-tests/manual-user.c | 6 +- samples/client/petstore/clojure/git_push.sh | 2 +- .../src/open_api_petstore/api/store.clj | 4 +- .../clojure/src/open_api_petstore/core.clj | 6 +- .../petstore/cpp-qt/build-and-test.bash | 2 +- .../CppRestPetstoreClient/api/StoreApi.h | 2 +- .../petstore/cpp-tiny/lib/service/StoreApi.h | 2 +- .../client/petstore/cpp-tizen/doc/Doxyfile | 4 +- .../petstore/cpp-tizen/src/StoreManager.h | 4 +- .../Public/OpenAPIStoreApiOperations.h | 2 +- .../crystal/spec/api/store_api_spec.cr | 2 +- .../crystal/src/petstore/api/store_api.cr | 4 +- .../Lib/OpenAPIClient/docs/StoreApi.md | 2 +- .../Org/OpenAPITools/Api/StoreApi.cs | 4 +- .../Org/OpenAPITools/Client/ApiClient.cs | 2 +- .../Lib/SwaggerClient/docs/StoreApi.md | 2 +- .../Org/OpenAPITools/Api/StoreApi.cs | 4 +- .../Org/OpenAPITools/Client/ApiClient.cs | 2 +- .../Org/OpenAPITools/Client/Configuration.cs | 2 +- .../generatedSrc/Client/ApiClient.cs | 4 +- .../generatedSrc/Client/Configuration.cs | 4 +- .../csharp-netcore-functions/git_push.sh | 2 +- .../src/Org.OpenAPITools/Client/ApiClient.cs | 4 +- .../Org.OpenAPITools/Client/Configuration.cs | 4 +- .../Client/IReadableConfiguration.cs | 2 +- .../Org.OpenAPITools/Client/RequestOptions.cs | 2 +- .../docs/FakeApi.md | 2 +- .../docs/StoreApi.md | 2 +- .../src/Org.OpenAPITools/Api/StoreApi.cs | 16 ++--- .../Org.OpenAPITools/Client/RequestOptions.cs | 2 +- .../README.md | 2 +- .../docs/apis/FakeApi.md | 2 +- .../docs/apis/StoreApi.md | 2 +- .../docs/scripts/git_push.ps1 | 2 +- .../Org.OpenAPITools/Api/AnotherFakeApi.cs | 4 +- .../src/Org.OpenAPITools/Api/DefaultApi.cs | 4 +- .../src/Org.OpenAPITools/Api/FakeApi.cs | 60 ++++++++-------- .../Api/FakeClassnameTags123Api.cs | 4 +- .../src/Org.OpenAPITools/Api/PetApi.cs | 36 +++++----- .../src/Org.OpenAPITools/Api/StoreApi.cs | 28 ++++---- .../src/Org.OpenAPITools/Api/UserApi.cs | 32 ++++----- .../Org.OpenAPITools/Client/ApiException.cs | 2 +- .../Org.OpenAPITools/Client/ApiResponse`1.cs | 2 +- .../Client/HttpSigningConfiguration.cs | 18 ++--- .../README.md | 2 +- .../docs/apis/FakeApi.md | 2 +- .../docs/apis/StoreApi.md | 2 +- .../docs/scripts/git_push.ps1 | 2 +- .../Org.OpenAPITools/Api/AnotherFakeApi.cs | 4 +- .../src/Org.OpenAPITools/Api/DefaultApi.cs | 4 +- .../src/Org.OpenAPITools/Api/FakeApi.cs | 60 ++++++++-------- .../Api/FakeClassnameTags123Api.cs | 4 +- .../src/Org.OpenAPITools/Api/PetApi.cs | 36 +++++----- .../src/Org.OpenAPITools/Api/StoreApi.cs | 26 +++---- .../src/Org.OpenAPITools/Api/UserApi.cs | 32 ++++----- .../Org.OpenAPITools/Client/ApiException.cs | 2 +- .../Org.OpenAPITools/Client/ApiResponse`1.cs | 2 +- .../Client/HttpSigningConfiguration.cs | 18 ++--- .../README.md | 2 +- .../docs/apis/FakeApi.md | 2 +- .../docs/apis/StoreApi.md | 2 +- .../docs/scripts/git_push.ps1 | 2 +- .../Org.OpenAPITools/Api/AnotherFakeApi.cs | 4 +- .../src/Org.OpenAPITools/Api/DefaultApi.cs | 4 +- .../src/Org.OpenAPITools/Api/FakeApi.cs | 60 ++++++++-------- .../Api/FakeClassnameTags123Api.cs | 4 +- .../src/Org.OpenAPITools/Api/PetApi.cs | 36 +++++----- .../src/Org.OpenAPITools/Api/StoreApi.cs | 26 +++---- .../src/Org.OpenAPITools/Api/UserApi.cs | 32 ++++----- .../Org.OpenAPITools/Client/ApiException.cs | 2 +- .../Org.OpenAPITools/Client/ApiResponse`1.cs | 2 +- .../Client/HttpSigningConfiguration.cs | 18 ++--- .../OpenAPIClient-httpclient/docs/FakeApi.md | 2 +- .../OpenAPIClient-httpclient/docs/StoreApi.md | 2 +- .../Org.OpenAPITools.Test/Api/PetApiTests.cs | 10 +-- .../src/Org.OpenAPITools/Api/StoreApi.cs | 16 ++--- .../Org.OpenAPITools/Client/RequestOptions.cs | 2 +- .../OpenAPIClient-net47/docs/FakeApi.md | 2 +- .../OpenAPIClient-net47/docs/StoreApi.md | 2 +- .../src/Org.OpenAPITools/Api/StoreApi.cs | 16 ++--- .../Org.OpenAPITools/Client/RequestOptions.cs | 2 +- .../OpenAPIClient-net48/docs/FakeApi.md | 2 +- .../OpenAPIClient-net48/docs/StoreApi.md | 2 +- .../src/Org.OpenAPITools/Api/StoreApi.cs | 16 ++--- .../Org.OpenAPITools/Client/RequestOptions.cs | 2 +- .../OpenAPIClient-net5.0/docs/FakeApi.md | 2 +- .../OpenAPIClient-net5.0/docs/StoreApi.md | 2 +- .../src/Org.OpenAPITools/Api/StoreApi.cs | 16 ++--- .../Org.OpenAPITools/Client/RequestOptions.cs | 2 +- .../OpenAPIClient/docs/FakeApi.md | 2 +- .../OpenAPIClient/docs/StoreApi.md | 2 +- .../Org.OpenAPITools.Test/Api/PetApiTests.cs | 2 +- .../JSONComposedSchemaTests.cs | 2 +- .../Org.OpenAPITools.Test/Model/PetTests.cs | 4 +- .../src/Org.OpenAPITools/Api/StoreApi.cs | 16 ++--- .../Org.OpenAPITools/Client/RequestOptions.cs | 2 +- .../Org.OpenAPITools/Org.OpenAPITools.nuspec | 2 +- .../OpenAPIClientCore/docs/FakeApi.md | 2 +- .../OpenAPIClientCore/docs/StoreApi.md | 2 +- .../src/Org.OpenAPITools/Api/StoreApi.cs | 16 ++--- .../Org.OpenAPITools/Client/RequestOptions.cs | 2 +- .../Org.OpenAPITools/Org.OpenAPITools.nuspec | 2 +- .../docs/StoreApi.md | 2 +- .../src/Org.OpenAPITools/Api/StoreApi.cs | 16 ++--- .../Org.OpenAPITools/Client/RequestOptions.cs | 2 +- .../csharp/OpenAPIClient/docs/FakeApi.md | 2 +- .../csharp/OpenAPIClient/docs/StoreApi.md | 2 +- .../src/Org.OpenAPITools/Api/StoreApi.cs | 16 ++--- .../csharp/OpenAPIClientNet35/build.sh | 2 +- .../csharp/OpenAPIClientNet35/docs/FakeApi.md | 2 +- .../OpenAPIClientNet35/docs/StoreApi.md | 2 +- .../csharp/OpenAPIClientNet35/git_push.sh | 2 +- .../src/Org.OpenAPITools/Api/StoreApi.cs | 8 +-- .../Client/IReadableConfiguration.cs | 2 +- .../Org.OpenAPITools/Org.OpenAPITools.nuspec | 2 +- .../csharp/OpenAPIClientNet40/build.sh | 2 +- .../csharp/OpenAPIClientNet40/docs/FakeApi.md | 2 +- .../OpenAPIClientNet40/docs/StoreApi.md | 2 +- .../csharp/OpenAPIClientNet40/git_push.sh | 2 +- .../src/Org.OpenAPITools/Api/StoreApi.cs | 8 +-- .../Client/IReadableConfiguration.cs | 2 +- .../Org.OpenAPITools/Org.OpenAPITools.nuspec | 2 +- .../docs/FakeApi.md | 2 +- .../docs/StoreApi.md | 2 +- .../OpenAPIClientNetCoreProject/git_push.sh | 2 +- .../src/Org.OpenAPITools/Api/StoreApi.cs | 16 ++--- .../Client/IReadableConfiguration.cs | 2 +- .../OpenAPIClientNetStandard/docs/FakeApi.md | 2 +- .../OpenAPIClientNetStandard/docs/StoreApi.md | 2 +- .../OpenAPIClientNetStandard/git_push.sh | 2 +- .../src/Org.OpenAPITools/Api/StoreApi.cs | 16 ++--- .../Client/IReadableConfiguration.cs | 2 +- .../OpenAPIClientWithPropertyChanged/build.sh | 2 +- .../docs/FakeApi.md | 2 +- .../docs/StoreApi.md | 2 +- .../git_push.sh | 2 +- .../src/Org.OpenAPITools/Api/StoreApi.cs | 16 ++--- .../Client/IReadableConfiguration.cs | 2 +- .../Org.OpenAPITools/Org.OpenAPITools.nuspec | 2 +- .../client/petstore/eiffel/docs/STORE_API.md | 2 +- samples/client/petstore/eiffel/gitpush.sh | 2 +- .../petstore/eiffel/src/api/store_api.e | 2 +- .../client/petstore/eiffel/src/api_client.e | 14 ++-- .../src/framework/auth/http_basic_auth.e | 2 +- .../eiffel/src/framework/auth/oauth.e | 2 +- .../serialization/api_deserializer.e | 2 +- .../framework/serialization/api_serializer.e | 2 +- .../json_basic_reflector_deserializer.e | 2 +- .../eiffel/test/apis/store_api_test.e | 2 +- .../elixir/lib/openapi_petstore/api/store.ex | 2 +- .../erlang-client/src/petstore_store_api.erl | 2 +- .../petstore/go/go-petstore/api/openapi.yaml | 4 +- .../petstore/go/go-petstore/api_store.go | 4 +- samples/client/petstore/go/user_api_test.go | 2 +- .../docs/OpenAPIPetstore-API-Store.html | 2 +- .../haskell-http-client/docs/linuwial.css | 2 +- .../haskell-http-client/docs/ocean.css | 2 +- .../docs/openapi-petstore.txt | 2 +- .../docs/src/OpenAPIPetstore.API.Store.html | 2 +- .../haskell-http-client/example-app/Main.hs | 4 +- .../lib/OpenAPIPetstore/API/Store.hs | 2 +- .../petstore/haskell-http-client/openapi.yaml | 4 +- .../java-helidon-client/mp/docs/FakeApi.md | 2 +- .../java-helidon-client/mp/docs/StoreApi.md | 2 +- .../org/openapitools/client/api/StoreApi.java | 2 +- .../openapitools/client/api/StoreApiTest.java | 2 +- .../java-helidon-client/se/docs/FakeApi.md | 2 +- .../java-helidon-client/se/docs/StoreApi.md | 2 +- .../org/openapitools/client/api/StoreApi.java | 2 +- .../openapitools/client/api/StoreApiTest.java | 2 +- .../docs/apis/StoreApi.md | 2 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../org/openapitools/api/StoreApiSpec.groovy | 2 +- .../java/apache-httpclient/api/openapi.yaml | 4 +- .../java/apache-httpclient/docs/FakeApi.md | 2 +- .../java/apache-httpclient/docs/StoreApi.md | 2 +- .../org/openapitools/client/api/StoreApi.java | 2 +- .../openapitools/client/api/StoreApiTest.java | 2 +- .../java/feign-no-nullable/api/openapi.yaml | 4 +- .../org/openapitools/client/api/StoreApi.java | 4 +- .../openapitools/client/api/StoreApiTest.java | 2 +- .../petstore/java/feign/api/openapi.yaml | 4 +- .../java/feign/feign10x/api/openapi.yaml | 4 +- .../petstore/java/feign/feign10x/git_push.sh | 2 +- .../org/openapitools/client/ApiClient.java | 2 +- .../client/ServerConfiguration.java | 2 +- .../org/openapitools/client/api/StoreApi.java | 2 +- .../openapitools/client/api/StoreApiTest.java | 2 +- .../org/openapitools/client/api/StoreApi.java | 4 +- .../openapitools/client/api/StoreApiTest.java | 2 +- .../java/google-api-client/api/openapi.yaml | 4 +- .../java/google-api-client/docs/FakeApi.md | 2 +- .../java/google-api-client/docs/StoreApi.md | 2 +- .../org/openapitools/client/api/FakeApi.java | 4 +- .../org/openapitools/client/api/StoreApi.java | 4 +- .../openapitools/client/api/StoreApiTest.java | 2 +- .../petstore/java/jersey1/api/openapi.yaml | 4 +- .../petstore/java/jersey1/docs/FakeApi.md | 2 +- .../petstore/java/jersey1/docs/StoreApi.md | 2 +- .../org/openapitools/client/api/StoreApi.java | 2 +- .../openapitools/client/api/StoreApiTest.java | 2 +- .../api/openapi.yaml | 4 +- .../docs/FakeApi.md | 2 +- .../docs/StoreApi.md | 2 +- .../org/openapitools/client/api/FakeApi.java | 4 +- .../org/openapitools/client/api/StoreApi.java | 4 +- .../openapitools/client/api/StoreApiTest.java | 2 +- .../java/jersey2-java8/api/openapi.yaml | 4 +- .../java/jersey2-java8/docs/FakeApi.md | 2 +- .../java/jersey2-java8/docs/StoreApi.md | 2 +- .../org/openapitools/client/api/FakeApi.java | 4 +- .../org/openapitools/client/api/StoreApi.java | 4 +- .../openapitools/client/api/StoreApiTest.java | 2 +- .../petstore/java/jersey3/api/openapi.yaml | 4 +- .../petstore/java/jersey3/docs/FakeApi.md | 2 +- .../petstore/java/jersey3/docs/StoreApi.md | 2 +- .../org/openapitools/client/api/FakeApi.java | 4 +- .../org/openapitools/client/api/StoreApi.java | 4 +- .../client/JSONComposedSchemaTest.java | 6 +- .../openapitools/client/api/StoreApiTest.java | 2 +- .../docs/StoreApi.md | 2 +- .../org/openapitools/client/api/StoreApi.java | 2 +- .../openapitools/client/api/StoreApiTest.java | 2 +- .../microprofile-rest-client/docs/StoreApi.md | 2 +- .../org/openapitools/client/api/StoreApi.java | 2 +- .../openapitools/client/api/StoreApiTest.java | 2 +- .../java/native-async/api/openapi.yaml | 4 +- .../java/native-async/docs/FakeApi.md | 4 +- .../java/native-async/docs/StoreApi.md | 4 +- .../org/openapitools/client/api/StoreApi.java | 4 +- .../model/AdditionalPropertiesAnyType.java | 2 +- .../model/AdditionalPropertiesArray.java | 2 +- .../model/AdditionalPropertiesBoolean.java | 2 +- .../model/AdditionalPropertiesInteger.java | 2 +- .../model/AdditionalPropertiesNumber.java | 2 +- .../model/AdditionalPropertiesObject.java | 2 +- .../model/AdditionalPropertiesString.java | 2 +- .../openapitools/client/api/StoreApiTest.java | 2 +- .../petstore/java/native/api/openapi.yaml | 4 +- .../petstore/java/native/docs/FakeApi.md | 4 +- .../petstore/java/native/docs/StoreApi.md | 4 +- .../org/openapitools/client/api/StoreApi.java | 4 +- .../model/AdditionalPropertiesAnyType.java | 2 +- .../model/AdditionalPropertiesArray.java | 2 +- .../model/AdditionalPropertiesBoolean.java | 2 +- .../model/AdditionalPropertiesInteger.java | 2 +- .../model/AdditionalPropertiesNumber.java | 2 +- .../model/AdditionalPropertiesObject.java | 2 +- .../model/AdditionalPropertiesString.java | 2 +- .../openapitools/client/api/StoreApiTest.java | 2 +- .../docs/FakeApi.md | 2 +- .../docs/StoreApi.md | 2 +- .../org/openapitools/client/api/FakeApi.java | 10 +-- .../org/openapitools/client/api/StoreApi.java | 6 +- .../src/main/resources/openapi/openapi.yaml | 4 +- .../org/openapitools/client/JSONTest.java | 2 +- .../openapitools/client/api/StoreApiTest.java | 2 +- .../openapitools/client/model/Category.java | 2 +- .../client/model/ModelApiResponse.java | 2 +- .../org/openapitools/client/model/Order.java | 2 +- .../org/openapitools/client/model/Pet.java | 2 +- .../org/openapitools/client/model/Tag.java | 2 +- .../org/openapitools/client/model/User.java | 2 +- .../api/openapi.yaml | 4 +- .../docs/FakeApi.md | 2 +- .../docs/StoreApi.md | 2 +- .../org/openapitools/client/api/FakeApi.java | 10 +-- .../org/openapitools/client/api/StoreApi.java | 6 +- .../openapitools/client/api/StoreApiTest.java | 2 +- .../okhttp-gson-swagger1/api/openapi.yaml | 2 +- .../okhttp-gson-swagger1/docs/StoreApi.md | 2 +- .../org/openapitools/client/api/StoreApi.java | 6 +- .../openapitools/client/model/Category.java | 2 +- .../client/model/ModelApiResponse.java | 2 +- .../org/openapitools/client/model/Order.java | 2 +- .../org/openapitools/client/model/Pet.java | 2 +- .../org/openapitools/client/model/Tag.java | 2 +- .../org/openapitools/client/model/User.java | 2 +- .../openapitools/client/api/StoreApiTest.java | 2 +- .../java/okhttp-gson/api/openapi.yaml | 4 +- .../petstore/java/okhttp-gson/docs/FakeApi.md | 2 +- .../java/okhttp-gson/docs/StoreApi.md | 2 +- .../org/openapitools/client/api/FakeApi.java | 10 +-- .../org/openapitools/client/api/StoreApi.java | 6 +- .../model/AdditionalPropertiesClass.java | 2 +- .../org/openapitools/client/model/Apple.java | 2 +- .../model/ArrayOfArrayOfNumberOnly.java | 2 +- .../client/model/ArrayOfInlineAllOf.java | 2 +- ...InlineAllOfArrayAllofDogPropertyInner.java | 2 +- ...eAllOfArrayAllofDogPropertyInnerAllOf.java | 2 +- ...AllOfArrayAllofDogPropertyInnerAllOf1.java | 2 +- .../client/model/ArrayOfNumberOnly.java | 2 +- .../openapitools/client/model/ArrayTest.java | 2 +- .../org/openapitools/client/model/Banana.java | 2 +- .../openapitools/client/model/BasquePig.java | 2 +- .../client/model/Capitalization.java | 2 +- .../org/openapitools/client/model/Cat.java | 2 +- .../openapitools/client/model/CatAllOf.java | 2 +- .../openapitools/client/model/Category.java | 2 +- .../openapitools/client/model/ClassModel.java | 2 +- .../org/openapitools/client/model/Client.java | 2 +- .../client/model/ComplexQuadrilateral.java | 2 +- .../openapitools/client/model/DanishPig.java | 2 +- .../client/model/DeprecatedObject.java | 2 +- .../org/openapitools/client/model/Dog.java | 2 +- .../openapitools/client/model/DogAllOf.java | 2 +- .../openapitools/client/model/EnumArrays.java | 2 +- .../client/model/EnumStringDiscriminator.java | 2 +- .../openapitools/client/model/EnumTest.java | 2 +- .../client/model/EquilateralTriangle.java | 2 +- .../client/model/FileSchemaTestClass.java | 2 +- .../org/openapitools/client/model/Foo.java | 2 +- .../client/model/FooGetDefaultResponse.java | 2 +- .../openapitools/client/model/FormatTest.java | 2 +- .../client/model/HasOnlyReadOnly.java | 2 +- .../client/model/HealthCheckResult.java | 2 +- .../openapitools/client/model/MapTest.java | 2 +- ...ropertiesAndAdditionalPropertiesClass.java | 2 +- .../client/model/Model200Response.java | 2 +- .../client/model/ModelApiResponse.java | 2 +- .../openapitools/client/model/ModelFile.java | 2 +- .../openapitools/client/model/ModelList.java | 2 +- .../client/model/ModelReturn.java | 2 +- .../org/openapitools/client/model/Name.java | 2 +- .../openapitools/client/model/NumberOnly.java | 2 +- .../model/ObjectWithDeprecatedFields.java | 2 +- .../org/openapitools/client/model/Order.java | 2 +- .../client/model/OuterComposite.java | 2 +- .../openapitools/client/model/ParentPet.java | 2 +- .../org/openapitools/client/model/Pet.java | 2 +- .../client/model/PetWithRequiredTags.java | 2 +- .../client/model/QuadrilateralInterface.java | 2 +- .../client/model/ReadOnlyFirst.java | 2 +- .../client/model/ScaleneTriangle.java | 2 +- .../client/model/ShapeInterface.java | 2 +- .../client/model/SimpleQuadrilateral.java | 2 +- .../client/model/SpecialModelName.java | 2 +- .../org/openapitools/client/model/Tag.java | 2 +- .../client/model/TriangleInterface.java | 2 +- .../org/openapitools/client/model/User.java | 2 +- .../org/openapitools/client/model/Whale.java | 2 +- .../org/openapitools/client/model/Zebra.java | 2 +- .../org/openapitools/client/JSONTest.java | 2 +- .../rest-assured-jackson/api/openapi.yaml | 4 +- .../rest-assured-jackson/docs/StoreApi.md | 2 +- .../org/openapitools/client/api/StoreApi.java | 2 +- .../openapitools/client/api/FakeApiTest.java | 2 +- .../java/rest-assured/api/openapi.yaml | 4 +- .../java/rest-assured/docs/StoreApi.md | 2 +- .../org/openapitools/client/api/StoreApi.java | 2 +- .../openapitools/client/api/FakeApiTest.java | 2 +- .../petstore/java/resteasy/api/openapi.yaml | 4 +- .../petstore/java/resteasy/docs/FakeApi.md | 2 +- .../petstore/java/resteasy/docs/StoreApi.md | 2 +- .../org/openapitools/client/api/StoreApi.java | 2 +- .../openapitools/client/api/StoreApiTest.java | 2 +- .../resttemplate-swagger1/api/openapi.yaml | 2 +- .../resttemplate-swagger1/docs/StoreApi.md | 2 +- .../org/openapitools/client/api/StoreApi.java | 4 +- .../openapitools/client/api/StoreApiTest.java | 2 +- .../resttemplate-withXml/api/openapi.yaml | 4 +- .../java/resttemplate-withXml/docs/FakeApi.md | 2 +- .../resttemplate-withXml/docs/StoreApi.md | 2 +- .../org/openapitools/client/api/FakeApi.java | 4 +- .../org/openapitools/client/api/StoreApi.java | 4 +- .../openapitools/client/api/StoreApiTest.java | 2 +- .../java/resttemplate/api/openapi.yaml | 4 +- .../java/resttemplate/docs/FakeApi.md | 2 +- .../java/resttemplate/docs/StoreApi.md | 2 +- .../org/openapitools/client/api/FakeApi.java | 4 +- .../org/openapitools/client/api/StoreApi.java | 4 +- .../openapitools/client/api/StoreApiTest.java | 2 +- .../java/retrofit2-play26/api/openapi.yaml | 4 +- .../java/retrofit2-play26/docs/FakeApi.md | 2 +- .../java/retrofit2-play26/docs/StoreApi.md | 2 +- .../org/openapitools/client/api/StoreApi.java | 2 +- .../openapitools/client/api/StoreApiTest.java | 2 +- .../petstore/java/retrofit2/api/openapi.yaml | 4 +- .../petstore/java/retrofit2/docs/FakeApi.md | 2 +- .../petstore/java/retrofit2/docs/StoreApi.md | 2 +- .../org/openapitools/client/api/StoreApi.java | 2 +- .../openapitools/client/api/StoreApiTest.java | 2 +- .../java/retrofit2rx2/api/openapi.yaml | 4 +- .../java/retrofit2rx2/docs/FakeApi.md | 2 +- .../java/retrofit2rx2/docs/StoreApi.md | 2 +- .../org/openapitools/client/api/StoreApi.java | 2 +- .../openapitools/client/api/StoreApiTest.java | 2 +- .../java/retrofit2rx3/api/openapi.yaml | 4 +- .../java/retrofit2rx3/docs/FakeApi.md | 2 +- .../java/retrofit2rx3/docs/StoreApi.md | 2 +- .../org/openapitools/client/api/StoreApi.java | 2 +- .../openapitools/client/api/StoreApiTest.java | 2 +- .../java/vertx-no-nullable/api/openapi.yaml | 4 +- .../java/vertx-no-nullable/docs/FakeApi.md | 2 +- .../java/vertx-no-nullable/docs/StoreApi.md | 2 +- .../openapitools/client/api/StoreApiImpl.java | 4 +- .../client/api/rxjava/StoreApi.java | 8 +-- .../openapitools/client/api/StoreApiTest.java | 2 +- .../petstore/java/vertx/api/openapi.yaml | 4 +- .../petstore/java/vertx/docs/FakeApi.md | 2 +- .../petstore/java/vertx/docs/StoreApi.md | 2 +- .../openapitools/client/api/StoreApiImpl.java | 4 +- .../client/api/rxjava/StoreApi.java | 8 +-- .../openapitools/client/api/StoreApiTest.java | 2 +- .../.github/workflows/maven.yml | 0 .../.gitignore | 0 .../.openapi-generator-ignore | 0 .../.openapi-generator/FILES | 0 .../.openapi-generator/VERSION | 0 .../.travis.yml | 0 .../README.md | 0 .../api/openapi.yaml | 0 .../build.gradle | 0 .../build.sbt | 0 .../docs/ByteArrayObject.md | 0 .../docs/DefaultApi.md | 0 .../git_push.sh | 0 .../gradle.properties | 0 .../gradle/wrapper/gradle-wrapper.jar | Bin .../gradle/wrapper/gradle-wrapper.properties | 0 .../gradlew | 0 .../gradlew.bat | 0 .../pom.xml | 0 .../settings.gradle | 0 .../src/main/AndroidManifest.xml | 0 .../org/openapitools/client/ApiClient.java | 0 .../client/JavaTimeFormatter.java | 0 .../client/RFC3339DateFormat.java | 0 .../client/ServerConfiguration.java | 0 .../openapitools/client/ServerVariable.java | 0 .../org/openapitools/client/StringUtil.java | 0 .../openapitools/client/api/DefaultApi.java | 0 .../openapitools/client/auth/ApiKeyAuth.java | 0 .../client/auth/Authentication.java | 0 .../client/auth/HttpBasicAuth.java | 0 .../client/auth/HttpBearerAuth.java | 0 .../client/model/ByteArrayObject.java | 0 .../client/api/DefaultApiTest.java | 0 .../client/model/ByteArrayObjectTest.java | 0 .../petstore/java/webclient/api/openapi.yaml | 4 +- .../petstore/java/webclient/docs/FakeApi.md | 2 +- .../petstore/java/webclient/docs/StoreApi.md | 2 +- .../org/openapitools/client/api/FakeApi.java | 8 +-- .../org/openapitools/client/api/StoreApi.java | 8 +-- .../openapitools/client/api/StoreApiTest.java | 2 +- .../javascript-apollo/docs/StoreApi.md | 2 +- .../javascript-apollo/src/api/StoreApi.js | 2 +- .../javascript-apollo/src/model/Color.js | 6 +- .../javascript-apollo/src/model/Pig.js | 6 +- .../API/Client/StoreApi.js | 2 +- .../lib/goog/base.js | 10 +-- .../petstore/javascript-es6/docs/StoreApi.md | 2 +- .../javascript-es6/src/api/StoreApi.js | 2 +- .../javascript-es6/src/model/Color.js | 6 +- .../petstore/javascript-es6/src/model/Pig.js | 6 +- .../petstore/javascript-flowtyped/README.md | 2 +- .../petstore/javascript-flowtyped/lib/api.js | 4 +- .../javascript-flowtyped/lib/api.js.flow | 4 +- .../petstore/javascript-flowtyped/src/api.js | 4 +- .../javascript-promise-es6/docs/StoreApi.md | 2 +- .../src/api/StoreApi.js | 4 +- .../javascript-promise-es6/src/model/Color.js | 6 +- .../javascript-promise-es6/src/model/Pig.js | 6 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../org/openapitools/api/StoreApiTest.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../org/openapitools/api/StoreApiTest.java | 2 +- .../petstore/jmeter/.openapi-generator-ignore | 2 +- samples/client/petstore/jmeter/PetApi.jmx | 16 ++--- samples/client/petstore/jmeter/StoreApi.jmx | 10 +-- samples/client/petstore/jmeter/UserApi.jmx | 16 ++--- .../README.md | 4 +- .../client/request/RequestFactory.kt | 2 +- .../README.md | 4 +- .../client/request/RequestFactory.kt | 2 +- .../petstore/kotlin-gson/docs/StoreApi.md | 2 +- .../org/openapitools/client/apis/StoreApi.kt | 4 +- .../petstore/kotlin-jackson/docs/StoreApi.md | 2 +- .../org/openapitools/client/apis/StoreApi.kt | 4 +- .../docs/StoreApi.md | 2 +- .../org/openapitools/client/apis/StoreApi.kt | 4 +- .../kotlin-jvm-ktor-gson/docs/StoreApi.md | 2 +- .../org/openapitools/client/apis/StoreApi.kt | 2 +- .../kotlin-jvm-ktor-jackson/docs/StoreApi.md | 2 +- .../org/openapitools/client/apis/StoreApi.kt | 2 +- .../docs/StoreApi.md | 2 +- .../org/openapitools/client/apis/StoreApi.kt | 4 +- .../kotlin-jvm-vertx-gson/docs/StoreApi.md | 2 +- .../org/openapitools/client/apis/StoreApi.kt | 4 +- .../docs/StoreApi.md | 2 +- .../org/openapitools/client/apis/StoreApi.kt | 4 +- .../kotlin-jvm-vertx-jackson/docs/StoreApi.md | 2 +- .../org/openapitools/client/apis/StoreApi.kt | 4 +- .../kotlin-jvm-vertx-moshi/docs/StoreApi.md | 2 +- .../org/openapitools/client/apis/StoreApi.kt | 4 +- .../petstore/kotlin-jvm-volley/README.md | 4 +- .../kotlin-jvm-volley/docs/StoreApi.md | 2 +- .../org/openapitools/client/apis/StoreApi.kt | 2 +- .../client/request/RequestFactory.kt | 2 +- .../kotlin-modelMutable/docs/StoreApi.md | 2 +- .../org/openapitools/client/apis/StoreApi.kt | 4 +- .../kotlin-moshi-codegen/docs/StoreApi.md | 2 +- .../org/openapitools/client/apis/StoreApi.kt | 4 +- .../kotlin-multiplatform/docs/StoreApi.md | 2 +- .../org/openapitools/client/apis/StoreApi.kt | 2 +- .../kotlin-nonpublic/docs/StoreApi.md | 2 +- .../org/openapitools/client/apis/StoreApi.kt | 4 +- .../petstore/kotlin-nullable/docs/StoreApi.md | 2 +- .../org/openapitools/client/apis/StoreApi.kt | 4 +- .../petstore/kotlin-okhttp3/docs/StoreApi.md | 2 +- .../org/openapitools/client/apis/StoreApi.kt | 4 +- .../docs/StoreApi.md | 2 +- .../org/openapitools/client/apis/StoreApi.kt | 2 +- .../kotlin-retrofit2-rx3/docs/StoreApi.md | 2 +- .../org/openapitools/client/apis/StoreApi.kt | 2 +- .../kotlin-retrofit2/docs/StoreApi.md | 2 +- .../org/openapitools/client/apis/StoreApi.kt | 2 +- .../petstore/kotlin-string/docs/StoreApi.md | 2 +- .../org/openapitools/client/apis/StoreApi.kt | 4 +- .../kotlin-threetenbp/docs/StoreApi.md | 2 +- .../org/openapitools/client/apis/StoreApi.kt | 4 +- .../client/petstore/kotlin/docs/StoreApi.md | 2 +- .../org/openapitools/client/apis/StoreApi.kt | 4 +- .../core-data/SwaggerClient/Api/SWGStoreApi.h | 2 +- .../core-data/SwaggerClient/Api/SWGStoreApi.m | 2 +- .../objc/core-data/docs/SWGStoreApi.md | 2 +- .../default/SwaggerClient/Api/SWGStoreApi.h | 2 +- .../default/SwaggerClient/Api/SWGStoreApi.m | 2 +- .../petstore/objc/default/docs/SWGStoreApi.md | 2 +- samples/client/petstore/perl/docs/StoreApi.md | 2 +- .../client/petstore/perl/tests/01_pet_api.t | 2 +- samples/client/petstore/perl/tests/04_role.t | 2 +- .../petstore/perl/tests/05_long_module_name.t | 2 +- .../petstore/perl/tests/06_inheritance.t | 2 +- .../OpenAPIClient-php/docs/Api/StoreApi.md | 2 +- .../lib/ObjectSerializer.php | 4 +- .../tests/DateTimeSerializerTest.php | 4 +- .../OpenAPIClient-php/tests/OrderApiTest.php | 6 +- samples/client/petstore/powershell/Test1.ps1 | 2 +- .../petstore/powershell/docs/PSStoreApi.md | 2 +- .../Private/PSHttpSignatureAuth.ps1 | 2 +- .../powershell/tests/Petstore.Tests.ps1 | 2 +- .../petstore/python-asyncio/docs/FakeApi.md | 2 +- .../petstore/python-asyncio/docs/StoreApi.md | 2 +- .../petstore_api/api/store_api.py | 4 +- .../petstore/python-legacy/docs/FakeApi.md | 2 +- .../petstore/python-legacy/docs/StoreApi.md | 2 +- .../petstore_api/api/store_api.py | 4 +- .../petstore/python-prior/docs/FakeApi.md | 2 +- .../petstore/python-prior/docs/StoreApi.md | 2 +- .../petstore_api/api/store_api.py | 2 +- .../petstore_api/models/__init__.py | 2 +- .../python-prior/tests/test_api_client.py | 2 +- .../docs/FakeApi.md | 2 +- .../docs/StoreApi.md | 2 +- .../petstore_api/api/store_api.py | 2 +- .../petstore_api/models/__init__.py | 2 +- .../tests/test_api_client.py | 2 +- .../petstore/python-tornado/docs/FakeApi.md | 2 +- .../petstore/python-tornado/docs/StoreApi.md | 2 +- .../petstore_api/api/store_api.py | 4 +- .../petstore/ruby-autoload/docs/StoreApi.md | 2 +- .../lib/petstore/api/store_api.rb | 4 +- .../ruby-autoload/spec/api/store_api_spec.rb | 2 +- .../petstore/ruby-faraday/docs/StoreApi.md | 2 +- .../lib/petstore/api/store_api.rb | 4 +- .../ruby-faraday/spec/api/store_api_spec.rb | 2 +- .../ruby-faraday/spec/custom/pet_spec.rb | 4 +- samples/client/petstore/ruby/docs/StoreApi.md | 2 +- .../ruby/lib/petstore/api/store_api.rb | 4 +- .../petstore/ruby/spec/api/store_api_spec.rb | 2 +- .../petstore/ruby/spec/custom/pet_spec.rb | 2 +- .../rust/hyper/petstore/docs/StoreApi.md | 2 +- .../reqwest/petstore-async/docs/StoreApi.md | 2 +- .../petstore-async/src/apis/store_api.rs | 2 +- .../reqwest/petstore-async/tests/pet_tests.rs | 2 +- .../petstore-awsv4signature/docs/StoreApi.md | 2 +- .../src/apis/store_api.rs | 2 +- .../rust/reqwest/petstore/docs/StoreApi.md | 2 +- .../reqwest/petstore/src/apis/store_api.rs | 2 +- .../petstore/scala-akka/docs/StoreApi.md | 2 +- .../openapitools/client/api/StoreApi.scala | 2 +- .../openapitools/client/core/ApiInvoker.scala | 2 +- .../openapitools/example/api/StoreApi.scala | 4 +- .../openapitools/client/api/StoreApi.scala | 4 +- .../petstore/scala-httpclient/git_push.sh | 2 +- .../openapitools/client/api/StoreApi.scala | 4 +- .../openapitools/client/api/StoreApi.scala | 2 +- .../java/org/openapitools/api/StoreApi.java | 4 +- .../java/org/openapitools/api/DefaultApi.java | 4 +- .../java/org/openapitools/api/StoreApi.java | 4 +- .../java/org/openapitools/api/StoreApi.java | 4 +- .../java/org/openapitools/api/StoreApi.java | 4 +- .../java/org/openapitools/api/StoreApi.java | 4 +- .../java/org/openapitools/api/StoreApi.java | 4 +- .../Classes/OpenAPIs/APIHelper.swift | 2 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/StoreAPI.swift | 4 +- .../swift5/alamofireLibrary/docs/StoreAPI.md | 2 +- .../Classes/OpenAPIs/APIHelper.swift | 2 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/StoreAPI.swift | 4 +- .../swift5/asyncAwaitLibrary/docs/StoreAPI.md | 2 +- .../Classes/OpenAPIs/APIHelper.swift | 2 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/StoreAPI.swift | 4 +- .../swift5/combineLibrary/docs/StoreAPI.md | 2 +- .../Classes/OpenAPIs/APIHelper.swift | 2 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/StoreAPI.swift | 4 +- .../petstore/swift5/default/docs/StoreAPI.md | 2 +- .../Classes/OpenAPIs/APIHelper.swift | 2 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/StoreAPI.swift | 4 +- .../swift5/deprecated/docs/StoreAPI.md | 2 +- .../Classes/OpenAPIs/APIHelper.swift | 2 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/StoreAPI.swift | 4 +- .../swift5/frozenEnums/docs/StoreAPI.md | 2 +- .../Classes/OpenAPIs/APIHelper.swift | 2 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/StoreAPI.swift | 4 +- .../swift5/nonPublicApi/docs/StoreAPI.md | 2 +- .../Classes/OpenAPIs/APIHelper.swift | 2 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/StoreAPI.swift | 4 +- .../swift5/objcCompatible/docs/StoreAPI.md | 2 +- .../Classes/OpenAPIs/APIHelper.swift | 2 +- .../Classes/OpenAPIs/APIHelper.swift | 2 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/StoreAPI.swift | 4 +- .../swift5/promisekitLibrary/docs/StoreAPI.md | 2 +- .../Classes/OpenAPIs/APIHelper.swift | 2 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/StoreAPI.swift | 4 +- .../readonlyProperties/docs/StoreAPI.md | 2 +- .../Classes/OpenAPIs/APIHelper.swift | 2 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/StoreAPI.swift | 4 +- .../swift5/resultLibrary/docs/StoreAPI.md | 2 +- .../Classes/OpenAPIs/APIHelper.swift | 2 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/StoreAPI.swift | 4 +- .../swift5/rxswiftLibrary/docs/StoreAPI.md | 2 +- .../Sources/PetstoreClient/APIHelper.swift | 2 +- .../Sources/PetstoreClient/APIs/PetAPI.swift | 2 +- .../PetstoreClient/APIs/StoreAPI.swift | 4 +- .../swift5/urlsessionLibrary/docs/StoreAPI.md | 2 +- .../Sources/PetstoreClient/APIs/PetAPI.swift | 4 +- .../PetstoreClient/APIs/StoreAPI.swift | 8 +-- .../swift5/vaporLibrary/docs/StoreAPI.md | 2 +- .../Classes/OpenAPIs/APIHelper.swift | 2 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 2 +- .../Classes/OpenAPIs/APIs/StoreAPI.swift | 4 +- .../swift5/x-swift-hashable/docs/StoreAPI.md | 2 +- samples/client/petstore/tiny/cpp/README.md | 2 +- .../petstore/tiny/cpp/lib/service/StoreApi.h | 2 +- .../builds/default/api/store.service.ts | 2 +- .../builds/default/api/store.service.ts | 2 +- .../builds/with-npm/api/store.service.ts | 2 +- .../pom.xml | 2 +- .../builds/default/api/store.service.ts | 2 +- .../builds/default/api/store.service.ts | 2 +- .../builds/with-npm/api/store.service.ts | 2 +- .../builds/default/api/store.service.ts | 2 +- .../builds/with-npm/api/store.service.ts | 2 +- .../api/store.service.ts | 2 +- .../typescript-aurelia/default/README.md | 2 +- .../typescript-aurelia/default/StoreApi.ts | 2 +- .../typescript-axios/builds/default/api.ts | 8 +-- .../typescript-axios/builds/es6-target/api.ts | 8 +-- .../builds/test-petstore/api.ts | 8 +-- .../builds/with-complex-headers/api.ts | 8 +-- .../api.ts | 8 +-- .../builds/with-interfaces/api.ts | 10 +-- .../builds/with-node-imports/api.ts | 8 +-- .../api/another/level/store-api.ts | 8 +-- .../builds/with-npm-version/api.ts | 8 +-- .../builds/with-npm-version/pom.xml | 2 +- .../with-single-request-parameters/api.ts | 8 +-- .../builds/with-string-enums/api.ts | 8 +-- .../typescript-axios/tests/default/pom.xml | 2 +- .../builds/allOf-readonly/runtime.ts | 14 ++-- .../builds/default-v3.0/apis/StoreApi.ts | 4 +- .../builds/default-v3.0/runtime.ts | 14 ++-- .../builds/default/apis/StoreApi.ts | 4 +- .../typescript-fetch/builds/default/pom.xml | 2 +- .../builds/default/runtime.ts | 14 ++-- .../typescript-fetch/builds/enum/runtime.ts | 14 ++-- .../builds/es6-target/pom.xml | 2 +- .../builds/es6-target/src/apis/StoreApi.ts | 4 +- .../builds/es6-target/src/runtime.ts | 14 ++-- .../multiple-parameters/apis/StoreApi.ts | 4 +- .../builds/multiple-parameters/pom.xml | 2 +- .../builds/multiple-parameters/runtime.ts | 14 ++-- .../prefix-parameter-interfaces/pom.xml | 2 +- .../src/apis/StoreApi.ts | 4 +- .../src/runtime.ts | 14 ++-- .../sagas-and-records/src/apis/StoreApi.ts | 4 +- .../builds/sagas-and-records/src/runtime.ts | 14 ++-- .../builds/with-interfaces/apis/StoreApi.ts | 8 +-- .../builds/with-interfaces/runtime.ts | 14 ++-- .../builds/with-npm-version/pom.xml | 2 +- .../with-npm-version/src/apis/StoreApi.ts | 4 +- .../builds/with-npm-version/src/runtime.ts | 14 ++-- .../builds/with-string-enums/runtime.ts | 14 ++-- .../src/apis/StoreApi.ts | 4 +- .../without-runtime-checks/src/runtime.ts | 14 ++-- .../typescript-fetch/tests/default/pom.xml | 2 +- .../typescript-inversify/api/store.service.ts | 2 +- .../typescript-jquery/default/api/StoreApi.ts | 2 +- .../typescript-jquery/npm/api/StoreApi.ts | 2 +- .../builds/default/api/store.service.ts | 2 +- .../builds/default/api/store.service.ts | 2 +- .../typescript-node/default/api/storeApi.ts | 2 +- .../typescript-node/npm/api/storeApi.ts | 2 +- .../petstore/typescript-node/npm/pom.xml | 2 +- .../builds/default/src/apis/StoreApi.ts | 4 +- .../with-npm-version/src/apis/StoreApi.ts | 4 +- .../builds/default/apis/StoreApi.ts | 2 +- .../builds/es6-target/apis/StoreApi.ts | 2 +- .../builds/with-npm-version/apis/StoreApi.ts | 2 +- .../with-progress-subscriber/apis/StoreApi.ts | 2 +- .../apache2/.openapi-generator-ignore | 2 +- .../petstore/api/store_api.graphql | 2 +- .../config/petstore/protobuf-schema/README.md | 6 +- samples/documentation/asciidoc/index.adoc | 2 +- .../documentation/cwiki/confluence-markup.txt | 2 +- .../dynamic-html/docs/assets/css/style.css | 2 +- .../docs/operations/StoreApi.html | 2 +- samples/documentation/html/index.html | 2 +- samples/documentation/html2/index.html | 2 +- .../documentation/markdown/Apis/StoreApi.md | 2 +- .../client/3_0_3_unit_test/python/git_push.sh | 2 +- .../test_object_properties_validation.py | 22 +++--- .../test_post.py | 68 +++++++++--------- .../test_post.py | 68 +++++++++--------- .../python/unit_test_api/models/__init__.py | 2 +- .../python/unit_test_api/schemas.py | 34 ++++----- samples/openapi3/client/elm/src/Api/Data.elm | 6 +- .../x_auth_id_alias/models/__init__.py | 2 +- .../python/dynamic_servers/models/__init__.py | 2 +- .../python/dynamic_servers/schemas.py | 34 ++++----- .../dynamic-servers/python/git_push.sh | 2 +- .../lib/src/model/addressable.dart | 2 +- .../doc/StoreApi.md | 2 +- .../lib/src/api/store_api.dart | 2 +- .../test/store_api_test.dart | 2 +- .../petstore_client_lib_fake/doc/StoreApi.md | 2 +- .../lib/src/api/store_api.dart | 2 +- .../test/store_api_test.dart | 2 +- .../dart2/petstore_client_lib/doc/StoreApi.md | 2 +- .../lib/api/store_api.dart | 4 +- .../test/store_api_test.dart | 2 +- .../petstore_client_lib_fake/doc/StoreApi.md | 2 +- .../lib/api/store_api.dart | 4 +- .../test/store_api_test.dart | 2 +- .../client/petstore/elm/src/Request/Store.elm | 2 +- .../petstore/go/go-petstore/api/openapi.yaml | 6 +- .../petstore/go/go-petstore/api_store.go | 4 +- .../client/petstore/go/http_signature_test.go | 2 +- .../openapi3/client/petstore/go/model_test.go | 4 +- .../client/petstore/go/user_api_test.go | 2 +- .../jersey2-java8-swagger1/api/openapi.yaml | 2 +- .../jersey2-java8-swagger1/docs/StoreApi.md | 2 +- .../org/openapitools/client/api/StoreApi.java | 4 +- .../openapitools/client/api/StoreApiTest.java | 2 +- .../java/jersey2-java8/api/openapi.yaml | 4 +- .../java/jersey2-java8/docs/FakeApi.md | 2 +- .../java/jersey2-java8/docs/StoreApi.md | 2 +- .../org/openapitools/client/api/FakeApi.java | 4 +- .../org/openapitools/client/api/StoreApi.java | 4 +- .../client/JSONComposedSchemaTest.java | 6 +- .../openapitools/client/api/StoreApiTest.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../org/openapitools/api/StoreApiTest.java | 2 +- .../kotlin-deprecated/docs/StoreApi.md | 2 +- .../org/openapitools/client/apis/StoreApi.kt | 2 +- .../docs/StoreApi.md | 2 +- .../org/openapitools/client/apis/FakeApi.kt | 2 +- .../org/openapitools/client/apis/StoreApi.kt | 2 +- .../kotlin-jvm-retrofit2-rx/docs/StoreApi.md | 2 +- .../org/openapitools/client/apis/FakeApi.kt | 2 +- .../org/openapitools/client/apis/StoreApi.kt | 2 +- .../kotlin-jvm-retrofit2-rx2/docs/StoreApi.md | 2 +- .../org/openapitools/client/apis/FakeApi.kt | 2 +- .../org/openapitools/client/apis/StoreApi.kt | 2 +- .../kotlin-multiplatform/docs/StoreApi.md | 2 +- .../org/openapitools/client/apis/StoreApi.kt | 2 +- .../client/petstore/kotlin/docs/StoreApi.md | 2 +- .../org/openapitools/client/apis/StoreApi.kt | 2 +- .../petstore/python-legacy/docs/FakeApi.md | 2 +- .../petstore/python-legacy/docs/StoreApi.md | 2 +- .../petstore_api/api/store_api.py | 4 +- .../petstore/python-prior/docs/FakeApi.md | 2 +- .../petstore/python-prior/docs/FruitReq.md | 2 +- .../petstore/python-prior/docs/StoreApi.md | 2 +- .../petstore_api/api/store_api.py | 2 +- .../petstore_api/models/__init__.py | 2 +- .../tests_manual/test_deserialization.py | 2 +- .../tests_manual/test_http_signature.py | 10 +-- .../openapi3/client/petstore/python/README.md | 2 +- .../petstore/python/docs/apis/tags/FakeApi.md | 4 +- .../python/docs/apis/tags/StoreApi.md | 2 +- .../client/petstore/python/git_push.sh | 2 +- .../python/petstore_api/api_client.py | 4 +- .../python/petstore_api/apis/path_to_api.py | 6 +- .../apis/paths/fake_test_query_parameters.py | 7 ++ .../apis/paths/fake_test_query_paramters.py | 7 -- .../python/petstore_api/apis/tags/fake_api.py | 2 +- .../python/petstore_api/configuration.py | 4 +- .../python/petstore_api/models/__init__.py | 2 +- .../python/petstore_api/paths/__init__.py | 2 +- .../__init__.py | 4 +- .../put.py | 0 .../put.pyi | 0 .../petstore/python/petstore_api/schemas.py | 34 ++++----- .../petstore/python/petstore_api/signing.py | 2 +- .../__init__.py | 0 .../test_put.py | 6 +- .../tests_manual/test_deserialization.py | 2 +- .../tests_manual/test_http_signature.py | 10 +-- ..._with_req_test_prop_from_unset_add_prop.py | 2 +- .../python/tests_manual/test_request_body.py | 2 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../java/org/openapitools/api/DefaultApi.java | 4 +- .../java/org/openapitools/api/FakeApi.java | 4 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../typescript/builds/browser/StoreApi.md | 2 +- .../builds/browser/apis/StoreApi.ts | 2 +- .../builds/browser/types/ObjectParamAPI.ts | 2 +- .../builds/browser/types/ObservableAPI.ts | 2 +- .../builds/browser/types/PromiseAPI.ts | 2 +- .../typescript/builds/default/StoreApi.md | 2 +- .../builds/default/apis/StoreApi.ts | 2 +- .../builds/default/types/ObjectParamAPI.ts | 2 +- .../builds/default/types/ObservableAPI.ts | 2 +- .../builds/default/types/PromiseAPI.ts | 2 +- .../typescript/builds/deno/StoreApi.md | 2 +- .../typescript/builds/deno/apis/StoreApi.ts | 2 +- .../builds/deno/types/ObjectParamAPI.ts | 2 +- .../builds/deno/types/ObservableAPI.ts | 2 +- .../builds/deno/types/PromiseAPI.ts | 2 +- .../typescript/builds/inversify/StoreApi.md | 2 +- .../builds/inversify/apis/StoreApi.ts | 2 +- .../inversify/services/ObjectParamAPI.ts | 2 +- .../builds/inversify/types/ObjectParamAPI.ts | 2 +- .../builds/inversify/types/ObservableAPI.ts | 2 +- .../builds/inversify/types/PromiseAPI.ts | 2 +- .../typescript/builds/jquery/StoreApi.md | 2 +- .../typescript/builds/jquery/apis/StoreApi.ts | 2 +- .../builds/jquery/types/APIInterfaces.ts | 2 +- .../builds/jquery/types/ObjectParamAPI.ts | 2 +- .../builds/jquery/types/ObservableAPI.ts | 2 +- .../builds/jquery/types/PromiseAPI.ts | 2 +- .../builds/object_params/StoreApi.md | 2 +- .../builds/object_params/apis/StoreApi.ts | 2 +- .../object_params/types/ObjectParamAPI.ts | 2 +- .../object_params/types/ObservableAPI.ts | 2 +- .../builds/object_params/types/PromiseAPI.ts | 2 +- .../tests/browser/test/PetApi.test.ts | 8 +-- .../tests/default/test/api/PetApi.test.ts | 8 +-- .../kotlin/org/openapitools/api/StoreApi.kt | 2 +- .../org/openapitools/api/StoreApiTest.kt | 2 +- .../kotlin/org/openapitools/api/StoreApi.kt | 2 +- .../org/openapitools/api/StoreApiTest.kt | 2 +- .../Resources/docs/Api/StoreApiInterface.md | 2 +- .../petstore/python-flask-python2/git_push.sh | 2 +- .../controllers/store_controller.py | 2 +- .../openapi_server/openapi/openapi.yaml | 4 +- .../test/test_pet_controller.py | 4 +- .../server/petstore/python-flask/git_push.sh | 2 +- .../controllers/store_controller.py | 2 +- .../openapi_server/openapi/openapi.yaml | 4 +- .../test/test_pet_controller.py | 4 +- .../org/openapitools/model/Addressable.java | 4 +- .../src/main/resources/openapi.yaml | 2 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/resources/openapi.yaml | 2 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/resources/openapi.yaml | 2 +- .../java/org/openapitools/api/FakeApi.java | 4 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/resources/openapi.yaml | 4 +- .../java/org/openapitools/api/FakeApi.java | 4 +- .../org/openapitools/api/FakeApiDelegate.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../openapitools/api/StoreApiDelegate.java | 2 +- .../src/main/resources/openapi.yaml | 4 +- .../java/org/openapitools/api/FakeApi.java | 4 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/resources/openapi.yaml | 4 +- .../java/org/openapitools/api/FakeApi.java | 4 +- .../org/openapitools/api/FakeApiDelegate.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../openapitools/api/StoreApiDelegate.java | 2 +- .../src/main/resources/openapi.yaml | 4 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/resources/openapi.yaml | 2 +- .../java/org/openapitools/api/FakeApi.java | 4 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/resources/openapi.yaml | 4 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/resources/openapi.yaml | 2 +- .../schema/petstore/wsdl-schema/service.wsdl | 2 +- .../Org.OpenAPITools/Controllers/StoreApi.cs | 2 +- .../wwwroot/openapi-original.json | 2 +- .../Org.OpenAPITools/Controllers/StoreApi.cs | 2 +- .../wwwroot/openapi-original.json | 2 +- .../Org.OpenAPITools/Controllers/StoreApi.cs | 2 +- .../wwwroot/openapi-original.json | 2 +- .../Org.OpenAPITools/Controllers/StoreApi.cs | 2 +- .../wwwroot/openapi-original.json | 2 +- .../Org.OpenAPITools/Controllers/StoreApi.cs | 2 +- .../wwwroot/openapi-original.json | 2 +- .../Org.OpenAPITools/Controllers/StoreApi.cs | 2 +- .../wwwroot/openapi-original.json | 2 +- .../Org.OpenAPITools/Controllers/StoreApi.cs | 2 +- .../wwwroot/openapi-original.json | 2 +- .../Org.OpenAPITools/Controllers/StoreApi.cs | 2 +- .../wwwroot/openapi-original.json | 4 +- .../petstore/cpp-pistache/api/StoreApi.h | 2 +- .../cpp-restbed/generated/3_0/api/FakeApi.cpp | 2 +- .../src/test/java/helper/TestingHelper.java | 4 +- .../petstore/erlang-server/priv/openapi.json | 2 +- .../petstore/go-api-server/api/openapi.yaml | 2 +- .../petstore/go-chi-server/api/openapi.yaml | 2 +- .../go-echo-server/.docs/api/openapi.yaml | 2 +- .../go-gin-api-server/api/openapi.yaml | 2 +- .../go-server-required/api/openapi.yaml | 2 +- .../docs/store_api.md | 2 +- .../petstore/api/store_api.graphql | 2 +- .../lib/OpenAPIPetstore/API.hs | 2 +- .../haskell-yesod/src/Handler/Store.hs | 2 +- .../src/main/resources/META-INF/openapi.yml | 4 +- .../src/main/resources/META-INF/openapi.yml | 4 +- .../src/main/openapi/openapi.yaml | 4 +- .../docs/controllers/StoreController.md | 2 +- .../controller/StoreController.java | 2 +- .../controller/StoreControllerSpec.groovy | 2 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 2 +- samples/server/petstore/java-pkmst/Readme.md | 4 +- .../pkmst/controller/PetApiController.java | 2 +- .../prokarma/pkmst/controller/StoreApi.java | 2 +- .../pkmst/controller/StoreApiController.java | 2 +- .../pkmst/controller/UserApiController.java | 2 +- .../pkmst/controller/StoreApiTest.java | 2 +- .../public/openapi.json | 2 +- .../public/openapi.json | 2 +- .../public/openapi.json | 2 +- .../public/openapi.json | 2 +- .../public/openapi.json | 4 +- .../public/openapi.json | 2 +- .../public/openapi.json | 2 +- .../public/openapi.json | 2 +- .../public/openapi.json | 2 +- .../public/openapi.json | 2 +- .../java-play-framework/public/openapi.json | 2 +- .../handler/PathHandlerInterface.java | 2 +- .../src/main/resources/config/openapi.json | 2 +- .../src/main/resources/openapi.yaml | 2 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../api/impl/StoreApiServiceImpl.java | 2 +- .../org/openapitools/api/StoreApiTest.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../api/impl/StoreApiServiceImpl.java | 2 +- .../org/openapitools/api/StoreApiTest.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../api/impl/StoreApiServiceImpl.java | 2 +- .../org/openapitools/api/StoreApiTest.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../api/impl/StoreApiServiceImpl.java | 2 +- .../org/openapitools/api/StoreApiTest.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../jaxrs-spec-interface-response/README.md | 2 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/openapi/openapi.yaml | 4 +- .../petstore/jaxrs-spec-interface/README.md | 2 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/openapi/openapi.yaml | 4 +- samples/server/petstore/jaxrs-spec/README.md | 2 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../jaxrs-spec/src/main/openapi/openapi.yaml | 4 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../java/org/openapitools/api/FakeApi.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../kotlin/org/openapitools/server/Paths.kt | 2 +- .../kotlin/org/openapitools/server/Paths.kt | 2 +- .../kotlin/org/openapitools/api/StoreApi.kt | 2 +- .../src/main/resources/openapi.yaml | 2 +- .../openapitools/api/StoreApiController.kt | 2 +- .../org/openapitools/api/StoreApiService.kt | 2 +- .../src/main/resources/openapi.yaml | 2 +- .../openapitools/api/StoreApiController.kt | 2 +- .../org/openapitools/api/StoreApiService.kt | 2 +- .../src/main/resources/openapi.yaml | 2 +- .../openapitools/api/StoreApiController.kt | 2 +- .../org/openapitools/api/StoreApiService.kt | 2 +- .../src/main/resources/openapi.yaml | 2 +- .../openapitools/api/StoreApiController.kt | 2 +- .../org/openapitools/api/StoreApiService.kt | 2 +- .../src/main/resources/openapi.yaml | 2 +- .../openapitools/api/StoreApiController.kt | 2 +- .../org/openapitools/api/StoreApiService.kt | 2 +- .../src/main/resources/openapi.yaml | 2 +- .../org/openapitools/api/StoreApiService.kt | 2 +- .../petstore/nodejs-express-server/README.md | 4 +- .../nodejs-express-server/api/openapi.yaml | 4 +- .../controllers/Controller.js | 2 +- .../controllers/PetController.js | 2 +- .../controllers/StoreController.js | 2 +- .../controllers/UserController.js | 2 +- .../services/StoreService.js | 2 +- .../utils/openapiRouter.js | 6 +- .../petstore/php-laravel/lib/routes/api.php | 2 +- .../petstore/php-lumen/lib/routes/web.php | 2 +- .../php-slim4/lib/Api/AbstractStoreApi.php | 2 +- samples/server/petstore/php-slim4/pom.xml | 2 +- .../docs/Api/StoreApiInterface.md | 2 +- .../python-aiohttp-srclayout/README.md | 2 +- .../controllers/store_controller.py | 2 +- .../src/openapi_server/openapi/openapi.yaml | 2 +- .../tests/test_pet_controller.py | 4 +- .../server/petstore/python-aiohttp/README.md | 2 +- .../controllers/store_controller.py | 2 +- .../openapi_server/openapi/openapi.yaml | 2 +- .../controllers/store_controller.py | 2 +- .../petstore/python-fastapi/openapi.yaml | 2 +- .../src/openapi_server/apis/store_api.py | 2 +- .../controllers/store_controller.py | 2 +- .../openapi_server/openapi/openapi.yaml | 2 +- samples/server/petstore/ruby-on-rails/pom.xml | 2 +- .../petstore/ruby-sinatra/api/store_api.rb | 2 +- .../server/petstore/ruby-sinatra/openapi.yaml | 4 +- .../output/no-example-v3/api/openapi.yaml | 2 +- .../output/no-example-v3/docs/InlineObject.md | 2 +- .../no-example-v3/docs/InlineRequest.md | 2 +- .../output/no-example-v3/docs/OpGetRequest.md | 2 +- .../output/no-example-v3/src/models.rs | 23 +++--- .../output/openapi-v3/src/models.rs | 8 +-- .../api/openapi.yaml | 2 +- .../docs/store_api.md | 2 +- .../src/models.rs | 4 +- .../output/rust-server-test/api/openapi.yaml | 2 +- .../rust-server-test/docs/AllOfObject.md | 2 +- .../output/rust-server-test/docs/BaseAllOf.md | 2 +- .../output/rust-server-test/src/models.rs | 36 +++++----- .../.openapi-generator-ignore | 2 +- .../scala/io/swagger/client/api/PetApi.scala | 2 +- .../io/swagger/client/api/StoreApi.scala | 2 +- .../scala-play-server/app/api/StoreApi.scala | 2 +- .../scala-play-server/public/openapi.json | 4 +- .../scalatra/src/main/webapp/WEB-INF/web.xml | 2 +- .../java/org/openapitools/api/FakeApi.java | 4 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 4 +- .../java/org/openapitools/api/FakeApi.java | 4 +- .../java/org/openapitools/api/StoreApi.java | 4 +- .../src/main/resources/openapi.yaml | 4 +- .../java/org/openapitools/api/FakeApi.java | 4 +- .../java/org/openapitools/api/StoreApi.java | 4 +- .../src/main/resources/openapi.yaml | 4 +- .../java/org/openapitools/api/FakeApi.java | 4 +- .../org/openapitools/api/FakeApiDelegate.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 4 +- .../openapitools/api/StoreApiDelegate.java | 2 +- .../src/main/resources/openapi.yaml | 4 +- .../java/org/openapitools/api/FakeApi.java | 4 +- .../org/openapitools/api/FakeApiDelegate.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 4 +- .../openapitools/api/StoreApiDelegate.java | 2 +- .../src/main/resources/openapi.yaml | 4 +- .../java/org/openapitools/api/StoreApi.java | 2 +- .../src/main/resources/openapi.yaml | 2 +- .../java/org/openapitools/api/FakeApi.java | 4 +- .../java/org/openapitools/api/StoreApi.java | 4 +- .../src/main/resources/openapi.yaml | 4 +- .../java/org/openapitools/api/FakeApi.java | 4 +- .../org/openapitools/api/FakeApiDelegate.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 4 +- .../openapitools/api/StoreApiDelegate.java | 2 +- .../src/main/resources/openapi.yaml | 4 +- .../java/org/openapitools/api/FakeApi.java | 4 +- .../org/openapitools/api/FakeApiDelegate.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 4 +- .../openapitools/api/StoreApiDelegate.java | 2 +- .../src/main/resources/openapi.yaml | 4 +- .../java/org/openapitools/api/FakeApi.java | 4 +- .../org/openapitools/api/FakeApiDelegate.java | 2 +- .../java/org/openapitools/api/StoreApi.java | 4 +- .../openapitools/api/StoreApiDelegate.java | 2 +- .../src/main/resources/openapi.yaml | 4 +- .../java/org/openapitools/api/FakeApi.java | 4 +- .../java/org/openapitools/api/StoreApi.java | 4 +- .../src/main/resources/openapi.yaml | 4 +- .../java/org/openapitools/api/FakeApi.java | 4 +- .../java/org/openapitools/api/StoreApi.java | 4 +- .../src/main/resources/openapi.yaml | 4 +- .../java/org/openapitools/api/FakeApi.java | 4 +- .../java/org/openapitools/api/StoreApi.java | 4 +- .../src/main/resources/openapi.yaml | 4 +- .../openapitools/virtualan/api/FakeApi.java | 4 +- .../openapitools/virtualan/api/StoreApi.java | 2 +- .../src/main/resources/openapi.yaml | 4 +- .../java/org/openapitools/api/FakeApi.java | 4 +- .../java/org/openapitools/api/StoreApi.java | 4 +- .../src/main/resources/openapi.yaml | 4 +- 1449 files changed, 2576 insertions(+), 2581 deletions(-) rename modules/openapi-generator/src/test/resources/3_0/{petstore-with-depreacted-fields.yaml => petstore-with-deprecated-fields.yaml} (99%) rename samples/client/petstore/java/{webclient-nulable-arrays => webclient-nullable-arrays}/.github/workflows/maven.yml (100%) rename samples/client/petstore/java/{webclient-nulable-arrays => webclient-nullable-arrays}/.gitignore (100%) rename samples/client/petstore/java/{webclient-nulable-arrays => webclient-nullable-arrays}/.openapi-generator-ignore (100%) rename samples/client/petstore/java/{webclient-nulable-arrays => webclient-nullable-arrays}/.openapi-generator/FILES (100%) rename samples/client/petstore/java/{webclient-nulable-arrays => webclient-nullable-arrays}/.openapi-generator/VERSION (100%) rename samples/client/petstore/java/{webclient-nulable-arrays => webclient-nullable-arrays}/.travis.yml (100%) rename samples/client/petstore/java/{webclient-nulable-arrays => webclient-nullable-arrays}/README.md (100%) rename samples/client/petstore/java/{webclient-nulable-arrays => webclient-nullable-arrays}/api/openapi.yaml (100%) rename samples/client/petstore/java/{webclient-nulable-arrays => webclient-nullable-arrays}/build.gradle (100%) rename samples/client/petstore/java/{webclient-nulable-arrays => webclient-nullable-arrays}/build.sbt (100%) rename samples/client/petstore/java/{webclient-nulable-arrays => webclient-nullable-arrays}/docs/ByteArrayObject.md (100%) rename samples/client/petstore/java/{webclient-nulable-arrays => webclient-nullable-arrays}/docs/DefaultApi.md (100%) rename samples/client/petstore/java/{webclient-nulable-arrays => webclient-nullable-arrays}/git_push.sh (100%) rename samples/client/petstore/java/{webclient-nulable-arrays => webclient-nullable-arrays}/gradle.properties (100%) rename samples/client/petstore/java/{webclient-nulable-arrays => webclient-nullable-arrays}/gradle/wrapper/gradle-wrapper.jar (100%) rename samples/client/petstore/java/{webclient-nulable-arrays => webclient-nullable-arrays}/gradle/wrapper/gradle-wrapper.properties (100%) rename samples/client/petstore/java/{webclient-nulable-arrays => webclient-nullable-arrays}/gradlew (100%) rename samples/client/petstore/java/{webclient-nulable-arrays => webclient-nullable-arrays}/gradlew.bat (100%) rename samples/client/petstore/java/{webclient-nulable-arrays => webclient-nullable-arrays}/pom.xml (100%) rename samples/client/petstore/java/{webclient-nulable-arrays => webclient-nullable-arrays}/settings.gradle (100%) rename samples/client/petstore/java/{webclient-nulable-arrays => webclient-nullable-arrays}/src/main/AndroidManifest.xml (100%) rename samples/client/petstore/java/{webclient-nulable-arrays => webclient-nullable-arrays}/src/main/java/org/openapitools/client/ApiClient.java (100%) rename samples/client/petstore/java/{webclient-nulable-arrays => webclient-nullable-arrays}/src/main/java/org/openapitools/client/JavaTimeFormatter.java (100%) rename samples/client/petstore/java/{webclient-nulable-arrays => webclient-nullable-arrays}/src/main/java/org/openapitools/client/RFC3339DateFormat.java (100%) rename samples/client/petstore/java/{webclient-nulable-arrays => webclient-nullable-arrays}/src/main/java/org/openapitools/client/ServerConfiguration.java (100%) rename samples/client/petstore/java/{webclient-nulable-arrays => webclient-nullable-arrays}/src/main/java/org/openapitools/client/ServerVariable.java (100%) rename samples/client/petstore/java/{webclient-nulable-arrays => webclient-nullable-arrays}/src/main/java/org/openapitools/client/StringUtil.java (100%) rename samples/client/petstore/java/{webclient-nulable-arrays => webclient-nullable-arrays}/src/main/java/org/openapitools/client/api/DefaultApi.java (100%) rename samples/client/petstore/java/{webclient-nulable-arrays => webclient-nullable-arrays}/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java (100%) rename samples/client/petstore/java/{webclient-nulable-arrays => webclient-nullable-arrays}/src/main/java/org/openapitools/client/auth/Authentication.java (100%) rename samples/client/petstore/java/{webclient-nulable-arrays => webclient-nullable-arrays}/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java (100%) rename samples/client/petstore/java/{webclient-nulable-arrays => webclient-nullable-arrays}/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java (100%) rename samples/client/petstore/java/{webclient-nulable-arrays => webclient-nullable-arrays}/src/main/java/org/openapitools/client/model/ByteArrayObject.java (100%) rename samples/client/petstore/java/{webclient-nulable-arrays => webclient-nullable-arrays}/src/test/java/org/openapitools/client/api/DefaultApiTest.java (100%) rename samples/client/petstore/java/{webclient-nulable-arrays => webclient-nullable-arrays}/src/test/java/org/openapitools/client/model/ByteArrayObjectTest.java (100%) create mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_test_query_parameters.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_test_query_paramters.py rename samples/openapi3/client/petstore/python/petstore_api/paths/{fake_test_query_paramters => fake_test_query_parameters}/__init__.py (68%) rename samples/openapi3/client/petstore/python/petstore_api/paths/{fake_test_query_paramters => fake_test_query_parameters}/put.py (100%) rename samples/openapi3/client/petstore/python/petstore_api/paths/{fake_test_query_paramters => fake_test_query_parameters}/put.pyi (100%) rename samples/openapi3/client/petstore/python/test/test_paths/{test_fake_test_query_paramters => test_fake_test_query_parameters}/__init__.py (100%) rename samples/openapi3/client/petstore/python/test/test_paths/{test_fake_test_query_paramters => test_fake_test_query_parameters}/test_put.py (77%) diff --git a/.github/workflows/samples-java-client-jdk11.yaml b/.github/workflows/samples-java-client-jdk11.yaml index 48e996cc18..0e544752b5 100644 --- a/.github/workflows/samples-java-client-jdk11.yaml +++ b/.github/workflows/samples-java-client-jdk11.yaml @@ -36,7 +36,7 @@ jobs: - samples/client/petstore/java/resttemplate - samples/client/petstore/java/resttemplate-withXml - samples/client/petstore/java/webclient - - samples/client/petstore/java/webclient-nulable-arrays + - samples/client/petstore/java/webclient-nullable-arrays - samples/client/petstore/java/vertx - samples/client/petstore/java/jersey2-java8-localdatetime - samples/client/petstore/java/resteasy diff --git a/.github/workflows/samples-kotlin-client.yaml b/.github/workflows/samples-kotlin-client.yaml index 9eaecf529b..653119c413 100644 --- a/.github/workflows/samples-kotlin-client.yaml +++ b/.github/workflows/samples-kotlin-client.yaml @@ -1,4 +1,4 @@ -name: Samples Kotlin cilent +name: Samples Kotlin client on: push: diff --git a/.gitpod.yml b/.gitpod.yml index 1dd7933eff..ee1ae6f0f7 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -12,7 +12,7 @@ ## customise it to your individual needs - from themes to extensions, you ## have full control. ## -## The easiest way to try out Gitpod is install the browser extenion: +## The easiest way to try out Gitpod is install the browser extension: ## 'https://www.gitpod.io/docs/browser-extension' or by prefixing ## 'https://gitpod.io#' to the source control URL of any project. ## diff --git a/bin/configs/aspnetcore-6.0-project4Models.yaml b/bin/configs/aspnetcore-6.0-project4Models.yaml index bb8b63602c..ae4b1a9c23 100644 --- a/bin/configs/aspnetcore-6.0-project4Models.yaml +++ b/bin/configs/aspnetcore-6.0-project4Models.yaml @@ -6,4 +6,4 @@ additionalProperties: packageGuid: '{3C799344-F285-4669-8FD5-7ED9B795D5C5}' aspnetCoreVersion: "6.0" userSecretsGuid: 'cb87e868-8646-48ef-9bb6-344b537d0d37' - useSeperateModelProject: true + useSeparateModelProject: true diff --git a/bin/configs/java-camel-petstore-new.yaml b/bin/configs/java-camel-petstore-new.yaml index 9b28eaf1ee..7984a5a57a 100644 --- a/bin/configs/java-camel-petstore-new.yaml +++ b/bin/configs/java-camel-petstore-new.yaml @@ -12,6 +12,6 @@ additionalProperties: library: "spring-boot" withXml: true jackson: true - camelUseDefaultValidationtErrorProcessor: true + camelUseDefaultValidationErrorProcessor: true camelRestClientRequestValidation: true camelSecurityDefinitions: true diff --git a/bin/configs/java-webclient-nullable-array.yaml b/bin/configs/java-webclient-nullable-array.yaml index 24d280bc8c..9e94c2271c 100644 --- a/bin/configs/java-webclient-nullable-array.yaml +++ b/bin/configs/java-webclient-nullable-array.yaml @@ -1,5 +1,5 @@ generatorName: java -outputDir: samples/client/petstore/java/webclient-nulable-arrays +outputDir: samples/client/petstore/java/webclient-nullable-arrays library: webclient inputSpec: modules/openapi-generator/src/test/resources/3_0/schema-with-nullable-arrays.yaml templateDir: modules/openapi-generator/src/main/resources/Java diff --git a/bin/configs/swift5-deprecated.yaml b/bin/configs/swift5-deprecated.yaml index 0b02067313..c378394e62 100644 --- a/bin/configs/swift5-deprecated.yaml +++ b/bin/configs/swift5-deprecated.yaml @@ -1,6 +1,6 @@ generatorName: swift5 outputDir: samples/client/petstore/swift5/deprecated -inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-depreacted-fields.yaml +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-deprecated-fields.yaml templateDir: modules/openapi-generator/src/main/resources/swift5 generateAliasAsModel: true additionalProperties: diff --git a/bin/utils/test_file_list.yaml b/bin/utils/test_file_list.yaml index 2554a17803..e6356812f9 100644 --- a/bin/utils/test_file_list.yaml +++ b/bin/utils/test_file_list.yaml @@ -1,9 +1,9 @@ --- # csharp-netcore test files and image for upload - filename: "samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/JSONComposedSchemaTests.cs" - sha256: aaa596db60531417994533b0e7962eca21dcaf8fa3aea1e2e3cb8b1b216cb89f + sha256: 054adb6efaff70f492e471cb3e4d628d22cda814906808fd3fcce36ce710b7ee - filename: "samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/Api/PetApiTests.cs" - sha256: dae985015ba461297927d544a78267f2def35e07c3f14ca66468fd61e1fd1c26 + sha256: ff6a5fccd4c026d85fe7232911cda445f5065dcefd03abe258e19af5b28d05c5 - filename: "samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/linux-logo.png" sha256: 0a67c32728197e942b13bdda064b73793f12f5c795f1e5cf35a3adf69c973230 # java okhttp gson test files diff --git a/docs/customization.md b/docs/customization.md index 39d45c3834..51ef57b6aa 100644 --- a/docs/customization.md +++ b/docs/customization.md @@ -56,7 +56,7 @@ The above configuration will do the following: * Compile a user-provided `my_custom_templates/api_interfaces.mustache` following our usual API template compilation logic. That is, one file will be created per API; APIs are generated defined according to tags in your spec documentation. The destination filename of `Interface.kt` will act as a suffix for the filename. So, a tag of `Equipment` will output a corresponding `EquipmentInterface.kt`. * Because `api.mustache` is the same mustache filename as used in your target generator (`kotlin` in this example), we support the following: - The destination filename provides a suffix for the generated output. APIs generate per tag in your specification. So, a tag of `Equipment` will output a corresponding `EquipmentImpl.kt`. This option will be used whether `api.mustache` targets a user customized template or a built-in template. - - The built-in template will be used if you haven't provided an customized template. The kotlin generator defines the suffix as simply `.kt`, so this scenario would modify only the generated file suffixes according to the previous bullet point. + - The built-in template will be used if you haven't provided a customized template. The kotlin generator defines the suffix as simply `.kt`, so this scenario would modify only the generated file suffixes according to the previous bullet point. - Your `api.mustache` will be used if it exists in your custom template directory. For generators with library options, such as `jvm-okhttp3` in the kotlin generator, your file must exist in the same relative location as the embedded template. For kotlin using the `jvm-okhttp3` library option, this file would need to be located at `my_custom_templates/libraries/jvm-okhttp/api.mustache`. See [templating](./templating.md) for more details. * Compile `my_custom_templates/other/check.mustache` with the supporting files bundle, and output to `scripts/check.sh` in your output directory. Note that we don't currently support setting file flags on output, so scripts such as these will either have to be sourced rather than executed, or have file flags set separately after generation (external to our tooling). @@ -169,7 +169,7 @@ If you publish your artifact to a distant maven repository, do not forget to add You may not want to generate *all* models in your project. Likewise, you may want just one or two apis to be written. If that's the case, you can use system properties or [global properties](./global-properties.md) to control the output. -The default is generate *everything* supported by the specific library. Once you enable a feature, it will restrict the contents generated: +The default is to generate *everything* supported by the specific library. Once you enable a feature, it will restrict the contents generated: ```sh # generate only models @@ -397,7 +397,7 @@ or ## Schema Mapping -One can map the schema to someting else (e.g. external objects/models outside of the package) using the `schemaMappings` option, e.g. in CLI +One can map the schema to something else (e.g. external objects/models outside of the package) using the `schemaMappings` option, e.g. in CLI ```sh java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -g java -i modules/openapi-generator/src/test/resources/3_0/type-alias.yaml -o /tmp/java2/ --schema-mapping TypeAlias=foo.bar.TypeAlias ``` diff --git a/docs/generators/aspnetcore.md b/docs/generators/aspnetcore.md index b7f2193194..ed22b58027 100644 --- a/docs/generators/aspnetcore.md +++ b/docs/generators/aspnetcore.md @@ -51,7 +51,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |useDefaultRouting|Use default routing for the ASP.NET Core version.| |true| |useFrameworkReference|Use frameworkReference for ASP.NET Core 3.0+ and PackageReference ASP.NET Core 2.2 or earlier.| |false| |useNewtonsoft|Uses the Newtonsoft JSON library.| |true| -|useSeperateModelProject|Create a seperate project for models| |false| +|useSeparateModelProject|Create a separate project for models| |false| |useSwashbuckle|Uses the Swashbuckle.AspNetCore NuGet package for documentation.| |true| ## IMPORT MAPPING diff --git a/docs/generators/java-camel.md b/docs/generators/java-camel.md index 348f689876..c3cac83c15 100644 --- a/docs/generators/java-camel.md +++ b/docs/generators/java-camel.md @@ -38,7 +38,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |camelRestClientRequestValidation|enable validation of the client request to check whether the Content-Type and Accept headers from the client is supported by the Rest-DSL configuration| |false| |camelRestComponent|name of the Camel component to use as the REST consumer| |servlet| |camelSecurityDefinitions|generate camel security definitions| |true| -|camelUseDefaultValidationtErrorProcessor|generate default validation error processor| |true| +|camelUseDefaultValidationErrorProcessor|generate default validation error processor| |true| |camelValidationErrorProcessor|validation error processor bean name| |validationErrorProcessor| |configPackage|configuration package for generated code| |org.openapitools.configuration| |dateLibrary|Option. Date library to use|
**joda**
Joda (for legacy app only)
**legacy**
Legacy java.util.Date
**java8-localdatetime**
Java 8 using LocalDateTime (for legacy app only)
**java8**
Java 8 native JSR310 (preferred for jdk 1.8+)
|java8| diff --git a/docs/generators/wsdl-schema.md b/docs/generators/wsdl-schema.md index e4c3b801d8..f9df093aa0 100644 --- a/docs/generators/wsdl-schema.md +++ b/docs/generators/wsdl-schema.md @@ -30,7 +30,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |soapPath|basepath of the soap services| |null| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|useSpecifiedOperationId|wheather to use autogenerated operationId's (default) or those specified in openapi spec| |null| +|useSpecifiedOperationId|whether to use autogenerated operationId's (default) or those specified in openapi spec| |null| ## IMPORT MAPPING diff --git a/docs/migration-from-swagger-codegen.md b/docs/migration-from-swagger-codegen.md index 85232ebb91..6a17674a7f 100644 --- a/docs/migration-from-swagger-codegen.md +++ b/docs/migration-from-swagger-codegen.md @@ -173,10 +173,10 @@ The metadata folder (to store the `VERSION` file for example) is now called `.op If you use a generator without specifying each parameter, you might see some differences in the generated code. As example the default package name used in the generated code has changed. -You need to have a look at the specific value, depending of your target language, but often `Swagger` îs replaced by `OpenAPITools` and `io.swagger` is replaced by `org.openapitools`. +You need to have a look at the specific value, depending on your target language, but often `Swagger` îs replaced by `OpenAPITools` and `io.swagger` is replaced by `org.openapitools`. Concretely if you did not specify anything when you are generating java code, a file `org/openapitools/api/PetApi.java` might be generated instead of `io/swagger/api/PetApi.java`. -If this is a problem for you, you need to explicitly set the the parameter value in order to match with the `swagger-codgen` default value (`apiPackage` == `io.swagger` in the previous example with the java generator). +If this is a problem for you, you need to explicitly set the parameter value in order to match with the `swagger-codegen` default value (`apiPackage` == `io.swagger` in the previous example with the java generator). ## New fully qualified name for the classes diff --git a/docs/migration-guide.adoc b/docs/migration-guide.adoc index 91c5b074bb..591aebe82c 100644 --- a/docs/migration-guide.adoc +++ b/docs/migration-guide.adoc @@ -49,7 +49,7 @@ Projects relying on generated code might need to be adapted. ==== Validate spec on generation by default The default is to validate the spec during generation. If the spec has errors, -they will appear as errors or warnings to the user. This prevent generation of the project. +they will appear as errors or warnings to the user. This prevents generation of the project. If you want to switch back to the `3.1.x` behavior you can use: diff --git a/docs/new-generator.md b/docs/new-generator.md index ad1f77039d..c9e2b039e4 100644 --- a/docs/new-generator.md +++ b/docs/new-generator.md @@ -119,7 +119,7 @@ outputFolder = "generated-code" + File.separator + "common-mark"; This is the default output location. This will be `generated-code/common-mark` on non-Windows machines and `generated-code\common-mark` on Windows. You may change this to any value you'd like, but a user will almost always provide an output directory. -> When joining paths, always use `File.seperator` +> When joining paths, always use `File.separator` ```java modelTemplateFiles.put("model.mustache", ".zz"); diff --git a/docs/online.md b/docs/online.md index 3c86b1acd1..2e8064ff8b 100644 --- a/docs/online.md +++ b/docs/online.md @@ -125,7 +125,7 @@ curl -H "Content-type: application/json" \ http://localhost:8080/api/gen/clients/python ``` -Instead of using `openAPIUrl` with an URL to the OpenAPI spec, one can include the spec in the JSON payload with `spec`: +Instead of using `openAPIUrl` with a URL to the OpenAPI spec, one can include the spec in the JSON payload with `spec`: ```json { diff --git a/docs/roadmap.adoc b/docs/roadmap.adoc index e6d1a0af6a..2e08fdf41e 100644 --- a/docs/roadmap.adoc +++ b/docs/roadmap.adoc @@ -37,7 +37,7 @@ Short term are focused on improving contributor and user productivity (part of t > Feature set, well-defined API (code and templates), and extensibility improvements. * API -** Typed representation of the model bound to our templates. As it is, everything is treated an an Object, and this can lead to changes in the interface which might be unexpected from the template perspective. +** Typed representation of the model bound to our templates. As it is, everything is treated as an Object, and this can lead to changes in the interface which might be unexpected from the template perspective. * Feature set (potential generators to add; not an exhaustive list) ** Azure functions (node.js, server) ** Finagle HTTP Client (Scala, client) diff --git a/docs/roadmap.md b/docs/roadmap.md index 8dc6e85c3e..337ec9b915 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -27,7 +27,7 @@ Short term are focused on improving contributor and user productivity (part of t * Automated release stability * General * OAS3.0 features support: anyOf, oneOf, callbacks, etc -* Consider opt-in telemetry about generators being used, limited to a counter of invocations by generator name). This would allow us to make prioritization decisions based on statistics. +* Consider opt-in telemetry about generators being used, limited to a counter of invocations by generator name. This would allow us to make prioritization decisions based on statistics. * Code clean up * centralize build scripts * organize samples/bin scripts according to new generator names @@ -43,7 +43,7 @@ Short term are focused on improving contributor and user productivity (part of t > Feature set, well-defined API (code and templates), and extensibility improvements. ### API -* Typed representation of the model bound to our templates. As it is, everything is treated an an Object, and this can lead to changes in the interface which might be unexpected from the template perspective. +* Typed representation of the model bound to our templates. As it is, everything is treated as an Object, and this can lead to changes in the interface which might be unexpected from the template perspective. * Feature set (potential generators to add; not an exhaustive list) * Azure functions (node.js, server) * Finagle HTTP Client (Scala, client) diff --git a/docs/templating.md b/docs/templating.md index d1bdd81a73..0b7fe41831 100644 --- a/docs/templating.md +++ b/docs/templating.md @@ -845,7 +845,7 @@ The following are vendor extensions supported by OpenAPI Generator. The list may #### Enum -`x-enum-varnames` can be used to have an other enum name for the corresponding value. +`x-enum-varnames` can be used to have another enum name for the corresponding value. This is used to define names of the enum items. `x-enum-descriptions` can be used to provide an individual description for each value. diff --git a/docs/usage.md b/docs/usage.md index d6a976fa30..6c612b68c1 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -629,7 +629,7 @@ supportsES6: true ``` The settings are passed exactly the same as for `config.json`. The most important part is the file extension. Supported values are `yml` or `yaml`. -The name of the file should be `config.yml` or `config.yaml` (in our example it will be `config.yaml`. +The name of the file should be `config.yml` or `config.yaml` (in our example it will be `config.yaml`). ```bash openapi-generator-cli generate -i petstore.yaml -g typescript-fetch -o out \ diff --git a/modules/openapi-generator-maven-plugin/examples/camel.xml b/modules/openapi-generator-maven-plugin/examples/camel.xml index 474383cf92..6db57a04d3 100644 --- a/modules/openapi-generator-maven-plugin/examples/camel.xml +++ b/modules/openapi-generator-maven-plugin/examples/camel.xml @@ -42,10 +42,10 @@ json.out.disableFeatures=WRITE_DATES_AS_TIMESTAMPS true true - true + true true diff --git a/modules/openapi-generator-maven-plugin/examples/multi-module/sample-schema/src/main/resources/openapi.yaml b/modules/openapi-generator-maven-plugin/examples/multi-module/sample-schema/src/main/resources/openapi.yaml index 0f5b2e5e8d..110917ee1e 100644 --- a/modules/openapi-generator-maven-plugin/examples/multi-module/sample-schema/src/main/resources/openapi.yaml +++ b/modules/openapi-generator-maven-plugin/examples/multi-module/sample-schema/src/main/resources/openapi.yaml @@ -335,7 +335,7 @@ paths: - "store" summary: "Find purchase order by ID" description: "For valid response try integer IDs with value <= 5 or > 10. Other\ - \ values will generated exceptions" + \ values will generate exceptions" operationId: "getOrderById" produces: - "application/xml" diff --git a/modules/openapi-generator-maven-plugin/examples/swagger.yaml b/modules/openapi-generator-maven-plugin/examples/swagger.yaml index 0f5b2e5e8d..110917ee1e 100644 --- a/modules/openapi-generator-maven-plugin/examples/swagger.yaml +++ b/modules/openapi-generator-maven-plugin/examples/swagger.yaml @@ -335,7 +335,7 @@ paths: - "store" summary: "Find purchase order by ID" description: "For valid response try integer IDs with value <= 5 or > 10. Other\ - \ values will generated exceptions" + \ values will generate exceptions" operationId: "getOrderById" produces: - "application/xml" diff --git a/modules/openapi-generator-maven-plugin/src/test/resources/default/petstore.yaml b/modules/openapi-generator-maven-plugin/src/test/resources/default/petstore.yaml index b63c595bfb..0d046ba209 100644 --- a/modules/openapi-generator-maven-plugin/src/test/resources/default/petstore.yaml +++ b/modules/openapi-generator-maven-plugin/src/test/resources/default/petstore.yaml @@ -334,7 +334,7 @@ paths: summary: Find purchase order by ID description: >- For valid response try integer IDs with value <= 5 or > 10. Other values - will generated exceptions + will generate exceptions operationId: getOrderById parameters: - name: orderId diff --git a/modules/openapi-generator-maven-plugin/src/test/resources/petstore-on-classpath.yaml b/modules/openapi-generator-maven-plugin/src/test/resources/petstore-on-classpath.yaml index b63c595bfb..0d046ba209 100644 --- a/modules/openapi-generator-maven-plugin/src/test/resources/petstore-on-classpath.yaml +++ b/modules/openapi-generator-maven-plugin/src/test/resources/petstore-on-classpath.yaml @@ -334,7 +334,7 @@ paths: summary: Find purchase order by ID description: >- For valid response try integer IDs with value <= 5 or > 10. Other values - will generated exceptions + will generate exceptions operationId: getOrderById parameters: - name: orderId diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index 0159ca2c8d..63efb10c2d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java @@ -2761,7 +2761,7 @@ public class DefaultCodegen implements CodegenConfig { /** * A method that allows generators to pre-process test example payloads - * This can be useful if one needs to change how values like null in string are represnted + * This can be useful if one needs to change how values like null in string are represented * @param data the test data payload * @return the updated test data payload */ diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java index 40ebf90595..fb4d0a1e9d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java @@ -340,7 +340,7 @@ public class InlineModelResolver { } else { // allOf is just one or more types only so do not generate the inline allOf model if (m.getAllOf().size() == 1) { - // handle earlier in this function when looping through properites + // handle earlier in this function when looping through properties } else if (m.getAllOf().size() > 1) { LOGGER.warn("allOf schema `{}` containing multiple types (not model) is not supported at the moment.", schema.getName()); } else { @@ -892,7 +892,7 @@ public class InlineModelResolver { * * @param name name of the inline schema * @param schema inilne schema - * @return the actual model name (based on inlineSchemaNameMapping if provied) + * @return the actual model name (based on inlineSchemaNameMapping if provided) */ private String addSchemas(String name, Schema schema) { //check inlineSchemaNameMapping diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java index cdf154aefd..1620e905da 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java @@ -476,7 +476,7 @@ public abstract class AbstractPhpCodegen extends DefaultCodegen implements Codeg name = toGenericName(name); - // add prefix and/or suffix only if name does not start wth \ (e.g. \DateTime) + // add prefix and/or suffix only if name does not start with \ (e.g. \DateTime) if (!name.matches("^\\\\.*")) { if (!StringUtils.isEmpty(modelNamePrefix)) { name = modelNamePrefix + "_" + name; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AspNetCoreServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AspNetCoreServerCodegen.java index 4ee7821aef..5da97e6874 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AspNetCoreServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AspNetCoreServerCodegen.java @@ -44,7 +44,7 @@ public class AspNetCoreServerCodegen extends AbstractCSharpCodegen { public static final String USE_SWASHBUCKLE = "useSwashbuckle"; public static final String MODEL_POCOMODE = "pocoModels"; - public static final String USE_MODEL_SEPERATEPROJECT = "useSeperateModelProject"; + public static final String USE_MODEL_SEPERATEPROJECT = "useSeparateModelProject"; public static final String ASPNET_CORE_VERSION = "aspnetCoreVersion"; public static final String SWASHBUCKLE_VERSION = "swashbuckleVersion"; public static final String CLASS_MODIFIER = "classModifier"; @@ -73,7 +73,7 @@ public class AspNetCoreServerCodegen extends AbstractCSharpCodegen { private boolean useSwashbuckle = true; private boolean pocoModels = false; - private boolean useSeperateModelProject = false; + private boolean useSeparateModelProject = false; protected int serverPort = 8080; protected String serverHost = "0.0.0.0"; protected CliOption swashbuckleVersion = new CliOption(SWASHBUCKLE_VERSION, "Swashbuckle version: 3.0.0 (deprecated), 4.0.0 (deprecated), 5.0.0 (deprecated), 6.4.0"); @@ -247,8 +247,8 @@ public class AspNetCoreServerCodegen extends AbstractCSharpCodegen { pocoModels); addSwitch(USE_MODEL_SEPERATEPROJECT, - "Create a seperate project for models", - useSeperateModelProject); + "Create a separate project for models", + useSeparateModelProject); addSwitch(IS_LIBRARY, "Is the build a library", @@ -373,7 +373,7 @@ public class AspNetCoreServerCodegen extends AbstractCSharpCodegen { setOperationModifier(); setModelClassModifier(); setPocoModels(); - setUseSeperateModelProject(); + setUseSeparateModelProject(); setUseSwashbuckle(); setOperationIsAsync(); @@ -408,7 +408,7 @@ public class AspNetCoreServerCodegen extends AbstractCSharpCodegen { supportingFiles.add(new SupportingFile("gitignore", packageFolder, ".gitignore")); supportingFiles.add(new SupportingFile("validateModel.mustache", packageFolder + File.separator + "Attributes", "ValidateModelStateAttribute.cs")); - if (useSeperateModelProject) + if (useSeparateModelProject) { supportingFiles.add(new SupportingFile("typeConverter.mustache", sourceFolder + File.separator + modelPackage + File.separator + "Converters", "CustomEnumConverter.cs")); } else { @@ -419,7 +419,7 @@ public class AspNetCoreServerCodegen extends AbstractCSharpCodegen { supportingFiles.add(new SupportingFile("OpenApi" + File.separator + "TypeExtensions.mustache", packageFolder + File.separator + "OpenApi", "TypeExtensions.cs")); } - if (useSeperateModelProject) + if (useSeparateModelProject) { supportingFiles.add(new SupportingFile("ModelsProject.csproj.mustache", sourceFolder + File.separator + modelPackage, modelPackage + ".csproj")); } @@ -465,7 +465,7 @@ public class AspNetCoreServerCodegen extends AbstractCSharpCodegen { @Override public String modelFileFolder() { - if (!useSeperateModelProject) + if (!useSeparateModelProject) { return outputFolder + File.separator + sourceFolder + File.separator + packageName + File.separator + "Models"; } else { @@ -696,15 +696,15 @@ public class AspNetCoreServerCodegen extends AbstractCSharpCodegen { } } - private void setUseSeperateModelProject() { + private void setUseSeparateModelProject() { if (additionalProperties.containsKey(USE_MODEL_SEPERATEPROJECT)) { - useSeperateModelProject = convertPropertyToBooleanAndWriteBack(USE_MODEL_SEPERATEPROJECT); - if (useSeperateModelProject) + useSeparateModelProject = convertPropertyToBooleanAndWriteBack(USE_MODEL_SEPERATEPROJECT); + if (useSeparateModelProject) { - LOGGER.info("Using seperate model project"); + LOGGER.info("Using separate model project"); } } else { - additionalProperties.put(USE_MODEL_SEPERATEPROJECT, useSeperateModelProject); + additionalProperties.put(USE_MODEL_SEPERATEPROJECT, useSeparateModelProject); } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreClientCodegen.java index 5275022545..7f11cbbfdb 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreClientCodegen.java @@ -1411,7 +1411,7 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen { * Without this method, property petType in GrandparentAnimal will not make it through ParentPet and into ChildCat */ private void EnsureInheritedPropertiesArePresent(CodegenModel derivedModel) { - // every c# generator should definetly want this, or we should fix the issue + // every c# generator should definitely want this, or we should fix the issue // still, lets avoid breaking changes :( if (Boolean.FALSE.equals(GENERICHOST.equals(getLibrary()))){ return; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java index 711a111be6..25e60dc0a3 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java @@ -500,7 +500,7 @@ public class DartDioClientCodegen extends AbstractDartCodegen { // ancestorOnlyProperties are properties defined by all ancestors // NOTE: oneOf,anyOf are NOT considered ancestors - // since a child in dart must implment ALL OF the parent (using implements) + // since a child in dart must implement ALL OF the parent (using implements) Map ancestorOnlyProperties = new HashMap<>(); // combines both selfOnlyProperties and ancestorOnlyProperties diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaCamelServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaCamelServerCodegen.java index 12c3c633fe..3147646460 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaCamelServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaCamelServerCodegen.java @@ -43,7 +43,7 @@ public class JavaCamelServerCodegen extends SpringCodegen implements BeanValidat public static final String CAMEL_REST_COMPONENT = "camelRestComponent"; public static final String CAMEL_REST_BINDING_MODE = "camelRestBindingMode"; public static final String CAMEL_REST_CLIENT_REQUEST_VALIDATION = "camelRestClientRequestValidation"; - public static final String CAMEL_USE_DEFAULT_VALIDATION_ERROR_PROCESSOR = "camelUseDefaultValidationtErrorProcessor"; + public static final String CAMEL_USE_DEFAULT_VALIDATION_ERROR_PROCESSOR = "camelUseDefaultValidationErrorProcessor"; public static final String CAMEL_VALIDATION_ERROR_PROCESSOR = "camelValidationErrorProcessor"; public static final String CAMEL_SECURITY_DEFINITIONS = "camelSecurityDefinitions"; public static final String CAMEL_DATAFORMAT_PROPERTIES = "camelDataformatProperties"; @@ -51,7 +51,7 @@ public class JavaCamelServerCodegen extends SpringCodegen implements BeanValidat private String camelRestComponent = "servlet"; private String camelRestBindingMode = "auto"; private boolean camelRestClientRequestValidation = false; - private boolean camelUseDefaultValidationtErrorProcessor = true; + private boolean camelUseDefaultValidationErrorProcessor = true; private String camelValidationErrorProcessor = "validationErrorProcessor"; private boolean camelSecurityDefinitions = true; private String camelDataformatProperties = ""; @@ -109,7 +109,7 @@ public class JavaCamelServerCodegen extends SpringCodegen implements BeanValidat "RestConfiguration.java")); if (performBeanValidation) { apiTemplateFiles.put("validation.mustache", "Validator.java"); - if (camelUseDefaultValidationtErrorProcessor) { + if (camelUseDefaultValidationErrorProcessor) { supportingFiles.add(new SupportingFile("errorProcessor.mustache", (sourceFolder + File.separator + basePackage).replace(".", java.io.File.separator), "ValidationErrorProcessor.java")); @@ -174,7 +174,7 @@ public class JavaCamelServerCodegen extends SpringCodegen implements BeanValidat cliOptions.add(new CliOption(CAMEL_REST_COMPONENT, "name of the Camel component to use as the REST consumer").defaultValue(camelRestComponent)); cliOptions.add(new CliOption(CAMEL_REST_BINDING_MODE, "binding mode to be used by the REST consumer").defaultValue(camelRestBindingMode)); cliOptions.add(CliOption.newBoolean(CAMEL_REST_CLIENT_REQUEST_VALIDATION, "enable validation of the client request to check whether the Content-Type and Accept headers from the client is supported by the Rest-DSL configuration", camelRestClientRequestValidation)); - cliOptions.add(CliOption.newBoolean(CAMEL_USE_DEFAULT_VALIDATION_ERROR_PROCESSOR, "generate default validation error processor", camelUseDefaultValidationtErrorProcessor)); + cliOptions.add(CliOption.newBoolean(CAMEL_USE_DEFAULT_VALIDATION_ERROR_PROCESSOR, "generate default validation error processor", camelUseDefaultValidationErrorProcessor)); cliOptions.add(new CliOption(CAMEL_VALIDATION_ERROR_PROCESSOR, "validation error processor bean name").defaultValue(camelValidationErrorProcessor)); cliOptions.add(CliOption.newBoolean(CAMEL_SECURITY_DEFINITIONS, "generate camel security definitions", camelSecurityDefinitions)); cliOptions.add(new CliOption(CAMEL_DATAFORMAT_PROPERTIES, "list of dataformat properties separated by comma (propertyName1=propertyValue2,...").defaultValue(camelDataformatProperties)); @@ -184,7 +184,7 @@ public class JavaCamelServerCodegen extends SpringCodegen implements BeanValidat camelRestComponent = manageAdditionalProperty(CAMEL_REST_COMPONENT, camelRestComponent); camelRestBindingMode = manageAdditionalProperty(CAMEL_REST_BINDING_MODE, camelRestBindingMode); camelRestClientRequestValidation = manageAdditionalProperty(CAMEL_REST_CLIENT_REQUEST_VALIDATION, camelRestClientRequestValidation); - camelUseDefaultValidationtErrorProcessor = manageAdditionalProperty(CAMEL_USE_DEFAULT_VALIDATION_ERROR_PROCESSOR, camelUseDefaultValidationtErrorProcessor); + camelUseDefaultValidationErrorProcessor = manageAdditionalProperty(CAMEL_USE_DEFAULT_VALIDATION_ERROR_PROCESSOR, camelUseDefaultValidationErrorProcessor); camelValidationErrorProcessor = manageAdditionalProperty(CAMEL_VALIDATION_ERROR_PROCESSOR, camelValidationErrorProcessor); camelSecurityDefinitions = manageAdditionalProperty(CAMEL_SECURITY_DEFINITIONS, camelSecurityDefinitions); camelDataformatProperties = manageAdditionalProperty(CAMEL_DATAFORMAT_PROPERTIES, camelDataformatProperties); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java index 9e96323d11..a0aae6cc17 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java @@ -715,7 +715,7 @@ public class JavaClientCodegen extends AbstractJavaCodegen super.postProcessOperationsWithModels(objs, allModels); if (useSingleRequestParameter && (JERSEY2.equals(getLibrary()) || JERSEY3.equals(getLibrary()) || OKHTTP_GSON.equals(getLibrary()))) { - // loop through operations to set x-group-parameters extenion to true if useSingleRequestParameter option is enabled + // loop through operations to set x-group-parameters extension to true if useSingleRequestParameter option is enabled OperationMap operations = objs.getOperations(); if (operations != null) { List ops = operations.getOperation(); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KtormSchemaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KtormSchemaCodegen.java index 1bf5b024ec..ebada61f2c 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KtormSchemaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KtormSchemaCodegen.java @@ -163,8 +163,8 @@ public class KtormSchemaCodegen extends AbstractKotlinCodegen { typeMapping.put("short", "kotlin.Short"); typeMapping.put("char", "kotlin.String"); typeMapping.put("real", "kotlin.Double"); - typeMapping.put("UUID", "java.util.UUID"); //be explict - typeMapping.put("URI", "java.net.URI"); //be explict + typeMapping.put("UUID", "java.util.UUID"); //be explicit + typeMapping.put("URI", "java.net.URI"); //be explicit typeMapping.put("decimal", "java.math.BigDecimal"); typeMapping.put("BigDecimal", "java.math.BigDecimal"); typeMapping.put("AnyType", "kotlin.Any"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java index 5100b00017..0aeee921a0 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java @@ -204,7 +204,7 @@ public class PythonClientCodegen extends AbstractPythonCodegen { .defaultValue("1.0.0")); cliOptions.add(new CliOption(PACKAGE_URL, "python package URL.")); // this generator does not use SORT_PARAMS_BY_REQUIRED_FLAG - // this generator uses the following order for endpoint paramters and model properties + // this generator uses the following order for endpoint parameters and model properties // required params // optional params which are set to unset as their default for method signatures only // optional params as **kwargs @@ -925,7 +925,7 @@ public class PythonClientCodegen extends AbstractPythonCodegen { * - fix the model imports, go from model name to the full import string with toModelImport + globalImportFixer * Also cleans the test folder if test cases exist and the testFolder is set because the tests are autogenerated * - * @param objs a map going from the model name to a object hoding the model info + * @param objs a map going from the model name to a object holding the model info * @return the updated objs */ @Override @@ -1134,7 +1134,7 @@ public class PythonClientCodegen extends AbstractPythonCodegen { * We have a custom version of this method to produce links to models when they are * primitive type (not map, not array, not object) and include validations or are enums * - * @param body requesst body + * @param body request body * @param imports import collection * @param bodyParameterName body parameter name * @return the resultant CodegenParameter @@ -1734,12 +1734,12 @@ public class PythonClientCodegen extends AbstractPythonCodegen { * @param schema the schema that we need an example for * @param objExample the example that applies to this schema, for now only string example are used * @param indentationLevel integer indentation level that we are currently at - * we assume the indentaion amount is 4 spaces times this integer + * we assume the indentation amount is 4 spaces times this integer * @param prefix the string prefix that we will use when assigning an example for this line * this is used when setting key: value, pairs "key: " is the prefix * and this is used when setting properties like some_property='some_property_example' - * @param exampleLine this is the current line that we are generatign an example for, starts at 0 - * we don't indentin the 0th line because using the example value looks like: + * @param exampleLine this is the current line that we are generating an example for, starts at 0 + * we don't indent the 0th line because using the example value looks like: * prop = ModelName( line 0 * some_property='some_property_example' line 1 * ) line 2 @@ -2248,9 +2248,9 @@ public class PythonClientCodegen extends AbstractPythonCodegen { /** * Use cases: * additional properties is unset: do nothing - * additional properties is true: add definiton to property - * additional properties is false: add definiton to property - * additional properties is schema: add definiton to property + * additional properties is true: add definition to property + * additional properties is false: add definition to property + * additional properties is schema: add definition to property * * @param schema the schema that may contain an additional property schema * @param property the property for the above schema @@ -2488,7 +2488,7 @@ public class PythonClientCodegen extends AbstractPythonCodegen { /** * @param pattern the regex pattern - * @return List> + * @return List> */ private List getPatternAndModifiers(String pattern) { /* diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RClientCodegen.java index 5401e68215..24669ea6db 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RClientCodegen.java @@ -177,7 +177,7 @@ public class RClientCodegen extends DefaultCodegen implements CodegenConfig { typeMapping.put("map", "map"); typeMapping.put("object", "object"); - // no need for import mapping as R doesn't reqiure api,model import + // no need for import mapping as R doesn't require api,model import // https://github.com/OpenAPITools/openapi-generator/issues/2217 importMapping.clear(); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaSttpClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaSttpClientCodegen.java index dc7aaf221f..798d64c171 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaSttpClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ScalaSttpClientCodegen.java @@ -309,12 +309,12 @@ public class ScalaSttpClientCodegen extends AbstractScalaCodegen implements Code return false; } for (ModelsMap objs : enumModels.values()) { - List modles = objs.getModels(); - if (modles == null || modles.isEmpty()) { + List models = objs.getModels(); + if (models == null || models.isEmpty()) { continue; } - for (final Map modle : modles) { - String enumImportPath = (String) modle.get("importPath"); + for (final Map model : models) { + String enumImportPath = (String) model.get("importPath"); if (enumImportPath != null && enumImportPath.equals(importPath)) { return true; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/WsdlSchemaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/WsdlSchemaCodegen.java index 2f66b96468..2dc1e6764a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/WsdlSchemaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/WsdlSchemaCodegen.java @@ -66,7 +66,7 @@ public class WsdlSchemaCodegen extends DefaultCodegen implements CodegenConfig { cliOptions.add(new CliOption("contentTypeVersion", "generate WSDL with parameters/responses of the specified content-type")); cliOptions.add(new CliOption("useSpecifiedOperationId", - "wheather to use autogenerated operationId's (default) " + "whether to use autogenerated operationId's (default) " + "or those specified in openapi spec")); additionalProperties.put("hostname", "localhost"); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/OptionalParameterLambda.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/OptionalParameterLambda.java index 3494628043..2a152e9dbb 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/OptionalParameterLambda.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/OptionalParameterLambda.java @@ -28,7 +28,7 @@ import java.io.Writer; import static org.openapitools.codegen.utils.StringUtils.camelize; /** - * Appends trailing ? to a text fragement if not already present + * Appends trailing ? to a text fragment if not already present * * Register: *
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/RequiredParameterLambda.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/RequiredParameterLambda.java
index 54b5fad703..e42a373b04 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/RequiredParameterLambda.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/RequiredParameterLambda.java
@@ -27,7 +27,7 @@ import java.io.Writer;
 import static org.openapitools.codegen.utils.StringUtils.camelize;
 
 /**
- * Strips trailing ? from a text fragement
+ * Strips trailing ? from a text fragment
  *
  * Register:
  * 
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java
index fbabd3bd5a..107045d395 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java
@@ -426,7 +426,7 @@ public class ModelUtils {
     /**
      * Return true if the specified schema is an object with a fixed number of properties.
      *
-     * A ObjectSchema differs from an MapSchema in the following way:
+     * A ObjectSchema differs from a MapSchema in the following way:
      * - An ObjectSchema is not extensible, i.e. it has a fixed number of properties.
      * - A MapSchema is an object that can be extended with an arbitrary set of properties.
      *   The payload may include dynamic properties.
@@ -917,7 +917,7 @@ public class ModelUtils {
     }
 
     /**
-     * If a RequestBody contains a reference to an other RequestBody with '$ref', returns the referenced RequestBody if it is found or the actual RequestBody in the other cases.
+     * If a RequestBody contains a reference to another RequestBody with '$ref', returns the referenced RequestBody if it is found or the actual RequestBody in the other cases.
      *
      * @param openAPI     specification being checked
      * @param requestBody potentially containing a '$ref'
@@ -946,7 +946,7 @@ public class ModelUtils {
     }
 
     /**
-     * If a ApiResponse contains a reference to an other ApiResponse with '$ref', returns the referenced ApiResponse if it is found or the actual ApiResponse in the other cases.
+     * If a ApiResponse contains a reference to another ApiResponse with '$ref', returns the referenced ApiResponse if it is found or the actual ApiResponse in the other cases.
      *
      * @param openAPI     specification being checked
      * @param apiResponse potentially containing a '$ref'
@@ -975,7 +975,7 @@ public class ModelUtils {
     }
 
     /**
-     * If a Parameter contains a reference to an other Parameter with '$ref', returns the referenced Parameter if it is found or the actual Parameter in the other cases.
+     * If a Parameter contains a reference to another Parameter with '$ref', returns the referenced Parameter if it is found or the actual Parameter in the other cases.
      *
      * @param openAPI   specification being checked
      * @param parameter potentially containing a '$ref'
@@ -1004,7 +1004,7 @@ public class ModelUtils {
     }
 
     /**
-     * If a Callback contains a reference to an other Callback with '$ref', returns the referenced Callback if it is found or the actual Callback in the other cases.
+     * If a Callback contains a reference to another Callback with '$ref', returns the referenced Callback if it is found or the actual Callback in the other cases.
      *
      * @param openAPI  specification being checked
      * @param callback potentially containing a '$ref'
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/RuleConfiguration.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/RuleConfiguration.java
index 56f254cfba..1f85dad3c6 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/RuleConfiguration.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/validations/oas/RuleConfiguration.java
@@ -107,7 +107,7 @@ public class RuleConfiguration {
     }
 
     /**
-     * Gets whether the recommendation check for for schemas containing type definitions.
+     * Gets whether the recommendation check for schemas containing type definitions.
      * 

* In OpenAPI 3.0.x, the "type" attribute must be a string value. * In OpenAPI 3.1, the type attribute may be: @@ -134,7 +134,7 @@ public class RuleConfiguration { } /** - * Gets whether the recommendation check for for schemas containing the 'nullable' attribute. + * Gets whether the recommendation check for schemas containing the 'nullable' attribute. *

* In OpenAPI 3.0.x, the "nullable" attribute is supported. However, because it is deprecated in 3.1 * and above, a warning is logged to prepare for OpenAPI 3.1 recommendations. @@ -160,7 +160,7 @@ public class RuleConfiguration { } /** - * Gets whether the recommendation check for for schemas containing invalid values for the 'type' attribute. + * Gets whether the recommendation check for schemas containing invalid values for the 'type' attribute. *

* * @return true if enabled, false if disabled diff --git a/modules/openapi-generator/src/main/resources/C-libcurl/cJSON.c.mustache b/modules/openapi-generator/src/main/resources/C-libcurl/cJSON.c.mustache index 2139b5efd9..afc9ff0db8 100644 --- a/modules/openapi-generator/src/main/resources/C-libcurl/cJSON.c.mustache +++ b/modules/openapi-generator/src/main/resources/C-libcurl/cJSON.c.mustache @@ -125,7 +125,7 @@ typedef struct internal_hooks } internal_hooks; #if defined(_MSC_VER) -/* work around MSVC error C2322: '...' address of dillimport '...' is not static */ +/* work around MSVC error C2322: '...' address of dllimport '...' is not static */ static void *internal_malloc(size_t size) { return malloc(size); diff --git a/modules/openapi-generator/src/main/resources/Eiffel/api_client.mustache b/modules/openapi-generator/src/main/resources/Eiffel/api_client.mustache index 6bfe00c620..b0f9441243 100644 --- a/modules/openapi-generator/src/main/resources/Eiffel/api_client.mustache +++ b/modules/openapi-generator/src/main/resources/Eiffel/api_client.mustache @@ -320,7 +320,7 @@ feature -- HTTP client: call api -- Execute an HTTP request with the given options. -- Relative path `a_path' -- Method `a_method' "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and "DELETE" - -- A request `a_request' wth + -- A request `a_request' with -- The query parameters: `query_params'. -- The Header parameters: `header_params'. -- The Request Body: `body' could be Void, object to be serialized using the serializer function `a_serializer' with a given content_type. diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/additional_properties.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/native/additional_properties.mustache index 4086383f15..8e71827924 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/native/additional_properties.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/native/additional_properties.mustache @@ -10,7 +10,7 @@ * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. * @param key the name of the property - * @param value the value value of the property + * @param value the value of the property * @return self reference */ @JsonAnySetter diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pojo.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pojo.mustache index 20458364e9..e41ffd9d73 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/pojo.mustache @@ -579,7 +579,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); {{#isAdditionalPropertiesTrue}} obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/CXF2InterfaceComparator.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/CXF2InterfaceComparator.mustache index d1fd0bf82c..c8340c5e92 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/CXF2InterfaceComparator.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext/CXF2InterfaceComparator.mustache @@ -69,7 +69,7 @@ public class CXFInterfaceComparator implements ResourceComparator { if (requestVerb.equals(HttpMethod.OPTIONS) && match(pathValue,requestPath)) { return true; } - // Also check the HTTP verb since a single path can be match do multiple request, depending of the HTTP request verb. + // Also check the HTTP verb since a single path can be match do multiple request, depending on the HTTP request verb. if (requestVerb.equals(methodHttpVerb) && match(pathValue, requestPath)) { return true; } diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/CXF2InterfaceComparator.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/CXF2InterfaceComparator.mustache index d1fd0bf82c..c8340c5e92 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/CXF2InterfaceComparator.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/CXF2InterfaceComparator.mustache @@ -69,7 +69,7 @@ public class CXFInterfaceComparator implements ResourceComparator { if (requestVerb.equals(HttpMethod.OPTIONS) && match(pathValue,requestPath)) { return true; } - // Also check the HTTP verb since a single path can be match do multiple request, depending of the HTTP request verb. + // Also check the HTTP verb since a single path can be match do multiple request, depending on the HTTP request verb. if (requestVerb.equals(methodHttpVerb) && match(pathValue, requestPath)) { return true; } diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/README.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/README.mustache index 93c1ccb781..4718b9d4b9 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/README.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/README.mustache @@ -9,13 +9,13 @@ This example uses the [JAX-RS](https://jax-rs-spec.java.net/) framework. {{#interfaceOnly}} This project produces a jar that defines some interfaces. -The jar can be used in combination with an other project providing the implementation. +The jar can be used in combination with another project providing the implementation. {{/interfaceOnly}} {{^interfaceOnly}} The JAX-RS implementation needs to be provided by the application server you are deploying on. -To run the server from the command line, you can use maven to provision an start a TomEE Server. +To run the server from the command line, you can use maven to provision and start a TomEE Server. Please execute the following: ``` diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/helidon/README.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/helidon/README.mustache index d2d0ddaa1e..2661c14e4c 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/helidon/README.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/helidon/README.mustache @@ -12,7 +12,7 @@ The pom file is configured to use [Helidon](https://helidon.io/) as application {{#interfaceOnly}} This project produces a jar that defines some interfaces. -The jar can be used in combination with an other project providing the implementation. +The jar can be used in combination with another project providing the implementation. {{/interfaceOnly}} {{^interfaceOnly}} diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/kumuluzee/README.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/kumuluzee/README.mustache index deea381ac9..d2ad96e1f3 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/kumuluzee/README.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/kumuluzee/README.mustache @@ -12,7 +12,7 @@ The pom file is configured to use [KumuluzEE](https://ee.kumuluz.com/) as applic {{#interfaceOnly}} This project produces a jar that defines some interfaces. - The jar can be used in combination with an other project providing the implementation. + The jar can be used in combination with another project providing the implementation. {{/interfaceOnly}} {{^interfaceOnly}} diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/openliberty/README.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/openliberty/README.mustache index 21a76d8271..1db634c6f9 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/openliberty/README.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/openliberty/README.mustache @@ -12,7 +12,7 @@ The pom file is configured to use [Open Liberty](https://openliberty.io/) as app {{#interfaceOnly}} This project produces a jar that defines some interfaces. -The jar can be used in combination with an other project providing the implementation. +The jar can be used in combination with another project providing the implementation. {{/interfaceOnly}} {{^interfaceOnly}} diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/README.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/README.mustache index 6c5ef2f11d..dfcb3d94a5 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/README.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/README.mustache @@ -12,7 +12,7 @@ The pom file is configured to use [Quarkus](https://quarkus.io/) as application {{#interfaceOnly}} This project produces a jar that defines some interfaces. -The jar can be used in combination with an other project providing the implementation. +The jar can be used in combination with another project providing the implementation. {{/interfaceOnly}} {{^interfaceOnly}} diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/thorntail/README.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/thorntail/README.mustache index 66e31f3b0c..c4ec90cbde 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/thorntail/README.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/thorntail/README.mustache @@ -12,7 +12,7 @@ The pom file is configured to use [Thorntail](https://thorntail.io) as applicati {{#interfaceOnly}} This project produces a jar that defines some interfaces. -The jar can be used in combination with an other project providing the implementation. +The jar can be used in combination with another project providing the implementation. {{/interfaceOnly}} {{^interfaceOnly}} diff --git a/modules/openapi-generator/src/main/resources/Javascript-Flowtyped/README.mustache b/modules/openapi-generator/src/main/resources/Javascript-Flowtyped/README.mustache index e93ab6f53d..754e5f7da0 100644 --- a/modules/openapi-generator/src/main/resources/Javascript-Flowtyped/README.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript-Flowtyped/README.mustache @@ -15,7 +15,7 @@ Module system ### Building -To build an compile the flow typed sources to javascript use: +To build and compile the flow typed sources to javascript use: ``` npm install # The dependency `babel-preset-react-app` requires that you specify `NODE_ENV` or `BABEL_ENV` environment variables diff --git a/modules/openapi-generator/src/main/resources/Javascript/partial_model_oneof.mustache b/modules/openapi-generator/src/main/resources/Javascript/partial_model_oneof.mustache index b226851ffc..a0ff043a1d 100644 --- a/modules/openapi-generator/src/main/resources/Javascript/partial_model_oneof.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript/partial_model_oneof.mustache @@ -228,7 +228,7 @@ class {{classname}} { {{#emitJSDoc}} /** - * Gets the actaul instance, which can be {{#oneOf}}{{{.}}}{{^-last}}, {{/-last}}{{/oneOf}}. + * Gets the actual instance, which can be {{#oneOf}}{{{.}}}{{^-last}}, {{/-last}}{{/oneOf}}. * @return {{=< >=}}{(<#oneOf>module:<#invokerPackage>/<#modelPackage>/<&.><^-last>|)}<={{ }}=> The actual instance. */ {{/emitJSDoc}} @@ -238,7 +238,7 @@ class {{classname}} { {{#emitJSDoc}} /** - * Sets the actaul instance, which can be {{#oneOf}}{{{.}}}{{^-last}}, {{/-last}}{{/oneOf}}. + * Sets the actual instance, which can be {{#oneOf}}{{{.}}}{{^-last}}, {{/-last}}{{/oneOf}}. * @param {{=< >=}}{(<#oneOf>module:<#invokerPackage>/<#modelPackage>/<&.><^-last>|)}<={{ }}=> obj The actual instance. */ {{/emitJSDoc}} @@ -248,7 +248,7 @@ class {{classname}} { {{#emitJSDoc}} /** - * Returns the JSON representation of the actual intance. + * Returns the JSON representation of the actual instance. * @return {string} */ {{/emitJSDoc}} diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/3.0/Project.csproj.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/3.0/Project.csproj.mustache index c663a71f5d..79ace57649 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/3.0/Project.csproj.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/3.0/Project.csproj.mustache @@ -20,9 +20,9 @@ ..\.. -{{#useSeperateModelProject}} +{{#useSeparateModelProject}} -{{/useSeperateModelProject}} +{{/useSeparateModelProject}} {{#useFrameworkReference}} {{#isLibrary}} @@ -31,9 +31,9 @@ {{^useFrameworkReference}} {{/useFrameworkReference}} -{{^useSeperateModelProject}} +{{^useSeparateModelProject}} -{{/useSeperateModelProject}} +{{/useSeparateModelProject}} {{#useSwashbuckle}} {{#useNewtonsoft}} diff --git a/modules/openapi-generator/src/main/resources/aspnetcore/3.0/Solution.mustache b/modules/openapi-generator/src/main/resources/aspnetcore/3.0/Solution.mustache index b72da20f3d..1b80ca509f 100644 --- a/modules/openapi-generator/src/main/resources/aspnetcore/3.0/Solution.mustache +++ b/modules/openapi-generator/src/main/resources/aspnetcore/3.0/Solution.mustache @@ -5,10 +5,10 @@ VisualStudioVersion = 15.0.27428.2043 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "{{packageName}}", "{{sourceFolder}}\{{packageName}}\{{packageName}}.csproj", "{{packageGuid}}" EndProject -{{#useSeperateModelProject}} +{{#useSeparateModelProject}} Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "{{modelPackage}}", "{{sourceFolder}}\{{modelPackage}}\{{modelPackage}}.csproj", "{B8D18F25-F379-4B87-ACCC-F8A17E0AED38}" EndProject -{{/useSeperateModelProject}} +{{/useSeparateModelProject}} Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -19,12 +19,12 @@ Global {{packageGuid}}.Debug|Any CPU.Build.0 = Debug|Any CPU {{packageGuid}}.Release|Any CPU.ActiveCfg = Release|Any CPU {{packageGuid}}.Release|Any CPU.Build.0 = Release|Any CPU -{{#useSeperateModelProject}} +{{#useSeparateModelProject}} {B8D18F25-F379-4B87-ACCC-F8A17E0AED38}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B8D18F25-F379-4B87-ACCC-F8A17E0AED38}.Debug|Any CPU.Build.0 = Debug|Any CPU {B8D18F25-F379-4B87-ACCC-F8A17E0AED38}.Release|Any CPU.ActiveCfg = Release|Any CPU {B8D18F25-F379-4B87-ACCC-F8A17E0AED38}.Release|Any CPU.Build.0 = Release|Any CPU -{{/useSeperateModelProject}} +{{/useSeparateModelProject}} EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/modules/openapi-generator/src/main/resources/cpp-pistache-server/model-validation-body.mustache b/modules/openapi-generator/src/main/resources/cpp-pistache-server/model-validation-body.mustache index ef92f2c3fb..99dae60bbe 100644 --- a/modules/openapi-generator/src/main/resources/cpp-pistache-server/model-validation-body.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-pistache-server/model-validation-body.mustache @@ -116,7 +116,7 @@ TODO validate regex of string using pattern variable. This has two challenges { {{! and I do a similar hack with currentValuePath... }} const std::string currentValuePath = oldValuePath + "[" + std::to_string(i) + "]"; {{#items}} - {{> model-validation-body }} {{! Recursively apply template to array - this is where things will probbaly go wrong }} + {{> model-validation-body }} {{! Recursively apply template to array - this is where things will probably go wrong }} {{/items}} i++; } diff --git a/modules/openapi-generator/src/main/resources/cpp-tizen-client/Doxyfile.mustache b/modules/openapi-generator/src/main/resources/cpp-tizen-client/Doxyfile.mustache index e4fc0125bf..230d7431dc 100644 --- a/modules/openapi-generator/src/main/resources/cpp-tizen-client/Doxyfile.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-tizen-client/Doxyfile.mustache @@ -294,7 +294,7 @@ MARKDOWN_SUPPORT = YES # When enabled doxygen tries to link words that correspond to documented # classes, or namespaces to their corresponding documentation. Such a link can -# be prevented in individual cases by by putting a % sign in front of the word +# be prevented in individual cases by putting a % sign in front of the word # or globally by setting AUTOLINK_SUPPORT to NO. # The default value is: YES. @@ -1397,7 +1397,7 @@ EXT_LINKS_IN_WINDOW = NO FORMULA_FONTSIZE = 10 -# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# Use the FORMULA_TRANSPARENT tag to determine whether or not the images # generated for formulas are transparent PNGs. Transparent PNGs are not # supported properly for IE 6.0, but are supported on all modern browsers. # diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/ApiClient.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/ApiClient.mustache index 72cbbf86b7..7e54ed98b6 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/ApiClient.mustache @@ -155,7 +155,7 @@ namespace {{packageName}}.Client } {{! NOTE: Any changes related to RestSharp should be done in this class. All other client classes are for extensibility by consumers.}} ///

- /// Provides a default implementation of an Api client (both synchronous and asynchronous implementatios), + /// Provides a default implementation of an Api client (both synchronous and asynchronous implementations), /// encapsulating general REST accessor use cases. /// {{>visibility}} partial class ApiClient : ISynchronousClient{{#supportsAsync}}, IAsynchronousClient{{/supportsAsync}} @@ -164,7 +164,7 @@ namespace {{packageName}}.Client /// /// Specifies the settings on a object. - /// These settings can be adjusted to accomodate custom serialization rules. + /// These settings can be adjusted to accommodate custom serialization rules. /// public JsonSerializerSettings SerializerSettings { get; set; } = new JsonSerializerSettings { diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/ClientUtils.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/ClientUtils.mustache index 3c04dcdbd0..776be1b052 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/ClientUtils.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/ClientUtils.mustache @@ -25,7 +25,7 @@ namespace {{packageName}}.Client public static CompareLogic compareLogic; /// - /// Static contstructor to initialise compareLogic. + /// Static constructor to initialise compareLogic. /// static ClientUtils() { diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/Configuration.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/Configuration.mustache index c71c426086..91cd1c86eb 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/Configuration.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/Configuration.mustache @@ -72,7 +72,7 @@ namespace {{packageName}}.Client /// /// Gets or sets the API key based on the authentication name. - /// This is the key and value comprising the "secret" for acessing an API. + /// This is the key and value comprising the "secret" for accessing an API. /// /// The API key. private IDictionary _apiKey; @@ -469,7 +469,7 @@ namespace {{packageName}}.Client } else { - // use defualt value + // use default value url = url.Replace("{" + variable.Key + "}", (string)serverVariables["default_value"]); } } @@ -480,7 +480,7 @@ namespace {{packageName}}.Client {{#hasHttpSignatureMethods}} /// - /// Gets and Sets the HttpSigningConfiuration + /// Gets and Sets the HttpSigningConfiguration /// public HttpSigningConfiguration HttpSigningConfiguration { diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/HttpSigningConfiguration.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/HttpSigningConfiguration.mustache index cc8c275e40..f5cc312c6f 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/HttpSigningConfiguration.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/HttpSigningConfiguration.mustache @@ -18,7 +18,7 @@ namespace {{packageName}}.Client { #region /// - /// Initailize the HashAlgorithm and SigningAlgorithm to default value + /// Initialize the HashAlgorithm and SigningAlgorithm to default value /// public HttpSigningConfiguration() { @@ -238,7 +238,7 @@ namespace {{packageName}}.Client headerValuesList.Add(string.Format("{0}: {1}", keyVal.Key, keyVal.Value)); } - //Concatinate headers value separated by new line + //Concatenate headers value separated by new line var headerValuesString = string.Join("\n", headerValuesList); var signatureStringHash = GetStringHash(HashAlgorithm.ToString(), headerValuesString); string headerSignatureStr = null; @@ -361,7 +361,7 @@ namespace {{packageName}}.Client private byte[] ConvertToECDSAANS1Format(byte[] signedBytes) { var derBytes = new List(); - byte derLength = 68; //default lenght for ECDSA code signinged bit 0x44 + byte derLength = 68; //default length for ECDSA code signing bit 0x44 byte rbytesLength = 32; //R length 0x20 byte sbytesLength = 32; //S length 0x20 var rBytes = new List(); @@ -399,7 +399,7 @@ namespace {{packageName}}.Client } derBytes.Add(48); //start of the sequence 0x30 - derBytes.Add(derLength); //total length r lenth, type and r bytes + derBytes.Add(derLength); //total length r length, type and r bytes derBytes.Add(2); //tag for integer derBytes.Add(rbytesLength); //length of r @@ -411,7 +411,7 @@ namespace {{packageName}}.Client return derBytes.ToArray(); } - private RSACryptoServiceProvider GetRSAProviderFromPemFile(string pemfile, SecureString keyPassPharse = null) + private RSACryptoServiceProvider GetRSAProviderFromPemFile(string pemfile, SecureString keyPassPhrase = null) { const string pempubheader = "-----BEGIN PUBLIC KEY-----"; const string pempubfooter = "-----END PUBLIC KEY-----"; @@ -431,7 +431,7 @@ namespace {{packageName}}.Client if (isPrivateKeyFile) { - pemkey = ConvertPrivateKeyToBytes(pemstr, keyPassPharse); + pemkey = ConvertPrivateKeyToBytes(pemstr, keyPassPhrase); if (pemkey == null) { return null; @@ -441,7 +441,7 @@ namespace {{packageName}}.Client return null; } - private byte[] ConvertPrivateKeyToBytes(string instr, SecureString keyPassPharse = null) + private byte[] ConvertPrivateKeyToBytes(string instr, SecureString keyPassPhrase = null) { const string pemprivheader = "-----BEGIN RSA PRIVATE KEY-----"; const string pemprivfooter = "-----END RSA PRIVATE KEY-----"; @@ -494,11 +494,11 @@ namespace {{packageName}}.Client binkey = Convert.FromBase64String(encryptedstr); } catch (System.FormatException) - { //data is not in base64 fromat + { //data is not in base64 format return null; } - byte[] deskey = GetEncryptedKey(salt, keyPassPharse, 1, 2); // count=1 (for OpenSSL implementation); 2 iterations to get at least 24 bytes + byte[] deskey = GetEncryptedKey(salt, keyPassPhrase, 1, 2); // count=1 (for OpenSSL implementation); 2 iterations to get at least 24 bytes if (deskey == null) { return null; @@ -638,19 +638,19 @@ namespace {{packageName}}.Client { IntPtr unmanagedPswd = IntPtr.Zero; int HASHLENGTH = 16; //MD5 bytes - byte[] keymaterial = new byte[HASHLENGTH * miter]; //to store contatenated Mi hashed results + byte[] keymaterial = new byte[HASHLENGTH * miter]; //to store concatenated Mi hashed results byte[] psbytes = new byte[secpswd.Length]; unmanagedPswd = Marshal.SecureStringToGlobalAllocAnsi(secpswd); Marshal.Copy(unmanagedPswd, psbytes, 0, psbytes.Length); Marshal.ZeroFreeGlobalAllocAnsi(unmanagedPswd); - // --- contatenate salt and pswd bytes into fixed data array --- + // --- concatenate salt and pswd bytes into fixed data array --- byte[] data00 = new byte[psbytes.Length + salt.Length]; Array.Copy(psbytes, data00, psbytes.Length); //copy the pswd bytes Array.Copy(salt, 0, data00, psbytes.Length, salt.Length); //concatenate the salt bytes - // ---- do multi-hashing and contatenate results D1, D2 ... into keymaterial bytes ---- + // ---- do multi-hashing and concatenate results D1, D2 ... into keymaterial bytes ---- MD5 md5 = new MD5CryptoServiceProvider(); byte[] result = null; byte[] hashtarget = new byte[HASHLENGTH + data00.Length]; //fixed length initial hashtarget @@ -671,7 +671,7 @@ namespace {{packageName}}.Client for (int i = 0; i < count; i++) result = md5.ComputeHash(result); - Array.Copy(result, 0, keymaterial, j * HASHLENGTH, result.Length); //contatenate to keymaterial + Array.Copy(result, 0, keymaterial, j * HASHLENGTH, result.Length); //concatenate to keymaterial } byte[] deskey = new byte[24]; Array.Copy(keymaterial, deskey, deskey.Length); diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/IReadableConfiguration.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/IReadableConfiguration.mustache index 7c6487d92f..bf142ffbac 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/IReadableConfiguration.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/IReadableConfiguration.mustache @@ -39,7 +39,7 @@ namespace {{packageName}}.Client /// /// Gets the date time format. /// - /// Date time foramt. + /// Date time format. string DateTimeFormat { get; } /// diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/RequestOptions.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/RequestOptions.mustache index dc924c733c..0d3339f2f3 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/RequestOptions.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/RequestOptions.mustache @@ -25,7 +25,7 @@ namespace {{packageName}}.Client public Multimap QueryParameters { get; set; } /// - /// Header parameters to be applied to to the request. + /// Header parameters to be applied to the request. /// Keys may have 1 or more values associated. /// public Multimap HeaderParameters { get; set; } diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/git_push.sh.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/git_push.sh.mustache index 8b3f689c91..228d338ebd 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/git_push.sh.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/git_push.sh.mustache @@ -1,7 +1,7 @@ #!/bin/sh # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ # -# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" git_user_id=$1 git_repo_id=$2 diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/libraries/httpclient/ApiClient.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/libraries/httpclient/ApiClient.mustache index f6e850c865..2582692cc2 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/libraries/httpclient/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/libraries/httpclient/ApiClient.mustache @@ -159,7 +159,7 @@ namespace {{packageName}}.Client } } /// - /// Provides a default implementation of an Api client (both synchronous and asynchronous implementatios), + /// Provides a default implementation of an Api client (both synchronous and asynchronous implementations), /// encapsulating general REST accessor use cases. /// /// @@ -175,7 +175,7 @@ namespace {{packageName}}.Client /// /// Specifies the settings on a object. - /// These settings can be adjusted to accomodate custom serialization rules. + /// These settings can be adjusted to accommodate custom serialization rules. /// public JsonSerializerSettings SerializerSettings { get; set; } = new JsonSerializerSettings { @@ -192,8 +192,8 @@ namespace {{packageName}}.Client /// /// Initializes a new instance of the , defaulting to the global configurations' base url. - /// **IMPORTANT** This will also create an istance of HttpClient, which is less than ideal. - /// It's better to reuse the HttpClient and HttpClientHander. + /// **IMPORTANT** This will also create an instance of HttpClient, which is less than ideal. + /// It's better to reuse the HttpClient and HttpClientHandler. /// public ApiClient() : this({{packageName}}.Client.GlobalConfiguration.Instance.BasePath) @@ -202,8 +202,8 @@ namespace {{packageName}}.Client /// /// Initializes a new instance of the . - /// **IMPORTANT** This will also create an istance of HttpClient, which is less than ideal. - /// It's better to reuse the HttpClient and HttpClientHander. + /// **IMPORTANT** This will also create an instance of HttpClient, which is less than ideal. + /// It's better to reuse the HttpClient and HttpClientHandler. /// /// The target service's base path in URL format. /// diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/libraries/httpclient/RequestOptions.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/libraries/httpclient/RequestOptions.mustache index bc5a8e348b..c656d89945 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/libraries/httpclient/RequestOptions.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/libraries/httpclient/RequestOptions.mustache @@ -25,7 +25,7 @@ namespace {{packageName}}.Client public Multimap QueryParameters { get; set; } /// - /// Header parameters to be applied to to the request. + /// Header parameters to be applied to the request. /// Keys may have 1 or more values associated. /// public Multimap HeaderParameters { get; set; } diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/libraries/httpclient/api.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/libraries/httpclient/api.mustache index 20ddfe96b9..f0a1aa6497 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/libraries/httpclient/api.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/libraries/httpclient/api.mustache @@ -106,8 +106,8 @@ namespace {{packageName}}.{{apiPackage}} /// /// Initializes a new instance of the class. - /// **IMPORTANT** This will also create an istance of HttpClient, which is less than ideal. - /// It's better to reuse the HttpClient and HttpClientHander. + /// **IMPORTANT** This will also create an instance of HttpClient, which is less than ideal. + /// It's better to reuse the HttpClient and HttpClientHandler. /// /// public {{classname}}() : this((string)null) @@ -116,8 +116,8 @@ namespace {{packageName}}.{{apiPackage}} /// /// Initializes a new instance of the class. - /// **IMPORTANT** This will also create an istance of HttpClient, which is less than ideal. - /// It's better to reuse the HttpClient and HttpClientHander. + /// **IMPORTANT** This will also create an instance of HttpClient, which is less than ideal. + /// It's better to reuse the HttpClient and HttpClientHandler. /// /// The target service's base path in URL format. /// @@ -138,8 +138,8 @@ namespace {{packageName}}.{{apiPackage}} /// /// Initializes a new instance of the class using Configuration object. - /// **IMPORTANT** This will also create an istance of HttpClient, which is less than ideal. - /// It's better to reuse the HttpClient and HttpClientHander. + /// **IMPORTANT** This will also create an instance of HttpClient, which is less than ideal. + /// It's better to reuse the HttpClient and HttpClientHandler. /// /// An instance of Configuration. /// diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/libraries/httpclient/model.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/libraries/httpclient/model.mustache index 0de1e05e51..bdd076c3f0 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/libraries/httpclient/model.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/libraries/httpclient/model.mustache @@ -34,11 +34,11 @@ using OpenAPIClientUtils = {{packageName}}.Client.ClientUtils; using System.Reflection; {{/-first}} {{/oneOf}} -{{#aneOf}} +{{#anyOf}} {{#-first}} using System.Reflection; {{/-first}} -{{/aneOf}} +{{/anyOf}} namespace {{packageName}}.{{modelPackage}} { diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/modelAnyOf.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/modelAnyOf.mustache index 931f7646da..fbd9fe0441 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/modelAnyOf.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/modelAnyOf.mustache @@ -59,7 +59,7 @@ {{#anyOf}} /// - /// Get the actual instance of `{{{.}}}`. If the actual instanct is not `{{{.}}}`, + /// Get the actual instance of `{{{.}}}`. If the actual instance is not `{{{.}}}`, /// the InvalidClassException will be thrown /// /// An instance of {{{.}}} diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/modelOneOf.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/modelOneOf.mustache index d2d6e28b3f..b3a5503cba 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/modelOneOf.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/modelOneOf.mustache @@ -59,7 +59,7 @@ {{#oneOf}} /// - /// Get the actual instance of `{{{.}}}`. If the actual instanct is not `{{{.}}}`, + /// Get the actual instance of `{{{.}}}`. If the actual instance is not `{{{.}}}`, /// the InvalidClassException will be thrown /// /// An instance of {{{.}}} diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/nuspec.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/nuspec.mustache index 66254acffd..b5740c962e 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore-functions/nuspec.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore-functions/nuspec.mustache @@ -12,7 +12,7 @@ $author$ + users to easily find other packages by the same owners. --> $author$ false false diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/RequestOptions.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/RequestOptions.mustache index 40436b9657..928c5e7407 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/RequestOptions.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/RequestOptions.mustache @@ -25,7 +25,7 @@ namespace {{packageName}}.Client public Multimap QueryParameters { get; set; } /// - /// Header parameters to be applied to to the request. + /// Header parameters to be applied to the request. /// Keys may have 1 or more values associated. /// public Multimap HeaderParameters { get; set; } diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ApiException.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ApiException.mustache index 7777fd09c4..c716cf25e9 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ApiException.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ApiException.mustache @@ -29,7 +29,7 @@ namespace {{packageName}}.Client public string RawContent { get; } /// - /// Construct the ApiException from parts of the reponse + /// Construct the ApiException from parts of the response /// /// /// diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ApiResponse`1.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ApiResponse`1.mustache index 1bcf4a8414..f37833790e 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ApiResponse`1.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ApiResponse`1.mustache @@ -82,7 +82,7 @@ namespace {{packageName}}.Client #endregion Properties /// - /// Construct the reponse using an HttpResponseMessage + /// Construct the response using an HttpResponseMessage /// /// /// diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/HttpSigningConfiguration.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/HttpSigningConfiguration.mustache index 29ea235945..4e17cf240e 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/HttpSigningConfiguration.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/HttpSigningConfiguration.mustache @@ -190,7 +190,7 @@ namespace {{packageName}}.Client foreach (var keyVal in httpSignatureHeader) headerValuesList.Add(string.Format("{0}: {1}", keyVal.Key, keyVal.Value)); - //Concatinate headers value separated by new line + //Concatenate headers value separated by new line var headerValuesString = string.Join("\n", headerValuesList); var signatureStringHash = GetStringHash(HashAlgorithm.ToString(), headerValuesString); string{{nrt?}} headerSignatureStr = null; @@ -318,7 +318,7 @@ namespace {{packageName}}.Client private byte[] ConvertToECDSAANS1Format(byte[] signedBytes) { var derBytes = new List(); - byte derLength = 68; //default lenght for ECDSA code signinged bit 0x44 + byte derLength = 68; //default length for ECDSA code signing bit 0x44 byte rbytesLength = 32; //R length 0x20 byte sbytesLength = 32; //S length 0x20 var rBytes = new List(); @@ -353,7 +353,7 @@ namespace {{packageName}}.Client } derBytes.Add(48); //start of the sequence 0x30 - derBytes.Add(derLength); //total length r lenth, type and r bytes + derBytes.Add(derLength); //total length r length, type and r bytes derBytes.Add(2); //tag for integer derBytes.Add(rbytesLength); //length of r @@ -365,7 +365,7 @@ namespace {{packageName}}.Client return derBytes.ToArray(); } - private RSACryptoServiceProvider{{nrt?}} GetRSAProviderFromPemFile(String pemfile, SecureString{{nrt?}} keyPassPharse = null) + private RSACryptoServiceProvider{{nrt?}} GetRSAProviderFromPemFile(String pemfile, SecureString{{nrt?}} keyPassPhrase = null) { const String pempubheader = "-----BEGIN PUBLIC KEY-----"; const String pempubfooter = "-----END PUBLIC KEY-----"; @@ -382,7 +382,7 @@ namespace {{packageName}}.Client if (isPrivateKeyFile) { - pemkey = ConvertPrivateKeyToBytes(pemstr, keyPassPharse); + pemkey = ConvertPrivateKeyToBytes(pemstr, keyPassPhrase); if (pemkey == null) return null; @@ -392,7 +392,7 @@ namespace {{packageName}}.Client return null; } - private byte[]{{nrt?}} ConvertPrivateKeyToBytes(String instr, SecureString{{nrt?}} keyPassPharse = null) + private byte[]{{nrt?}} ConvertPrivateKeyToBytes(String instr, SecureString{{nrt?}} keyPassPhrase = null) { const String pemprivheader = "-----BEGIN RSA PRIVATE KEY-----"; const String pemprivfooter = "-----END RSA PRIVATE KEY-----"; @@ -440,12 +440,12 @@ namespace {{packageName}}.Client binkey = Convert.FromBase64String(encryptedstr); } catch (System.FormatException) - { //data is not in base64 fromat + { //data is not in base64 format return null; } - // TODO: what do we do here if keyPassPharse is null? - byte[] deskey = GetEncryptedKey(salt, keyPassPharse{{nrt!}}, 1, 2); // count=1 (for OpenSSL implementation); 2 iterations to get at least 24 bytes + // TODO: what do we do here if keyPassPhrase is null? + byte[] deskey = GetEncryptedKey(salt, keyPassPhrase{{nrt!}}, 1, 2); // count=1 (for OpenSSL implementation); 2 iterations to get at least 24 bytes if (deskey == null) return null; diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/README.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/README.mustache index 28ace9bfd3..e76936568a 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/README.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/README.mustache @@ -170,7 +170,7 @@ Class | Method | HTTP request | Description - modelTests: {{generateModelTests}} - withXml: {{withXml}} -## [OpenApi Generator Parameteres](https://openapi-generator.tech/docs/generators/csharp-netcore) +## [OpenApi Generator Parameters](https://openapi-generator.tech/docs/generators/csharp-netcore) - allowUnicodeIdentifiers: {{allowUnicodeIdentifiers}} - apiName: {{apiName}} - caseInsensitiveResponseHeaders: {{caseInsensitiveResponseHeaders}} diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/api.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/api.mustache index 5e2bb67c23..439b19cad3 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/api.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/api.mustache @@ -377,7 +377,7 @@ namespace {{packageName}}.{{apiPackage}} } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -395,7 +395,7 @@ namespace {{packageName}}.{{apiPackage}} } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } }{{^-last}} diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/git_push.ps1.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/git_push.ps1.mustache index 0f4084ef81..f263c2bc59 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/git_push.ps1.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/git_push.ps1.mustache @@ -49,7 +49,7 @@ Set-StrictMode -Version 3.0 if ($Help){ Write-Output " This script will initialize a git repository, then add and commit all files. - The local repository will then be pushed to your prefered git provider. + The local repository will then be pushed to your preferred git provider. If the remote repository does not exist yet and you are using GitHub, the repository will be created for you provided you have the GitHub CLI installed. diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/httpclient/RequestOptions.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/httpclient/RequestOptions.mustache index 62859649ce..25e76d03d2 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/httpclient/RequestOptions.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/httpclient/RequestOptions.mustache @@ -25,7 +25,7 @@ namespace {{packageName}}.Client public Multimap QueryParameters { get; set; } /// - /// Header parameters to be applied to to the request. + /// Header parameters to be applied to the request. /// Keys may have 1 or more values associated. /// public Multimap HeaderParameters { get; set; } diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/class_serializer.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/class_serializer.mustache index d3b3d8916c..a0528cd149 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/class_serializer.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/class_serializer.mustache @@ -262,7 +262,7 @@ class _${{classname}}Serializer implements PrimitiveSerializer<{{classname}}> { parent classes don't have builder so they must delegate to another serializer using 1) discriminator + mapping - 2) concrete implmentation ($classname) + 2) concrete implementation ($classname) }} {{#hasDiscriminatorWithNonEmptyMapping}} {{#discriminator}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-volley/README.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-volley/README.mustache index ea684b9984..b007ccc481 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-volley/README.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-volley/README.mustache @@ -70,8 +70,8 @@ val requestQueue: Lazy = lazy(initializer = { The above constructor for each api allows the following to be customized - A custom context, so either a singleton request queue or different scope can be created - see https://developer.android.com/training/volley/requestqueue#singleton -- An overrideable request queue - which in turn can have a custom http url stack passed to it -- An overrideable request factory constructor call, or a request factory that can be overridden by a custom template, with +- An overridable request queue - which in turn can have a custom http url stack passed to it +- An overridable request factory constructor call, or a request factory that can be overridden by a custom template, with custom header factory, request post processors and custom gson adapters injected. #### Overriding request generation diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-volley/auth/oauth.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-volley/auth/oauth.mustache index 78ffc6a2d7..81a285bc47 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-volley/auth/oauth.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-volley/auth/oauth.mustache @@ -1,5 +1,5 @@ val basicAuthHeaderFactoryBuilder = { username: String?, password: String? -> { - throw NotImplementedError("OAuth security scheme header factory not impemented yet - see open api generator auth/oauth.mustache") + throw NotImplementedError("OAuth security scheme header factory not implemented yet - see open api generator auth/oauth.mustache") mapOf("" to "")} } diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-volley/request/RequestFactory.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-volley/request/RequestFactory.mustache index e9bc5d2128..46507bff1b 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-volley/request/RequestFactory.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-volley/request/RequestFactory.mustache @@ -40,7 +40,7 @@ class RequestFactory(private val headerFactories : List<() -> Map (acc + factory.invoke()).toMutableMap() } // If we decide to support auth parameters in the url, then you will reference them by supplying a url string - // with known variable name refernces in the string. We will then apply + // with known variable name references in the string. We will then apply val updatedUrl = if (!queryParams.isNullOrEmpty()) { queryParams.asSequence().fold("$url?") {acc, param -> "$acc${escapeString(param.key)}=${escapeString(param.value)}&" diff --git a/modules/openapi-generator/src/main/resources/nodejs-express-server/utils/openapiRouter.mustache b/modules/openapi-generator/src/main/resources/nodejs-express-server/utils/openapiRouter.mustache index a0651549de..4c7bbdca7f 100644 --- a/modules/openapi-generator/src/main/resources/nodejs-express-server/utils/openapiRouter.mustache +++ b/modules/openapi-generator/src/main/resources/nodejs-express-server/utils/openapiRouter.mustache @@ -19,7 +19,7 @@ function handleError(err, request, response, next) { * middleware. All parameters are collected in the request.swagger.values key-value object * * The assumption is that security handlers have already verified and allowed access - * to this path. If the business-logic of a particular path is dependant on authentication + * to this path. If the business-logic of a particular path is dependent on authentication * parameters (e.g. scope checking) - it is recommended to define the authentication header * as one of the parameters expected in the OpenAPI/Swagger document. * diff --git a/modules/openapi-generator/src/main/resources/php-slim-server/index.mustache b/modules/openapi-generator/src/main/resources/php-slim-server/index.mustache index 322fc8883d..5020bcad22 100644 --- a/modules/openapi-generator/src/main/resources/php-slim-server/index.mustache +++ b/modules/openapi-generator/src/main/resources/php-slim-server/index.mustache @@ -64,7 +64,7 @@ $config['settings'] = [ // 'addContentLengthHeader' => true, /** - * Filename for caching the FastRoute routes. Must be set to to a valid filename within + * Filename for caching the FastRoute routes. Must be set to a valid filename within * a writeable directory. If the file does not exist, then it is created with the correct * cache information on first run. * Set to false to disable the FastRoute cache system. diff --git a/modules/openapi-generator/src/main/resources/php/ObjectSerializer.mustache b/modules/openapi-generator/src/main/resources/php/ObjectSerializer.mustache index 5cd224a6e0..6639723ec5 100644 --- a/modules/openapi-generator/src/main/resources/php/ObjectSerializer.mustache +++ b/modules/openapi-generator/src/main/resources/php/ObjectSerializer.mustache @@ -436,7 +436,7 @@ class ObjectSerializer } if ($class === '\DateTime') { - // Some API's return an invalid, empty string as a + // Some APIs return an invalid, empty string as a // date-time property. DateTime::__construct() will return // the current time for empty input which is probably not // what is meant. The invalid empty string is probably to @@ -446,7 +446,7 @@ class ObjectSerializer try { return new \DateTime($data); } catch (\Exception $exception) { - // Some API's return a date-time with too high nanosecond + // Some APIs return a date-time with too high nanosecond // precision for php's DateTime to handle. // With provided regexp 6 digits of microseconds saved return new \DateTime(self::sanitizeTimestamp($data)); diff --git a/modules/openapi-generator/src/main/resources/powershell/http_signature_auth.mustache b/modules/openapi-generator/src/main/resources/powershell/http_signature_auth.mustache index 0206a18d7d..532eb1a88f 100644 --- a/modules/openapi-generator/src/main/resources/powershell/http_signature_auth.mustache +++ b/modules/openapi-generator/src/main/resources/powershell/http_signature_auth.mustache @@ -112,7 +112,7 @@ function Get-{{{apiNamePrefix}}}HttpSignedHeader { -HashAlgorithmName $httpSigningConfiguration.HashAlgorithm ` -KeyPassPhrase $httpSigningConfiguration.KeyPassPhrase } - #Depricated + #Deprecated <#$cryptographicScheme = Get-{{{apiNamePrefix}}}CryptographicScheme -SigningAlgorithm $httpSigningConfiguration.SigningAlgorithm ` -HashAlgorithm $httpSigningConfiguration.HashAlgorithm #> diff --git a/modules/openapi-generator/src/main/resources/protobuf-schema/README.mustache b/modules/openapi-generator/src/main/resources/protobuf-schema/README.mustache index 0724e27a95..ab3985ea36 100644 --- a/modules/openapi-generator/src/main/resources/protobuf-schema/README.mustache +++ b/modules/openapi-generator/src/main/resources/protobuf-schema/README.mustache @@ -24,9 +24,9 @@ Below are some usage examples for Go and Ruby. For other languages, please refer ### Go ``` # assuming `protoc-gen-go` has been installed with `go get -u github.com/golang/protobuf/protoc-gen-go` -mkdir /var/tmp/go/{{{pacakgeName}}} -protoc --go_out=/var/tmp/go/{{{pacakgeName}}} services/* -protoc --go_out=/var/tmp/go/{{{pacakgeName}}} models/* +mkdir /var/tmp/go/{{{packageName}}} +protoc --go_out=/var/tmp/go/{{{packageName}}} services/* +protoc --go_out=/var/tmp/go/{{{packageName}}} models/* ``` ### Ruby diff --git a/modules/openapi-generator/src/main/resources/python-aiohttp/README.mustache b/modules/openapi-generator/src/main/resources/python-aiohttp/README.mustache index 42dd581c40..212961153c 100644 --- a/modules/openapi-generator/src/main/resources/python-aiohttp/README.mustache +++ b/modules/openapi-generator/src/main/resources/python-aiohttp/README.mustache @@ -38,7 +38,7 @@ pytest ## Prevent file overriding -After first generation, add edited files to _.openapi-generator-ignore_ to prevent generator to overwrite them. Typically: +After first generation, add edited files to _.openapi-generator-ignore_ to prevent generator from overwriting them. Typically: ``` server/controllers/* test/* diff --git a/modules/openapi-generator/src/main/resources/python-prior/__init__models.mustache b/modules/openapi-generator/src/main/resources/python-prior/__init__models.mustache index 76d91fc5d4..6cbba3113d 100644 --- a/modules/openapi-generator/src/main/resources/python-prior/__init__models.mustache +++ b/modules/openapi-generator/src/main/resources/python-prior/__init__models.mustache @@ -4,7 +4,7 @@ # if you have many models here with many references from one model to another this may # raise a RecursionError # to avoid this, import only the models that you directly need like: -# from from {{modelPackage}}.pet import Pet +# from {{modelPackage}}.pet import Pet # or import this package, but before doing it, use: # import sys # sys.setrecursionlimit(n) diff --git a/modules/openapi-generator/src/main/resources/python/__init__models.handlebars b/modules/openapi-generator/src/main/resources/python/__init__models.handlebars index 31eac9cd54..0899faf1da 100644 --- a/modules/openapi-generator/src/main/resources/python/__init__models.handlebars +++ b/modules/openapi-generator/src/main/resources/python/__init__models.handlebars @@ -6,7 +6,7 @@ # if you have many models here with many references from one model to another this may # raise a RecursionError # to avoid this, import only the models that you directly need like: -# from from {{packageName}}.{{modelPackage}}.pet import Pet +# from {{packageName}}.{{modelPackage}}.pet import Pet # or import this package, but before doing it, use: # import sys # sys.setrecursionlimit(n) diff --git a/modules/openapi-generator/src/main/resources/python/api_client.handlebars b/modules/openapi-generator/src/main/resources/python/api_client.handlebars index 4379c88b82..75d90cd2b1 100644 --- a/modules/openapi-generator/src/main/resources/python/api_client.handlebars +++ b/modules/openapi-generator/src/main/resources/python/api_client.handlebars @@ -1250,9 +1250,9 @@ class ApiClient: # The HTTP signature scheme requires multiple HTTP headers # that are calculated dynamically. signing_info = self.configuration.signing_info - querys = tuple() + queries = tuple() auth_headers = signing_info.get_http_signature_headers( - resource_path, method, headers, body, querys) + resource_path, method, headers, body, queries) for key, value in auth_headers.items(): headers.add(key, value) {{/if}} diff --git a/modules/openapi-generator/src/main/resources/python/configuration.handlebars b/modules/openapi-generator/src/main/resources/python/configuration.handlebars index 8837fa9515..26f940dde1 100644 --- a/modules/openapi-generator/src/main/resources/python/configuration.handlebars +++ b/modules/openapi-generator/src/main/resources/python/configuration.handlebars @@ -134,7 +134,7 @@ conf = {{{packageName}}}.Configuration( 'Authorization' header, which is used to carry the signature. One may be tempted to sign all headers by default, but in practice it rarely works. - This is beccause explicit proxies, transparent proxies, TLS termination endpoints or + This is because explicit proxies, transparent proxies, TLS termination endpoints or load balancers may add/modify/remove headers. Include the HTTP headers that you know are not going to be modified in transit. @@ -328,7 +328,7 @@ conf = {{{packageName}}}.Configuration( self._disabled_client_side_validations = s {{#if hasHttpSignatureMethods}} if name == "signing_info" and value is not None: - # Ensure the host paramater from signing info is the same as + # Ensure the host parameter from signing info is the same as # Configuration.host. value.host = self.host {{/if}} diff --git a/modules/openapi-generator/src/main/resources/python/git_push.sh.handlebars b/modules/openapi-generator/src/main/resources/python/git_push.sh.handlebars index 8b3f689c91..228d338ebd 100644 --- a/modules/openapi-generator/src/main/resources/python/git_push.sh.handlebars +++ b/modules/openapi-generator/src/main/resources/python/git_push.sh.handlebars @@ -1,7 +1,7 @@ #!/bin/sh # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ # -# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" git_user_id=$1 git_repo_id=$2 diff --git a/modules/openapi-generator/src/main/resources/python/schemas.handlebars b/modules/openapi-generator/src/main/resources/python/schemas.handlebars index e61dd99ac7..2971f28985 100644 --- a/modules/openapi-generator/src/main/resources/python/schemas.handlebars +++ b/modules/openapi-generator/src/main/resources/python/schemas.handlebars @@ -378,7 +378,7 @@ class Schema: _validate_oapg returns a key value pair where the key is the path to the item, and the value will be the required manufactured class made out of the matching schemas - 2. value is an instance of the the correct schema type + 2. value is an instance of the correct schema type the value is NOT validated by _validate_oapg, _validate_oapg only checks that the instance is of the correct schema type for this value, _validate_oapg does NOT return an entry for it in _path_to_schemas and in list/dict _get_items_oapg,_get_properties_oapg the value will be directly assigned @@ -861,7 +861,7 @@ class ValidatorBase: schema_keyword not in configuration._disabled_client_side_validations) @staticmethod - def _raise_validation_errror_message_oapg(value, constraint_msg, constraint_value, path_to_item, additional_txt=""): + def _raise_validation_error_message_oapg(value, constraint_msg, constraint_value, path_to_item, additional_txt=""): raise ApiValueError( "Invalid value `{value}`, {constraint_msg} `{constraint_value}`{additional_txt} at {path_to_item}".format( value=value, @@ -956,7 +956,7 @@ class StrBase(ValidatorBase): if (cls._is_json_validation_enabled_oapg('maxLength', validation_metadata.configuration) and hasattr(cls.MetaOapg, 'max_length') and len(arg) > cls.MetaOapg.max_length): - cls._raise_validation_errror_message_oapg( + cls._raise_validation_error_message_oapg( value=arg, constraint_msg="length must be less than or equal to", constraint_value=cls.MetaOapg.max_length, @@ -966,7 +966,7 @@ class StrBase(ValidatorBase): if (cls._is_json_validation_enabled_oapg('minLength', validation_metadata.configuration) and hasattr(cls.MetaOapg, 'min_length') and len(arg) < cls.MetaOapg.min_length): - cls._raise_validation_errror_message_oapg( + cls._raise_validation_error_message_oapg( value=arg, constraint_msg="length must be greater than or equal to", constraint_value=cls.MetaOapg.min_length, @@ -981,14 +981,14 @@ class StrBase(ValidatorBase): if flags != 0: # Don't print the regex flags if the flags are not # specified in the OAS document. - cls._raise_validation_errror_message_oapg( + cls._raise_validation_error_message_oapg( value=arg, constraint_msg="must match regular expression", constraint_value=regex_dict['pattern'], path_to_item=validation_metadata.path_to_item, additional_txt=" with flags=`{}`".format(flags) ) - cls._raise_validation_errror_message_oapg( + cls._raise_validation_error_message_oapg( value=arg, constraint_msg="must match regular expression", constraint_value=regex_dict['pattern'], @@ -1204,7 +1204,7 @@ class NumberBase(ValidatorBase): return self._as_float except AttributeError: if self.as_tuple().exponent >= 0: - raise ApiValueError(f'{self} is not an float') + raise ApiValueError(f'{self} is not a float') self._as_float = float(self) return self._as_float @@ -1221,7 +1221,7 @@ class NumberBase(ValidatorBase): multiple_of_value = cls.MetaOapg.multiple_of if (not (float(arg) / multiple_of_value).is_integer()): # Note 'multipleOf' will be as good as the floating point arithmetic. - cls._raise_validation_errror_message_oapg( + cls._raise_validation_error_message_oapg( value=arg, constraint_msg="value must be a multiple of", constraint_value=multiple_of_value, @@ -1242,7 +1242,7 @@ class NumberBase(ValidatorBase): if (cls._is_json_validation_enabled_oapg('exclusiveMaximum', validation_metadata.configuration) and hasattr(cls.MetaOapg, 'exclusive_maximum') and arg >= cls.MetaOapg.exclusive_maximum): - cls._raise_validation_errror_message_oapg( + cls._raise_validation_error_message_oapg( value=arg, constraint_msg="must be a value less than", constraint_value=cls.MetaOapg.exclusive_maximum, @@ -1252,7 +1252,7 @@ class NumberBase(ValidatorBase): if (cls._is_json_validation_enabled_oapg('maximum', validation_metadata.configuration) and hasattr(cls.MetaOapg, 'inclusive_maximum') and arg > cls.MetaOapg.inclusive_maximum): - cls._raise_validation_errror_message_oapg( + cls._raise_validation_error_message_oapg( value=arg, constraint_msg="must be a value less than or equal to", constraint_value=cls.MetaOapg.inclusive_maximum, @@ -1262,7 +1262,7 @@ class NumberBase(ValidatorBase): if (cls._is_json_validation_enabled_oapg('exclusiveMinimum', validation_metadata.configuration) and hasattr(cls.MetaOapg, 'exclusive_minimum') and arg <= cls.MetaOapg.exclusive_minimum): - cls._raise_validation_errror_message_oapg( + cls._raise_validation_error_message_oapg( value=arg, constraint_msg="must be a value greater than", constraint_value=cls.MetaOapg.exclusive_maximum, @@ -1272,7 +1272,7 @@ class NumberBase(ValidatorBase): if (cls._is_json_validation_enabled_oapg('minimum', validation_metadata.configuration) and hasattr(cls.MetaOapg, 'inclusive_minimum') and arg < cls.MetaOapg.inclusive_minimum): - cls._raise_validation_errror_message_oapg( + cls._raise_validation_error_message_oapg( value=arg, constraint_msg="must be a value greater than or equal to", constraint_value=cls.MetaOapg.inclusive_minimum, @@ -1340,7 +1340,7 @@ class ListBase(ValidatorBase): if (cls._is_json_validation_enabled_oapg('maxItems', validation_metadata.configuration) and hasattr(cls.MetaOapg, 'max_items') and len(arg) > cls.MetaOapg.max_items): - cls._raise_validation_errror_message_oapg( + cls._raise_validation_error_message_oapg( value=arg, constraint_msg="number of items must be less than or equal to", constraint_value=cls.MetaOapg.max_items, @@ -1350,7 +1350,7 @@ class ListBase(ValidatorBase): if (cls._is_json_validation_enabled_oapg('minItems', validation_metadata.configuration) and hasattr(cls.MetaOapg, 'min_items') and len(arg) < cls.MetaOapg.min_items): - cls._raise_validation_errror_message_oapg( + cls._raise_validation_error_message_oapg( value=arg, constraint_msg="number of items must be greater than or equal to", constraint_value=cls.MetaOapg.min_items, @@ -1361,7 +1361,7 @@ class ListBase(ValidatorBase): hasattr(cls.MetaOapg, 'unique_items') and cls.MetaOapg.unique_items and arg): unique_items = set(arg) if len(arg) > len(unique_items): - cls._raise_validation_errror_message_oapg( + cls._raise_validation_error_message_oapg( value=arg, constraint_msg="duplicate items were found, and the tuple must not contain duplicates because", constraint_value='unique_items==True', @@ -1604,7 +1604,7 @@ class DictBase(Discriminable, ValidatorBase): if (cls._is_json_validation_enabled_oapg('maxProperties', validation_metadata.configuration) and hasattr(cls.MetaOapg, 'max_properties') and len(arg) > cls.MetaOapg.max_properties): - cls._raise_validation_errror_message_oapg( + cls._raise_validation_error_message_oapg( value=arg, constraint_msg="number of properties must be less than or equal to", constraint_value=cls.MetaOapg.max_properties, @@ -1614,7 +1614,7 @@ class DictBase(Discriminable, ValidatorBase): if (cls._is_json_validation_enabled_oapg('minProperties', validation_metadata.configuration) and hasattr(cls.MetaOapg, 'min_properties') and len(arg) < cls.MetaOapg.min_properties): - cls._raise_validation_errror_message_oapg( + cls._raise_validation_error_message_oapg( value=arg, constraint_msg="number of properties must be greater than or equal to", constraint_value=cls.MetaOapg.min_properties, diff --git a/modules/openapi-generator/src/main/resources/python/signing.handlebars b/modules/openapi-generator/src/main/resources/python/signing.handlebars index 26d2b8cb37..a853a998ef 100644 --- a/modules/openapi-generator/src/main/resources/python/signing.handlebars +++ b/modules/openapi-generator/src/main/resources/python/signing.handlebars @@ -334,7 +334,7 @@ class HttpSigningConfiguration(object): :return: A tuple of (digest, prefix). The digest is a hashing object that contains the cryptographic digest of the HTTP request. - The prefix is a string that identifies the cryptographc hash. It is used + The prefix is a string that identifies the cryptographic hash. It is used to generate the 'Digest' header as specified in RFC 3230. """ if self.hash_algorithm == HASH_SHA512: diff --git a/modules/openapi-generator/src/main/resources/r/ApiResponse.mustache b/modules/openapi-generator/src/main/resources/r/ApiResponse.mustache index ca8c3f7858..c2e9eb5be4 100644 --- a/modules/openapi-generator/src/main/resources/r/ApiResponse.mustache +++ b/modules/openapi-generator/src/main/resources/r/ApiResponse.mustache @@ -6,7 +6,7 @@ #' @field content The deserialized response body. #' @field response The raw response from the endpoint. #' @field status_code The HTTP response status code. -#' @field status_code_desc The brief descriptoin of the HTTP response status code. +#' @field status_code_desc The brief description of the HTTP response status code. #' @field headers The HTTP response headers. #' @export ApiResponse <- R6::R6Class( diff --git a/modules/openapi-generator/src/main/resources/r/api.mustache b/modules/openapi-generator/src/main/resources/r/api.mustache index a49694f8a0..46067f6d52 100644 --- a/modules/openapi-generator/src/main/resources/r/api.mustache +++ b/modules/openapi-generator/src/main/resources/r/api.mustache @@ -386,7 +386,7 @@ # check if items are unique if (!identical(`{{{paramName}}}`, unique(`{{{paramName}}}`))) { {{#useDefaultExceptionHandling}} - stop("Invalid value for {{{paramName}}} when calling {{classname}}${{operationId}}. Items must be unqiue.") + stop("Invalid value for {{{paramName}}} when calling {{classname}}${{operationId}}. Items must be unique.") {{/useDefaultExceptionHandling}} {{#useRlangExceptionHandling}} rlang::abort(message = "Invalid value for `{{paramName}}` when calling {{classname}}${{operationId}}. Items must be unique.", diff --git a/modules/openapi-generator/src/main/resources/r/api_client.mustache b/modules/openapi-generator/src/main/resources/r/api_client.mustache index 395ff41be4..9530234c8c 100644 --- a/modules/openapi-generator/src/main/resources/r/api_client.mustache +++ b/modules/openapi-generator/src/main/resources/r/api_client.mustache @@ -411,10 +411,10 @@ ApiClient <- R6::R6Class( } return_obj }, - #' Return a propery header (for accept or content-type). + #' Return a property header (for accept or content-type). #' #' @description - #' Return a propery header (for accept or content-type). If JSON-related MIME is found, + #' Return a property header (for accept or content-type). If JSON-related MIME is found, #' return it. Otherwise, return the first one, if any. #' #' @param headers A list of headers diff --git a/modules/openapi-generator/src/main/resources/r/libraries/httr2/api_client.mustache b/modules/openapi-generator/src/main/resources/r/libraries/httr2/api_client.mustache index fd9ddd884b..decfe50f1d 100644 --- a/modules/openapi-generator/src/main/resources/r/libraries/httr2/api_client.mustache +++ b/modules/openapi-generator/src/main/resources/r/libraries/httr2/api_client.mustache @@ -171,7 +171,7 @@ ApiClient <- R6::R6Class( #' @param header_params The header parameters. #' @param form_params The form parameters. #' @param file_params The form parameters to upload files. - #' @param accepts The HTTP accpet headers. + #' @param accepts The HTTP accept headers. #' @param content_types The HTTP content-type headers. #' @param body The HTTP request body. #' @param is_oauth True if the endpoints required OAuth authentication. @@ -202,7 +202,7 @@ ApiClient <- R6::R6Class( #' @param header_params The header parameters. #' @param form_params The form parameters. #' @param file_params The form parameters for uploading files. - #' @param accepts The HTTP accpet headers. + #' @param accepts The HTTP accept headers. #' @param content_types The HTTP content-type headers. #' @param body The HTTP request body. #' @param is_oauth True if the endpoints required OAuth authentication. @@ -416,10 +416,10 @@ ApiClient <- R6::R6Class( } return_obj }, - #' Return a propery header (for accept or content-type). + #' Return a property header (for accept or content-type). #' #' @description - #' Return a propery header (for accept or content-type). If JSON-related MIME is found, + #' Return a property header (for accept or content-type). If JSON-related MIME is found, #' return it. Otherwise, return the first one, if any. #' #' @param headers A list of headers diff --git a/modules/openapi-generator/src/main/resources/r/modelAnyOf.mustache b/modules/openapi-generator/src/main/resources/r/modelAnyOf.mustache index 84cc761b40..f16a9cd2d1 100644 --- a/modules/openapi-generator/src/main/resources/r/modelAnyOf.mustache +++ b/modules/openapi-generator/src/main/resources/r/modelAnyOf.mustache @@ -169,7 +169,7 @@ ## Uncomment below to unlock the class to allow modifications of the method or field #{{classname}}$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function #{{classname}}$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/modules/openapi-generator/src/main/resources/r/modelGeneric.mustache b/modules/openapi-generator/src/main/resources/r/modelGeneric.mustache index 451f41a5b4..a75dd49ae0 100644 --- a/modules/openapi-generator/src/main/resources/r/modelGeneric.mustache +++ b/modules/openapi-generator/src/main/resources/r/modelGeneric.mustache @@ -46,7 +46,7 @@ #' @param {{name}} {{#lambdaRdocEscape}}{{{description}}}{{/lambdaRdocEscape}}{{^description}}{{{name}}}{{/description}}{{#defaultValue}}. Default to {{{.}}}.{{/defaultValue}} {{/optionalVars}} {{#isAdditionalPropertiesTrue}} - #' @param additional_properties additonal properties (optional) + #' @param additional_properties additional properties (optional) {{/isAdditionalPropertiesTrue}} #' @param ... Other optional arguments. #' @export @@ -673,7 +673,7 @@ ## Uncomment below to unlock the class to allow modifications of the method or field # {{classname}}$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # {{classname}}$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/modules/openapi-generator/src/main/resources/r/modelOneOf.mustache b/modules/openapi-generator/src/main/resources/r/modelOneOf.mustache index da27bdfb2d..f692ca1288 100644 --- a/modules/openapi-generator/src/main/resources/r/modelOneOf.mustache +++ b/modules/openapi-generator/src/main/resources/r/modelOneOf.mustache @@ -221,7 +221,7 @@ ## Uncomment below to unlock the class to allow modifications of the method or field #{{classname}}$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function #{{classname}}$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/modules/openapi-generator/src/main/resources/rust-server/models.mustache b/modules/openapi-generator/src/main/resources/rust-server/models.mustache index 30be5a54f3..f7b9c395a5 100644 --- a/modules/openapi-generator/src/main/resources/rust-server/models.mustache +++ b/modules/openapi-generator/src/main/resources/rust-server/models.mustache @@ -12,7 +12,7 @@ use crate::header; {{/description}} {{#isEnum}} /// Enumeration of values. -/// Since this enum's variants do not hold data, we can easily define them them as `#[repr(C)]` +/// Since this enum's variants do not hold data, we can easily define them as `#[repr(C)]` /// which helps with FFI. #[allow(non_camel_case_types)] #[repr(C)] diff --git a/modules/openapi-generator/src/main/resources/scala-akka-client/apiInvoker.mustache b/modules/openapi-generator/src/main/resources/scala-akka-client/apiInvoker.mustache index ae815e21c6..13a3e6d0e9 100644 --- a/modules/openapi-generator/src/main/resources/scala-akka-client/apiInvoker.mustache +++ b/modules/openapi-generator/src/main/resources/scala-akka-client/apiInvoker.mustache @@ -39,7 +39,7 @@ object ApiInvoker { * Allows request execution without calling apiInvoker.execute(request) * request.response can be used to get a future of the ApiResponse generated. * request.result can be used to get a future of the expected ApiResponse content. If content doesn't match, a - * Future will failed with a ClassCastException + * Future will fail with a ClassCastException * * @param request the apiRequest to be executed */ diff --git a/modules/openapi-generator/src/main/resources/scalatra/web.xml b/modules/openapi-generator/src/main/resources/scalatra/web.xml index bf99b05808..3003f2941b 100644 --- a/modules/openapi-generator/src/main/resources/scalatra/web.xml +++ b/modules/openapi-generator/src/main/resources/scalatra/web.xml @@ -7,7 +7,7 @@ diff --git a/modules/openapi-generator/src/main/resources/swift5/APIHelper.mustache b/modules/openapi-generator/src/main/resources/swift5/APIHelper.mustache index 1976389603..95cf790b28 100644 --- a/modules/openapi-generator/src/main/resources/swift5/APIHelper.mustache +++ b/modules/openapi-generator/src/main/resources/swift5/APIHelper.mustache @@ -65,7 +65,7 @@ import Vapor{{/useVapor}} /// maps all values from source to query parameters /// - /// explode attribute is respected: collection values might be either joined or split up into seperate key value pairs + /// explode attribute is respected: collection values might be either joined or split up into separate key value pairs {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static func mapValuesToQueryItems(_ source: [String: (wrappedValue: Any?, isExplode: Bool)]) -> [URLQueryItem]? { let destination = source.filter { $0.value.wrappedValue != nil }.reduce(into: [URLQueryItem]()) { result, item in if let collection = item.value.wrappedValue as? [Any?] { diff --git a/modules/openapi-generator/src/main/resources/swift5/api.mustache b/modules/openapi-generator/src/main/resources/swift5/api.mustache index 8ae155fc07..4efc57d9e3 100644 --- a/modules/openapi-generator/src/main/resources/swift5/api.mustache +++ b/modules/openapi-generator/src/main/resources/swift5/api.mustache @@ -284,7 +284,7 @@ extension {{projectName}}API { defaultResponse: {{.}}{{/defaultResponse}} {{#authMethods}} - {{#isBasic}}BASIC{{/isBasic}}{{#isOAuth}}OAuth{{/isOAuth}}{{#isApiKey}}API Key{{/isApiKey}}: - - type: {{type}}{{#keyParamName}} {{keyParamName}} {{#isKeyInQuery}}(QUERY){{/isKeyInQuery}}{{#isKeyInHeaer}}(HEADER){{/isKeyInHeaer}}{{/keyParamName}} + - type: {{type}}{{#keyParamName}} {{keyParamName}} {{#isKeyInQuery}}(QUERY){{/isKeyInQuery}}{{#isKeyInHeader}}(HEADER){{/isKeyInHeader}}{{/keyParamName}} - name: {{name}} {{/authMethods}} {{#hasResponseHeaders}} @@ -364,7 +364,7 @@ extension {{projectName}}API { defaultResponse: {{.}}{{/defaultResponse}} {{#authMethods}} - {{#isBasic}}BASIC{{/isBasic}}{{#isOAuth}}OAuth{{/isOAuth}}{{#isApiKey}}API Key{{/isApiKey}}: - - type: {{type}}{{#keyParamName}} {{keyParamName}} {{#isKeyInQuery}}(QUERY){{/isKeyInQuery}}{{#isKeyInHeaer}}(HEADER){{/isKeyInHeaer}}{{/keyParamName}} + - type: {{type}}{{#keyParamName}} {{keyParamName}} {{#isKeyInQuery}}(QUERY){{/isKeyInQuery}}{{#isKeyInHeader}}(HEADER){{/isKeyInHeader}}{{/keyParamName}} - name: {{name}} {{/authMethods}} {{#hasResponseHeaders}} @@ -408,7 +408,7 @@ extension {{projectName}}API { - defaultResponse: {{.}}{{/defaultResponse}} {{#authMethods}} - {{#isBasic}}BASIC{{/isBasic}}{{#isOAuth}}OAuth{{/isOAuth}}{{#isApiKey}}API Key{{/isApiKey}}: - - type: {{type}}{{#keyParamName}} {{keyParamName}} {{#isKeyInQuery}}(QUERY){{/isKeyInQuery}}{{#isKeyInHeaer}}(HEADER){{/isKeyInHeaer}}{{/keyParamName}} + - type: {{type}}{{#keyParamName}} {{keyParamName}} {{#isKeyInQuery}}(QUERY){{/isKeyInQuery}}{{#isKeyInHeader}}(HEADER){{/isKeyInHeader}}{{/keyParamName}} - name: {{name}} {{/authMethods}} {{#hasResponseHeaders}} diff --git a/modules/openapi-generator/src/main/resources/typescript-aurelia/README.md b/modules/openapi-generator/src/main/resources/typescript-aurelia/README.md index 39a6c22b2e..1475a466d6 100644 --- a/modules/openapi-generator/src/main/resources/typescript-aurelia/README.md +++ b/modules/openapi-generator/src/main/resources/typescript-aurelia/README.md @@ -27,7 +27,7 @@ npm run build ``` #### NPM #### -You may publish the module to NPM. In this case, you would be able to install the module as any other NPM module. It maybe useful to use [scoped packages](https://docs.npmjs.com/misc/scope). +You may publish the module to NPM. In this case, you would be able to install the module as any other NPM module. It may be useful to use [scoped packages](https://docs.npmjs.com/misc/scope). You can also use `npm link` to link the module. However, this would not modify `package.json` of the installing project, as such you would need to relink every time you deploy that project. diff --git a/modules/openapi-generator/src/main/resources/typescript-fetch/runtime.mustache b/modules/openapi-generator/src/main/resources/typescript-fetch/runtime.mustache index 45e2a56434..b47cf55c45 100644 --- a/modules/openapi-generator/src/main/resources/typescript-fetch/runtime.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-fetch/runtime.mustache @@ -135,7 +135,7 @@ export class BaseAPI { credentials: this.configuration.credentials, }; - const overridedInit: RequestInit = { + const overriddenInit: RequestInit = { ...initParams, ...(await initOverrideFn({ init: initParams, @@ -144,13 +144,13 @@ export class BaseAPI { }; const init: RequestInit = { - ...overridedInit, + ...overriddenInit, body: - isFormData(overridedInit.body) || - overridedInit.body instanceof URLSearchParams || - isBlob(overridedInit.body) - ? overridedInit.body - : JSON.stringify(overridedInit.body), + isFormData(overriddenInit.body) || + overriddenInit.body instanceof URLSearchParams || + isBlob(overriddenInit.body) + ? overriddenInit.body + : JSON.stringify(overriddenInit.body), }; return { url, init }; diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java index cfdc60aa0a..593a45266b 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java @@ -4209,7 +4209,7 @@ public class DefaultCodegenTest { Assert.assertNotNull(openAPI.getComponents().getSchemas().get(ModelUtils.getSimpleRef(requestBodySchema.get$ref()))); Schema requestBodySchema2 = ModelUtils.unaliasSchema(openAPI, requestBodySchema); - // get$ref is not null as unaliasSchem returns the schema with the last $ref to the actual schema + // get$ref is not null as unaliasSchema returns the schema with the last $ref to the actual schema Assert.assertNotNull(requestBodySchema2.get$ref()); Assert.assertEquals(requestBodySchema2.get$ref(), "#/components/schemas/updatePetWithForm_request"); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJAXRSSpecServerCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJAXRSSpecServerCodegenTest.java index 1fa2e72554..7f5937ee7c 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJAXRSSpecServerCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJAXRSSpecServerCodegenTest.java @@ -715,8 +715,8 @@ public class JavaJAXRSSpecServerCodegenTest extends JavaJaxrsBaseTest { "\nprivate @Valid List arrayThatIsNull = null;\n"); //And the generated model contains correct default value for array properties (required, nullable) - TestUtils.ensureContainsFile(files, output, "src/gen/java/org/openapitools/model/BodyWithRequiredNullalble.java"); - assertFileContains(output.toPath().resolve("src/gen/java/org/openapitools/model/BodyWithRequiredNullalble.java"), + TestUtils.ensureContainsFile(files, output, "src/gen/java/org/openapitools/model/BodyWithRequiredNullable.java"); + assertFileContains(output.toPath().resolve("src/gen/java/org/openapitools/model/BodyWithRequiredNullable.java"), "\nprivate @Valid List arrayThatIsNull = null;\n"); //And the generated model contains correct default value for array properties (required) diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java index bec4ee24ce..d97a3c6ab4 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java @@ -859,8 +859,8 @@ public class SpringCodegenTest { assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/api/BearsApi.java"), "@PathVariable"); assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/api/CamelsApi.java"), "allowableValues = \"sleeping, awake\""); assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/api/CamelsApi.java"), "@PathVariable"); - assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/api/GirafesApi.java"), "allowableValues = \"0, 1\""); - assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/api/GirafesApi.java"), "@PathVariable"); + assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/api/GiraffesApi.java"), "allowableValues = \"0, 1\""); + assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/api/GiraffesApi.java"), "@PathVariable"); } @Test diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/swift5/Swift5ModelEnumTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/swift5/Swift5ModelEnumTest.java index 495e7ffa7d..16493f7440 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/swift5/Swift5ModelEnumTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/swift5/Swift5ModelEnumTest.java @@ -35,7 +35,7 @@ import java.util.Arrays; @SuppressWarnings("static-method") public class Swift5ModelEnumTest { - @Test(description = "convert a java model with an string enum and a default value") + @Test(description = "convert a java model with a string enum and a default value") public void convertStringDefaultValueTest() { final StringSchema enumSchema = new StringSchema(); enumSchema.setEnum(Arrays.asList("VALUE1", "VALUE2", "VALUE3")); @@ -59,7 +59,7 @@ public class Swift5ModelEnumTest { Assert.assertTrue(enumVar.isEnum); } - @Test(description = "convert a java model with an reserved word string enum and a default value") + @Test(description = "convert a java model with a reserved word string enum and a default value") public void convertReservedWordStringDefaultValueTest() { final StringSchema enumSchema = new StringSchema(); enumSchema.setEnum(Arrays.asList("1st", "2nd", "3rd")); @@ -107,7 +107,7 @@ public class Swift5ModelEnumTest { Assert.assertTrue(enumVar.isEnum); } - @Test(description = "convert a java model with an number enum and a default value") + @Test(description = "convert a java model with a number enum and a default value") public void convertNumberDefaultValueTest() { final NumberSchema enumSchema = new NumberSchema(); enumSchema.setEnum(Arrays.asList(new BigDecimal(10), new BigDecimal(100), new BigDecimal(1000))); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/SharedTypeScriptTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/SharedTypeScriptTest.java index cdd43b5b09..7a769cc8d1 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/SharedTypeScriptTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/SharedTypeScriptTest.java @@ -21,7 +21,7 @@ import static org.openapitools.codegen.typescript.TypeScriptGroups.*; @Test(groups = {TYPESCRIPT}) public class SharedTypeScriptTest { @Test - public void typesInImportsAreSplittedTest() throws IOException { + public void typesInImportsAreSplitTest() throws IOException { CodegenConfigurator config = new CodegenConfigurator() .setInputSpec("src/test/resources/split-import.json") diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/typescriptnode/TypeScriptNodeModelTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/typescriptnode/TypeScriptNodeModelTest.java index 42b7fbe1b4..23e342f4bc 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/typescriptnode/TypeScriptNodeModelTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/typescriptnode/TypeScriptNodeModelTest.java @@ -297,7 +297,7 @@ public class TypeScriptNodeModelTest { Assert.assertEquals(cm.additionalPropertiesType, "Array"); } - @Test(description = "convert an string additional properties model") + @Test(description = "convert a string additional properties model") public void arrayModelAdditionalPropertiesStringTest() { final Schema schema = new Schema() .description("a map model") @@ -313,7 +313,7 @@ public class TypeScriptNodeModelTest { Assert.assertEquals(cm.additionalPropertiesType, "string"); } - @Test(description = "convert an complex additional properties model") + @Test(description = "convert a complex additional properties model") public void arrayModelAdditionalPropertiesComplexTest() { final Schema schema = new Schema() .description("a map model") diff --git a/modules/openapi-generator/src/test/resources/2_0/globalSecurity.json b/modules/openapi-generator/src/test/resources/2_0/globalSecurity.json index 5cadaaa2bc..efecc7ee6b 100644 --- a/modules/openapi-generator/src/test/resources/2_0/globalSecurity.json +++ b/modules/openapi-generator/src/test/resources/2_0/globalSecurity.json @@ -471,7 +471,7 @@ "store" ], "summary": "Find purchase order by ID", - "description": "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + "description": "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", "operationId": "getOrderById", "produces": [ "application/json", diff --git a/modules/openapi-generator/src/test/resources/2_0/long_description_issue_7839.json b/modules/openapi-generator/src/test/resources/2_0/long_description_issue_7839.json index 99265c90dc..e50678f6cd 100644 --- a/modules/openapi-generator/src/test/resources/2_0/long_description_issue_7839.json +++ b/modules/openapi-generator/src/test/resources/2_0/long_description_issue_7839.json @@ -360,7 +360,7 @@ "get" : { "tags" : [ "store" ], "summary" : "Find purchase order by ID", - "description" : "For valid response try integer IDs with value >= 1 and <= 10.\\ \\ Other values will generated exceptions", + "description" : "For valid response try integer IDs with value >= 1 and <= 10.\\ \\ Other values will generate exceptions", "operationId" : "getOrderById", "produces" : [ "application/json", "application/xml" ], "parameters" : [ { diff --git a/modules/openapi-generator/src/test/resources/2_0/petstore-bash.json b/modules/openapi-generator/src/test/resources/2_0/petstore-bash.json index 964b47418d..cc93278ae8 100644 --- a/modules/openapi-generator/src/test/resources/2_0/petstore-bash.json +++ b/modules/openapi-generator/src/test/resources/2_0/petstore-bash.json @@ -512,7 +512,7 @@ "store" ], "summary":"Find purchase order by ID", - "description":"For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions", + "description":"For valid response try integer IDs with value >= 1 and <= 10. Other values will generate exceptions", "operationId":"getOrderById", "produces":[ "application/xml", diff --git a/modules/openapi-generator/src/test/resources/2_0/petstore-nullable.yaml b/modules/openapi-generator/src/test/resources/2_0/petstore-nullable.yaml index 9a7e2e9c5f..b68004726e 100644 --- a/modules/openapi-generator/src/test/resources/2_0/petstore-nullable.yaml +++ b/modules/openapi-generator/src/test/resources/2_0/petstore-nullable.yaml @@ -323,7 +323,7 @@ paths: tags: - store summary: Find purchase order by ID - description: 'For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions' + description: 'For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions' operationId: getOrderById produces: - application/xml diff --git a/modules/openapi-generator/src/test/resources/2_0/petstore-orig.json b/modules/openapi-generator/src/test/resources/2_0/petstore-orig.json index 907bfd7911..9f86896493 100644 --- a/modules/openapi-generator/src/test/resources/2_0/petstore-orig.json +++ b/modules/openapi-generator/src/test/resources/2_0/petstore-orig.json @@ -471,7 +471,7 @@ "store" ], "summary": "Find purchase order by ID", - "description": "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + "description": "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", "operationId": "getOrderById", "produces": [ "application/json", diff --git a/modules/openapi-generator/src/test/resources/2_0/petstore-proto.yaml b/modules/openapi-generator/src/test/resources/2_0/petstore-proto.yaml index f6d9efaa4c..77cbbb72c3 100644 --- a/modules/openapi-generator/src/test/resources/2_0/petstore-proto.yaml +++ b/modules/openapi-generator/src/test/resources/2_0/petstore-proto.yaml @@ -325,7 +325,7 @@ paths: tags: - store summary: Find purchase order by ID - description: 'For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions' + description: 'For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions' operationId: getOrderById produces: - application/xml diff --git a/modules/openapi-generator/src/test/resources/2_0/petstore-vendor-mime.yaml b/modules/openapi-generator/src/test/resources/2_0/petstore-vendor-mime.yaml index 4bf2f04d96..118f66d37a 100644 --- a/modules/openapi-generator/src/test/resources/2_0/petstore-vendor-mime.yaml +++ b/modules/openapi-generator/src/test/resources/2_0/petstore-vendor-mime.yaml @@ -319,7 +319,7 @@ paths: tags: - store summary: Find purchase order by ID - description: 'For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions' + description: 'For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions' operationId: getOrderById produces: - application/xml diff --git a/modules/openapi-generator/src/test/resources/2_0/petstore-with-date-field.yaml b/modules/openapi-generator/src/test/resources/2_0/petstore-with-date-field.yaml index 017e66b427..28d56302b7 100644 --- a/modules/openapi-generator/src/test/resources/2_0/petstore-with-date-field.yaml +++ b/modules/openapi-generator/src/test/resources/2_0/petstore-with-date-field.yaml @@ -314,7 +314,7 @@ paths: tags: - store summary: Find purchase order by ID - description: 'For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions' + description: 'For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions' operationId: getOrderById produces: - application/xml diff --git a/modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-for-testing-playframework-with-security.yaml b/modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-for-testing-playframework-with-security.yaml index be54ca6da2..4ef75a199d 100644 --- a/modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-for-testing-playframework-with-security.yaml +++ b/modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-for-testing-playframework-with-security.yaml @@ -109,7 +109,7 @@ paths: securityDefinitions: petstore_token: type: oauth2 - description: security definition for using keycloak authentification with control site. + description: security definition for using keycloak authentication with control site. authorizationUrl: https://keycloak-dev.business.stingray.com/auth/realms/CSLocal/protocol/openid-connect/auth tokenUrl: https://keycloak-dev.business.stingray.com/auth/realms/CSLocal/protocol/openid-connect/token x-jwksUrl: https://keycloak-dev.business.stingray.com/auth/realms/CSLocal/protocol/openid-connect/certs diff --git a/modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing-saga-and-records.yaml b/modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing-saga-and-records.yaml index 29c48ddc0b..babf447f2f 100644 --- a/modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing-saga-and-records.yaml +++ b/modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing-saga-and-records.yaml @@ -511,7 +511,7 @@ paths: tags: - store summary: Find purchase order by ID - description: 'For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions' + description: 'For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions' operationId: getOrderById produces: - application/xml diff --git a/modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing-with-spring-pageable.yaml b/modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing-with-spring-pageable.yaml index ad0619d821..3f8a66e2a1 100644 --- a/modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing-with-spring-pageable.yaml +++ b/modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing-with-spring-pageable.yaml @@ -329,7 +329,7 @@ paths: tags: - store summary: Find purchase order by ID - description: 'For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions' + description: 'For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions' operationId: getOrderById produces: - application/xml @@ -839,7 +839,7 @@ paths: description: Integer in group parameters responses: '400': - description: Someting wrong + description: Something wrong /fake/outer/number: post: tags: diff --git a/modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml b/modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml index 5c9ae2bab7..91aa8232ec 100644 --- a/modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +++ b/modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml @@ -329,7 +329,7 @@ paths: tags: - store summary: Find purchase order by ID - description: 'For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions' + description: 'For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions' operationId: getOrderById produces: - application/xml @@ -837,7 +837,7 @@ paths: description: Integer in group parameters responses: '400': - description: Someting wrong + description: Something wrong /fake/outer/number: post: tags: diff --git a/modules/openapi-generator/src/test/resources/2_0/petstore-with-operations-without-required-params.yaml b/modules/openapi-generator/src/test/resources/2_0/petstore-with-operations-without-required-params.yaml index a0b89db031..cdc9e693f4 100644 --- a/modules/openapi-generator/src/test/resources/2_0/petstore-with-operations-without-required-params.yaml +++ b/modules/openapi-generator/src/test/resources/2_0/petstore-with-operations-without-required-params.yaml @@ -321,7 +321,7 @@ paths: tags: - store summary: Find purchase order by ID - description: 'For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions' + description: 'For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions' operationId: getOrderById produces: - application/xml diff --git a/modules/openapi-generator/src/test/resources/2_0/petstore-with-spring-pageable.yaml b/modules/openapi-generator/src/test/resources/2_0/petstore-with-spring-pageable.yaml index e102f7dc11..9a1152bb06 100644 --- a/modules/openapi-generator/src/test/resources/2_0/petstore-with-spring-pageable.yaml +++ b/modules/openapi-generator/src/test/resources/2_0/petstore-with-spring-pageable.yaml @@ -323,7 +323,7 @@ paths: tags: - store summary: Find purchase order by ID - description: 'For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions' + description: 'For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions' operationId: getOrderById produces: - application/xml diff --git a/modules/openapi-generator/src/test/resources/2_0/petstore.json b/modules/openapi-generator/src/test/resources/2_0/petstore.json index 1eac6b45a4..5deda4b94c 100644 --- a/modules/openapi-generator/src/test/resources/2_0/petstore.json +++ b/modules/openapi-generator/src/test/resources/2_0/petstore.json @@ -482,7 +482,7 @@ "store" ], "summary": "Find purchase order by ID", - "description": "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + "description": "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", "operationId": "getOrderById", "produces": [ "application/json", diff --git a/modules/openapi-generator/src/test/resources/2_0/petstore.yaml b/modules/openapi-generator/src/test/resources/2_0/petstore.yaml index 5cc2f3becb..36a05a5f6f 100644 --- a/modules/openapi-generator/src/test/resources/2_0/petstore.yaml +++ b/modules/openapi-generator/src/test/resources/2_0/petstore.yaml @@ -321,7 +321,7 @@ paths: tags: - store summary: Find purchase order by ID - description: 'For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions' + description: 'For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions' operationId: getOrderById produces: - application/xml diff --git a/modules/openapi-generator/src/test/resources/2_0/petstore_issue_7999.json b/modules/openapi-generator/src/test/resources/2_0/petstore_issue_7999.json index 5a60bffefc..c48c37f0f9 100644 --- a/modules/openapi-generator/src/test/resources/2_0/petstore_issue_7999.json +++ b/modules/openapi-generator/src/test/resources/2_0/petstore_issue_7999.json @@ -482,7 +482,7 @@ "store" ], "summary": "Find purchase order by ID", - "description": "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + "description": "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", "operationId": "getOrderById", "produces": [ "application/json", diff --git a/modules/openapi-generator/src/test/resources/2_0/python-prior/petstore-with-fake-endpoints-models-for-testing.yaml b/modules/openapi-generator/src/test/resources/2_0/python-prior/petstore-with-fake-endpoints-models-for-testing.yaml index 0fd88cfd5a..2e7206f911 100644 --- a/modules/openapi-generator/src/test/resources/2_0/python-prior/petstore-with-fake-endpoints-models-for-testing.yaml +++ b/modules/openapi-generator/src/test/resources/2_0/python-prior/petstore-with-fake-endpoints-models-for-testing.yaml @@ -334,7 +334,7 @@ paths: tags: - store summary: Find purchase order by ID - description: 'For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions' + description: 'For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions' operationId: getOrderById produces: - application/xml @@ -842,7 +842,7 @@ paths: description: Integer in group parameters responses: '400': - description: Someting wrong + description: Something wrong /fake/refs/number: post: tags: diff --git a/modules/openapi-generator/src/test/resources/2_0/rust-server/petstore-with-fake-endpoints-models-for-testing.yaml b/modules/openapi-generator/src/test/resources/2_0/rust-server/petstore-with-fake-endpoints-models-for-testing.yaml index 8f081c09dc..3595c5b503 100644 --- a/modules/openapi-generator/src/test/resources/2_0/rust-server/petstore-with-fake-endpoints-models-for-testing.yaml +++ b/modules/openapi-generator/src/test/resources/2_0/rust-server/petstore-with-fake-endpoints-models-for-testing.yaml @@ -321,7 +321,7 @@ paths: tags: - store summary: Find purchase order by ID - description: 'For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions' + description: 'For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions' operationId: getOrderById produces: - application/xml diff --git a/modules/openapi-generator/src/test/resources/2_0/rust-server/rust-server-test.yaml b/modules/openapi-generator/src/test/resources/2_0/rust-server/rust-server-test.yaml index c7937795ce..49a5b96122 100644 --- a/modules/openapi-generator/src/test/resources/2_0/rust-server/rust-server-test.yaml +++ b/modules/openapi-generator/src/test/resources/2_0/rust-server/rust-server-test.yaml @@ -139,7 +139,7 @@ definitions: baseAllOf: type: object properties: - sampleBasePropery: + sampleBaseProperty: type: string aNullableContainer: type: object diff --git a/modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml b/modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml index dac5c2a933..27e1524dab 100644 --- a/modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml +++ b/modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml @@ -322,7 +322,7 @@ paths: tags: - store summary: Find purchase order by ID - description: 'For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions' + description: 'For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions' operationId: getOrderById produces: - application/xml @@ -830,7 +830,7 @@ paths: description: Integer in group parameters responses: '400': - description: Someting wrong + description: Something wrong /fake/outer/number: post: tags: diff --git a/modules/openapi-generator/src/test/resources/3_0/asciidoc/api-docs.json b/modules/openapi-generator/src/test/resources/3_0/asciidoc/api-docs.json index 5c7b2ce7ae..0ef296a8fb 100644 --- a/modules/openapi-generator/src/test/resources/3_0/asciidoc/api-docs.json +++ b/modules/openapi-generator/src/test/resources/3_0/asciidoc/api-docs.json @@ -1340,7 +1340,7 @@ "example": "tlead1" } }, - "description": "a team member, could be project lead or an member with assigned tasks." + "description": "a team member, could be project lead or a member with assigned tasks." }, "TaskWeek": { "type": "object", diff --git a/modules/openapi-generator/src/test/resources/3_0/aspnetcore/petstore.yaml b/modules/openapi-generator/src/test/resources/3_0/aspnetcore/petstore.yaml index 183eccd90b..c0ca877d6f 100644 --- a/modules/openapi-generator/src/test/resources/3_0/aspnetcore/petstore.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/aspnetcore/petstore.yaml @@ -335,7 +335,7 @@ paths: summary: Find purchase order by ID description: >- For valid response try integer IDs with value <= 5 or > 10. Other values - will generated exceptions + will generate exceptions operationId: getOrderById parameters: - name: orderId diff --git a/modules/openapi-generator/src/test/resources/3_0/avro-schema/petstore.yaml b/modules/openapi-generator/src/test/resources/3_0/avro-schema/petstore.yaml index 89461f2c97..65cc9bd313 100644 --- a/modules/openapi-generator/src/test/resources/3_0/avro-schema/petstore.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/avro-schema/petstore.yaml @@ -335,7 +335,7 @@ paths: summary: Find purchase order by ID description: >- For valid response try integer IDs with value <= 5 or > 10. Other values - will generated exceptions + will generate exceptions operationId: getOrderById parameters: - name: orderId diff --git a/modules/openapi-generator/src/test/resources/3_0/cpp-qt/petstore.yaml b/modules/openapi-generator/src/test/resources/3_0/cpp-qt/petstore.yaml index bf8072432a..0d98a3be3c 100644 --- a/modules/openapi-generator/src/test/resources/3_0/cpp-qt/petstore.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/cpp-qt/petstore.yaml @@ -326,7 +326,7 @@ paths: - store summary: Find purchase order by ID description: For valid response try integer IDs with value <= 5 or > 10. Other values - will generated exceptions + will generate exceptions operationId: getOrderById parameters: - name: orderId diff --git a/modules/openapi-generator/src/test/resources/3_0/crystal/petstore.yaml b/modules/openapi-generator/src/test/resources/3_0/crystal/petstore.yaml index 002eaa2e8e..385b3e0e5e 100644 --- a/modules/openapi-generator/src/test/resources/3_0/crystal/petstore.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/crystal/petstore.yaml @@ -335,7 +335,7 @@ paths: summary: Find purchase order by ID description: >- For valid response try integer IDs with value <= 5 or > 10. Other values - will generated exceptions + will generate exceptions operationId: getOrderById parameters: - name: orderId diff --git a/modules/openapi-generator/src/test/resources/3_0/csharp-netcore/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml b/modules/openapi-generator/src/test/resources/3_0/csharp-netcore/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml index afd5a8a62b..8f2b63eefe 100644 --- a/modules/openapi-generator/src/test/resources/3_0/csharp-netcore/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/csharp-netcore/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml @@ -374,7 +374,7 @@ paths: summary: Find purchase order by ID description: >- For valid response try integer IDs with value <= 5 or > 10. Other values - will generated exceptions + will generate exceptions operationId: getOrderById parameters: - name: order_id @@ -859,7 +859,7 @@ paths: format: int64 responses: '400': - description: Someting wrong + description: Something wrong /fake/outer/number: post: tags: diff --git a/modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml b/modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml index 7695348b20..677a8ad31f 100644 --- a/modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml @@ -337,7 +337,7 @@ paths: summary: Find purchase order by ID description: >- For valid response try integer IDs with value <= 5 or > 10. Other values - will generated exceptions + will generate exceptions operationId: getOrderById parameters: - name: order_id @@ -822,7 +822,7 @@ paths: format: int64 responses: '400': - description: Someting wrong + description: Something wrong /fake/outer/number: post: tags: 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 13dde8a983..162d9b9761 100644 --- a/modules/openapi-generator/src/test/resources/3_0/elm.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/elm.yaml @@ -160,7 +160,7 @@ components: type: array items: type: string - arrayOfPrimitve: + arrayOfPrimitive: type: array items: $ref: "#/components/schemas/Primitive" diff --git a/modules/openapi-generator/src/test/resources/3_0/go/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml b/modules/openapi-generator/src/test/resources/3_0/go/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml index 4c7ed5960e..b9bfe5a8ff 100644 --- a/modules/openapi-generator/src/test/resources/3_0/go/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/go/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml @@ -355,7 +355,7 @@ paths: summary: Find purchase order by ID description: >- For valid response try integer IDs with value <= 5 or > 10. Other values - will generated exceptions + will generate exceptions operationId: getOrderById parameters: - name: order_id @@ -838,9 +838,9 @@ paths: format: int64 responses: '400': - description: Someting wrong + description: Something wrong '5XX': - description: Someting wrong + description: Something wrong content: 'applicatino/json': schema: diff --git a/modules/openapi-generator/src/test/resources/3_0/helidon/petstore-for-testing.yaml b/modules/openapi-generator/src/test/resources/3_0/helidon/petstore-for-testing.yaml index 4219f4004a..aa139e0629 100644 --- a/modules/openapi-generator/src/test/resources/3_0/helidon/petstore-for-testing.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/helidon/petstore-for-testing.yaml @@ -341,7 +341,7 @@ paths: multipart/form-data: schema: $ref: '#/components/schemas/PetsForm' - description: Object that that contains info about pets + description: Object that contains info about pets required: true responses: '200': @@ -402,7 +402,7 @@ paths: summary: Find purchase order by ID description: >- For valid response try integer IDs with value <= 5 or > 10. Other values - will generated exceptions + will generate exceptions operationId: getOrderById parameters: - name: orderId diff --git a/modules/openapi-generator/src/test/resources/3_0/helidon/petstore-no-multipart-for-testing.yaml b/modules/openapi-generator/src/test/resources/3_0/helidon/petstore-no-multipart-for-testing.yaml index 3a10351b61..012fecfb64 100644 --- a/modules/openapi-generator/src/test/resources/3_0/helidon/petstore-no-multipart-for-testing.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/helidon/petstore-no-multipart-for-testing.yaml @@ -331,7 +331,7 @@ paths: summary: Find purchase order by ID description: >- For valid response try integer IDs with value <= 5 or > 10. Other values - will generated exceptions + will generate exceptions operationId: getOrderById parameters: - name: orderId diff --git a/modules/openapi-generator/src/test/resources/3_0/inline_model_resolver.yaml b/modules/openapi-generator/src/test/resources/3_0/inline_model_resolver.yaml index 0741d3b5d7..7f1d9bdd1d 100644 --- a/modules/openapi-generator/src/test/resources/3_0/inline_model_resolver.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/inline_model_resolver.yaml @@ -293,7 +293,7 @@ paths: type: object /empty_example_on_string_models: get: - operationId: emptyExampleoOnStringTypeModels + operationId: emptyExampleOnStringTypeModels responses: '200': description: OK diff --git a/modules/openapi-generator/src/test/resources/3_0/issue_11772.yml b/modules/openapi-generator/src/test/resources/3_0/issue_11772.yml index 98737ae11f..7c1d941613 100644 --- a/modules/openapi-generator/src/test/resources/3_0/issue_11772.yml +++ b/modules/openapi-generator/src/test/resources/3_0/issue_11772.yml @@ -200,7 +200,7 @@ components: x-field-extra-annotation: |- @org.springframework.data.annotation.LastModifiedDate modifiedBy: - description: The employee id (Kerberos) of the user that last modifed the project. + description: The employee id (Kerberos) of the user that last modified the project. type: string example: janedoe x-field-extra-annotation: |- diff --git a/modules/openapi-generator/src/test/resources/3_0/issue_13025.yaml b/modules/openapi-generator/src/test/resources/3_0/issue_13025.yaml index 40cf1c1ed0..09e2f240cb 100644 --- a/modules/openapi-generator/src/test/resources/3_0/issue_13025.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/issue_13025.yaml @@ -23,7 +23,7 @@ components: nullable: true items: type: string - BodyWithRequiredNullalble: + BodyWithRequiredNullable: type: object required: - arrayThatIsNull diff --git a/modules/openapi-generator/src/test/resources/3_0/issue_3248.yaml b/modules/openapi-generator/src/test/resources/3_0/issue_3248.yaml index 701447d9f6..19d32b4718 100644 --- a/modules/openapi-generator/src/test/resources/3_0/issue_3248.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/issue_3248.yaml @@ -23,9 +23,9 @@ paths: schema: type: string format: date - /girafes: + /giraffes: get: - operationId: getGirafes + operationId: getGiraffes parameters: - $ref: '#/components/parameters/refStatus' /zebras: diff --git a/modules/openapi-generator/src/test/resources/3_0/issue_5381.yaml b/modules/openapi-generator/src/test/resources/3_0/issue_5381.yaml index 192c958f72..d37c8a79fb 100644 --- a/modules/openapi-generator/src/test/resources/3_0/issue_5381.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/issue_5381.yaml @@ -61,7 +61,7 @@ components: id: type: string description: unique identifier - description: Base schema for adressable entities + description: Base schema for addressable entities Extensible: type: object properties: diff --git a/modules/openapi-generator/src/test/resources/3_0/issue_6762.yaml b/modules/openapi-generator/src/test/resources/3_0/issue_6762.yaml index 9df77efc7f..c14a34b39a 100644 --- a/modules/openapi-generator/src/test/resources/3_0/issue_6762.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/issue_6762.yaml @@ -8,9 +8,9 @@ info: name: Apache-2.0 url: 'https://www.apache.org/licenses/LICENSE-2.0.html' paths: - /girafes/{refStatus}: + /giraffes/{refStatus}: get: - operationId: getGirafes + operationId: getGiraffes parameters: - $ref: '#/components/parameters/refStatus' /zebras/{status}: diff --git a/modules/openapi-generator/src/test/resources/3_0/issue_7361.yaml b/modules/openapi-generator/src/test/resources/3_0/issue_7361.yaml index 778a7f451f..93cdc902ec 100644 --- a/modules/openapi-generator/src/test/resources/3_0/issue_7361.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/issue_7361.yaml @@ -11,7 +11,7 @@ paths: {} components: schemas: FreeForm: - description: this will not be generated because a map will be used when othe components or endpoints ref this schema + description: this will not be generated because a map will be used when other components or endpoints ref this schema type: object FreeFormInterface: type: object diff --git a/modules/openapi-generator/src/test/resources/3_0/java/petstore-with-fake-endpoints-models-for-testing-with-http-signature-okhttp-gson.yaml b/modules/openapi-generator/src/test/resources/3_0/java/petstore-with-fake-endpoints-models-for-testing-with-http-signature-okhttp-gson.yaml index f0f4fa1da3..2e4c217020 100644 --- a/modules/openapi-generator/src/test/resources/3_0/java/petstore-with-fake-endpoints-models-for-testing-with-http-signature-okhttp-gson.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/java/petstore-with-fake-endpoints-models-for-testing-with-http-signature-okhttp-gson.yaml @@ -337,7 +337,7 @@ paths: summary: Find purchase order by ID description: >- For valid response try integer IDs with value <= 5 or > 10. Other values - will generated exceptions + will generate exceptions operationId: getOrderById parameters: - name: order_id @@ -822,7 +822,7 @@ paths: format: int64 responses: '400': - description: Someting wrong + description: Something wrong /fake/outer/number: post: tags: diff --git a/modules/openapi-generator/src/test/resources/3_0/java/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml b/modules/openapi-generator/src/test/resources/3_0/java/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml index 455a11dbe5..7c0f833e2f 100644 --- a/modules/openapi-generator/src/test/resources/3_0/java/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/java/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml @@ -337,7 +337,7 @@ paths: summary: Find purchase order by ID description: >- For valid response try integer IDs with value <= 5 or > 10. Other values - will generated exceptions + will generate exceptions operationId: getOrderById parameters: - name: order_id @@ -822,7 +822,7 @@ paths: format: int64 responses: '400': - description: Someting wrong + description: Something wrong /fake/outer/number: post: tags: diff --git a/modules/openapi-generator/src/test/resources/3_0/javascript/petstore-with-fake-endpoints-models-for-testing.yaml b/modules/openapi-generator/src/test/resources/3_0/javascript/petstore-with-fake-endpoints-models-for-testing.yaml index fadeb02edb..cac52823a4 100644 --- a/modules/openapi-generator/src/test/resources/3_0/javascript/petstore-with-fake-endpoints-models-for-testing.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/javascript/petstore-with-fake-endpoints-models-for-testing.yaml @@ -348,7 +348,7 @@ paths: summary: Find purchase order by ID description: >- For valid response try integer IDs with value <= 5 or > 10. Other values - will generated exceptions + will generate exceptions operationId: getOrderById parameters: - name: order_id @@ -837,7 +837,7 @@ paths: format: int64 responses: '400': - description: Someting wrong + description: Something wrong /fake/outer/number: post: tags: diff --git a/modules/openapi-generator/src/test/resources/3_0/kotlin/reserved_words.yaml b/modules/openapi-generator/src/test/resources/3_0/kotlin/reserved_words.yaml index d5074fd953..540607bb15 100644 --- a/modules/openapi-generator/src/test/resources/3_0/kotlin/reserved_words.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/kotlin/reserved_words.yaml @@ -214,7 +214,7 @@ components: $ref: '#/components/schemas/Linked' Linked: - description: Refernce links + description: Reference links type: object properties: as: diff --git a/modules/openapi-generator/src/test/resources/3_0/mapSchemas.yaml b/modules/openapi-generator/src/test/resources/3_0/mapSchemas.yaml index b57ee87455..61338df895 100644 --- a/modules/openapi-generator/src/test/resources/3_0/mapSchemas.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/mapSchemas.yaml @@ -27,7 +27,7 @@ components: properties: id: type: string - withAdditinalProperties: + withAdditionalProperties: $ref: '#/components/schemas/ModelWithAdditionalProperties' ModelWithAdditionalProperties: type: object diff --git a/modules/openapi-generator/src/test/resources/3_0/micronaut/roles-extension-test.yaml b/modules/openapi-generator/src/test/resources/3_0/micronaut/roles-extension-test.yaml index 1fa23eb9f6..8ec596652a 100644 --- a/modules/openapi-generator/src/test/resources/3_0/micronaut/roles-extension-test.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/micronaut/roles-extension-test.yaml @@ -8,7 +8,7 @@ info: url: 'https://www.apache.org/licenses/LICENSE-2.0.html' tags: - {name: books, description: Everything about books} - - {name: users, description: Everyting about users} + - {name: users, description: Everything about users} - {name: reviews, description: Everything related to book reviews} paths: /book/{bookName}: diff --git a/modules/openapi-generator/src/test/resources/3_0/oneof_polymorphism_and_inheritance.yaml b/modules/openapi-generator/src/test/resources/3_0/oneof_polymorphism_and_inheritance.yaml index dc916b1ee2..b3f6990de5 100644 --- a/modules/openapi-generator/src/test/resources/3_0/oneof_polymorphism_and_inheritance.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/oneof_polymorphism_and_inheritance.yaml @@ -60,7 +60,7 @@ components: id: type: string description: unique identifier - description: Base schema for adressable entities + description: Base schema for addressable entities Extensible: type: object properties: diff --git a/modules/openapi-generator/src/test/resources/3_0/petstore-with-complex-headers.yaml b/modules/openapi-generator/src/test/resources/3_0/petstore-with-complex-headers.yaml index daf9e82cf1..2b8d0a7f5f 100644 --- a/modules/openapi-generator/src/test/resources/3_0/petstore-with-complex-headers.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/petstore-with-complex-headers.yaml @@ -333,7 +333,7 @@ paths: summary: Find purchase order by ID description: >- For valid response try integer IDs with value <= 5 or > 10. Other values - will generated exceptions + will generate exceptions operationId: getOrderById parameters: - name: orderId diff --git a/modules/openapi-generator/src/test/resources/3_0/petstore-with-depreacted-fields.yaml b/modules/openapi-generator/src/test/resources/3_0/petstore-with-deprecated-fields.yaml similarity index 99% rename from modules/openapi-generator/src/test/resources/3_0/petstore-with-depreacted-fields.yaml rename to modules/openapi-generator/src/test/resources/3_0/petstore-with-deprecated-fields.yaml index b88deaac3e..0cc32cc1ad 100644 --- a/modules/openapi-generator/src/test/resources/3_0/petstore-with-depreacted-fields.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/petstore-with-deprecated-fields.yaml @@ -316,7 +316,7 @@ paths: summary: Find purchase order by ID description: >- For valid response try integer IDs with value <= 5 or > 10. Other values - will generated exceptions + will generate exceptions operationId: getOrderById parameters: - name: orderId diff --git a/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml b/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml index 31b34ae4e1..68c92decbc 100644 --- a/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml @@ -355,7 +355,7 @@ paths: summary: Find purchase order by ID description: >- For valid response try integer IDs with value <= 5 or > 10. Other values - will generated exceptions + will generate exceptions operationId: getOrderById parameters: - name: order_id @@ -838,7 +838,7 @@ paths: format: int64 responses: '400': - description: Someting wrong + description: Something wrong /fake/outer/number: post: tags: diff --git a/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml b/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml index 4ff8806122..2401e56127 100644 --- a/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml @@ -363,7 +363,7 @@ paths: summary: Find purchase order by ID description: >- For valid response try integer IDs with value <= 5 or > 10. Other values - will generated exceptions + will generate exceptions operationId: getOrderById parameters: - name: order_id @@ -852,7 +852,7 @@ paths: format: int64 responses: '400': - description: Someting wrong + description: Something wrong /fake/outer/number: post: tags: diff --git a/modules/openapi-generator/src/test/resources/3_0/petstore-with-nullable-required.yaml b/modules/openapi-generator/src/test/resources/3_0/petstore-with-nullable-required.yaml index e0471993d5..9196cafcaf 100644 --- a/modules/openapi-generator/src/test/resources/3_0/petstore-with-nullable-required.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/petstore-with-nullable-required.yaml @@ -316,7 +316,7 @@ paths: summary: Find purchase order by ID description: >- For valid response try integer IDs with value <= 5 or > 10. Other values - will generated exceptions + will generate exceptions operationId: getOrderById parameters: - name: orderId diff --git a/modules/openapi-generator/src/test/resources/3_0/petstore-with-object-as-parameter.yaml b/modules/openapi-generator/src/test/resources/3_0/petstore-with-object-as-parameter.yaml index 86e397c820..5020c07ced 100644 --- a/modules/openapi-generator/src/test/resources/3_0/petstore-with-object-as-parameter.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/petstore-with-object-as-parameter.yaml @@ -324,7 +324,7 @@ paths: summary: Find purchase order by ID description: >- For valid response try integer IDs with value <= 5 or > 10. Other values - will generated exceptions + will generate exceptions operationId: getOrderById parameters: - name: orderId diff --git a/modules/openapi-generator/src/test/resources/3_0/petstore.json b/modules/openapi-generator/src/test/resources/3_0/petstore.json index 1873cd6516..7d07119f53 100644 --- a/modules/openapi-generator/src/test/resources/3_0/petstore.json +++ b/modules/openapi-generator/src/test/resources/3_0/petstore.json @@ -497,7 +497,7 @@ "store" ], "summary": "Find purchase order by ID", - "description": "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + "description": "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", "operationId": "getOrderById", "parameters": [ { diff --git a/modules/openapi-generator/src/test/resources/3_0/petstore.yaml b/modules/openapi-generator/src/test/resources/3_0/petstore.yaml index 9184e9c806..0971c55441 100644 --- a/modules/openapi-generator/src/test/resources/3_0/petstore.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/petstore.yaml @@ -335,7 +335,7 @@ paths: summary: Find purchase order by ID description: >- For valid response try integer IDs with value <= 5 or > 10. Other values - will generated exceptions + will generate exceptions operationId: getOrderById parameters: - name: orderId diff --git a/modules/openapi-generator/src/test/resources/3_0/petstore_oas3_test.yaml b/modules/openapi-generator/src/test/resources/3_0/petstore_oas3_test.yaml index d57fd4e4f0..0b4c9927c3 100644 --- a/modules/openapi-generator/src/test/resources/3_0/petstore_oas3_test.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/petstore_oas3_test.yaml @@ -319,7 +319,7 @@ paths: summary: Find purchase order by ID description: >- For valid response try integer IDs with value <= 5 or > 10. Other values - will generated exceptions + will generate exceptions operationId: getOrderById parameters: - name: orderId diff --git a/modules/openapi-generator/src/test/resources/3_0/powershell/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml b/modules/openapi-generator/src/test/resources/3_0/powershell/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml index a2e2981e69..50056d0d05 100644 --- a/modules/openapi-generator/src/test/resources/3_0/powershell/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/powershell/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml @@ -338,7 +338,7 @@ paths: summary: Find purchase order by ID description: >- For valid response try integer IDs with value <= 5 or > 10. Other values - will generated exceptions + will generate exceptions operationId: getOrderById parameters: - name: order_id @@ -823,7 +823,7 @@ paths: format: int64 responses: '400': - description: Someting wrong + description: Something wrong /fake/outer/number: post: tags: diff --git a/modules/openapi-generator/src/test/resources/3_0/powershell/petstore.yaml b/modules/openapi-generator/src/test/resources/3_0/powershell/petstore.yaml index 025d072c76..8f1ab1c858 100644 --- a/modules/openapi-generator/src/test/resources/3_0/powershell/petstore.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/powershell/petstore.yaml @@ -356,7 +356,7 @@ paths: summary: Find purchase order by ID description: >- For valid response try integer IDs with value <= 5 or > 10. Other values - will generated exceptions + will generate exceptions operationId: getOrderById parameters: - name: orderId diff --git a/modules/openapi-generator/src/test/resources/3_0/protobuf/petstore.yaml b/modules/openapi-generator/src/test/resources/3_0/protobuf/petstore.yaml index 3db600f31e..67a1d25efb 100644 --- a/modules/openapi-generator/src/test/resources/3_0/protobuf/petstore.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/protobuf/petstore.yaml @@ -335,7 +335,7 @@ paths: summary: Find purchase order by ID description: >- For valid response try integer IDs with value <= 5 or > 10. Other values - will generated exceptions + will generate exceptions operationId: getOrderById parameters: - name: orderId diff --git a/modules/openapi-generator/src/test/resources/3_0/python-prior/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml b/modules/openapi-generator/src/test/resources/3_0/python-prior/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml index 8d040105b9..d6b0336a75 100644 --- a/modules/openapi-generator/src/test/resources/3_0/python-prior/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/python-prior/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml @@ -300,7 +300,7 @@ paths: summary: Find purchase order by ID description: >- For valid response try integer IDs with value <= 5 or > 10. Other values - will generated exceptions + will generate exceptions operationId: getOrderById parameters: - name: order_id @@ -787,7 +787,7 @@ paths: format: int64 responses: '400': - description: Someting wrong + description: Something wrong /fake/refs/number: post: tags: @@ -2290,7 +2290,7 @@ components: - $ref: '#/components/schemas/banana' fruitReq: description: a schema where additionalProperties is on in the composed schema and off in the oneOf object schemas - also, this schem accepts null as a value + also, this scheme accepts null as a value oneOf: - type: 'null' - $ref: '#/components/schemas/appleReq' diff --git a/modules/openapi-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml b/modules/openapi-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml index f6c3f327b1..e5b0be9633 100644 --- a/modules/openapi-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml @@ -338,7 +338,7 @@ paths: summary: Find purchase order by ID description: >- For valid response try integer IDs with value <= 5 or > 10. Other values - will generated exceptions + will generate exceptions operationId: getOrderById parameters: - name: order_id @@ -1130,7 +1130,7 @@ paths: put: tags: - fake - description: Ensures that original naming is used in endpoint params, that way we on't have collisions + description: Ensures that original naming is used in endpoint params, that way we won't have collisions operationId: CaseSensitiveParams parameters: - name: someVar @@ -1151,7 +1151,7 @@ paths: responses: "200": description: Success - /fake/test-query-paramters: + /fake/test-query-parameters: put: tags: - fake diff --git a/modules/openapi-generator/src/test/resources/3_0/r/petstore.yaml b/modules/openapi-generator/src/test/resources/3_0/r/petstore.yaml index 86ef683935..fcddaaa8d6 100644 --- a/modules/openapi-generator/src/test/resources/3_0/r/petstore.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/r/petstore.yaml @@ -398,7 +398,7 @@ paths: summary: Find purchase order by ID description: >- For valid response try integer IDs with value <= 5 or > 10. Other values - will generated exceptions + will generate exceptions operationId: getOrderById parameters: - name: orderId diff --git a/modules/openapi-generator/src/test/resources/3_0/response-tests.yaml b/modules/openapi-generator/src/test/resources/3_0/response-tests.yaml index e17881606d..768bd2f8e8 100644 --- a/modules/openapi-generator/src/test/resources/3_0/response-tests.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/response-tests.yaml @@ -300,7 +300,7 @@ paths: summary: Find purchase order by ID description: >- For valid response try integer IDs with value <= 5 or > 10. Other values - will generated exceptions + will generate exceptions operationId: getOrderById parameters: - name: orderId diff --git a/modules/openapi-generator/src/test/resources/3_0/rust-server/no-example-v3.yaml b/modules/openapi-generator/src/test/resources/3_0/rust-server/no-example-v3.yaml index 8c9e737c1e..cd9585a9db 100644 --- a/modules/openapi-generator/src/test/resources/3_0/rust-server/no-example-v3.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/rust-server/no-example-v3.yaml @@ -14,7 +14,7 @@ paths: schema: type: object properties: - propery: + property: type: string required: - property diff --git a/modules/openapi-generator/src/test/resources/3_0/rust/petstore.yaml b/modules/openapi-generator/src/test/resources/3_0/rust/petstore.yaml index 0c09dee941..e72f1e21e9 100644 --- a/modules/openapi-generator/src/test/resources/3_0/rust/petstore.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/rust/petstore.yaml @@ -335,7 +335,7 @@ paths: summary: Find purchase order by ID description: >- For valid response try integer IDs with value <= 5 or > 10. Other values - will generated exceptions + will generate exceptions operationId: getOrderById parameters: - name: orderId diff --git a/modules/openapi-generator/src/test/resources/3_0/scala-akka/petstore.yaml b/modules/openapi-generator/src/test/resources/3_0/scala-akka/petstore.yaml index 1b354403e9..261eafdaac 100644 --- a/modules/openapi-generator/src/test/resources/3_0/scala-akka/petstore.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/scala-akka/petstore.yaml @@ -336,7 +336,7 @@ paths: summary: Find purchase order by ID description: >- For valid response try integer IDs with value <= 5 or > 10. Other values - will generated exceptions + will generate exceptions operationId: getOrderById parameters: - name: orderId diff --git a/modules/openapi-generator/src/test/resources/3_0/scala/petstore.yaml b/modules/openapi-generator/src/test/resources/3_0/scala/petstore.yaml index 7087e8c5d3..2f62e97a37 100644 --- a/modules/openapi-generator/src/test/resources/3_0/scala/petstore.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/scala/petstore.yaml @@ -335,7 +335,7 @@ paths: summary: Find purchase order by ID description: >- For valid response try integer IDs with value <= 5 or > 10. Other values - will generated exceptions + will generate exceptions operationId: getOrderById parameters: - name: orderId diff --git a/modules/openapi-generator/src/test/resources/3_0/schema-unalias-test.yml b/modules/openapi-generator/src/test/resources/3_0/schema-unalias-test.yml index ea757d8f08..f802e34471 100644 --- a/modules/openapi-generator/src/test/resources/3_0/schema-unalias-test.yml +++ b/modules/openapi-generator/src/test/resources/3_0/schema-unalias-test.yml @@ -37,7 +37,7 @@ components: properties: visitDate: default: 1971-12-19T03:39:57-08:00 - description: Updated last vist timestamp + description: Updated last visit timestamp format: date-time type: string type: object diff --git a/modules/openapi-generator/src/test/resources/3_0/server-required.yaml b/modules/openapi-generator/src/test/resources/3_0/server-required.yaml index b6458d3da1..33dd9ce64b 100644 --- a/modules/openapi-generator/src/test/resources/3_0/server-required.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/server-required.yaml @@ -334,7 +334,7 @@ paths: summary: Find purchase order by ID description: >- For valid response try integer IDs with value <= 5 or > 10. Other values - will generated exceptions + will generate exceptions operationId: getOrderById parameters: - name: orderId diff --git a/modules/openapi-generator/src/test/resources/3_0/spring/date-time-parameter-types-for-testing.yml b/modules/openapi-generator/src/test/resources/3_0/spring/date-time-parameter-types-for-testing.yml index f3568d0c3e..535d152fc9 100644 --- a/modules/openapi-generator/src/test/resources/3_0/spring/date-time-parameter-types-for-testing.yml +++ b/modules/openapi-generator/src/test/resources/3_0/spring/date-time-parameter-types-for-testing.yml @@ -28,7 +28,7 @@ paths: type: object properties: visitDate: - description: Updated last vist timestamp + description: Updated last visit timestamp type: string default: '1971-12-19T03:39:57-08:00' format: date-time diff --git a/modules/openapi-generator/src/test/resources/3_0/unit_test_spec/3_0_3_unit_test_spec.yaml b/modules/openapi-generator/src/test/resources/3_0/unit_test_spec/3_0_3_unit_test_spec.yaml index 053751510f..8d4632ac97 100644 --- a/modules/openapi-generator/src/test/resources/3_0/unit_test_spec/3_0_3_unit_test_spec.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/unit_test_spec/3_0_3_unit_test_spec.yaml @@ -4659,7 +4659,7 @@ components: foo: [] bar: {} valid: false - DoesnTInvalidateOtherProperties: + DoesntInvalidateOtherProperties: description: doesn't invalidate other properties data: quux: [] diff --git a/modules/openapi-generator/src/test/resources/3_0/wsdl/petstore.yaml b/modules/openapi-generator/src/test/resources/3_0/wsdl/petstore.yaml index deb33e89a3..85482061ee 100644 --- a/modules/openapi-generator/src/test/resources/3_0/wsdl/petstore.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/wsdl/petstore.yaml @@ -353,7 +353,7 @@ paths: - store summary: Find purchase order by ID description: For valid response try integer IDs with value >= 1 and <= 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - name: orderId diff --git a/modules/openapi-generator/src/test/resources/3_1/petstore.yaml b/modules/openapi-generator/src/test/resources/3_1/petstore.yaml index 6e83b7fdc2..6c6de61d69 100644 --- a/modules/openapi-generator/src/test/resources/3_1/petstore.yaml +++ b/modules/openapi-generator/src/test/resources/3_1/petstore.yaml @@ -335,7 +335,7 @@ paths: summary: Find purchase order by ID description: >- For valid response try integer IDs with value <= 5 or > 10. Other values - will generated exceptions + will generate exceptions operationId: getOrderById parameters: - name: orderId diff --git a/modules/openapi-generator/src/test/resources/integrationtests/typescript/node-es5-expected/api.ts b/modules/openapi-generator/src/test/resources/integrationtests/typescript/node-es5-expected/api.ts index 76bf4cba40..b1217b6071 100644 --- a/modules/openapi-generator/src/test/resources/integrationtests/typescript/node-es5-expected/api.ts +++ b/modules/openapi-generator/src/test/resources/integrationtests/typescript/node-es5-expected/api.ts @@ -537,7 +537,7 @@ export class StoreApi { } /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched */ public getOrderById (orderId: string) : Promise<{ response: http.IncomingMessage; body: Order; }> { diff --git a/modules/openapi-generator/src/test/resources/integrationtests/typescript/node-es5-spec.json b/modules/openapi-generator/src/test/resources/integrationtests/typescript/node-es5-spec.json index 12fde32b76..56cc763e46 100644 --- a/modules/openapi-generator/src/test/resources/integrationtests/typescript/node-es5-spec.json +++ b/modules/openapi-generator/src/test/resources/integrationtests/typescript/node-es5-spec.json @@ -318,7 +318,7 @@ "store" ], "summary": "Find purchase order by ID", - "description": "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + "description": "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", "operationId": "getOrderById", "produces": [ "application/json", diff --git a/modules/openapi-generator/src/test/resources/integrationtests/typescript/petstore-expected/api/store.service.ts b/modules/openapi-generator/src/test/resources/integrationtests/typescript/petstore-expected/api/store.service.ts index 374f8f02e7..e6256586bf 100644 --- a/modules/openapi-generator/src/test/resources/integrationtests/typescript/petstore-expected/api/store.service.ts +++ b/modules/openapi-generator/src/test/resources/integrationtests/typescript/petstore-expected/api/store.service.ts @@ -213,7 +213,7 @@ export class StoreService { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. diff --git a/modules/openapi-generator/src/test/resources/integrationtests/typescript/petstore-spec.json b/modules/openapi-generator/src/test/resources/integrationtests/typescript/petstore-spec.json index 2120a1a2f4..2276e57c1f 100644 --- a/modules/openapi-generator/src/test/resources/integrationtests/typescript/petstore-spec.json +++ b/modules/openapi-generator/src/test/resources/integrationtests/typescript/petstore-spec.json @@ -486,7 +486,7 @@ "store" ], "summary": "Find purchase order by ID", - "description": "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + "description": "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", "operationId": "getOrderById", "produces": [ "application/xml", diff --git a/modules/openapi-generator/src/test/resources/petstore.json b/modules/openapi-generator/src/test/resources/petstore.json index 1af2d2ae3e..ad5523181b 100644 --- a/modules/openapi-generator/src/test/resources/petstore.json +++ b/modules/openapi-generator/src/test/resources/petstore.json @@ -471,7 +471,7 @@ "store" ], "summary": "Find purchase order by ID", - "description": "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + "description": "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", "operationId": "getOrderById", "produces": [ "application/json", diff --git a/samples/client/others/csharp-netcore-complex-files/src/Org.OpenAPITools/Client/RequestOptions.cs b/samples/client/others/csharp-netcore-complex-files/src/Org.OpenAPITools/Client/RequestOptions.cs index 7f440630dd..9b17590f12 100644 --- a/samples/client/others/csharp-netcore-complex-files/src/Org.OpenAPITools/Client/RequestOptions.cs +++ b/samples/client/others/csharp-netcore-complex-files/src/Org.OpenAPITools/Client/RequestOptions.cs @@ -33,7 +33,7 @@ namespace Org.OpenAPITools.Client public Multimap QueryParameters { get; set; } /// - /// Header parameters to be applied to to the request. + /// Header parameters to be applied to the request. /// Keys may have 1 or more values associated. /// public Multimap HeaderParameters { get; set; } diff --git a/samples/client/petstore/R-httr2-wrapper/.openapi-generator-ignore b/samples/client/petstore/R-httr2-wrapper/.openapi-generator-ignore index c5fa491b4c..deed424f8a 100644 --- a/samples/client/petstore/R-httr2-wrapper/.openapi-generator-ignore +++ b/samples/client/petstore/R-httr2-wrapper/.openapi-generator-ignore @@ -5,7 +5,7 @@ # The patterns follow closely to .gitignore or .dockerignore. # As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +# You can make changes and tell Swagger Codegen 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 (*): diff --git a/samples/client/petstore/R-httr2-wrapper/R/allof_tag_api_response.R b/samples/client/petstore/R-httr2-wrapper/R/allof_tag_api_response.R index 220d89ee50..7cfd85917e 100644 --- a/samples/client/petstore/R-httr2-wrapper/R/allof_tag_api_response.R +++ b/samples/client/petstore/R-httr2-wrapper/R/allof_tag_api_response.R @@ -37,7 +37,7 @@ AllofTagApiResponse <- R6::R6Class( #' @param code code #' @param type type #' @param message message - #' @param additional_properties additonal properties (optional) + #' @param additional_properties additional properties (optional) #' @param ... Other optional arguments. #' @export initialize = function(`id` = NULL, `name` = NULL, `code` = NULL, `type` = NULL, `message` = NULL, additional_properties = NULL, ...) { @@ -286,7 +286,7 @@ AllofTagApiResponse <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # AllofTagApiResponse$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # AllofTagApiResponse$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R-httr2-wrapper/R/animal.R b/samples/client/petstore/R-httr2-wrapper/R/animal.R index b506bced42..a1689f8394 100644 --- a/samples/client/petstore/R-httr2-wrapper/R/animal.R +++ b/samples/client/petstore/R-httr2-wrapper/R/animal.R @@ -30,7 +30,7 @@ Animal <- R6::R6Class( #' #' @param className className #' @param color color. Default to "red". - #' @param additional_properties additonal properties (optional) + #' @param additional_properties additional properties (optional) #' @param ... Other optional arguments. #' @export initialize = function(`className`, `color` = "red", additional_properties = NULL, ...) { @@ -231,7 +231,7 @@ Animal <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # Animal$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # Animal$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R-httr2-wrapper/R/any_of_pig.R b/samples/client/petstore/R-httr2-wrapper/R/any_of_pig.R index 64e859d560..34736dc7f3 100644 --- a/samples/client/petstore/R-httr2-wrapper/R/any_of_pig.R +++ b/samples/client/petstore/R-httr2-wrapper/R/any_of_pig.R @@ -174,7 +174,7 @@ AnyOfPig <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field #AnyOfPig$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function #AnyOfPig$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R-httr2-wrapper/R/any_of_primitive_type_test.R b/samples/client/petstore/R-httr2-wrapper/R/any_of_primitive_type_test.R index da1e53ce47..c34326a316 100644 --- a/samples/client/petstore/R-httr2-wrapper/R/any_of_primitive_type_test.R +++ b/samples/client/petstore/R-httr2-wrapper/R/any_of_primitive_type_test.R @@ -193,7 +193,7 @@ AnyOfPrimitiveTypeTest <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field #AnyOfPrimitiveTypeTest$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function #AnyOfPrimitiveTypeTest$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R-httr2-wrapper/R/api_client.R b/samples/client/petstore/R-httr2-wrapper/R/api_client.R index 3ca3cf9ce7..5ad09ce50e 100644 --- a/samples/client/petstore/R-httr2-wrapper/R/api_client.R +++ b/samples/client/petstore/R-httr2-wrapper/R/api_client.R @@ -163,7 +163,7 @@ ApiClient <- R6::R6Class( #' @param header_params The header parameters. #' @param form_params The form parameters. #' @param file_params The form parameters to upload files. - #' @param accepts The HTTP accpet headers. + #' @param accepts The HTTP accept headers. #' @param content_types The HTTP content-type headers. #' @param body The HTTP request body. #' @param is_oauth True if the endpoints required OAuth authentication. @@ -194,7 +194,7 @@ ApiClient <- R6::R6Class( #' @param header_params The header parameters. #' @param form_params The form parameters. #' @param file_params The form parameters for uploading files. - #' @param accepts The HTTP accpet headers. + #' @param accepts The HTTP accept headers. #' @param content_types The HTTP content-type headers. #' @param body The HTTP request body. #' @param is_oauth True if the endpoints required OAuth authentication. @@ -405,10 +405,10 @@ ApiClient <- R6::R6Class( } return_obj }, - #' Return a propery header (for accept or content-type). + #' Return a property header (for accept or content-type). #' #' @description - #' Return a propery header (for accept or content-type). If JSON-related MIME is found, + #' Return a property header (for accept or content-type). If JSON-related MIME is found, #' return it. Otherwise, return the first one, if any. #' #' @param headers A list of headers diff --git a/samples/client/petstore/R-httr2-wrapper/R/api_response.R b/samples/client/petstore/R-httr2-wrapper/R/api_response.R index 70431ae7e5..6cff851aed 100644 --- a/samples/client/petstore/R-httr2-wrapper/R/api_response.R +++ b/samples/client/petstore/R-httr2-wrapper/R/api_response.R @@ -12,7 +12,7 @@ #' @field content The deserialized response body. #' @field response The raw response from the endpoint. #' @field status_code The HTTP response status code. -#' @field status_code_desc The brief descriptoin of the HTTP response status code. +#' @field status_code_desc The brief description of the HTTP response status code. #' @field headers The HTTP response headers. #' @export ApiResponse <- R6::R6Class( diff --git a/samples/client/petstore/R-httr2-wrapper/R/basque_pig.R b/samples/client/petstore/R-httr2-wrapper/R/basque_pig.R index ac83042c8c..048bff78e7 100644 --- a/samples/client/petstore/R-httr2-wrapper/R/basque_pig.R +++ b/samples/client/petstore/R-httr2-wrapper/R/basque_pig.R @@ -28,7 +28,7 @@ BasquePig <- R6::R6Class( #' #' @param className className #' @param color color - #' @param additional_properties additonal properties (optional) + #' @param additional_properties additional properties (optional) #' @param ... Other optional arguments. #' @export initialize = function(`className`, `color`, additional_properties = NULL, ...) { @@ -247,7 +247,7 @@ BasquePig <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # BasquePig$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # BasquePig$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R-httr2-wrapper/R/cat.R b/samples/client/petstore/R-httr2-wrapper/R/cat.R index f74e2d887d..9198500c01 100644 --- a/samples/client/petstore/R-httr2-wrapper/R/cat.R +++ b/samples/client/petstore/R-httr2-wrapper/R/cat.R @@ -32,7 +32,7 @@ Cat <- R6::R6Class( #' @param className className #' @param color color. Default to "red". #' @param declawed declawed - #' @param additional_properties additonal properties (optional) + #' @param additional_properties additional properties (optional) #' @param ... Other optional arguments. #' @export initialize = function(`className`, `color` = "red", `declawed` = NULL, additional_properties = NULL, ...) { @@ -255,7 +255,7 @@ Cat <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # Cat$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # Cat$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R-httr2-wrapper/R/cat_all_of.R b/samples/client/petstore/R-httr2-wrapper/R/cat_all_of.R index 197e1a46e3..d25992a787 100644 --- a/samples/client/petstore/R-httr2-wrapper/R/cat_all_of.R +++ b/samples/client/petstore/R-httr2-wrapper/R/cat_all_of.R @@ -25,7 +25,7 @@ CatAllOf <- R6::R6Class( #' Initialize a new CatAllOf class. #' #' @param declawed declawed - #' @param additional_properties additonal properties (optional) + #' @param additional_properties additional properties (optional) #' @param ... Other optional arguments. #' @export initialize = function(`declawed` = NULL, additional_properties = NULL, ...) { @@ -186,7 +186,7 @@ CatAllOf <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # CatAllOf$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # CatAllOf$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R-httr2-wrapper/R/category.R b/samples/client/petstore/R-httr2-wrapper/R/category.R index 2646d01bd7..175b3cbb9a 100644 --- a/samples/client/petstore/R-httr2-wrapper/R/category.R +++ b/samples/client/petstore/R-httr2-wrapper/R/category.R @@ -28,7 +28,7 @@ Category <- R6::R6Class( #' #' @param id id #' @param name name - #' @param additional_properties additonal properties (optional) + #' @param additional_properties additional properties (optional) #' @param ... Other optional arguments. #' @export initialize = function(`id` = NULL, `name` = NULL, additional_properties = NULL, ...) { @@ -219,7 +219,7 @@ Category <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # Category$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # Category$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R-httr2-wrapper/R/danish_pig.R b/samples/client/petstore/R-httr2-wrapper/R/danish_pig.R index 06cf5096a8..627bd41316 100644 --- a/samples/client/petstore/R-httr2-wrapper/R/danish_pig.R +++ b/samples/client/petstore/R-httr2-wrapper/R/danish_pig.R @@ -28,7 +28,7 @@ DanishPig <- R6::R6Class( #' #' @param className className #' @param size size - #' @param additional_properties additonal properties (optional) + #' @param additional_properties additional properties (optional) #' @param ... Other optional arguments. #' @export initialize = function(`className`, `size`, additional_properties = NULL, ...) { @@ -247,7 +247,7 @@ DanishPig <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # DanishPig$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # DanishPig$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R-httr2-wrapper/R/date.R b/samples/client/petstore/R-httr2-wrapper/R/date.R index 79945bc8cf..3299b6658a 100644 --- a/samples/client/petstore/R-httr2-wrapper/R/date.R +++ b/samples/client/petstore/R-httr2-wrapper/R/date.R @@ -31,7 +31,7 @@ Date <- R6::R6Class( #' @param className className #' @param url_property url_property #' @param percent_description using \% in the description - #' @param additional_properties additonal properties (optional) + #' @param additional_properties additional properties (optional) #' @param ... Other optional arguments. #' @export initialize = function(`className`, `url_property`, `percent_description` = NULL, additional_properties = NULL, ...) { @@ -288,7 +288,7 @@ Date <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # Date$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # Date$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R-httr2-wrapper/R/dog.R b/samples/client/petstore/R-httr2-wrapper/R/dog.R index a814c57d58..068eec8eca 100644 --- a/samples/client/petstore/R-httr2-wrapper/R/dog.R +++ b/samples/client/petstore/R-httr2-wrapper/R/dog.R @@ -32,7 +32,7 @@ Dog <- R6::R6Class( #' @param className className #' @param color color. Default to "red". #' @param breed breed - #' @param additional_properties additonal properties (optional) + #' @param additional_properties additional properties (optional) #' @param ... Other optional arguments. #' @export initialize = function(`className`, `color` = "red", `breed` = NULL, additional_properties = NULL, ...) { @@ -255,7 +255,7 @@ Dog <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # Dog$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # Dog$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R-httr2-wrapper/R/dog_all_of.R b/samples/client/petstore/R-httr2-wrapper/R/dog_all_of.R index 17608478ee..d35a85abbb 100644 --- a/samples/client/petstore/R-httr2-wrapper/R/dog_all_of.R +++ b/samples/client/petstore/R-httr2-wrapper/R/dog_all_of.R @@ -25,7 +25,7 @@ DogAllOf <- R6::R6Class( #' Initialize a new DogAllOf class. #' #' @param breed breed - #' @param additional_properties additonal properties (optional) + #' @param additional_properties additional properties (optional) #' @param ... Other optional arguments. #' @export initialize = function(`breed` = NULL, additional_properties = NULL, ...) { @@ -186,7 +186,7 @@ DogAllOf <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # DogAllOf$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # DogAllOf$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R-httr2-wrapper/R/format_test.R b/samples/client/petstore/R-httr2-wrapper/R/format_test.R index 4bd74e3a72..85894ec7b1 100644 --- a/samples/client/petstore/R-httr2-wrapper/R/format_test.R +++ b/samples/client/petstore/R-httr2-wrapper/R/format_test.R @@ -67,7 +67,7 @@ FormatTest <- R6::R6Class( #' @param uuid uuid #' @param pattern_with_digits A string that is a 10 digit number. Can have leading zeros. #' @param pattern_with_digits_and_delimiter A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. - #' @param additional_properties additonal properties (optional) + #' @param additional_properties additional properties (optional) #' @param ... Other optional arguments. #' @export initialize = function(`number`, `byte`, `date`, `password`, `integer` = NULL, `int32` = NULL, `int64` = NULL, `float` = NULL, `double` = NULL, `string` = NULL, `binary` = NULL, `dateTime` = "2015-10-28T14:38:02Z", `uuid` = NULL, `pattern_with_digits` = NULL, `pattern_with_digits_and_delimiter` = NULL, additional_properties = NULL, ...) { @@ -701,7 +701,7 @@ FormatTest <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # FormatTest$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # FormatTest$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R-httr2-wrapper/R/mammal.R b/samples/client/petstore/R-httr2-wrapper/R/mammal.R index c9dd60c3e7..b96d79926c 100644 --- a/samples/client/petstore/R-httr2-wrapper/R/mammal.R +++ b/samples/client/petstore/R-httr2-wrapper/R/mammal.R @@ -217,7 +217,7 @@ Mammal <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field #Mammal$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function #Mammal$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R-httr2-wrapper/R/model_api_response.R b/samples/client/petstore/R-httr2-wrapper/R/model_api_response.R index b0e4bbba7e..028c66c723 100644 --- a/samples/client/petstore/R-httr2-wrapper/R/model_api_response.R +++ b/samples/client/petstore/R-httr2-wrapper/R/model_api_response.R @@ -31,7 +31,7 @@ ModelApiResponse <- R6::R6Class( #' @param code code #' @param type type #' @param message message - #' @param additional_properties additonal properties (optional) + #' @param additional_properties additional properties (optional) #' @param ... Other optional arguments. #' @export initialize = function(`code` = NULL, `type` = NULL, `message` = NULL, additional_properties = NULL, ...) { @@ -236,7 +236,7 @@ ModelApiResponse <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # ModelApiResponse$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # ModelApiResponse$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R-httr2-wrapper/R/nested_one_of.R b/samples/client/petstore/R-httr2-wrapper/R/nested_one_of.R index 73f4e938cb..d2a670b4ed 100644 --- a/samples/client/petstore/R-httr2-wrapper/R/nested_one_of.R +++ b/samples/client/petstore/R-httr2-wrapper/R/nested_one_of.R @@ -28,7 +28,7 @@ NestedOneOf <- R6::R6Class( #' #' @param size size #' @param nested_pig nested_pig - #' @param additional_properties additonal properties (optional) + #' @param additional_properties additional properties (optional) #' @param ... Other optional arguments. #' @export initialize = function(`size` = NULL, `nested_pig` = NULL, additional_properties = NULL, ...) { @@ -211,7 +211,7 @@ NestedOneOf <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # NestedOneOf$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # NestedOneOf$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R-httr2-wrapper/R/one_of_primitive_type_test.R b/samples/client/petstore/R-httr2-wrapper/R/one_of_primitive_type_test.R index ed13169f90..faf3f7850a 100644 --- a/samples/client/petstore/R-httr2-wrapper/R/one_of_primitive_type_test.R +++ b/samples/client/petstore/R-httr2-wrapper/R/one_of_primitive_type_test.R @@ -193,7 +193,7 @@ OneOfPrimitiveTypeTest <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field #OneOfPrimitiveTypeTest$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function #OneOfPrimitiveTypeTest$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R-httr2-wrapper/R/order.R b/samples/client/petstore/R-httr2-wrapper/R/order.R index 2664689626..08c080464e 100644 --- a/samples/client/petstore/R-httr2-wrapper/R/order.R +++ b/samples/client/petstore/R-httr2-wrapper/R/order.R @@ -40,7 +40,7 @@ Order <- R6::R6Class( #' @param shipDate shipDate #' @param status Order Status #' @param complete complete. Default to FALSE. - #' @param additional_properties additonal properties (optional) + #' @param additional_properties additional properties (optional) #' @param ... Other optional arguments. #' @export initialize = function(`id` = NULL, `petId` = NULL, `quantity` = NULL, `shipDate` = NULL, `status` = NULL, `complete` = FALSE, additional_properties = NULL, ...) { @@ -320,7 +320,7 @@ Order <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # Order$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # Order$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R-httr2-wrapper/R/pet.R b/samples/client/petstore/R-httr2-wrapper/R/pet.R index 8be5a05833..42db1ecb88 100644 --- a/samples/client/petstore/R-httr2-wrapper/R/pet.R +++ b/samples/client/petstore/R-httr2-wrapper/R/pet.R @@ -40,7 +40,7 @@ Pet <- R6::R6Class( #' @param category category #' @param tags tags #' @param status pet status in the store - #' @param additional_properties additonal properties (optional) + #' @param additional_properties additional properties (optional) #' @param ... Other optional arguments. #' @export initialize = function(`name`, `photoUrls`, `id` = NULL, `category` = NULL, `tags` = NULL, `status` = NULL, additional_properties = NULL, ...) { @@ -353,7 +353,7 @@ Pet <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # Pet$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # Pet$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R-httr2-wrapper/R/pig.R b/samples/client/petstore/R-httr2-wrapper/R/pig.R index f5d81b7939..a7139f4795 100644 --- a/samples/client/petstore/R-httr2-wrapper/R/pig.R +++ b/samples/client/petstore/R-httr2-wrapper/R/pig.R @@ -217,7 +217,7 @@ Pig <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field #Pig$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function #Pig$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R-httr2-wrapper/R/special.R b/samples/client/petstore/R-httr2-wrapper/R/special.R index 39664bea75..27a23809a0 100644 --- a/samples/client/petstore/R-httr2-wrapper/R/special.R +++ b/samples/client/petstore/R-httr2-wrapper/R/special.R @@ -43,7 +43,7 @@ Special <- R6::R6Class( #' @param 123_number 123_number #' @param array[test] array[test] #' @param empty_string empty_string - #' @param additional_properties additonal properties (optional) + #' @param additional_properties additional properties (optional) #' @param ... Other optional arguments. #' @export initialize = function(`set_test` = NULL, `item_self` = NULL, `item_private` = NULL, `item_super` = NULL, `123_number` = NULL, `array[test]` = NULL, `empty_string` = NULL, additional_properties = NULL, ...) { @@ -346,7 +346,7 @@ Special <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # Special$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # Special$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R-httr2-wrapper/R/store_api.R b/samples/client/petstore/R-httr2-wrapper/R/store_api.R index 129e5d06d2..d5238552ac 100644 --- a/samples/client/petstore/R-httr2-wrapper/R/store_api.R +++ b/samples/client/petstore/R-httr2-wrapper/R/store_api.R @@ -54,7 +54,7 @@ #' } #' #' \strong{ get_order_by_id } \emph{ Find purchase order by ID } -#' For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +#' For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions #' #' \itemize{ #' \item \emph{ @param } order_id integer diff --git a/samples/client/petstore/R-httr2-wrapper/R/tag.R b/samples/client/petstore/R-httr2-wrapper/R/tag.R index be068d1474..52079beeb0 100644 --- a/samples/client/petstore/R-httr2-wrapper/R/tag.R +++ b/samples/client/petstore/R-httr2-wrapper/R/tag.R @@ -28,7 +28,7 @@ Tag <- R6::R6Class( #' #' @param id id #' @param name name - #' @param additional_properties additonal properties (optional) + #' @param additional_properties additional properties (optional) #' @param ... Other optional arguments. #' @export initialize = function(`id` = NULL, `name` = NULL, additional_properties = NULL, ...) { @@ -211,7 +211,7 @@ Tag <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # Tag$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # Tag$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R-httr2-wrapper/R/update_pet_request.R b/samples/client/petstore/R-httr2-wrapper/R/update_pet_request.R index bde06df6a8..2fc96ab4ff 100644 --- a/samples/client/petstore/R-httr2-wrapper/R/update_pet_request.R +++ b/samples/client/petstore/R-httr2-wrapper/R/update_pet_request.R @@ -28,7 +28,7 @@ UpdatePetRequest <- R6::R6Class( #' #' @param jsonData jsonData #' @param binaryDataN2Information binaryDataN2Information - #' @param additional_properties additonal properties (optional) + #' @param additional_properties additional properties (optional) #' @param ... Other optional arguments. #' @export initialize = function(`jsonData` = NULL, `binaryDataN2Information` = NULL, additional_properties = NULL, ...) { @@ -208,7 +208,7 @@ UpdatePetRequest <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # UpdatePetRequest$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # UpdatePetRequest$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R-httr2-wrapper/R/user.R b/samples/client/petstore/R-httr2-wrapper/R/user.R index 43b51ffa41..533469b642 100644 --- a/samples/client/petstore/R-httr2-wrapper/R/user.R +++ b/samples/client/petstore/R-httr2-wrapper/R/user.R @@ -46,7 +46,7 @@ User <- R6::R6Class( #' @param password password #' @param phone phone #' @param userStatus User Status - #' @param additional_properties additonal properties (optional) + #' @param additional_properties additional properties (optional) #' @param ... Other optional arguments. #' @export initialize = function(`id` = NULL, `username` = NULL, `firstName` = NULL, `lastName` = NULL, `email` = NULL, `password` = NULL, `phone` = NULL, `userStatus` = NULL, additional_properties = NULL, ...) { @@ -361,7 +361,7 @@ User <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # User$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # User$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R-httr2-wrapper/R/whale.R b/samples/client/petstore/R-httr2-wrapper/R/whale.R index dc70b1dd33..3305ab6ce6 100644 --- a/samples/client/petstore/R-httr2-wrapper/R/whale.R +++ b/samples/client/petstore/R-httr2-wrapper/R/whale.R @@ -31,7 +31,7 @@ Whale <- R6::R6Class( #' @param className className #' @param hasBaleen hasBaleen #' @param hasTeeth hasTeeth - #' @param additional_properties additonal properties (optional) + #' @param additional_properties additional properties (optional) #' @param ... Other optional arguments. #' @export initialize = function(`className`, `hasBaleen` = NULL, `hasTeeth` = NULL, additional_properties = NULL, ...) { @@ -254,7 +254,7 @@ Whale <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # Whale$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # Whale$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R-httr2-wrapper/R/zebra.R b/samples/client/petstore/R-httr2-wrapper/R/zebra.R index c8d06d23d6..122e76d20e 100644 --- a/samples/client/petstore/R-httr2-wrapper/R/zebra.R +++ b/samples/client/petstore/R-httr2-wrapper/R/zebra.R @@ -28,7 +28,7 @@ Zebra <- R6::R6Class( #' #' @param className className #' @param type type - #' @param additional_properties additonal properties (optional) + #' @param additional_properties additional properties (optional) #' @param ... Other optional arguments. #' @export initialize = function(`className`, `type` = NULL, additional_properties = NULL, ...) { @@ -238,7 +238,7 @@ Zebra <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # Zebra$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # Zebra$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R-httr2-wrapper/docs/StoreApi.md b/samples/client/petstore/R-httr2-wrapper/docs/StoreApi.md index 91cfa8e765..9818d6e3f0 100644 --- a/samples/client/petstore/R-httr2-wrapper/docs/StoreApi.md +++ b/samples/client/petstore/R-httr2-wrapper/docs/StoreApi.md @@ -129,7 +129,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```R diff --git a/samples/client/petstore/R-httr2-wrapper/tests/testthat/test_petstore.R b/samples/client/petstore/R-httr2-wrapper/tests/testthat/test_petstore.R index df15619de1..917d3fb00e 100644 --- a/samples/client/petstore/R-httr2-wrapper/tests/testthat/test_petstore.R +++ b/samples/client/petstore/R-httr2-wrapper/tests/testthat/test_petstore.R @@ -524,7 +524,7 @@ test_that("Tests oneOf", { # class name test expect_equal(get(class(basque_pig$actual_instance)[[1]], pos = -1)$classname, "BasquePig") - # test contructors + # test constructors pig2 <- Pig$new(instance = basque_pig$actual_instance) expect_equal(pig2$actual_type, "BasquePig") expect_equal(pig2$actual_instance$color, "red") diff --git a/samples/client/petstore/R-httr2-wrapper/tests/testthat/test_store_api.R b/samples/client/petstore/R-httr2-wrapper/tests/testthat/test_store_api.R index 1ebb3f82a6..3ce6f412c9 100644 --- a/samples/client/petstore/R-httr2-wrapper/tests/testthat/test_store_api.R +++ b/samples/client/petstore/R-httr2-wrapper/tests/testthat/test_store_api.R @@ -32,7 +32,7 @@ test_that("GetOrderById", { # tests for GetOrderById # base path: http://petstore.swagger.io/v2 # Find purchase order by ID - # For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + # For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions # @param order.id integer ID of pet that needs to be fetched # @return [Order] diff --git a/samples/client/petstore/R-httr2/.openapi-generator-ignore b/samples/client/petstore/R-httr2/.openapi-generator-ignore index c5fa491b4c..deed424f8a 100644 --- a/samples/client/petstore/R-httr2/.openapi-generator-ignore +++ b/samples/client/petstore/R-httr2/.openapi-generator-ignore @@ -5,7 +5,7 @@ # The patterns follow closely to .gitignore or .dockerignore. # As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +# You can make changes and tell Swagger Codegen 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 (*): diff --git a/samples/client/petstore/R-httr2/R/allof_tag_api_response.R b/samples/client/petstore/R-httr2/R/allof_tag_api_response.R index c4134b53e6..98a3cd8fd6 100644 --- a/samples/client/petstore/R-httr2/R/allof_tag_api_response.R +++ b/samples/client/petstore/R-httr2/R/allof_tag_api_response.R @@ -253,7 +253,7 @@ AllofTagApiResponse <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # AllofTagApiResponse$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # AllofTagApiResponse$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R-httr2/R/animal.R b/samples/client/petstore/R-httr2/R/animal.R index 6b4d78ff5e..3c62c6687e 100644 --- a/samples/client/petstore/R-httr2/R/animal.R +++ b/samples/client/petstore/R-httr2/R/animal.R @@ -198,7 +198,7 @@ Animal <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # Animal$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # Animal$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R-httr2/R/any_of_pig.R b/samples/client/petstore/R-httr2/R/any_of_pig.R index 64e859d560..34736dc7f3 100644 --- a/samples/client/petstore/R-httr2/R/any_of_pig.R +++ b/samples/client/petstore/R-httr2/R/any_of_pig.R @@ -174,7 +174,7 @@ AnyOfPig <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field #AnyOfPig$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function #AnyOfPig$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R-httr2/R/any_of_primitive_type_test.R b/samples/client/petstore/R-httr2/R/any_of_primitive_type_test.R index da1e53ce47..c34326a316 100644 --- a/samples/client/petstore/R-httr2/R/any_of_primitive_type_test.R +++ b/samples/client/petstore/R-httr2/R/any_of_primitive_type_test.R @@ -193,7 +193,7 @@ AnyOfPrimitiveTypeTest <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field #AnyOfPrimitiveTypeTest$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function #AnyOfPrimitiveTypeTest$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R-httr2/R/api_client.R b/samples/client/petstore/R-httr2/R/api_client.R index 3ca3cf9ce7..5ad09ce50e 100644 --- a/samples/client/petstore/R-httr2/R/api_client.R +++ b/samples/client/petstore/R-httr2/R/api_client.R @@ -163,7 +163,7 @@ ApiClient <- R6::R6Class( #' @param header_params The header parameters. #' @param form_params The form parameters. #' @param file_params The form parameters to upload files. - #' @param accepts The HTTP accpet headers. + #' @param accepts The HTTP accept headers. #' @param content_types The HTTP content-type headers. #' @param body The HTTP request body. #' @param is_oauth True if the endpoints required OAuth authentication. @@ -194,7 +194,7 @@ ApiClient <- R6::R6Class( #' @param header_params The header parameters. #' @param form_params The form parameters. #' @param file_params The form parameters for uploading files. - #' @param accepts The HTTP accpet headers. + #' @param accepts The HTTP accept headers. #' @param content_types The HTTP content-type headers. #' @param body The HTTP request body. #' @param is_oauth True if the endpoints required OAuth authentication. @@ -405,10 +405,10 @@ ApiClient <- R6::R6Class( } return_obj }, - #' Return a propery header (for accept or content-type). + #' Return a property header (for accept or content-type). #' #' @description - #' Return a propery header (for accept or content-type). If JSON-related MIME is found, + #' Return a property header (for accept or content-type). If JSON-related MIME is found, #' return it. Otherwise, return the first one, if any. #' #' @param headers A list of headers diff --git a/samples/client/petstore/R-httr2/R/api_response.R b/samples/client/petstore/R-httr2/R/api_response.R index 70431ae7e5..6cff851aed 100644 --- a/samples/client/petstore/R-httr2/R/api_response.R +++ b/samples/client/petstore/R-httr2/R/api_response.R @@ -12,7 +12,7 @@ #' @field content The deserialized response body. #' @field response The raw response from the endpoint. #' @field status_code The HTTP response status code. -#' @field status_code_desc The brief descriptoin of the HTTP response status code. +#' @field status_code_desc The brief description of the HTTP response status code. #' @field headers The HTTP response headers. #' @export ApiResponse <- R6::R6Class( diff --git a/samples/client/petstore/R-httr2/R/basque_pig.R b/samples/client/petstore/R-httr2/R/basque_pig.R index 28a10e6ddc..53756e06c4 100644 --- a/samples/client/petstore/R-httr2/R/basque_pig.R +++ b/samples/client/petstore/R-httr2/R/basque_pig.R @@ -214,7 +214,7 @@ BasquePig <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # BasquePig$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # BasquePig$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R-httr2/R/cat.R b/samples/client/petstore/R-httr2/R/cat.R index eaba966de5..861a3b174a 100644 --- a/samples/client/petstore/R-httr2/R/cat.R +++ b/samples/client/petstore/R-httr2/R/cat.R @@ -222,7 +222,7 @@ Cat <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # Cat$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # Cat$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R-httr2/R/cat_all_of.R b/samples/client/petstore/R-httr2/R/cat_all_of.R index d2889ac499..6ce939b452 100644 --- a/samples/client/petstore/R-httr2/R/cat_all_of.R +++ b/samples/client/petstore/R-httr2/R/cat_all_of.R @@ -153,7 +153,7 @@ CatAllOf <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # CatAllOf$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # CatAllOf$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R-httr2/R/category.R b/samples/client/petstore/R-httr2/R/category.R index 82c5622860..67c8059bc8 100644 --- a/samples/client/petstore/R-httr2/R/category.R +++ b/samples/client/petstore/R-httr2/R/category.R @@ -186,7 +186,7 @@ Category <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # Category$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # Category$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R-httr2/R/danish_pig.R b/samples/client/petstore/R-httr2/R/danish_pig.R index aea435d0fb..84e4b50ea8 100644 --- a/samples/client/petstore/R-httr2/R/danish_pig.R +++ b/samples/client/petstore/R-httr2/R/danish_pig.R @@ -214,7 +214,7 @@ DanishPig <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # DanishPig$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # DanishPig$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R-httr2/R/date.R b/samples/client/petstore/R-httr2/R/date.R index a188cad8fc..482bb1ef03 100644 --- a/samples/client/petstore/R-httr2/R/date.R +++ b/samples/client/petstore/R-httr2/R/date.R @@ -255,7 +255,7 @@ Date <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # Date$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # Date$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R-httr2/R/dog.R b/samples/client/petstore/R-httr2/R/dog.R index 9585ef81a5..9916c7bb2e 100644 --- a/samples/client/petstore/R-httr2/R/dog.R +++ b/samples/client/petstore/R-httr2/R/dog.R @@ -222,7 +222,7 @@ Dog <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # Dog$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # Dog$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R-httr2/R/dog_all_of.R b/samples/client/petstore/R-httr2/R/dog_all_of.R index c9ad553122..42f587493a 100644 --- a/samples/client/petstore/R-httr2/R/dog_all_of.R +++ b/samples/client/petstore/R-httr2/R/dog_all_of.R @@ -153,7 +153,7 @@ DogAllOf <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # DogAllOf$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # DogAllOf$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R-httr2/R/format_test.R b/samples/client/petstore/R-httr2/R/format_test.R index 8361a769f0..e07519373d 100644 --- a/samples/client/petstore/R-httr2/R/format_test.R +++ b/samples/client/petstore/R-httr2/R/format_test.R @@ -668,7 +668,7 @@ FormatTest <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # FormatTest$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # FormatTest$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R-httr2/R/mammal.R b/samples/client/petstore/R-httr2/R/mammal.R index 9864432e8f..a5af6d76d6 100644 --- a/samples/client/petstore/R-httr2/R/mammal.R +++ b/samples/client/petstore/R-httr2/R/mammal.R @@ -191,7 +191,7 @@ Mammal <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field #Mammal$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function #Mammal$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R-httr2/R/model_api_response.R b/samples/client/petstore/R-httr2/R/model_api_response.R index 0fd0c71e99..de62918e89 100644 --- a/samples/client/petstore/R-httr2/R/model_api_response.R +++ b/samples/client/petstore/R-httr2/R/model_api_response.R @@ -203,7 +203,7 @@ ModelApiResponse <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # ModelApiResponse$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # ModelApiResponse$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R-httr2/R/nested_one_of.R b/samples/client/petstore/R-httr2/R/nested_one_of.R index beef5124f9..a2c5fc4b83 100644 --- a/samples/client/petstore/R-httr2/R/nested_one_of.R +++ b/samples/client/petstore/R-httr2/R/nested_one_of.R @@ -178,7 +178,7 @@ NestedOneOf <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # NestedOneOf$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # NestedOneOf$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R-httr2/R/one_of_primitive_type_test.R b/samples/client/petstore/R-httr2/R/one_of_primitive_type_test.R index ed13169f90..faf3f7850a 100644 --- a/samples/client/petstore/R-httr2/R/one_of_primitive_type_test.R +++ b/samples/client/petstore/R-httr2/R/one_of_primitive_type_test.R @@ -193,7 +193,7 @@ OneOfPrimitiveTypeTest <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field #OneOfPrimitiveTypeTest$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function #OneOfPrimitiveTypeTest$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R-httr2/R/order.R b/samples/client/petstore/R-httr2/R/order.R index b5604d9990..38975d63ee 100644 --- a/samples/client/petstore/R-httr2/R/order.R +++ b/samples/client/petstore/R-httr2/R/order.R @@ -287,7 +287,7 @@ Order <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # Order$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # Order$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R-httr2/R/pet.R b/samples/client/petstore/R-httr2/R/pet.R index be5b2767ef..7070dc689e 100644 --- a/samples/client/petstore/R-httr2/R/pet.R +++ b/samples/client/petstore/R-httr2/R/pet.R @@ -320,7 +320,7 @@ Pet <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # Pet$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # Pet$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R-httr2/R/pig.R b/samples/client/petstore/R-httr2/R/pig.R index 570346408f..d497bc2803 100644 --- a/samples/client/petstore/R-httr2/R/pig.R +++ b/samples/client/petstore/R-httr2/R/pig.R @@ -191,7 +191,7 @@ Pig <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field #Pig$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function #Pig$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R-httr2/R/special.R b/samples/client/petstore/R-httr2/R/special.R index e2089142e9..34119a5ce5 100644 --- a/samples/client/petstore/R-httr2/R/special.R +++ b/samples/client/petstore/R-httr2/R/special.R @@ -313,7 +313,7 @@ Special <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # Special$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # Special$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R-httr2/R/store_api.R b/samples/client/petstore/R-httr2/R/store_api.R index b5941c11d8..60b60fa060 100644 --- a/samples/client/petstore/R-httr2/R/store_api.R +++ b/samples/client/petstore/R-httr2/R/store_api.R @@ -54,7 +54,7 @@ #' } #' #' \strong{ get_order_by_id } \emph{ Find purchase order by ID } -#' For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +#' For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions #' #' \itemize{ #' \item \emph{ @param } order_id integer diff --git a/samples/client/petstore/R-httr2/R/tag.R b/samples/client/petstore/R-httr2/R/tag.R index 51603e72ab..97c9906129 100644 --- a/samples/client/petstore/R-httr2/R/tag.R +++ b/samples/client/petstore/R-httr2/R/tag.R @@ -178,7 +178,7 @@ Tag <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # Tag$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # Tag$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R-httr2/R/update_pet_request.R b/samples/client/petstore/R-httr2/R/update_pet_request.R index 1d37555f4b..a2da076f8d 100644 --- a/samples/client/petstore/R-httr2/R/update_pet_request.R +++ b/samples/client/petstore/R-httr2/R/update_pet_request.R @@ -175,7 +175,7 @@ UpdatePetRequest <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # UpdatePetRequest$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # UpdatePetRequest$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R-httr2/R/user.R b/samples/client/petstore/R-httr2/R/user.R index 78896afef3..d37c45f4fa 100644 --- a/samples/client/petstore/R-httr2/R/user.R +++ b/samples/client/petstore/R-httr2/R/user.R @@ -328,7 +328,7 @@ User <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # User$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # User$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R-httr2/R/whale.R b/samples/client/petstore/R-httr2/R/whale.R index 084df84385..1ccb12a0bc 100644 --- a/samples/client/petstore/R-httr2/R/whale.R +++ b/samples/client/petstore/R-httr2/R/whale.R @@ -221,7 +221,7 @@ Whale <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # Whale$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # Whale$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R-httr2/R/zebra.R b/samples/client/petstore/R-httr2/R/zebra.R index 0a1aa587e1..09f0e554d6 100644 --- a/samples/client/petstore/R-httr2/R/zebra.R +++ b/samples/client/petstore/R-httr2/R/zebra.R @@ -205,7 +205,7 @@ Zebra <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # Zebra$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # Zebra$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R-httr2/docs/StoreApi.md b/samples/client/petstore/R-httr2/docs/StoreApi.md index c0453bb361..e34a7edd78 100644 --- a/samples/client/petstore/R-httr2/docs/StoreApi.md +++ b/samples/client/petstore/R-httr2/docs/StoreApi.md @@ -129,7 +129,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```R diff --git a/samples/client/petstore/R-httr2/man/StoreApi.Rd b/samples/client/petstore/R-httr2/man/StoreApi.Rd index 2423e1819e..1ed70bec69 100644 --- a/samples/client/petstore/R-httr2/man/StoreApi.Rd +++ b/samples/client/petstore/R-httr2/man/StoreApi.Rd @@ -62,7 +62,7 @@ Returns a map of status codes to quantities } \strong{ GetOrderById } \emph{ Find purchase order by ID } -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions \itemize{ \item \emph{ @param } order_id integer diff --git a/samples/client/petstore/R-httr2/tests/testthat/test_petstore.R b/samples/client/petstore/R-httr2/tests/testthat/test_petstore.R index 9e220b9af6..b612714b81 100644 --- a/samples/client/petstore/R-httr2/tests/testthat/test_petstore.R +++ b/samples/client/petstore/R-httr2/tests/testthat/test_petstore.R @@ -331,7 +331,7 @@ test_that("Tests oneOf", { # class name test expect_equal(get(class(basque_pig$actual_instance)[[1]], pos = -1)$classname, "BasquePig") - # test contructors + # test constructors pig2 <- Pig$new(instance = basque_pig$actual_instance) expect_equal(pig2$actual_type, "BasquePig") expect_equal(pig2$actual_instance$color, "red") diff --git a/samples/client/petstore/R-httr2/tests/testthat/test_store_api.R b/samples/client/petstore/R-httr2/tests/testthat/test_store_api.R index 1ebb3f82a6..3ce6f412c9 100644 --- a/samples/client/petstore/R-httr2/tests/testthat/test_store_api.R +++ b/samples/client/petstore/R-httr2/tests/testthat/test_store_api.R @@ -32,7 +32,7 @@ test_that("GetOrderById", { # tests for GetOrderById # base path: http://petstore.swagger.io/v2 # Find purchase order by ID - # For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + # For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions # @param order.id integer ID of pet that needs to be fetched # @return [Order] diff --git a/samples/client/petstore/R/.openapi-generator-ignore b/samples/client/petstore/R/.openapi-generator-ignore index c5fa491b4c..deed424f8a 100644 --- a/samples/client/petstore/R/.openapi-generator-ignore +++ b/samples/client/petstore/R/.openapi-generator-ignore @@ -5,7 +5,7 @@ # The patterns follow closely to .gitignore or .dockerignore. # As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +# You can make changes and tell Swagger Codegen 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 (*): diff --git a/samples/client/petstore/R/R/allof_tag_api_response.R b/samples/client/petstore/R/R/allof_tag_api_response.R index 220d89ee50..7cfd85917e 100644 --- a/samples/client/petstore/R/R/allof_tag_api_response.R +++ b/samples/client/petstore/R/R/allof_tag_api_response.R @@ -37,7 +37,7 @@ AllofTagApiResponse <- R6::R6Class( #' @param code code #' @param type type #' @param message message - #' @param additional_properties additonal properties (optional) + #' @param additional_properties additional properties (optional) #' @param ... Other optional arguments. #' @export initialize = function(`id` = NULL, `name` = NULL, `code` = NULL, `type` = NULL, `message` = NULL, additional_properties = NULL, ...) { @@ -286,7 +286,7 @@ AllofTagApiResponse <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # AllofTagApiResponse$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # AllofTagApiResponse$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R/R/animal.R b/samples/client/petstore/R/R/animal.R index b506bced42..a1689f8394 100644 --- a/samples/client/petstore/R/R/animal.R +++ b/samples/client/petstore/R/R/animal.R @@ -30,7 +30,7 @@ Animal <- R6::R6Class( #' #' @param className className #' @param color color. Default to "red". - #' @param additional_properties additonal properties (optional) + #' @param additional_properties additional properties (optional) #' @param ... Other optional arguments. #' @export initialize = function(`className`, `color` = "red", additional_properties = NULL, ...) { @@ -231,7 +231,7 @@ Animal <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # Animal$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # Animal$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R/R/any_of_pig.R b/samples/client/petstore/R/R/any_of_pig.R index 64e859d560..34736dc7f3 100644 --- a/samples/client/petstore/R/R/any_of_pig.R +++ b/samples/client/petstore/R/R/any_of_pig.R @@ -174,7 +174,7 @@ AnyOfPig <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field #AnyOfPig$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function #AnyOfPig$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R/R/any_of_primitive_type_test.R b/samples/client/petstore/R/R/any_of_primitive_type_test.R index da1e53ce47..c34326a316 100644 --- a/samples/client/petstore/R/R/any_of_primitive_type_test.R +++ b/samples/client/petstore/R/R/any_of_primitive_type_test.R @@ -193,7 +193,7 @@ AnyOfPrimitiveTypeTest <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field #AnyOfPrimitiveTypeTest$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function #AnyOfPrimitiveTypeTest$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R/R/api_client.R b/samples/client/petstore/R/R/api_client.R index cd0958b02d..6fe5c3488f 100644 --- a/samples/client/petstore/R/R/api_client.R +++ b/samples/client/petstore/R/R/api_client.R @@ -392,10 +392,10 @@ ApiClient <- R6::R6Class( } return_obj }, - #' Return a propery header (for accept or content-type). + #' Return a property header (for accept or content-type). #' #' @description - #' Return a propery header (for accept or content-type). If JSON-related MIME is found, + #' Return a property header (for accept or content-type). If JSON-related MIME is found, #' return it. Otherwise, return the first one, if any. #' #' @param headers A list of headers diff --git a/samples/client/petstore/R/R/api_response.R b/samples/client/petstore/R/R/api_response.R index 70431ae7e5..6cff851aed 100644 --- a/samples/client/petstore/R/R/api_response.R +++ b/samples/client/petstore/R/R/api_response.R @@ -12,7 +12,7 @@ #' @field content The deserialized response body. #' @field response The raw response from the endpoint. #' @field status_code The HTTP response status code. -#' @field status_code_desc The brief descriptoin of the HTTP response status code. +#' @field status_code_desc The brief description of the HTTP response status code. #' @field headers The HTTP response headers. #' @export ApiResponse <- R6::R6Class( diff --git a/samples/client/petstore/R/R/basque_pig.R b/samples/client/petstore/R/R/basque_pig.R index ac83042c8c..048bff78e7 100644 --- a/samples/client/petstore/R/R/basque_pig.R +++ b/samples/client/petstore/R/R/basque_pig.R @@ -28,7 +28,7 @@ BasquePig <- R6::R6Class( #' #' @param className className #' @param color color - #' @param additional_properties additonal properties (optional) + #' @param additional_properties additional properties (optional) #' @param ... Other optional arguments. #' @export initialize = function(`className`, `color`, additional_properties = NULL, ...) { @@ -247,7 +247,7 @@ BasquePig <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # BasquePig$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # BasquePig$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R/R/cat.R b/samples/client/petstore/R/R/cat.R index f74e2d887d..9198500c01 100644 --- a/samples/client/petstore/R/R/cat.R +++ b/samples/client/petstore/R/R/cat.R @@ -32,7 +32,7 @@ Cat <- R6::R6Class( #' @param className className #' @param color color. Default to "red". #' @param declawed declawed - #' @param additional_properties additonal properties (optional) + #' @param additional_properties additional properties (optional) #' @param ... Other optional arguments. #' @export initialize = function(`className`, `color` = "red", `declawed` = NULL, additional_properties = NULL, ...) { @@ -255,7 +255,7 @@ Cat <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # Cat$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # Cat$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R/R/cat_all_of.R b/samples/client/petstore/R/R/cat_all_of.R index 197e1a46e3..d25992a787 100644 --- a/samples/client/petstore/R/R/cat_all_of.R +++ b/samples/client/petstore/R/R/cat_all_of.R @@ -25,7 +25,7 @@ CatAllOf <- R6::R6Class( #' Initialize a new CatAllOf class. #' #' @param declawed declawed - #' @param additional_properties additonal properties (optional) + #' @param additional_properties additional properties (optional) #' @param ... Other optional arguments. #' @export initialize = function(`declawed` = NULL, additional_properties = NULL, ...) { @@ -186,7 +186,7 @@ CatAllOf <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # CatAllOf$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # CatAllOf$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R/R/category.R b/samples/client/petstore/R/R/category.R index 2646d01bd7..175b3cbb9a 100644 --- a/samples/client/petstore/R/R/category.R +++ b/samples/client/petstore/R/R/category.R @@ -28,7 +28,7 @@ Category <- R6::R6Class( #' #' @param id id #' @param name name - #' @param additional_properties additonal properties (optional) + #' @param additional_properties additional properties (optional) #' @param ... Other optional arguments. #' @export initialize = function(`id` = NULL, `name` = NULL, additional_properties = NULL, ...) { @@ -219,7 +219,7 @@ Category <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # Category$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # Category$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R/R/danish_pig.R b/samples/client/petstore/R/R/danish_pig.R index 06cf5096a8..627bd41316 100644 --- a/samples/client/petstore/R/R/danish_pig.R +++ b/samples/client/petstore/R/R/danish_pig.R @@ -28,7 +28,7 @@ DanishPig <- R6::R6Class( #' #' @param className className #' @param size size - #' @param additional_properties additonal properties (optional) + #' @param additional_properties additional properties (optional) #' @param ... Other optional arguments. #' @export initialize = function(`className`, `size`, additional_properties = NULL, ...) { @@ -247,7 +247,7 @@ DanishPig <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # DanishPig$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # DanishPig$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R/R/date.R b/samples/client/petstore/R/R/date.R index 79945bc8cf..3299b6658a 100644 --- a/samples/client/petstore/R/R/date.R +++ b/samples/client/petstore/R/R/date.R @@ -31,7 +31,7 @@ Date <- R6::R6Class( #' @param className className #' @param url_property url_property #' @param percent_description using \% in the description - #' @param additional_properties additonal properties (optional) + #' @param additional_properties additional properties (optional) #' @param ... Other optional arguments. #' @export initialize = function(`className`, `url_property`, `percent_description` = NULL, additional_properties = NULL, ...) { @@ -288,7 +288,7 @@ Date <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # Date$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # Date$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R/R/dog.R b/samples/client/petstore/R/R/dog.R index a814c57d58..068eec8eca 100644 --- a/samples/client/petstore/R/R/dog.R +++ b/samples/client/petstore/R/R/dog.R @@ -32,7 +32,7 @@ Dog <- R6::R6Class( #' @param className className #' @param color color. Default to "red". #' @param breed breed - #' @param additional_properties additonal properties (optional) + #' @param additional_properties additional properties (optional) #' @param ... Other optional arguments. #' @export initialize = function(`className`, `color` = "red", `breed` = NULL, additional_properties = NULL, ...) { @@ -255,7 +255,7 @@ Dog <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # Dog$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # Dog$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R/R/dog_all_of.R b/samples/client/petstore/R/R/dog_all_of.R index 17608478ee..d35a85abbb 100644 --- a/samples/client/petstore/R/R/dog_all_of.R +++ b/samples/client/petstore/R/R/dog_all_of.R @@ -25,7 +25,7 @@ DogAllOf <- R6::R6Class( #' Initialize a new DogAllOf class. #' #' @param breed breed - #' @param additional_properties additonal properties (optional) + #' @param additional_properties additional properties (optional) #' @param ... Other optional arguments. #' @export initialize = function(`breed` = NULL, additional_properties = NULL, ...) { @@ -186,7 +186,7 @@ DogAllOf <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # DogAllOf$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # DogAllOf$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R/R/format_test.R b/samples/client/petstore/R/R/format_test.R index 4bd74e3a72..85894ec7b1 100644 --- a/samples/client/petstore/R/R/format_test.R +++ b/samples/client/petstore/R/R/format_test.R @@ -67,7 +67,7 @@ FormatTest <- R6::R6Class( #' @param uuid uuid #' @param pattern_with_digits A string that is a 10 digit number. Can have leading zeros. #' @param pattern_with_digits_and_delimiter A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. - #' @param additional_properties additonal properties (optional) + #' @param additional_properties additional properties (optional) #' @param ... Other optional arguments. #' @export initialize = function(`number`, `byte`, `date`, `password`, `integer` = NULL, `int32` = NULL, `int64` = NULL, `float` = NULL, `double` = NULL, `string` = NULL, `binary` = NULL, `dateTime` = "2015-10-28T14:38:02Z", `uuid` = NULL, `pattern_with_digits` = NULL, `pattern_with_digits_and_delimiter` = NULL, additional_properties = NULL, ...) { @@ -701,7 +701,7 @@ FormatTest <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # FormatTest$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # FormatTest$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R/R/mammal.R b/samples/client/petstore/R/R/mammal.R index 9864432e8f..a5af6d76d6 100644 --- a/samples/client/petstore/R/R/mammal.R +++ b/samples/client/petstore/R/R/mammal.R @@ -191,7 +191,7 @@ Mammal <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field #Mammal$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function #Mammal$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R/R/model_api_response.R b/samples/client/petstore/R/R/model_api_response.R index b0e4bbba7e..028c66c723 100644 --- a/samples/client/petstore/R/R/model_api_response.R +++ b/samples/client/petstore/R/R/model_api_response.R @@ -31,7 +31,7 @@ ModelApiResponse <- R6::R6Class( #' @param code code #' @param type type #' @param message message - #' @param additional_properties additonal properties (optional) + #' @param additional_properties additional properties (optional) #' @param ... Other optional arguments. #' @export initialize = function(`code` = NULL, `type` = NULL, `message` = NULL, additional_properties = NULL, ...) { @@ -236,7 +236,7 @@ ModelApiResponse <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # ModelApiResponse$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # ModelApiResponse$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R/R/nested_one_of.R b/samples/client/petstore/R/R/nested_one_of.R index 73f4e938cb..d2a670b4ed 100644 --- a/samples/client/petstore/R/R/nested_one_of.R +++ b/samples/client/petstore/R/R/nested_one_of.R @@ -28,7 +28,7 @@ NestedOneOf <- R6::R6Class( #' #' @param size size #' @param nested_pig nested_pig - #' @param additional_properties additonal properties (optional) + #' @param additional_properties additional properties (optional) #' @param ... Other optional arguments. #' @export initialize = function(`size` = NULL, `nested_pig` = NULL, additional_properties = NULL, ...) { @@ -211,7 +211,7 @@ NestedOneOf <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # NestedOneOf$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # NestedOneOf$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R/R/one_of_primitive_type_test.R b/samples/client/petstore/R/R/one_of_primitive_type_test.R index ed13169f90..faf3f7850a 100644 --- a/samples/client/petstore/R/R/one_of_primitive_type_test.R +++ b/samples/client/petstore/R/R/one_of_primitive_type_test.R @@ -193,7 +193,7 @@ OneOfPrimitiveTypeTest <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field #OneOfPrimitiveTypeTest$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function #OneOfPrimitiveTypeTest$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R/R/order.R b/samples/client/petstore/R/R/order.R index 2664689626..08c080464e 100644 --- a/samples/client/petstore/R/R/order.R +++ b/samples/client/petstore/R/R/order.R @@ -40,7 +40,7 @@ Order <- R6::R6Class( #' @param shipDate shipDate #' @param status Order Status #' @param complete complete. Default to FALSE. - #' @param additional_properties additonal properties (optional) + #' @param additional_properties additional properties (optional) #' @param ... Other optional arguments. #' @export initialize = function(`id` = NULL, `petId` = NULL, `quantity` = NULL, `shipDate` = NULL, `status` = NULL, `complete` = FALSE, additional_properties = NULL, ...) { @@ -320,7 +320,7 @@ Order <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # Order$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # Order$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R/R/pet.R b/samples/client/petstore/R/R/pet.R index 8be5a05833..42db1ecb88 100644 --- a/samples/client/petstore/R/R/pet.R +++ b/samples/client/petstore/R/R/pet.R @@ -40,7 +40,7 @@ Pet <- R6::R6Class( #' @param category category #' @param tags tags #' @param status pet status in the store - #' @param additional_properties additonal properties (optional) + #' @param additional_properties additional properties (optional) #' @param ... Other optional arguments. #' @export initialize = function(`name`, `photoUrls`, `id` = NULL, `category` = NULL, `tags` = NULL, `status` = NULL, additional_properties = NULL, ...) { @@ -353,7 +353,7 @@ Pet <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # Pet$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # Pet$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R/R/pig.R b/samples/client/petstore/R/R/pig.R index 570346408f..d497bc2803 100644 --- a/samples/client/petstore/R/R/pig.R +++ b/samples/client/petstore/R/R/pig.R @@ -191,7 +191,7 @@ Pig <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field #Pig$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function #Pig$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R/R/special.R b/samples/client/petstore/R/R/special.R index 39664bea75..27a23809a0 100644 --- a/samples/client/petstore/R/R/special.R +++ b/samples/client/petstore/R/R/special.R @@ -43,7 +43,7 @@ Special <- R6::R6Class( #' @param 123_number 123_number #' @param array[test] array[test] #' @param empty_string empty_string - #' @param additional_properties additonal properties (optional) + #' @param additional_properties additional properties (optional) #' @param ... Other optional arguments. #' @export initialize = function(`set_test` = NULL, `item_self` = NULL, `item_private` = NULL, `item_super` = NULL, `123_number` = NULL, `array[test]` = NULL, `empty_string` = NULL, additional_properties = NULL, ...) { @@ -346,7 +346,7 @@ Special <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # Special$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # Special$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R/R/store_api.R b/samples/client/petstore/R/R/store_api.R index 1daff7db82..20eb0cd2cd 100644 --- a/samples/client/petstore/R/R/store_api.R +++ b/samples/client/petstore/R/R/store_api.R @@ -54,7 +54,7 @@ #' } #' #' \strong{ GetOrderById } \emph{ Find purchase order by ID } -#' For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +#' For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions #' #' \itemize{ #' \item \emph{ @param } order_id integer diff --git a/samples/client/petstore/R/R/tag.R b/samples/client/petstore/R/R/tag.R index be068d1474..52079beeb0 100644 --- a/samples/client/petstore/R/R/tag.R +++ b/samples/client/petstore/R/R/tag.R @@ -28,7 +28,7 @@ Tag <- R6::R6Class( #' #' @param id id #' @param name name - #' @param additional_properties additonal properties (optional) + #' @param additional_properties additional properties (optional) #' @param ... Other optional arguments. #' @export initialize = function(`id` = NULL, `name` = NULL, additional_properties = NULL, ...) { @@ -211,7 +211,7 @@ Tag <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # Tag$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # Tag$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R/R/update_pet_request.R b/samples/client/petstore/R/R/update_pet_request.R index bde06df6a8..2fc96ab4ff 100644 --- a/samples/client/petstore/R/R/update_pet_request.R +++ b/samples/client/petstore/R/R/update_pet_request.R @@ -28,7 +28,7 @@ UpdatePetRequest <- R6::R6Class( #' #' @param jsonData jsonData #' @param binaryDataN2Information binaryDataN2Information - #' @param additional_properties additonal properties (optional) + #' @param additional_properties additional properties (optional) #' @param ... Other optional arguments. #' @export initialize = function(`jsonData` = NULL, `binaryDataN2Information` = NULL, additional_properties = NULL, ...) { @@ -208,7 +208,7 @@ UpdatePetRequest <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # UpdatePetRequest$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # UpdatePetRequest$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R/R/user.R b/samples/client/petstore/R/R/user.R index 43b51ffa41..533469b642 100644 --- a/samples/client/petstore/R/R/user.R +++ b/samples/client/petstore/R/R/user.R @@ -46,7 +46,7 @@ User <- R6::R6Class( #' @param password password #' @param phone phone #' @param userStatus User Status - #' @param additional_properties additonal properties (optional) + #' @param additional_properties additional properties (optional) #' @param ... Other optional arguments. #' @export initialize = function(`id` = NULL, `username` = NULL, `firstName` = NULL, `lastName` = NULL, `email` = NULL, `password` = NULL, `phone` = NULL, `userStatus` = NULL, additional_properties = NULL, ...) { @@ -361,7 +361,7 @@ User <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # User$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # User$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R/R/whale.R b/samples/client/petstore/R/R/whale.R index dc70b1dd33..3305ab6ce6 100644 --- a/samples/client/petstore/R/R/whale.R +++ b/samples/client/petstore/R/R/whale.R @@ -31,7 +31,7 @@ Whale <- R6::R6Class( #' @param className className #' @param hasBaleen hasBaleen #' @param hasTeeth hasTeeth - #' @param additional_properties additonal properties (optional) + #' @param additional_properties additional properties (optional) #' @param ... Other optional arguments. #' @export initialize = function(`className`, `hasBaleen` = NULL, `hasTeeth` = NULL, additional_properties = NULL, ...) { @@ -254,7 +254,7 @@ Whale <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # Whale$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # Whale$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R/R/zebra.R b/samples/client/petstore/R/R/zebra.R index c8d06d23d6..122e76d20e 100644 --- a/samples/client/petstore/R/R/zebra.R +++ b/samples/client/petstore/R/R/zebra.R @@ -28,7 +28,7 @@ Zebra <- R6::R6Class( #' #' @param className className #' @param type type - #' @param additional_properties additonal properties (optional) + #' @param additional_properties additional properties (optional) #' @param ... Other optional arguments. #' @export initialize = function(`className`, `type` = NULL, additional_properties = NULL, ...) { @@ -238,7 +238,7 @@ Zebra <- R6::R6Class( ## Uncomment below to unlock the class to allow modifications of the method or field # Zebra$unlock() # -## Below is an example to define the print fnuction +## Below is an example to define the print function # Zebra$set("public", "print", function(...) { # print(jsonlite::prettify(self$toJSONString())) # invisible(self) diff --git a/samples/client/petstore/R/docs/StoreApi.md b/samples/client/petstore/R/docs/StoreApi.md index b58b49eb76..cfd0f52076 100644 --- a/samples/client/petstore/R/docs/StoreApi.md +++ b/samples/client/petstore/R/docs/StoreApi.md @@ -129,7 +129,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```R diff --git a/samples/client/petstore/R/tests/testthat/test_petstore.R b/samples/client/petstore/R/tests/testthat/test_petstore.R index aee591b525..f7a70df4f9 100644 --- a/samples/client/petstore/R/tests/testthat/test_petstore.R +++ b/samples/client/petstore/R/tests/testthat/test_petstore.R @@ -265,7 +265,7 @@ test_that("Tests oneOf", { # class name test expect_equal(get(class(basque_pig$actual_instance)[[1]], pos = -1)$classname, "BasquePig") - # test contructors + # test constructors pig2 <- Pig$new(instance = basque_pig$actual_instance) expect_equal(pig2$actual_type, "BasquePig") expect_equal(pig2$actual_instance$color, "red") diff --git a/samples/client/petstore/R/tests/testthat/test_store_api.R b/samples/client/petstore/R/tests/testthat/test_store_api.R index 1ebb3f82a6..3ce6f412c9 100644 --- a/samples/client/petstore/R/tests/testthat/test_store_api.R +++ b/samples/client/petstore/R/tests/testthat/test_store_api.R @@ -32,7 +32,7 @@ test_that("GetOrderById", { # tests for GetOrderById # base path: http://petstore.swagger.io/v2 # Find purchase order by ID - # For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + # For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions # @param order.id integer ID of pet that needs to be fetched # @return [Order] diff --git a/samples/client/petstore/ada/.openapi-generator-ignore b/samples/client/petstore/ada/.openapi-generator-ignore index 9b9a09a858..94b3a421aa 100644 --- a/samples/client/petstore/ada/.openapi-generator-ignore +++ b/samples/client/petstore/ada/.openapi-generator-ignore @@ -5,7 +5,7 @@ # The patterns follow closely to .gitignore or .dockerignore. # As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +# You can make changes and tell Swagger Codegen 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 (*): diff --git a/samples/client/petstore/ada/src/client/samples-petstore-clients.adb b/samples/client/petstore/ada/src/client/samples-petstore-clients.adb index d550af7bbe..c420821e2e 100644 --- a/samples/client/petstore/ada/src/client/samples-petstore-clients.adb +++ b/samples/client/petstore/ada/src/client/samples-petstore-clients.adb @@ -184,7 +184,7 @@ package body Samples.Petstore.Clients is end Get_Inventory; -- Find purchase order by ID - -- For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + -- For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions procedure Get_Order_By_Id (Client : in out Client_Type; Order_Id : in Swagger.Long; diff --git a/samples/client/petstore/ada/src/client/samples-petstore-clients.ads b/samples/client/petstore/ada/src/client/samples-petstore-clients.ads index ec06fd09d5..d3a8b3fed6 100644 --- a/samples/client/petstore/ada/src/client/samples-petstore-clients.ads +++ b/samples/client/petstore/ada/src/client/samples-petstore-clients.ads @@ -80,7 +80,7 @@ package Samples.Petstore.Clients is Result : out Swagger.Integer_Map); -- Find purchase order by ID - -- For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + -- For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions procedure Get_Order_By_Id (Client : in out Client_Type; Order_Id : in Swagger.Long; diff --git a/samples/client/petstore/android/httpclient/docs/StoreApi.md b/samples/client/petstore/android/httpclient/docs/StoreApi.md index d2229bfd71..bb9e7140cc 100644 --- a/samples/client/petstore/android/httpclient/docs/StoreApi.md +++ b/samples/client/petstore/android/httpclient/docs/StoreApi.md @@ -104,7 +104,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example diff --git a/samples/client/petstore/android/httpclient/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/android/httpclient/src/main/java/org/openapitools/client/api/StoreApi.java index 17ad5b2c08..b0a1f40dec 100644 --- a/samples/client/petstore/android/httpclient/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/android/httpclient/src/main/java/org/openapitools/client/api/StoreApi.java @@ -150,7 +150,7 @@ public class StoreApi { } /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched * @return Order */ diff --git a/samples/client/petstore/android/volley/docs/StoreApi.md b/samples/client/petstore/android/volley/docs/StoreApi.md index d2229bfd71..bb9e7140cc 100644 --- a/samples/client/petstore/android/volley/docs/StoreApi.md +++ b/samples/client/petstore/android/volley/docs/StoreApi.md @@ -104,7 +104,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example diff --git a/samples/client/petstore/android/volley/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/android/volley/src/main/java/org/openapitools/client/api/StoreApi.java index fd69b75734..a2d1f3635c 100644 --- a/samples/client/petstore/android/volley/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/android/volley/src/main/java/org/openapitools/client/api/StoreApi.java @@ -297,7 +297,7 @@ public class StoreApi { } /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched * @return Order */ @@ -359,7 +359,7 @@ public class StoreApi { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched */ public void getOrderById (Long orderId, final Response.Listener responseListener, final Response.ErrorListener errorListener) { diff --git a/samples/client/petstore/apex/force-app/main/default/classes/OASStoreApi.cls b/samples/client/petstore/apex/force-app/main/default/classes/OASStoreApi.cls index 8ad6201cd1..6fdc8415e7 100644 --- a/samples/client/petstore/apex/force-app/main/default/classes/OASStoreApi.cls +++ b/samples/client/petstore/apex/force-app/main/default/classes/OASStoreApi.cls @@ -72,7 +72,7 @@ public class OASStoreApi { } /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched (required) * @return OASOrder * @throws OAS.ApiException if fails to make API call diff --git a/samples/client/petstore/apex/force-app/main/default/classes/OASStoreApiTest.cls b/samples/client/petstore/apex/force-app/main/default/classes/OASStoreApiTest.cls index 548c228a65..8c1eca4b90 100644 --- a/samples/client/petstore/apex/force-app/main/default/classes/OASStoreApiTest.cls +++ b/samples/client/petstore/apex/force-app/main/default/classes/OASStoreApiTest.cls @@ -53,7 +53,7 @@ private class OASStoreApiTest { /** * Find purchase order by ID * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions */ @isTest private static void getOrderByIdTest() { diff --git a/samples/client/petstore/async-scala/.openapi-generator-ignore b/samples/client/petstore/async-scala/.openapi-generator-ignore index c5fa491b4c..deed424f8a 100644 --- a/samples/client/petstore/async-scala/.openapi-generator-ignore +++ b/samples/client/petstore/async-scala/.openapi-generator-ignore @@ -5,7 +5,7 @@ # The patterns follow closely to .gitignore or .dockerignore. # As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +# You can make changes and tell Swagger Codegen 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 (*): diff --git a/samples/client/petstore/bash/client.sh b/samples/client/petstore/bash/client.sh index 6215aa728a..218bee7996 100644 --- a/samples/client/petstore/bash/client.sh +++ b/samples/client/petstore/bash/client.sh @@ -24,7 +24,7 @@ # # -# For improved pattern matching in case statemets +# For improved pattern matching in case statements shopt -s extglob ############################################################################### @@ -65,7 +65,7 @@ declare -A header_arguments declare -A operation_parameters ## -# Declare colors with autodection if output is terminal +# Declare colors with autodetection if output is terminal if [ -t 1 ]; then RED="$(tput setaf 1)" GREEN="$(tput setaf 2)" @@ -591,7 +591,7 @@ build_request_path() { parameter_value+="${qparam}=${qvalue}" done # - # Append parameters specified as 'mutli' collections i.e. param=value1¶m=value2&... + # Append parameters specified as 'multi' collections i.e. param=value1¶m=value2&... # elif [[ "${collection_type}" == "multi" ]]; then local vcount=0 @@ -802,7 +802,7 @@ echo -e " \\t\\t\\t\\t(e.g. 'https://petstore.swagger.io')" echo -e " \\t\\t\\t\\trequired parameters or wrong content type" echo -e " --dry-run\\t\\t\\t\\tPrint out the cURL command without" echo -e " \\t\\t\\t\\texecuting it" - echo -e " -nc,--no-colors\\t\\t\\tEnforce print without colors, otherwise autodected" + echo -e " -nc,--no-colors\\t\\t\\tEnforce print without colors, otherwise autodetected" echo -e " -ac,--accept ${YELLOW}${OFF}\\t\\tSet the 'Accept' header in the request" echo -e " -ct,--content-type ${YELLOW}${OFF}\\tSet the 'Content-type' header in " echo -e " \\tthe request" @@ -1100,7 +1100,7 @@ print_testGroupParameters_help() { echo "" echo -e "${BOLD}${WHITE}Responses${OFF}" code=400 - echo -e "${result_color_table[${code:0:1}]} 400;Someting wrong${OFF}" | paste -sd' ' | column -t -s ';' | fold -sw 80 | sed '2,$s/^/ /' + echo -e "${result_color_table[${code:0:1}]} 400;Something wrong${OFF}" | paste -sd' ' | column -t -s ';' | fold -sw 80 | sed '2,$s/^/ /' } ############################################################################## # @@ -1365,7 +1365,7 @@ print_getOrderById_help() { echo "" echo -e "${BOLD}${WHITE}getOrderById - Find purchase order by ID${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /' echo -e "" - echo -e "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions" | paste -sd' ' | fold -sw 80 + echo -e "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions" | paste -sd' ' | fold -sw 80 echo -e "" echo -e "${BOLD}${WHITE}Parameters${OFF}" echo -e " * ${GREEN}order_id${OFF} ${BLUE}[integer]${OFF} ${RED}(required)${OFF} ${CYAN}(default: null)${OFF} - ID of pet that needs to be fetched ${YELLOW}Specify as: order_id=value${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /' @@ -1586,7 +1586,7 @@ call_123Test@$%SpecialTags() { # # Check if the user provided 'Content-type' headers in the # command line. If not try to set them based on the OpenAPI specification - # if values produces and consumes are defined unambigously + # if values produces and consumes are defined unambiguously # if [[ -z $header_content_type ]]; then header_content_type="application/json" @@ -1736,7 +1736,7 @@ call_fakeOuterBooleanSerialize() { # # Check if the user provided 'Content-type' headers in the # command line. If not try to set them based on the OpenAPI specification - # if values produces and consumes are defined unambigously + # if values produces and consumes are defined unambiguously # if [[ -z $header_content_type ]]; then header_content_type="application/json" @@ -1814,7 +1814,7 @@ call_fakeOuterCompositeSerialize() { # # Check if the user provided 'Content-type' headers in the # command line. If not try to set them based on the OpenAPI specification - # if values produces and consumes are defined unambigously + # if values produces and consumes are defined unambiguously # if [[ -z $header_content_type ]]; then header_content_type="application/json" @@ -1892,7 +1892,7 @@ call_fakeOuterNumberSerialize() { # # Check if the user provided 'Content-type' headers in the # command line. If not try to set them based on the OpenAPI specification - # if values produces and consumes are defined unambigously + # if values produces and consumes are defined unambiguously # if [[ -z $header_content_type ]]; then header_content_type="application/json" @@ -1970,7 +1970,7 @@ call_fakeOuterStringSerialize() { # # Check if the user provided 'Content-type' headers in the # command line. If not try to set them based on the OpenAPI specification - # if values produces and consumes are defined unambigously + # if values produces and consumes are defined unambiguously # if [[ -z $header_content_type ]]; then header_content_type="application/json" @@ -2048,7 +2048,7 @@ call_testBodyWithFileSchema() { # # Check if the user provided 'Content-type' headers in the # command line. If not try to set them based on the OpenAPI specification - # if values produces and consumes are defined unambigously + # if values produces and consumes are defined unambiguously # if [[ -z $header_content_type ]]; then header_content_type="application/json" @@ -2126,7 +2126,7 @@ call_testBodyWithQueryParams() { # # Check if the user provided 'Content-type' headers in the # command line. If not try to set them based on the OpenAPI specification - # if values produces and consumes are defined unambigously + # if values produces and consumes are defined unambiguously # if [[ -z $header_content_type ]]; then header_content_type="application/json" @@ -2204,7 +2204,7 @@ call_testClientModel() { # # Check if the user provided 'Content-type' headers in the # command line. If not try to set them based on the OpenAPI specification - # if values produces and consumes are defined unambigously + # if values produces and consumes are defined unambiguously # if [[ -z $header_content_type ]]; then header_content_type="application/json" @@ -2390,7 +2390,7 @@ call_testInlineAdditionalProperties() { # # Check if the user provided 'Content-type' headers in the # command line. If not try to set them based on the OpenAPI specification - # if values produces and consumes are defined unambigously + # if values produces and consumes are defined unambiguously # if [[ -z $header_content_type ]]; then header_content_type="application/json" @@ -2504,7 +2504,7 @@ call_testClassname() { # # Check if the user provided 'Content-type' headers in the # command line. If not try to set them based on the OpenAPI specification - # if values produces and consumes are defined unambigously + # if values produces and consumes are defined unambiguously # if [[ -z $header_content_type ]]; then header_content_type="application/json" @@ -2582,7 +2582,7 @@ call_addPet() { # # Check if the user provided 'Content-type' headers in the # command line. If not try to set them based on the OpenAPI specification - # if values produces and consumes are defined unambigously + # if values produces and consumes are defined unambiguously # @@ -2802,7 +2802,7 @@ call_updatePet() { # # Check if the user provided 'Content-type' headers in the # command line. If not try to set them based on the OpenAPI specification - # if values produces and consumes are defined unambigously + # if values produces and consumes are defined unambiguously # @@ -3094,7 +3094,7 @@ call_placeOrder() { # # Check if the user provided 'Content-type' headers in the # command line. If not try to set them based on the OpenAPI specification - # if values produces and consumes are defined unambigously + # if values produces and consumes are defined unambiguously # if [[ -z $header_content_type ]]; then header_content_type="application/json" @@ -3172,7 +3172,7 @@ call_createUser() { # # Check if the user provided 'Content-type' headers in the # command line. If not try to set them based on the OpenAPI specification - # if values produces and consumes are defined unambigously + # if values produces and consumes are defined unambiguously # if [[ -z $header_content_type ]]; then header_content_type="application/json" @@ -3250,7 +3250,7 @@ call_createUsersWithArrayInput() { # # Check if the user provided 'Content-type' headers in the # command line. If not try to set them based on the OpenAPI specification - # if values produces and consumes are defined unambigously + # if values produces and consumes are defined unambiguously # if [[ -z $header_content_type ]]; then header_content_type="application/json" @@ -3328,7 +3328,7 @@ call_createUsersWithListInput() { # # Check if the user provided 'Content-type' headers in the # command line. If not try to set them based on the OpenAPI specification - # if values produces and consumes are defined unambigously + # if values produces and consumes are defined unambiguously # if [[ -z $header_content_type ]]; then header_content_type="application/json" @@ -3550,7 +3550,7 @@ call_updateUser() { # # Check if the user provided 'Content-type' headers in the # command line. If not try to set them based on the OpenAPI specification - # if values produces and consumes are defined unambigously + # if values produces and consumes are defined unambiguously # if [[ -z $header_content_type ]]; then header_content_type="application/json" @@ -3812,7 +3812,7 @@ case $key in ;; *:=*) # Parse body arguments and convert them into top level - # JSON properties passed in the body content without qoutes + # JSON properties passed in the body content without quotes if [[ "$operation" ]]; then # ignore error about 'sep' being unused # shellcheck disable=SC2034 diff --git a/samples/client/petstore/bash/docs/StoreApi.md b/samples/client/petstore/bash/docs/StoreApi.md index 56b2934562..1f43de0867 100644 --- a/samples/client/petstore/bash/docs/StoreApi.md +++ b/samples/client/petstore/bash/docs/StoreApi.md @@ -82,7 +82,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example diff --git a/samples/client/petstore/bash/petstore-cli b/samples/client/petstore/bash/petstore-cli index 6810f2afa1..5ffeb5205b 100755 --- a/samples/client/petstore/bash/petstore-cli +++ b/samples/client/petstore/bash/petstore-cli @@ -1127,7 +1127,7 @@ print_testGroupParameters_help() { echo "" echo -e "${BOLD}${WHITE}Responses${OFF}" code=400 - echo -e "${result_color_table[${code:0:1}]} 400;Someting wrong${OFF}" | paste -sd' ' | column -t -s ';' | fold -sw 80 | sed '2,$s/^/ /' + echo -e "${result_color_table[${code:0:1}]} 400;Something wrong${OFF}" | paste -sd' ' | column -t -s ';' | fold -sw 80 | sed '2,$s/^/ /' } ############################################################################## # @@ -1425,7 +1425,7 @@ print_getOrderById_help() { echo "" echo -e "${BOLD}${WHITE}getOrderById - Find purchase order by ID${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /' echo -e "" - echo -e "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions" | paste -sd' ' | fold -sw 80 + echo -e "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions" | paste -sd' ' | fold -sw 80 echo -e "" echo -e "${BOLD}${WHITE}Parameters${OFF}" echo -e " * ${GREEN}order_id${OFF} ${BLUE}[integer]${OFF} ${RED}(required)${OFF} ${CYAN}(default: null)${OFF} - ID of pet that needs to be fetched ${YELLOW}Specify as: order_id=value${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /' diff --git a/samples/client/petstore/c/CMakeLists.txt b/samples/client/petstore/c/CMakeLists.txt index 98454803ef..cca1142664 100644 --- a/samples/client/petstore/c/CMakeLists.txt +++ b/samples/client/petstore/c/CMakeLists.txt @@ -66,7 +66,7 @@ set(SRCS "") set(HDRS "") -## This section shows how to use the above compiled libary to compile the source files +## This section shows how to use the above compiled library to compile the source files ## set source files #set(SRCS # unit-tests/manual-PetAPI.c @@ -81,12 +81,12 @@ set(HDRS "") ## loop over all files in SRCS variable #foreach(SOURCE_FILE ${SRCS}) -# # Get only the file name from the file as add_executable doesnot support executable with slash("/") +# # Get only the file name from the file as add_executable doesn't support executable with slash("/") # get_filename_component(FILE_NAME_ONLY ${SOURCE_FILE} NAME_WE) # # Remove .c from the file name and set it as executable name # string( REPLACE ".c" "" EXECUTABLE_FILE ${FILE_NAME_ONLY}) # # Add executable for every source file in SRCS # add_executable(unit-${EXECUTABLE_FILE} ${SOURCE_FILE}) -# # Link above created libary to executable and dependent libary curl +# # Link above created library to executable and dependent library curl # target_link_libraries(unit-${EXECUTABLE_FILE} ${CURL_LIBRARIES} ${pkgName} ) #endforeach(SOURCE_FILE ${SRCS}) diff --git a/samples/client/petstore/c/api/StoreAPI.c b/samples/client/petstore/c/api/StoreAPI.c index 3208b8ae53..c91a9d709d 100644 --- a/samples/client/petstore/c/api/StoreAPI.c +++ b/samples/client/petstore/c/api/StoreAPI.c @@ -144,7 +144,7 @@ end: // Find purchase order by ID // -// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions // order_t* StoreAPI_getOrderById(apiClient_t *apiClient, long orderId ) diff --git a/samples/client/petstore/c/api/StoreAPI.h b/samples/client/petstore/c/api/StoreAPI.h index 43bdf75837..99e4f25d37 100644 --- a/samples/client/petstore/c/api/StoreAPI.h +++ b/samples/client/petstore/c/api/StoreAPI.h @@ -26,7 +26,7 @@ StoreAPI_getInventory(apiClient_t *apiClient); // Find purchase order by ID // -// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions // order_t* StoreAPI_getOrderById(apiClient_t *apiClient, long orderId ); diff --git a/samples/client/petstore/c/docs/StoreAPI.md b/samples/client/petstore/c/docs/StoreAPI.md index 3c6736897e..45462990e0 100644 --- a/samples/client/petstore/c/docs/StoreAPI.md +++ b/samples/client/petstore/c/docs/StoreAPI.md @@ -77,7 +77,7 @@ list_t* ```c // Find purchase order by ID // -// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions // order_t* StoreAPI_getOrderById(apiClient_t *apiClient, long orderId); ``` diff --git a/samples/client/petstore/c/external/cJSON.c b/samples/client/petstore/c/external/cJSON.c index 2139b5efd9..afc9ff0db8 100644 --- a/samples/client/petstore/c/external/cJSON.c +++ b/samples/client/petstore/c/external/cJSON.c @@ -125,7 +125,7 @@ typedef struct internal_hooks } internal_hooks; #if defined(_MSC_VER) -/* work around MSVC error C2322: '...' address of dillimport '...' is not static */ +/* work around MSVC error C2322: '...' address of dllimport '...' is not static */ static void *internal_malloc(size_t size) { return malloc(size); diff --git a/samples/client/petstore/c/unit-tests/manual-user.c b/samples/client/petstore/c/unit-tests/manual-user.c index 738b21e22b..1200baa2e5 100644 --- a/samples/client/petstore/c/unit-tests/manual-user.c +++ b/samples/client/petstore/c/unit-tests/manual-user.c @@ -24,16 +24,16 @@ int main() { printf("Created User is: \n%s\n", dataToPrint); - user_t *pasrsedUser = user_parseFromJSON(JSONNODE); + user_t *parsedUser = user_parseFromJSON(JSONNODE); - cJSON *fromJSON = user_convertToJSON(pasrsedUser); + cJSON *fromJSON = user_convertToJSON(parsedUser); char *dataToPrintFromJSON = cJSON_Print(fromJSON); printf("Parsed User From JSON is: \n%s\n", dataToPrintFromJSON); user_free(newuser); - user_free(pasrsedUser); + user_free(parsedUser); cJSON_Delete(JSONNODE); cJSON_Delete(fromJSON); } diff --git a/samples/client/petstore/clojure/git_push.sh b/samples/client/petstore/clojure/git_push.sh index 8442b80bb4..f8c12cff48 100644 --- a/samples/client/petstore/clojure/git_push.sh +++ b/samples/client/petstore/clojure/git_push.sh @@ -1,7 +1,7 @@ #!/bin/sh # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ # -# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" git_user_id=$1 git_repo_id=$2 diff --git a/samples/client/petstore/clojure/src/open_api_petstore/api/store.clj b/samples/client/petstore/clojure/src/open_api_petstore/api/store.clj index a91c086c3f..f47fa3d69f 100644 --- a/samples/client/petstore/clojure/src/open_api_petstore/api/store.clj +++ b/samples/client/petstore/clojure/src/open_api_petstore/api/store.clj @@ -61,7 +61,7 @@ (defn-spec get-order-by-id-with-http-info any? "Find purchase order by ID - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions" + For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions" [orderId string?] (check-required-params orderId) (call-api "/store/order/{orderId}" :get @@ -75,7 +75,7 @@ (defn-spec get-order-by-id order-spec "Find purchase order by ID - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions" + For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions" [orderId string?] (let [res (:data (get-order-by-id-with-http-info orderId))] (if (:decode-models *api-context*) diff --git a/samples/client/petstore/clojure/src/open_api_petstore/core.clj b/samples/client/petstore/clojure/src/open_api_petstore/core.clj index ef30d6d251..7c5e0def94 100644 --- a/samples/client/petstore/clojure/src/open_api_petstore/core.clj +++ b/samples/client/petstore/clojure/src/open_api_petstore/core.clj @@ -105,7 +105,7 @@ :else (str param))) (defn auth->opts - "Process the given auth to an option map that might conatin request options and parameters." + "Process the given auth to an option map that might contain request options and parameters." [{:keys [type in param-name]} value] (case type :basic {:req-opts {:basic-auth value}} @@ -126,7 +126,7 @@ opts)) (defn auths->opts - "Process the given auth names to an option map that might conatin request options and parameters." + "Process the given auth names to an option map that might contain request options and parameters." [auth-names] (reduce process-auth {} auth-names)) @@ -142,7 +142,7 @@ (str (:base-url *api-context*) path))) (defn normalize-array-param - "Normalize array paramater according to :collection-format specified in the parameter's meta data. + "Normalize array parameter according to :collection-format specified in the parameter's meta data. When the parameter contains File, a seq is returned so as to keep File parameters. For :multi collection format, a seq is returned which will be handled properly by clj-http. For other cases, a string is returned." diff --git a/samples/client/petstore/cpp-qt/build-and-test.bash b/samples/client/petstore/cpp-qt/build-and-test.bash index bcf9648953..4104bdac1b 100755 --- a/samples/client/petstore/cpp-qt/build-and-test.bash +++ b/samples/client/petstore/cpp-qt/build-and-test.bash @@ -35,7 +35,7 @@ else exit 1 fi - echo "Check if no memory leaks occured:" + echo "Check if no memory leaks occurred:" leakCount=$(cat result.log | grep 'lost: 0 bytes in 0 blocks' | wc -l) if [ $leakCount == 3 ] then diff --git a/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/api/StoreApi.h b/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/api/StoreApi.h index 5140fc90a7..57496ef7dd 100644 --- a/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/api/StoreApi.h +++ b/samples/client/petstore/cpp-restsdk/client/include/CppRestPetstoreClient/api/StoreApi.h @@ -66,7 +66,7 @@ public: /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// ID of pet that needs to be fetched pplx::task> getOrderById( diff --git a/samples/client/petstore/cpp-tiny/lib/service/StoreApi.h b/samples/client/petstore/cpp-tiny/lib/service/StoreApi.h index b7a6781bd4..dd29c9f96e 100644 --- a/samples/client/petstore/cpp-tiny/lib/service/StoreApi.h +++ b/samples/client/petstore/cpp-tiny/lib/service/StoreApi.h @@ -51,7 +51,7 @@ public: /** * Find purchase order by ID. * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * \param orderId ID of pet that needs to be fetched *Required* */ Response< diff --git a/samples/client/petstore/cpp-tizen/doc/Doxyfile b/samples/client/petstore/cpp-tizen/doc/Doxyfile index 9a0ba8f718..8d056fd3d4 100644 --- a/samples/client/petstore/cpp-tizen/doc/Doxyfile +++ b/samples/client/petstore/cpp-tizen/doc/Doxyfile @@ -294,7 +294,7 @@ MARKDOWN_SUPPORT = YES # When enabled doxygen tries to link words that correspond to documented # classes, or namespaces to their corresponding documentation. Such a link can -# be prevented in individual cases by by putting a % sign in front of the word +# be prevented in individual cases by putting a % sign in front of the word # or globally by setting AUTOLINK_SUPPORT to NO. # The default value is: YES. @@ -1397,7 +1397,7 @@ EXT_LINKS_IN_WINDOW = NO FORMULA_FONTSIZE = 10 -# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# Use the FORMULA_TRANSPARENT tag to determine whether or not the images # generated for formulas are transparent PNGs. Transparent PNGs are not # supported properly for IE 6.0, but are supported on all modern browsers. # diff --git a/samples/client/petstore/cpp-tizen/src/StoreManager.h b/samples/client/petstore/cpp-tizen/src/StoreManager.h index 9736475b38..7db3e783bb 100644 --- a/samples/client/petstore/cpp-tizen/src/StoreManager.h +++ b/samples/client/petstore/cpp-tizen/src/StoreManager.h @@ -79,7 +79,7 @@ bool getInventoryAsync(char * accessToken, /*! \brief Find purchase order by ID. *Synchronous* * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * \param orderId ID of pet that needs to be fetched *Required* * \param handler The callback function to be invoked on completion. *Required* * \param accessToken The Authorization token. *Required* @@ -92,7 +92,7 @@ bool getOrderByIdSync(char * accessToken, /*! \brief Find purchase order by ID. *Asynchronous* * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * \param orderId ID of pet that needs to be fetched *Required* * \param handler The callback function to be invoked on completion. *Required* * \param accessToken The Authorization token. *Required* diff --git a/samples/client/petstore/cpp-ue4/Public/OpenAPIStoreApiOperations.h b/samples/client/petstore/cpp-ue4/Public/OpenAPIStoreApiOperations.h index e0703baa3a..9df366173a 100644 --- a/samples/client/petstore/cpp-ue4/Public/OpenAPIStoreApiOperations.h +++ b/samples/client/petstore/cpp-ue4/Public/OpenAPIStoreApiOperations.h @@ -70,7 +70,7 @@ public: /* Find purchase order by ID * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions */ class OPENAPI_API OpenAPIStoreApi::GetOrderByIdRequest : public Request { diff --git a/samples/client/petstore/crystal/spec/api/store_api_spec.cr b/samples/client/petstore/crystal/spec/api/store_api_spec.cr index 592747d6fe..05fd3146d8 100644 --- a/samples/client/petstore/crystal/spec/api/store_api_spec.cr +++ b/samples/client/petstore/crystal/spec/api/store_api_spec.cr @@ -48,7 +48,7 @@ describe "StoreApi" do # unit tests for get_order_by_id # Find purchase order by ID - # For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + # For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions # @param order_id ID of pet that needs to be fetched # @param [Hash] opts the optional parameters # @return [Order] diff --git a/samples/client/petstore/crystal/src/petstore/api/store_api.cr b/samples/client/petstore/crystal/src/petstore/api/store_api.cr index f24fae7903..76d3c836d9 100644 --- a/samples/client/petstore/crystal/src/petstore/api/store_api.cr +++ b/samples/client/petstore/crystal/src/petstore/api/store_api.cr @@ -128,7 +128,7 @@ module Petstore end # Find purchase order by ID - # For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + # For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions # @param order_id [Int64] ID of pet that needs to be fetched # @return [Order] def get_order_by_id(order_id : Int64) @@ -137,7 +137,7 @@ module Petstore end # Find purchase order by ID - # For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + # For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions # @param order_id [Int64] ID of pet that needs to be fetched # @return [Array<(Order, Integer, Hash)>] Order data, response status code and response headers def get_order_by_id_with_http_info(order_id : Int64) diff --git a/samples/client/petstore/csharp-dotnet2/OpenAPIClientTest/Lib/OpenAPIClient/docs/StoreApi.md b/samples/client/petstore/csharp-dotnet2/OpenAPIClientTest/Lib/OpenAPIClient/docs/StoreApi.md index 068cb5419f..d68fa5efb8 100644 --- a/samples/client/petstore/csharp-dotnet2/OpenAPIClientTest/Lib/OpenAPIClient/docs/StoreApi.md +++ b/samples/client/petstore/csharp-dotnet2/OpenAPIClientTest/Lib/OpenAPIClient/docs/StoreApi.md @@ -138,7 +138,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```csharp diff --git a/samples/client/petstore/csharp-dotnet2/OpenAPIClientTest/Lib/OpenAPIClient/src/main/CsharpDotNet2/Org/OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp-dotnet2/OpenAPIClientTest/Lib/OpenAPIClient/src/main/CsharpDotNet2/Org/OpenAPITools/Api/StoreApi.cs index df7be44e7b..423d179cdb 100644 --- a/samples/client/petstore/csharp-dotnet2/OpenAPIClientTest/Lib/OpenAPIClient/src/main/CsharpDotNet2/Org/OpenAPITools/Api/StoreApi.cs +++ b/samples/client/petstore/csharp-dotnet2/OpenAPIClientTest/Lib/OpenAPIClient/src/main/CsharpDotNet2/Org/OpenAPITools/Api/StoreApi.cs @@ -23,7 +23,7 @@ namespace Org.OpenAPITools.Api /// Dictionary<string, int?> Dictionary GetInventory (); /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// ID of pet that needs to be fetched /// Order @@ -159,7 +159,7 @@ namespace Org.OpenAPITools.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// ID of pet that needs to be fetched /// Order diff --git a/samples/client/petstore/csharp-dotnet2/OpenAPIClientTest/Lib/OpenAPIClient/src/main/CsharpDotNet2/Org/OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp-dotnet2/OpenAPIClientTest/Lib/OpenAPIClient/src/main/CsharpDotNet2/Org/OpenAPITools/Client/ApiClient.cs index e1d91307dc..7b0d472a06 100644 --- a/samples/client/petstore/csharp-dotnet2/OpenAPIClientTest/Lib/OpenAPIClient/src/main/CsharpDotNet2/Org/OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp-dotnet2/OpenAPIClientTest/Lib/OpenAPIClient/src/main/CsharpDotNet2/Org/OpenAPITools/Client/ApiClient.cs @@ -14,7 +14,7 @@ using RestSharp.Extensions; namespace Org.OpenAPITools.Client { /// - /// API client is mainly responible for making the HTTP call to the API backend. + /// API client is mainly responsible for making the HTTP call to the API backend. /// public class ApiClient { diff --git a/samples/client/petstore/csharp-dotnet2/SwaggerClientTest/Lib/SwaggerClient/docs/StoreApi.md b/samples/client/petstore/csharp-dotnet2/SwaggerClientTest/Lib/SwaggerClient/docs/StoreApi.md index 76334b0ca4..58e85fb6eb 100644 --- a/samples/client/petstore/csharp-dotnet2/SwaggerClientTest/Lib/SwaggerClient/docs/StoreApi.md +++ b/samples/client/petstore/csharp-dotnet2/SwaggerClientTest/Lib/SwaggerClient/docs/StoreApi.md @@ -140,7 +140,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```csharp diff --git a/samples/client/petstore/csharp-dotnet2/SwaggerClientTest/Lib/SwaggerClient/src/main/CsharpDotNet2/Org/OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp-dotnet2/SwaggerClientTest/Lib/SwaggerClient/src/main/CsharpDotNet2/Org/OpenAPITools/Api/StoreApi.cs index 3390bbbcab..c23c321d63 100644 --- a/samples/client/petstore/csharp-dotnet2/SwaggerClientTest/Lib/SwaggerClient/src/main/CsharpDotNet2/Org/OpenAPITools/Api/StoreApi.cs +++ b/samples/client/petstore/csharp-dotnet2/SwaggerClientTest/Lib/SwaggerClient/src/main/CsharpDotNet2/Org/OpenAPITools/Api/StoreApi.cs @@ -23,7 +23,7 @@ namespace Org.OpenAPITools.Api /// Dictionary<string, int?> Dictionary GetInventory (); /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// ID of pet that needs to be fetched /// Order @@ -159,7 +159,7 @@ namespace Org.OpenAPITools.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// ID of pet that needs to be fetched /// Order diff --git a/samples/client/petstore/csharp-dotnet2/SwaggerClientTest/Lib/SwaggerClient/src/main/CsharpDotNet2/Org/OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp-dotnet2/SwaggerClientTest/Lib/SwaggerClient/src/main/CsharpDotNet2/Org/OpenAPITools/Client/ApiClient.cs index 095f97997e..5903fde02a 100644 --- a/samples/client/petstore/csharp-dotnet2/SwaggerClientTest/Lib/SwaggerClient/src/main/CsharpDotNet2/Org/OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp-dotnet2/SwaggerClientTest/Lib/SwaggerClient/src/main/CsharpDotNet2/Org/OpenAPITools/Client/ApiClient.cs @@ -14,7 +14,7 @@ using RestSharp.Extensions; namespace Org.OpenAPITools.Client { /// - /// API client is mainly responible for making the HTTP call to the API backend. + /// API client is mainly responsible for making the HTTP call to the API backend. /// public class ApiClient { diff --git a/samples/client/petstore/csharp-dotnet2/SwaggerClientTest/Lib/SwaggerClient/src/main/CsharpDotNet2/Org/OpenAPITools/Client/Configuration.cs b/samples/client/petstore/csharp-dotnet2/SwaggerClientTest/Lib/SwaggerClient/src/main/CsharpDotNet2/Org/OpenAPITools/Client/Configuration.cs index 8cac9c7d9d..7546607fa9 100644 --- a/samples/client/petstore/csharp-dotnet2/SwaggerClientTest/Lib/SwaggerClient/src/main/CsharpDotNet2/Org/OpenAPITools/Client/Configuration.cs +++ b/samples/client/petstore/csharp-dotnet2/SwaggerClientTest/Lib/SwaggerClient/src/main/CsharpDotNet2/Org/OpenAPITools/Client/Configuration.cs @@ -84,7 +84,7 @@ namespace Org.OpenAPITools.Client private static string _dateTimeFormat = ISO8601_DATETIME_FORMAT; /// - /// Gets or sets the the date time format used when serializing in the ApiClient + /// Gets or sets the date time format used when serializing in the ApiClient /// By default, it's set to ISO 8601 - "o", for others see: /// https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx /// and https://msdn.microsoft.com/en-us/library/8kb3ddd4(v=vs.110).aspx diff --git a/samples/client/petstore/csharp-netcore-functions/generatedSrc/Client/ApiClient.cs b/samples/client/petstore/csharp-netcore-functions/generatedSrc/Client/ApiClient.cs index 4f68a59871..fe4dcf5a24 100644 --- a/samples/client/petstore/csharp-netcore-functions/generatedSrc/Client/ApiClient.cs +++ b/samples/client/petstore/csharp-netcore-functions/generatedSrc/Client/ApiClient.cs @@ -157,7 +157,7 @@ namespace Org.OpenAPITools.Client } } /// - /// Provides a default implementation of an Api client (both synchronous and asynchronous implementatios), + /// Provides a default implementation of an Api client (both synchronous and asynchronous implementations), /// encapsulating general REST accessor use cases. /// public partial class ApiClient : ISynchronousClient, IAsynchronousClient @@ -166,7 +166,7 @@ namespace Org.OpenAPITools.Client /// /// Specifies the settings on a object. - /// These settings can be adjusted to accomodate custom serialization rules. + /// These settings can be adjusted to accommodate custom serialization rules. /// public JsonSerializerSettings SerializerSettings { get; set; } = new JsonSerializerSettings { diff --git a/samples/client/petstore/csharp-netcore-functions/generatedSrc/Client/Configuration.cs b/samples/client/petstore/csharp-netcore-functions/generatedSrc/Client/Configuration.cs index 896bd754ea..897d5a1c66 100644 --- a/samples/client/petstore/csharp-netcore-functions/generatedSrc/Client/Configuration.cs +++ b/samples/client/petstore/csharp-netcore-functions/generatedSrc/Client/Configuration.cs @@ -71,7 +71,7 @@ namespace Org.OpenAPITools.Client /// /// Gets or sets the API key based on the authentication name. - /// This is the key and value comprising the "secret" for acessing an API. + /// This is the key and value comprising the "secret" for accessing an API. /// /// The API key. private IDictionary _apiKey; @@ -425,7 +425,7 @@ namespace Org.OpenAPITools.Client } else { - // use defualt value + // use default value url = url.Replace("{" + variable.Key + "}", (string)serverVariables["default_value"]); } } diff --git a/samples/client/petstore/csharp-netcore-functions/git_push.sh b/samples/client/petstore/csharp-netcore-functions/git_push.sh index ced3be2b0c..200e975d21 100644 --- a/samples/client/petstore/csharp-netcore-functions/git_push.sh +++ b/samples/client/petstore/csharp-netcore-functions/git_push.sh @@ -1,7 +1,7 @@ #!/bin/sh # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ # -# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" git_user_id=$1 git_repo_id=$2 diff --git a/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/Client/ApiClient.cs index 4f68a59871..fe4dcf5a24 100644 --- a/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/Client/ApiClient.cs +++ b/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/Client/ApiClient.cs @@ -157,7 +157,7 @@ namespace Org.OpenAPITools.Client } } /// - /// Provides a default implementation of an Api client (both synchronous and asynchronous implementatios), + /// Provides a default implementation of an Api client (both synchronous and asynchronous implementations), /// encapsulating general REST accessor use cases. /// public partial class ApiClient : ISynchronousClient, IAsynchronousClient @@ -166,7 +166,7 @@ namespace Org.OpenAPITools.Client /// /// Specifies the settings on a object. - /// These settings can be adjusted to accomodate custom serialization rules. + /// These settings can be adjusted to accommodate custom serialization rules. /// public JsonSerializerSettings SerializerSettings { get; set; } = new JsonSerializerSettings { diff --git a/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/Client/Configuration.cs b/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/Client/Configuration.cs index 896bd754ea..897d5a1c66 100644 --- a/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/Client/Configuration.cs +++ b/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/Client/Configuration.cs @@ -71,7 +71,7 @@ namespace Org.OpenAPITools.Client /// /// Gets or sets the API key based on the authentication name. - /// This is the key and value comprising the "secret" for acessing an API. + /// This is the key and value comprising the "secret" for accessing an API. /// /// The API key. private IDictionary _apiKey; @@ -425,7 +425,7 @@ namespace Org.OpenAPITools.Client } else { - // use defualt value + // use default value url = url.Replace("{" + variable.Key + "}", (string)serverVariables["default_value"]); } } diff --git a/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/Client/IReadableConfiguration.cs b/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/Client/IReadableConfiguration.cs index 00bedba8ee..cd8f3fdb1f 100644 --- a/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/Client/IReadableConfiguration.cs +++ b/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/Client/IReadableConfiguration.cs @@ -47,7 +47,7 @@ namespace Org.OpenAPITools.Client /// /// Gets the date time format. /// - /// Date time foramt. + /// Date time format. string DateTimeFormat { get; } /// diff --git a/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/Client/RequestOptions.cs b/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/Client/RequestOptions.cs index c6b3ccc38f..a637740877 100644 --- a/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/Client/RequestOptions.cs +++ b/samples/client/petstore/csharp-netcore-functions/src/Org.OpenAPITools/Client/RequestOptions.cs @@ -33,7 +33,7 @@ namespace Org.OpenAPITools.Client public Multimap QueryParameters { get; set; } /// - /// Header parameters to be applied to to the request. + /// Header parameters to be applied to the request. /// Keys may have 1 or more values associated. /// public Multimap HeaderParameters { get; set; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/FakeApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/FakeApi.md index 46d135e359..212d1d35c4 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/FakeApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/FakeApi.md @@ -1121,7 +1121,7 @@ void (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **400** | Someting wrong | - | +| **400** | Something wrong | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/StoreApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/StoreApi.md index 95bbe1b2f1..de4414feaf 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/StoreApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/StoreApi.md @@ -194,7 +194,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```csharp diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Api/StoreApi.cs index e01ed16258..e8bed0a150 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Api/StoreApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Api/StoreApi.cs @@ -75,7 +75,7 @@ namespace Org.OpenAPITools.Api /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -87,7 +87,7 @@ namespace Org.OpenAPITools.Api /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -175,7 +175,7 @@ namespace Org.OpenAPITools.Api /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -188,7 +188,7 @@ namespace Org.OpenAPITools.Api /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -618,7 +618,7 @@ namespace Org.OpenAPITools.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -631,7 +631,7 @@ namespace Org.OpenAPITools.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -683,7 +683,7 @@ namespace Org.OpenAPITools.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -697,7 +697,7 @@ namespace Org.OpenAPITools.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Client/RequestOptions.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Client/RequestOptions.cs index 4c26cf69b2..f5e02e93f0 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Client/RequestOptions.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Client/RequestOptions.cs @@ -33,7 +33,7 @@ namespace Org.OpenAPITools.Client public Multimap QueryParameters { get; set; } /// - /// Header parameters to be applied to to the request. + /// Header parameters to be applied to the request. /// Keys may have 1 or more values associated. /// public Multimap HeaderParameters { get; set; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/README.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/README.md index 2ecf1cd41c..b2a159fd0a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/README.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/README.md @@ -216,7 +216,7 @@ Authentication schemes defined for the API: - modelTests: true - withXml: -## [OpenApi Generator Parameteres](https://openapi-generator.tech/docs/generators/csharp-netcore) +## [OpenApi Generator Parameters](https://openapi-generator.tech/docs/generators/csharp-netcore) - allowUnicodeIdentifiers: - apiName: Api - caseInsensitiveResponseHeaders: diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/apis/FakeApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/apis/FakeApi.md index c1202fdbf3..a179355d60 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/apis/FakeApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/apis/FakeApi.md @@ -1121,7 +1121,7 @@ void (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **400** | Someting wrong | - | +| **400** | Something wrong | - | [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/apis/StoreApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/apis/StoreApi.md index 04c9407eb4..aa0a568fc5 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/apis/StoreApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/apis/StoreApi.md @@ -194,7 +194,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```csharp diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/scripts/git_push.ps1 b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/scripts/git_push.ps1 index 0a2d4e5228..73ed35c2bb 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/scripts/git_push.ps1 +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/scripts/git_push.ps1 @@ -49,7 +49,7 @@ Set-StrictMode -Version 3.0 if ($Help){ Write-Output " This script will initialize a git repository, then add and commit all files. - The local repository will then be pushed to your prefered git provider. + The local repository will then be pushed to your preferred git provider. If the remote repository does not exist yet and you are using GitHub, the repository will be created for you provided you have the GitHub CLI installed. diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/AnotherFakeApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/AnotherFakeApi.cs index 7c19f93d3d..87be0ad41e 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/AnotherFakeApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/AnotherFakeApi.cs @@ -240,7 +240,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -255,7 +255,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/DefaultApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/DefaultApi.cs index 1f9ed0913d..74a3ab0165 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/DefaultApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/DefaultApi.cs @@ -214,7 +214,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -229,7 +229,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/FakeApi.cs index da538a367b..56d7a03ec3 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/FakeApi.cs @@ -808,7 +808,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -823,7 +823,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -927,7 +927,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -942,7 +942,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -1046,7 +1046,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -1061,7 +1061,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -1165,7 +1165,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -1180,7 +1180,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -1284,7 +1284,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -1299,7 +1299,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -1387,7 +1387,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -1402,7 +1402,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -1504,7 +1504,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -1519,7 +1519,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -1633,7 +1633,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -1648,7 +1648,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -1759,7 +1759,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -1774,7 +1774,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -1974,7 +1974,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -1992,7 +1992,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -2139,7 +2139,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -2154,7 +2154,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -2290,7 +2290,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -2308,7 +2308,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -2410,7 +2410,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -2425,7 +2425,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -2541,7 +2541,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -2556,7 +2556,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -2679,7 +2679,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -2694,7 +2694,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs index c73a450136..631e6abe15 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs @@ -252,7 +252,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -270,7 +270,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/PetApi.cs index d54ddb22b1..b86139fcd5 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/PetApi.cs @@ -557,7 +557,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -578,7 +578,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -682,7 +682,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -700,7 +700,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -821,7 +821,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -842,7 +842,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -963,7 +963,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -984,7 +984,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -1092,7 +1092,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -1110,7 +1110,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -1229,7 +1229,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -1250,7 +1250,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -1377,7 +1377,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -1395,7 +1395,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -1531,7 +1531,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -1549,7 +1549,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -1688,7 +1688,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -1706,7 +1706,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/StoreApi.cs index d09c3633b5..1d07247d8e 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/StoreApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/StoreApi.cs @@ -101,7 +101,7 @@ namespace Org.OpenAPITools.Api /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -113,7 +113,7 @@ namespace Org.OpenAPITools.Api /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -125,7 +125,7 @@ namespace Org.OpenAPITools.Api /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// ID of pet that needs to be fetched /// Cancellation Token to cancel the request. @@ -324,7 +324,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -339,7 +339,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -435,7 +435,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -453,13 +453,13 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -476,7 +476,7 @@ namespace Org.OpenAPITools.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -499,7 +499,7 @@ namespace Org.OpenAPITools.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -553,7 +553,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -568,7 +568,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -680,7 +680,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -695,7 +695,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/UserApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/UserApi.cs index 8e886e254d..1d51468c10 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/UserApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/UserApi.cs @@ -486,7 +486,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -501,7 +501,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -603,7 +603,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -618,7 +618,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -720,7 +720,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -735,7 +735,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -825,7 +825,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -840,7 +840,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -940,7 +940,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -955,7 +955,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -1067,7 +1067,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -1082,7 +1082,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -1161,7 +1161,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -1176,7 +1176,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -1285,7 +1285,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -1300,7 +1300,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/ApiException.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/ApiException.cs index 067639ab9f..7627452401 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/ApiException.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/ApiException.cs @@ -35,7 +35,7 @@ namespace Org.OpenAPITools.Client public string RawContent { get; } /// - /// Construct the ApiException from parts of the reponse + /// Construct the ApiException from parts of the response /// /// /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/ApiResponse`1.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/ApiResponse`1.cs index 78a0047905..36696f85be 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/ApiResponse`1.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/ApiResponse`1.cs @@ -87,7 +87,7 @@ namespace Org.OpenAPITools.Client #endregion Properties /// - /// Construct the reponse using an HttpResponseMessage + /// Construct the response using an HttpResponseMessage /// /// /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs index 0c4101dd74..eb4b80c874 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs @@ -196,7 +196,7 @@ namespace Org.OpenAPITools.Client foreach (var keyVal in httpSignatureHeader) headerValuesList.Add(string.Format("{0}: {1}", keyVal.Key, keyVal.Value)); - //Concatinate headers value separated by new line + //Concatenate headers value separated by new line var headerValuesString = string.Join("\n", headerValuesList); var signatureStringHash = GetStringHash(HashAlgorithm.ToString(), headerValuesString); string? headerSignatureStr = null; @@ -324,7 +324,7 @@ namespace Org.OpenAPITools.Client private byte[] ConvertToECDSAANS1Format(byte[] signedBytes) { var derBytes = new List(); - byte derLength = 68; //default lenght for ECDSA code signinged bit 0x44 + byte derLength = 68; //default length for ECDSA code signing bit 0x44 byte rbytesLength = 32; //R length 0x20 byte sbytesLength = 32; //S length 0x20 var rBytes = new List(); @@ -359,7 +359,7 @@ namespace Org.OpenAPITools.Client } derBytes.Add(48); //start of the sequence 0x30 - derBytes.Add(derLength); //total length r lenth, type and r bytes + derBytes.Add(derLength); //total length r length, type and r bytes derBytes.Add(2); //tag for integer derBytes.Add(rbytesLength); //length of r @@ -371,7 +371,7 @@ namespace Org.OpenAPITools.Client return derBytes.ToArray(); } - private RSACryptoServiceProvider? GetRSAProviderFromPemFile(String pemfile, SecureString? keyPassPharse = null) + private RSACryptoServiceProvider? GetRSAProviderFromPemFile(String pemfile, SecureString? keyPassPhrase = null) { const String pempubheader = "-----BEGIN PUBLIC KEY-----"; const String pempubfooter = "-----END PUBLIC KEY-----"; @@ -388,7 +388,7 @@ namespace Org.OpenAPITools.Client if (isPrivateKeyFile) { - pemkey = ConvertPrivateKeyToBytes(pemstr, keyPassPharse); + pemkey = ConvertPrivateKeyToBytes(pemstr, keyPassPhrase); if (pemkey == null) return null; @@ -398,7 +398,7 @@ namespace Org.OpenAPITools.Client return null; } - private byte[]? ConvertPrivateKeyToBytes(String instr, SecureString? keyPassPharse = null) + private byte[]? ConvertPrivateKeyToBytes(String instr, SecureString? keyPassPhrase = null) { const String pemprivheader = "-----BEGIN RSA PRIVATE KEY-----"; const String pemprivfooter = "-----END RSA PRIVATE KEY-----"; @@ -446,12 +446,12 @@ namespace Org.OpenAPITools.Client binkey = Convert.FromBase64String(encryptedstr); } catch (System.FormatException) - { //data is not in base64 fromat + { //data is not in base64 format return null; } - // TODO: what do we do here if keyPassPharse is null? - byte[] deskey = GetEncryptedKey(salt, keyPassPharse!, 1, 2); // count=1 (for OpenSSL implementation); 2 iterations to get at least 24 bytes + // TODO: what do we do here if keyPassPhrase is null? + byte[] deskey = GetEncryptedKey(salt, keyPassPhrase!, 1, 2); // count=1 (for OpenSSL implementation); 2 iterations to get at least 24 bytes if (deskey == null) return null; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/README.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/README.md index c109d03e6f..6c332bb5d1 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/README.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/README.md @@ -216,7 +216,7 @@ Authentication schemes defined for the API: - modelTests: true - withXml: -## [OpenApi Generator Parameteres](https://openapi-generator.tech/docs/generators/csharp-netcore) +## [OpenApi Generator Parameters](https://openapi-generator.tech/docs/generators/csharp-netcore) - allowUnicodeIdentifiers: - apiName: Api - caseInsensitiveResponseHeaders: diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/apis/FakeApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/apis/FakeApi.md index dd5e3225a6..f17e38282a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/apis/FakeApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/apis/FakeApi.md @@ -1121,7 +1121,7 @@ void (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **400** | Someting wrong | - | +| **400** | Something wrong | - | [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/apis/StoreApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/apis/StoreApi.md index 04c9407eb4..aa0a568fc5 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/apis/StoreApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/apis/StoreApi.md @@ -194,7 +194,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```csharp diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/scripts/git_push.ps1 b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/scripts/git_push.ps1 index 0a2d4e5228..73ed35c2bb 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/scripts/git_push.ps1 +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/scripts/git_push.ps1 @@ -49,7 +49,7 @@ Set-StrictMode -Version 3.0 if ($Help){ Write-Output " This script will initialize a git repository, then add and commit all files. - The local repository will then be pushed to your prefered git provider. + The local repository will then be pushed to your preferred git provider. If the remote repository does not exist yet and you are using GitHub, the repository will be created for you provided you have the GitHub CLI installed. diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/AnotherFakeApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/AnotherFakeApi.cs index bfbb57aac8..428a326e69 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/AnotherFakeApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/AnotherFakeApi.cs @@ -225,7 +225,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -240,7 +240,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/DefaultApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/DefaultApi.cs index 7877e961c2..78cd568166 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/DefaultApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/DefaultApi.cs @@ -200,7 +200,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -215,7 +215,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/FakeApi.cs index 23fd9c57a9..0f8c448ecd 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/FakeApi.cs @@ -582,7 +582,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -597,7 +597,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -680,7 +680,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -695,7 +695,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -799,7 +799,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -814,7 +814,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -897,7 +897,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -912,7 +912,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -995,7 +995,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -1010,7 +1010,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -1098,7 +1098,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -1113,7 +1113,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -1215,7 +1215,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -1230,7 +1230,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -1344,7 +1344,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -1359,7 +1359,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -1470,7 +1470,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -1485,7 +1485,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -1679,7 +1679,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -1697,7 +1697,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -1844,7 +1844,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -1859,7 +1859,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -1986,7 +1986,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -2004,7 +2004,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -2106,7 +2106,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -2121,7 +2121,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -2237,7 +2237,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -2252,7 +2252,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -2375,7 +2375,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -2390,7 +2390,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs index 05debff86a..321be9fcde 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs @@ -237,7 +237,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -255,7 +255,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/PetApi.cs index 8f01a7fc36..53546aadb1 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/PetApi.cs @@ -431,7 +431,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -452,7 +452,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -553,7 +553,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -571,7 +571,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -692,7 +692,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -713,7 +713,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -834,7 +834,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -855,7 +855,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -960,7 +960,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -978,7 +978,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -1097,7 +1097,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -1118,7 +1118,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -1242,7 +1242,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -1260,7 +1260,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -1393,7 +1393,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -1411,7 +1411,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -1547,7 +1547,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -1565,7 +1565,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/StoreApi.cs index cee9bd767c..e8a5a11078 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/StoreApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/StoreApi.cs @@ -74,7 +74,7 @@ namespace Org.OpenAPITools.Api /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -86,7 +86,7 @@ namespace Org.OpenAPITools.Api /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -271,7 +271,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -286,7 +286,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -362,7 +362,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -380,13 +380,13 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -403,7 +403,7 @@ namespace Org.OpenAPITools.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -426,7 +426,7 @@ namespace Org.OpenAPITools.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -477,7 +477,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -492,7 +492,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -604,7 +604,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -619,7 +619,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/UserApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/UserApi.cs index f117a118b3..4c1b0c6846 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/UserApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/UserApi.cs @@ -379,7 +379,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -394,7 +394,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -496,7 +496,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -511,7 +511,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -613,7 +613,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -628,7 +628,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -718,7 +718,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -733,7 +733,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -833,7 +833,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -848,7 +848,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -938,7 +938,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -953,7 +953,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -1032,7 +1032,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -1047,7 +1047,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -1156,7 +1156,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -1171,7 +1171,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/ApiException.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/ApiException.cs index 5728b5976d..fdd11dd19c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/ApiException.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/ApiException.cs @@ -33,7 +33,7 @@ namespace Org.OpenAPITools.Client public string RawContent { get; } /// - /// Construct the ApiException from parts of the reponse + /// Construct the ApiException from parts of the response /// /// /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/ApiResponse`1.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/ApiResponse`1.cs index 85b2801ccb..3bae0aaa6a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/ApiResponse`1.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/ApiResponse`1.cs @@ -85,7 +85,7 @@ namespace Org.OpenAPITools.Client #endregion Properties /// - /// Construct the reponse using an HttpResponseMessage + /// Construct the response using an HttpResponseMessage /// /// /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs index c06ba4c50a..2b5ac96e1c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs @@ -194,7 +194,7 @@ namespace Org.OpenAPITools.Client foreach (var keyVal in httpSignatureHeader) headerValuesList.Add(string.Format("{0}: {1}", keyVal.Key, keyVal.Value)); - //Concatinate headers value separated by new line + //Concatenate headers value separated by new line var headerValuesString = string.Join("\n", headerValuesList); var signatureStringHash = GetStringHash(HashAlgorithm.ToString(), headerValuesString); string headerSignatureStr = null; @@ -322,7 +322,7 @@ namespace Org.OpenAPITools.Client private byte[] ConvertToECDSAANS1Format(byte[] signedBytes) { var derBytes = new List(); - byte derLength = 68; //default lenght for ECDSA code signinged bit 0x44 + byte derLength = 68; //default length for ECDSA code signing bit 0x44 byte rbytesLength = 32; //R length 0x20 byte sbytesLength = 32; //S length 0x20 var rBytes = new List(); @@ -357,7 +357,7 @@ namespace Org.OpenAPITools.Client } derBytes.Add(48); //start of the sequence 0x30 - derBytes.Add(derLength); //total length r lenth, type and r bytes + derBytes.Add(derLength); //total length r length, type and r bytes derBytes.Add(2); //tag for integer derBytes.Add(rbytesLength); //length of r @@ -369,7 +369,7 @@ namespace Org.OpenAPITools.Client return derBytes.ToArray(); } - private RSACryptoServiceProvider GetRSAProviderFromPemFile(String pemfile, SecureString keyPassPharse = null) + private RSACryptoServiceProvider GetRSAProviderFromPemFile(String pemfile, SecureString keyPassPhrase = null) { const String pempubheader = "-----BEGIN PUBLIC KEY-----"; const String pempubfooter = "-----END PUBLIC KEY-----"; @@ -386,7 +386,7 @@ namespace Org.OpenAPITools.Client if (isPrivateKeyFile) { - pemkey = ConvertPrivateKeyToBytes(pemstr, keyPassPharse); + pemkey = ConvertPrivateKeyToBytes(pemstr, keyPassPhrase); if (pemkey == null) return null; @@ -396,7 +396,7 @@ namespace Org.OpenAPITools.Client return null; } - private byte[] ConvertPrivateKeyToBytes(String instr, SecureString keyPassPharse = null) + private byte[] ConvertPrivateKeyToBytes(String instr, SecureString keyPassPhrase = null) { const String pemprivheader = "-----BEGIN RSA PRIVATE KEY-----"; const String pemprivfooter = "-----END RSA PRIVATE KEY-----"; @@ -444,12 +444,12 @@ namespace Org.OpenAPITools.Client binkey = Convert.FromBase64String(encryptedstr); } catch (System.FormatException) - { //data is not in base64 fromat + { //data is not in base64 format return null; } - // TODO: what do we do here if keyPassPharse is null? - byte[] deskey = GetEncryptedKey(salt, keyPassPharse, 1, 2); // count=1 (for OpenSSL implementation); 2 iterations to get at least 24 bytes + // TODO: what do we do here if keyPassPhrase is null? + byte[] deskey = GetEncryptedKey(salt, keyPassPhrase, 1, 2); // count=1 (for OpenSSL implementation); 2 iterations to get at least 24 bytes if (deskey == null) return null; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/README.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/README.md index 5680ae8cbc..a8ac54da0c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/README.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/README.md @@ -216,7 +216,7 @@ Authentication schemes defined for the API: - modelTests: true - withXml: -## [OpenApi Generator Parameteres](https://openapi-generator.tech/docs/generators/csharp-netcore) +## [OpenApi Generator Parameters](https://openapi-generator.tech/docs/generators/csharp-netcore) - allowUnicodeIdentifiers: - apiName: Api - caseInsensitiveResponseHeaders: diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/apis/FakeApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/apis/FakeApi.md index dd5e3225a6..f17e38282a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/apis/FakeApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/apis/FakeApi.md @@ -1121,7 +1121,7 @@ void (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **400** | Someting wrong | - | +| **400** | Something wrong | - | [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/apis/StoreApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/apis/StoreApi.md index 04c9407eb4..aa0a568fc5 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/apis/StoreApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/apis/StoreApi.md @@ -194,7 +194,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```csharp diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/scripts/git_push.ps1 b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/scripts/git_push.ps1 index 0a2d4e5228..73ed35c2bb 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/scripts/git_push.ps1 +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/scripts/git_push.ps1 @@ -49,7 +49,7 @@ Set-StrictMode -Version 3.0 if ($Help){ Write-Output " This script will initialize a git repository, then add and commit all files. - The local repository will then be pushed to your prefered git provider. + The local repository will then be pushed to your preferred git provider. If the remote repository does not exist yet and you are using GitHub, the repository will be created for you provided you have the GitHub CLI installed. diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/AnotherFakeApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/AnotherFakeApi.cs index 59670fb4cb..b2b9905d3a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/AnotherFakeApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/AnotherFakeApi.cs @@ -225,7 +225,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -240,7 +240,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/DefaultApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/DefaultApi.cs index ea2f1ced70..2f874775c6 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/DefaultApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/DefaultApi.cs @@ -200,7 +200,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -215,7 +215,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/FakeApi.cs index cad800bddf..f9f02ecc21 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/FakeApi.cs @@ -582,7 +582,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -597,7 +597,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -680,7 +680,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -695,7 +695,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -799,7 +799,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -814,7 +814,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -897,7 +897,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -912,7 +912,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -995,7 +995,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -1010,7 +1010,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -1098,7 +1098,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -1113,7 +1113,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -1215,7 +1215,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -1230,7 +1230,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -1344,7 +1344,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -1359,7 +1359,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -1470,7 +1470,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -1485,7 +1485,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -1679,7 +1679,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -1697,7 +1697,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -1844,7 +1844,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -1859,7 +1859,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -1986,7 +1986,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -2004,7 +2004,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -2106,7 +2106,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -2121,7 +2121,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -2237,7 +2237,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -2252,7 +2252,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -2375,7 +2375,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -2390,7 +2390,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs index 528e98484d..4b51987ecd 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs @@ -237,7 +237,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -255,7 +255,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/PetApi.cs index dda60de460..c8249afbb4 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/PetApi.cs @@ -431,7 +431,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -452,7 +452,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -553,7 +553,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -571,7 +571,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -692,7 +692,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -713,7 +713,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -834,7 +834,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -855,7 +855,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -960,7 +960,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -978,7 +978,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -1097,7 +1097,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -1118,7 +1118,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -1242,7 +1242,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -1260,7 +1260,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -1393,7 +1393,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -1411,7 +1411,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -1547,7 +1547,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -1565,7 +1565,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/StoreApi.cs index 0c0066afae..a0be4ccdaf 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/StoreApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/StoreApi.cs @@ -74,7 +74,7 @@ namespace Org.OpenAPITools.Api /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -86,7 +86,7 @@ namespace Org.OpenAPITools.Api /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -271,7 +271,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -286,7 +286,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -362,7 +362,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -380,13 +380,13 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -403,7 +403,7 @@ namespace Org.OpenAPITools.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -426,7 +426,7 @@ namespace Org.OpenAPITools.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -477,7 +477,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -492,7 +492,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -604,7 +604,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -619,7 +619,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/UserApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/UserApi.cs index 921dc7c29e..554608a79a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/UserApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/UserApi.cs @@ -379,7 +379,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -394,7 +394,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -496,7 +496,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -511,7 +511,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -613,7 +613,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -628,7 +628,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -718,7 +718,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -733,7 +733,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -833,7 +833,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -848,7 +848,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -938,7 +938,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -953,7 +953,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -1032,7 +1032,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -1047,7 +1047,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } @@ -1156,7 +1156,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while invoking ApiResponded."); + Logger.LogError(e, "An error occurred while invoking ApiResponded."); } } @@ -1171,7 +1171,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occured while sending the request to the server."); + Logger.LogError(e, "An error occurred while sending the request to the server."); throw; } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/ApiException.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/ApiException.cs index 5728b5976d..fdd11dd19c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/ApiException.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/ApiException.cs @@ -33,7 +33,7 @@ namespace Org.OpenAPITools.Client public string RawContent { get; } /// - /// Construct the ApiException from parts of the reponse + /// Construct the ApiException from parts of the response /// /// /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/ApiResponse`1.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/ApiResponse`1.cs index 85b2801ccb..3bae0aaa6a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/ApiResponse`1.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/ApiResponse`1.cs @@ -85,7 +85,7 @@ namespace Org.OpenAPITools.Client #endregion Properties /// - /// Construct the reponse using an HttpResponseMessage + /// Construct the response using an HttpResponseMessage /// /// /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs index c06ba4c50a..2b5ac96e1c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs @@ -194,7 +194,7 @@ namespace Org.OpenAPITools.Client foreach (var keyVal in httpSignatureHeader) headerValuesList.Add(string.Format("{0}: {1}", keyVal.Key, keyVal.Value)); - //Concatinate headers value separated by new line + //Concatenate headers value separated by new line var headerValuesString = string.Join("\n", headerValuesList); var signatureStringHash = GetStringHash(HashAlgorithm.ToString(), headerValuesString); string headerSignatureStr = null; @@ -322,7 +322,7 @@ namespace Org.OpenAPITools.Client private byte[] ConvertToECDSAANS1Format(byte[] signedBytes) { var derBytes = new List(); - byte derLength = 68; //default lenght for ECDSA code signinged bit 0x44 + byte derLength = 68; //default length for ECDSA code signing bit 0x44 byte rbytesLength = 32; //R length 0x20 byte sbytesLength = 32; //S length 0x20 var rBytes = new List(); @@ -357,7 +357,7 @@ namespace Org.OpenAPITools.Client } derBytes.Add(48); //start of the sequence 0x30 - derBytes.Add(derLength); //total length r lenth, type and r bytes + derBytes.Add(derLength); //total length r length, type and r bytes derBytes.Add(2); //tag for integer derBytes.Add(rbytesLength); //length of r @@ -369,7 +369,7 @@ namespace Org.OpenAPITools.Client return derBytes.ToArray(); } - private RSACryptoServiceProvider GetRSAProviderFromPemFile(String pemfile, SecureString keyPassPharse = null) + private RSACryptoServiceProvider GetRSAProviderFromPemFile(String pemfile, SecureString keyPassPhrase = null) { const String pempubheader = "-----BEGIN PUBLIC KEY-----"; const String pempubfooter = "-----END PUBLIC KEY-----"; @@ -386,7 +386,7 @@ namespace Org.OpenAPITools.Client if (isPrivateKeyFile) { - pemkey = ConvertPrivateKeyToBytes(pemstr, keyPassPharse); + pemkey = ConvertPrivateKeyToBytes(pemstr, keyPassPhrase); if (pemkey == null) return null; @@ -396,7 +396,7 @@ namespace Org.OpenAPITools.Client return null; } - private byte[] ConvertPrivateKeyToBytes(String instr, SecureString keyPassPharse = null) + private byte[] ConvertPrivateKeyToBytes(String instr, SecureString keyPassPhrase = null) { const String pemprivheader = "-----BEGIN RSA PRIVATE KEY-----"; const String pemprivfooter = "-----END RSA PRIVATE KEY-----"; @@ -444,12 +444,12 @@ namespace Org.OpenAPITools.Client binkey = Convert.FromBase64String(encryptedstr); } catch (System.FormatException) - { //data is not in base64 fromat + { //data is not in base64 format return null; } - // TODO: what do we do here if keyPassPharse is null? - byte[] deskey = GetEncryptedKey(salt, keyPassPharse, 1, 2); // count=1 (for OpenSSL implementation); 2 iterations to get at least 24 bytes + // TODO: what do we do here if keyPassPhrase is null? + byte[] deskey = GetEncryptedKey(salt, keyPassPhrase, 1, 2); // count=1 (for OpenSSL implementation); 2 iterations to get at least 24 bytes if (deskey == null) return null; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/FakeApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/FakeApi.md index 53a8b4e4eb..3f38af8889 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/FakeApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/FakeApi.md @@ -1169,7 +1169,7 @@ void (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **400** | Someting wrong | - | +| **400** | Something wrong | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/StoreApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/StoreApi.md index 449b73a0a5..7ed28712f8 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/StoreApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/StoreApi.md @@ -202,7 +202,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```csharp diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools.Test/Api/PetApiTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools.Test/Api/PetApiTests.cs index 1af712abb4..f0b0873989 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools.Test/Api/PetApiTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools.Test/Api/PetApiTests.cs @@ -36,7 +36,7 @@ namespace Org.OpenAPITools.Test private PetApi instance; private long petId = 11088; - private long notExsistentPetId = 99999; + private long notExistentPetId = 99999; /// /// Create a Pet object @@ -206,7 +206,7 @@ namespace Org.OpenAPITools.Test } /// - /// Test GetPetById on an not existent Id + /// Test GetPetById on a non-existent Id /// [Fact] public void TestGetPetById_TestException() @@ -215,7 +215,7 @@ namespace Org.OpenAPITools.Test var exception = Assert.Throws(() => { - petApi.GetPetById(notExsistentPetId); + petApi.GetPetById(notExistentPetId); }); Assert.IsType(exception); @@ -233,7 +233,7 @@ namespace Org.OpenAPITools.Test Assert.IsType(response); StreamReader reader = new StreamReader(response); // the following will fail for sure - //Assert.Equal("someting", reader.ReadToEnd()); + //Assert.Equal("something", reader.ReadToEnd()); } */ @@ -273,7 +273,7 @@ namespace Org.OpenAPITools.Test { PetApi petApi = new PetApi(); petApi.ExceptionFactory = null; - var response = petApi.GetPetByIdWithHttpInfoAsync(notExsistentPetId).Result; + var response = petApi.GetPetByIdWithHttpInfoAsync(notExistentPetId).Result; Pet result = response.Data; Assert.IsType>(response); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Api/StoreApi.cs index 37ab94173a..c3378fb12a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Api/StoreApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Api/StoreApi.cs @@ -71,7 +71,7 @@ namespace Org.OpenAPITools.Api /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -82,7 +82,7 @@ namespace Org.OpenAPITools.Api /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -163,7 +163,7 @@ namespace Org.OpenAPITools.Api /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -175,7 +175,7 @@ namespace Org.OpenAPITools.Api /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -641,7 +641,7 @@ namespace Org.OpenAPITools.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -653,7 +653,7 @@ namespace Org.OpenAPITools.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -693,7 +693,7 @@ namespace Org.OpenAPITools.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -706,7 +706,7 @@ namespace Org.OpenAPITools.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Client/RequestOptions.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Client/RequestOptions.cs index 70b67cb259..50e0c8e017 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Client/RequestOptions.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Client/RequestOptions.cs @@ -33,7 +33,7 @@ namespace Org.OpenAPITools.Client public Multimap QueryParameters { get; set; } /// - /// Header parameters to be applied to to the request. + /// Header parameters to be applied to the request. /// Keys may have 1 or more values associated. /// public Multimap HeaderParameters { get; set; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/FakeApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/FakeApi.md index 46d135e359..212d1d35c4 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/FakeApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/FakeApi.md @@ -1121,7 +1121,7 @@ void (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **400** | Someting wrong | - | +| **400** | Something wrong | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/StoreApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/StoreApi.md index 95bbe1b2f1..de4414feaf 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/StoreApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/StoreApi.md @@ -194,7 +194,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```csharp diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Api/StoreApi.cs index e01ed16258..e8bed0a150 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Api/StoreApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Api/StoreApi.cs @@ -75,7 +75,7 @@ namespace Org.OpenAPITools.Api /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -87,7 +87,7 @@ namespace Org.OpenAPITools.Api /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -175,7 +175,7 @@ namespace Org.OpenAPITools.Api /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -188,7 +188,7 @@ namespace Org.OpenAPITools.Api /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -618,7 +618,7 @@ namespace Org.OpenAPITools.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -631,7 +631,7 @@ namespace Org.OpenAPITools.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -683,7 +683,7 @@ namespace Org.OpenAPITools.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -697,7 +697,7 @@ namespace Org.OpenAPITools.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Client/RequestOptions.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Client/RequestOptions.cs index 4c26cf69b2..f5e02e93f0 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Client/RequestOptions.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Client/RequestOptions.cs @@ -33,7 +33,7 @@ namespace Org.OpenAPITools.Client public Multimap QueryParameters { get; set; } /// - /// Header parameters to be applied to to the request. + /// Header parameters to be applied to the request. /// Keys may have 1 or more values associated. /// public Multimap HeaderParameters { get; set; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/docs/FakeApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/docs/FakeApi.md index 46d135e359..212d1d35c4 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/docs/FakeApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/docs/FakeApi.md @@ -1121,7 +1121,7 @@ void (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **400** | Someting wrong | - | +| **400** | Something wrong | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/docs/StoreApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/docs/StoreApi.md index 95bbe1b2f1..de4414feaf 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/docs/StoreApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/docs/StoreApi.md @@ -194,7 +194,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```csharp diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/src/Org.OpenAPITools/Api/StoreApi.cs index e01ed16258..e8bed0a150 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/src/Org.OpenAPITools/Api/StoreApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/src/Org.OpenAPITools/Api/StoreApi.cs @@ -75,7 +75,7 @@ namespace Org.OpenAPITools.Api /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -87,7 +87,7 @@ namespace Org.OpenAPITools.Api /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -175,7 +175,7 @@ namespace Org.OpenAPITools.Api /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -188,7 +188,7 @@ namespace Org.OpenAPITools.Api /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -618,7 +618,7 @@ namespace Org.OpenAPITools.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -631,7 +631,7 @@ namespace Org.OpenAPITools.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -683,7 +683,7 @@ namespace Org.OpenAPITools.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -697,7 +697,7 @@ namespace Org.OpenAPITools.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/src/Org.OpenAPITools/Client/RequestOptions.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/src/Org.OpenAPITools/Client/RequestOptions.cs index 4c26cf69b2..f5e02e93f0 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/src/Org.OpenAPITools/Client/RequestOptions.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/src/Org.OpenAPITools/Client/RequestOptions.cs @@ -33,7 +33,7 @@ namespace Org.OpenAPITools.Client public Multimap QueryParameters { get; set; } /// - /// Header parameters to be applied to to the request. + /// Header parameters to be applied to the request. /// Keys may have 1 or more values associated. /// public Multimap HeaderParameters { get; set; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/FakeApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/FakeApi.md index 46d135e359..212d1d35c4 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/FakeApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/FakeApi.md @@ -1121,7 +1121,7 @@ void (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **400** | Someting wrong | - | +| **400** | Something wrong | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/StoreApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/StoreApi.md index 95bbe1b2f1..de4414feaf 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/StoreApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/StoreApi.md @@ -194,7 +194,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```csharp diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/StoreApi.cs index e01ed16258..e8bed0a150 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/StoreApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/StoreApi.cs @@ -75,7 +75,7 @@ namespace Org.OpenAPITools.Api /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -87,7 +87,7 @@ namespace Org.OpenAPITools.Api /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -175,7 +175,7 @@ namespace Org.OpenAPITools.Api /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -188,7 +188,7 @@ namespace Org.OpenAPITools.Api /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -618,7 +618,7 @@ namespace Org.OpenAPITools.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -631,7 +631,7 @@ namespace Org.OpenAPITools.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -683,7 +683,7 @@ namespace Org.OpenAPITools.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -697,7 +697,7 @@ namespace Org.OpenAPITools.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/RequestOptions.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/RequestOptions.cs index 4c26cf69b2..f5e02e93f0 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/RequestOptions.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Client/RequestOptions.cs @@ -33,7 +33,7 @@ namespace Org.OpenAPITools.Client public Multimap QueryParameters { get; set; } /// - /// Header parameters to be applied to to the request. + /// Header parameters to be applied to the request. /// Keys may have 1 or more values associated. /// public Multimap HeaderParameters { get; set; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/FakeApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/FakeApi.md index 46d135e359..212d1d35c4 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/FakeApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/FakeApi.md @@ -1121,7 +1121,7 @@ void (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **400** | Someting wrong | - | +| **400** | Something wrong | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/StoreApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/StoreApi.md index 95bbe1b2f1..de4414feaf 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/StoreApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/StoreApi.md @@ -194,7 +194,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```csharp diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/Api/PetApiTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/Api/PetApiTests.cs index cce6e896f0..04bbe47558 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/Api/PetApiTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/Api/PetApiTests.cs @@ -210,7 +210,7 @@ namespace Org.OpenAPITools.Test Assert.IsType(response); StreamReader reader = new StreamReader(response); // the following will fail for sure - //Assert.Equal("someting", reader.ReadToEnd()); + //Assert.Equal("something", reader.ReadToEnd()); } */ diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/JSONComposedSchemaTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/JSONComposedSchemaTests.cs index 5972909190..00efbb9d16 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/JSONComposedSchemaTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/JSONComposedSchemaTests.cs @@ -152,7 +152,7 @@ namespace Org.OpenAPITools.Test } /// - /// Test additonal properties + /// Test additional properties /// [Fact] public void TestAdditionalProperties() diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/Model/PetTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/Model/PetTests.cs index 927c21ee4b..d514e9a043 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/Model/PetTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/Model/PetTests.cs @@ -106,12 +106,12 @@ namespace Org.OpenAPITools.Test Pet p1 = new Pet(name: "Csharp test", photoUrls: new List { "http://petstore.com/csharp_test" }); Assert.Equal("{\"name\":\"Csharp test\",\"photoUrls\":[\"http://petstore.com/csharp_test\"]}", JsonConvert.SerializeObject(p1)); - // test additonal properties (serialization) + // test additional properties (serialization) Pet p2 = new Pet(name: "Csharp test", photoUrls: new List { "http://petstore.com/csharp_test" }); p2.AdditionalProperties.Add("hello", "world"); Assert.Equal("{\"name\":\"Csharp test\",\"photoUrls\":[\"http://petstore.com/csharp_test\"],\"hello\":\"world\"}", JsonConvert.SerializeObject(p2)); - // test additonal properties (deserialization) + // test additional properties (deserialization) Pet p3 = JsonConvert.DeserializeObject("{\"name\":\"Csharp test\",\"photoUrls\":[\"http://petstore.com/csharp_test\"],\"hello\":\"world\",\"int\":123}"); Assert.Equal("Csharp test", p3.Name); Assert.Equal("world", p3.AdditionalProperties["hello"]); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/StoreApi.cs index e01ed16258..e8bed0a150 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/StoreApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/StoreApi.cs @@ -75,7 +75,7 @@ namespace Org.OpenAPITools.Api /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -87,7 +87,7 @@ namespace Org.OpenAPITools.Api /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -175,7 +175,7 @@ namespace Org.OpenAPITools.Api /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -188,7 +188,7 @@ namespace Org.OpenAPITools.Api /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -618,7 +618,7 @@ namespace Org.OpenAPITools.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -631,7 +631,7 @@ namespace Org.OpenAPITools.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -683,7 +683,7 @@ namespace Org.OpenAPITools.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -697,7 +697,7 @@ namespace Org.OpenAPITools.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/RequestOptions.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/RequestOptions.cs index 4c26cf69b2..f5e02e93f0 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/RequestOptions.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Client/RequestOptions.cs @@ -33,7 +33,7 @@ namespace Org.OpenAPITools.Client public Multimap QueryParameters { get; set; } /// - /// Header parameters to be applied to to the request. + /// Header parameters to be applied to the request. /// Keys may have 1 or more values associated. /// public Multimap HeaderParameters { get; set; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Org.OpenAPITools.nuspec b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Org.OpenAPITools.nuspec index b05e013ebc..130ebd5b7f 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Org.OpenAPITools.nuspec +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Org.OpenAPITools.nuspec @@ -12,7 +12,7 @@ $author$ + users to easily find other packages by the same owners. --> $author$ false false diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/FakeApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/FakeApi.md index 46d135e359..212d1d35c4 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/FakeApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/FakeApi.md @@ -1121,7 +1121,7 @@ void (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **400** | Someting wrong | - | +| **400** | Something wrong | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/StoreApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/StoreApi.md index 95bbe1b2f1..de4414feaf 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/StoreApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/StoreApi.md @@ -194,7 +194,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```csharp diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/StoreApi.cs index e01ed16258..e8bed0a150 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/StoreApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/StoreApi.cs @@ -75,7 +75,7 @@ namespace Org.OpenAPITools.Api /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -87,7 +87,7 @@ namespace Org.OpenAPITools.Api /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -175,7 +175,7 @@ namespace Org.OpenAPITools.Api /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -188,7 +188,7 @@ namespace Org.OpenAPITools.Api /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -618,7 +618,7 @@ namespace Org.OpenAPITools.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -631,7 +631,7 @@ namespace Org.OpenAPITools.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -683,7 +683,7 @@ namespace Org.OpenAPITools.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -697,7 +697,7 @@ namespace Org.OpenAPITools.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/RequestOptions.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/RequestOptions.cs index 4c26cf69b2..f5e02e93f0 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/RequestOptions.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Client/RequestOptions.cs @@ -33,7 +33,7 @@ namespace Org.OpenAPITools.Client public Multimap QueryParameters { get; set; } /// - /// Header parameters to be applied to to the request. + /// Header parameters to be applied to the request. /// Keys may have 1 or more values associated. /// public Multimap HeaderParameters { get; set; } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Org.OpenAPITools.nuspec b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Org.OpenAPITools.nuspec index 4200b72d47..678c8dac49 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Org.OpenAPITools.nuspec +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Org.OpenAPITools.nuspec @@ -12,7 +12,7 @@ $author$ + users to easily find other packages by the same owners. --> $author$ false false diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/docs/StoreApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/docs/StoreApi.md index 019ff47ee0..b8d93abcd2 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/docs/StoreApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/docs/StoreApi.md @@ -194,7 +194,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```csharp diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Api/StoreApi.cs index dd8faec043..3fb02496f7 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Api/StoreApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Api/StoreApi.cs @@ -75,7 +75,7 @@ namespace Org.OpenAPITools.Api /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -87,7 +87,7 @@ namespace Org.OpenAPITools.Api /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -175,7 +175,7 @@ namespace Org.OpenAPITools.Api /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -188,7 +188,7 @@ namespace Org.OpenAPITools.Api /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -618,7 +618,7 @@ namespace Org.OpenAPITools.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -631,7 +631,7 @@ namespace Org.OpenAPITools.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -683,7 +683,7 @@ namespace Org.OpenAPITools.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -697,7 +697,7 @@ namespace Org.OpenAPITools.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Client/RequestOptions.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Client/RequestOptions.cs index aef6b76e95..20366c4e7c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Client/RequestOptions.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools/Client/RequestOptions.cs @@ -33,7 +33,7 @@ namespace Org.OpenAPITools.Client public Multimap QueryParameters { get; set; } /// - /// Header parameters to be applied to to the request. + /// Header parameters to be applied to the request. /// Keys may have 1 or more values associated. /// public Multimap HeaderParameters { get; set; } diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md b/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md index 426116d636..73edec3b9d 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md +++ b/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md @@ -1123,7 +1123,7 @@ void (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **400** | Someting wrong | - | +| **400** | Something wrong | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/StoreApi.md b/samples/client/petstore/csharp/OpenAPIClient/docs/StoreApi.md index 3a452bc4d6..f38f751867 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/StoreApi.md +++ b/samples/client/petstore/csharp/OpenAPIClient/docs/StoreApi.md @@ -170,7 +170,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/StoreApi.cs index 576706c3d2..7450a0aa30 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/StoreApi.cs +++ b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/StoreApi.cs @@ -69,7 +69,7 @@ namespace Org.OpenAPITools.Api /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -80,7 +80,7 @@ namespace Org.OpenAPITools.Api /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -157,7 +157,7 @@ namespace Org.OpenAPITools.Api /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -169,7 +169,7 @@ namespace Org.OpenAPITools.Api /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -575,7 +575,7 @@ namespace Org.OpenAPITools.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -587,7 +587,7 @@ namespace Org.OpenAPITools.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -642,7 +642,7 @@ namespace Org.OpenAPITools.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -656,7 +656,7 @@ namespace Org.OpenAPITools.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/build.sh b/samples/client/petstore/csharp/OpenAPIClientNet35/build.sh index 979703be7f..62b1cd3f49 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/build.sh +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/build.sh @@ -5,7 +5,7 @@ frameworkVersion=net35 -# sdk must match installed framworks under PREFIX/lib/mono/[value] +# sdk must match installed frameworks under PREFIX/lib/mono/[value] sdk=4 # langversion refers to C# language features. see man mcs for details. diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/FakeApi.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/FakeApi.md index 2953700acb..4785377098 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/FakeApi.md +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/FakeApi.md @@ -882,7 +882,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **400** | Someting wrong | - | +| **400** | Something wrong | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/StoreApi.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/StoreApi.md index 57247772d4..ae123168a1 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/StoreApi.md +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/StoreApi.md @@ -168,7 +168,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/git_push.sh b/samples/client/petstore/csharp/OpenAPIClientNet35/git_push.sh index ced3be2b0c..200e975d21 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/git_push.sh +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/git_push.sh @@ -1,7 +1,7 @@ #!/bin/sh # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ # -# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" git_user_id=$1 git_repo_id=$2 diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Api/StoreApi.cs index 305632deb6..1d7e5a8494 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Api/StoreApi.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Api/StoreApi.cs @@ -69,7 +69,7 @@ namespace Org.OpenAPITools.Api /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -80,7 +80,7 @@ namespace Org.OpenAPITools.Api /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -348,7 +348,7 @@ namespace Org.OpenAPITools.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -360,7 +360,7 @@ namespace Org.OpenAPITools.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Client/IReadableConfiguration.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Client/IReadableConfiguration.cs index 23e1a0c2e1..43ed169c6a 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Client/IReadableConfiguration.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Client/IReadableConfiguration.cs @@ -45,7 +45,7 @@ namespace Org.OpenAPITools.Client /// /// Gets the date time format. /// - /// Date time foramt. + /// Date time format. string DateTimeFormat { get; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Org.OpenAPITools.nuspec b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Org.OpenAPITools.nuspec index c9ccbe1a82..c2528caadb 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Org.OpenAPITools.nuspec +++ b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Org.OpenAPITools.nuspec @@ -12,7 +12,7 @@ $author$ + users to easily find other packages by the same owners. --> $author$ false false diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/build.sh b/samples/client/petstore/csharp/OpenAPIClientNet40/build.sh index 25d8bff1a0..bd7ed61518 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/build.sh +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/build.sh @@ -5,7 +5,7 @@ frameworkVersion=net40 -# sdk must match installed framworks under PREFIX/lib/mono/[value] +# sdk must match installed frameworks under PREFIX/lib/mono/[value] sdk=4 # langversion refers to C# language features. see man mcs for details. diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/FakeApi.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/FakeApi.md index 2953700acb..4785377098 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/FakeApi.md +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/FakeApi.md @@ -882,7 +882,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **400** | Someting wrong | - | +| **400** | Something wrong | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/StoreApi.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/StoreApi.md index 57247772d4..ae123168a1 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/StoreApi.md +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/StoreApi.md @@ -168,7 +168,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/git_push.sh b/samples/client/petstore/csharp/OpenAPIClientNet40/git_push.sh index ced3be2b0c..200e975d21 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/git_push.sh +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/git_push.sh @@ -1,7 +1,7 @@ #!/bin/sh # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ # -# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" git_user_id=$1 git_repo_id=$2 diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Api/StoreApi.cs index 8bb8873826..a8b3b38b02 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Api/StoreApi.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Api/StoreApi.cs @@ -69,7 +69,7 @@ namespace Org.OpenAPITools.Api /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -80,7 +80,7 @@ namespace Org.OpenAPITools.Api /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -348,7 +348,7 @@ namespace Org.OpenAPITools.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -360,7 +360,7 @@ namespace Org.OpenAPITools.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Client/IReadableConfiguration.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Client/IReadableConfiguration.cs index 23e1a0c2e1..43ed169c6a 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Client/IReadableConfiguration.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Client/IReadableConfiguration.cs @@ -45,7 +45,7 @@ namespace Org.OpenAPITools.Client /// /// Gets the date time format. /// - /// Date time foramt. + /// Date time format. string DateTimeFormat { get; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Org.OpenAPITools.nuspec b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Org.OpenAPITools.nuspec index c9ccbe1a82..c2528caadb 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Org.OpenAPITools.nuspec +++ b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Org.OpenAPITools.nuspec @@ -12,7 +12,7 @@ $author$ + users to easily find other packages by the same owners. --> $author$ false false diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/FakeApi.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/FakeApi.md index 2953700acb..4785377098 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/FakeApi.md +++ b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/FakeApi.md @@ -882,7 +882,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **400** | Someting wrong | - | +| **400** | Something wrong | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/StoreApi.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/StoreApi.md index 57247772d4..ae123168a1 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/StoreApi.md +++ b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/StoreApi.md @@ -168,7 +168,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/git_push.sh b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/git_push.sh index ced3be2b0c..200e975d21 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/git_push.sh +++ b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/git_push.sh @@ -1,7 +1,7 @@ #!/bin/sh # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ # -# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" git_user_id=$1 git_repo_id=$2 diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/StoreApi.cs index a6e51e8e39..e3a3ffbfc9 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/StoreApi.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/StoreApi.cs @@ -69,7 +69,7 @@ namespace Org.OpenAPITools.Api /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -80,7 +80,7 @@ namespace Org.OpenAPITools.Api /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -157,7 +157,7 @@ namespace Org.OpenAPITools.Api /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -169,7 +169,7 @@ namespace Org.OpenAPITools.Api /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -575,7 +575,7 @@ namespace Org.OpenAPITools.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -587,7 +587,7 @@ namespace Org.OpenAPITools.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -642,7 +642,7 @@ namespace Org.OpenAPITools.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -656,7 +656,7 @@ namespace Org.OpenAPITools.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Client/IReadableConfiguration.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Client/IReadableConfiguration.cs index 23e1a0c2e1..43ed169c6a 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Client/IReadableConfiguration.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Client/IReadableConfiguration.cs @@ -45,7 +45,7 @@ namespace Org.OpenAPITools.Client /// /// Gets the date time format. /// - /// Date time foramt. + /// Date time format. string DateTimeFormat { get; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/FakeApi.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/FakeApi.md index 2953700acb..4785377098 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/FakeApi.md +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/FakeApi.md @@ -882,7 +882,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **400** | Someting wrong | - | +| **400** | Something wrong | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/StoreApi.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/StoreApi.md index 57247772d4..ae123168a1 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/StoreApi.md +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/StoreApi.md @@ -168,7 +168,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/git_push.sh b/samples/client/petstore/csharp/OpenAPIClientNetStandard/git_push.sh index ced3be2b0c..200e975d21 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/git_push.sh +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/git_push.sh @@ -1,7 +1,7 @@ #!/bin/sh # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ # -# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" git_user_id=$1 git_repo_id=$2 diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Api/StoreApi.cs index a6e51e8e39..e3a3ffbfc9 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Api/StoreApi.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Api/StoreApi.cs @@ -69,7 +69,7 @@ namespace Org.OpenAPITools.Api /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -80,7 +80,7 @@ namespace Org.OpenAPITools.Api /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -157,7 +157,7 @@ namespace Org.OpenAPITools.Api /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -169,7 +169,7 @@ namespace Org.OpenAPITools.Api /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -575,7 +575,7 @@ namespace Org.OpenAPITools.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -587,7 +587,7 @@ namespace Org.OpenAPITools.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -642,7 +642,7 @@ namespace Org.OpenAPITools.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -656,7 +656,7 @@ namespace Org.OpenAPITools.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Client/IReadableConfiguration.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Client/IReadableConfiguration.cs index 23e1a0c2e1..43ed169c6a 100644 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Client/IReadableConfiguration.cs +++ b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Client/IReadableConfiguration.cs @@ -45,7 +45,7 @@ namespace Org.OpenAPITools.Client /// /// Gets the date time format. /// - /// Date time foramt. + /// Date time format. string DateTimeFormat { get; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/build.sh b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/build.sh index f178f97386..ee26741580 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/build.sh +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/build.sh @@ -5,7 +5,7 @@ frameworkVersion=net45 -# sdk must match installed framworks under PREFIX/lib/mono/[value] +# sdk must match installed frameworks under PREFIX/lib/mono/[value] sdk=4.5.2-api # langversion refers to C# language features. see man mcs for details. diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/FakeApi.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/FakeApi.md index 2953700acb..4785377098 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/FakeApi.md +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/FakeApi.md @@ -882,7 +882,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **400** | Someting wrong | - | +| **400** | Something wrong | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/StoreApi.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/StoreApi.md index 57247772d4..ae123168a1 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/StoreApi.md +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/StoreApi.md @@ -168,7 +168,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/git_push.sh b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/git_push.sh index ced3be2b0c..200e975d21 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/git_push.sh +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/git_push.sh @@ -1,7 +1,7 @@ #!/bin/sh # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ # -# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" git_user_id=$1 git_repo_id=$2 diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Api/StoreApi.cs index afd12d05cb..d05925d2e4 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Api/StoreApi.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Api/StoreApi.cs @@ -69,7 +69,7 @@ namespace Org.OpenAPITools.Api /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -80,7 +80,7 @@ namespace Org.OpenAPITools.Api /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -157,7 +157,7 @@ namespace Org.OpenAPITools.Api /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -169,7 +169,7 @@ namespace Org.OpenAPITools.Api /// Find purchase order by ID /// /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -575,7 +575,7 @@ namespace Org.OpenAPITools.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -587,7 +587,7 @@ namespace Org.OpenAPITools.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -642,7 +642,7 @@ namespace Org.OpenAPITools.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched @@ -656,7 +656,7 @@ namespace Org.OpenAPITools.Api } /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Thrown when fails to make API call /// ID of pet that needs to be fetched diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Client/IReadableConfiguration.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Client/IReadableConfiguration.cs index 23e1a0c2e1..43ed169c6a 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Client/IReadableConfiguration.cs +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Client/IReadableConfiguration.cs @@ -45,7 +45,7 @@ namespace Org.OpenAPITools.Client /// /// Gets the date time format. /// - /// Date time foramt. + /// Date time format. string DateTimeFormat { get; } /// diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Org.OpenAPITools.nuspec b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Org.OpenAPITools.nuspec index 49a1278cf4..a68da9335f 100644 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Org.OpenAPITools.nuspec +++ b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Org.OpenAPITools.nuspec @@ -12,7 +12,7 @@ $author$ + users to easily find other packages by the same owners. --> $author$ false false diff --git a/samples/client/petstore/eiffel/docs/STORE_API.md b/samples/client/petstore/eiffel/docs/STORE_API.md index d8c32e82aa..369cde8bce 100644 --- a/samples/client/petstore/eiffel/docs/STORE_API.md +++ b/samples/client/petstore/eiffel/docs/STORE_API.md @@ -73,7 +73,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Parameters diff --git a/samples/client/petstore/eiffel/gitpush.sh b/samples/client/petstore/eiffel/gitpush.sh index ed374619b1..ae01b182ae 100644 --- a/samples/client/petstore/eiffel/gitpush.sh +++ b/samples/client/petstore/eiffel/gitpush.sh @@ -36,7 +36,7 @@ git_remote=`git remote` if [ "$git_remote" = "" ]; then # git remote not defined if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment." + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git else git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git diff --git a/samples/client/petstore/eiffel/src/api/store_api.e b/samples/client/petstore/eiffel/src/api/store_api.e index 40f9ce6bd7..ad376c23c0 100644 --- a/samples/client/petstore/eiffel/src/api/store_api.e +++ b/samples/client/petstore/eiffel/src/api/store_api.e @@ -90,7 +90,7 @@ feature -- API Access order_by_id (order_id: INTEGER_64): detachable ORDER -- Find purchase order by ID - -- For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + -- For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions -- -- argument: order_id ID of pet that needs to be fetched (required) -- diff --git a/samples/client/petstore/eiffel/src/api_client.e b/samples/client/petstore/eiffel/src/api_client.e index 068e94e68a..b21198bfbe 100644 --- a/samples/client/petstore/eiffel/src/api_client.e +++ b/samples/client/petstore/eiffel/src/api_client.e @@ -49,7 +49,7 @@ feature -- Access -- base path. authentications: STRING_TABLE [AUTHENTICATION] - -- autentication table. + -- authentication table. feature -- Status Report @@ -139,7 +139,7 @@ feature -- Helper: OAuth Authentication feature -- Query Parameter Helpers parameter_to_tuple (a_collection_format, a_name: STRING; a_value: detachable ANY): LIST [TUPLE [name: STRING; value: STRING]] - -- A list of tuples with name and valule. + -- A list of tuples with name and value. -- collectionFormat collection format (e.g. csv, tsv) -- name Name -- value Value @@ -201,7 +201,7 @@ feature -- Query Parameter Helpers parameter_to_string (a_param: detachable ANY): STRING - -- return the string representation of the givien object `a_param'. + -- return the string representation of the given object `a_param'. do if a_param = Void then Result := "" @@ -248,7 +248,7 @@ feature -- Query Parameter Helpers -- dateTime string date-time As defined by date-time - RFC3339 Result := date_time.date.debug_output elseif attached {STRING_32} a_param as str_32 then - -- TODO check if this is a good convertion. + -- TODO check if this is a good conversion. Result := str_32.to_string_8 elseif attached {STRING_8} a_param as str_8 then Result := str_8 @@ -335,7 +335,7 @@ feature -- HTTP client: call api -- Execute an HTTP request with the given options. -- Relative path `a_path' -- Method `a_method' "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and "DELETE" - -- A request `a_request' wth + -- A request `a_request' with -- The query parameters: `query_params'. -- The Header parameters: `header_params'. -- The Request Body: `body' could be Void, object to be serialized using the serializer function `a_serializer' with a given content_type. @@ -372,7 +372,7 @@ feature -- HTTP client: call api elseif l_content_type.is_case_insensitive_equal ("application/x-www-form-urlencoded") then add_form_data (l_context_executor, a_request.form_params) elseif l_content_type.is_case_insensitive_equal ("multipart/form-data") then - -- add_mulipart_data (l_context_executor, a_form_params, l_content_type) + -- add_multipart_data (l_context_executor, a_form_params, l_content_type) -- here we need a way to identify files. elseif a_request.body = Void then if a_method.is_case_insensitive_equal ("DELETE") then @@ -409,7 +409,7 @@ feature -- HTTP client: call api build_url (a_path: STRING_8; a_query_params: LIST [TUPLE [name: STRING; value: STRING]]): STRING_8 - -- Build a relatative url to `base_path' with `a_path' and a list of + -- Build a relative url to `base_path' with `a_path' and a list of -- query parameters `a_query_params'. local l_query: STRING diff --git a/samples/client/petstore/eiffel/src/framework/auth/http_basic_auth.e b/samples/client/petstore/eiffel/src/framework/auth/http_basic_auth.e index 531384f267..958f79c80e 100644 --- a/samples/client/petstore/eiffel/src/framework/auth/http_basic_auth.e +++ b/samples/client/petstore/eiffel/src/framework/auth/http_basic_auth.e @@ -55,7 +55,7 @@ feature -- Access attached user_name as l_username and then attached password as l_password then - -- TODO check if this convertion it's ok. + -- TODO check if this conversion it's ok. a_header_params.force ("Basic " + (create {BASE64}).encoded_string (l_username.to_string_8 + ":" + l_password.to_string_8) , "Authorization") end end diff --git a/samples/client/petstore/eiffel/src/framework/auth/oauth.e b/samples/client/petstore/eiffel/src/framework/auth/oauth.e index 9d65636b46..dc8648eac7 100644 --- a/samples/client/petstore/eiffel/src/framework/auth/oauth.e +++ b/samples/client/petstore/eiffel/src/framework/auth/oauth.e @@ -37,7 +37,7 @@ feature -- Change Element -- . do if attached access_token as l_access_token then - -- TODO check if this convertion is ok. + -- TODO check if this conversion is ok. a_header_params.force ("Bearer " + l_access_token.to_string_8,"Authorization" ) end end diff --git a/samples/client/petstore/eiffel/src/framework/serialization/api_deserializer.e b/samples/client/petstore/eiffel/src/framework/serialization/api_deserializer.e index a986b8e7f3..fe52a9208c 100644 --- a/samples/client/petstore/eiffel/src/framework/serialization/api_deserializer.e +++ b/samples/client/petstore/eiffel/src/framework/serialization/api_deserializer.e @@ -19,7 +19,7 @@ class feature -- Access deserializer (f: FUNCTION [TUPLE [content_type:READABLE_STRING_8; body:READABLE_STRING_8; type:TYPE [detachable ANY]], detachable ANY]; a_content_type: READABLE_STRING_8; a_body: READABLE_STRING_8; a_type:TYPE [detachable ANY]): detachable ANY - -- From a given response deserialize body `a_body' with conent_type `a_content_type' to a target object of type `a_type'. + -- From a given response deserialize body `a_body' with content_type `a_content_type' to a target object of type `a_type'. do Result := f.item ([a_content_type, a_body, a_type]) end diff --git a/samples/client/petstore/eiffel/src/framework/serialization/api_serializer.e b/samples/client/petstore/eiffel/src/framework/serialization/api_serializer.e index 0afafdf843..759bf4d5d3 100644 --- a/samples/client/petstore/eiffel/src/framework/serialization/api_serializer.e +++ b/samples/client/petstore/eiffel/src/framework/serialization/api_serializer.e @@ -22,7 +22,7 @@ feature -- Access serializer (f: FUNCTION [TUPLE [content_type:READABLE_STRING_8; type:ANY],READABLE_STRING_8]; a_content_type: READABLE_STRING_8; a_type: ANY): STRING_8 -- Serialize an object of type `a_type' using the content type `a_content_type'. do - -- TODO check if this convertion it's ok. + -- TODO check if this conversion it's ok. Result := f.item ([a_content_type, a_type]).to_string_8 end end diff --git a/samples/client/petstore/eiffel/src/framework/serialization/json_basic_reflector_deserializer.e b/samples/client/petstore/eiffel/src/framework/serialization/json_basic_reflector_deserializer.e index 3a6f2b04c8..85dd642d48 100644 --- a/samples/client/petstore/eiffel/src/framework/serialization/json_basic_reflector_deserializer.e +++ b/samples/client/petstore/eiffel/src/framework/serialization/json_basic_reflector_deserializer.e @@ -282,7 +282,7 @@ feature {NONE} -- Helpers: Object l_field_static_types: like fields_infos do if Result = Void then - -- Updated to use the Type info insted of the type_field in JSON. + -- Updated to use the Type info instead of the type_field in JSON. -- fn.same_string ({JSON_REFLECTOR_SERIALIZER}.type_field_name if attached a_type then l_type_name := a_type.name.to_string_8 diff --git a/samples/client/petstore/eiffel/test/apis/store_api_test.e b/samples/client/petstore/eiffel/test/apis/store_api_test.e index e24849bf29..354da75803 100644 --- a/samples/client/petstore/eiffel/test/apis/store_api_test.e +++ b/samples/client/petstore/eiffel/test/apis/store_api_test.e @@ -43,7 +43,7 @@ feature -- Test routines test_order_by_id -- Find purchase order by ID -- - -- For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + -- For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions local l_response: ORDER l_order_id: INTEGER_64 diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/api/store.ex b/samples/client/petstore/elixir/lib/openapi_petstore/api/store.ex index e8519031ef..ae694541fb 100644 --- a/samples/client/petstore/elixir/lib/openapi_petstore/api/store.ex +++ b/samples/client/petstore/elixir/lib/openapi_petstore/api/store.ex @@ -71,7 +71,7 @@ defmodule OpenapiPetstore.Api.Store do @doc """ Find purchase order by ID - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Parameters diff --git a/samples/client/petstore/erlang-client/src/petstore_store_api.erl b/samples/client/petstore/erlang-client/src/petstore_store_api.erl index 0d59557dc9..f95e36788d 100644 --- a/samples/client/petstore/erlang-client/src/petstore_store_api.erl +++ b/samples/client/petstore/erlang-client/src/petstore_store_api.erl @@ -50,7 +50,7 @@ get_inventory(Ctx, Optional) -> petstore_utils:request(Ctx, Method, [?BASE_URL, Path], QS, ContentTypeHeader++Headers, Body1, Opts, Cfg). %% @doc Find purchase order by ID -%% For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +%% For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions -spec get_order_by_id(ctx:ctx(), integer()) -> {ok, petstore_order:petstore_order(), petstore_utils:response_info()} | {ok, hackney:client_ref()} | {error, term(), petstore_utils:response_info()}. get_order_by_id(Ctx, OrderId) -> get_order_by_id(Ctx, OrderId, #{}). diff --git a/samples/client/petstore/go/go-petstore/api/openapi.yaml b/samples/client/petstore/go/go-petstore/api/openapi.yaml index 16c9dca0ae..ee7adb4d6c 100644 --- a/samples/client/petstore/go/go-petstore/api/openapi.yaml +++ b/samples/client/petstore/go/go-petstore/api/openapi.yaml @@ -354,7 +354,7 @@ paths: - store get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched @@ -641,7 +641,7 @@ paths: responses: "400": content: {} - description: Someting wrong + description: Something wrong summary: Fake endpoint to test group parameters (optional) tags: - fake diff --git a/samples/client/petstore/go/go-petstore/api_store.go b/samples/client/petstore/go/go-petstore/api_store.go index 3ad1421086..30e71c681f 100644 --- a/samples/client/petstore/go/go-petstore/api_store.go +++ b/samples/client/petstore/go/go-petstore/api_store.go @@ -53,7 +53,7 @@ type StoreApi interface { /* GetOrderById Find purchase order by ID - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param orderId ID of pet that needs to be fetched @@ -299,7 +299,7 @@ func (r ApiGetOrderByIdRequest) Execute() (*Order, *http.Response, error) { /* GetOrderById Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param orderId ID of pet that needs to be fetched diff --git a/samples/client/petstore/go/user_api_test.go b/samples/client/petstore/go/user_api_test.go index 52195d6caa..6ae3fc2595 100644 --- a/samples/client/petstore/go/user_api_test.go +++ b/samples/client/petstore/go/user_api_test.go @@ -131,7 +131,7 @@ func TestUpdateUser(t *testing.T) { t.Log(apiResponse) } - //verify changings are correct + //verify changes are correct resp, apiResponse, err := client.UserApi.GetUserByName(context.Background(), "gopher").Execute() if err != nil { t.Fatalf("Error while getting user by id: %v", err) diff --git a/samples/client/petstore/haskell-http-client/docs/OpenAPIPetstore-API-Store.html b/samples/client/petstore/haskell-http-client/docs/OpenAPIPetstore-API-Store.html index 1aea9bc375..c07d420ddd 100644 --- a/samples/client/petstore/haskell-http-client/docs/OpenAPIPetstore-API-Store.html +++ b/samples/client/petstore/haskell-http-client/docs/OpenAPIPetstore-API-Store.html @@ -1 +1 @@ -OpenAPIPetstore.API.Store
openapi-petstore-0.1.0.0: Auto-generated openapi-petstore API Client
Safe HaskellSafe-Inferred
LanguageHaskell2010

OpenAPIPetstore.API.Store

Description

 

Operations

Store

deleteOrder

deleteOrder Source #

Arguments

:: OrderIdText

"orderId" - ID of the order that needs to be deleted

-> OpenAPIPetstoreRequest DeleteOrder MimeNoContent NoContent MimeNoContent 
DELETE /store/order/{order_id}

Delete purchase order by ID

For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors

data DeleteOrder Source #

Instances

Instances details
Produces DeleteOrder MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Store

getInventory

getInventory :: OpenAPIPetstoreRequest GetInventory MimeNoContent (Map String Int) MimeJSON Source #

GET /store/inventory

Returns pet inventories by status

Returns a map of status codes to quantities

AuthMethod: AuthApiKeyApiKey

data GetInventory Source #

Instances

Instances details
Produces GetInventory MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Store

getOrderById

getOrderById Source #

Arguments

:: Accept accept

request accept (MimeType)

-> OrderId

"orderId" - ID of pet that needs to be fetched

-> OpenAPIPetstoreRequest GetOrderById MimeNoContent Order accept 
GET /store/order/{order_id}

Find purchase order by ID

For valid response try integer IDs with value 5 or 10. Other values will generated exceptions

data GetOrderById Source #

Instances

Instances details
Produces GetOrderById MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Store

Produces GetOrderById MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Store

placeOrder

placeOrder Source #

Arguments

:: (Consumes PlaceOrder contentType, MimeRender contentType Order) 
=> ContentType contentType

request content-type (MimeType)

-> Accept accept

request accept (MimeType)

-> Order

"body" - order placed for purchasing the pet

-> OpenAPIPetstoreRequest PlaceOrder contentType Order accept 
POST /store/order

Place an order for a pet

data PlaceOrder Source #

Instances

Instances details
HasBodyParam PlaceOrder Order Source #

Body Param "body" - order placed for purchasing the pet

Instance details

Defined in OpenAPIPetstore.API.Store

Methods

setBodyParam :: (Consumes PlaceOrder contentType, MimeRender contentType Order) => OpenAPIPetstoreRequest PlaceOrder contentType res accept -> Order -> OpenAPIPetstoreRequest PlaceOrder contentType res accept Source #

MimeType mtype => Consumes PlaceOrder mtype Source #
*/*
Instance details

Defined in OpenAPIPetstore.API.Store

Produces PlaceOrder MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Store

Produces PlaceOrder MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Store

\ No newline at end of file +OpenAPIPetstore.API.Store
openapi-petstore-0.1.0.0: Auto-generated openapi-petstore API Client
Safe HaskellSafe-Inferred
LanguageHaskell2010

OpenAPIPetstore.API.Store

Description

 

Operations

Store

deleteOrder

deleteOrder Source #

Arguments

:: OrderIdText

"orderId" - ID of the order that needs to be deleted

-> OpenAPIPetstoreRequest DeleteOrder MimeNoContent NoContent MimeNoContent 
DELETE /store/order/{order_id}

Delete purchase order by ID

For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors

data DeleteOrder Source #

Instances

Instances details
Produces DeleteOrder MimeNoContent Source # 
Instance details

Defined in OpenAPIPetstore.API.Store

getInventory

getInventory :: OpenAPIPetstoreRequest GetInventory MimeNoContent (Map String Int) MimeJSON Source #

GET /store/inventory

Returns pet inventories by status

Returns a map of status codes to quantities

AuthMethod: AuthApiKeyApiKey

data GetInventory Source #

Instances

Instances details
Produces GetInventory MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Store

getOrderById

getOrderById Source #

Arguments

:: Accept accept

request accept (MimeType)

-> OrderId

"orderId" - ID of pet that needs to be fetched

-> OpenAPIPetstoreRequest GetOrderById MimeNoContent Order accept 
GET /store/order/{order_id}

Find purchase order by ID

For valid response try integer IDs with value 5 or 10. Other values will generate exceptions

data GetOrderById Source #

Instances

Instances details
Produces GetOrderById MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Store

Produces GetOrderById MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Store

placeOrder

placeOrder Source #

Arguments

:: (Consumes PlaceOrder contentType, MimeRender contentType Order) 
=> ContentType contentType

request content-type (MimeType)

-> Accept accept

request accept (MimeType)

-> Order

"body" - order placed for purchasing the pet

-> OpenAPIPetstoreRequest PlaceOrder contentType Order accept 
POST /store/order

Place an order for a pet

data PlaceOrder Source #

Instances

Instances details
HasBodyParam PlaceOrder Order Source #

Body Param "body" - order placed for purchasing the pet

Instance details

Defined in OpenAPIPetstore.API.Store

Methods

setBodyParam :: (Consumes PlaceOrder contentType, MimeRender contentType Order) => OpenAPIPetstoreRequest PlaceOrder contentType res accept -> Order -> OpenAPIPetstoreRequest PlaceOrder contentType res accept Source #

MimeType mtype => Consumes PlaceOrder mtype Source #
*/*
Instance details

Defined in OpenAPIPetstore.API.Store

Produces PlaceOrder MimeJSON Source #
application/json
Instance details

Defined in OpenAPIPetstore.API.Store

Produces PlaceOrder MimeXML Source #
application/xml
Instance details

Defined in OpenAPIPetstore.API.Store

\ No newline at end of file diff --git a/samples/client/petstore/haskell-http-client/docs/linuwial.css b/samples/client/petstore/haskell-http-client/docs/linuwial.css index cbb58a0389..0e64da3e38 100644 --- a/samples/client/petstore/haskell-http-client/docs/linuwial.css +++ b/samples/client/petstore/haskell-http-client/docs/linuwial.css @@ -755,7 +755,7 @@ table.info { /* @end */ -/* @group Auxillary Pages */ +/* @group Auxiliary Pages */ .extension-list { diff --git a/samples/client/petstore/haskell-http-client/docs/ocean.css b/samples/client/petstore/haskell-http-client/docs/ocean.css index ba6af9ca2c..d63c39a759 100644 --- a/samples/client/petstore/haskell-http-client/docs/ocean.css +++ b/samples/client/petstore/haskell-http-client/docs/ocean.css @@ -546,7 +546,7 @@ div#style-menu-holder { /* @end */ -/* @group Auxillary Pages */ +/* @group Auxiliary Pages */ .extension-list { diff --git a/samples/client/petstore/haskell-http-client/docs/openapi-petstore.txt b/samples/client/petstore/haskell-http-client/docs/openapi-petstore.txt index 5275a85847..58ca1598da 100644 --- a/samples/client/petstore/haskell-http-client/docs/openapi-petstore.txt +++ b/samples/client/petstore/haskell-http-client/docs/openapi-petstore.txt @@ -2434,7 +2434,7 @@ data GetInventory -- Find purchase order by ID -- -- For valid response try integer IDs with value 5 or 10. Other --- values will generated exceptions +-- values will generate exceptions getOrderById :: Accept accept -> OrderId -> OpenAPIPetstoreRequest GetOrderById MimeNoContent Order accept data GetOrderById diff --git a/samples/client/petstore/haskell-http-client/docs/src/OpenAPIPetstore.API.Store.html b/samples/client/petstore/haskell-http-client/docs/src/OpenAPIPetstore.API.Store.html index 431b0d346d..d93d118f80 100644 --- a/samples/client/petstore/haskell-http-client/docs/src/OpenAPIPetstore.API.Store.html +++ b/samples/client/petstore/haskell-http-client/docs/src/OpenAPIPetstore.API.Store.html @@ -143,7 +143,7 @@ forall {k} (t :: k). Proxy t -- -- Find purchase order by ID -- --- For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +-- For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions -- getOrderById :: Accept accept -- ^ request accept ('MimeType') diff --git a/samples/client/petstore/haskell-http-client/example-app/Main.hs b/samples/client/petstore/haskell-http-client/example-app/Main.hs index 9554b1a1a7..ba3fccd6d1 100644 --- a/samples/client/petstore/haskell-http-client/example-app/Main.hs +++ b/samples/client/petstore/haskell-http-client/example-app/Main.hs @@ -70,7 +70,7 @@ runPet mgr config = do -- -- No instance for (S.Produces S.AddPet S.MimePlainText) -- addPetResponse <- S.dispatchLbs mgr config addPetRequest - -- inspect the AddPet type to see typeclasses indicating wihch + -- inspect the AddPet type to see typeclasses indicating which -- content-type and accept types (mimeTypes) are valid -- :i S.AddPet @@ -122,7 +122,7 @@ runPet mgr config = do } _ <- S.dispatchLbs mgr config updatePetRequest - -- requred parameters are included as function arguments, optional parameters are included with applyOptionalParam + -- required parameters are included as function arguments, optional parameters are included with applyOptionalParam -- inspect the UpdatePetWithForm type to see typeclasses indicating optional paramteters (:i S.UpdatePetWithForm) -- instance S.HasOptionalParam S.UpdatePetWithForm S.Name -- -- Defined in ‘OpenAPIPetstore.API’ diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/Store.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/Store.hs index 971d8d039b..8036e7f02f 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/Store.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/Store.hs @@ -102,7 +102,7 @@ instance Produces GetInventory MimeJSON -- -- Find purchase order by ID -- --- For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +-- For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions -- getOrderById :: Accept accept -- ^ request accept ('MimeType') diff --git a/samples/client/petstore/haskell-http-client/openapi.yaml b/samples/client/petstore/haskell-http-client/openapi.yaml index 16c9dca0ae..ee7adb4d6c 100644 --- a/samples/client/petstore/haskell-http-client/openapi.yaml +++ b/samples/client/petstore/haskell-http-client/openapi.yaml @@ -354,7 +354,7 @@ paths: - store get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched @@ -641,7 +641,7 @@ paths: responses: "400": content: {} - description: Someting wrong + description: Something wrong summary: Fake endpoint to test group parameters (optional) tags: - fake diff --git a/samples/client/petstore/java-helidon-client/mp/docs/FakeApi.md b/samples/client/petstore/java-helidon-client/mp/docs/FakeApi.md index 9dfe49d51c..6ae181e21c 100644 --- a/samples/client/petstore/java-helidon-client/mp/docs/FakeApi.md +++ b/samples/client/petstore/java-helidon-client/mp/docs/FakeApi.md @@ -533,7 +533,7 @@ Fake endpoint to test group parameters (optional) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **400** | Someting wrong | - | +| **400** | Something wrong | - | ## testInlineAdditionalProperties diff --git a/samples/client/petstore/java-helidon-client/mp/docs/StoreApi.md b/samples/client/petstore/java-helidon-client/mp/docs/StoreApi.md index 299fb32656..f306d5948c 100644 --- a/samples/client/petstore/java-helidon-client/mp/docs/StoreApi.md +++ b/samples/client/petstore/java-helidon-client/mp/docs/StoreApi.md @@ -85,7 +85,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Parameters diff --git a/samples/client/petstore/java-helidon-client/mp/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java-helidon-client/mp/src/main/java/org/openapitools/client/api/StoreApi.java index ff2dfbfbca..b6f3f383a4 100644 --- a/samples/client/petstore/java-helidon-client/mp/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java-helidon-client/mp/src/main/java/org/openapitools/client/api/StoreApi.java @@ -56,7 +56,7 @@ public interface StoreApi { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions */ @GET @Path("/order/{order_id}") diff --git a/samples/client/petstore/java-helidon-client/mp/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java-helidon-client/mp/src/test/java/org/openapitools/client/api/StoreApiTest.java index 4331d26aa9..f9a8bd7ab1 100644 --- a/samples/client/petstore/java-helidon-client/mp/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java-helidon-client/mp/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -78,7 +78,7 @@ public class StoreApiTest { /** * Find purchase order by ID * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @throws ApiException * if the Api call fails diff --git a/samples/client/petstore/java-helidon-client/se/docs/FakeApi.md b/samples/client/petstore/java-helidon-client/se/docs/FakeApi.md index 1b6b950799..853a8de537 100644 --- a/samples/client/petstore/java-helidon-client/se/docs/FakeApi.md +++ b/samples/client/petstore/java-helidon-client/se/docs/FakeApi.md @@ -1001,7 +1001,7 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **400** | Someting wrong | - | +| **400** | Something wrong | - | ## testInlineAdditionalProperties diff --git a/samples/client/petstore/java-helidon-client/se/docs/StoreApi.md b/samples/client/petstore/java-helidon-client/se/docs/StoreApi.md index e3b7d7b910..ce91137cc6 100644 --- a/samples/client/petstore/java-helidon-client/se/docs/StoreApi.md +++ b/samples/client/petstore/java-helidon-client/se/docs/StoreApi.md @@ -152,7 +152,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example diff --git a/samples/client/petstore/java-helidon-client/se/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java-helidon-client/se/src/main/java/org/openapitools/client/api/StoreApi.java index b7ad3ea6e8..a71be4f761 100644 --- a/samples/client/petstore/java-helidon-client/se/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java-helidon-client/se/src/main/java/org/openapitools/client/api/StoreApi.java @@ -41,7 +41,7 @@ public interface StoreApi { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched (required) * @return {@code ApiResponse} */ diff --git a/samples/client/petstore/java-helidon-client/se/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java-helidon-client/se/src/test/java/org/openapitools/client/api/StoreApiTest.java index 352767de98..438c8b57b8 100644 --- a/samples/client/petstore/java-helidon-client/se/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java-helidon-client/se/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -89,7 +89,7 @@ public class StoreApiTest { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions */ @Test public void getOrderByIdTest() { diff --git a/samples/client/petstore/java-micronaut-client/docs/apis/StoreApi.md b/samples/client/petstore/java-micronaut-client/docs/apis/StoreApi.md index cad3ef78ef..07337a34e4 100644 --- a/samples/client/petstore/java-micronaut-client/docs/apis/StoreApi.md +++ b/samples/client/petstore/java-micronaut-client/docs/apis/StoreApi.md @@ -92,7 +92,7 @@ Mono StoreApi.getOrderById(orderId) Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Parameters | Name | Type | Description | Notes | diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/StoreApi.java index 6ee9bf5bf3..6f5b001481 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/StoreApi.java @@ -53,7 +53,7 @@ public interface StoreApi { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param orderId ID of pet that needs to be fetched (required) * @return Order diff --git a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/api/StoreApiSpec.groovy b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/api/StoreApiSpec.groovy index 157f85ee7c..cdeb7c1485 100644 --- a/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/api/StoreApiSpec.groovy +++ b/samples/client/petstore/java-micronaut-client/src/test/groovy/org/openapitools/api/StoreApiSpec.groovy @@ -48,7 +48,7 @@ public class StoreApiSpec extends Specification { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions */ void "getOrderById() test"() { when: diff --git a/samples/client/petstore/java/apache-httpclient/api/openapi.yaml b/samples/client/petstore/java/apache-httpclient/api/openapi.yaml index 5f55e8c53f..e7e17402f6 100644 --- a/samples/client/petstore/java/apache-httpclient/api/openapi.yaml +++ b/samples/client/petstore/java/apache-httpclient/api/openapi.yaml @@ -370,7 +370,7 @@ paths: x-accepts: application/json get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched @@ -672,7 +672,7 @@ paths: responses: "400": content: {} - description: Someting wrong + description: Something wrong summary: Fake endpoint to test group parameters (optional) tags: - fake diff --git a/samples/client/petstore/java/apache-httpclient/docs/FakeApi.md b/samples/client/petstore/java/apache-httpclient/docs/FakeApi.md index 25301e7502..627366e41d 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/FakeApi.md +++ b/samples/client/petstore/java/apache-httpclient/docs/FakeApi.md @@ -796,7 +796,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **400** | Someting wrong | - | +| **400** | Something wrong | - | ## testInlineAdditionalProperties diff --git a/samples/client/petstore/java/apache-httpclient/docs/StoreApi.md b/samples/client/petstore/java/apache-httpclient/docs/StoreApi.md index 571e808abd..b64e208a83 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/StoreApi.md +++ b/samples/client/petstore/java/apache-httpclient/docs/StoreApi.md @@ -152,7 +152,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/StoreApi.java index 82a77bb221..29b92b46e2 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/StoreApi.java @@ -157,7 +157,7 @@ public class StoreApi { } /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched (required) * @return Order * @throws ApiException if fails to make API call diff --git a/samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/api/StoreApiTest.java index fb91b870c5..c7df74110d 100644 --- a/samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -64,7 +64,7 @@ public class StoreApiTest { /** * Find purchase order by ID * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @throws ApiException * if the Api call fails diff --git a/samples/client/petstore/java/feign-no-nullable/api/openapi.yaml b/samples/client/petstore/java/feign-no-nullable/api/openapi.yaml index 5f55e8c53f..e7e17402f6 100644 --- a/samples/client/petstore/java/feign-no-nullable/api/openapi.yaml +++ b/samples/client/petstore/java/feign-no-nullable/api/openapi.yaml @@ -370,7 +370,7 @@ paths: x-accepts: application/json get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched @@ -672,7 +672,7 @@ paths: responses: "400": content: {} - description: Someting wrong + description: Something wrong summary: Fake endpoint to test group parameters (optional) tags: - fake diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/api/StoreApi.java index 9b821d4302..e88030d0db 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/api/StoreApi.java @@ -68,7 +68,7 @@ public interface StoreApi extends ApiClient.Api { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched (required) * @return Order */ @@ -81,7 +81,7 @@ public interface StoreApi extends ApiClient.Api { /** * Find purchase order by ID * Similar to getOrderById but it also returns the http response headers . - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched (required) * @return A ApiResponse that wraps the response boyd and the http headers. */ diff --git a/samples/client/petstore/java/feign-no-nullable/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/feign-no-nullable/src/test/java/org/openapitools/client/api/StoreApiTest.java index fbbea2cd5e..8ceab0a331 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/feign-no-nullable/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -53,7 +53,7 @@ class StoreApiTest { /** * Find purchase order by ID * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions */ @Test void getOrderByIdTest() { diff --git a/samples/client/petstore/java/feign/api/openapi.yaml b/samples/client/petstore/java/feign/api/openapi.yaml index f54c98c7f7..f9cbedf1e4 100644 --- a/samples/client/petstore/java/feign/api/openapi.yaml +++ b/samples/client/petstore/java/feign/api/openapi.yaml @@ -412,7 +412,7 @@ paths: x-accepts: application/json get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched @@ -712,7 +712,7 @@ paths: style: form responses: "400": - description: Someting wrong + description: Something wrong security: - bearer_test: [] summary: Fake endpoint to test group parameters (optional) diff --git a/samples/client/petstore/java/feign/feign10x/api/openapi.yaml b/samples/client/petstore/java/feign/feign10x/api/openapi.yaml index d9ad8bac2b..36d0772340 100644 --- a/samples/client/petstore/java/feign/feign10x/api/openapi.yaml +++ b/samples/client/petstore/java/feign/feign10x/api/openapi.yaml @@ -383,7 +383,7 @@ paths: x-accepts: application/json get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched @@ -685,7 +685,7 @@ paths: responses: "400": content: {} - description: Someting wrong + description: Something wrong summary: Fake endpoint to test group parameters (optional) tags: - fake diff --git a/samples/client/petstore/java/feign/feign10x/git_push.sh b/samples/client/petstore/java/feign/feign10x/git_push.sh index ced3be2b0c..200e975d21 100644 --- a/samples/client/petstore/java/feign/feign10x/git_push.sh +++ b/samples/client/petstore/java/feign/feign10x/git_push.sh @@ -1,7 +1,7 @@ #!/bin/sh # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ # -# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" git_user_id=$1 git_repo_id=$2 diff --git a/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/ApiClient.java index 4e256daf6b..d66098cc7d 100644 --- a/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/ApiClient.java @@ -332,7 +332,7 @@ public class ApiClient { /** * Gets request interceptor based on authentication name - * @param authName Authentiation name + * @param authName Authentication name * @return Request Interceptor */ public RequestInterceptor getAuthorization(String authName) { diff --git a/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/ServerConfiguration.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/ServerConfiguration.java index a1107a8690..e08da9aac7 100644 --- a/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/ServerConfiguration.java +++ b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/ServerConfiguration.java @@ -12,7 +12,7 @@ public class ServerConfiguration { /** * @param URL A URL to the target host. - * @param description A describtion of the host designated by the URL. + * @param description A description of the host designated by the URL. * @param variables A map between a variable name and its value. The value is used for substitution in the server's URL template. */ public ServerConfiguration(String URL, String description, Map variables) { diff --git a/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/api/StoreApi.java index 5ba8227e99..3312ed1e15 100644 --- a/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/feign/feign10x/src/main/java/org/openapitools/client/api/StoreApi.java @@ -39,7 +39,7 @@ public interface StoreApi extends ApiClient.Api { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched (required) * @return Order */ diff --git a/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/api/StoreApiTest.java index bdb0b7a1e0..79f40ef39d 100644 --- a/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/feign/feign10x/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -53,7 +53,7 @@ public class StoreApiTest { /** * Find purchase order by ID * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions */ @Test public void getOrderByIdTest() { diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/StoreApi.java index c5cefaa7a4..7a4bfd120f 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/StoreApi.java @@ -68,7 +68,7 @@ public interface StoreApi extends ApiClient.Api { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched (required) * @return Order */ @@ -81,7 +81,7 @@ public interface StoreApi extends ApiClient.Api { /** * Find purchase order by ID * Similar to getOrderById but it also returns the http response headers . - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched (required) * @return A ApiResponse that wraps the response boyd and the http headers. */ diff --git a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/api/StoreApiTest.java index 68a9388a03..c1c751847c 100644 --- a/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/feign/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -91,7 +91,7 @@ public class StoreApiTest { /** * Find purchase order by ID *

- * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions */ @Test void getOrderByIdTest() { diff --git a/samples/client/petstore/java/google-api-client/api/openapi.yaml b/samples/client/petstore/java/google-api-client/api/openapi.yaml index 5f55e8c53f..e7e17402f6 100644 --- a/samples/client/petstore/java/google-api-client/api/openapi.yaml +++ b/samples/client/petstore/java/google-api-client/api/openapi.yaml @@ -370,7 +370,7 @@ paths: x-accepts: application/json get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched @@ -672,7 +672,7 @@ paths: responses: "400": content: {} - description: Someting wrong + description: Something wrong summary: Fake endpoint to test group parameters (optional) tags: - fake diff --git a/samples/client/petstore/java/google-api-client/docs/FakeApi.md b/samples/client/petstore/java/google-api-client/docs/FakeApi.md index 25301e7502..627366e41d 100644 --- a/samples/client/petstore/java/google-api-client/docs/FakeApi.md +++ b/samples/client/petstore/java/google-api-client/docs/FakeApi.md @@ -796,7 +796,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **400** | Someting wrong | - | +| **400** | Something wrong | - | ## testInlineAdditionalProperties diff --git a/samples/client/petstore/java/google-api-client/docs/StoreApi.md b/samples/client/petstore/java/google-api-client/docs/StoreApi.md index 571e808abd..b64e208a83 100644 --- a/samples/client/petstore/java/google-api-client/docs/StoreApi.md +++ b/samples/client/petstore/java/google-api-client/docs/StoreApi.md @@ -152,7 +152,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/FakeApi.java index daf6e2d718..e80816d967 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/FakeApi.java @@ -970,7 +970,7 @@ public class FakeApi { /** * Fake endpoint to test group parameters (optional) * Fake endpoint to test group parameters (optional) - *

400 - Someting wrong + *

400 - Something wrong * @param requiredStringGroup Required String in group parameters * @param requiredBooleanGroup Required Boolean in group parameters * @param requiredInt64Group Required Integer in group parameters @@ -986,7 +986,7 @@ public class FakeApi { /** * Fake endpoint to test group parameters (optional) * Fake endpoint to test group parameters (optional) - *

400 - Someting wrong + *

400 - Something wrong * @param requiredStringGroup Required String in group parameters * @param requiredBooleanGroup Required Boolean in group parameters * @param requiredInt64Group Required Integer in group parameters diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/StoreApi.java index 2ba19aa3b6..c2c5c34d26 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/StoreApi.java @@ -189,7 +189,7 @@ public class StoreApi { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions *

200 - successful operation *

400 - Invalid ID supplied *

404 - Order not found @@ -205,7 +205,7 @@ public class StoreApi { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions *

200 - successful operation *

400 - Invalid ID supplied *

404 - Order not found diff --git a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/api/StoreApiTest.java index 54fb142817..fd77cfec62 100644 --- a/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/google-api-client/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -66,7 +66,7 @@ public class StoreApiTest { /** * Find purchase order by ID * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @throws IOException * if the Api call fails diff --git a/samples/client/petstore/java/jersey1/api/openapi.yaml b/samples/client/petstore/java/jersey1/api/openapi.yaml index 5f55e8c53f..e7e17402f6 100644 --- a/samples/client/petstore/java/jersey1/api/openapi.yaml +++ b/samples/client/petstore/java/jersey1/api/openapi.yaml @@ -370,7 +370,7 @@ paths: x-accepts: application/json get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched @@ -672,7 +672,7 @@ paths: responses: "400": content: {} - description: Someting wrong + description: Something wrong summary: Fake endpoint to test group parameters (optional) tags: - fake diff --git a/samples/client/petstore/java/jersey1/docs/FakeApi.md b/samples/client/petstore/java/jersey1/docs/FakeApi.md index 25301e7502..627366e41d 100644 --- a/samples/client/petstore/java/jersey1/docs/FakeApi.md +++ b/samples/client/petstore/java/jersey1/docs/FakeApi.md @@ -796,7 +796,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **400** | Someting wrong | - | +| **400** | Something wrong | - | ## testInlineAdditionalProperties diff --git a/samples/client/petstore/java/jersey1/docs/StoreApi.md b/samples/client/petstore/java/jersey1/docs/StoreApi.md index 571e808abd..b64e208a83 100644 --- a/samples/client/petstore/java/jersey1/docs/StoreApi.md +++ b/samples/client/petstore/java/jersey1/docs/StoreApi.md @@ -152,7 +152,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/api/StoreApi.java index bc68e36d8b..db9decedc4 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/api/StoreApi.java @@ -132,7 +132,7 @@ public class StoreApi { } /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched (required) * @return Order * @throws ApiException if fails to make API call diff --git a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/api/StoreApiTest.java index f83e6c3897..a43d64debf 100644 --- a/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -66,7 +66,7 @@ public class StoreApiTest { /** * Find purchase order by ID * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @throws ApiException * if the Api call fails diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/api/openapi.yaml b/samples/client/petstore/java/jersey2-java8-localdatetime/api/openapi.yaml index 5f55e8c53f..e7e17402f6 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/api/openapi.yaml +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/api/openapi.yaml @@ -370,7 +370,7 @@ paths: x-accepts: application/json get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched @@ -672,7 +672,7 @@ paths: responses: "400": content: {} - description: Someting wrong + description: Something wrong summary: Fake endpoint to test group parameters (optional) tags: - fake diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/FakeApi.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/FakeApi.md index 438fa9fae1..d21432dbf3 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/FakeApi.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/FakeApi.md @@ -800,7 +800,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **400** | Someting wrong | - | +| **400** | Something wrong | - | ## testInlineAdditionalProperties diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/StoreApi.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/StoreApi.md index 7e88578e3c..e0b1be10cd 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/StoreApi.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/StoreApi.md @@ -150,7 +150,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/api/FakeApi.java index 6c1055a81f..fc418490a4 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/api/FakeApi.java @@ -925,7 +925,7 @@ if (booleanGroup != null) * @http.response.details - +
Status Code Description Response Headers
400 Someting wrong -
400 Something wrong -
*/ @@ -941,7 +941,7 @@ if (booleanGroup != null) * @http.response.details - +
Status Code Description Response Headers
400 Someting wrong -
400 Something wrong -
*/ diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/api/StoreApi.java index 9a85fb7c74..1f09491630 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/api/StoreApi.java @@ -174,7 +174,7 @@ public class StoreApi { } /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched (required) * @return Order * @throws ApiException if fails to make API call @@ -192,7 +192,7 @@ public class StoreApi { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched (required) * @return ApiResponse<Order> * @throws ApiException if fails to make API call diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/api/StoreApiTest.java index 97fed8776a..49e5d0ddbb 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -63,7 +63,7 @@ public class StoreApiTest { /** * Find purchase order by ID * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @throws ApiException if the Api call fails */ diff --git a/samples/client/petstore/java/jersey2-java8/api/openapi.yaml b/samples/client/petstore/java/jersey2-java8/api/openapi.yaml index 5f55e8c53f..e7e17402f6 100644 --- a/samples/client/petstore/java/jersey2-java8/api/openapi.yaml +++ b/samples/client/petstore/java/jersey2-java8/api/openapi.yaml @@ -370,7 +370,7 @@ paths: x-accepts: application/json get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched @@ -672,7 +672,7 @@ paths: responses: "400": content: {} - description: Someting wrong + description: Something wrong summary: Fake endpoint to test group parameters (optional) tags: - fake diff --git a/samples/client/petstore/java/jersey2-java8/docs/FakeApi.md b/samples/client/petstore/java/jersey2-java8/docs/FakeApi.md index f0c93223e4..84167f6546 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/FakeApi.md +++ b/samples/client/petstore/java/jersey2-java8/docs/FakeApi.md @@ -800,7 +800,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **400** | Someting wrong | - | +| **400** | Something wrong | - | ## testInlineAdditionalProperties diff --git a/samples/client/petstore/java/jersey2-java8/docs/StoreApi.md b/samples/client/petstore/java/jersey2-java8/docs/StoreApi.md index 7e88578e3c..e0b1be10cd 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/StoreApi.md +++ b/samples/client/petstore/java/jersey2-java8/docs/StoreApi.md @@ -150,7 +150,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/FakeApi.java index a7709eb028..0c31d3c2d1 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/FakeApi.java @@ -925,7 +925,7 @@ if (booleanGroup != null) * @http.response.details - +
Status Code Description Response Headers
400 Someting wrong -
400 Something wrong -
*/ @@ -941,7 +941,7 @@ if (booleanGroup != null) * @http.response.details - +
Status Code Description Response Headers
400 Someting wrong -
400 Something wrong -
*/ diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/StoreApi.java index 9a85fb7c74..1f09491630 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/StoreApi.java @@ -174,7 +174,7 @@ public class StoreApi { } /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched (required) * @return Order * @throws ApiException if fails to make API call @@ -192,7 +192,7 @@ public class StoreApi { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched (required) * @return ApiResponse<Order> * @throws ApiException if fails to make API call diff --git a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/StoreApiTest.java index 768b5e53f3..db5d1415a4 100644 --- a/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -64,7 +64,7 @@ public class StoreApiTest { /** * Find purchase order by ID * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @throws ApiException * if the Api call fails diff --git a/samples/client/petstore/java/jersey3/api/openapi.yaml b/samples/client/petstore/java/jersey3/api/openapi.yaml index bd4e3fa22b..3e2a497d7a 100644 --- a/samples/client/petstore/java/jersey3/api/openapi.yaml +++ b/samples/client/petstore/java/jersey3/api/openapi.yaml @@ -386,7 +386,7 @@ paths: x-accepts: application/json get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched @@ -686,7 +686,7 @@ paths: style: form responses: "400": - description: Someting wrong + description: Something wrong security: - bearer_test: [] summary: Fake endpoint to test group parameters (optional) diff --git a/samples/client/petstore/java/jersey3/docs/FakeApi.md b/samples/client/petstore/java/jersey3/docs/FakeApi.md index 00365edeae..0663bb791e 100644 --- a/samples/client/petstore/java/jersey3/docs/FakeApi.md +++ b/samples/client/petstore/java/jersey3/docs/FakeApi.md @@ -861,7 +861,7 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **400** | Someting wrong | - | +| **400** | Something wrong | - | ## testInlineAdditionalProperties diff --git a/samples/client/petstore/java/jersey3/docs/StoreApi.md b/samples/client/petstore/java/jersey3/docs/StoreApi.md index a3cbc7ec05..6eab555ee0 100644 --- a/samples/client/petstore/java/jersey3/docs/StoreApi.md +++ b/samples/client/petstore/java/jersey3/docs/StoreApi.md @@ -150,7 +150,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/api/FakeApi.java index 9f2482642d..84549ce060 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/api/FakeApi.java @@ -982,7 +982,7 @@ if (booleanGroup != null) * @http.response.details - +
Status Code Description Response Headers
400 Someting wrong -
400 Something wrong -
*/ @@ -998,7 +998,7 @@ if (booleanGroup != null) * @http.response.details - +
Status Code Description Response Headers
400 Someting wrong -
400 Something wrong -
*/ diff --git a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/api/StoreApi.java index 0f4dd5cf85..bee4f7e72b 100644 --- a/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/jersey3/src/main/java/org/openapitools/client/api/StoreApi.java @@ -174,7 +174,7 @@ public class StoreApi { } /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched (required) * @return Order * @throws ApiException if fails to make API call @@ -192,7 +192,7 @@ public class StoreApi { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched (required) * @return ApiResponse<Order> * @throws ApiException if fails to make API call diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/JSONComposedSchemaTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/JSONComposedSchemaTest.java index 1834c34b06..7b58065953 100644 --- a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/JSONComposedSchemaTest.java +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/JSONComposedSchemaTest.java @@ -90,7 +90,7 @@ public class JSONComposedSchemaTest { assertTrue(o.getActualInstance() instanceof AppleReq); BananaReq inst2 = o.getBananaReq(); // should throw ClassCastException }); - // comment out below as the erorr message can be different due to JDK versions + // comment out below as the error message can be different due to JDK versions // org.opentest4j.AssertionFailedError: expected: but was: //Assertions.assertEquals("class org.openapitools.client.model.AppleReq cannot be cast to class org.openapitools.client.model.BananaReq (org.openapitools.client.model.AppleReq and org.openapitools.client.model.BananaReq are in unnamed module of loader 'app')", thrown.getMessage()); Assertions.assertNotNull(thrown); @@ -141,7 +141,7 @@ public class JSONComposedSchemaTest { }); assertTrue(exception.getMessage().contains("Failed deserialization for FruitReq: 2 classes match result")); // TODO: add a similar unit test where the oneOf child schemas have required properties. - // If the implementation is correct, the unmarshaling should take the "required" keyword + // If the implementation is correct, the unmarshalling should take the "required" keyword // into consideration, which it is not doing currently. } { @@ -232,7 +232,7 @@ public class JSONComposedSchemaTest { @Test public void testOneOfMultipleDiscriminators() throws Exception { // 'shapeType' is a discriminator for the 'Shape' model and - // 'triangleType' is a discriminator forr the 'Triangle' model. + // 'triangleType' is a discriminator for the 'Triangle' model. String str = "{ \"shapeType\": \"Triangle\", \"triangleType\": \"EquilateralTriangle\" }"; // We should be able to deserialize a equilateral triangle into a EquilateralTriangle class. diff --git a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/api/StoreApiTest.java index 38f008c16c..f609a37016 100644 --- a/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -63,7 +63,7 @@ public class StoreApiTest { /** * Find purchase order by ID * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @throws ApiException if the Api call fails */ diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/docs/StoreApi.md b/samples/client/petstore/java/microprofile-rest-client-3.0/docs/StoreApi.md index 08e810fdab..ae64b8574e 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0/docs/StoreApi.md +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/docs/StoreApi.md @@ -153,7 +153,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/api/StoreApi.java index ea8a22c767..065c9dbfe4 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/src/main/java/org/openapitools/client/api/StoreApi.java @@ -64,7 +64,7 @@ public interface StoreApi { /** * Find purchase order by ID * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * */ @GET diff --git a/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/api/StoreApiTest.java index 4e7e884ae2..712d7da2c1 100644 --- a/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/microprofile-rest-client-3.0/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -84,7 +84,7 @@ public class StoreApiTest { /** * Find purchase order by ID * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @throws ApiException * if the Api call fails diff --git a/samples/client/petstore/java/microprofile-rest-client/docs/StoreApi.md b/samples/client/petstore/java/microprofile-rest-client/docs/StoreApi.md index 8f599b0364..4d90de8460 100644 --- a/samples/client/petstore/java/microprofile-rest-client/docs/StoreApi.md +++ b/samples/client/petstore/java/microprofile-rest-client/docs/StoreApi.md @@ -153,7 +153,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example diff --git a/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/api/StoreApi.java index 93b22832c6..7b4d9b5ee6 100644 --- a/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/microprofile-rest-client/src/main/java/org/openapitools/client/api/StoreApi.java @@ -64,7 +64,7 @@ public interface StoreApi { /** * Find purchase order by ID * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * */ @GET diff --git a/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/api/StoreApiTest.java index 73d983d814..ca77aa2845 100644 --- a/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/microprofile-rest-client/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -98,7 +98,7 @@ public class StoreApiTest { /** * Find purchase order by ID * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @throws ApiException * if the Api call fails diff --git a/samples/client/petstore/java/native-async/api/openapi.yaml b/samples/client/petstore/java/native-async/api/openapi.yaml index 5f55e8c53f..e7e17402f6 100644 --- a/samples/client/petstore/java/native-async/api/openapi.yaml +++ b/samples/client/petstore/java/native-async/api/openapi.yaml @@ -370,7 +370,7 @@ paths: x-accepts: application/json get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched @@ -672,7 +672,7 @@ paths: responses: "400": content: {} - description: Someting wrong + description: Something wrong summary: Fake endpoint to test group parameters (optional) tags: - fake diff --git a/samples/client/petstore/java/native-async/docs/FakeApi.md b/samples/client/petstore/java/native-async/docs/FakeApi.md index 3ecae4a48c..a73552ed93 100644 --- a/samples/client/petstore/java/native-async/docs/FakeApi.md +++ b/samples/client/petstore/java/native-async/docs/FakeApi.md @@ -1627,7 +1627,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **400** | Someting wrong | - | +| **400** | Something wrong | - | ## testGroupParametersWithHttpInfo @@ -1715,7 +1715,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **400** | Someting wrong | - | +| **400** | Something wrong | - | diff --git a/samples/client/petstore/java/native-async/docs/StoreApi.md b/samples/client/petstore/java/native-async/docs/StoreApi.md index 3042949fd6..13a27f70bd 100644 --- a/samples/client/petstore/java/native-async/docs/StoreApi.md +++ b/samples/client/petstore/java/native-async/docs/StoreApi.md @@ -313,7 +313,7 @@ CompletableFuture> Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example @@ -381,7 +381,7 @@ No authorization required Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/StoreApi.java index 74fa9c254e..8a4ab19b20 100644 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/StoreApi.java @@ -239,7 +239,7 @@ public class StoreApi { } /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched (required) * @return CompletableFuture<Order> * @throws ApiException if fails to make API call @@ -269,7 +269,7 @@ public class StoreApi { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched (required) * @return CompletableFuture<ApiResponse<Order>> * @throws ApiException if fails to make API call diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java index ae24bce910..698b5bb31e 100644 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java @@ -80,7 +80,7 @@ public class AdditionalPropertiesAnyType extends HashMap { * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. * @param key the name of the property - * @param value the value value of the property + * @param value the value of the property * @return self reference */ @JsonAnySetter diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java index 6e95eda0b1..5a3625f250 100644 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java @@ -81,7 +81,7 @@ public class AdditionalPropertiesArray extends HashMap { * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. * @param key the name of the property - * @param value the value value of the property + * @param value the value of the property * @return self reference */ @JsonAnySetter diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java index 8361af60fe..72638f3e48 100644 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java @@ -80,7 +80,7 @@ public class AdditionalPropertiesBoolean extends HashMap { * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. * @param key the name of the property - * @param value the value value of the property + * @param value the value of the property * @return self reference */ @JsonAnySetter diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java index 5d02bc15ae..42c9d36e74 100644 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java @@ -80,7 +80,7 @@ public class AdditionalPropertiesInteger extends HashMap { * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. * @param key the name of the property - * @param value the value value of the property + * @param value the value of the property * @return self reference */ @JsonAnySetter diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java index 62762b5356..337f663452 100644 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java @@ -81,7 +81,7 @@ public class AdditionalPropertiesNumber extends HashMap { * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. * @param key the name of the property - * @param value the value value of the property + * @param value the value of the property * @return self reference */ @JsonAnySetter diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java index f8bac3d1c2..fece9479ea 100644 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java @@ -80,7 +80,7 @@ public class AdditionalPropertiesObject extends HashMap { * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. * @param key the name of the property - * @param value the value value of the property + * @param value the value of the property * @return self reference */ @JsonAnySetter diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java index 692d474c91..5be6aabb7d 100644 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java @@ -80,7 +80,7 @@ public class AdditionalPropertiesString extends HashMap { * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. * @param key the name of the property - * @param value the value value of the property + * @param value the value of the property * @return self reference */ @JsonAnySetter diff --git a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/api/StoreApiTest.java index 67bdd914ac..a130cb587f 100644 --- a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -70,7 +70,7 @@ public class StoreApiTest { /** * Find purchase order by ID * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @throws ApiException * if the Api call fails diff --git a/samples/client/petstore/java/native/api/openapi.yaml b/samples/client/petstore/java/native/api/openapi.yaml index 5f55e8c53f..e7e17402f6 100644 --- a/samples/client/petstore/java/native/api/openapi.yaml +++ b/samples/client/petstore/java/native/api/openapi.yaml @@ -370,7 +370,7 @@ paths: x-accepts: application/json get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched @@ -672,7 +672,7 @@ paths: responses: "400": content: {} - description: Someting wrong + description: Something wrong summary: Fake endpoint to test group parameters (optional) tags: - fake diff --git a/samples/client/petstore/java/native/docs/FakeApi.md b/samples/client/petstore/java/native/docs/FakeApi.md index 7a35dbf48d..c6c947207f 100644 --- a/samples/client/petstore/java/native/docs/FakeApi.md +++ b/samples/client/petstore/java/native/docs/FakeApi.md @@ -1536,7 +1536,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **400** | Someting wrong | - | +| **400** | Something wrong | - | ## testGroupParametersWithHttpInfo @@ -1616,7 +1616,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **400** | Someting wrong | - | +| **400** | Something wrong | - | diff --git a/samples/client/petstore/java/native/docs/StoreApi.md b/samples/client/petstore/java/native/docs/StoreApi.md index 7f2744f1c1..f45d5a4c76 100644 --- a/samples/client/petstore/java/native/docs/StoreApi.md +++ b/samples/client/petstore/java/native/docs/StoreApi.md @@ -295,7 +295,7 @@ ApiResponse<**Map<String, Integer>**> Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example @@ -362,7 +362,7 @@ No authorization required Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/StoreApi.java index 682a815d04..75fca36444 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/StoreApi.java @@ -218,7 +218,7 @@ public class StoreApi { } /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched (required) * @return Order * @throws ApiException if fails to make API call @@ -230,7 +230,7 @@ public class StoreApi { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched (required) * @return ApiResponse<Order> * @throws ApiException if fails to make API call diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java index ae24bce910..698b5bb31e 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java @@ -80,7 +80,7 @@ public class AdditionalPropertiesAnyType extends HashMap { * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. * @param key the name of the property - * @param value the value value of the property + * @param value the value of the property * @return self reference */ @JsonAnySetter diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java index 6e95eda0b1..5a3625f250 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java @@ -81,7 +81,7 @@ public class AdditionalPropertiesArray extends HashMap { * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. * @param key the name of the property - * @param value the value value of the property + * @param value the value of the property * @return self reference */ @JsonAnySetter diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java index 8361af60fe..72638f3e48 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java @@ -80,7 +80,7 @@ public class AdditionalPropertiesBoolean extends HashMap { * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. * @param key the name of the property - * @param value the value value of the property + * @param value the value of the property * @return self reference */ @JsonAnySetter diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java index 5d02bc15ae..42c9d36e74 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java @@ -80,7 +80,7 @@ public class AdditionalPropertiesInteger extends HashMap { * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. * @param key the name of the property - * @param value the value value of the property + * @param value the value of the property * @return self reference */ @JsonAnySetter diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java index 62762b5356..337f663452 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java @@ -81,7 +81,7 @@ public class AdditionalPropertiesNumber extends HashMap { * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. * @param key the name of the property - * @param value the value value of the property + * @param value the value of the property * @return self reference */ @JsonAnySetter diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java index f8bac3d1c2..fece9479ea 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java @@ -80,7 +80,7 @@ public class AdditionalPropertiesObject extends HashMap { * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. * @param key the name of the property - * @param value the value value of the property + * @param value the value of the property * @return self reference */ @JsonAnySetter diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java index 692d474c91..5be6aabb7d 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java @@ -80,7 +80,7 @@ public class AdditionalPropertiesString extends HashMap { * Set the additional (undeclared) property with the specified name and value. * If the property does not already exist, create it otherwise replace it. * @param key the name of the property - * @param value the value value of the property + * @param value the value of the property * @return self reference */ @JsonAnySetter diff --git a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/native/src/test/java/org/openapitools/client/api/StoreApiTest.java index 06b18c88b2..6ca7297142 100644 --- a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/native/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -69,7 +69,7 @@ public class StoreApiTest { /** * Find purchase order by ID * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @throws ApiException * if the Api call fails diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/FakeApi.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/FakeApi.md index f804c0e194..49cd429ccb 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/FakeApi.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/FakeApi.md @@ -756,7 +756,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **400** | Someting wrong | - | +| **400** | Something wrong | - | # **testInlineAdditionalProperties** diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/StoreApi.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/StoreApi.md index 76bdde9e99..962c32a60d 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/StoreApi.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/StoreApi.md @@ -143,7 +143,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```java diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/FakeApi.java index 36dc208a26..edea781fa9 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/FakeApi.java @@ -1671,7 +1671,7 @@ public class FakeApi { * @http.response.details - +
Status Code Description Response Headers
400 Someting wrong -
400 Something wrong -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { @@ -1684,7 +1684,7 @@ public class FakeApi { * @http.response.details - +
Status Code Description Response Headers
400 Someting wrong -
400 Something wrong -
*/ public void execute() throws ApiException { @@ -1698,7 +1698,7 @@ public class FakeApi { * @http.response.details - +
Status Code Description Response Headers
400 Someting wrong -
400 Something wrong -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { @@ -1713,7 +1713,7 @@ public class FakeApi { * @http.response.details - +
Status Code Description Response Headers
400 Someting wrong -
400 Something wrong -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { @@ -1731,7 +1731,7 @@ public class FakeApi { * @http.response.details - +
Status Code Description Response Headers
400 Someting wrong -
400 Something wrong -
*/ public APItestGroupParametersRequest testGroupParameters(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group) { diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/StoreApi.java index e329b70080..1a173c40ca 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/StoreApi.java @@ -408,7 +408,7 @@ public class StoreApi { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched (required) * @return Order * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -427,7 +427,7 @@ public class StoreApi { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched (required) * @return ApiResponse<Order> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -447,7 +447,7 @@ public class StoreApi { /** * Find purchase order by ID (asynchronously) - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched (required) * @param _callback The callback to be executed when the API call finishes * @return The request call diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/resources/openapi/openapi.yaml b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/resources/openapi/openapi.yaml index 5f55e8c53f..e7e17402f6 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/resources/openapi/openapi.yaml +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/resources/openapi/openapi.yaml @@ -370,7 +370,7 @@ paths: x-accepts: application/json get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched @@ -672,7 +672,7 @@ paths: responses: "400": content: {} - description: Someting wrong + description: Something wrong summary: Fake endpoint to test group parameters (optional) tags: - fake diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/JSONTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/JSONTest.java index 4fdb824f6b..192c7e2b13 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/JSONTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/JSONTest.java @@ -94,7 +94,7 @@ public class JSONTest { // OK } try { - // unexpected miliseconds + // unexpected milliseconds json.deserialize("\"2015-11-07T03:49:09.000Z\"", Date.class); fail("json parsing should fail"); } catch (RuntimeException e) { diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/api/StoreApiTest.java index 786a51c7d1..b6d81a6c58 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -61,7 +61,7 @@ public class StoreApiTest { /** * Find purchase order by ID * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @throws ApiException if the Api call fails */ diff --git a/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Category.java index 8f02b16a9d..74e474b0e2 100644 --- a/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Category.java @@ -236,7 +236,7 @@ public class Category { public void write(JsonWriter out, Category value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/ModelApiResponse.java index e1ac937945..855c8732c4 100644 --- a/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -268,7 +268,7 @@ public class ModelApiResponse { public void write(JsonWriter out, ModelApiResponse value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Order.java index cd1d2e950f..b606980298 100644 --- a/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Order.java @@ -402,7 +402,7 @@ public class Order { public void write(JsonWriter out, Order value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Pet.java index f7ee418ae9..e82a8626bb 100644 --- a/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Pet.java @@ -456,7 +456,7 @@ public class Pet { public void write(JsonWriter out, Pet value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Tag.java index b010e1ce9c..312895d569 100644 --- a/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/Tag.java @@ -236,7 +236,7 @@ public class Tag { public void write(JsonWriter out, Tag value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/User.java index 267f33a370..3078490c3a 100644 --- a/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/model/User.java @@ -425,7 +425,7 @@ public class User { public void write(JsonWriter out, User value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/api/openapi.yaml b/samples/client/petstore/java/okhttp-gson-parcelableModel/api/openapi.yaml index 5f55e8c53f..e7e17402f6 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/api/openapi.yaml +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/api/openapi.yaml @@ -370,7 +370,7 @@ paths: x-accepts: application/json get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched @@ -672,7 +672,7 @@ paths: responses: "400": content: {} - description: Someting wrong + description: Something wrong summary: Fake endpoint to test group parameters (optional) tags: - fake diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FakeApi.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FakeApi.md index f804c0e194..49cd429ccb 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FakeApi.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/FakeApi.md @@ -756,7 +756,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **400** | Someting wrong | - | +| **400** | Something wrong | - | # **testInlineAdditionalProperties** diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/StoreApi.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/StoreApi.md index 76bdde9e99..962c32a60d 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/StoreApi.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/StoreApi.md @@ -143,7 +143,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```java diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/FakeApi.java index 6dfe38809b..8e914fae8b 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/FakeApi.java @@ -1619,7 +1619,7 @@ public class FakeApi { * @http.response.details - +
Status Code Description Response Headers
400 Someting wrong -
400 Something wrong -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { @@ -1632,7 +1632,7 @@ public class FakeApi { * @http.response.details - +
Status Code Description Response Headers
400 Someting wrong -
400 Something wrong -
*/ public void execute() throws ApiException { @@ -1646,7 +1646,7 @@ public class FakeApi { * @http.response.details - +
Status Code Description Response Headers
400 Someting wrong -
400 Something wrong -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { @@ -1661,7 +1661,7 @@ public class FakeApi { * @http.response.details - +
Status Code Description Response Headers
400 Someting wrong -
400 Something wrong -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { @@ -1679,7 +1679,7 @@ public class FakeApi { * @http.response.details - +
Status Code Description Response Headers
400 Someting wrong -
400 Something wrong -
*/ public APItestGroupParametersRequest testGroupParameters(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group) { diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/StoreApi.java index ac429922b6..064e82874b 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/StoreApi.java @@ -381,7 +381,7 @@ public class StoreApi { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched (required) * @return Order * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -400,7 +400,7 @@ public class StoreApi { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched (required) * @return ApiResponse<Order> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -420,7 +420,7 @@ public class StoreApi { /** * Find purchase order by ID (asynchronously) - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched (required) * @param _callback The callback to be executed when the API call finishes * @return The request call diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/org/openapitools/client/api/StoreApiTest.java index 4aa80d6f0a..856dc21442 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -66,7 +66,7 @@ public class StoreApiTest { /** * Find purchase order by ID * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @throws ApiException * if the Api call fails diff --git a/samples/client/petstore/java/okhttp-gson-swagger1/api/openapi.yaml b/samples/client/petstore/java/okhttp-gson-swagger1/api/openapi.yaml index 2d7ea625b4..de4b48c1c4 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger1/api/openapi.yaml +++ b/samples/client/petstore/java/okhttp-gson-swagger1/api/openapi.yaml @@ -364,7 +364,7 @@ paths: x-accepts: application/json get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched diff --git a/samples/client/petstore/java/okhttp-gson-swagger1/docs/StoreApi.md b/samples/client/petstore/java/okhttp-gson-swagger1/docs/StoreApi.md index 7564977714..2cd1833e6b 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger1/docs/StoreApi.md +++ b/samples/client/petstore/java/okhttp-gson-swagger1/docs/StoreApi.md @@ -143,7 +143,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```java diff --git a/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/api/StoreApi.java index 703d4f926b..324f35d516 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/api/StoreApi.java @@ -381,7 +381,7 @@ public class StoreApi { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched (required) * @return Order * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -400,7 +400,7 @@ public class StoreApi { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched (required) * @return ApiResponse<Order> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -420,7 +420,7 @@ public class StoreApi { /** * Find purchase order by ID (asynchronously) - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched (required) * @param _callback The callback to be executed when the API call finishes * @return The request call diff --git a/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/Category.java index f1c2ab0358..d404c0c07c 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/Category.java @@ -241,7 +241,7 @@ public class Category { public void write(JsonWriter out, Category value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/ModelApiResponse.java index 1eddb844b1..db10be1829 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -274,7 +274,7 @@ public class ModelApiResponse { public void write(JsonWriter out, ModelApiResponse value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/Order.java index a88514fafe..547ed754b8 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/Order.java @@ -411,7 +411,7 @@ public class Order { public void write(JsonWriter out, Order value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/Pet.java index 13f03b976f..7e20756fb0 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/Pet.java @@ -465,7 +465,7 @@ public class Pet { public void write(JsonWriter out, Pet value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/Tag.java index 29cf8fe79a..d6e095358f 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/Tag.java @@ -241,7 +241,7 @@ public class Tag { public void write(JsonWriter out, Tag value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/User.java index 726c838cf3..3dc3fc06df 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/model/User.java @@ -436,7 +436,7 @@ public class User { public void write(JsonWriter out, User value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson-swagger1/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/okhttp-gson-swagger1/src/test/java/org/openapitools/client/api/StoreApiTest.java index d8f7e07e96..3ca20d0b21 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger1/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/okhttp-gson-swagger1/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -61,7 +61,7 @@ public class StoreApiTest { /** * Find purchase order by ID * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @throws ApiException if the Api call fails */ diff --git a/samples/client/petstore/java/okhttp-gson/api/openapi.yaml b/samples/client/petstore/java/okhttp-gson/api/openapi.yaml index 1ad553c3ad..c14ba32722 100644 --- a/samples/client/petstore/java/okhttp-gson/api/openapi.yaml +++ b/samples/client/petstore/java/okhttp-gson/api/openapi.yaml @@ -386,7 +386,7 @@ paths: x-accepts: application/json get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched @@ -686,7 +686,7 @@ paths: style: form responses: "400": - description: Someting wrong + description: Something wrong security: - bearer_test: [] summary: Fake endpoint to test group parameters (optional) diff --git a/samples/client/petstore/java/okhttp-gson/docs/FakeApi.md b/samples/client/petstore/java/okhttp-gson/docs/FakeApi.md index 2b7eebac95..e004c39d31 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/FakeApi.md +++ b/samples/client/petstore/java/okhttp-gson/docs/FakeApi.md @@ -813,7 +813,7 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **400** | Someting wrong | - | +| **400** | Something wrong | - | # **testInlineAdditionalProperties** diff --git a/samples/client/petstore/java/okhttp-gson/docs/StoreApi.md b/samples/client/petstore/java/okhttp-gson/docs/StoreApi.md index 26866a89c1..59b4051d1a 100644 --- a/samples/client/petstore/java/okhttp-gson/docs/StoreApi.md +++ b/samples/client/petstore/java/okhttp-gson/docs/StoreApi.md @@ -143,7 +143,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```java diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/FakeApi.java index 99ad929095..48c569065c 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/FakeApi.java @@ -1727,7 +1727,7 @@ public class FakeApi { * @http.response.details - +
Status Code Description Response Headers
400 Someting wrong -
400 Something wrong -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { @@ -1740,7 +1740,7 @@ public class FakeApi { * @http.response.details - +
Status Code Description Response Headers
400 Someting wrong -
400 Something wrong -
*/ public void execute() throws ApiException { @@ -1754,7 +1754,7 @@ public class FakeApi { * @http.response.details - +
Status Code Description Response Headers
400 Someting wrong -
400 Something wrong -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { @@ -1769,7 +1769,7 @@ public class FakeApi { * @http.response.details - +
Status Code Description Response Headers
400 Someting wrong -
400 Something wrong -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { @@ -1787,7 +1787,7 @@ public class FakeApi { * @http.response.details - +
Status Code Description Response Headers
400 Someting wrong -
400 Something wrong -
*/ public APItestGroupParametersRequest testGroupParameters(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group) { diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/StoreApi.java index 6069ecfb8c..82f6c6b979 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/StoreApi.java @@ -381,7 +381,7 @@ public class StoreApi { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched (required) * @return Order * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -400,7 +400,7 @@ public class StoreApi { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched (required) * @return ApiResponse<Order> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -420,7 +420,7 @@ public class StoreApi { /** * Find purchase order by ID (asynchronously) - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched (required) * @param _callback The callback to be executed when the API call finishes * @return The request call diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 28bbb53b24..80b994c0a7 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -453,7 +453,7 @@ public class AdditionalPropertiesClass { public void write(JsonWriter out, AdditionalPropertiesClass value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Apple.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Apple.java index 8403f7bc78..86449232ba 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Apple.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Apple.java @@ -239,7 +239,7 @@ public class Apple { public void write(JsonWriter out, Apple value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java index 328f87fed4..d8b8520638 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java @@ -219,7 +219,7 @@ public class ArrayOfArrayOfNumberOnly { public void write(JsonWriter out, ArrayOfArrayOfNumberOnly value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOf.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOf.java index d4a97afe35..8d4287ee23 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOf.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOf.java @@ -298,7 +298,7 @@ public class ArrayOfInlineAllOf { public void write(JsonWriter out, ArrayOfInlineAllOf value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyInner.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyInner.java index fd3e871837..1e067f7667 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyInner.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyInner.java @@ -239,7 +239,7 @@ public class ArrayOfInlineAllOfArrayAllofDogPropertyInner { public void write(JsonWriter out, ArrayOfInlineAllOfArrayAllofDogPropertyInner value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf.java index b821174429..8b3de5de22 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf.java @@ -207,7 +207,7 @@ public class ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf { public void write(JsonWriter out, ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf1.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf1.java index 77b4899732..8a96f016aa 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf1.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf1.java @@ -207,7 +207,7 @@ public class ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf1 { public void write(JsonWriter out, ArrayOfInlineAllOfArrayAllofDogPropertyInnerAllOf1 value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java index 62f4627a3a..8a2d523247 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java @@ -219,7 +219,7 @@ public class ArrayOfNumberOnly { public void write(JsonWriter out, ArrayOfNumberOnly value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayTest.java index 61a26ef086..8bbfae3073 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ArrayTest.java @@ -301,7 +301,7 @@ public class ArrayTest { public void write(JsonWriter out, ArrayTest value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Banana.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Banana.java index eb21812142..20c20d5802 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Banana.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Banana.java @@ -205,7 +205,7 @@ public class Banana { public void write(JsonWriter out, Banana value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/BasquePig.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/BasquePig.java index b27c3c4ad5..d0fb1e9d26 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/BasquePig.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/BasquePig.java @@ -215,7 +215,7 @@ public class BasquePig { public void write(JsonWriter out, BasquePig value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Capitalization.java index e075e52134..4336894f31 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Capitalization.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Capitalization.java @@ -367,7 +367,7 @@ public class Capitalization { public void write(JsonWriter out, Capitalization value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Cat.java index 71f5f179e6..5d870dc417 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Cat.java @@ -218,7 +218,7 @@ public class Cat extends Animal { public void write(JsonWriter out, Cat value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/CatAllOf.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/CatAllOf.java index f85e8ee16f..1d5e106c09 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/CatAllOf.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/CatAllOf.java @@ -204,7 +204,7 @@ public class CatAllOf { public void write(JsonWriter out, CatAllOf value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Category.java index 80930ee7ae..c5808b89ae 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Category.java @@ -244,7 +244,7 @@ public class Category { public void write(JsonWriter out, Category value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ClassModel.java index 3389bd1180..6d367ffa42 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ClassModel.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ClassModel.java @@ -207,7 +207,7 @@ public class ClassModel { public void write(JsonWriter out, ClassModel value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Client.java index 13228390a8..321fd1df16 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Client.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Client.java @@ -207,7 +207,7 @@ public class Client { public void write(JsonWriter out, Client value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ComplexQuadrilateral.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ComplexQuadrilateral.java index aef8ae5e7d..e4c4c69e0b 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ComplexQuadrilateral.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ComplexQuadrilateral.java @@ -248,7 +248,7 @@ public class ComplexQuadrilateral { public void write(JsonWriter out, ComplexQuadrilateral value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/DanishPig.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/DanishPig.java index 4f41de3c69..8241d280a0 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/DanishPig.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/DanishPig.java @@ -215,7 +215,7 @@ public class DanishPig { public void write(JsonWriter out, DanishPig value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/DeprecatedObject.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/DeprecatedObject.java index 89469f8273..b0e05f5dde 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/DeprecatedObject.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/DeprecatedObject.java @@ -209,7 +209,7 @@ public class DeprecatedObject { public void write(JsonWriter out, DeprecatedObject value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Dog.java index 88118b5b34..0531422dde 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Dog.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Dog.java @@ -218,7 +218,7 @@ public class Dog extends Animal { public void write(JsonWriter out, Dog value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/DogAllOf.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/DogAllOf.java index 94fb415676..57b6b6de82 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/DogAllOf.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/DogAllOf.java @@ -207,7 +207,7 @@ public class DogAllOf { public void write(JsonWriter out, DogAllOf value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumArrays.java index 1cf0b6fc4f..8bf16a25a8 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumArrays.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumArrays.java @@ -344,7 +344,7 @@ public class EnumArrays { public void write(JsonWriter out, EnumArrays value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumStringDiscriminator.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumStringDiscriminator.java index a91ba49993..e321e66158 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumStringDiscriminator.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumStringDiscriminator.java @@ -259,7 +259,7 @@ public class EnumStringDiscriminator { public void write(JsonWriter out, EnumStringDiscriminator value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumTest.java index c0f032081a..df981cff1d 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EnumTest.java @@ -705,7 +705,7 @@ public class EnumTest { public void write(JsonWriter out, EnumTest value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EquilateralTriangle.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EquilateralTriangle.java index 6df080b77c..7d0557b6fb 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EquilateralTriangle.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/EquilateralTriangle.java @@ -248,7 +248,7 @@ public class EquilateralTriangle { public void write(JsonWriter out, EquilateralTriangle value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java index 70afd7f228..2f0f5831b7 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java @@ -262,7 +262,7 @@ public class FileSchemaTestClass { public void write(JsonWriter out, FileSchemaTestClass value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Foo.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Foo.java index 18d24ce352..6591e49b1d 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Foo.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Foo.java @@ -207,7 +207,7 @@ public class Foo { public void write(JsonWriter out, Foo value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java index b6cf56d6bb..3398f0f058 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java @@ -209,7 +209,7 @@ public class FooGetDefaultResponse { public void write(JsonWriter out, FooGetDefaultResponse value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FormatTest.java index bbf26ee29b..2e1f63f769 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/FormatTest.java @@ -712,7 +712,7 @@ public class FormatTest { public void write(JsonWriter out, FormatTest value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java index d07eac97c6..30174cbd5a 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java @@ -231,7 +231,7 @@ public class HasOnlyReadOnly { public void write(JsonWriter out, HasOnlyReadOnly value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/HealthCheckResult.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/HealthCheckResult.java index 9518b0b2a3..910feb89c1 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/HealthCheckResult.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/HealthCheckResult.java @@ -219,7 +219,7 @@ public class HealthCheckResult { public void write(JsonWriter out, HealthCheckResult value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/MapTest.java index 3d7ef57a00..642cb06aab 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/MapTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/MapTest.java @@ -372,7 +372,7 @@ public class MapTest { public void write(JsonWriter out, MapTest value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java index c15891e298..bbfdee3109 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -278,7 +278,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass { public void write(JsonWriter out, MixedPropertiesAndAdditionalPropertiesClass value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Model200Response.java index b737dd4266..eaab91cfe9 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Model200Response.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Model200Response.java @@ -236,7 +236,7 @@ public class Model200Response { public void write(JsonWriter out, Model200Response value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelApiResponse.java index ce22205c28..2a9dbc746f 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelApiResponse.java @@ -268,7 +268,7 @@ public class ModelApiResponse { public void write(JsonWriter out, ModelApiResponse value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelFile.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelFile.java index 6427d62625..de3cdd9914 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelFile.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelFile.java @@ -207,7 +207,7 @@ public class ModelFile { public void write(JsonWriter out, ModelFile value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelList.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelList.java index 8cc4aabfcd..42ef11b0a3 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelList.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelList.java @@ -207,7 +207,7 @@ public class ModelList { public void write(JsonWriter out, ModelList value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelReturn.java index 71d191177f..7a3c67d42f 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelReturn.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ModelReturn.java @@ -204,7 +204,7 @@ public class ModelReturn { public void write(JsonWriter out, ModelReturn value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Name.java index 68fc6ab068..24997479f9 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Name.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Name.java @@ -294,7 +294,7 @@ public class Name { public void write(JsonWriter out, Name value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NumberOnly.java index f01af57e0c..2ed94c6f0a 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NumberOnly.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/NumberOnly.java @@ -205,7 +205,7 @@ public class NumberOnly { public void write(JsonWriter out, NumberOnly value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java index e0f13eef12..1186d9bd91 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java @@ -320,7 +320,7 @@ public class ObjectWithDeprecatedFields { public void write(JsonWriter out, ObjectWithDeprecatedFields value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Order.java index 01d74430dc..2000a36004 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Order.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Order.java @@ -402,7 +402,7 @@ public class Order { public void write(JsonWriter out, Order value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/OuterComposite.java index 05a163161d..400a51a515 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/OuterComposite.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/OuterComposite.java @@ -266,7 +266,7 @@ public class OuterComposite { public void write(JsonWriter out, OuterComposite value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ParentPet.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ParentPet.java index 51c3ae6fc2..ffc645f582 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ParentPet.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ParentPet.java @@ -186,7 +186,7 @@ public class ParentPet extends GrandparentAnimal { public void write(JsonWriter out, ParentPet value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Pet.java index bfba10cd0b..a14813e2f3 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Pet.java @@ -454,7 +454,7 @@ public class Pet { public void write(JsonWriter out, Pet value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/PetWithRequiredTags.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/PetWithRequiredTags.java index fdf330c88c..6fc90776b8 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/PetWithRequiredTags.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/PetWithRequiredTags.java @@ -448,7 +448,7 @@ public class PetWithRequiredTags { public void write(JsonWriter out, PetWithRequiredTags value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/QuadrilateralInterface.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/QuadrilateralInterface.java index 98f88dea6d..6c817c77bf 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/QuadrilateralInterface.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/QuadrilateralInterface.java @@ -215,7 +215,7 @@ public class QuadrilateralInterface { public void write(JsonWriter out, QuadrilateralInterface value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java index ffa344cd89..5dca09f942 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java @@ -238,7 +238,7 @@ public class ReadOnlyFirst { public void write(JsonWriter out, ReadOnlyFirst value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ScaleneTriangle.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ScaleneTriangle.java index 149f5f59be..32cc45abe8 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ScaleneTriangle.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ScaleneTriangle.java @@ -248,7 +248,7 @@ public class ScaleneTriangle { public void write(JsonWriter out, ScaleneTriangle value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ShapeInterface.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ShapeInterface.java index 6584c3cd60..cd6bc7052c 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ShapeInterface.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/ShapeInterface.java @@ -215,7 +215,7 @@ public class ShapeInterface { public void write(JsonWriter out, ShapeInterface value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/SimpleQuadrilateral.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/SimpleQuadrilateral.java index 9a10cbaab2..918741f9ce 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/SimpleQuadrilateral.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/SimpleQuadrilateral.java @@ -248,7 +248,7 @@ public class SimpleQuadrilateral { public void write(JsonWriter out, SimpleQuadrilateral value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/SpecialModelName.java index 289e823eb9..af54ba6e24 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -236,7 +236,7 @@ public class SpecialModelName { public void write(JsonWriter out, SpecialModelName value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Tag.java index 807a6426c4..4ee8713b6f 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Tag.java @@ -236,7 +236,7 @@ public class Tag { public void write(JsonWriter out, Tag value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/TriangleInterface.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/TriangleInterface.java index 20ba9fa341..bc27096a10 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/TriangleInterface.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/TriangleInterface.java @@ -215,7 +215,7 @@ public class TriangleInterface { public void write(JsonWriter out, TriangleInterface value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/User.java index 38382f220e..5a588fe40d 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/User.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/User.java @@ -553,7 +553,7 @@ public class User { public void write(JsonWriter out, User value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Whale.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Whale.java index 8eb2627313..07af868522 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Whale.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Whale.java @@ -273,7 +273,7 @@ public class Whale { public void write(JsonWriter out, Whale value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Zebra.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Zebra.java index 3acf608a6f..12f27a952f 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Zebra.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/model/Zebra.java @@ -296,7 +296,7 @@ public class Zebra { public void write(JsonWriter out, Zebra value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); - // serialize additonal properties + // serialize additional properties if (value.getAdditionalProperties() != null) { for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { if (entry.getValue() instanceof String) diff --git a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/JSONTest.java b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/JSONTest.java index e90fe6a55f..8e042e9234 100644 --- a/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/JSONTest.java +++ b/samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/JSONTest.java @@ -113,7 +113,7 @@ public class JSONTest { // OK } try { - // unexpected miliseconds + // unexpected milliseconds json.deserialize("\"2015-11-07T03:49:09.000Z\"", Date.class); fail("json parsing should fail"); } catch (RuntimeException e) { diff --git a/samples/client/petstore/java/rest-assured-jackson/api/openapi.yaml b/samples/client/petstore/java/rest-assured-jackson/api/openapi.yaml index 5f55e8c53f..e7e17402f6 100644 --- a/samples/client/petstore/java/rest-assured-jackson/api/openapi.yaml +++ b/samples/client/petstore/java/rest-assured-jackson/api/openapi.yaml @@ -370,7 +370,7 @@ paths: x-accepts: application/json get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched @@ -672,7 +672,7 @@ paths: responses: "400": content: {} - description: Someting wrong + description: Something wrong summary: Fake endpoint to test group parameters (optional) tags: - fake diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/StoreApi.md b/samples/client/petstore/java/rest-assured-jackson/docs/StoreApi.md index 5466205059..4574efe73c 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/StoreApi.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/StoreApi.md @@ -96,7 +96,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```java diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/StoreApi.java index 2cd3e0d21c..730db2d87b 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/StoreApi.java @@ -214,7 +214,7 @@ public class StoreApi { } /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @see #orderIdPath ID of pet that needs to be fetched (required) * return Order diff --git a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/api/FakeApiTest.java b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/api/FakeApiTest.java index d014aee7cd..183de79127 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/api/FakeApiTest.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/test/java/org/openapitools/client/api/FakeApiTest.java @@ -240,7 +240,7 @@ public class FakeApiTest { /** - * Someting wrong + * Something wrong */ @Test public void shouldSee400AfterTestGroupParameters() { diff --git a/samples/client/petstore/java/rest-assured/api/openapi.yaml b/samples/client/petstore/java/rest-assured/api/openapi.yaml index 5f55e8c53f..e7e17402f6 100644 --- a/samples/client/petstore/java/rest-assured/api/openapi.yaml +++ b/samples/client/petstore/java/rest-assured/api/openapi.yaml @@ -370,7 +370,7 @@ paths: x-accepts: application/json get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched @@ -672,7 +672,7 @@ paths: responses: "400": content: {} - description: Someting wrong + description: Something wrong summary: Fake endpoint to test group parameters (optional) tags: - fake diff --git a/samples/client/petstore/java/rest-assured/docs/StoreApi.md b/samples/client/petstore/java/rest-assured/docs/StoreApi.md index 5466205059..4574efe73c 100644 --- a/samples/client/petstore/java/rest-assured/docs/StoreApi.md +++ b/samples/client/petstore/java/rest-assured/docs/StoreApi.md @@ -96,7 +96,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```java diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/StoreApi.java index 00080fed5a..fd1abe4db3 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/StoreApi.java @@ -215,7 +215,7 @@ public class StoreApi { } /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @see #orderIdPath ID of pet that needs to be fetched (required) * return Order diff --git a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/api/FakeApiTest.java b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/api/FakeApiTest.java index a6b1698aec..e248c2155a 100644 --- a/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/api/FakeApiTest.java +++ b/samples/client/petstore/java/rest-assured/src/test/java/org/openapitools/client/api/FakeApiTest.java @@ -240,7 +240,7 @@ public class FakeApiTest { /** - * Someting wrong + * Something wrong */ @Test public void shouldSee400AfterTestGroupParameters() { diff --git a/samples/client/petstore/java/resteasy/api/openapi.yaml b/samples/client/petstore/java/resteasy/api/openapi.yaml index 5f55e8c53f..e7e17402f6 100644 --- a/samples/client/petstore/java/resteasy/api/openapi.yaml +++ b/samples/client/petstore/java/resteasy/api/openapi.yaml @@ -370,7 +370,7 @@ paths: x-accepts: application/json get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched @@ -672,7 +672,7 @@ paths: responses: "400": content: {} - description: Someting wrong + description: Something wrong summary: Fake endpoint to test group parameters (optional) tags: - fake diff --git a/samples/client/petstore/java/resteasy/docs/FakeApi.md b/samples/client/petstore/java/resteasy/docs/FakeApi.md index 25301e7502..627366e41d 100644 --- a/samples/client/petstore/java/resteasy/docs/FakeApi.md +++ b/samples/client/petstore/java/resteasy/docs/FakeApi.md @@ -796,7 +796,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **400** | Someting wrong | - | +| **400** | Something wrong | - | ## testInlineAdditionalProperties diff --git a/samples/client/petstore/java/resteasy/docs/StoreApi.md b/samples/client/petstore/java/resteasy/docs/StoreApi.md index 571e808abd..b64e208a83 100644 --- a/samples/client/petstore/java/resteasy/docs/StoreApi.md +++ b/samples/client/petstore/java/resteasy/docs/StoreApi.md @@ -152,7 +152,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/StoreApi.java index c5cd88a187..d6e587d24b 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/StoreApi.java @@ -116,7 +116,7 @@ public class StoreApi { } /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched (required) * @return a {@code Order} * @throws ApiException if fails to make API call diff --git a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/api/StoreApiTest.java index f83e6c3897..a43d64debf 100644 --- a/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/resteasy/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -66,7 +66,7 @@ public class StoreApiTest { /** * Find purchase order by ID * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @throws ApiException * if the Api call fails diff --git a/samples/client/petstore/java/resttemplate-swagger1/api/openapi.yaml b/samples/client/petstore/java/resttemplate-swagger1/api/openapi.yaml index 2d7ea625b4..de4b48c1c4 100644 --- a/samples/client/petstore/java/resttemplate-swagger1/api/openapi.yaml +++ b/samples/client/petstore/java/resttemplate-swagger1/api/openapi.yaml @@ -364,7 +364,7 @@ paths: x-accepts: application/json get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched diff --git a/samples/client/petstore/java/resttemplate-swagger1/docs/StoreApi.md b/samples/client/petstore/java/resttemplate-swagger1/docs/StoreApi.md index f401d417df..bacbaeef14 100644 --- a/samples/client/petstore/java/resttemplate-swagger1/docs/StoreApi.md +++ b/samples/client/petstore/java/resttemplate-swagger1/docs/StoreApi.md @@ -152,7 +152,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example diff --git a/samples/client/petstore/java/resttemplate-swagger1/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/resttemplate-swagger1/src/main/java/org/openapitools/client/api/StoreApi.java index dcb96aad9f..3172d5ab47 100644 --- a/samples/client/petstore/java/resttemplate-swagger1/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/resttemplate-swagger1/src/main/java/org/openapitools/client/api/StoreApi.java @@ -136,7 +136,7 @@ public class StoreApi { } /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions *

200 - successful operation *

400 - Invalid ID supplied *

404 - Order not found @@ -150,7 +150,7 @@ public class StoreApi { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions *

200 - successful operation *

400 - Invalid ID supplied *

404 - Order not found diff --git a/samples/client/petstore/java/resttemplate-swagger1/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/resttemplate-swagger1/src/test/java/org/openapitools/client/api/StoreApiTest.java index edef3c80ce..06f67f67d6 100644 --- a/samples/client/petstore/java/resttemplate-swagger1/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/resttemplate-swagger1/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -67,7 +67,7 @@ public class StoreApiTest { /** * Find purchase order by ID * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @throws ApiException * if the Api call fails diff --git a/samples/client/petstore/java/resttemplate-withXml/api/openapi.yaml b/samples/client/petstore/java/resttemplate-withXml/api/openapi.yaml index 5f55e8c53f..e7e17402f6 100644 --- a/samples/client/petstore/java/resttemplate-withXml/api/openapi.yaml +++ b/samples/client/petstore/java/resttemplate-withXml/api/openapi.yaml @@ -370,7 +370,7 @@ paths: x-accepts: application/json get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched @@ -672,7 +672,7 @@ paths: responses: "400": content: {} - description: Someting wrong + description: Something wrong summary: Fake endpoint to test group parameters (optional) tags: - fake diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/FakeApi.md b/samples/client/petstore/java/resttemplate-withXml/docs/FakeApi.md index 25301e7502..627366e41d 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/FakeApi.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/FakeApi.md @@ -796,7 +796,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **400** | Someting wrong | - | +| **400** | Something wrong | - | ## testInlineAdditionalProperties diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/StoreApi.md b/samples/client/petstore/java/resttemplate-withXml/docs/StoreApi.md index 571e808abd..b64e208a83 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/StoreApi.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/StoreApi.md @@ -152,7 +152,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/FakeApi.java index 1fcb8328c7..3251aaa0e1 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/FakeApi.java @@ -602,7 +602,7 @@ public class FakeApi { /** * Fake endpoint to test group parameters (optional) * Fake endpoint to test group parameters (optional) - *

400 - Someting wrong + *

400 - Something wrong * @param requiredStringGroup Required String in group parameters (required) * @param requiredBooleanGroup Required Boolean in group parameters (required) * @param requiredInt64Group Required Integer in group parameters (required) @@ -618,7 +618,7 @@ public class FakeApi { /** * Fake endpoint to test group parameters (optional) * Fake endpoint to test group parameters (optional) - *

400 - Someting wrong + *

400 - Something wrong * @param requiredStringGroup Required String in group parameters (required) * @param requiredBooleanGroup Required Boolean in group parameters (required) * @param requiredInt64Group Required Integer in group parameters (required) diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/StoreApi.java index 51afdd6c2d..b45b41c32f 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/StoreApi.java @@ -136,7 +136,7 @@ public class StoreApi { } /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions *

200 - successful operation *

400 - Invalid ID supplied *

404 - Order not found @@ -150,7 +150,7 @@ public class StoreApi { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions *

200 - successful operation *

400 - Invalid ID supplied *

404 - Order not found diff --git a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/api/StoreApiTest.java index b448f30ede..0e7d086fea 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -65,7 +65,7 @@ public class StoreApiTest { /** * Find purchase order by ID * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @throws ApiException * if the Api call fails diff --git a/samples/client/petstore/java/resttemplate/api/openapi.yaml b/samples/client/petstore/java/resttemplate/api/openapi.yaml index 5f55e8c53f..e7e17402f6 100644 --- a/samples/client/petstore/java/resttemplate/api/openapi.yaml +++ b/samples/client/petstore/java/resttemplate/api/openapi.yaml @@ -370,7 +370,7 @@ paths: x-accepts: application/json get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched @@ -672,7 +672,7 @@ paths: responses: "400": content: {} - description: Someting wrong + description: Something wrong summary: Fake endpoint to test group parameters (optional) tags: - fake diff --git a/samples/client/petstore/java/resttemplate/docs/FakeApi.md b/samples/client/petstore/java/resttemplate/docs/FakeApi.md index 25301e7502..627366e41d 100644 --- a/samples/client/petstore/java/resttemplate/docs/FakeApi.md +++ b/samples/client/petstore/java/resttemplate/docs/FakeApi.md @@ -796,7 +796,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **400** | Someting wrong | - | +| **400** | Something wrong | - | ## testInlineAdditionalProperties diff --git a/samples/client/petstore/java/resttemplate/docs/StoreApi.md b/samples/client/petstore/java/resttemplate/docs/StoreApi.md index 571e808abd..b64e208a83 100644 --- a/samples/client/petstore/java/resttemplate/docs/StoreApi.md +++ b/samples/client/petstore/java/resttemplate/docs/StoreApi.md @@ -152,7 +152,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/FakeApi.java index 1fcb8328c7..3251aaa0e1 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/FakeApi.java @@ -602,7 +602,7 @@ public class FakeApi { /** * Fake endpoint to test group parameters (optional) * Fake endpoint to test group parameters (optional) - *

400 - Someting wrong + *

400 - Something wrong * @param requiredStringGroup Required String in group parameters (required) * @param requiredBooleanGroup Required Boolean in group parameters (required) * @param requiredInt64Group Required Integer in group parameters (required) @@ -618,7 +618,7 @@ public class FakeApi { /** * Fake endpoint to test group parameters (optional) * Fake endpoint to test group parameters (optional) - *

400 - Someting wrong + *

400 - Something wrong * @param requiredStringGroup Required String in group parameters (required) * @param requiredBooleanGroup Required Boolean in group parameters (required) * @param requiredInt64Group Required Integer in group parameters (required) diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/StoreApi.java index 51afdd6c2d..b45b41c32f 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/StoreApi.java @@ -136,7 +136,7 @@ public class StoreApi { } /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions *

200 - successful operation *

400 - Invalid ID supplied *

404 - Order not found @@ -150,7 +150,7 @@ public class StoreApi { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions *

200 - successful operation *

400 - Invalid ID supplied *

404 - Order not found diff --git a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/api/StoreApiTest.java index b448f30ede..0e7d086fea 100644 --- a/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -65,7 +65,7 @@ public class StoreApiTest { /** * Find purchase order by ID * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @throws ApiException * if the Api call fails diff --git a/samples/client/petstore/java/retrofit2-play26/api/openapi.yaml b/samples/client/petstore/java/retrofit2-play26/api/openapi.yaml index 5f55e8c53f..e7e17402f6 100644 --- a/samples/client/petstore/java/retrofit2-play26/api/openapi.yaml +++ b/samples/client/petstore/java/retrofit2-play26/api/openapi.yaml @@ -370,7 +370,7 @@ paths: x-accepts: application/json get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched @@ -672,7 +672,7 @@ paths: responses: "400": content: {} - description: Someting wrong + description: Something wrong summary: Fake endpoint to test group parameters (optional) tags: - fake diff --git a/samples/client/petstore/java/retrofit2-play26/docs/FakeApi.md b/samples/client/petstore/java/retrofit2-play26/docs/FakeApi.md index 44193574ac..5722d2acb5 100644 --- a/samples/client/petstore/java/retrofit2-play26/docs/FakeApi.md +++ b/samples/client/petstore/java/retrofit2-play26/docs/FakeApi.md @@ -796,7 +796,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **400** | Someting wrong | - | +| **400** | Something wrong | - | ## testInlineAdditionalProperties diff --git a/samples/client/petstore/java/retrofit2-play26/docs/StoreApi.md b/samples/client/petstore/java/retrofit2-play26/docs/StoreApi.md index e6ae80525d..d4c6d6d987 100644 --- a/samples/client/petstore/java/retrofit2-play26/docs/StoreApi.md +++ b/samples/client/petstore/java/retrofit2-play26/docs/StoreApi.md @@ -152,7 +152,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/StoreApi.java index b9ccc8cff4..361ae3560b 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/StoreApi.java @@ -42,7 +42,7 @@ public interface StoreApi { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched (required) * @return Call<Order> */ diff --git a/samples/client/petstore/java/retrofit2-play26/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/retrofit2-play26/src/test/java/org/openapitools/client/api/StoreApiTest.java index 90c204243b..8cb33d8fd1 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/retrofit2-play26/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -43,7 +43,7 @@ public class StoreApiTest { /** * Find purchase order by ID * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions */ @Test public void getOrderByIdTest() { diff --git a/samples/client/petstore/java/retrofit2/api/openapi.yaml b/samples/client/petstore/java/retrofit2/api/openapi.yaml index 5f55e8c53f..e7e17402f6 100644 --- a/samples/client/petstore/java/retrofit2/api/openapi.yaml +++ b/samples/client/petstore/java/retrofit2/api/openapi.yaml @@ -370,7 +370,7 @@ paths: x-accepts: application/json get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched @@ -672,7 +672,7 @@ paths: responses: "400": content: {} - description: Someting wrong + description: Something wrong summary: Fake endpoint to test group parameters (optional) tags: - fake diff --git a/samples/client/petstore/java/retrofit2/docs/FakeApi.md b/samples/client/petstore/java/retrofit2/docs/FakeApi.md index 44193574ac..5722d2acb5 100644 --- a/samples/client/petstore/java/retrofit2/docs/FakeApi.md +++ b/samples/client/petstore/java/retrofit2/docs/FakeApi.md @@ -796,7 +796,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **400** | Someting wrong | - | +| **400** | Something wrong | - | ## testInlineAdditionalProperties diff --git a/samples/client/petstore/java/retrofit2/docs/StoreApi.md b/samples/client/petstore/java/retrofit2/docs/StoreApi.md index e6ae80525d..d4c6d6d987 100644 --- a/samples/client/petstore/java/retrofit2/docs/StoreApi.md +++ b/samples/client/petstore/java/retrofit2/docs/StoreApi.md @@ -152,7 +152,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/api/StoreApi.java index f4fd28bd1d..3a71697751 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/api/StoreApi.java @@ -39,7 +39,7 @@ public interface StoreApi { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched (required) * @return Call<Order> */ diff --git a/samples/client/petstore/java/retrofit2/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/retrofit2/src/test/java/org/openapitools/client/api/StoreApiTest.java index 15455ccabb..2f72f617c3 100644 --- a/samples/client/petstore/java/retrofit2/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/retrofit2/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -48,7 +48,7 @@ public class StoreApiTest { /** * Find purchase order by ID * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions */ @Test public void getOrderByIdTest() { diff --git a/samples/client/petstore/java/retrofit2rx2/api/openapi.yaml b/samples/client/petstore/java/retrofit2rx2/api/openapi.yaml index 5f55e8c53f..e7e17402f6 100644 --- a/samples/client/petstore/java/retrofit2rx2/api/openapi.yaml +++ b/samples/client/petstore/java/retrofit2rx2/api/openapi.yaml @@ -370,7 +370,7 @@ paths: x-accepts: application/json get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched @@ -672,7 +672,7 @@ paths: responses: "400": content: {} - description: Someting wrong + description: Something wrong summary: Fake endpoint to test group parameters (optional) tags: - fake diff --git a/samples/client/petstore/java/retrofit2rx2/docs/FakeApi.md b/samples/client/petstore/java/retrofit2rx2/docs/FakeApi.md index 44193574ac..5722d2acb5 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/FakeApi.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/FakeApi.md @@ -796,7 +796,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **400** | Someting wrong | - | +| **400** | Something wrong | - | ## testInlineAdditionalProperties diff --git a/samples/client/petstore/java/retrofit2rx2/docs/StoreApi.md b/samples/client/petstore/java/retrofit2rx2/docs/StoreApi.md index e6ae80525d..d4c6d6d987 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/StoreApi.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/StoreApi.md @@ -152,7 +152,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/api/StoreApi.java index d45f42a715..c865bfbe53 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/api/StoreApi.java @@ -40,7 +40,7 @@ public interface StoreApi { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched (required) * @return Observable<Order> */ diff --git a/samples/client/petstore/java/retrofit2rx2/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/retrofit2rx2/src/test/java/org/openapitools/client/api/StoreApiTest.java index 15455ccabb..2f72f617c3 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/retrofit2rx2/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -48,7 +48,7 @@ public class StoreApiTest { /** * Find purchase order by ID * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions */ @Test public void getOrderByIdTest() { diff --git a/samples/client/petstore/java/retrofit2rx3/api/openapi.yaml b/samples/client/petstore/java/retrofit2rx3/api/openapi.yaml index 5f55e8c53f..e7e17402f6 100644 --- a/samples/client/petstore/java/retrofit2rx3/api/openapi.yaml +++ b/samples/client/petstore/java/retrofit2rx3/api/openapi.yaml @@ -370,7 +370,7 @@ paths: x-accepts: application/json get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched @@ -672,7 +672,7 @@ paths: responses: "400": content: {} - description: Someting wrong + description: Something wrong summary: Fake endpoint to test group parameters (optional) tags: - fake diff --git a/samples/client/petstore/java/retrofit2rx3/docs/FakeApi.md b/samples/client/petstore/java/retrofit2rx3/docs/FakeApi.md index 44193574ac..5722d2acb5 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/FakeApi.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/FakeApi.md @@ -796,7 +796,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **400** | Someting wrong | - | +| **400** | Something wrong | - | ## testInlineAdditionalProperties diff --git a/samples/client/petstore/java/retrofit2rx3/docs/StoreApi.md b/samples/client/petstore/java/retrofit2rx3/docs/StoreApi.md index e6ae80525d..d4c6d6d987 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/StoreApi.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/StoreApi.md @@ -152,7 +152,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example diff --git a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/api/StoreApi.java index 99ada34679..2002a8e309 100644 --- a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/api/StoreApi.java @@ -40,7 +40,7 @@ public interface StoreApi { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched (required) * @return Observable<Order> */ diff --git a/samples/client/petstore/java/retrofit2rx3/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/retrofit2rx3/src/test/java/org/openapitools/client/api/StoreApiTest.java index 00ebb3349f..e02a6df708 100644 --- a/samples/client/petstore/java/retrofit2rx3/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/retrofit2rx3/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -48,7 +48,7 @@ public class StoreApiTest { /** * Find purchase order by ID * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions */ @Test public void getOrderByIdTest() { diff --git a/samples/client/petstore/java/vertx-no-nullable/api/openapi.yaml b/samples/client/petstore/java/vertx-no-nullable/api/openapi.yaml index 5f55e8c53f..e7e17402f6 100644 --- a/samples/client/petstore/java/vertx-no-nullable/api/openapi.yaml +++ b/samples/client/petstore/java/vertx-no-nullable/api/openapi.yaml @@ -370,7 +370,7 @@ paths: x-accepts: application/json get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched @@ -672,7 +672,7 @@ paths: responses: "400": content: {} - description: Someting wrong + description: Something wrong summary: Fake endpoint to test group parameters (optional) tags: - fake diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/FakeApi.md b/samples/client/petstore/java/vertx-no-nullable/docs/FakeApi.md index f6ce519861..efb255c14f 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/FakeApi.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/FakeApi.md @@ -796,7 +796,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **400** | Someting wrong | - | +| **400** | Something wrong | - | ## testInlineAdditionalProperties diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/StoreApi.md b/samples/client/petstore/java/vertx-no-nullable/docs/StoreApi.md index 571e808abd..b64e208a83 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/StoreApi.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/StoreApi.md @@ -152,7 +152,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/api/StoreApiImpl.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/api/StoreApiImpl.java index bc264d4447..762970b72d 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/api/StoreApiImpl.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/api/StoreApiImpl.java @@ -130,7 +130,7 @@ public class StoreApiImpl implements StoreApi { } /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched (required) * @param resultHandler Asynchronous result handler */ @@ -140,7 +140,7 @@ public class StoreApiImpl implements StoreApi { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched (required) * @param authInfo per call authentication override. * @param resultHandler Asynchronous result handler diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/api/rxjava/StoreApi.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/api/rxjava/StoreApi.java index d8972b50a1..472da15fc3 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/api/rxjava/StoreApi.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/api/rxjava/StoreApi.java @@ -110,7 +110,7 @@ public class StoreApi { } /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched (required) * @param resultHandler Asynchronous result handler */ @@ -120,7 +120,7 @@ public class StoreApi { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched (required) * @param authInfo call specific auth overrides * @param resultHandler Asynchronous result handler @@ -131,7 +131,7 @@ public class StoreApi { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched (required) * @return Asynchronous result handler (RxJava Single) */ @@ -143,7 +143,7 @@ public class StoreApi { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched (required) * @param authInfo call specific auth overrides * @return Asynchronous result handler (RxJava Single) diff --git a/samples/client/petstore/java/vertx-no-nullable/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/vertx-no-nullable/src/test/java/org/openapitools/client/api/StoreApiTest.java index 7c12d7f566..5581be91dc 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -90,7 +90,7 @@ public class StoreApiTest { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param context Vertx test context for doing assertions */ diff --git a/samples/client/petstore/java/vertx/api/openapi.yaml b/samples/client/petstore/java/vertx/api/openapi.yaml index 5f55e8c53f..e7e17402f6 100644 --- a/samples/client/petstore/java/vertx/api/openapi.yaml +++ b/samples/client/petstore/java/vertx/api/openapi.yaml @@ -370,7 +370,7 @@ paths: x-accepts: application/json get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched @@ -672,7 +672,7 @@ paths: responses: "400": content: {} - description: Someting wrong + description: Something wrong summary: Fake endpoint to test group parameters (optional) tags: - fake diff --git a/samples/client/petstore/java/vertx/docs/FakeApi.md b/samples/client/petstore/java/vertx/docs/FakeApi.md index f6ce519861..efb255c14f 100644 --- a/samples/client/petstore/java/vertx/docs/FakeApi.md +++ b/samples/client/petstore/java/vertx/docs/FakeApi.md @@ -796,7 +796,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **400** | Someting wrong | - | +| **400** | Something wrong | - | ## testInlineAdditionalProperties diff --git a/samples/client/petstore/java/vertx/docs/StoreApi.md b/samples/client/petstore/java/vertx/docs/StoreApi.md index 571e808abd..b64e208a83 100644 --- a/samples/client/petstore/java/vertx/docs/StoreApi.md +++ b/samples/client/petstore/java/vertx/docs/StoreApi.md @@ -152,7 +152,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/StoreApiImpl.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/StoreApiImpl.java index bc264d4447..762970b72d 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/StoreApiImpl.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/StoreApiImpl.java @@ -130,7 +130,7 @@ public class StoreApiImpl implements StoreApi { } /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched (required) * @param resultHandler Asynchronous result handler */ @@ -140,7 +140,7 @@ public class StoreApiImpl implements StoreApi { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched (required) * @param authInfo per call authentication override. * @param resultHandler Asynchronous result handler diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/StoreApi.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/StoreApi.java index d8972b50a1..472da15fc3 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/StoreApi.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/StoreApi.java @@ -110,7 +110,7 @@ public class StoreApi { } /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched (required) * @param resultHandler Asynchronous result handler */ @@ -120,7 +120,7 @@ public class StoreApi { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched (required) * @param authInfo call specific auth overrides * @param resultHandler Asynchronous result handler @@ -131,7 +131,7 @@ public class StoreApi { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched (required) * @return Asynchronous result handler (RxJava Single) */ @@ -143,7 +143,7 @@ public class StoreApi { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched (required) * @param authInfo call specific auth overrides * @return Asynchronous result handler (RxJava Single) diff --git a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/api/StoreApiTest.java index 3b96f8699f..6765ad932d 100644 --- a/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/vertx/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -90,7 +90,7 @@ public class StoreApiTest { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param context Vertx test context for doing assertions */ diff --git a/samples/client/petstore/java/webclient-nulable-arrays/.github/workflows/maven.yml b/samples/client/petstore/java/webclient-nullable-arrays/.github/workflows/maven.yml similarity index 100% rename from samples/client/petstore/java/webclient-nulable-arrays/.github/workflows/maven.yml rename to samples/client/petstore/java/webclient-nullable-arrays/.github/workflows/maven.yml diff --git a/samples/client/petstore/java/webclient-nulable-arrays/.gitignore b/samples/client/petstore/java/webclient-nullable-arrays/.gitignore similarity index 100% rename from samples/client/petstore/java/webclient-nulable-arrays/.gitignore rename to samples/client/petstore/java/webclient-nullable-arrays/.gitignore diff --git a/samples/client/petstore/java/webclient-nulable-arrays/.openapi-generator-ignore b/samples/client/petstore/java/webclient-nullable-arrays/.openapi-generator-ignore similarity index 100% rename from samples/client/petstore/java/webclient-nulable-arrays/.openapi-generator-ignore rename to samples/client/petstore/java/webclient-nullable-arrays/.openapi-generator-ignore diff --git a/samples/client/petstore/java/webclient-nulable-arrays/.openapi-generator/FILES b/samples/client/petstore/java/webclient-nullable-arrays/.openapi-generator/FILES similarity index 100% rename from samples/client/petstore/java/webclient-nulable-arrays/.openapi-generator/FILES rename to samples/client/petstore/java/webclient-nullable-arrays/.openapi-generator/FILES diff --git a/samples/client/petstore/java/webclient-nulable-arrays/.openapi-generator/VERSION b/samples/client/petstore/java/webclient-nullable-arrays/.openapi-generator/VERSION similarity index 100% rename from samples/client/petstore/java/webclient-nulable-arrays/.openapi-generator/VERSION rename to samples/client/petstore/java/webclient-nullable-arrays/.openapi-generator/VERSION diff --git a/samples/client/petstore/java/webclient-nulable-arrays/.travis.yml b/samples/client/petstore/java/webclient-nullable-arrays/.travis.yml similarity index 100% rename from samples/client/petstore/java/webclient-nulable-arrays/.travis.yml rename to samples/client/petstore/java/webclient-nullable-arrays/.travis.yml diff --git a/samples/client/petstore/java/webclient-nulable-arrays/README.md b/samples/client/petstore/java/webclient-nullable-arrays/README.md similarity index 100% rename from samples/client/petstore/java/webclient-nulable-arrays/README.md rename to samples/client/petstore/java/webclient-nullable-arrays/README.md diff --git a/samples/client/petstore/java/webclient-nulable-arrays/api/openapi.yaml b/samples/client/petstore/java/webclient-nullable-arrays/api/openapi.yaml similarity index 100% rename from samples/client/petstore/java/webclient-nulable-arrays/api/openapi.yaml rename to samples/client/petstore/java/webclient-nullable-arrays/api/openapi.yaml diff --git a/samples/client/petstore/java/webclient-nulable-arrays/build.gradle b/samples/client/petstore/java/webclient-nullable-arrays/build.gradle similarity index 100% rename from samples/client/petstore/java/webclient-nulable-arrays/build.gradle rename to samples/client/petstore/java/webclient-nullable-arrays/build.gradle diff --git a/samples/client/petstore/java/webclient-nulable-arrays/build.sbt b/samples/client/petstore/java/webclient-nullable-arrays/build.sbt similarity index 100% rename from samples/client/petstore/java/webclient-nulable-arrays/build.sbt rename to samples/client/petstore/java/webclient-nullable-arrays/build.sbt diff --git a/samples/client/petstore/java/webclient-nulable-arrays/docs/ByteArrayObject.md b/samples/client/petstore/java/webclient-nullable-arrays/docs/ByteArrayObject.md similarity index 100% rename from samples/client/petstore/java/webclient-nulable-arrays/docs/ByteArrayObject.md rename to samples/client/petstore/java/webclient-nullable-arrays/docs/ByteArrayObject.md diff --git a/samples/client/petstore/java/webclient-nulable-arrays/docs/DefaultApi.md b/samples/client/petstore/java/webclient-nullable-arrays/docs/DefaultApi.md similarity index 100% rename from samples/client/petstore/java/webclient-nulable-arrays/docs/DefaultApi.md rename to samples/client/petstore/java/webclient-nullable-arrays/docs/DefaultApi.md diff --git a/samples/client/petstore/java/webclient-nulable-arrays/git_push.sh b/samples/client/petstore/java/webclient-nullable-arrays/git_push.sh similarity index 100% rename from samples/client/petstore/java/webclient-nulable-arrays/git_push.sh rename to samples/client/petstore/java/webclient-nullable-arrays/git_push.sh diff --git a/samples/client/petstore/java/webclient-nulable-arrays/gradle.properties b/samples/client/petstore/java/webclient-nullable-arrays/gradle.properties similarity index 100% rename from samples/client/petstore/java/webclient-nulable-arrays/gradle.properties rename to samples/client/petstore/java/webclient-nullable-arrays/gradle.properties diff --git a/samples/client/petstore/java/webclient-nulable-arrays/gradle/wrapper/gradle-wrapper.jar b/samples/client/petstore/java/webclient-nullable-arrays/gradle/wrapper/gradle-wrapper.jar similarity index 100% rename from samples/client/petstore/java/webclient-nulable-arrays/gradle/wrapper/gradle-wrapper.jar rename to samples/client/petstore/java/webclient-nullable-arrays/gradle/wrapper/gradle-wrapper.jar diff --git a/samples/client/petstore/java/webclient-nulable-arrays/gradle/wrapper/gradle-wrapper.properties b/samples/client/petstore/java/webclient-nullable-arrays/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from samples/client/petstore/java/webclient-nulable-arrays/gradle/wrapper/gradle-wrapper.properties rename to samples/client/petstore/java/webclient-nullable-arrays/gradle/wrapper/gradle-wrapper.properties diff --git a/samples/client/petstore/java/webclient-nulable-arrays/gradlew b/samples/client/petstore/java/webclient-nullable-arrays/gradlew similarity index 100% rename from samples/client/petstore/java/webclient-nulable-arrays/gradlew rename to samples/client/petstore/java/webclient-nullable-arrays/gradlew diff --git a/samples/client/petstore/java/webclient-nulable-arrays/gradlew.bat b/samples/client/petstore/java/webclient-nullable-arrays/gradlew.bat similarity index 100% rename from samples/client/petstore/java/webclient-nulable-arrays/gradlew.bat rename to samples/client/petstore/java/webclient-nullable-arrays/gradlew.bat diff --git a/samples/client/petstore/java/webclient-nulable-arrays/pom.xml b/samples/client/petstore/java/webclient-nullable-arrays/pom.xml similarity index 100% rename from samples/client/petstore/java/webclient-nulable-arrays/pom.xml rename to samples/client/petstore/java/webclient-nullable-arrays/pom.xml diff --git a/samples/client/petstore/java/webclient-nulable-arrays/settings.gradle b/samples/client/petstore/java/webclient-nullable-arrays/settings.gradle similarity index 100% rename from samples/client/petstore/java/webclient-nulable-arrays/settings.gradle rename to samples/client/petstore/java/webclient-nullable-arrays/settings.gradle diff --git a/samples/client/petstore/java/webclient-nulable-arrays/src/main/AndroidManifest.xml b/samples/client/petstore/java/webclient-nullable-arrays/src/main/AndroidManifest.xml similarity index 100% rename from samples/client/petstore/java/webclient-nulable-arrays/src/main/AndroidManifest.xml rename to samples/client/petstore/java/webclient-nullable-arrays/src/main/AndroidManifest.xml diff --git a/samples/client/petstore/java/webclient-nulable-arrays/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/webclient-nullable-arrays/src/main/java/org/openapitools/client/ApiClient.java similarity index 100% rename from samples/client/petstore/java/webclient-nulable-arrays/src/main/java/org/openapitools/client/ApiClient.java rename to samples/client/petstore/java/webclient-nullable-arrays/src/main/java/org/openapitools/client/ApiClient.java diff --git a/samples/client/petstore/java/webclient-nulable-arrays/src/main/java/org/openapitools/client/JavaTimeFormatter.java b/samples/client/petstore/java/webclient-nullable-arrays/src/main/java/org/openapitools/client/JavaTimeFormatter.java similarity index 100% rename from samples/client/petstore/java/webclient-nulable-arrays/src/main/java/org/openapitools/client/JavaTimeFormatter.java rename to samples/client/petstore/java/webclient-nullable-arrays/src/main/java/org/openapitools/client/JavaTimeFormatter.java diff --git a/samples/client/petstore/java/webclient-nulable-arrays/src/main/java/org/openapitools/client/RFC3339DateFormat.java b/samples/client/petstore/java/webclient-nullable-arrays/src/main/java/org/openapitools/client/RFC3339DateFormat.java similarity index 100% rename from samples/client/petstore/java/webclient-nulable-arrays/src/main/java/org/openapitools/client/RFC3339DateFormat.java rename to samples/client/petstore/java/webclient-nullable-arrays/src/main/java/org/openapitools/client/RFC3339DateFormat.java diff --git a/samples/client/petstore/java/webclient-nulable-arrays/src/main/java/org/openapitools/client/ServerConfiguration.java b/samples/client/petstore/java/webclient-nullable-arrays/src/main/java/org/openapitools/client/ServerConfiguration.java similarity index 100% rename from samples/client/petstore/java/webclient-nulable-arrays/src/main/java/org/openapitools/client/ServerConfiguration.java rename to samples/client/petstore/java/webclient-nullable-arrays/src/main/java/org/openapitools/client/ServerConfiguration.java diff --git a/samples/client/petstore/java/webclient-nulable-arrays/src/main/java/org/openapitools/client/ServerVariable.java b/samples/client/petstore/java/webclient-nullable-arrays/src/main/java/org/openapitools/client/ServerVariable.java similarity index 100% rename from samples/client/petstore/java/webclient-nulable-arrays/src/main/java/org/openapitools/client/ServerVariable.java rename to samples/client/petstore/java/webclient-nullable-arrays/src/main/java/org/openapitools/client/ServerVariable.java diff --git a/samples/client/petstore/java/webclient-nulable-arrays/src/main/java/org/openapitools/client/StringUtil.java b/samples/client/petstore/java/webclient-nullable-arrays/src/main/java/org/openapitools/client/StringUtil.java similarity index 100% rename from samples/client/petstore/java/webclient-nulable-arrays/src/main/java/org/openapitools/client/StringUtil.java rename to samples/client/petstore/java/webclient-nullable-arrays/src/main/java/org/openapitools/client/StringUtil.java diff --git a/samples/client/petstore/java/webclient-nulable-arrays/src/main/java/org/openapitools/client/api/DefaultApi.java b/samples/client/petstore/java/webclient-nullable-arrays/src/main/java/org/openapitools/client/api/DefaultApi.java similarity index 100% rename from samples/client/petstore/java/webclient-nulable-arrays/src/main/java/org/openapitools/client/api/DefaultApi.java rename to samples/client/petstore/java/webclient-nullable-arrays/src/main/java/org/openapitools/client/api/DefaultApi.java diff --git a/samples/client/petstore/java/webclient-nulable-arrays/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java b/samples/client/petstore/java/webclient-nullable-arrays/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java similarity index 100% rename from samples/client/petstore/java/webclient-nulable-arrays/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java rename to samples/client/petstore/java/webclient-nullable-arrays/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java diff --git a/samples/client/petstore/java/webclient-nulable-arrays/src/main/java/org/openapitools/client/auth/Authentication.java b/samples/client/petstore/java/webclient-nullable-arrays/src/main/java/org/openapitools/client/auth/Authentication.java similarity index 100% rename from samples/client/petstore/java/webclient-nulable-arrays/src/main/java/org/openapitools/client/auth/Authentication.java rename to samples/client/petstore/java/webclient-nullable-arrays/src/main/java/org/openapitools/client/auth/Authentication.java diff --git a/samples/client/petstore/java/webclient-nulable-arrays/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java b/samples/client/petstore/java/webclient-nullable-arrays/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java similarity index 100% rename from samples/client/petstore/java/webclient-nulable-arrays/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java rename to samples/client/petstore/java/webclient-nullable-arrays/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java diff --git a/samples/client/petstore/java/webclient-nulable-arrays/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java b/samples/client/petstore/java/webclient-nullable-arrays/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java similarity index 100% rename from samples/client/petstore/java/webclient-nulable-arrays/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java rename to samples/client/petstore/java/webclient-nullable-arrays/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java diff --git a/samples/client/petstore/java/webclient-nulable-arrays/src/main/java/org/openapitools/client/model/ByteArrayObject.java b/samples/client/petstore/java/webclient-nullable-arrays/src/main/java/org/openapitools/client/model/ByteArrayObject.java similarity index 100% rename from samples/client/petstore/java/webclient-nulable-arrays/src/main/java/org/openapitools/client/model/ByteArrayObject.java rename to samples/client/petstore/java/webclient-nullable-arrays/src/main/java/org/openapitools/client/model/ByteArrayObject.java diff --git a/samples/client/petstore/java/webclient-nulable-arrays/src/test/java/org/openapitools/client/api/DefaultApiTest.java b/samples/client/petstore/java/webclient-nullable-arrays/src/test/java/org/openapitools/client/api/DefaultApiTest.java similarity index 100% rename from samples/client/petstore/java/webclient-nulable-arrays/src/test/java/org/openapitools/client/api/DefaultApiTest.java rename to samples/client/petstore/java/webclient-nullable-arrays/src/test/java/org/openapitools/client/api/DefaultApiTest.java diff --git a/samples/client/petstore/java/webclient-nulable-arrays/src/test/java/org/openapitools/client/model/ByteArrayObjectTest.java b/samples/client/petstore/java/webclient-nullable-arrays/src/test/java/org/openapitools/client/model/ByteArrayObjectTest.java similarity index 100% rename from samples/client/petstore/java/webclient-nulable-arrays/src/test/java/org/openapitools/client/model/ByteArrayObjectTest.java rename to samples/client/petstore/java/webclient-nullable-arrays/src/test/java/org/openapitools/client/model/ByteArrayObjectTest.java diff --git a/samples/client/petstore/java/webclient/api/openapi.yaml b/samples/client/petstore/java/webclient/api/openapi.yaml index f54c98c7f7..f9cbedf1e4 100644 --- a/samples/client/petstore/java/webclient/api/openapi.yaml +++ b/samples/client/petstore/java/webclient/api/openapi.yaml @@ -412,7 +412,7 @@ paths: x-accepts: application/json get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched @@ -712,7 +712,7 @@ paths: style: form responses: "400": - description: Someting wrong + description: Something wrong security: - bearer_test: [] summary: Fake endpoint to test group parameters (optional) diff --git a/samples/client/petstore/java/webclient/docs/FakeApi.md b/samples/client/petstore/java/webclient/docs/FakeApi.md index 1b6b950799..853a8de537 100644 --- a/samples/client/petstore/java/webclient/docs/FakeApi.md +++ b/samples/client/petstore/java/webclient/docs/FakeApi.md @@ -1001,7 +1001,7 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **400** | Someting wrong | - | +| **400** | Something wrong | - | ## testInlineAdditionalProperties diff --git a/samples/client/petstore/java/webclient/docs/StoreApi.md b/samples/client/petstore/java/webclient/docs/StoreApi.md index e3b7d7b910..ce91137cc6 100644 --- a/samples/client/petstore/java/webclient/docs/StoreApi.md +++ b/samples/client/petstore/java/webclient/docs/StoreApi.md @@ -152,7 +152,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/api/FakeApi.java index 8287c06353..5c63a2ddbc 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/api/FakeApi.java @@ -1132,7 +1132,7 @@ public class FakeApi { /** * Fake endpoint to test group parameters (optional) * Fake endpoint to test group parameters (optional) - *

400 - Someting wrong + *

400 - Something wrong * @param requiredStringGroup Required String in group parameters * @param requiredBooleanGroup Required Boolean in group parameters * @param requiredInt64Group Required Integer in group parameters @@ -1186,7 +1186,7 @@ public class FakeApi { /** * Fake endpoint to test group parameters (optional) * Fake endpoint to test group parameters (optional) - *

400 - Someting wrong + *

400 - Something wrong * @param requiredStringGroup Required String in group parameters * @param requiredBooleanGroup Required Boolean in group parameters * @param requiredInt64Group Required Integer in group parameters @@ -1203,7 +1203,7 @@ public class FakeApi { /** * Fake endpoint to test group parameters (optional) * Fake endpoint to test group parameters (optional) - *

400 - Someting wrong + *

400 - Something wrong * @param requiredStringGroup Required String in group parameters * @param requiredBooleanGroup Required Boolean in group parameters * @param requiredInt64Group Required Integer in group parameters @@ -1220,7 +1220,7 @@ public class FakeApi { /** * Fake endpoint to test group parameters (optional) * Fake endpoint to test group parameters (optional) - *

400 - Someting wrong + *

400 - Something wrong * @param requiredStringGroup Required String in group parameters * @param requiredBooleanGroup Required Boolean in group parameters * @param requiredInt64Group Required Integer in group parameters diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/api/StoreApi.java index 2742695935..640efc67d3 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/api/StoreApi.java @@ -185,7 +185,7 @@ public class StoreApi { } /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions *

200 - successful operation *

400 - Invalid ID supplied *

404 - Order not found @@ -224,7 +224,7 @@ public class StoreApi { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions *

200 - successful operation *

400 - Invalid ID supplied *

404 - Order not found @@ -239,7 +239,7 @@ public class StoreApi { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions *

200 - successful operation *

400 - Invalid ID supplied *

404 - Order not found @@ -254,7 +254,7 @@ public class StoreApi { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions *

200 - successful operation *

400 - Invalid ID supplied *

404 - Order not found diff --git a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/api/StoreApiTest.java index bb3455afaa..4e4841aa45 100644 --- a/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -60,7 +60,7 @@ public class StoreApiTest { /** * Find purchase order by ID * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions */ @Test public void getOrderByIdTest() { diff --git a/samples/client/petstore/javascript-apollo/docs/StoreApi.md b/samples/client/petstore/javascript-apollo/docs/StoreApi.md index b7abc576af..6689c3da6f 100644 --- a/samples/client/petstore/javascript-apollo/docs/StoreApi.md +++ b/samples/client/petstore/javascript-apollo/docs/StoreApi.md @@ -109,7 +109,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example diff --git a/samples/client/petstore/javascript-apollo/src/api/StoreApi.js b/samples/client/petstore/javascript-apollo/src/api/StoreApi.js index 96c269f27a..f91d5f7893 100644 --- a/samples/client/petstore/javascript-apollo/src/api/StoreApi.js +++ b/samples/client/petstore/javascript-apollo/src/api/StoreApi.js @@ -103,7 +103,7 @@ export default class StoreApi extends ApiClient { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param {Number} orderId ID of pet that needs to be fetched * @param requestInit Dynamic configuration. @see {@link https://github.com/apollographql/apollo-server/pull/1277} * @return {Promise} diff --git a/samples/client/petstore/javascript-apollo/src/model/Color.js b/samples/client/petstore/javascript-apollo/src/model/Color.js index b071fff068..cdeb9bf615 100644 --- a/samples/client/petstore/javascript-apollo/src/model/Color.js +++ b/samples/client/petstore/javascript-apollo/src/model/Color.js @@ -124,7 +124,7 @@ class Color { } /** - * Gets the actaul instance, which can be String, [Number]. + * Gets the actual instance, which can be String, [Number]. * @return {(module:model/String|module:model/[Number])} The actual instance. */ getActualInstance() { @@ -132,7 +132,7 @@ class Color { } /** - * Sets the actaul instance, which can be String, [Number]. + * Sets the actual instance, which can be String, [Number]. * @param {(module:model/String|module:model/[Number])} obj The actual instance. */ setActualInstance(obj) { @@ -140,7 +140,7 @@ class Color { } /** - * Returns the JSON representation of the actual intance. + * Returns the JSON representation of the actual instance. * @return {string} */ toJSON = function(){ diff --git a/samples/client/petstore/javascript-apollo/src/model/Pig.js b/samples/client/petstore/javascript-apollo/src/model/Pig.js index da6cdc0765..222a3e27d4 100644 --- a/samples/client/petstore/javascript-apollo/src/model/Pig.js +++ b/samples/client/petstore/javascript-apollo/src/model/Pig.js @@ -88,7 +88,7 @@ class Pig { } /** - * Gets the actaul instance, which can be BasquePig, DanishPig. + * Gets the actual instance, which can be BasquePig, DanishPig. * @return {(module:model/BasquePig|module:model/DanishPig)} The actual instance. */ getActualInstance() { @@ -96,7 +96,7 @@ class Pig { } /** - * Sets the actaul instance, which can be BasquePig, DanishPig. + * Sets the actual instance, which can be BasquePig, DanishPig. * @param {(module:model/BasquePig|module:model/DanishPig)} obj The actual instance. */ setActualInstance(obj) { @@ -104,7 +104,7 @@ class Pig { } /** - * Returns the JSON representation of the actual intance. + * Returns the JSON representation of the actual instance. * @return {string} */ toJSON = function(){ diff --git a/samples/client/petstore/javascript-closure-angular/API/Client/StoreApi.js b/samples/client/petstore/javascript-closure-angular/API/Client/StoreApi.js index 6df64168d2..05ac14953e 100644 --- a/samples/client/petstore/javascript-closure-angular/API/Client/StoreApi.js +++ b/samples/client/petstore/javascript-closure-angular/API/Client/StoreApi.js @@ -113,7 +113,7 @@ API.Client.StoreApi.prototype.getInventory = function(opt_extraHttpRequestParams /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param {!number} orderId ID of pet that needs to be fetched * @param {!angular.$http.Config=} opt_extraHttpRequestParams Extra HTTP parameters to send. * @return {!angular.$q.Promise} diff --git a/samples/client/petstore/javascript-closure-angular/lib/goog/base.js b/samples/client/petstore/javascript-closure-angular/lib/goog/base.js index 5cd6e45ebd..c462428f31 100644 --- a/samples/client/petstore/javascript-closure-angular/lib/goog/base.js +++ b/samples/client/petstore/javascript-closure-angular/lib/goog/base.js @@ -282,7 +282,7 @@ goog.addDependency = function(relPath, provides, requires) { -// NOTE(nnaze): The debug DOM loader was included in base.js as an orignal +// NOTE(nnaze): The debug DOM loader was included in base.js as an original // way to do "debug-mode" development. The dependency system can sometimes // be confusing, as can the debug DOM loader's asynchronous nature. // @@ -324,7 +324,7 @@ goog.ENABLE_DEBUG_LOADER = true; */ goog.require = function(name) { - // if the object already exists we do not need do do anything + // if the object already exists we do not need do anything // TODO(arv): If we start to support require based on file name this has // to change // TODO(arv): If we allow goog.foo.* this has to change @@ -687,7 +687,7 @@ goog.typeOf = function(value) { // Check these first, so we can avoid calling Object.prototype.toString if // possible. // - // IE improperly marshals tyepof across execution contexts, but a + // IE improperly marshals typeof across execution contexts, but a // cross-context object will still return false for "instanceof Object". if (value instanceof Array) { return 'array'; @@ -1378,7 +1378,7 @@ goog.getMsg = function(str, opt_values) { * This is useful when introducing a new message that has not yet been * translated into all languages. * - * This function is a compiler primtive. Must be used in the form: + * This function is a compiler primitive. Must be used in the form: * var x = goog.getMsgWithFallback(MSG_A, MSG_B); * where MSG_A and MSG_B were initialized with goog.getMsg. * @@ -1478,7 +1478,7 @@ goog.inherits = function(childCtor, parentCtor) { * Call up to the superclass. * * If this is called from a constructor, then this calls the superclass - * contructor with arguments 1-N. + * constructor with arguments 1-N. * * If this is called from a prototype method, then you must pass * the name of the method as the second argument to this function. If diff --git a/samples/client/petstore/javascript-es6/docs/StoreApi.md b/samples/client/petstore/javascript-es6/docs/StoreApi.md index b7abc576af..6689c3da6f 100644 --- a/samples/client/petstore/javascript-es6/docs/StoreApi.md +++ b/samples/client/petstore/javascript-es6/docs/StoreApi.md @@ -109,7 +109,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example diff --git a/samples/client/petstore/javascript-es6/src/api/StoreApi.js b/samples/client/petstore/javascript-es6/src/api/StoreApi.js index ae1d1ea977..21791c50e2 100644 --- a/samples/client/petstore/javascript-es6/src/api/StoreApi.js +++ b/samples/client/petstore/javascript-es6/src/api/StoreApi.js @@ -123,7 +123,7 @@ export default class StoreApi { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param {Number} orderId ID of pet that needs to be fetched * @param {module:api/StoreApi~getOrderByIdCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link module:model/Order} diff --git a/samples/client/petstore/javascript-es6/src/model/Color.js b/samples/client/petstore/javascript-es6/src/model/Color.js index b071fff068..cdeb9bf615 100644 --- a/samples/client/petstore/javascript-es6/src/model/Color.js +++ b/samples/client/petstore/javascript-es6/src/model/Color.js @@ -124,7 +124,7 @@ class Color { } /** - * Gets the actaul instance, which can be String, [Number]. + * Gets the actual instance, which can be String, [Number]. * @return {(module:model/String|module:model/[Number])} The actual instance. */ getActualInstance() { @@ -132,7 +132,7 @@ class Color { } /** - * Sets the actaul instance, which can be String, [Number]. + * Sets the actual instance, which can be String, [Number]. * @param {(module:model/String|module:model/[Number])} obj The actual instance. */ setActualInstance(obj) { @@ -140,7 +140,7 @@ class Color { } /** - * Returns the JSON representation of the actual intance. + * Returns the JSON representation of the actual instance. * @return {string} */ toJSON = function(){ diff --git a/samples/client/petstore/javascript-es6/src/model/Pig.js b/samples/client/petstore/javascript-es6/src/model/Pig.js index da6cdc0765..222a3e27d4 100644 --- a/samples/client/petstore/javascript-es6/src/model/Pig.js +++ b/samples/client/petstore/javascript-es6/src/model/Pig.js @@ -88,7 +88,7 @@ class Pig { } /** - * Gets the actaul instance, which can be BasquePig, DanishPig. + * Gets the actual instance, which can be BasquePig, DanishPig. * @return {(module:model/BasquePig|module:model/DanishPig)} The actual instance. */ getActualInstance() { @@ -96,7 +96,7 @@ class Pig { } /** - * Sets the actaul instance, which can be BasquePig, DanishPig. + * Sets the actual instance, which can be BasquePig, DanishPig. * @param {(module:model/BasquePig|module:model/DanishPig)} obj The actual instance. */ setActualInstance(obj) { @@ -104,7 +104,7 @@ class Pig { } /** - * Returns the JSON representation of the actual intance. + * Returns the JSON representation of the actual instance. * @return {string} */ toJSON = function(){ diff --git a/samples/client/petstore/javascript-flowtyped/README.md b/samples/client/petstore/javascript-flowtyped/README.md index 9c2bec5733..be99fb0c80 100644 --- a/samples/client/petstore/javascript-flowtyped/README.md +++ b/samples/client/petstore/javascript-flowtyped/README.md @@ -15,7 +15,7 @@ Module system ### Building -To build an compile the flow typed sources to javascript use: +To build and compile the flow typed sources to javascript use: ``` npm install # The dependency `babel-preset-react-app` requires that you specify `NODE_ENV` or `BABEL_ENV` environment variables diff --git a/samples/client/petstore/javascript-flowtyped/lib/api.js b/samples/client/petstore/javascript-flowtyped/lib/api.js index eca41f9154..833e872bda 100644 --- a/samples/client/petstore/javascript-flowtyped/lib/api.js +++ b/samples/client/petstore/javascript-flowtyped/lib/api.js @@ -599,7 +599,7 @@ const StoreApiFetchParamCreator = function (configuration) { }, /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @summary Find purchase order by ID * @throws {RequiredError} */ @@ -702,7 +702,7 @@ const StoreApi = function (configuration, fetch = portableFetch) { }, /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @summary Find purchase order by ID * @throws {RequiredError} */ diff --git a/samples/client/petstore/javascript-flowtyped/lib/api.js.flow b/samples/client/petstore/javascript-flowtyped/lib/api.js.flow index d839e160bb..7d7c0363fa 100644 --- a/samples/client/petstore/javascript-flowtyped/lib/api.js.flow +++ b/samples/client/petstore/javascript-flowtyped/lib/api.js.flow @@ -823,7 +823,7 @@ export const StoreApiFetchParamCreator = function (configuration?: Configuration }; }, /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @summary Find purchase order by ID * @throws {RequiredError} */ @@ -930,7 +930,7 @@ export const StoreApi = function(configuration?: Configuration, fetch: FetchAPI }); }, /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @summary Find purchase order by ID * @throws {RequiredError} */ diff --git a/samples/client/petstore/javascript-flowtyped/src/api.js b/samples/client/petstore/javascript-flowtyped/src/api.js index d839e160bb..7d7c0363fa 100644 --- a/samples/client/petstore/javascript-flowtyped/src/api.js +++ b/samples/client/petstore/javascript-flowtyped/src/api.js @@ -823,7 +823,7 @@ export const StoreApiFetchParamCreator = function (configuration?: Configuration }; }, /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @summary Find purchase order by ID * @throws {RequiredError} */ @@ -930,7 +930,7 @@ export const StoreApi = function(configuration?: Configuration, fetch: FetchAPI }); }, /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @summary Find purchase order by ID * @throws {RequiredError} */ diff --git a/samples/client/petstore/javascript-promise-es6/docs/StoreApi.md b/samples/client/petstore/javascript-promise-es6/docs/StoreApi.md index 9ad6022bb9..541abf7e45 100644 --- a/samples/client/petstore/javascript-promise-es6/docs/StoreApi.md +++ b/samples/client/petstore/javascript-promise-es6/docs/StoreApi.md @@ -107,7 +107,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example diff --git a/samples/client/petstore/javascript-promise-es6/src/api/StoreApi.js b/samples/client/petstore/javascript-promise-es6/src/api/StoreApi.js index 00c7e3dca8..4074bb07d2 100644 --- a/samples/client/petstore/javascript-promise-es6/src/api/StoreApi.js +++ b/samples/client/petstore/javascript-promise-es6/src/api/StoreApi.js @@ -126,7 +126,7 @@ export default class StoreApi { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param {Number} orderId ID of pet that needs to be fetched * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Order} and HTTP response */ @@ -160,7 +160,7 @@ export default class StoreApi { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param {Number} orderId ID of pet that needs to be fetched * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Order} */ diff --git a/samples/client/petstore/javascript-promise-es6/src/model/Color.js b/samples/client/petstore/javascript-promise-es6/src/model/Color.js index b071fff068..cdeb9bf615 100644 --- a/samples/client/petstore/javascript-promise-es6/src/model/Color.js +++ b/samples/client/petstore/javascript-promise-es6/src/model/Color.js @@ -124,7 +124,7 @@ class Color { } /** - * Gets the actaul instance, which can be String, [Number]. + * Gets the actual instance, which can be String, [Number]. * @return {(module:model/String|module:model/[Number])} The actual instance. */ getActualInstance() { @@ -132,7 +132,7 @@ class Color { } /** - * Sets the actaul instance, which can be String, [Number]. + * Sets the actual instance, which can be String, [Number]. * @param {(module:model/String|module:model/[Number])} obj The actual instance. */ setActualInstance(obj) { @@ -140,7 +140,7 @@ class Color { } /** - * Returns the JSON representation of the actual intance. + * Returns the JSON representation of the actual instance. * @return {string} */ toJSON = function(){ diff --git a/samples/client/petstore/javascript-promise-es6/src/model/Pig.js b/samples/client/petstore/javascript-promise-es6/src/model/Pig.js index da6cdc0765..222a3e27d4 100644 --- a/samples/client/petstore/javascript-promise-es6/src/model/Pig.js +++ b/samples/client/petstore/javascript-promise-es6/src/model/Pig.js @@ -88,7 +88,7 @@ class Pig { } /** - * Gets the actaul instance, which can be BasquePig, DanishPig. + * Gets the actual instance, which can be BasquePig, DanishPig. * @return {(module:model/BasquePig|module:model/DanishPig)} The actual instance. */ getActualInstance() { @@ -96,7 +96,7 @@ class Pig { } /** - * Sets the actaul instance, which can be BasquePig, DanishPig. + * Sets the actual instance, which can be BasquePig, DanishPig. * @param {(module:model/BasquePig|module:model/DanishPig)} obj The actual instance. */ setActualInstance(obj) { @@ -104,7 +104,7 @@ class Pig { } /** - * Returns the JSON representation of the actual intance. + * Returns the JSON representation of the actual instance. * @return {string} */ toJSON = function(){ diff --git a/samples/client/petstore/jaxrs-cxf-client-jackson/src/gen/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/jaxrs-cxf-client-jackson/src/gen/java/org/openapitools/api/StoreApi.java index c1216ebe2c..4d34cf1319 100644 --- a/samples/client/petstore/jaxrs-cxf-client-jackson/src/gen/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/jaxrs-cxf-client-jackson/src/gen/java/org/openapitools/api/StoreApi.java @@ -58,7 +58,7 @@ public interface StoreApi { /** * Find purchase order by ID * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * */ @GET diff --git a/samples/client/petstore/jaxrs-cxf-client-jackson/src/test/java/org/openapitools/api/StoreApiTest.java b/samples/client/petstore/jaxrs-cxf-client-jackson/src/test/java/org/openapitools/api/StoreApiTest.java index 4e26ac030e..b87dbe2c57 100644 --- a/samples/client/petstore/jaxrs-cxf-client-jackson/src/test/java/org/openapitools/api/StoreApiTest.java +++ b/samples/client/petstore/jaxrs-cxf-client-jackson/src/test/java/org/openapitools/api/StoreApiTest.java @@ -97,7 +97,7 @@ public class StoreApiTest { /** * Find purchase order by ID * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @throws ApiException * if the Api call fails diff --git a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/api/StoreApi.java index c1216ebe2c..4d34cf1319 100644 --- a/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/jaxrs-cxf-client/src/gen/java/org/openapitools/api/StoreApi.java @@ -58,7 +58,7 @@ public interface StoreApi { /** * Find purchase order by ID * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * */ @GET diff --git a/samples/client/petstore/jaxrs-cxf-client/src/test/java/org/openapitools/api/StoreApiTest.java b/samples/client/petstore/jaxrs-cxf-client/src/test/java/org/openapitools/api/StoreApiTest.java index 8d411552a1..537e5da220 100644 --- a/samples/client/petstore/jaxrs-cxf-client/src/test/java/org/openapitools/api/StoreApiTest.java +++ b/samples/client/petstore/jaxrs-cxf-client/src/test/java/org/openapitools/api/StoreApiTest.java @@ -109,7 +109,7 @@ public class StoreApiTest { /** * Find purchase order by ID * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @throws ApiException * if the Api call fails diff --git a/samples/client/petstore/jmeter/.openapi-generator-ignore b/samples/client/petstore/jmeter/.openapi-generator-ignore index c5fa491b4c..deed424f8a 100644 --- a/samples/client/petstore/jmeter/.openapi-generator-ignore +++ b/samples/client/petstore/jmeter/.openapi-generator-ignore @@ -5,7 +5,7 @@ # The patterns follow closely to .gitignore or .dockerignore. # As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +# You can make changes and tell Swagger Codegen 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 (*): diff --git a/samples/client/petstore/jmeter/PetApi.jmx b/samples/client/petstore/jmeter/PetApi.jmx index fa9c1963be..69c4866afa 100644 --- a/samples/client/petstore/jmeter/PetApi.jmx +++ b/samples/client/petstore/jmeter/PetApi.jmx @@ -171,7 +171,7 @@ - + ${httpStatusCode} Assertion.response_code @@ -246,7 +246,7 @@ - + ${httpStatusCode} Assertion.response_code @@ -328,7 +328,7 @@ - + ${httpStatusCode} Assertion.response_code @@ -410,7 +410,7 @@ - + ${httpStatusCode} Assertion.response_code @@ -485,7 +485,7 @@ - + ${httpStatusCode} Assertion.response_code @@ -565,7 +565,7 @@ - + ${httpStatusCode} Assertion.response_code @@ -640,7 +640,7 @@ - + ${httpStatusCode} Assertion.response_code @@ -719,7 +719,7 @@ - + ${httpStatusCode} Assertion.response_code diff --git a/samples/client/petstore/jmeter/StoreApi.jmx b/samples/client/petstore/jmeter/StoreApi.jmx index 6c10ea7407..a30bca1219 100644 --- a/samples/client/petstore/jmeter/StoreApi.jmx +++ b/samples/client/petstore/jmeter/StoreApi.jmx @@ -138,7 +138,7 @@ - + ${httpStatusCode} Assertion.response_code @@ -213,7 +213,7 @@ - + ${httpStatusCode} Assertion.response_code @@ -267,7 +267,7 @@ false - Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions @@ -284,7 +284,7 @@ - + ${httpStatusCode} Assertion.response_code @@ -360,7 +360,7 @@ - + ${httpStatusCode} Assertion.response_code diff --git a/samples/client/petstore/jmeter/UserApi.jmx b/samples/client/petstore/jmeter/UserApi.jmx index fc1ff67ed3..0ab9b30488 100644 --- a/samples/client/petstore/jmeter/UserApi.jmx +++ b/samples/client/petstore/jmeter/UserApi.jmx @@ -163,7 +163,7 @@ - + ${httpStatusCode} Assertion.response_code @@ -235,7 +235,7 @@ - + ${httpStatusCode} Assertion.response_code @@ -307,7 +307,7 @@ - + ${httpStatusCode} Assertion.response_code @@ -374,7 +374,7 @@ - + ${httpStatusCode} Assertion.response_code @@ -445,7 +445,7 @@ - + ${httpStatusCode} Assertion.response_code @@ -530,7 +530,7 @@ - + ${httpStatusCode} Assertion.response_code @@ -597,7 +597,7 @@ - + ${httpStatusCode} Assertion.response_code @@ -669,7 +669,7 @@ - + ${httpStatusCode} Assertion.response_code diff --git a/samples/client/petstore/kotlin-array-simple-string-jvm-volley/README.md b/samples/client/petstore/kotlin-array-simple-string-jvm-volley/README.md index 1180f9c7df..ede0c53981 100644 --- a/samples/client/petstore/kotlin-array-simple-string-jvm-volley/README.md +++ b/samples/client/petstore/kotlin-array-simple-string-jvm-volley/README.md @@ -70,8 +70,8 @@ val requestQueue: Lazy = lazy(initializer = { The above constructor for each api allows the following to be customized - A custom context, so either a singleton request queue or different scope can be created - see https://developer.android.com/training/volley/requestqueue#singleton -- An overrideable request queue - which in turn can have a custom http url stack passed to it -- An overrideable request factory constructor call, or a request factory that can be overridden by a custom template, with +- An overridable request queue - which in turn can have a custom http url stack passed to it +- An overridable request factory constructor call, or a request factory that can be overridden by a custom template, with custom header factory, request post processors and custom gson adapters injected. #### Overriding request generation diff --git a/samples/client/petstore/kotlin-array-simple-string-jvm-volley/src/main/kotlin/org/openapitools/client/request/RequestFactory.kt b/samples/client/petstore/kotlin-array-simple-string-jvm-volley/src/main/kotlin/org/openapitools/client/request/RequestFactory.kt index b32f9ba2f1..02d5979e37 100644 --- a/samples/client/petstore/kotlin-array-simple-string-jvm-volley/src/main/kotlin/org/openapitools/client/request/RequestFactory.kt +++ b/samples/client/petstore/kotlin-array-simple-string-jvm-volley/src/main/kotlin/org/openapitools/client/request/RequestFactory.kt @@ -33,7 +33,7 @@ class RequestFactory(private val headerFactories : List<() -> Map (acc + factory.invoke()).toMutableMap() } // If we decide to support auth parameters in the url, then you will reference them by supplying a url string - // with known variable name refernces in the string. We will then apply + // with known variable name references in the string. We will then apply val updatedUrl = if (!queryParams.isNullOrEmpty()) { queryParams.asSequence().fold("$url?") {acc, param -> "$acc${escapeString(param.key)}=${escapeString(param.value)}&" diff --git a/samples/client/petstore/kotlin-default-values-jvm-volley/README.md b/samples/client/petstore/kotlin-default-values-jvm-volley/README.md index 7f1cf7f1fa..749aa7803d 100644 --- a/samples/client/petstore/kotlin-default-values-jvm-volley/README.md +++ b/samples/client/petstore/kotlin-default-values-jvm-volley/README.md @@ -70,8 +70,8 @@ val requestQueue: Lazy = lazy(initializer = { The above constructor for each api allows the following to be customized - A custom context, so either a singleton request queue or different scope can be created - see https://developer.android.com/training/volley/requestqueue#singleton -- An overrideable request queue - which in turn can have a custom http url stack passed to it -- An overrideable request factory constructor call, or a request factory that can be overridden by a custom template, with +- An overridable request queue - which in turn can have a custom http url stack passed to it +- An overridable request factory constructor call, or a request factory that can be overridden by a custom template, with custom header factory, request post processors and custom gson adapters injected. #### Overriding request generation diff --git a/samples/client/petstore/kotlin-default-values-jvm-volley/src/main/kotlin/org/openapitools/client/request/RequestFactory.kt b/samples/client/petstore/kotlin-default-values-jvm-volley/src/main/kotlin/org/openapitools/client/request/RequestFactory.kt index b32f9ba2f1..02d5979e37 100644 --- a/samples/client/petstore/kotlin-default-values-jvm-volley/src/main/kotlin/org/openapitools/client/request/RequestFactory.kt +++ b/samples/client/petstore/kotlin-default-values-jvm-volley/src/main/kotlin/org/openapitools/client/request/RequestFactory.kt @@ -33,7 +33,7 @@ class RequestFactory(private val headerFactories : List<() -> Map (acc + factory.invoke()).toMutableMap() } // If we decide to support auth parameters in the url, then you will reference them by supplying a url string - // with known variable name refernces in the string. We will then apply + // with known variable name references in the string. We will then apply val updatedUrl = if (!queryParams.isNullOrEmpty()) { queryParams.asSequence().fold("$url?") {acc, param -> "$acc${escapeString(param.key)}=${escapeString(param.value)}&" diff --git a/samples/client/petstore/kotlin-gson/docs/StoreApi.md b/samples/client/petstore/kotlin-gson/docs/StoreApi.md index de2f4dbdcb..c55032ffa2 100644 --- a/samples/client/petstore/kotlin-gson/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-gson/docs/StoreApi.md @@ -108,7 +108,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index ab07574dd3..78a5eefbab 100644 --- a/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/client/petstore/kotlin-gson/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -181,7 +181,7 @@ class StoreApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched * @return Order * @throws IllegalStateException If the request is not correctly configured @@ -212,7 +212,7 @@ class StoreApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched * @return ApiResponse * @throws IllegalStateException If the request is not correctly configured diff --git a/samples/client/petstore/kotlin-jackson/docs/StoreApi.md b/samples/client/petstore/kotlin-jackson/docs/StoreApi.md index de2f4dbdcb..c55032ffa2 100644 --- a/samples/client/petstore/kotlin-jackson/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-jackson/docs/StoreApi.md @@ -108,7 +108,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index 2e214e45f3..c76e8c708a 100644 --- a/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -181,7 +181,7 @@ class StoreApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched * @return Order * @throws IllegalStateException If the request is not correctly configured @@ -212,7 +212,7 @@ class StoreApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched * @return ApiResponse * @throws IllegalStateException If the request is not correctly configured diff --git a/samples/client/petstore/kotlin-json-request-string/docs/StoreApi.md b/samples/client/petstore/kotlin-json-request-string/docs/StoreApi.md index de2f4dbdcb..c55032ffa2 100644 --- a/samples/client/petstore/kotlin-json-request-string/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-json-request-string/docs/StoreApi.md @@ -108,7 +108,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index 34e2b717f8..c6cfe5c117 100644 --- a/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/client/petstore/kotlin-json-request-string/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -182,7 +182,7 @@ class StoreApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched * @return Order * @throws IllegalStateException If the request is not correctly configured @@ -213,7 +213,7 @@ class StoreApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched * @return ApiResponse * @throws IllegalStateException If the request is not correctly configured diff --git a/samples/client/petstore/kotlin-jvm-ktor-gson/docs/StoreApi.md b/samples/client/petstore/kotlin-jvm-ktor-gson/docs/StoreApi.md index f4986041af..bec2f21a2e 100644 --- a/samples/client/petstore/kotlin-jvm-ktor-gson/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-jvm-ktor-gson/docs/StoreApi.md @@ -108,7 +108,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-jvm-ktor-gson/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/client/petstore/kotlin-jvm-ktor-gson/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index 8360878da1..f3f7774595 100644 --- a/samples/client/petstore/kotlin-jvm-ktor-gson/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/client/petstore/kotlin-jvm-ktor-gson/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -97,7 +97,7 @@ import java.text.DateFormat /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched * @return Order */ diff --git a/samples/client/petstore/kotlin-jvm-ktor-jackson/docs/StoreApi.md b/samples/client/petstore/kotlin-jvm-ktor-jackson/docs/StoreApi.md index f4986041af..bec2f21a2e 100644 --- a/samples/client/petstore/kotlin-jvm-ktor-jackson/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-jvm-ktor-jackson/docs/StoreApi.md @@ -108,7 +108,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-jvm-ktor-jackson/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/client/petstore/kotlin-jvm-ktor-jackson/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index f6dd67c8b0..517a743da1 100644 --- a/samples/client/petstore/kotlin-jvm-ktor-jackson/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/client/petstore/kotlin-jvm-ktor-jackson/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -95,7 +95,7 @@ import com.fasterxml.jackson.databind.ObjectMapper /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched * @return Order */ diff --git a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/docs/StoreApi.md b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/docs/StoreApi.md index de2f4dbdcb..c55032ffa2 100644 --- a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/docs/StoreApi.md @@ -108,7 +108,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index 4bc01ba927..d1f4b7975a 100644 --- a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -183,7 +183,7 @@ class StoreApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched * @return Order * @throws IllegalStateException If the request is not correctly configured @@ -214,7 +214,7 @@ class StoreApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched * @return ApiResponse * @throws IllegalStateException If the request is not correctly configured diff --git a/samples/client/petstore/kotlin-jvm-vertx-gson/docs/StoreApi.md b/samples/client/petstore/kotlin-jvm-vertx-gson/docs/StoreApi.md index 68fbd1fecf..e7398986d0 100644 --- a/samples/client/petstore/kotlin-jvm-vertx-gson/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-jvm-vertx-gson/docs/StoreApi.md @@ -108,7 +108,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-jvm-vertx-gson/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/client/petstore/kotlin-jvm-vertx-gson/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index 95c2391490..f0d6f11625 100644 --- a/samples/client/petstore/kotlin-jvm-vertx-gson/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/client/petstore/kotlin-jvm-vertx-gson/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -162,7 +162,7 @@ class StoreApi(basePath: kotlin.String = ApiClient.defaultBasePath, accessToken: /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched * @return Order * @throws IllegalStateException If the request is not correctly configured @@ -193,7 +193,7 @@ class StoreApi(basePath: kotlin.String = ApiClient.defaultBasePath, accessToken: /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched * @return ApiResponse * @throws IllegalStateException If the request is not correctly configured diff --git a/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/docs/StoreApi.md b/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/docs/StoreApi.md index 68fbd1fecf..e7398986d0 100644 --- a/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/docs/StoreApi.md @@ -108,7 +108,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index ed807c37aa..e13a29f174 100644 --- a/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -166,7 +166,7 @@ class StoreApi(basePath: kotlin.String = ApiClient.defaultBasePath, accessToken: /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched * @return Order * @throws IllegalStateException If the request is not correctly configured @@ -197,7 +197,7 @@ class StoreApi(basePath: kotlin.String = ApiClient.defaultBasePath, accessToken: /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched * @return ApiResponse * @throws IllegalStateException If the request is not correctly configured diff --git a/samples/client/petstore/kotlin-jvm-vertx-jackson/docs/StoreApi.md b/samples/client/petstore/kotlin-jvm-vertx-jackson/docs/StoreApi.md index 68fbd1fecf..e7398986d0 100644 --- a/samples/client/petstore/kotlin-jvm-vertx-jackson/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-jvm-vertx-jackson/docs/StoreApi.md @@ -108,7 +108,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-jvm-vertx-jackson/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/client/petstore/kotlin-jvm-vertx-jackson/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index 00640882ec..6fed290a64 100644 --- a/samples/client/petstore/kotlin-jvm-vertx-jackson/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/client/petstore/kotlin-jvm-vertx-jackson/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -162,7 +162,7 @@ class StoreApi(basePath: kotlin.String = ApiClient.defaultBasePath, accessToken: /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched * @return Order * @throws IllegalStateException If the request is not correctly configured @@ -193,7 +193,7 @@ class StoreApi(basePath: kotlin.String = ApiClient.defaultBasePath, accessToken: /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched * @return ApiResponse * @throws IllegalStateException If the request is not correctly configured diff --git a/samples/client/petstore/kotlin-jvm-vertx-moshi/docs/StoreApi.md b/samples/client/petstore/kotlin-jvm-vertx-moshi/docs/StoreApi.md index 68fbd1fecf..e7398986d0 100644 --- a/samples/client/petstore/kotlin-jvm-vertx-moshi/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-jvm-vertx-moshi/docs/StoreApi.md @@ -108,7 +108,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-jvm-vertx-moshi/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/client/petstore/kotlin-jvm-vertx-moshi/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index 451a1adb48..d45b6cde2f 100644 --- a/samples/client/petstore/kotlin-jvm-vertx-moshi/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/client/petstore/kotlin-jvm-vertx-moshi/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -161,7 +161,7 @@ class StoreApi(basePath: kotlin.String = ApiClient.defaultBasePath, accessToken: /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched * @return Order * @throws IllegalStateException If the request is not correctly configured @@ -192,7 +192,7 @@ class StoreApi(basePath: kotlin.String = ApiClient.defaultBasePath, accessToken: /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched * @return ApiResponse * @throws IllegalStateException If the request is not correctly configured diff --git a/samples/client/petstore/kotlin-jvm-volley/README.md b/samples/client/petstore/kotlin-jvm-volley/README.md index 9350405a0f..1f4eeea12f 100644 --- a/samples/client/petstore/kotlin-jvm-volley/README.md +++ b/samples/client/petstore/kotlin-jvm-volley/README.md @@ -70,8 +70,8 @@ val requestQueue: Lazy = lazy(initializer = { The above constructor for each api allows the following to be customized - A custom context, so either a singleton request queue or different scope can be created - see https://developer.android.com/training/volley/requestqueue#singleton -- An overrideable request queue - which in turn can have a custom http url stack passed to it -- An overrideable request factory constructor call, or a request factory that can be overridden by a custom template, with +- An overridable request queue - which in turn can have a custom http url stack passed to it +- An overridable request factory constructor call, or a request factory that can be overridden by a custom template, with custom header factory, request post processors and custom gson adapters injected. #### Overriding request generation diff --git a/samples/client/petstore/kotlin-jvm-volley/docs/StoreApi.md b/samples/client/petstore/kotlin-jvm-volley/docs/StoreApi.md index 168afd9b9c..63d7e597b3 100644 --- a/samples/client/petstore/kotlin-jvm-volley/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-jvm-volley/docs/StoreApi.md @@ -85,7 +85,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-jvm-volley/src/main/java/org/openapitools/client/apis/StoreApi.kt b/samples/client/petstore/kotlin-jvm-volley/src/main/java/org/openapitools/client/apis/StoreApi.kt index 8c34cfdd29..104f58992d 100644 --- a/samples/client/petstore/kotlin-jvm-volley/src/main/java/org/openapitools/client/apis/StoreApi.kt +++ b/samples/client/petstore/kotlin-jvm-volley/src/main/java/org/openapitools/client/apis/StoreApi.kt @@ -156,7 +156,7 @@ class StoreApi ( } /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched * @return Order */ diff --git a/samples/client/petstore/kotlin-jvm-volley/src/main/java/org/openapitools/client/request/RequestFactory.kt b/samples/client/petstore/kotlin-jvm-volley/src/main/java/org/openapitools/client/request/RequestFactory.kt index 2bcf9d2d9c..09276ebbe3 100644 --- a/samples/client/petstore/kotlin-jvm-volley/src/main/java/org/openapitools/client/request/RequestFactory.kt +++ b/samples/client/petstore/kotlin-jvm-volley/src/main/java/org/openapitools/client/request/RequestFactory.kt @@ -58,7 +58,7 @@ class RequestFactory(private val headerFactories : List<() -> Map (acc + factory.invoke()).toMutableMap() } // If we decide to support auth parameters in the url, then you will reference them by supplying a url string - // with known variable name refernces in the string. We will then apply + // with known variable name references in the string. We will then apply val updatedUrl = if (!queryParams.isNullOrEmpty()) { queryParams.asSequence().fold("$url?") {acc, param -> "$acc${escapeString(param.key)}=${escapeString(param.value)}&" diff --git a/samples/client/petstore/kotlin-modelMutable/docs/StoreApi.md b/samples/client/petstore/kotlin-modelMutable/docs/StoreApi.md index 0a3793c214..7edeaf1639 100644 --- a/samples/client/petstore/kotlin-modelMutable/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-modelMutable/docs/StoreApi.md @@ -108,7 +108,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index 20bc7f914c..49220c8b4d 100644 --- a/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/client/petstore/kotlin-modelMutable/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -181,7 +181,7 @@ class StoreApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched * @return Order * @throws IllegalStateException If the request is not correctly configured @@ -212,7 +212,7 @@ class StoreApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched * @return ApiResponse * @throws IllegalStateException If the request is not correctly configured diff --git a/samples/client/petstore/kotlin-moshi-codegen/docs/StoreApi.md b/samples/client/petstore/kotlin-moshi-codegen/docs/StoreApi.md index de2f4dbdcb..c55032ffa2 100644 --- a/samples/client/petstore/kotlin-moshi-codegen/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-moshi-codegen/docs/StoreApi.md @@ -108,7 +108,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index ca473d06df..2184157a2e 100644 --- a/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/client/petstore/kotlin-moshi-codegen/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -181,7 +181,7 @@ class StoreApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched * @return Order * @throws IllegalStateException If the request is not correctly configured @@ -212,7 +212,7 @@ class StoreApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched * @return ApiResponse * @throws IllegalStateException If the request is not correctly configured diff --git a/samples/client/petstore/kotlin-multiplatform/docs/StoreApi.md b/samples/client/petstore/kotlin-multiplatform/docs/StoreApi.md index f4986041af..bec2f21a2e 100644 --- a/samples/client/petstore/kotlin-multiplatform/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-multiplatform/docs/StoreApi.md @@ -108,7 +108,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/apis/StoreApi.kt index c335f9512e..58e6c87ca5 100644 --- a/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -108,7 +108,7 @@ open class StoreApi( /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched * @return Order */ diff --git a/samples/client/petstore/kotlin-nonpublic/docs/StoreApi.md b/samples/client/petstore/kotlin-nonpublic/docs/StoreApi.md index de2f4dbdcb..c55032ffa2 100644 --- a/samples/client/petstore/kotlin-nonpublic/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-nonpublic/docs/StoreApi.md @@ -108,7 +108,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index c99fd97c6e..4efeb8f355 100644 --- a/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/client/petstore/kotlin-nonpublic/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -181,7 +181,7 @@ internal class StoreApi(basePath: kotlin.String = defaultBasePath, client: OkHtt /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched * @return Order * @throws IllegalStateException If the request is not correctly configured @@ -212,7 +212,7 @@ internal class StoreApi(basePath: kotlin.String = defaultBasePath, client: OkHtt /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched * @return ApiResponse * @throws IllegalStateException If the request is not correctly configured diff --git a/samples/client/petstore/kotlin-nullable/docs/StoreApi.md b/samples/client/petstore/kotlin-nullable/docs/StoreApi.md index 30a2853112..f11c3b6ea1 100644 --- a/samples/client/petstore/kotlin-nullable/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-nullable/docs/StoreApi.md @@ -108,7 +108,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index 4ecada339c..c25915eaa6 100644 --- a/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/client/petstore/kotlin-nullable/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -181,7 +181,7 @@ class StoreApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched * @return Order or null * @throws IllegalStateException If the request is not correctly configured @@ -212,7 +212,7 @@ class StoreApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched * @return ApiResponse * @throws IllegalStateException If the request is not correctly configured diff --git a/samples/client/petstore/kotlin-okhttp3/docs/StoreApi.md b/samples/client/petstore/kotlin-okhttp3/docs/StoreApi.md index de2f4dbdcb..c55032ffa2 100644 --- a/samples/client/petstore/kotlin-okhttp3/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-okhttp3/docs/StoreApi.md @@ -108,7 +108,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index a99b9d3da2..8474d8e345 100644 --- a/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/client/petstore/kotlin-okhttp3/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -181,7 +181,7 @@ class StoreApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched * @return Order * @throws IllegalStateException If the request is not correctly configured @@ -212,7 +212,7 @@ class StoreApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched * @return ApiResponse * @throws IllegalStateException If the request is not correctly configured diff --git a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/docs/StoreApi.md b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/docs/StoreApi.md index d3ca3e3589..78688cd5f1 100644 --- a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/docs/StoreApi.md @@ -85,7 +85,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index 393e0c10e3..2c1e446469 100644 --- a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -36,7 +36,7 @@ interface StoreApi { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Responses: * - 200: successful operation * - 400: Invalid ID supplied diff --git a/samples/client/petstore/kotlin-retrofit2-rx3/docs/StoreApi.md b/samples/client/petstore/kotlin-retrofit2-rx3/docs/StoreApi.md index d3ca3e3589..78688cd5f1 100644 --- a/samples/client/petstore/kotlin-retrofit2-rx3/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-retrofit2-rx3/docs/StoreApi.md @@ -85,7 +85,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index b24d72895e..8b69aecb9c 100644 --- a/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/client/petstore/kotlin-retrofit2-rx3/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -36,7 +36,7 @@ interface StoreApi { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Responses: * - 200: successful operation * - 400: Invalid ID supplied diff --git a/samples/client/petstore/kotlin-retrofit2/docs/StoreApi.md b/samples/client/petstore/kotlin-retrofit2/docs/StoreApi.md index d3ca3e3589..78688cd5f1 100644 --- a/samples/client/petstore/kotlin-retrofit2/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-retrofit2/docs/StoreApi.md @@ -85,7 +85,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index 5a3c2f7ccb..e72a0903be 100644 --- a/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -35,7 +35,7 @@ interface StoreApi { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Responses: * - 200: successful operation * - 400: Invalid ID supplied diff --git a/samples/client/petstore/kotlin-string/docs/StoreApi.md b/samples/client/petstore/kotlin-string/docs/StoreApi.md index de2f4dbdcb..c55032ffa2 100644 --- a/samples/client/petstore/kotlin-string/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-string/docs/StoreApi.md @@ -108,7 +108,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index ca473d06df..2184157a2e 100644 --- a/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/client/petstore/kotlin-string/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -181,7 +181,7 @@ class StoreApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched * @return Order * @throws IllegalStateException If the request is not correctly configured @@ -212,7 +212,7 @@ class StoreApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched * @return ApiResponse * @throws IllegalStateException If the request is not correctly configured diff --git a/samples/client/petstore/kotlin-threetenbp/docs/StoreApi.md b/samples/client/petstore/kotlin-threetenbp/docs/StoreApi.md index de2f4dbdcb..c55032ffa2 100644 --- a/samples/client/petstore/kotlin-threetenbp/docs/StoreApi.md +++ b/samples/client/petstore/kotlin-threetenbp/docs/StoreApi.md @@ -108,7 +108,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index ca473d06df..2184157a2e 100644 --- a/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/client/petstore/kotlin-threetenbp/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -181,7 +181,7 @@ class StoreApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched * @return Order * @throws IllegalStateException If the request is not correctly configured @@ -212,7 +212,7 @@ class StoreApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched * @return ApiResponse * @throws IllegalStateException If the request is not correctly configured diff --git a/samples/client/petstore/kotlin/docs/StoreApi.md b/samples/client/petstore/kotlin/docs/StoreApi.md index de2f4dbdcb..c55032ffa2 100644 --- a/samples/client/petstore/kotlin/docs/StoreApi.md +++ b/samples/client/petstore/kotlin/docs/StoreApi.md @@ -108,7 +108,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index ca473d06df..2184157a2e 100644 --- a/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -181,7 +181,7 @@ class StoreApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched * @return Order * @throws IllegalStateException If the request is not correctly configured @@ -212,7 +212,7 @@ class StoreApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched * @return ApiResponse * @throws IllegalStateException If the request is not correctly configured diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGStoreApi.h b/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGStoreApi.h index e67aa3c835..935845f721 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGStoreApi.h +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGStoreApi.h @@ -48,7 +48,7 @@ extern NSInteger kSWGStoreApiMissingParamErrorCode; /// Find purchase order by ID -/// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +/// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// @param orderId ID of pet that needs to be fetched /// diff --git a/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGStoreApi.m b/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGStoreApi.m index eaf254a6ab..14a5c42392 100644 --- a/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGStoreApi.m +++ b/samples/client/petstore/objc/core-data/SwaggerClient/Api/SWGStoreApi.m @@ -171,7 +171,7 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513; /// /// Find purchase order by ID -/// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +/// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// @param orderId ID of pet that needs to be fetched /// /// @returns SWGOrder* diff --git a/samples/client/petstore/objc/core-data/docs/SWGStoreApi.md b/samples/client/petstore/objc/core-data/docs/SWGStoreApi.md index 17a3c97e8f..3c13b68eaf 100644 --- a/samples/client/petstore/objc/core-data/docs/SWGStoreApi.md +++ b/samples/client/petstore/objc/core-data/docs/SWGStoreApi.md @@ -118,7 +118,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```objc diff --git a/samples/client/petstore/objc/default/SwaggerClient/Api/SWGStoreApi.h b/samples/client/petstore/objc/default/SwaggerClient/Api/SWGStoreApi.h index e67aa3c835..935845f721 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Api/SWGStoreApi.h +++ b/samples/client/petstore/objc/default/SwaggerClient/Api/SWGStoreApi.h @@ -48,7 +48,7 @@ extern NSInteger kSWGStoreApiMissingParamErrorCode; /// Find purchase order by ID -/// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +/// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// @param orderId ID of pet that needs to be fetched /// diff --git a/samples/client/petstore/objc/default/SwaggerClient/Api/SWGStoreApi.m b/samples/client/petstore/objc/default/SwaggerClient/Api/SWGStoreApi.m index eaf254a6ab..14a5c42392 100644 --- a/samples/client/petstore/objc/default/SwaggerClient/Api/SWGStoreApi.m +++ b/samples/client/petstore/objc/default/SwaggerClient/Api/SWGStoreApi.m @@ -171,7 +171,7 @@ NSInteger kSWGStoreApiMissingParamErrorCode = 234513; /// /// Find purchase order by ID -/// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +/// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// @param orderId ID of pet that needs to be fetched /// /// @returns SWGOrder* diff --git a/samples/client/petstore/objc/default/docs/SWGStoreApi.md b/samples/client/petstore/objc/default/docs/SWGStoreApi.md index 17a3c97e8f..3c13b68eaf 100644 --- a/samples/client/petstore/objc/default/docs/SWGStoreApi.md +++ b/samples/client/petstore/objc/default/docs/SWGStoreApi.md @@ -118,7 +118,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```objc diff --git a/samples/client/petstore/perl/docs/StoreApi.md b/samples/client/petstore/perl/docs/StoreApi.md index 594112b639..f772b1020c 100644 --- a/samples/client/petstore/perl/docs/StoreApi.md +++ b/samples/client/petstore/perl/docs/StoreApi.md @@ -112,7 +112,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```perl diff --git a/samples/client/petstore/perl/tests/01_pet_api.t b/samples/client/petstore/perl/tests/01_pet_api.t index e9647a96a3..efd67b08f3 100644 --- a/samples/client/petstore/perl/tests/01_pet_api.t +++ b/samples/client/petstore/perl/tests/01_pet_api.t @@ -66,7 +66,7 @@ is $get_pet_hash->{photoUrls}->[1], 'oop', 'get the proper photoUrl from get_pet my $update_pet_with_form = $api->update_pet_with_form(pet_id => $pet_id, name => 'test_name', status => 'sold'); -is $update_pet_with_form, undef, 'get the null response from update_pet_wth_form'; +is $update_pet_with_form, undef, 'get the null response from update_pet_with_form'; my $get_pet_after_update = $api->get_pet_by_id(pet_id => $pet_id); is $get_pet_after_update->{status}, 'sold', 'get the updated status after update_pet_with_form'; diff --git a/samples/client/petstore/perl/tests/04_role.t b/samples/client/petstore/perl/tests/04_role.t index 6cd994dd5b..b39d17779b 100644 --- a/samples/client/petstore/perl/tests/04_role.t +++ b/samples/client/petstore/perl/tests/04_role.t @@ -135,7 +135,7 @@ my $cleared_tokens_cmp = { }; cmp_deeply( $api->_cfg->clear_tokens, $cleared_tokens_cmp, 'clear_tokens() returns the correct data structure' ); -my $bad_token = { bad_token_name => 'bad token value' }; # value should should be hashref +my $bad_token = { bad_token_name => 'bad token value' }; # value should be hashref dies_ok { $api->_cfg->accept_tokens($bad_token) } "bad token causes exception"; diff --git a/samples/client/petstore/perl/tests/05_long_module_name.t b/samples/client/petstore/perl/tests/05_long_module_name.t index 2be4ecbca0..7c4cb5eea3 100644 --- a/samples/client/petstore/perl/tests/05_long_module_name.t +++ b/samples/client/petstore/perl/tests/05_long_module_name.t @@ -77,7 +77,7 @@ is $get_pet_hash->{photoUrls}->[1], 'oop', 'get the proper photoUrl from get_pet my $update_pet_with_form = $api->update_pet_with_form(pet_id => $pet_id, name => 'test_name', status => 'sold'); -is $update_pet_with_form, undef, 'get the null response from update_pet_wth_form'; +is $update_pet_with_form, undef, 'get the null response from update_pet_with_form'; my $get_pet_after_update = $api->get_pet_by_id(pet_id => $pet_id); is $get_pet_after_update->{status}, 'sold', 'get the updated status after update_pet_with_form'; diff --git a/samples/client/petstore/perl/tests/06_inheritance.t b/samples/client/petstore/perl/tests/06_inheritance.t index cdf089ea64..5f9d5e76ae 100644 --- a/samples/client/petstore/perl/tests/06_inheritance.t +++ b/samples/client/petstore/perl/tests/06_inheritance.t @@ -45,7 +45,7 @@ isa_ok($human, 'WWW::OpenAPIClient::Object::Human'); # # #my $update_pet_with_form = $api->update_pet_with_form(pet_id => $pet_id, name => 'test_name', status => 'sold'); -#is $update_pet_with_form, undef, 'get the null response from update_pet_wth_form'; +#is $update_pet_with_form, undef, 'get the null response from update_pet_with_form'; # #my $get_pet_after_update = $api->get_pet_by_id(pet_id => $pet_id); #is $get_pet_after_update->{status}, 'sold', 'get the updated status after update_pet_with_form'; diff --git a/samples/client/petstore/php/OpenAPIClient-php/docs/Api/StoreApi.md b/samples/client/petstore/php/OpenAPIClient-php/docs/Api/StoreApi.md index 9e88ae63e3..f704ceffbd 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/docs/Api/StoreApi.md +++ b/samples/client/petstore/php/OpenAPIClient-php/docs/Api/StoreApi.md @@ -132,7 +132,7 @@ getOrderById($order_id): \OpenAPI\Client\Model\Order Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php b/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php index 0dd7232b1b..3a89b91a6d 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php @@ -445,7 +445,7 @@ class ObjectSerializer } if ($class === '\DateTime') { - // Some API's return an invalid, empty string as a + // Some APIs return an invalid, empty string as a // date-time property. DateTime::__construct() will return // the current time for empty input which is probably not // what is meant. The invalid empty string is probably to @@ -455,7 +455,7 @@ class ObjectSerializer try { return new \DateTime($data); } catch (\Exception $exception) { - // Some API's return a date-time with too high nanosecond + // Some APIs return a date-time with too high nanosecond // precision for php's DateTime to handle. // With provided regexp 6 digits of microseconds saved return new \DateTime(self::sanitizeTimestamp($data)); diff --git a/samples/client/petstore/php/OpenAPIClient-php/tests/DateTimeSerializerTest.php b/samples/client/petstore/php/OpenAPIClient-php/tests/DateTimeSerializerTest.php index 8e40101c84..78547afd2f 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/tests/DateTimeSerializerTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/tests/DateTimeSerializerTest.php @@ -7,7 +7,7 @@ use PHPUnit\Framework\TestCase; class DateTimeSerializerTest extends TestCase { - public function testDateTimeSanitazion() + public function testDateTimeSanitation() { $dateTime = new \DateTime('April 30, 1973 17:05 CEST'); @@ -25,7 +25,7 @@ class DateTimeSerializerTest extends TestCase ObjectSerializer::setDateTimeFormat(\DateTime::ATOM); } - public function testDateSanitazion() + public function testDateSanitation() { $dateTime = new \DateTime('April 30, 1973 17:05 CEST'); diff --git a/samples/client/petstore/php/OpenAPIClient-php/tests/OrderApiTest.php b/samples/client/petstore/php/OpenAPIClient-php/tests/OrderApiTest.php index 6769d913f2..78cc9d3edf 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/tests/OrderApiTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/tests/OrderApiTest.php @@ -40,7 +40,7 @@ class OrderApiTest extends TestCase $order->setStatus("invalid_value"); } - // test deseralization of order + // test deserialization of order public function testDeserializationOfOrder() { $order_json = <<assertSame(false, $order->getComplete()); } - // test deseralization of array of array of order + // test deserialization of array of array of order public function testDeserializationOfArrayOfArrayOfOrder() { $order_json = <<assertSame(false, $_order->getComplete()); } - // test deseralization of map of map of order + // test deserialization of map of map of order public function testDeserializationOfMapOfMapOfOrder() { $order_json = << 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```powershell diff --git a/samples/client/petstore/powershell/src/PSPetstore/Private/PSHttpSignatureAuth.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Private/PSHttpSignatureAuth.ps1 index 1b2b771759..1fbc246851 100644 --- a/samples/client/petstore/powershell/src/PSPetstore/Private/PSHttpSignatureAuth.ps1 +++ b/samples/client/petstore/powershell/src/PSPetstore/Private/PSHttpSignatureAuth.ps1 @@ -118,7 +118,7 @@ function Get-PSHttpSignedHeader { -HashAlgorithmName $httpSigningConfiguration.HashAlgorithm ` -KeyPassPhrase $httpSigningConfiguration.KeyPassPhrase } - #Depricated + #Deprecated <#$cryptographicScheme = Get-PSCryptographicScheme -SigningAlgorithm $httpSigningConfiguration.SigningAlgorithm ` -HashAlgorithm $httpSigningConfiguration.HashAlgorithm #> diff --git a/samples/client/petstore/powershell/tests/Petstore.Tests.ps1 b/samples/client/petstore/powershell/tests/Petstore.Tests.ps1 index b528ea675f..6e64665dd6 100644 --- a/samples/client/petstore/powershell/tests/Petstore.Tests.ps1 +++ b/samples/client/petstore/powershell/tests/Petstore.Tests.ps1 @@ -60,7 +60,7 @@ Describe -tag 'PSOpenAPITools' -name 'Integration Tests' { $Result = Update-PSPet -Pet $NewPet $Result = Get-PSPetById -petId $Id -WithHttpInfo $Result.GetType().fullname | Should -Be "System.Collections.Hashtable" - #$Result["Response"].GetType().fullanme | Should -Be "System.Management.Automation.PSCustomObject" + #$Result["Response"].GetType().fullname | Should -Be "System.Management.Automation.PSCustomObject" $Result["Response"]."id" | Should -Be 38369 $Result["Response"]."name" | Should -Be "PowerShell2" $Result["Response"]."status" | Should -Be "Sold" diff --git a/samples/client/petstore/python-asyncio/docs/FakeApi.md b/samples/client/petstore/python-asyncio/docs/FakeApi.md index 34ffb41ad8..93ddfecf96 100644 --- a/samples/client/petstore/python-asyncio/docs/FakeApi.md +++ b/samples/client/petstore/python-asyncio/docs/FakeApi.md @@ -749,7 +749,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**400** | Someting wrong | - | +**400** | Something wrong | - | [[Back to top]](#) [[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/python-asyncio/docs/StoreApi.md b/samples/client/petstore/python-asyncio/docs/StoreApi.md index b9dc71c38f..169d707416 100644 --- a/samples/client/petstore/python-asyncio/docs/StoreApi.md +++ b/samples/client/petstore/python-asyncio/docs/StoreApi.md @@ -146,7 +146,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example diff --git a/samples/client/petstore/python-asyncio/petstore_api/api/store_api.py b/samples/client/petstore/python-asyncio/petstore_api/api/store_api.py index 4fa17d350e..cbc91a0fc9 100644 --- a/samples/client/petstore/python-asyncio/petstore_api/api/store_api.py +++ b/samples/client/petstore/python-asyncio/petstore_api/api/store_api.py @@ -297,7 +297,7 @@ class StoreApi(object): def get_order_by_id(self, order_id, **kwargs): # noqa: E501 """Find purchase order by ID # noqa: E501 - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions # noqa: E501 + For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -327,7 +327,7 @@ class StoreApi(object): def get_order_by_id_with_http_info(self, order_id, **kwargs): # noqa: E501 """Find purchase order by ID # noqa: E501 - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions # noqa: E501 + For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True diff --git a/samples/client/petstore/python-legacy/docs/FakeApi.md b/samples/client/petstore/python-legacy/docs/FakeApi.md index 34ffb41ad8..93ddfecf96 100644 --- a/samples/client/petstore/python-legacy/docs/FakeApi.md +++ b/samples/client/petstore/python-legacy/docs/FakeApi.md @@ -749,7 +749,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**400** | Someting wrong | - | +**400** | Something wrong | - | [[Back to top]](#) [[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/python-legacy/docs/StoreApi.md b/samples/client/petstore/python-legacy/docs/StoreApi.md index b9dc71c38f..169d707416 100644 --- a/samples/client/petstore/python-legacy/docs/StoreApi.md +++ b/samples/client/petstore/python-legacy/docs/StoreApi.md @@ -146,7 +146,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example diff --git a/samples/client/petstore/python-legacy/petstore_api/api/store_api.py b/samples/client/petstore/python-legacy/petstore_api/api/store_api.py index 4fa17d350e..cbc91a0fc9 100644 --- a/samples/client/petstore/python-legacy/petstore_api/api/store_api.py +++ b/samples/client/petstore/python-legacy/petstore_api/api/store_api.py @@ -297,7 +297,7 @@ class StoreApi(object): def get_order_by_id(self, order_id, **kwargs): # noqa: E501 """Find purchase order by ID # noqa: E501 - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions # noqa: E501 + For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -327,7 +327,7 @@ class StoreApi(object): def get_order_by_id_with_http_info(self, order_id, **kwargs): # noqa: E501 """Find purchase order by ID # noqa: E501 - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions # noqa: E501 + For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True diff --git a/samples/client/petstore/python-prior/docs/FakeApi.md b/samples/client/petstore/python-prior/docs/FakeApi.md index 7c12e3bd18..cef1d93c18 100644 --- a/samples/client/petstore/python-prior/docs/FakeApi.md +++ b/samples/client/petstore/python-prior/docs/FakeApi.md @@ -1103,7 +1103,7 @@ No authorization required | Status code | Description | Response headers | |-------------|-------------|------------------| -**400** | Someting wrong | - | +**400** | Something wrong | - | [[Back to top]](#) [[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/python-prior/docs/StoreApi.md b/samples/client/petstore/python-prior/docs/StoreApi.md index d2e7f8a925..95a40cf27a 100644 --- a/samples/client/petstore/python-prior/docs/StoreApi.md +++ b/samples/client/petstore/python-prior/docs/StoreApi.md @@ -154,7 +154,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example diff --git a/samples/client/petstore/python-prior/petstore_api/api/store_api.py b/samples/client/petstore/python-prior/petstore_api/api/store_api.py index 98e47ccdf8..d171adfb3a 100644 --- a/samples/client/petstore/python-prior/petstore_api/api/store_api.py +++ b/samples/client/petstore/python-prior/petstore_api/api/store_api.py @@ -400,7 +400,7 @@ class StoreApi(object): ): """Find purchase order by ID # noqa: E501 - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions # noqa: E501 + For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True diff --git a/samples/client/petstore/python-prior/petstore_api/models/__init__.py b/samples/client/petstore/python-prior/petstore_api/models/__init__.py index 06a63ac193..2fd471f464 100644 --- a/samples/client/petstore/python-prior/petstore_api/models/__init__.py +++ b/samples/client/petstore/python-prior/petstore_api/models/__init__.py @@ -4,7 +4,7 @@ # if you have many models here with many references from one model to another this may # raise a RecursionError # to avoid this, import only the models that you directly need like: -# from from petstore_api.model.pet import Pet +# from petstore_api.model.pet import Pet # or import this package, but before doing it, use: # import sys # sys.setrecursionlimit(n) diff --git a/samples/client/petstore/python-prior/tests/test_api_client.py b/samples/client/petstore/python-prior/tests/test_api_client.py index 5142a14e0d..5a4e36035b 100644 --- a/samples/client/petstore/python-prior/tests/test_api_client.py +++ b/samples/client/petstore/python-prior/tests/test_api_client.py @@ -210,7 +210,7 @@ class ApiClientTests(unittest.TestCase): result = self.api_client.sanitize_for_serialization(data) self.assertEqual(result, list_of_pet_dict) - # model with additional proerties + # model with additional properties model_dict = {'some_key': True} model = StringBooleanMap(**model_dict) result = self.api_client.sanitize_for_serialization(model) diff --git a/samples/client/petstore/python-prior_disallowAdditionalPropertiesIfNotPresent/docs/FakeApi.md b/samples/client/petstore/python-prior_disallowAdditionalPropertiesIfNotPresent/docs/FakeApi.md index 7c12e3bd18..cef1d93c18 100644 --- a/samples/client/petstore/python-prior_disallowAdditionalPropertiesIfNotPresent/docs/FakeApi.md +++ b/samples/client/petstore/python-prior_disallowAdditionalPropertiesIfNotPresent/docs/FakeApi.md @@ -1103,7 +1103,7 @@ No authorization required | Status code | Description | Response headers | |-------------|-------------|------------------| -**400** | Someting wrong | - | +**400** | Something wrong | - | [[Back to top]](#) [[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/python-prior_disallowAdditionalPropertiesIfNotPresent/docs/StoreApi.md b/samples/client/petstore/python-prior_disallowAdditionalPropertiesIfNotPresent/docs/StoreApi.md index d2e7f8a925..95a40cf27a 100644 --- a/samples/client/petstore/python-prior_disallowAdditionalPropertiesIfNotPresent/docs/StoreApi.md +++ b/samples/client/petstore/python-prior_disallowAdditionalPropertiesIfNotPresent/docs/StoreApi.md @@ -154,7 +154,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example diff --git a/samples/client/petstore/python-prior_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/store_api.py b/samples/client/petstore/python-prior_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/store_api.py index 98e47ccdf8..d171adfb3a 100644 --- a/samples/client/petstore/python-prior_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/store_api.py +++ b/samples/client/petstore/python-prior_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/store_api.py @@ -400,7 +400,7 @@ class StoreApi(object): ): """Find purchase order by ID # noqa: E501 - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions # noqa: E501 + For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True diff --git a/samples/client/petstore/python-prior_disallowAdditionalPropertiesIfNotPresent/petstore_api/models/__init__.py b/samples/client/petstore/python-prior_disallowAdditionalPropertiesIfNotPresent/petstore_api/models/__init__.py index 06a63ac193..2fd471f464 100644 --- a/samples/client/petstore/python-prior_disallowAdditionalPropertiesIfNotPresent/petstore_api/models/__init__.py +++ b/samples/client/petstore/python-prior_disallowAdditionalPropertiesIfNotPresent/petstore_api/models/__init__.py @@ -4,7 +4,7 @@ # if you have many models here with many references from one model to another this may # raise a RecursionError # to avoid this, import only the models that you directly need like: -# from from petstore_api.model.pet import Pet +# from petstore_api.model.pet import Pet # or import this package, but before doing it, use: # import sys # sys.setrecursionlimit(n) diff --git a/samples/client/petstore/python-prior_disallowAdditionalPropertiesIfNotPresent/tests/test_api_client.py b/samples/client/petstore/python-prior_disallowAdditionalPropertiesIfNotPresent/tests/test_api_client.py index f808905993..c2d8f20f2a 100644 --- a/samples/client/petstore/python-prior_disallowAdditionalPropertiesIfNotPresent/tests/test_api_client.py +++ b/samples/client/petstore/python-prior_disallowAdditionalPropertiesIfNotPresent/tests/test_api_client.py @@ -200,7 +200,7 @@ class ApiClientTests(unittest.TestCase): result = self.api_client.sanitize_for_serialization(data) self.assertEqual(result, list_of_pet_dict) - # model with additional proerties + # model with additional properties model_dict = {'some_key': True} model = StringBooleanMap(**model_dict) result = self.api_client.sanitize_for_serialization(model) diff --git a/samples/client/petstore/python-tornado/docs/FakeApi.md b/samples/client/petstore/python-tornado/docs/FakeApi.md index 34ffb41ad8..93ddfecf96 100644 --- a/samples/client/petstore/python-tornado/docs/FakeApi.md +++ b/samples/client/petstore/python-tornado/docs/FakeApi.md @@ -749,7 +749,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**400** | Someting wrong | - | +**400** | Something wrong | - | [[Back to top]](#) [[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/python-tornado/docs/StoreApi.md b/samples/client/petstore/python-tornado/docs/StoreApi.md index b9dc71c38f..169d707416 100644 --- a/samples/client/petstore/python-tornado/docs/StoreApi.md +++ b/samples/client/petstore/python-tornado/docs/StoreApi.md @@ -146,7 +146,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example diff --git a/samples/client/petstore/python-tornado/petstore_api/api/store_api.py b/samples/client/petstore/python-tornado/petstore_api/api/store_api.py index 4fa17d350e..cbc91a0fc9 100644 --- a/samples/client/petstore/python-tornado/petstore_api/api/store_api.py +++ b/samples/client/petstore/python-tornado/petstore_api/api/store_api.py @@ -297,7 +297,7 @@ class StoreApi(object): def get_order_by_id(self, order_id, **kwargs): # noqa: E501 """Find purchase order by ID # noqa: E501 - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions # noqa: E501 + For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -327,7 +327,7 @@ class StoreApi(object): def get_order_by_id_with_http_info(self, order_id, **kwargs): # noqa: E501 """Find purchase order by ID # noqa: E501 - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions # noqa: E501 + For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True diff --git a/samples/client/petstore/ruby-autoload/docs/StoreApi.md b/samples/client/petstore/ruby-autoload/docs/StoreApi.md index 0bccca0bec..52c551498c 100644 --- a/samples/client/petstore/ruby-autoload/docs/StoreApi.md +++ b/samples/client/petstore/ruby-autoload/docs/StoreApi.md @@ -147,7 +147,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Examples diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/api/store_api.rb b/samples/client/petstore/ruby-autoload/lib/petstore/api/store_api.rb index 5b9bc0fea9..8cd9e4bf4e 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/api/store_api.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/api/store_api.rb @@ -138,7 +138,7 @@ module Petstore end # Find purchase order by ID - # For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + # For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions # @param order_id [Integer] ID of pet that needs to be fetched # @param [Hash] opts the optional parameters # @return [Order] @@ -148,7 +148,7 @@ module Petstore end # Find purchase order by ID - # For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + # For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions # @param order_id [Integer] ID of pet that needs to be fetched # @param [Hash] opts the optional parameters # @return [Array<(Order, Integer, Hash)>] Order data, response status code and response headers diff --git a/samples/client/petstore/ruby-autoload/spec/api/store_api_spec.rb b/samples/client/petstore/ruby-autoload/spec/api/store_api_spec.rb index 165cc7a2b9..bc9e4b294c 100644 --- a/samples/client/petstore/ruby-autoload/spec/api/store_api_spec.rb +++ b/samples/client/petstore/ruby-autoload/spec/api/store_api_spec.rb @@ -57,7 +57,7 @@ describe 'StoreApi' do # unit tests for get_order_by_id # Find purchase order by ID - # For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + # For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions # @param order_id ID of pet that needs to be fetched # @param [Hash] opts the optional parameters # @return [Order] diff --git a/samples/client/petstore/ruby-faraday/docs/StoreApi.md b/samples/client/petstore/ruby-faraday/docs/StoreApi.md index 0bccca0bec..52c551498c 100644 --- a/samples/client/petstore/ruby-faraday/docs/StoreApi.md +++ b/samples/client/petstore/ruby-faraday/docs/StoreApi.md @@ -147,7 +147,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Examples diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api/store_api.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api/store_api.rb index 9b1e5d8d93..4fc85638c8 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api/store_api.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/store_api.rb @@ -138,7 +138,7 @@ module Petstore end # Find purchase order by ID - # For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + # For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions # @param order_id [Integer] ID of pet that needs to be fetched # @param [Hash] opts the optional parameters # @return [Order] @@ -148,7 +148,7 @@ module Petstore end # Find purchase order by ID - # For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + # For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions # @param order_id [Integer] ID of pet that needs to be fetched # @param [Hash] opts the optional parameters # @return [Array<(Order, Integer, Hash)>] Order data, response status code and response headers diff --git a/samples/client/petstore/ruby-faraday/spec/api/store_api_spec.rb b/samples/client/petstore/ruby-faraday/spec/api/store_api_spec.rb index 1fd9faf40a..97c3d704de 100644 --- a/samples/client/petstore/ruby-faraday/spec/api/store_api_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/api/store_api_spec.rb @@ -57,7 +57,7 @@ describe 'StoreApi' do # unit tests for get_order_by_id # Find purchase order by ID - # For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + # For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions # @param order_id ID of pet that needs to be fetched # @param [Hash] opts the optional parameters # @return [Order] diff --git a/samples/client/petstore/ruby-faraday/spec/custom/pet_spec.rb b/samples/client/petstore/ruby-faraday/spec/custom/pet_spec.rb index da8ab7aca5..8b2baf8ba5 100644 --- a/samples/client/petstore/ruby-faraday/spec/custom/pet_spec.rb +++ b/samples/client/petstore/ruby-faraday/spec/custom/pet_spec.rb @@ -23,7 +23,7 @@ describe "Pet" do tag1 = Petstore::Tag.new('id' => 1, 'name' => 'tag1') tag2 = Petstore::Tag.new('id' => 2, 'name' => 'tag2') category1 = Petstore::Category.new(:id => 1, :name => 'category unknown') - # initalize using both string and symbol key + # initialize using both string and symbol key pet_hash = { :id => @pet_id, :name => "RUBY UNIT TESTING", @@ -78,7 +78,7 @@ describe "Pet" do fail 'it should raise error' rescue Petstore::ApiError => e expect(e.code).to eq(404) - # skip the check as the response contains a timestamp that changes on every reponse + # skip the check as the response contains a timestamp that changes on every response # expect(e.message).to eq("Error message: the server returns an error\nHTTP status code: 404\nResponse headers: {\"Date\"=>\"Tue, 26 Feb 2019 04:35:40 GMT\", \"Access-Control-Allow-Origin\"=>\"*\", \"Access-Control-Allow-Methods\"=>\"GET, POST, DELETE, PUT\", \"Access-Control-Allow-Headers\"=>\"Content-Type, api_key, Authorization\", \"Content-Type\"=>\"application/json\", \"Connection\"=>\"close\", \"Server\"=>\"Jetty(9.2.9.v20150224)\"}\nResponse body: {\"code\":1,\"type\":\"error\",\"message\":\"Pet not found\"}") expect(e.response_body).to eq('{"code":1,"type":"error","message":"Pet not found"}') expect(e.response_headers).to include('Content-Type') diff --git a/samples/client/petstore/ruby/docs/StoreApi.md b/samples/client/petstore/ruby/docs/StoreApi.md index 0bccca0bec..52c551498c 100644 --- a/samples/client/petstore/ruby/docs/StoreApi.md +++ b/samples/client/petstore/ruby/docs/StoreApi.md @@ -147,7 +147,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Examples diff --git a/samples/client/petstore/ruby/lib/petstore/api/store_api.rb b/samples/client/petstore/ruby/lib/petstore/api/store_api.rb index 5b9bc0fea9..8cd9e4bf4e 100644 --- a/samples/client/petstore/ruby/lib/petstore/api/store_api.rb +++ b/samples/client/petstore/ruby/lib/petstore/api/store_api.rb @@ -138,7 +138,7 @@ module Petstore end # Find purchase order by ID - # For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + # For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions # @param order_id [Integer] ID of pet that needs to be fetched # @param [Hash] opts the optional parameters # @return [Order] @@ -148,7 +148,7 @@ module Petstore end # Find purchase order by ID - # For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + # For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions # @param order_id [Integer] ID of pet that needs to be fetched # @param [Hash] opts the optional parameters # @return [Array<(Order, Integer, Hash)>] Order data, response status code and response headers diff --git a/samples/client/petstore/ruby/spec/api/store_api_spec.rb b/samples/client/petstore/ruby/spec/api/store_api_spec.rb index 1fd9faf40a..97c3d704de 100644 --- a/samples/client/petstore/ruby/spec/api/store_api_spec.rb +++ b/samples/client/petstore/ruby/spec/api/store_api_spec.rb @@ -57,7 +57,7 @@ describe 'StoreApi' do # unit tests for get_order_by_id # Find purchase order by ID - # For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + # For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions # @param order_id ID of pet that needs to be fetched # @param [Hash] opts the optional parameters # @return [Order] diff --git a/samples/client/petstore/ruby/spec/custom/pet_spec.rb b/samples/client/petstore/ruby/spec/custom/pet_spec.rb index 8bce8cff5f..8b2baf8ba5 100644 --- a/samples/client/petstore/ruby/spec/custom/pet_spec.rb +++ b/samples/client/petstore/ruby/spec/custom/pet_spec.rb @@ -78,7 +78,7 @@ describe "Pet" do fail 'it should raise error' rescue Petstore::ApiError => e expect(e.code).to eq(404) - # skip the check as the response contains a timestamp that changes on every reponse + # skip the check as the response contains a timestamp that changes on every response # expect(e.message).to eq("Error message: the server returns an error\nHTTP status code: 404\nResponse headers: {\"Date\"=>\"Tue, 26 Feb 2019 04:35:40 GMT\", \"Access-Control-Allow-Origin\"=>\"*\", \"Access-Control-Allow-Methods\"=>\"GET, POST, DELETE, PUT\", \"Access-Control-Allow-Headers\"=>\"Content-Type, api_key, Authorization\", \"Content-Type\"=>\"application/json\", \"Connection\"=>\"close\", \"Server\"=>\"Jetty(9.2.9.v20150224)\"}\nResponse body: {\"code\":1,\"type\":\"error\",\"message\":\"Pet not found\"}") expect(e.response_body).to eq('{"code":1,"type":"error","message":"Pet not found"}') expect(e.response_headers).to include('Content-Type') diff --git a/samples/client/petstore/rust/hyper/petstore/docs/StoreApi.md b/samples/client/petstore/rust/hyper/petstore/docs/StoreApi.md index c1f5b5a9c2..dbeb0169aa 100644 --- a/samples/client/petstore/rust/hyper/petstore/docs/StoreApi.md +++ b/samples/client/petstore/rust/hyper/petstore/docs/StoreApi.md @@ -73,7 +73,7 @@ This endpoint does not need any parameter. > crate::models::Order get_order_by_id(order_id) Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Parameters diff --git a/samples/client/petstore/rust/reqwest/petstore-async/docs/StoreApi.md b/samples/client/petstore/rust/reqwest/petstore-async/docs/StoreApi.md index a6b3c572cc..5796357f53 100644 --- a/samples/client/petstore/rust/reqwest/petstore-async/docs/StoreApi.md +++ b/samples/client/petstore/rust/reqwest/petstore-async/docs/StoreApi.md @@ -73,7 +73,7 @@ This endpoint does not need any parameter. > crate::models::Order get_order_by_id(order_id) Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Parameters diff --git a/samples/client/petstore/rust/reqwest/petstore-async/src/apis/store_api.rs b/samples/client/petstore/rust/reqwest/petstore-async/src/apis/store_api.rs index 36d090f4f1..ace7bc24e8 100644 --- a/samples/client/petstore/rust/reqwest/petstore-async/src/apis/store_api.rs +++ b/samples/client/petstore/rust/reqwest/petstore-async/src/apis/store_api.rs @@ -176,7 +176,7 @@ pub async fn get_inventory(configuration: &configuration::Configuration) -> Resu } } -/// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +/// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions pub async fn get_order_by_id(configuration: &configuration::Configuration, params: GetOrderByIdParams) -> Result, Error> { let local_var_configuration = configuration; diff --git a/samples/client/petstore/rust/reqwest/petstore-async/tests/pet_tests.rs b/samples/client/petstore/rust/reqwest/petstore-async/tests/pet_tests.rs index 8ab1927dea..78e8e21bb0 100644 --- a/samples/client/petstore/rust/reqwest/petstore-async/tests/pet_tests.rs +++ b/samples/client/petstore/rust/reqwest/petstore-async/tests/pet_tests.rs @@ -26,5 +26,5 @@ fn test_pet() { // get pet let _pet_result = petstore_reqwest_async::apis::pet_api::get_pet_by_id(&config, get_pet_params); - // TODO Testing async functions requires some additionnal testing crates. + // TODO Testing async functions requires some additional testing crates. } diff --git a/samples/client/petstore/rust/reqwest/petstore-awsv4signature/docs/StoreApi.md b/samples/client/petstore/rust/reqwest/petstore-awsv4signature/docs/StoreApi.md index a6b3c572cc..5796357f53 100644 --- a/samples/client/petstore/rust/reqwest/petstore-awsv4signature/docs/StoreApi.md +++ b/samples/client/petstore/rust/reqwest/petstore-awsv4signature/docs/StoreApi.md @@ -73,7 +73,7 @@ This endpoint does not need any parameter. > crate::models::Order get_order_by_id(order_id) Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Parameters diff --git a/samples/client/petstore/rust/reqwest/petstore-awsv4signature/src/apis/store_api.rs b/samples/client/petstore/rust/reqwest/petstore-awsv4signature/src/apis/store_api.rs index d50a60e411..0c71e2c08a 100644 --- a/samples/client/petstore/rust/reqwest/petstore-awsv4signature/src/apis/store_api.rs +++ b/samples/client/petstore/rust/reqwest/petstore-awsv4signature/src/apis/store_api.rs @@ -126,7 +126,7 @@ pub fn get_inventory(configuration: &configuration::Configuration, ) -> Result<: } } -/// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +/// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions pub fn get_order_by_id(configuration: &configuration::Configuration, order_id: i64) -> Result> { let local_var_configuration = configuration; diff --git a/samples/client/petstore/rust/reqwest/petstore/docs/StoreApi.md b/samples/client/petstore/rust/reqwest/petstore/docs/StoreApi.md index a6b3c572cc..5796357f53 100644 --- a/samples/client/petstore/rust/reqwest/petstore/docs/StoreApi.md +++ b/samples/client/petstore/rust/reqwest/petstore/docs/StoreApi.md @@ -73,7 +73,7 @@ This endpoint does not need any parameter. > crate::models::Order get_order_by_id(order_id) Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Parameters diff --git a/samples/client/petstore/rust/reqwest/petstore/src/apis/store_api.rs b/samples/client/petstore/rust/reqwest/petstore/src/apis/store_api.rs index f142404c3f..1a621384dd 100644 --- a/samples/client/petstore/rust/reqwest/petstore/src/apis/store_api.rs +++ b/samples/client/petstore/rust/reqwest/petstore/src/apis/store_api.rs @@ -113,7 +113,7 @@ pub fn get_inventory(configuration: &configuration::Configuration, ) -> Result<: } } -/// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +/// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions pub fn get_order_by_id(configuration: &configuration::Configuration, order_id: i64) -> Result> { let local_var_configuration = configuration; diff --git a/samples/client/petstore/scala-akka/docs/StoreApi.md b/samples/client/petstore/scala-akka/docs/StoreApi.md index 28f1bace83..30ba1676ff 100644 --- a/samples/client/petstore/scala-akka/docs/StoreApi.md +++ b/samples/client/petstore/scala-akka/docs/StoreApi.md @@ -177,7 +177,7 @@ ApiRequest[**Map[String, Int]**] Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example diff --git a/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/api/StoreApi.scala b/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/api/StoreApi.scala index 6832f20dea..d053398de2 100644 --- a/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/api/StoreApi.scala +++ b/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/api/StoreApi.scala @@ -55,7 +55,7 @@ class StoreApi(baseUrl: String) { /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * Expected answers: * code 200 : Order (successful operation) diff --git a/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/core/ApiInvoker.scala b/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/core/ApiInvoker.scala index 4b28ea9862..4002e9736b 100644 --- a/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/core/ApiInvoker.scala +++ b/samples/client/petstore/scala-akka/src/main/scala/org/openapitools/client/core/ApiInvoker.scala @@ -49,7 +49,7 @@ object ApiInvoker { * Allows request execution without calling apiInvoker.execute(request) * request.response can be used to get a future of the ApiResponse generated. * request.result can be used to get a future of the expected ApiResponse content. If content doesn't match, a - * Future will failed with a ClassCastException + * Future will fail with a ClassCastException * * @param request the apiRequest to be executed */ diff --git a/samples/client/petstore/scala-httpclient-deprecated/src/main/scala/org/openapitools/example/api/StoreApi.scala b/samples/client/petstore/scala-httpclient-deprecated/src/main/scala/org/openapitools/example/api/StoreApi.scala index 949585575e..6383776340 100644 --- a/samples/client/petstore/scala-httpclient-deprecated/src/main/scala/org/openapitools/example/api/StoreApi.scala +++ b/samples/client/petstore/scala-httpclient-deprecated/src/main/scala/org/openapitools/example/api/StoreApi.scala @@ -126,7 +126,7 @@ class StoreApi( /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param orderId ID of pet that needs to be fetched * @return Order @@ -141,7 +141,7 @@ class StoreApi( /** * Find purchase order by ID asynchronously - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param orderId ID of pet that needs to be fetched * @return Future(Order) diff --git a/samples/client/petstore/scala-httpclient/bin/org/openapitools/client/api/StoreApi.scala b/samples/client/petstore/scala-httpclient/bin/org/openapitools/client/api/StoreApi.scala index 4328080db9..1dfdc82b99 100644 --- a/samples/client/petstore/scala-httpclient/bin/org/openapitools/client/api/StoreApi.scala +++ b/samples/client/petstore/scala-httpclient/bin/org/openapitools/client/api/StoreApi.scala @@ -126,7 +126,7 @@ class StoreApi( /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param orderId ID of pet that needs to be fetched * @return Order @@ -141,7 +141,7 @@ class StoreApi( /** * Find purchase order by ID asynchronously - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param orderId ID of pet that needs to be fetched * @return Future(Order) diff --git a/samples/client/petstore/scala-httpclient/git_push.sh b/samples/client/petstore/scala-httpclient/git_push.sh index ced3be2b0c..200e975d21 100644 --- a/samples/client/petstore/scala-httpclient/git_push.sh +++ b/samples/client/petstore/scala-httpclient/git_push.sh @@ -1,7 +1,7 @@ #!/bin/sh # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ # -# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" git_user_id=$1 git_repo_id=$2 diff --git a/samples/client/petstore/scala-httpclient/src/main/scala/org/openapitools/client/api/StoreApi.scala b/samples/client/petstore/scala-httpclient/src/main/scala/org/openapitools/client/api/StoreApi.scala index 51b3923385..3104619836 100644 --- a/samples/client/petstore/scala-httpclient/src/main/scala/org/openapitools/client/api/StoreApi.scala +++ b/samples/client/petstore/scala-httpclient/src/main/scala/org/openapitools/client/api/StoreApi.scala @@ -126,7 +126,7 @@ class StoreApi( /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param orderId ID of pet that needs to be fetched * @return Order @@ -141,7 +141,7 @@ class StoreApi( /** * Find purchase order by ID asynchronously - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param orderId ID of pet that needs to be fetched * @return Future(Order) diff --git a/samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/api/StoreApi.scala b/samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/api/StoreApi.scala index e4db9be33b..1069953239 100644 --- a/samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/api/StoreApi.scala +++ b/samples/client/petstore/scala-sttp/src/main/scala/org/openapitools/client/api/StoreApi.scala @@ -57,7 +57,7 @@ class StoreApi(baseUrl: String) { .response(asJson[Map[String, Int]]) /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * Expected answers: * code 200 : Order (successful operation) diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java index 9b1d6de4fe..32116e5471 100644 --- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java @@ -88,7 +88,7 @@ public interface StoreApi { /** * GET /store/order/{orderId} : Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param orderId ID of pet that needs to be fetched (required) * @return successful operation (status code 200) @@ -99,7 +99,7 @@ public interface StoreApi { tags = { "store" }, value = "Find purchase order by ID", nickname = "getOrderById", - notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", response = Order.class ) @ApiResponses({ diff --git a/samples/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java b/samples/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java index 8b46211dc2..04a64a05c8 100644 --- a/samples/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java +++ b/samples/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java @@ -63,7 +63,7 @@ public interface DefaultApi { * update with form data * * @param date A date path parameter (required) - * @param visitDate Updated last vist timestamp (optional, default to 1971-12-19T03:39:57-08:00) + * @param visitDate Updated last visit timestamp (optional, default to 1971-12-19T03:39:57-08:00) * @return Invalid input (status code 405) */ @ApiOperation( @@ -81,7 +81,7 @@ public interface DefaultApi { ) ResponseEntity updatePetWithForm( @ApiParam(value = "A date path parameter", required = true, defaultValue = "1970-01-01") @PathVariable("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, - @ApiParam(value = "Updated last vist timestamp", defaultValue = "1971-12-19T03:39:57-08:00") @Valid @RequestParam(value = "visitDate", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime visitDate + @ApiParam(value = "Updated last visit timestamp", defaultValue = "1971-12-19T03:39:57-08:00") @Valid @RequestParam(value = "visitDate", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime visitDate ); } diff --git a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/StoreApi.java index 26f7bb20bd..b7426d301e 100644 --- a/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-cloud-feign-without-url/src/main/java/org/openapitools/api/StoreApi.java @@ -87,7 +87,7 @@ public interface StoreApi { /** * GET /store/order/{orderId} : Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param orderId ID of pet that needs to be fetched (required) * @return successful operation (status code 200) @@ -98,7 +98,7 @@ public interface StoreApi { tags = { "store" }, value = "Find purchase order by ID", nickname = "getOrderById", - notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", response = Order.class ) @ApiResponses({ diff --git a/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/StoreApi.java index e03a4fbf78..85780a64fd 100644 --- a/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/StoreApi.java @@ -72,7 +72,7 @@ public interface StoreApi { /** * GET /store/order/{orderId} : Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param orderId ID of pet that needs to be fetched (required) * @return successful operation (status code 200) @@ -80,7 +80,7 @@ public interface StoreApi { * or Order not found (status code 404) */ - @ApiOperation(value = "Find purchase order by ID", nickname = "getOrderById", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", }) + @ApiOperation(value = "Find purchase order by ID", nickname = "getOrderById", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", response = Order.class, tags={ "store", }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Order.class), diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java index b24e4da04e..43cca0751e 100644 --- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java @@ -87,7 +87,7 @@ public interface StoreApi { /** * GET /store/order/{orderId} : Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param orderId ID of pet that needs to be fetched (required) * @return successful operation (status code 200) @@ -98,7 +98,7 @@ public interface StoreApi { tags = { "store" }, value = "Find purchase order by ID", nickname = "getOrderById", - notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", response = Order.class ) @ApiResponses({ diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java index 26f7bb20bd..b7426d301e 100644 --- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java @@ -87,7 +87,7 @@ public interface StoreApi { /** * GET /store/order/{orderId} : Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param orderId ID of pet that needs to be fetched (required) * @return successful operation (status code 200) @@ -98,7 +98,7 @@ public interface StoreApi { tags = { "store" }, value = "Find purchase order by ID", nickname = "getOrderById", - notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", response = Order.class ) @ApiResponses({ diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java index 128aa8b87f..a676f2bf4d 100644 --- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java @@ -98,7 +98,7 @@ public interface StoreApi { /** * GET /store/order/{orderId} : Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param orderId ID of pet that needs to be fetched (required) * @return successful operation (status code 200) @@ -109,7 +109,7 @@ public interface StoreApi { tags = { "store" }, value = "Find purchase order by ID", nickname = "getOrderById", - notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", response = Order.class ) @ApiResponses({ 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 ce35f8dbc7..03f3b1259b 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -64,7 +64,7 @@ public struct APIHelper { /// maps all values from source to query parameters /// - /// explode attribute is respected: collection values might be either joined or split up into seperate key value pairs + /// explode attribute is respected: collection values might be either joined or split up into separate key value pairs public static func mapValuesToQueryItems(_ source: [String: (wrappedValue: Any?, isExplode: Bool)]) -> [URLQueryItem]? { let destination = source.filter { $0.value.wrappedValue != nil }.reduce(into: [URLQueryItem]()) { result, item in if let collection = item.value.wrappedValue as? [Any?] { 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 93671ed852..fd939fc169 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 @@ -247,7 +247,7 @@ open class PetAPI { - GET /pet/{petId} - Returns a single pet - API Key: - - type: apiKey api_key + - type: apiKey api_key (HEADER) - name: api_key - parameter petId: (path) ID of pet to return - returns: RequestBuilder 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 c8416218db..ad60d97fa9 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 @@ -82,7 +82,7 @@ open class StoreAPI { - GET /store/inventory - Returns a map of status codes to quantities - API Key: - - type: apiKey api_key + - type: apiKey api_key (HEADER) - name: api_key - returns: RequestBuilder<[String: Int]> */ @@ -126,7 +126,7 @@ open class StoreAPI { /** Find purchase order by ID - GET /store/order/{order_id} - - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + - For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - parameter orderId: (path) ID of pet that needs to be fetched - returns: RequestBuilder */ diff --git a/samples/client/petstore/swift5/alamofireLibrary/docs/StoreAPI.md b/samples/client/petstore/swift5/alamofireLibrary/docs/StoreAPI.md index b023aa9e45..edb75e33b7 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/docs/StoreAPI.md +++ b/samples/client/petstore/swift5/alamofireLibrary/docs/StoreAPI.md @@ -113,7 +113,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```swift diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift index ce35f8dbc7..03f3b1259b 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -64,7 +64,7 @@ public struct APIHelper { /// maps all values from source to query parameters /// - /// explode attribute is respected: collection values might be either joined or split up into seperate key value pairs + /// explode attribute is respected: collection values might be either joined or split up into separate key value pairs public static func mapValuesToQueryItems(_ source: [String: (wrappedValue: Any?, isExplode: Bool)]) -> [URLQueryItem]? { let destination = source.filter { $0.value.wrappedValue != nil }.reduce(into: [URLQueryItem]()) { result, item in if let collection = item.value.wrappedValue as? [Any?] { diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index 9c86f63bd8..d987aa3c8c 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -312,7 +312,7 @@ open class PetAPI { - GET /pet/{petId} - Returns a single pet - API Key: - - type: apiKey api_key + - type: apiKey api_key (HEADER) - name: api_key - parameter petId: (path) ID of pet to return - returns: RequestBuilder diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift index 503083b5df..04fcfacade 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift @@ -108,7 +108,7 @@ open class StoreAPI { - GET /store/inventory - Returns a map of status codes to quantities - API Key: - - type: apiKey api_key + - type: apiKey api_key (HEADER) - name: api_key - returns: RequestBuilder<[String: Int]> */ @@ -165,7 +165,7 @@ open class StoreAPI { /** Find purchase order by ID - GET /store/order/{order_id} - - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + - For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - parameter orderId: (path) ID of pet that needs to be fetched - returns: RequestBuilder */ diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/docs/StoreAPI.md b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/StoreAPI.md index b023aa9e45..edb75e33b7 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/docs/StoreAPI.md +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/docs/StoreAPI.md @@ -113,7 +113,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```swift 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 ce35f8dbc7..03f3b1259b 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -64,7 +64,7 @@ public struct APIHelper { /// maps all values from source to query parameters /// - /// explode attribute is respected: collection values might be either joined or split up into seperate key value pairs + /// explode attribute is respected: collection values might be either joined or split up into separate key value pairs public static func mapValuesToQueryItems(_ source: [String: (wrappedValue: Any?, isExplode: Bool)]) -> [URLQueryItem]? { let destination = source.filter { $0.value.wrappedValue != nil }.reduce(into: [URLQueryItem]()) { result, item in if let collection = item.value.wrappedValue as? [Any?] { 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 a9033a06cc..6168c1e5a2 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 @@ -290,7 +290,7 @@ open class PetAPI { - GET /pet/{petId} - Returns a single pet - API Key: - - type: apiKey api_key + - type: apiKey api_key (HEADER) - name: api_key - parameter petId: (path) ID of pet to return - returns: RequestBuilder 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 0b1e198919..ad4b140d70 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 @@ -101,7 +101,7 @@ open class StoreAPI { - GET /store/inventory - Returns a map of status codes to quantities - API Key: - - type: apiKey api_key + - type: apiKey api_key (HEADER) - name: api_key - returns: RequestBuilder<[String: Int]> */ @@ -153,7 +153,7 @@ open class StoreAPI { /** Find purchase order by ID - GET /store/order/{order_id} - - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + - For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - parameter orderId: (path) ID of pet that needs to be fetched - returns: RequestBuilder */ diff --git a/samples/client/petstore/swift5/combineLibrary/docs/StoreAPI.md b/samples/client/petstore/swift5/combineLibrary/docs/StoreAPI.md index b023aa9e45..edb75e33b7 100644 --- a/samples/client/petstore/swift5/combineLibrary/docs/StoreAPI.md +++ b/samples/client/petstore/swift5/combineLibrary/docs/StoreAPI.md @@ -113,7 +113,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```swift 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 ce35f8dbc7..03f3b1259b 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIHelper.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -64,7 +64,7 @@ public struct APIHelper { /// maps all values from source to query parameters /// - /// explode attribute is respected: collection values might be either joined or split up into seperate key value pairs + /// explode attribute is respected: collection values might be either joined or split up into separate key value pairs public static func mapValuesToQueryItems(_ source: [String: (wrappedValue: Any?, isExplode: Bool)]) -> [URLQueryItem]? { let destination = source.filter { $0.value.wrappedValue != nil }.reduce(into: [URLQueryItem]()) { result, item in if let collection = item.value.wrappedValue as? [Any?] { 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 ea6d473539..7a6dd52e80 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 @@ -244,7 +244,7 @@ open class PetAPI { - GET /pet/{petId} - Returns a single pet - API Key: - - type: apiKey api_key + - type: apiKey api_key (HEADER) - name: api_key - parameter petId: (path) ID of pet to return - returns: RequestBuilder 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 c8416218db..ad60d97fa9 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 @@ -82,7 +82,7 @@ open class StoreAPI { - GET /store/inventory - Returns a map of status codes to quantities - API Key: - - type: apiKey api_key + - type: apiKey api_key (HEADER) - name: api_key - returns: RequestBuilder<[String: Int]> */ @@ -126,7 +126,7 @@ open class StoreAPI { /** Find purchase order by ID - GET /store/order/{order_id} - - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + - For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - parameter orderId: (path) ID of pet that needs to be fetched - returns: RequestBuilder */ diff --git a/samples/client/petstore/swift5/default/docs/StoreAPI.md b/samples/client/petstore/swift5/default/docs/StoreAPI.md index b023aa9e45..edb75e33b7 100644 --- a/samples/client/petstore/swift5/default/docs/StoreAPI.md +++ b/samples/client/petstore/swift5/default/docs/StoreAPI.md @@ -113,7 +113,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```swift 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 ce35f8dbc7..03f3b1259b 100644 --- a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/APIHelper.swift +++ b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -64,7 +64,7 @@ public struct APIHelper { /// maps all values from source to query parameters /// - /// explode attribute is respected: collection values might be either joined or split up into seperate key value pairs + /// explode attribute is respected: collection values might be either joined or split up into separate key value pairs public static func mapValuesToQueryItems(_ source: [String: (wrappedValue: Any?, isExplode: Bool)]) -> [URLQueryItem]? { let destination = source.filter { $0.value.wrappedValue != nil }.reduce(into: [URLQueryItem]()) { result, item in if let collection = item.value.wrappedValue as? [Any?] { 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 ebd4e6d887..2bf98b0947 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 @@ -246,7 +246,7 @@ open class PetAPI { - GET /pet/{petId} - Returns a single pet - API Key: - - type: apiKey api_key + - type: apiKey api_key (HEADER) - name: api_key - parameter petId: (path) ID of pet to return - returns: RequestBuilder 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 01e80e98e2..af2006a556 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 @@ -82,7 +82,7 @@ open class StoreAPI { - GET /store/inventory - Returns a map of status codes to quantities - API Key: - - type: apiKey api_key + - type: apiKey api_key (HEADER) - name: api_key - returns: RequestBuilder<[String: Int]> */ @@ -126,7 +126,7 @@ open class StoreAPI { /** Find purchase order by ID - GET /store/order/{orderId} - - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + - For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - parameter orderId: (path) ID of pet that needs to be fetched - returns: RequestBuilder */ diff --git a/samples/client/petstore/swift5/deprecated/docs/StoreAPI.md b/samples/client/petstore/swift5/deprecated/docs/StoreAPI.md index db4d3aa1fb..dad23c0f8f 100644 --- a/samples/client/petstore/swift5/deprecated/docs/StoreAPI.md +++ b/samples/client/petstore/swift5/deprecated/docs/StoreAPI.md @@ -113,7 +113,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```swift diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/APIHelper.swift index ce35f8dbc7..03f3b1259b 100644 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/APIHelper.swift +++ b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -64,7 +64,7 @@ public struct APIHelper { /// maps all values from source to query parameters /// - /// explode attribute is respected: collection values might be either joined or split up into seperate key value pairs + /// explode attribute is respected: collection values might be either joined or split up into separate key value pairs public static func mapValuesToQueryItems(_ source: [String: (wrappedValue: Any?, isExplode: Bool)]) -> [URLQueryItem]? { let destination = source.filter { $0.value.wrappedValue != nil }.reduce(into: [URLQueryItem]()) { result, item in if let collection = item.value.wrappedValue as? [Any?] { diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index 054422bbe3..8437ad00a2 100644 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -247,7 +247,7 @@ open class PetAPI { - GET /pet/{petId} - Returns a single pet - API Key: - - type: apiKey api_key + - type: apiKey api_key (HEADER) - name: api_key - parameter petId: (path) ID of pet to return - returns: RequestBuilder diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift index c8416218db..ad60d97fa9 100644 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift +++ b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift @@ -82,7 +82,7 @@ open class StoreAPI { - GET /store/inventory - Returns a map of status codes to quantities - API Key: - - type: apiKey api_key + - type: apiKey api_key (HEADER) - name: api_key - returns: RequestBuilder<[String: Int]> */ @@ -126,7 +126,7 @@ open class StoreAPI { /** Find purchase order by ID - GET /store/order/{order_id} - - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + - For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - parameter orderId: (path) ID of pet that needs to be fetched - returns: RequestBuilder */ diff --git a/samples/client/petstore/swift5/frozenEnums/docs/StoreAPI.md b/samples/client/petstore/swift5/frozenEnums/docs/StoreAPI.md index b023aa9e45..edb75e33b7 100644 --- a/samples/client/petstore/swift5/frozenEnums/docs/StoreAPI.md +++ b/samples/client/petstore/swift5/frozenEnums/docs/StoreAPI.md @@ -113,7 +113,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```swift 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 2ca9a6df1c..b265c06f0f 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIHelper.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -64,7 +64,7 @@ internal struct APIHelper { /// maps all values from source to query parameters /// - /// explode attribute is respected: collection values might be either joined or split up into seperate key value pairs + /// explode attribute is respected: collection values might be either joined or split up into separate key value pairs internal static func mapValuesToQueryItems(_ source: [String: (wrappedValue: Any?, isExplode: Bool)]) -> [URLQueryItem]? { let destination = source.filter { $0.value.wrappedValue != nil }.reduce(into: [URLQueryItem]()) { result, item in if let collection = item.value.wrappedValue as? [Any?] { 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 143d7aa284..88bf373f4d 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 @@ -247,7 +247,7 @@ internal class PetAPI { - GET /pet/{petId} - Returns a single pet - API Key: - - type: apiKey api_key + - type: apiKey api_key (HEADER) - name: api_key - parameter petId: (path) ID of pet to return - returns: RequestBuilder 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 78f99758e6..80fe43931d 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 @@ -82,7 +82,7 @@ internal class StoreAPI { - GET /store/inventory - Returns a map of status codes to quantities - API Key: - - type: apiKey api_key + - type: apiKey api_key (HEADER) - name: api_key - returns: RequestBuilder<[String: Int]> */ @@ -126,7 +126,7 @@ internal class StoreAPI { /** Find purchase order by ID - GET /store/order/{order_id} - - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + - For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - parameter orderId: (path) ID of pet that needs to be fetched - returns: RequestBuilder */ diff --git a/samples/client/petstore/swift5/nonPublicApi/docs/StoreAPI.md b/samples/client/petstore/swift5/nonPublicApi/docs/StoreAPI.md index 100cf07cdc..37b5e11421 100644 --- a/samples/client/petstore/swift5/nonPublicApi/docs/StoreAPI.md +++ b/samples/client/petstore/swift5/nonPublicApi/docs/StoreAPI.md @@ -113,7 +113,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```swift 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 ce35f8dbc7..03f3b1259b 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIHelper.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -64,7 +64,7 @@ public struct APIHelper { /// maps all values from source to query parameters /// - /// explode attribute is respected: collection values might be either joined or split up into seperate key value pairs + /// explode attribute is respected: collection values might be either joined or split up into separate key value pairs public static func mapValuesToQueryItems(_ source: [String: (wrappedValue: Any?, isExplode: Bool)]) -> [URLQueryItem]? { let destination = source.filter { $0.value.wrappedValue != nil }.reduce(into: [URLQueryItem]()) { result, item in if let collection = item.value.wrappedValue as? [Any?] { 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 06cdfc06cc..e41eadc665 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 @@ -247,7 +247,7 @@ import AnyCodable - GET /pet/{petId} - Returns a single pet - API Key: - - type: apiKey api_key + - type: apiKey api_key (HEADER) - name: api_key - parameter petId: (path) ID of pet to return - returns: RequestBuilder 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 770d143f0a..e28e22929a 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 @@ -82,7 +82,7 @@ import AnyCodable - GET /store/inventory - Returns a map of status codes to quantities - API Key: - - type: apiKey api_key + - type: apiKey api_key (HEADER) - name: api_key - returns: RequestBuilder<[String: Int]> */ @@ -126,7 +126,7 @@ import AnyCodable /** Find purchase order by ID - GET /store/order/{order_id} - - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + - For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - parameter orderId: (path) ID of pet that needs to be fetched - returns: RequestBuilder */ diff --git a/samples/client/petstore/swift5/objcCompatible/docs/StoreAPI.md b/samples/client/petstore/swift5/objcCompatible/docs/StoreAPI.md index dd4c3d8b04..6480c86391 100644 --- a/samples/client/petstore/swift5/objcCompatible/docs/StoreAPI.md +++ b/samples/client/petstore/swift5/objcCompatible/docs/StoreAPI.md @@ -113,7 +113,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```swift diff --git a/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/APIHelper.swift index ce35f8dbc7..03f3b1259b 100644 --- a/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/APIHelper.swift +++ b/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -64,7 +64,7 @@ public struct APIHelper { /// maps all values from source to query parameters /// - /// explode attribute is respected: collection values might be either joined or split up into seperate key value pairs + /// explode attribute is respected: collection values might be either joined or split up into separate key value pairs public static func mapValuesToQueryItems(_ source: [String: (wrappedValue: Any?, isExplode: Bool)]) -> [URLQueryItem]? { let destination = source.filter { $0.value.wrappedValue != nil }.reduce(into: [URLQueryItem]()) { result, item in if let collection = item.value.wrappedValue as? [Any?] { 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 ce35f8dbc7..03f3b1259b 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -64,7 +64,7 @@ public struct APIHelper { /// maps all values from source to query parameters /// - /// explode attribute is respected: collection values might be either joined or split up into seperate key value pairs + /// explode attribute is respected: collection values might be either joined or split up into separate key value pairs public static func mapValuesToQueryItems(_ source: [String: (wrappedValue: Any?, isExplode: Bool)]) -> [URLQueryItem]? { let destination = source.filter { $0.value.wrappedValue != nil }.reduce(into: [URLQueryItem]()) { result, item in if let collection = item.value.wrappedValue as? [Any?] { 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 51ed84dfc8..cb3024703f 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 @@ -248,7 +248,7 @@ open class PetAPI { - GET /pet/{petId} - Returns a single pet - API Key: - - type: apiKey api_key + - type: apiKey api_key (HEADER) - name: api_key - parameter petId: (path) ID of pet to return - returns: RequestBuilder 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 7cd506b1f7..bcba455ea1 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 @@ -83,7 +83,7 @@ open class StoreAPI { - GET /store/inventory - Returns a map of status codes to quantities - API Key: - - type: apiKey api_key + - type: apiKey api_key (HEADER) - name: api_key - returns: RequestBuilder<[String: Int]> */ @@ -127,7 +127,7 @@ open class StoreAPI { /** Find purchase order by ID - GET /store/order/{order_id} - - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + - For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - parameter orderId: (path) ID of pet that needs to be fetched - returns: RequestBuilder */ diff --git a/samples/client/petstore/swift5/promisekitLibrary/docs/StoreAPI.md b/samples/client/petstore/swift5/promisekitLibrary/docs/StoreAPI.md index 1477d32392..662f1cf5b0 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/docs/StoreAPI.md +++ b/samples/client/petstore/swift5/promisekitLibrary/docs/StoreAPI.md @@ -107,7 +107,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```swift 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 ce35f8dbc7..03f3b1259b 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIHelper.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -64,7 +64,7 @@ public struct APIHelper { /// maps all values from source to query parameters /// - /// explode attribute is respected: collection values might be either joined or split up into seperate key value pairs + /// explode attribute is respected: collection values might be either joined or split up into separate key value pairs public static func mapValuesToQueryItems(_ source: [String: (wrappedValue: Any?, isExplode: Bool)]) -> [URLQueryItem]? { let destination = source.filter { $0.value.wrappedValue != nil }.reduce(into: [URLQueryItem]()) { result, item in if let collection = item.value.wrappedValue as? [Any?] { 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 93671ed852..fd939fc169 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 @@ -247,7 +247,7 @@ open class PetAPI { - GET /pet/{petId} - Returns a single pet - API Key: - - type: apiKey api_key + - type: apiKey api_key (HEADER) - name: api_key - parameter petId: (path) ID of pet to return - returns: RequestBuilder 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 c8416218db..ad60d97fa9 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 @@ -82,7 +82,7 @@ open class StoreAPI { - GET /store/inventory - Returns a map of status codes to quantities - API Key: - - type: apiKey api_key + - type: apiKey api_key (HEADER) - name: api_key - returns: RequestBuilder<[String: Int]> */ @@ -126,7 +126,7 @@ open class StoreAPI { /** Find purchase order by ID - GET /store/order/{order_id} - - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + - For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - parameter orderId: (path) ID of pet that needs to be fetched - returns: RequestBuilder */ diff --git a/samples/client/petstore/swift5/readonlyProperties/docs/StoreAPI.md b/samples/client/petstore/swift5/readonlyProperties/docs/StoreAPI.md index b023aa9e45..edb75e33b7 100644 --- a/samples/client/petstore/swift5/readonlyProperties/docs/StoreAPI.md +++ b/samples/client/petstore/swift5/readonlyProperties/docs/StoreAPI.md @@ -113,7 +113,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```swift 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 ce35f8dbc7..03f3b1259b 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -64,7 +64,7 @@ public struct APIHelper { /// maps all values from source to query parameters /// - /// explode attribute is respected: collection values might be either joined or split up into seperate key value pairs + /// explode attribute is respected: collection values might be either joined or split up into separate key value pairs public static func mapValuesToQueryItems(_ source: [String: (wrappedValue: Any?, isExplode: Bool)]) -> [URLQueryItem]? { let destination = source.filter { $0.value.wrappedValue != nil }.reduce(into: [URLQueryItem]()) { result, item in if let collection = item.value.wrappedValue as? [Any?] { 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 f685b49335..11b47c07c9 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 @@ -247,7 +247,7 @@ open class PetAPI { - GET /pet/{petId} - Returns a single pet - API Key: - - type: apiKey api_key + - type: apiKey api_key (HEADER) - name: api_key - parameter petId: (path) ID of pet to return - returns: RequestBuilder 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 70d00552d8..908a134c07 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 @@ -82,7 +82,7 @@ open class StoreAPI { - GET /store/inventory - Returns a map of status codes to quantities - API Key: - - type: apiKey api_key + - type: apiKey api_key (HEADER) - name: api_key - returns: RequestBuilder<[String: Int]> */ @@ -126,7 +126,7 @@ open class StoreAPI { /** Find purchase order by ID - GET /store/order/{order_id} - - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + - For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - parameter orderId: (path) ID of pet that needs to be fetched - returns: RequestBuilder */ diff --git a/samples/client/petstore/swift5/resultLibrary/docs/StoreAPI.md b/samples/client/petstore/swift5/resultLibrary/docs/StoreAPI.md index b023aa9e45..edb75e33b7 100644 --- a/samples/client/petstore/swift5/resultLibrary/docs/StoreAPI.md +++ b/samples/client/petstore/swift5/resultLibrary/docs/StoreAPI.md @@ -113,7 +113,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```swift 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 ce35f8dbc7..03f3b1259b 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -64,7 +64,7 @@ public struct APIHelper { /// maps all values from source to query parameters /// - /// explode attribute is respected: collection values might be either joined or split up into seperate key value pairs + /// explode attribute is respected: collection values might be either joined or split up into separate key value pairs public static func mapValuesToQueryItems(_ source: [String: (wrappedValue: Any?, isExplode: Bool)]) -> [URLQueryItem]? { let destination = source.filter { $0.value.wrappedValue != nil }.reduce(into: [URLQueryItem]()) { result, item in if let collection = item.value.wrappedValue as? [Any?] { 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 2426be2a77..c77f9e9448 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 @@ -278,7 +278,7 @@ open class PetAPI { - GET /pet/{petId} - Returns a single pet - API Key: - - type: apiKey api_key + - type: apiKey api_key (HEADER) - name: api_key - parameter petId: (path) ID of pet to return - returns: RequestBuilder 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 fb827f8458..7a24e880f6 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 @@ -95,7 +95,7 @@ open class StoreAPI { - GET /store/inventory - Returns a map of status codes to quantities - API Key: - - type: apiKey api_key + - type: apiKey api_key (HEADER) - name: api_key - returns: RequestBuilder<[String: Int]> */ @@ -145,7 +145,7 @@ open class StoreAPI { /** Find purchase order by ID - GET /store/order/{order_id} - - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + - For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - parameter orderId: (path) ID of pet that needs to be fetched - returns: RequestBuilder */ diff --git a/samples/client/petstore/swift5/rxswiftLibrary/docs/StoreAPI.md b/samples/client/petstore/swift5/rxswiftLibrary/docs/StoreAPI.md index 8d795213c0..ae87d585c5 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/docs/StoreAPI.md +++ b/samples/client/petstore/swift5/rxswiftLibrary/docs/StoreAPI.md @@ -93,7 +93,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```swift diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIHelper.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIHelper.swift index ce35f8dbc7..03f3b1259b 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIHelper.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIHelper.swift @@ -64,7 +64,7 @@ public struct APIHelper { /// maps all values from source to query parameters /// - /// explode attribute is respected: collection values might be either joined or split up into seperate key value pairs + /// explode attribute is respected: collection values might be either joined or split up into separate key value pairs public static func mapValuesToQueryItems(_ source: [String: (wrappedValue: Any?, isExplode: Bool)]) -> [URLQueryItem]? { let destination = source.filter { $0.value.wrappedValue != nil }.reduce(into: [URLQueryItem]()) { result, item in if let collection = item.value.wrappedValue as? [Any?] { diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIs/PetAPI.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIs/PetAPI.swift index 1d2a16db1d..84098b22ee 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIs/PetAPI.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIs/PetAPI.swift @@ -250,7 +250,7 @@ open class PetAPI { - GET /pet/{petId} - Returns a single pet - API Key: - - type: apiKey api_key + - type: apiKey api_key (HEADER) - name: api_key - parameter petId: (path) ID of pet to return - returns: RequestBuilder diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIs/StoreAPI.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIs/StoreAPI.swift index 1d449dbbb7..7eca4142f5 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIs/StoreAPI.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIs/StoreAPI.swift @@ -85,7 +85,7 @@ open class StoreAPI { - GET /store/inventory - Returns a map of status codes to quantities - API Key: - - type: apiKey api_key + - type: apiKey api_key (HEADER) - name: api_key - returns: RequestBuilder<[String: Int]> */ @@ -129,7 +129,7 @@ open class StoreAPI { /** Find purchase order by ID - GET /store/order/{order_id} - - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + - For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - parameter orderId: (path) ID of pet that needs to be fetched - returns: RequestBuilder */ diff --git a/samples/client/petstore/swift5/urlsessionLibrary/docs/StoreAPI.md b/samples/client/petstore/swift5/urlsessionLibrary/docs/StoreAPI.md index b023aa9e45..edb75e33b7 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/docs/StoreAPI.md +++ b/samples/client/petstore/swift5/urlsessionLibrary/docs/StoreAPI.md @@ -113,7 +113,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```swift diff --git a/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/APIs/PetAPI.swift b/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/APIs/PetAPI.swift index 5e80152150..78177ef4dd 100644 --- a/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/APIs/PetAPI.swift +++ b/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/APIs/PetAPI.swift @@ -271,7 +271,7 @@ open class PetAPI { GET /pet/{petId} Returns a single pet - API Key: - - type: apiKey api_key + - type: apiKey api_key (HEADER) - name: api_key - parameter petId: (path) ID of pet to return - returns: `EventLoopFuture` of `ClientResponse` @@ -308,7 +308,7 @@ open class PetAPI { GET /pet/{petId} Returns a single pet - API Key: - - type: apiKey api_key + - type: apiKey api_key (HEADER) - name: api_key - parameter petId: (path) ID of pet to return - returns: `EventLoopFuture` of `GetPetById` diff --git a/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/APIs/StoreAPI.swift b/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/APIs/StoreAPI.swift index d802c4c765..a71ba07e86 100644 --- a/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/APIs/StoreAPI.swift +++ b/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/APIs/StoreAPI.swift @@ -71,7 +71,7 @@ open class StoreAPI { GET /store/inventory Returns a map of status codes to quantities - API Key: - - type: apiKey api_key + - type: apiKey api_key (HEADER) - name: api_key - returns: `EventLoopFuture` of `ClientResponse` */ @@ -102,7 +102,7 @@ open class StoreAPI { GET /store/inventory Returns a map of status codes to quantities - API Key: - - type: apiKey api_key + - type: apiKey api_key (HEADER) - name: api_key - returns: `EventLoopFuture` of `GetInventory` */ @@ -120,7 +120,7 @@ open class StoreAPI { /** Find purchase order by ID GET /store/order/{order_id} - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - parameter orderId: (path) ID of pet that needs to be fetched - returns: `EventLoopFuture` of `ClientResponse` */ @@ -154,7 +154,7 @@ open class StoreAPI { /** Find purchase order by ID GET /store/order/{order_id} - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - parameter orderId: (path) ID of pet that needs to be fetched - returns: `EventLoopFuture` of `GetOrderById` */ diff --git a/samples/client/petstore/swift5/vaporLibrary/docs/StoreAPI.md b/samples/client/petstore/swift5/vaporLibrary/docs/StoreAPI.md index a56d51e05e..1feb1b0e0b 100644 --- a/samples/client/petstore/swift5/vaporLibrary/docs/StoreAPI.md +++ b/samples/client/petstore/swift5/vaporLibrary/docs/StoreAPI.md @@ -133,7 +133,7 @@ public enum GetInventory { Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```swift diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/APIHelper.swift index ce35f8dbc7..03f3b1259b 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/APIHelper.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -64,7 +64,7 @@ public struct APIHelper { /// maps all values from source to query parameters /// - /// explode attribute is respected: collection values might be either joined or split up into seperate key value pairs + /// explode attribute is respected: collection values might be either joined or split up into separate key value pairs public static func mapValuesToQueryItems(_ source: [String: (wrappedValue: Any?, isExplode: Bool)]) -> [URLQueryItem]? { let destination = source.filter { $0.value.wrappedValue != nil }.reduce(into: [URLQueryItem]()) { result, item in if let collection = item.value.wrappedValue as? [Any?] { diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index 93671ed852..fd939fc169 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -247,7 +247,7 @@ open class PetAPI { - GET /pet/{petId} - Returns a single pet - API Key: - - type: apiKey api_key + - type: apiKey api_key (HEADER) - name: api_key - parameter petId: (path) ID of pet to return - returns: RequestBuilder diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift index c8416218db..ad60d97fa9 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift @@ -82,7 +82,7 @@ open class StoreAPI { - GET /store/inventory - Returns a map of status codes to quantities - API Key: - - type: apiKey api_key + - type: apiKey api_key (HEADER) - name: api_key - returns: RequestBuilder<[String: Int]> */ @@ -126,7 +126,7 @@ open class StoreAPI { /** Find purchase order by ID - GET /store/order/{order_id} - - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + - For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - parameter orderId: (path) ID of pet that needs to be fetched - returns: RequestBuilder */ diff --git a/samples/client/petstore/swift5/x-swift-hashable/docs/StoreAPI.md b/samples/client/petstore/swift5/x-swift-hashable/docs/StoreAPI.md index b023aa9e45..edb75e33b7 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/docs/StoreAPI.md +++ b/samples/client/petstore/swift5/x-swift-hashable/docs/StoreAPI.md @@ -113,7 +113,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```swift diff --git a/samples/client/petstore/tiny/cpp/README.md b/samples/client/petstore/tiny/cpp/README.md index e8bf721275..87027780c2 100644 --- a/samples/client/petstore/tiny/cpp/README.md +++ b/samples/client/petstore/tiny/cpp/README.md @@ -1,6 +1,6 @@ # Documentation for OpenAPI Petstore This is a client generator for microcontrollers on the Espressif32 platform and the Arduino framework -After the client have been generated, you have to change these following variablies: +After the client have been generated, you have to change these following variables: - root.cert | Provide your service root certificate. - src/main.cpp | Change wifi name - src/main.cpp | Change wifi password diff --git a/samples/client/petstore/tiny/cpp/lib/service/StoreApi.h b/samples/client/petstore/tiny/cpp/lib/service/StoreApi.h index 1bf0db0237..3c347149c8 100644 --- a/samples/client/petstore/tiny/cpp/lib/service/StoreApi.h +++ b/samples/client/petstore/tiny/cpp/lib/service/StoreApi.h @@ -51,7 +51,7 @@ public: /** * Find purchase order by ID. * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * \param orderId ID of pet that needs to be fetched *Required* */ Response< diff --git a/samples/client/petstore/typescript-angular-v12-provided-in-any/builds/default/api/store.service.ts b/samples/client/petstore/typescript-angular-v12-provided-in-any/builds/default/api/store.service.ts index 6160c6b7c2..bf6a3e9d4b 100644 --- a/samples/client/petstore/typescript-angular-v12-provided-in-any/builds/default/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v12-provided-in-any/builds/default/api/store.service.ts @@ -213,7 +213,7 @@ export class StoreService { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. diff --git a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/api/store.service.ts b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/api/store.service.ts index 374f8f02e7..e6256586bf 100644 --- a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/api/store.service.ts @@ -213,7 +213,7 @@ export class StoreService { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. diff --git a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/api/store.service.ts index 374f8f02e7..e6256586bf 100644 --- a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/api/store.service.ts @@ -213,7 +213,7 @@ export class StoreService { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. diff --git a/samples/client/petstore/typescript-angular-v12-provided-in-root/pom.xml b/samples/client/petstore/typescript-angular-v12-provided-in-root/pom.xml index f7667cb436..66d05a023d 100644 --- a/samples/client/petstore/typescript-angular-v12-provided-in-root/pom.xml +++ b/samples/client/petstore/typescript-angular-v12-provided-in-root/pom.xml @@ -1,7 +1,7 @@ 4.0.0 org.openapitools - TypeScriptAngular12PestoreClientTests + TypeScriptAngular12PetstoreClientTests pom 1.0-SNAPSHOT TS Angular 12 Petstore Client Tests diff --git a/samples/client/petstore/typescript-angular-v13-provided-in-any/builds/default/api/store.service.ts b/samples/client/petstore/typescript-angular-v13-provided-in-any/builds/default/api/store.service.ts index 6160c6b7c2..bf6a3e9d4b 100644 --- a/samples/client/petstore/typescript-angular-v13-provided-in-any/builds/default/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v13-provided-in-any/builds/default/api/store.service.ts @@ -213,7 +213,7 @@ export class StoreService { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. diff --git a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/api/store.service.ts b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/api/store.service.ts index 2aa584617f..47b3c28465 100644 --- a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/api/store.service.ts @@ -213,7 +213,7 @@ export class StoreService { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. diff --git a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/api/store.service.ts index 2aa584617f..47b3c28465 100644 --- a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/api/store.service.ts @@ -213,7 +213,7 @@ export class StoreService { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. diff --git a/samples/client/petstore/typescript-angular-v14-provided-in-root/builds/default/api/store.service.ts b/samples/client/petstore/typescript-angular-v14-provided-in-root/builds/default/api/store.service.ts index 2aa584617f..47b3c28465 100644 --- a/samples/client/petstore/typescript-angular-v14-provided-in-root/builds/default/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v14-provided-in-root/builds/default/api/store.service.ts @@ -213,7 +213,7 @@ export class StoreService { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. diff --git a/samples/client/petstore/typescript-angular-v14-provided-in-root/builds/with-npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v14-provided-in-root/builds/with-npm/api/store.service.ts index cc32a52fc4..2478a3d3b0 100644 --- a/samples/client/petstore/typescript-angular-v14-provided-in-root/builds/with-npm/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v14-provided-in-root/builds/with-npm/api/store.service.ts @@ -207,7 +207,7 @@ export class StoreService { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. diff --git a/samples/client/petstore/typescript-angular-v14-query-param-object-format/api/store.service.ts b/samples/client/petstore/typescript-angular-v14-query-param-object-format/api/store.service.ts index 04f78cae1c..f2cd4b844f 100644 --- a/samples/client/petstore/typescript-angular-v14-query-param-object-format/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v14-query-param-object-format/api/store.service.ts @@ -202,7 +202,7 @@ export class StoreService { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. diff --git a/samples/client/petstore/typescript-aurelia/default/README.md b/samples/client/petstore/typescript-aurelia/default/README.md index 39a6c22b2e..1475a466d6 100644 --- a/samples/client/petstore/typescript-aurelia/default/README.md +++ b/samples/client/petstore/typescript-aurelia/default/README.md @@ -27,7 +27,7 @@ npm run build ``` #### NPM #### -You may publish the module to NPM. In this case, you would be able to install the module as any other NPM module. It maybe useful to use [scoped packages](https://docs.npmjs.com/misc/scope). +You may publish the module to NPM. In this case, you would be able to install the module as any other NPM module. It may be useful to use [scoped packages](https://docs.npmjs.com/misc/scope). You can also use `npm link` to link the module. However, this would not modify `package.json` of the installing project, as such you would need to relink every time you deploy that project. diff --git a/samples/client/petstore/typescript-aurelia/default/StoreApi.ts b/samples/client/petstore/typescript-aurelia/default/StoreApi.ts index feaab4b097..3d88a82119 100644 --- a/samples/client/petstore/typescript-aurelia/default/StoreApi.ts +++ b/samples/client/petstore/typescript-aurelia/default/StoreApi.ts @@ -118,7 +118,7 @@ export class StoreApi extends Api { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param params.orderId ID of pet that needs to be fetched */ async getOrderById(params: IGetOrderByIdParams): Promise { diff --git a/samples/client/petstore/typescript-axios/builds/default/api.ts b/samples/client/petstore/typescript-axios/builds/default/api.ts index 5d2454f32f..5bebd4db3b 100644 --- a/samples/client/petstore/typescript-axios/builds/default/api.ts +++ b/samples/client/petstore/typescript-axios/builds/default/api.ts @@ -985,7 +985,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @summary Find purchase order by ID * @param {number} orderId ID of pet that needs to be fetched * @param {*} [options] Override http request option. @@ -1086,7 +1086,7 @@ export const StoreApiFp = function(configuration?: Configuration) { return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @summary Find purchase order by ID * @param {number} orderId ID of pet that needs to be fetched * @param {*} [options] Override http request option. @@ -1137,7 +1137,7 @@ export const StoreApiFactory = function (configuration?: Configuration, basePath return localVarFp.getInventory(options).then((request) => request(axios, basePath)); }, /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @summary Find purchase order by ID * @param {number} orderId ID of pet that needs to be fetched * @param {*} [options] Override http request option. @@ -1190,7 +1190,7 @@ export class StoreApi extends BaseAPI { } /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @summary Find purchase order by ID * @param {number} orderId ID of pet that needs to be fetched * @param {*} [options] Override http request option. diff --git a/samples/client/petstore/typescript-axios/builds/es6-target/api.ts b/samples/client/petstore/typescript-axios/builds/es6-target/api.ts index 5d2454f32f..5bebd4db3b 100644 --- a/samples/client/petstore/typescript-axios/builds/es6-target/api.ts +++ b/samples/client/petstore/typescript-axios/builds/es6-target/api.ts @@ -985,7 +985,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @summary Find purchase order by ID * @param {number} orderId ID of pet that needs to be fetched * @param {*} [options] Override http request option. @@ -1086,7 +1086,7 @@ export const StoreApiFp = function(configuration?: Configuration) { return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @summary Find purchase order by ID * @param {number} orderId ID of pet that needs to be fetched * @param {*} [options] Override http request option. @@ -1137,7 +1137,7 @@ export const StoreApiFactory = function (configuration?: Configuration, basePath return localVarFp.getInventory(options).then((request) => request(axios, basePath)); }, /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @summary Find purchase order by ID * @param {number} orderId ID of pet that needs to be fetched * @param {*} [options] Override http request option. @@ -1190,7 +1190,7 @@ export class StoreApi extends BaseAPI { } /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @summary Find purchase order by ID * @param {number} orderId ID of pet that needs to be fetched * @param {*} [options] Override http request option. diff --git a/samples/client/petstore/typescript-axios/builds/test-petstore/api.ts b/samples/client/petstore/typescript-axios/builds/test-petstore/api.ts index 1400ca3686..fa769208e5 100644 --- a/samples/client/petstore/typescript-axios/builds/test-petstore/api.ts +++ b/samples/client/petstore/typescript-axios/builds/test-petstore/api.ts @@ -4201,7 +4201,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @summary Find purchase order by ID * @param {number} orderId ID of pet that needs to be fetched * @param {*} [options] Override http request option. @@ -4302,7 +4302,7 @@ export const StoreApiFp = function(configuration?: Configuration) { return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @summary Find purchase order by ID * @param {number} orderId ID of pet that needs to be fetched * @param {*} [options] Override http request option. @@ -4353,7 +4353,7 @@ export const StoreApiFactory = function (configuration?: Configuration, basePath return localVarFp.getInventory(options).then((request) => request(axios, basePath)); }, /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @summary Find purchase order by ID * @param {number} orderId ID of pet that needs to be fetched * @param {*} [options] Override http request option. @@ -4406,7 +4406,7 @@ export class StoreApi extends BaseAPI { } /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @summary Find purchase order by ID * @param {number} orderId ID of pet that needs to be fetched * @param {*} [options] Override http request option. diff --git a/samples/client/petstore/typescript-axios/builds/with-complex-headers/api.ts b/samples/client/petstore/typescript-axios/builds/with-complex-headers/api.ts index db982733cd..425fc0f4ea 100644 --- a/samples/client/petstore/typescript-axios/builds/with-complex-headers/api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-complex-headers/api.ts @@ -1028,7 +1028,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @summary Find purchase order by ID * @param {number} orderId ID of pet that needs to be fetched * @param {*} [options] Override http request option. @@ -1129,7 +1129,7 @@ export const StoreApiFp = function(configuration?: Configuration) { return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @summary Find purchase order by ID * @param {number} orderId ID of pet that needs to be fetched * @param {*} [options] Override http request option. @@ -1180,7 +1180,7 @@ export const StoreApiFactory = function (configuration?: Configuration, basePath return localVarFp.getInventory(options).then((request) => request(axios, basePath)); }, /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @summary Find purchase order by ID * @param {number} orderId ID of pet that needs to be fetched * @param {*} [options] Override http request option. @@ -1233,7 +1233,7 @@ export class StoreApi extends BaseAPI { } /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @summary Find purchase order by ID * @param {number} orderId ID of pet that needs to be fetched * @param {*} [options] Override http request option. diff --git a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/api.ts b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/api.ts index f5c5397880..90f71ba9ff 100644 --- a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/api.ts @@ -3846,7 +3846,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @summary Find purchase order by ID * @param {number} orderId ID of pet that needs to be fetched * @param {*} [options] Override http request option. @@ -3947,7 +3947,7 @@ export const StoreApiFp = function(configuration?: Configuration) { return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @summary Find purchase order by ID * @param {number} orderId ID of pet that needs to be fetched * @param {*} [options] Override http request option. @@ -3998,7 +3998,7 @@ export const StoreApiFactory = function (configuration?: Configuration, basePath return localVarFp.getInventory(options).then((request) => request(axios, basePath)); }, /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @summary Find purchase order by ID * @param {number} orderId ID of pet that needs to be fetched * @param {*} [options] Override http request option. @@ -4051,7 +4051,7 @@ export class StoreApi extends BaseAPI { } /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @summary Find purchase order by ID * @param {number} orderId ID of pet that needs to be fetched * @param {*} [options] Override http request option. diff --git a/samples/client/petstore/typescript-axios/builds/with-interfaces/api.ts b/samples/client/petstore/typescript-axios/builds/with-interfaces/api.ts index 360b0bfcb9..1f7c23fddf 100644 --- a/samples/client/petstore/typescript-axios/builds/with-interfaces/api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-interfaces/api.ts @@ -1079,7 +1079,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @summary Find purchase order by ID * @param {number} orderId ID of pet that needs to be fetched * @param {*} [options] Override http request option. @@ -1180,7 +1180,7 @@ export const StoreApiFp = function(configuration?: Configuration) { return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @summary Find purchase order by ID * @param {number} orderId ID of pet that needs to be fetched * @param {*} [options] Override http request option. @@ -1231,7 +1231,7 @@ export const StoreApiFactory = function (configuration?: Configuration, basePath return localVarFp.getInventory(options).then((request) => request(axios, basePath)); }, /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @summary Find purchase order by ID * @param {number} orderId ID of pet that needs to be fetched * @param {*} [options] Override http request option. @@ -1279,7 +1279,7 @@ export interface StoreApiInterface { getInventory(options?: AxiosRequestConfig): AxiosPromise<{ [key: string]: number; }>; /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @summary Find purchase order by ID * @param {number} orderId ID of pet that needs to be fetched * @param {*} [options] Override http request option. @@ -1331,7 +1331,7 @@ export class StoreApi extends BaseAPI implements StoreApiInterface { } /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @summary Find purchase order by ID * @param {number} orderId ID of pet that needs to be fetched * @param {*} [options] Override http request option. diff --git a/samples/client/petstore/typescript-axios/builds/with-node-imports/api.ts b/samples/client/petstore/typescript-axios/builds/with-node-imports/api.ts index db9e022616..879b843a5e 100644 --- a/samples/client/petstore/typescript-axios/builds/with-node-imports/api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-node-imports/api.ts @@ -989,7 +989,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @summary Find purchase order by ID * @param {number} orderId ID of pet that needs to be fetched * @param {*} [options] Override http request option. @@ -1088,7 +1088,7 @@ export const StoreApiFp = function(configuration?: Configuration) { return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @summary Find purchase order by ID * @param {number} orderId ID of pet that needs to be fetched * @param {*} [options] Override http request option. @@ -1139,7 +1139,7 @@ export const StoreApiFactory = function (configuration?: Configuration, basePath return localVarFp.getInventory(options).then((request) => request(axios, basePath)); }, /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @summary Find purchase order by ID * @param {number} orderId ID of pet that needs to be fetched * @param {*} [options] Override http request option. @@ -1192,7 +1192,7 @@ export class StoreApi extends BaseAPI { } /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @summary Find purchase order by ID * @param {number} orderId ID of pet that needs to be fetched * @param {*} [options] Override http request option. diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/store-api.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/store-api.ts index bf058d959f..19227a79b3 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/store-api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/store-api.ts @@ -96,7 +96,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @summary Find purchase order by ID * @param {number} orderId ID of pet that needs to be fetched * @param {*} [options] Override http request option. @@ -197,7 +197,7 @@ export const StoreApiFp = function(configuration?: Configuration) { return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @summary Find purchase order by ID * @param {number} orderId ID of pet that needs to be fetched * @param {*} [options] Override http request option. @@ -248,7 +248,7 @@ export const StoreApiFactory = function (configuration?: Configuration, basePath return localVarFp.getInventory(options).then((request) => request(axios, basePath)); }, /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @summary Find purchase order by ID * @param {number} orderId ID of pet that needs to be fetched * @param {*} [options] Override http request option. @@ -301,7 +301,7 @@ export class StoreApi extends BaseAPI { } /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @summary Find purchase order by ID * @param {number} orderId ID of pet that needs to be fetched * @param {*} [options] Override http request option. diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version/api.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version/api.ts index 5d2454f32f..5bebd4db3b 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version/api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version/api.ts @@ -985,7 +985,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @summary Find purchase order by ID * @param {number} orderId ID of pet that needs to be fetched * @param {*} [options] Override http request option. @@ -1086,7 +1086,7 @@ export const StoreApiFp = function(configuration?: Configuration) { return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @summary Find purchase order by ID * @param {number} orderId ID of pet that needs to be fetched * @param {*} [options] Override http request option. @@ -1137,7 +1137,7 @@ export const StoreApiFactory = function (configuration?: Configuration, basePath return localVarFp.getInventory(options).then((request) => request(axios, basePath)); }, /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @summary Find purchase order by ID * @param {number} orderId ID of pet that needs to be fetched * @param {*} [options] Override http request option. @@ -1190,7 +1190,7 @@ export class StoreApi extends BaseAPI { } /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @summary Find purchase order by ID * @param {number} orderId ID of pet that needs to be fetched * @param {*} [options] Override http request option. diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version/pom.xml b/samples/client/petstore/typescript-axios/builds/with-npm-version/pom.xml index 453d0ba34d..6255ece541 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version/pom.xml +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version/pom.xml @@ -1,7 +1,7 @@ 4.0.0 org.openapitools - TSAxiosPestoreTests + TSAxiosPetstoreTests pom 1.0-SNAPSHOT TS Axios Petstore Test Client diff --git a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/api.ts b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/api.ts index 08dc38e93d..3de428e657 100644 --- a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/api.ts @@ -1127,7 +1127,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @summary Find purchase order by ID * @param {number} orderId ID of pet that needs to be fetched * @param {*} [options] Override http request option. @@ -1226,7 +1226,7 @@ export const StoreApiFp = function(configuration?: Configuration) { return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @summary Find purchase order by ID * @param {number} orderId ID of pet that needs to be fetched * @param {*} [options] Override http request option. @@ -1277,7 +1277,7 @@ export const StoreApiFactory = function (configuration?: Configuration, basePath return localVarFp.getInventory(options).then((request) => request(axios, basePath)); }, /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @summary Find purchase order by ID * @param {number} orderId ID of pet that needs to be fetched * @param {*} [options] Override http request option. @@ -1372,7 +1372,7 @@ export class StoreApi extends BaseAPI { } /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @summary Find purchase order by ID * @param {StoreApiGetOrderByIdRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. diff --git a/samples/client/petstore/typescript-axios/builds/with-string-enums/api.ts b/samples/client/petstore/typescript-axios/builds/with-string-enums/api.ts index 2ef7ef2a89..140bd02c74 100644 --- a/samples/client/petstore/typescript-axios/builds/with-string-enums/api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-string-enums/api.ts @@ -989,7 +989,7 @@ export const StoreApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @summary Find purchase order by ID * @param {number} orderId ID of pet that needs to be fetched * @param {*} [options] Override http request option. @@ -1090,7 +1090,7 @@ export const StoreApiFp = function(configuration?: Configuration) { return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @summary Find purchase order by ID * @param {number} orderId ID of pet that needs to be fetched * @param {*} [options] Override http request option. @@ -1141,7 +1141,7 @@ export const StoreApiFactory = function (configuration?: Configuration, basePath return localVarFp.getInventory(options).then((request) => request(axios, basePath)); }, /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @summary Find purchase order by ID * @param {number} orderId ID of pet that needs to be fetched * @param {*} [options] Override http request option. @@ -1194,7 +1194,7 @@ export class StoreApi extends BaseAPI { } /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @summary Find purchase order by ID * @param {number} orderId ID of pet that needs to be fetched * @param {*} [options] Override http request option. diff --git a/samples/client/petstore/typescript-axios/tests/default/pom.xml b/samples/client/petstore/typescript-axios/tests/default/pom.xml index 49c179c809..62e700087e 100644 --- a/samples/client/petstore/typescript-axios/tests/default/pom.xml +++ b/samples/client/petstore/typescript-axios/tests/default/pom.xml @@ -1,7 +1,7 @@ 4.0.0 org.openapitools - TypeScriptAxiosPestoreClientTests + TypeScriptAxiosPetstoreClientTests pom 1.0-SNAPSHOT TS Axios Petstore Test Client diff --git a/samples/client/petstore/typescript-fetch/builds/allOf-readonly/runtime.ts b/samples/client/petstore/typescript-fetch/builds/allOf-readonly/runtime.ts index 04cb4f94cd..8e0b06dca6 100644 --- a/samples/client/petstore/typescript-fetch/builds/allOf-readonly/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/allOf-readonly/runtime.ts @@ -146,7 +146,7 @@ export class BaseAPI { credentials: this.configuration.credentials, }; - const overridedInit: RequestInit = { + const overriddenInit: RequestInit = { ...initParams, ...(await initOverrideFn({ init: initParams, @@ -155,13 +155,13 @@ export class BaseAPI { }; const init: RequestInit = { - ...overridedInit, + ...overriddenInit, body: - isFormData(overridedInit.body) || - overridedInit.body instanceof URLSearchParams || - isBlob(overridedInit.body) - ? overridedInit.body - : JSON.stringify(overridedInit.body), + isFormData(overriddenInit.body) || + overriddenInit.body instanceof URLSearchParams || + isBlob(overriddenInit.body) + ? overriddenInit.body + : JSON.stringify(overriddenInit.body), }; return { url, init }; diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/StoreApi.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/StoreApi.ts index d2c11b37b0..a4bf1d0d37 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/StoreApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/apis/StoreApi.ts @@ -103,7 +103,7 @@ export class StoreApi extends runtime.BaseAPI { } /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Find purchase order by ID */ async getOrderByIdRaw(requestParameters: GetOrderByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { @@ -126,7 +126,7 @@ export class StoreApi extends runtime.BaseAPI { } /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Find purchase order by ID */ async getOrderById(requestParameters: GetOrderByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/runtime.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/runtime.ts index 99991b9321..2c942d95a3 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/runtime.ts @@ -146,7 +146,7 @@ export class BaseAPI { credentials: this.configuration.credentials, }; - const overridedInit: RequestInit = { + const overriddenInit: RequestInit = { ...initParams, ...(await initOverrideFn({ init: initParams, @@ -155,13 +155,13 @@ export class BaseAPI { }; const init: RequestInit = { - ...overridedInit, + ...overriddenInit, body: - isFormData(overridedInit.body) || - overridedInit.body instanceof URLSearchParams || - isBlob(overridedInit.body) - ? overridedInit.body - : JSON.stringify(overridedInit.body), + isFormData(overriddenInit.body) || + overriddenInit.body instanceof URLSearchParams || + isBlob(overriddenInit.body) + ? overriddenInit.body + : JSON.stringify(overriddenInit.body), }; return { url, init }; diff --git a/samples/client/petstore/typescript-fetch/builds/default/apis/StoreApi.ts b/samples/client/petstore/typescript-fetch/builds/default/apis/StoreApi.ts index 203c4b9627..8f9d34b114 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/apis/StoreApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/default/apis/StoreApi.ts @@ -103,7 +103,7 @@ export class StoreApi extends runtime.BaseAPI { } /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Find purchase order by ID */ async getOrderByIdRaw(requestParameters: GetOrderByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { @@ -126,7 +126,7 @@ export class StoreApi extends runtime.BaseAPI { } /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Find purchase order by ID */ async getOrderById(requestParameters: GetOrderByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { diff --git a/samples/client/petstore/typescript-fetch/builds/default/pom.xml b/samples/client/petstore/typescript-fetch/builds/default/pom.xml index b40b83a0c7..60f2f11da1 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/pom.xml +++ b/samples/client/petstore/typescript-fetch/builds/default/pom.xml @@ -1,7 +1,7 @@ 4.0.0 org.openapitools - TypeScriptAngularBuildPestoreClientTests + TypeScriptAngularBuildPetstoreClientTests pom 1.0-SNAPSHOT TS Fetch Default Petstore Client diff --git a/samples/client/petstore/typescript-fetch/builds/default/runtime.ts b/samples/client/petstore/typescript-fetch/builds/default/runtime.ts index 2fea248ca7..166da7c38d 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/default/runtime.ts @@ -146,7 +146,7 @@ export class BaseAPI { credentials: this.configuration.credentials, }; - const overridedInit: RequestInit = { + const overriddenInit: RequestInit = { ...initParams, ...(await initOverrideFn({ init: initParams, @@ -155,13 +155,13 @@ export class BaseAPI { }; const init: RequestInit = { - ...overridedInit, + ...overriddenInit, body: - isFormData(overridedInit.body) || - overridedInit.body instanceof URLSearchParams || - isBlob(overridedInit.body) - ? overridedInit.body - : JSON.stringify(overridedInit.body), + isFormData(overriddenInit.body) || + overriddenInit.body instanceof URLSearchParams || + isBlob(overriddenInit.body) + ? overriddenInit.body + : JSON.stringify(overriddenInit.body), }; return { url, init }; diff --git a/samples/client/petstore/typescript-fetch/builds/enum/runtime.ts b/samples/client/petstore/typescript-fetch/builds/enum/runtime.ts index 0f47ce36ba..7ceb9c463d 100644 --- a/samples/client/petstore/typescript-fetch/builds/enum/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/enum/runtime.ts @@ -146,7 +146,7 @@ export class BaseAPI { credentials: this.configuration.credentials, }; - const overridedInit: RequestInit = { + const overriddenInit: RequestInit = { ...initParams, ...(await initOverrideFn({ init: initParams, @@ -155,13 +155,13 @@ export class BaseAPI { }; const init: RequestInit = { - ...overridedInit, + ...overriddenInit, body: - isFormData(overridedInit.body) || - overridedInit.body instanceof URLSearchParams || - isBlob(overridedInit.body) - ? overridedInit.body - : JSON.stringify(overridedInit.body), + isFormData(overriddenInit.body) || + overriddenInit.body instanceof URLSearchParams || + isBlob(overriddenInit.body) + ? overriddenInit.body + : JSON.stringify(overriddenInit.body), }; return { url, init }; diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/pom.xml b/samples/client/petstore/typescript-fetch/builds/es6-target/pom.xml index 94a52e3749..ada9ef7988 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/pom.xml +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/pom.xml @@ -1,7 +1,7 @@ 4.0.0 org.openapitools - TypeScriptAngularBuildES6PestoreClientTests + TypeScriptAngularBuildES6PetstoreClientTests pom 1.0-SNAPSHOT TS Fetch ES6 Petstore Client diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/src/apis/StoreApi.ts b/samples/client/petstore/typescript-fetch/builds/es6-target/src/apis/StoreApi.ts index 203c4b9627..8f9d34b114 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/src/apis/StoreApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/src/apis/StoreApi.ts @@ -103,7 +103,7 @@ export class StoreApi extends runtime.BaseAPI { } /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Find purchase order by ID */ async getOrderByIdRaw(requestParameters: GetOrderByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { @@ -126,7 +126,7 @@ export class StoreApi extends runtime.BaseAPI { } /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Find purchase order by ID */ async getOrderById(requestParameters: GetOrderByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/src/runtime.ts b/samples/client/petstore/typescript-fetch/builds/es6-target/src/runtime.ts index 2fea248ca7..166da7c38d 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/src/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/src/runtime.ts @@ -146,7 +146,7 @@ export class BaseAPI { credentials: this.configuration.credentials, }; - const overridedInit: RequestInit = { + const overriddenInit: RequestInit = { ...initParams, ...(await initOverrideFn({ init: initParams, @@ -155,13 +155,13 @@ export class BaseAPI { }; const init: RequestInit = { - ...overridedInit, + ...overriddenInit, body: - isFormData(overridedInit.body) || - overridedInit.body instanceof URLSearchParams || - isBlob(overridedInit.body) - ? overridedInit.body - : JSON.stringify(overridedInit.body), + isFormData(overriddenInit.body) || + overriddenInit.body instanceof URLSearchParams || + isBlob(overriddenInit.body) + ? overriddenInit.body + : JSON.stringify(overriddenInit.body), }; return { url, init }; diff --git a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/apis/StoreApi.ts b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/apis/StoreApi.ts index d282329daf..2921f69430 100644 --- a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/apis/StoreApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/apis/StoreApi.ts @@ -103,7 +103,7 @@ export class StoreApi extends runtime.BaseAPI { } /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Find purchase order by ID */ async getOrderByIdRaw(requestParameters: GetOrderByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { @@ -126,7 +126,7 @@ export class StoreApi extends runtime.BaseAPI { } /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Find purchase order by ID */ async getOrderById(orderId: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { diff --git a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/pom.xml b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/pom.xml index a6fc39c4f0..45c1c96ef7 100644 --- a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/pom.xml +++ b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/pom.xml @@ -1,7 +1,7 @@ 4.0.0 org.openapitools - TypeScriptAngularBuildPestoreClientTests + TypeScriptAngularBuildPetstoreClientTests pom 1.0-SNAPSHOT TS Fetch Multiple Parameters Petstore Client diff --git a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/runtime.ts b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/runtime.ts index 2fea248ca7..166da7c38d 100644 --- a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/runtime.ts @@ -146,7 +146,7 @@ export class BaseAPI { credentials: this.configuration.credentials, }; - const overridedInit: RequestInit = { + const overriddenInit: RequestInit = { ...initParams, ...(await initOverrideFn({ init: initParams, @@ -155,13 +155,13 @@ export class BaseAPI { }; const init: RequestInit = { - ...overridedInit, + ...overriddenInit, body: - isFormData(overridedInit.body) || - overridedInit.body instanceof URLSearchParams || - isBlob(overridedInit.body) - ? overridedInit.body - : JSON.stringify(overridedInit.body), + isFormData(overriddenInit.body) || + overriddenInit.body instanceof URLSearchParams || + isBlob(overriddenInit.body) + ? overriddenInit.body + : JSON.stringify(overriddenInit.body), }; return { url, init }; diff --git a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/pom.xml b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/pom.xml index 35c073c7dc..1ddb5113ec 100644 --- a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/pom.xml +++ b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/pom.xml @@ -1,7 +1,7 @@ 4.0.0 org.openapitools - TypeScriptFetchBuildPrefixParameterInterfacesPestoreClientTests + TypeScriptFetchBuildPrefixParameterInterfacesPetstoreClientTests pom 1.0-SNAPSHOT TS Fetch Petstore Client (with namespacing for parameter interfaces) diff --git a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/apis/StoreApi.ts b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/apis/StoreApi.ts index a25702974f..d146280283 100644 --- a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/apis/StoreApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/apis/StoreApi.ts @@ -103,7 +103,7 @@ export class StoreApi extends runtime.BaseAPI { } /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Find purchase order by ID */ async getOrderByIdRaw(requestParameters: StoreApiGetOrderByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { @@ -126,7 +126,7 @@ export class StoreApi extends runtime.BaseAPI { } /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Find purchase order by ID */ async getOrderById(requestParameters: StoreApiGetOrderByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { diff --git a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/runtime.ts b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/runtime.ts index 2fea248ca7..166da7c38d 100644 --- a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/runtime.ts @@ -146,7 +146,7 @@ export class BaseAPI { credentials: this.configuration.credentials, }; - const overridedInit: RequestInit = { + const overriddenInit: RequestInit = { ...initParams, ...(await initOverrideFn({ init: initParams, @@ -155,13 +155,13 @@ export class BaseAPI { }; const init: RequestInit = { - ...overridedInit, + ...overriddenInit, body: - isFormData(overridedInit.body) || - overridedInit.body instanceof URLSearchParams || - isBlob(overridedInit.body) - ? overridedInit.body - : JSON.stringify(overridedInit.body), + isFormData(overriddenInit.body) || + overriddenInit.body instanceof URLSearchParams || + isBlob(overriddenInit.body) + ? overriddenInit.body + : JSON.stringify(overriddenInit.body), }; return { url, init }; diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/apis/StoreApi.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/apis/StoreApi.ts index d282329daf..2921f69430 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/apis/StoreApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/apis/StoreApi.ts @@ -103,7 +103,7 @@ export class StoreApi extends runtime.BaseAPI { } /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Find purchase order by ID */ async getOrderByIdRaw(requestParameters: GetOrderByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { @@ -126,7 +126,7 @@ export class StoreApi extends runtime.BaseAPI { } /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Find purchase order by ID */ async getOrderById(orderId: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/runtime.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/runtime.ts index 2fea248ca7..166da7c38d 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/runtime.ts @@ -146,7 +146,7 @@ export class BaseAPI { credentials: this.configuration.credentials, }; - const overridedInit: RequestInit = { + const overriddenInit: RequestInit = { ...initParams, ...(await initOverrideFn({ init: initParams, @@ -155,13 +155,13 @@ export class BaseAPI { }; const init: RequestInit = { - ...overridedInit, + ...overriddenInit, body: - isFormData(overridedInit.body) || - overridedInit.body instanceof URLSearchParams || - isBlob(overridedInit.body) - ? overridedInit.body - : JSON.stringify(overridedInit.body), + isFormData(overriddenInit.body) || + overriddenInit.body instanceof URLSearchParams || + isBlob(overriddenInit.body) + ? overriddenInit.body + : JSON.stringify(overriddenInit.body), }; return { url, init }; diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/apis/StoreApi.ts b/samples/client/petstore/typescript-fetch/builds/with-interfaces/apis/StoreApi.ts index 614c70e6c1..b39dc4ca60 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/apis/StoreApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/apis/StoreApi.ts @@ -73,7 +73,7 @@ export interface StoreApiInterface { getInventory(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: number; }>; /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @summary Find purchase order by ID * @param {number} orderId ID of pet that needs to be fetched * @param {*} [options] Override http request option. @@ -83,7 +83,7 @@ export interface StoreApiInterface { getOrderByIdRaw(requestParameters: GetOrderByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>; /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Find purchase order by ID */ getOrderById(requestParameters: GetOrderByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise; @@ -174,7 +174,7 @@ export class StoreApi extends runtime.BaseAPI implements StoreApiInterface { } /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Find purchase order by ID */ async getOrderByIdRaw(requestParameters: GetOrderByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { @@ -197,7 +197,7 @@ export class StoreApi extends runtime.BaseAPI implements StoreApiInterface { } /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Find purchase order by ID */ async getOrderById(requestParameters: GetOrderByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/runtime.ts b/samples/client/petstore/typescript-fetch/builds/with-interfaces/runtime.ts index 2fea248ca7..166da7c38d 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/runtime.ts @@ -146,7 +146,7 @@ export class BaseAPI { credentials: this.configuration.credentials, }; - const overridedInit: RequestInit = { + const overriddenInit: RequestInit = { ...initParams, ...(await initOverrideFn({ init: initParams, @@ -155,13 +155,13 @@ export class BaseAPI { }; const init: RequestInit = { - ...overridedInit, + ...overriddenInit, body: - isFormData(overridedInit.body) || - overridedInit.body instanceof URLSearchParams || - isBlob(overridedInit.body) - ? overridedInit.body - : JSON.stringify(overridedInit.body), + isFormData(overriddenInit.body) || + overriddenInit.body instanceof URLSearchParams || + isBlob(overriddenInit.body) + ? overriddenInit.body + : JSON.stringify(overriddenInit.body), }; return { url, init }; diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/pom.xml b/samples/client/petstore/typescript-fetch/builds/with-npm-version/pom.xml index 461175a4d6..9798b29898 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/pom.xml +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/pom.xml @@ -1,7 +1,7 @@ 4.0.0 org.openapitools - TypeScriptAngularBuildWithNPMVersionPestoreClientTests + TypeScriptAngularBuildWithNPMVersionPetstoreClientTests pom 1.0-SNAPSHOT TS Fetch Petstore Client (with npm) diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/apis/StoreApi.ts b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/apis/StoreApi.ts index 203c4b9627..8f9d34b114 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/apis/StoreApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/apis/StoreApi.ts @@ -103,7 +103,7 @@ export class StoreApi extends runtime.BaseAPI { } /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Find purchase order by ID */ async getOrderByIdRaw(requestParameters: GetOrderByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { @@ -126,7 +126,7 @@ export class StoreApi extends runtime.BaseAPI { } /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Find purchase order by ID */ async getOrderById(requestParameters: GetOrderByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/runtime.ts b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/runtime.ts index 2fea248ca7..166da7c38d 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/runtime.ts @@ -146,7 +146,7 @@ export class BaseAPI { credentials: this.configuration.credentials, }; - const overridedInit: RequestInit = { + const overriddenInit: RequestInit = { ...initParams, ...(await initOverrideFn({ init: initParams, @@ -155,13 +155,13 @@ export class BaseAPI { }; const init: RequestInit = { - ...overridedInit, + ...overriddenInit, body: - isFormData(overridedInit.body) || - overridedInit.body instanceof URLSearchParams || - isBlob(overridedInit.body) - ? overridedInit.body - : JSON.stringify(overridedInit.body), + isFormData(overriddenInit.body) || + overriddenInit.body instanceof URLSearchParams || + isBlob(overriddenInit.body) + ? overriddenInit.body + : JSON.stringify(overriddenInit.body), }; return { url, init }; diff --git a/samples/client/petstore/typescript-fetch/builds/with-string-enums/runtime.ts b/samples/client/petstore/typescript-fetch/builds/with-string-enums/runtime.ts index 0f47ce36ba..7ceb9c463d 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-string-enums/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-string-enums/runtime.ts @@ -146,7 +146,7 @@ export class BaseAPI { credentials: this.configuration.credentials, }; - const overridedInit: RequestInit = { + const overriddenInit: RequestInit = { ...initParams, ...(await initOverrideFn({ init: initParams, @@ -155,13 +155,13 @@ export class BaseAPI { }; const init: RequestInit = { - ...overridedInit, + ...overriddenInit, body: - isFormData(overridedInit.body) || - overridedInit.body instanceof URLSearchParams || - isBlob(overridedInit.body) - ? overridedInit.body - : JSON.stringify(overridedInit.body), + isFormData(overriddenInit.body) || + overriddenInit.body instanceof URLSearchParams || + isBlob(overriddenInit.body) + ? overriddenInit.body + : JSON.stringify(overriddenInit.body), }; return { url, init }; diff --git a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/apis/StoreApi.ts b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/apis/StoreApi.ts index 8b395b9828..833d7f8440 100644 --- a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/apis/StoreApi.ts +++ b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/apis/StoreApi.ts @@ -99,7 +99,7 @@ export class StoreApi extends runtime.BaseAPI { } /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Find purchase order by ID */ async getOrderByIdRaw(requestParameters: GetOrderByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { @@ -122,7 +122,7 @@ export class StoreApi extends runtime.BaseAPI { } /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Find purchase order by ID */ async getOrderById(requestParameters: GetOrderByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { diff --git a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/runtime.ts b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/runtime.ts index 80892c6107..6da1edbcb7 100644 --- a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/runtime.ts @@ -146,7 +146,7 @@ export class BaseAPI { credentials: this.configuration.credentials, }; - const overridedInit: RequestInit = { + const overriddenInit: RequestInit = { ...initParams, ...(await initOverrideFn({ init: initParams, @@ -155,13 +155,13 @@ export class BaseAPI { }; const init: RequestInit = { - ...overridedInit, + ...overriddenInit, body: - isFormData(overridedInit.body) || - overridedInit.body instanceof URLSearchParams || - isBlob(overridedInit.body) - ? overridedInit.body - : JSON.stringify(overridedInit.body), + isFormData(overriddenInit.body) || + overriddenInit.body instanceof URLSearchParams || + isBlob(overriddenInit.body) + ? overriddenInit.body + : JSON.stringify(overriddenInit.body), }; return { url, init }; diff --git a/samples/client/petstore/typescript-fetch/tests/default/pom.xml b/samples/client/petstore/typescript-fetch/tests/default/pom.xml index 92063ea7bc..eeda8353ac 100644 --- a/samples/client/petstore/typescript-fetch/tests/default/pom.xml +++ b/samples/client/petstore/typescript-fetch/tests/default/pom.xml @@ -1,7 +1,7 @@ 4.0.0 org.openapitools - TypeScriptFetchPestoreClientTests + TypeScriptFetchPetstoreClientTests pom 1.0-SNAPSHOT TS Fetch Petstore Test Client diff --git a/samples/client/petstore/typescript-inversify/api/store.service.ts b/samples/client/petstore/typescript-inversify/api/store.service.ts index 37db9280b1..3b72110329 100644 --- a/samples/client/petstore/typescript-inversify/api/store.service.ts +++ b/samples/client/petstore/typescript-inversify/api/store.service.ts @@ -87,7 +87,7 @@ export class StoreService { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched */ diff --git a/samples/client/petstore/typescript-jquery/default/api/StoreApi.ts b/samples/client/petstore/typescript-jquery/default/api/StoreApi.ts index cf2b58ec9d..12daa011d6 100644 --- a/samples/client/petstore/typescript-jquery/default/api/StoreApi.ts +++ b/samples/client/petstore/typescript-jquery/default/api/StoreApi.ts @@ -169,7 +169,7 @@ export class StoreApi { } /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @summary Find purchase order by ID * @param orderId ID of pet that needs to be fetched */ diff --git a/samples/client/petstore/typescript-jquery/npm/api/StoreApi.ts b/samples/client/petstore/typescript-jquery/npm/api/StoreApi.ts index cf2b58ec9d..12daa011d6 100644 --- a/samples/client/petstore/typescript-jquery/npm/api/StoreApi.ts +++ b/samples/client/petstore/typescript-jquery/npm/api/StoreApi.ts @@ -169,7 +169,7 @@ export class StoreApi { } /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @summary Find purchase order by ID * @param orderId ID of pet that needs to be fetched */ diff --git a/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/api/store.service.ts b/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/api/store.service.ts index bed8d84452..cb91921583 100644 --- a/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/api/store.service.ts +++ b/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/api/store.service.ts @@ -110,7 +110,7 @@ export class StoreService { } /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. diff --git a/samples/client/petstore/typescript-nestjs-v8-provided-in-root/builds/default/api/store.service.ts b/samples/client/petstore/typescript-nestjs-v8-provided-in-root/builds/default/api/store.service.ts index 29110b427e..947bae1be1 100644 --- a/samples/client/petstore/typescript-nestjs-v8-provided-in-root/builds/default/api/store.service.ts +++ b/samples/client/petstore/typescript-nestjs-v8-provided-in-root/builds/default/api/store.service.ts @@ -111,7 +111,7 @@ export class StoreService { } /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. diff --git a/samples/client/petstore/typescript-node/default/api/storeApi.ts b/samples/client/petstore/typescript-node/default/api/storeApi.ts index aa66df0b98..8cb4e74e84 100644 --- a/samples/client/petstore/typescript-node/default/api/storeApi.ts +++ b/samples/client/petstore/typescript-node/default/api/storeApi.ts @@ -221,7 +221,7 @@ export class StoreApi { }); } /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @summary Find purchase order by ID * @param orderId ID of pet that needs to be fetched */ diff --git a/samples/client/petstore/typescript-node/npm/api/storeApi.ts b/samples/client/petstore/typescript-node/npm/api/storeApi.ts index aa66df0b98..8cb4e74e84 100644 --- a/samples/client/petstore/typescript-node/npm/api/storeApi.ts +++ b/samples/client/petstore/typescript-node/npm/api/storeApi.ts @@ -221,7 +221,7 @@ export class StoreApi { }); } /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @summary Find purchase order by ID * @param orderId ID of pet that needs to be fetched */ diff --git a/samples/client/petstore/typescript-node/npm/pom.xml b/samples/client/petstore/typescript-node/npm/pom.xml index a69d53db31..cbadc987eb 100644 --- a/samples/client/petstore/typescript-node/npm/pom.xml +++ b/samples/client/petstore/typescript-node/npm/pom.xml @@ -1,7 +1,7 @@ 4.0.0 org.openapitools - TypeScriptNodeNPMPestoreClientTests + TypeScriptNodeNPMPetstoreClientTests pom 1.0-SNAPSHOT TS Node npm Petstore Client diff --git a/samples/client/petstore/typescript-redux-query/builds/default/src/apis/StoreApi.ts b/samples/client/petstore/typescript-redux-query/builds/default/src/apis/StoreApi.ts index b49ad469dd..a9be7bb896 100644 --- a/samples/client/petstore/typescript-redux-query/builds/default/src/apis/StoreApi.ts +++ b/samples/client/petstore/typescript-redux-query/builds/default/src/apis/StoreApi.ts @@ -126,7 +126,7 @@ export function getInventory( requestConfig?: runtime.TypedQueryConfig 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Find purchase order by ID */ function getOrderByIdRaw(requestParameters: GetOrderByIdRequest, requestConfig: runtime.TypedQueryConfig = {}): QueryConfig { @@ -166,7 +166,7 @@ function getOrderByIdRaw(requestParameters: GetOrderByIdRequest, requestConfi } /** -* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +* For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Find purchase order by ID */ export function getOrderById(requestParameters: GetOrderByIdRequest, requestConfig?: runtime.TypedQueryConfig): QueryConfig { diff --git a/samples/client/petstore/typescript-redux-query/builds/with-npm-version/src/apis/StoreApi.ts b/samples/client/petstore/typescript-redux-query/builds/with-npm-version/src/apis/StoreApi.ts index b4802bdad5..ad509b371d 100644 --- a/samples/client/petstore/typescript-redux-query/builds/with-npm-version/src/apis/StoreApi.ts +++ b/samples/client/petstore/typescript-redux-query/builds/with-npm-version/src/apis/StoreApi.ts @@ -125,7 +125,7 @@ export function getInventory( requestConfig?: runtime.TypedQueryConfig 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Find purchase order by ID */ function getOrderByIdRaw(requestParameters: GetOrderByIdRequest, requestConfig: runtime.TypedQueryConfig = {}): QueryConfig { @@ -165,7 +165,7 @@ function getOrderByIdRaw(requestParameters: GetOrderByIdRequest, requestConfi } /** -* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +* For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Find purchase order by ID */ export function getOrderById(requestParameters: GetOrderByIdRequest, requestConfig?: runtime.TypedQueryConfig): QueryConfig { diff --git a/samples/client/petstore/typescript-rxjs/builds/default/apis/StoreApi.ts b/samples/client/petstore/typescript-rxjs/builds/default/apis/StoreApi.ts index 4b41b2501a..85dcd9aa56 100644 --- a/samples/client/petstore/typescript-rxjs/builds/default/apis/StoreApi.ts +++ b/samples/client/petstore/typescript-rxjs/builds/default/apis/StoreApi.ts @@ -70,7 +70,7 @@ export class StoreApi extends BaseAPI { }; /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Find purchase order by ID */ getOrderById({ orderId }: GetOrderByIdRequest): Observable diff --git a/samples/client/petstore/typescript-rxjs/builds/es6-target/apis/StoreApi.ts b/samples/client/petstore/typescript-rxjs/builds/es6-target/apis/StoreApi.ts index 4b41b2501a..85dcd9aa56 100644 --- a/samples/client/petstore/typescript-rxjs/builds/es6-target/apis/StoreApi.ts +++ b/samples/client/petstore/typescript-rxjs/builds/es6-target/apis/StoreApi.ts @@ -70,7 +70,7 @@ export class StoreApi extends BaseAPI { }; /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Find purchase order by ID */ getOrderById({ orderId }: GetOrderByIdRequest): Observable diff --git a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/apis/StoreApi.ts b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/apis/StoreApi.ts index 4b41b2501a..85dcd9aa56 100644 --- a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/apis/StoreApi.ts +++ b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/apis/StoreApi.ts @@ -70,7 +70,7 @@ export class StoreApi extends BaseAPI { }; /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Find purchase order by ID */ getOrderById({ orderId }: GetOrderByIdRequest): Observable diff --git a/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/apis/StoreApi.ts b/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/apis/StoreApi.ts index fc5c271bc0..7d1a2bf2ca 100644 --- a/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/apis/StoreApi.ts +++ b/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/apis/StoreApi.ts @@ -74,7 +74,7 @@ export class StoreApi extends BaseAPI { }; /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Find purchase order by ID */ getOrderById({ orderId }: GetOrderByIdRequest): Observable diff --git a/samples/config/petstore/apache2/.openapi-generator-ignore b/samples/config/petstore/apache2/.openapi-generator-ignore index c5fa491b4c..deed424f8a 100644 --- a/samples/config/petstore/apache2/.openapi-generator-ignore +++ b/samples/config/petstore/apache2/.openapi-generator-ignore @@ -5,7 +5,7 @@ # The patterns follow closely to .gitignore or .dockerignore. # As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +# You can make changes and tell Swagger Codegen 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 (*): diff --git a/samples/config/petstore/graphql-schema/petstore/api/store_api.graphql b/samples/config/petstore/graphql-schema/petstore/api/store_api.graphql index e65b6520bb..091695d34e 100644 --- a/samples/config/petstore/graphql-schema/petstore/api/store_api.graphql +++ b/samples/config/petstore/graphql-schema/petstore/api/store_api.graphql @@ -29,7 +29,7 @@ type query { GetInventory(): Int! # Find purchase order by ID - # For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + # For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions # @param Int! orderId ID of pet that needs to be fetched # @return [Order] GetOrderById(orderId: Int!): Order diff --git a/samples/config/petstore/protobuf-schema/README.md b/samples/config/petstore/protobuf-schema/README.md index 1d3ea81c47..84401dcdc7 100644 --- a/samples/config/petstore/protobuf-schema/README.md +++ b/samples/config/petstore/protobuf-schema/README.md @@ -16,9 +16,9 @@ Below are some usage examples for Go and Ruby. For other languages, please refer ### Go ``` # assuming `protoc-gen-go` has been installed with `go get -u github.com/golang/protobuf/protoc-gen-go` -mkdir /var/tmp/go/ -protoc --go_out=/var/tmp/go/ services/* -protoc --go_out=/var/tmp/go/ models/* +mkdir /var/tmp/go/petstore +protoc --go_out=/var/tmp/go/petstore services/* +protoc --go_out=/var/tmp/go/petstore models/* ``` ### Ruby diff --git a/samples/documentation/asciidoc/index.adoc b/samples/documentation/asciidoc/index.adoc index bc9f84fa1f..22da016110 100644 --- a/samples/documentation/asciidoc/index.adoc +++ b/samples/documentation/asciidoc/index.adoc @@ -951,7 +951,7 @@ Find purchase order by ID ===== Description -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions // markup not found, no include::{specDir}store/order/\{orderId\}/GET/spec.adoc[opts=optional] diff --git a/samples/documentation/cwiki/confluence-markup.txt b/samples/documentation/cwiki/confluence-markup.txt index c895eeec35..286bce5061 100644 --- a/samples/documentation/cwiki/confluence-markup.txt +++ b/samples/documentation/cwiki/confluence-markup.txt @@ -536,7 +536,7 @@ h4. Responses h3. getOrderById {panel:title=getOrderById|borderStyle=solid|borderColor=#003b6f|titleBGColor=#003b6f|titleColor=#a6b8c7|bgColor=#ffffff} *Summary:* Find purchase order by ID - *Description:* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + *Description:* For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions || HttpMethod | {status:colour=Yellow|title=get|subtle=false} | || Protocol | {noformat:nopanel=true}http{noformat} | diff --git a/samples/documentation/dynamic-html/docs/assets/css/style.css b/samples/documentation/dynamic-html/docs/assets/css/style.css index b596c11a53..62aa260ee9 100644 --- a/samples/documentation/dynamic-html/docs/assets/css/style.css +++ b/samples/documentation/dynamic-html/docs/assets/css/style.css @@ -78,7 +78,7 @@ padding-bottom: 5px; } -.model-detail-popup .param-reqiured-true { +.model-detail-popup .param-required-true { font-family: monospace; font-weight: bold; clear: left; diff --git a/samples/documentation/dynamic-html/docs/operations/StoreApi.html b/samples/documentation/dynamic-html/docs/operations/StoreApi.html index cb880712d3..4d2e230e28 100644 --- a/samples/documentation/dynamic-html/docs/operations/StoreApi.html +++ b/samples/documentation/dynamic-html/docs/operations/StoreApi.html @@ -42,7 +42,7 @@

getOrderById


-

For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions

+

For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions

URL

http://petstore.swagger.io/v2/store/order/{orderId}

HTTP Method

diff --git a/samples/documentation/html/index.html b/samples/documentation/html/index.html index 2d744efa66..c037864803 100644 --- a/samples/documentation/html/index.html +++ b/samples/documentation/html/index.html @@ -847,7 +847,7 @@ font-style: italic; Up
get /store/order/{orderId}
Find purchase order by ID (getOrderById)
-
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
+
For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions

Path parameters

diff --git a/samples/documentation/html2/index.html b/samples/documentation/html2/index.html index a40148036c..936065f37c 100644 --- a/samples/documentation/html2/index.html +++ b/samples/documentation/html2/index.html @@ -5229,7 +5229,7 @@ pub fn main() {

-

For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions

+

For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions


/store/order/{orderId}
diff --git a/samples/documentation/markdown/Apis/StoreApi.md b/samples/documentation/markdown/Apis/StoreApi.md index 4797be5c51..580c02354d 100644 --- a/samples/documentation/markdown/Apis/StoreApi.md +++ b/samples/documentation/markdown/Apis/StoreApi.md @@ -67,7 +67,7 @@ This endpoint does not need any parameter. Find purchase order by ID - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Parameters diff --git a/samples/openapi3/client/3_0_3_unit_test/python/git_push.sh b/samples/openapi3/client/3_0_3_unit_test/python/git_push.sh index ced3be2b0c..200e975d21 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/git_push.sh +++ b/samples/openapi3/client/3_0_3_unit_test/python/git_push.sh @@ -1,7 +1,7 @@ #!/bin/sh # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ # -# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" git_user_id=$1 git_repo_id=$2 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_object_properties_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_object_properties_validation.py index 9b74a32cc9..d833889d0e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_object_properties_validation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_object_properties_validation.py @@ -20,6 +20,17 @@ class TestObjectPropertiesValidation(unittest.TestCase): """ObjectPropertiesValidation unit test stubs""" _configuration = configuration.Configuration() + def test_doesnt_invalidate_other_properties_passes(self): + # doesn't invalidate other properties + ObjectPropertiesValidation.from_openapi_data_oapg( + { + "quux": + [ + ], + }, + _configuration=self._configuration + ) + def test_ignores_arrays_passes(self): # ignores arrays ObjectPropertiesValidation.from_openapi_data_oapg( @@ -61,17 +72,6 @@ class TestObjectPropertiesValidation(unittest.TestCase): _configuration=self._configuration ) - def test_doesn_t_invalidate_other_properties_passes(self): - # doesn't invalidate other properties - ObjectPropertiesValidation.from_openapi_data_oapg( - { - "quux": - [ - ], - }, - _configuration=self._configuration - ) - def test_both_properties_invalid_is_invalid_fails(self): # both properties invalid is invalid with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_object_properties_validation_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_object_properties_validation_request_body/test_post.py index 67fe785a8e..adae606aa9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_object_properties_validation_request_body/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_object_properties_validation_request_body/test_post.py @@ -34,6 +34,40 @@ class TestRequestBodyPostObjectPropertiesValidationRequestBody(ApiTestMixin, uni response_status = 200 response_body = '' + def test_doesnt_invalidate_other_properties_passes(self): + content_type = 'application/json' + # doesn't invalidate other properties + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "quux": + [ + ], + } + ) + body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( + payload, + _configuration=self._configuration + ) + mock_request.return_value = self.response( + self.json_bytes(self.response_body), + status=self.response_status + ) + api_response = self.api.post( + body=body, + content_type=content_type + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/requestBody/postObjectPropertiesValidationRequestBody', + method='post'.upper(), + body=self.json_bytes(payload), + content_type=content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, schemas.Unset) + def test_ignores_arrays_passes(self): content_type = 'application/json' # ignores arrays @@ -150,40 +184,6 @@ class TestRequestBodyPostObjectPropertiesValidationRequestBody(ApiTestMixin, uni assert isinstance(api_response.response, urllib3.HTTPResponse) assert isinstance(api_response.body, schemas.Unset) - def test_doesn_t_invalidate_other_properties_passes(self): - content_type = 'application/json' - # doesn't invalidate other properties - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "quux": - [ - ], - } - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postObjectPropertiesValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - def test_both_properties_invalid_is_invalid_fails(self): content_type = 'application/json' # both properties invalid is invalid diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_object_properties_validation_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_object_properties_validation_response_body_for_content_types/test_post.py index 28b78c6816..e9064f7a8a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_object_properties_validation_response_body_for_content_types/test_post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_object_properties_validation_response_body_for_content_types/test_post.py @@ -33,6 +33,40 @@ class TestResponseBodyPostObjectPropertiesValidationResponseBodyForContentTypes( response_status = 200 + def test_doesnt_invalidate_other_properties_passes(self): + # doesn't invalidate other properties + accept_content_type = 'application/json' + + with patch.object(urllib3.PoolManager, 'request') as mock_request: + payload = ( + { + "quux": + [ + ], + } + ) + mock_request.return_value = self.response( + self.json_bytes(payload), + status=self.response_status + ) + api_response = self.api.post( + accept_content_types=(accept_content_type,) + ) + self.assert_pool_manager_request_called_with( + mock_request, + self._configuration.host + '/responseBody/postObjectPropertiesValidationResponseBodyForContentTypes', + method='post'.upper(), + accept_content_type=accept_content_type, + ) + + assert isinstance(api_response.response, urllib3.HTTPResponse) + assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) + deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( + payload, + _configuration=self._configuration + ) + assert api_response.body == deserialized_response_body + def test_ignores_arrays_passes(self): # ignores arrays accept_content_type = 'application/json' @@ -159,40 +193,6 @@ class TestResponseBodyPostObjectPropertiesValidationResponseBodyForContentTypes( ) assert api_response.body == deserialized_response_body - def test_doesn_t_invalidate_other_properties_passes(self): - # doesn't invalidate other properties - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "quux": - [ - ], - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postObjectPropertiesValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - def test_both_properties_invalid_is_invalid_fails(self): # both properties invalid is invalid accept_content_type = 'application/json' diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/models/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/models/__init__.py index 3dd512a4cd..aac639450c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/models/__init__.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/models/__init__.py @@ -6,7 +6,7 @@ # if you have many models here with many references from one model to another this may # raise a RecursionError # to avoid this, import only the models that you directly need like: -# from from unit_test_api.model.pet import Pet +# from unit_test_api.model.pet import Pet # or import this package, but before doing it, use: # import sys # sys.setrecursionlimit(n) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/schemas.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/schemas.py index c9fe4b6fec..e76f2b13dc 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/schemas.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/schemas.py @@ -385,7 +385,7 @@ class Schema: _validate_oapg returns a key value pair where the key is the path to the item, and the value will be the required manufactured class made out of the matching schemas - 2. value is an instance of the the correct schema type + 2. value is an instance of the correct schema type the value is NOT validated by _validate_oapg, _validate_oapg only checks that the instance is of the correct schema type for this value, _validate_oapg does NOT return an entry for it in _path_to_schemas and in list/dict _get_items_oapg,_get_properties_oapg the value will be directly assigned @@ -868,7 +868,7 @@ class ValidatorBase: schema_keyword not in configuration._disabled_client_side_validations) @staticmethod - def _raise_validation_errror_message_oapg(value, constraint_msg, constraint_value, path_to_item, additional_txt=""): + def _raise_validation_error_message_oapg(value, constraint_msg, constraint_value, path_to_item, additional_txt=""): raise ApiValueError( "Invalid value `{value}`, {constraint_msg} `{constraint_value}`{additional_txt} at {path_to_item}".format( value=value, @@ -963,7 +963,7 @@ class StrBase(ValidatorBase): if (cls._is_json_validation_enabled_oapg('maxLength', validation_metadata.configuration) and hasattr(cls.MetaOapg, 'max_length') and len(arg) > cls.MetaOapg.max_length): - cls._raise_validation_errror_message_oapg( + cls._raise_validation_error_message_oapg( value=arg, constraint_msg="length must be less than or equal to", constraint_value=cls.MetaOapg.max_length, @@ -973,7 +973,7 @@ class StrBase(ValidatorBase): if (cls._is_json_validation_enabled_oapg('minLength', validation_metadata.configuration) and hasattr(cls.MetaOapg, 'min_length') and len(arg) < cls.MetaOapg.min_length): - cls._raise_validation_errror_message_oapg( + cls._raise_validation_error_message_oapg( value=arg, constraint_msg="length must be greater than or equal to", constraint_value=cls.MetaOapg.min_length, @@ -988,14 +988,14 @@ class StrBase(ValidatorBase): if flags != 0: # Don't print the regex flags if the flags are not # specified in the OAS document. - cls._raise_validation_errror_message_oapg( + cls._raise_validation_error_message_oapg( value=arg, constraint_msg="must match regular expression", constraint_value=regex_dict['pattern'], path_to_item=validation_metadata.path_to_item, additional_txt=" with flags=`{}`".format(flags) ) - cls._raise_validation_errror_message_oapg( + cls._raise_validation_error_message_oapg( value=arg, constraint_msg="must match regular expression", constraint_value=regex_dict['pattern'], @@ -1211,7 +1211,7 @@ class NumberBase(ValidatorBase): return self._as_float except AttributeError: if self.as_tuple().exponent >= 0: - raise ApiValueError(f'{self} is not an float') + raise ApiValueError(f'{self} is not a float') self._as_float = float(self) return self._as_float @@ -1228,7 +1228,7 @@ class NumberBase(ValidatorBase): multiple_of_value = cls.MetaOapg.multiple_of if (not (float(arg) / multiple_of_value).is_integer()): # Note 'multipleOf' will be as good as the floating point arithmetic. - cls._raise_validation_errror_message_oapg( + cls._raise_validation_error_message_oapg( value=arg, constraint_msg="value must be a multiple of", constraint_value=multiple_of_value, @@ -1249,7 +1249,7 @@ class NumberBase(ValidatorBase): if (cls._is_json_validation_enabled_oapg('exclusiveMaximum', validation_metadata.configuration) and hasattr(cls.MetaOapg, 'exclusive_maximum') and arg >= cls.MetaOapg.exclusive_maximum): - cls._raise_validation_errror_message_oapg( + cls._raise_validation_error_message_oapg( value=arg, constraint_msg="must be a value less than", constraint_value=cls.MetaOapg.exclusive_maximum, @@ -1259,7 +1259,7 @@ class NumberBase(ValidatorBase): if (cls._is_json_validation_enabled_oapg('maximum', validation_metadata.configuration) and hasattr(cls.MetaOapg, 'inclusive_maximum') and arg > cls.MetaOapg.inclusive_maximum): - cls._raise_validation_errror_message_oapg( + cls._raise_validation_error_message_oapg( value=arg, constraint_msg="must be a value less than or equal to", constraint_value=cls.MetaOapg.inclusive_maximum, @@ -1269,7 +1269,7 @@ class NumberBase(ValidatorBase): if (cls._is_json_validation_enabled_oapg('exclusiveMinimum', validation_metadata.configuration) and hasattr(cls.MetaOapg, 'exclusive_minimum') and arg <= cls.MetaOapg.exclusive_minimum): - cls._raise_validation_errror_message_oapg( + cls._raise_validation_error_message_oapg( value=arg, constraint_msg="must be a value greater than", constraint_value=cls.MetaOapg.exclusive_maximum, @@ -1279,7 +1279,7 @@ class NumberBase(ValidatorBase): if (cls._is_json_validation_enabled_oapg('minimum', validation_metadata.configuration) and hasattr(cls.MetaOapg, 'inclusive_minimum') and arg < cls.MetaOapg.inclusive_minimum): - cls._raise_validation_errror_message_oapg( + cls._raise_validation_error_message_oapg( value=arg, constraint_msg="must be a value greater than or equal to", constraint_value=cls.MetaOapg.inclusive_minimum, @@ -1347,7 +1347,7 @@ class ListBase(ValidatorBase): if (cls._is_json_validation_enabled_oapg('maxItems', validation_metadata.configuration) and hasattr(cls.MetaOapg, 'max_items') and len(arg) > cls.MetaOapg.max_items): - cls._raise_validation_errror_message_oapg( + cls._raise_validation_error_message_oapg( value=arg, constraint_msg="number of items must be less than or equal to", constraint_value=cls.MetaOapg.max_items, @@ -1357,7 +1357,7 @@ class ListBase(ValidatorBase): if (cls._is_json_validation_enabled_oapg('minItems', validation_metadata.configuration) and hasattr(cls.MetaOapg, 'min_items') and len(arg) < cls.MetaOapg.min_items): - cls._raise_validation_errror_message_oapg( + cls._raise_validation_error_message_oapg( value=arg, constraint_msg="number of items must be greater than or equal to", constraint_value=cls.MetaOapg.min_items, @@ -1368,7 +1368,7 @@ class ListBase(ValidatorBase): hasattr(cls.MetaOapg, 'unique_items') and cls.MetaOapg.unique_items and arg): unique_items = set(arg) if len(arg) > len(unique_items): - cls._raise_validation_errror_message_oapg( + cls._raise_validation_error_message_oapg( value=arg, constraint_msg="duplicate items were found, and the tuple must not contain duplicates because", constraint_value='unique_items==True', @@ -1611,7 +1611,7 @@ class DictBase(Discriminable, ValidatorBase): if (cls._is_json_validation_enabled_oapg('maxProperties', validation_metadata.configuration) and hasattr(cls.MetaOapg, 'max_properties') and len(arg) > cls.MetaOapg.max_properties): - cls._raise_validation_errror_message_oapg( + cls._raise_validation_error_message_oapg( value=arg, constraint_msg="number of properties must be less than or equal to", constraint_value=cls.MetaOapg.max_properties, @@ -1621,7 +1621,7 @@ class DictBase(Discriminable, ValidatorBase): if (cls._is_json_validation_enabled_oapg('minProperties', validation_metadata.configuration) and hasattr(cls.MetaOapg, 'min_properties') and len(arg) < cls.MetaOapg.min_properties): - cls._raise_validation_errror_message_oapg( + cls._raise_validation_error_message_oapg( value=arg, constraint_msg="number of properties must be greater than or equal to", constraint_value=cls.MetaOapg.min_properties, diff --git a/samples/openapi3/client/elm/src/Api/Data.elm b/samples/openapi3/client/elm/src/Api/Data.elm index df7113ce37..200e64e42c 100644 --- a/samples/openapi3/client/elm/src/Api/Data.elm +++ b/samples/openapi3/client/elm/src/Api/Data.elm @@ -91,7 +91,7 @@ type alias Absent = type alias Array = { array : List (String) , arrayOfArray : List (List (String)) - , arrayOfPrimitve : Maybe (List (Primitive)) + , arrayOfPrimitive : Maybe (List (Primitive)) , arrayOfEnum : Maybe (List (Enum)) } @@ -297,7 +297,7 @@ encodeArrayPairs model = pairs = [ encode "array" (Json.Encode.list Json.Encode.string) model.array , encode "arrayOfArray" (Json.Encode.list (Json.Encode.list Json.Encode.string)) model.arrayOfArray - , maybeEncode "arrayOfPrimitve" (Json.Encode.list encodePrimitive) model.arrayOfPrimitve + , maybeEncode "arrayOfPrimitive" (Json.Encode.list encodePrimitive) model.arrayOfPrimitive , maybeEncode "arrayOfEnum" (Json.Encode.list encodeEnum) model.arrayOfEnum ] in @@ -646,7 +646,7 @@ arrayDecoder = Json.Decode.succeed Array |> decode "array" (Json.Decode.list Json.Decode.string) |> decode "arrayOfArray" (Json.Decode.list (Json.Decode.list Json.Decode.string)) - |> maybeDecode "arrayOfPrimitve" (Json.Decode.list primitiveDecoder) Nothing + |> maybeDecode "arrayOfPrimitive" (Json.Decode.list primitiveDecoder) Nothing |> maybeDecode "arrayOfEnum" (Json.Decode.list enumDecoder) Nothing diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/python-prior/x_auth_id_alias/models/__init__.py b/samples/openapi3/client/extensions/x-auth-id-alias/python-prior/x_auth_id_alias/models/__init__.py index a3ebc1deda..a7f55b9759 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/python-prior/x_auth_id_alias/models/__init__.py +++ b/samples/openapi3/client/extensions/x-auth-id-alias/python-prior/x_auth_id_alias/models/__init__.py @@ -4,7 +4,7 @@ # if you have many models here with many references from one model to another this may # raise a RecursionError # to avoid this, import only the models that you directly need like: -# from from x_auth_id_alias.model.pet import Pet +# from x_auth_id_alias.model.pet import Pet # or import this package, but before doing it, use: # import sys # sys.setrecursionlimit(n) diff --git a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/models/__init__.py b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/models/__init__.py index 0cb2976e7c..c69293a5b5 100644 --- a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/models/__init__.py +++ b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/models/__init__.py @@ -6,7 +6,7 @@ # if you have many models here with many references from one model to another this may # raise a RecursionError # to avoid this, import only the models that you directly need like: -# from from dynamic_servers.model.pet import Pet +# from dynamic_servers.model.pet import Pet # or import this package, but before doing it, use: # import sys # sys.setrecursionlimit(n) diff --git a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/schemas.py b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/schemas.py index 3678a82945..c0641412cb 100644 --- a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/schemas.py +++ b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/schemas.py @@ -385,7 +385,7 @@ class Schema: _validate_oapg returns a key value pair where the key is the path to the item, and the value will be the required manufactured class made out of the matching schemas - 2. value is an instance of the the correct schema type + 2. value is an instance of the correct schema type the value is NOT validated by _validate_oapg, _validate_oapg only checks that the instance is of the correct schema type for this value, _validate_oapg does NOT return an entry for it in _path_to_schemas and in list/dict _get_items_oapg,_get_properties_oapg the value will be directly assigned @@ -868,7 +868,7 @@ class ValidatorBase: schema_keyword not in configuration._disabled_client_side_validations) @staticmethod - def _raise_validation_errror_message_oapg(value, constraint_msg, constraint_value, path_to_item, additional_txt=""): + def _raise_validation_error_message_oapg(value, constraint_msg, constraint_value, path_to_item, additional_txt=""): raise ApiValueError( "Invalid value `{value}`, {constraint_msg} `{constraint_value}`{additional_txt} at {path_to_item}".format( value=value, @@ -963,7 +963,7 @@ class StrBase(ValidatorBase): if (cls._is_json_validation_enabled_oapg('maxLength', validation_metadata.configuration) and hasattr(cls.MetaOapg, 'max_length') and len(arg) > cls.MetaOapg.max_length): - cls._raise_validation_errror_message_oapg( + cls._raise_validation_error_message_oapg( value=arg, constraint_msg="length must be less than or equal to", constraint_value=cls.MetaOapg.max_length, @@ -973,7 +973,7 @@ class StrBase(ValidatorBase): if (cls._is_json_validation_enabled_oapg('minLength', validation_metadata.configuration) and hasattr(cls.MetaOapg, 'min_length') and len(arg) < cls.MetaOapg.min_length): - cls._raise_validation_errror_message_oapg( + cls._raise_validation_error_message_oapg( value=arg, constraint_msg="length must be greater than or equal to", constraint_value=cls.MetaOapg.min_length, @@ -988,14 +988,14 @@ class StrBase(ValidatorBase): if flags != 0: # Don't print the regex flags if the flags are not # specified in the OAS document. - cls._raise_validation_errror_message_oapg( + cls._raise_validation_error_message_oapg( value=arg, constraint_msg="must match regular expression", constraint_value=regex_dict['pattern'], path_to_item=validation_metadata.path_to_item, additional_txt=" with flags=`{}`".format(flags) ) - cls._raise_validation_errror_message_oapg( + cls._raise_validation_error_message_oapg( value=arg, constraint_msg="must match regular expression", constraint_value=regex_dict['pattern'], @@ -1211,7 +1211,7 @@ class NumberBase(ValidatorBase): return self._as_float except AttributeError: if self.as_tuple().exponent >= 0: - raise ApiValueError(f'{self} is not an float') + raise ApiValueError(f'{self} is not a float') self._as_float = float(self) return self._as_float @@ -1228,7 +1228,7 @@ class NumberBase(ValidatorBase): multiple_of_value = cls.MetaOapg.multiple_of if (not (float(arg) / multiple_of_value).is_integer()): # Note 'multipleOf' will be as good as the floating point arithmetic. - cls._raise_validation_errror_message_oapg( + cls._raise_validation_error_message_oapg( value=arg, constraint_msg="value must be a multiple of", constraint_value=multiple_of_value, @@ -1249,7 +1249,7 @@ class NumberBase(ValidatorBase): if (cls._is_json_validation_enabled_oapg('exclusiveMaximum', validation_metadata.configuration) and hasattr(cls.MetaOapg, 'exclusive_maximum') and arg >= cls.MetaOapg.exclusive_maximum): - cls._raise_validation_errror_message_oapg( + cls._raise_validation_error_message_oapg( value=arg, constraint_msg="must be a value less than", constraint_value=cls.MetaOapg.exclusive_maximum, @@ -1259,7 +1259,7 @@ class NumberBase(ValidatorBase): if (cls._is_json_validation_enabled_oapg('maximum', validation_metadata.configuration) and hasattr(cls.MetaOapg, 'inclusive_maximum') and arg > cls.MetaOapg.inclusive_maximum): - cls._raise_validation_errror_message_oapg( + cls._raise_validation_error_message_oapg( value=arg, constraint_msg="must be a value less than or equal to", constraint_value=cls.MetaOapg.inclusive_maximum, @@ -1269,7 +1269,7 @@ class NumberBase(ValidatorBase): if (cls._is_json_validation_enabled_oapg('exclusiveMinimum', validation_metadata.configuration) and hasattr(cls.MetaOapg, 'exclusive_minimum') and arg <= cls.MetaOapg.exclusive_minimum): - cls._raise_validation_errror_message_oapg( + cls._raise_validation_error_message_oapg( value=arg, constraint_msg="must be a value greater than", constraint_value=cls.MetaOapg.exclusive_maximum, @@ -1279,7 +1279,7 @@ class NumberBase(ValidatorBase): if (cls._is_json_validation_enabled_oapg('minimum', validation_metadata.configuration) and hasattr(cls.MetaOapg, 'inclusive_minimum') and arg < cls.MetaOapg.inclusive_minimum): - cls._raise_validation_errror_message_oapg( + cls._raise_validation_error_message_oapg( value=arg, constraint_msg="must be a value greater than or equal to", constraint_value=cls.MetaOapg.inclusive_minimum, @@ -1347,7 +1347,7 @@ class ListBase(ValidatorBase): if (cls._is_json_validation_enabled_oapg('maxItems', validation_metadata.configuration) and hasattr(cls.MetaOapg, 'max_items') and len(arg) > cls.MetaOapg.max_items): - cls._raise_validation_errror_message_oapg( + cls._raise_validation_error_message_oapg( value=arg, constraint_msg="number of items must be less than or equal to", constraint_value=cls.MetaOapg.max_items, @@ -1357,7 +1357,7 @@ class ListBase(ValidatorBase): if (cls._is_json_validation_enabled_oapg('minItems', validation_metadata.configuration) and hasattr(cls.MetaOapg, 'min_items') and len(arg) < cls.MetaOapg.min_items): - cls._raise_validation_errror_message_oapg( + cls._raise_validation_error_message_oapg( value=arg, constraint_msg="number of items must be greater than or equal to", constraint_value=cls.MetaOapg.min_items, @@ -1368,7 +1368,7 @@ class ListBase(ValidatorBase): hasattr(cls.MetaOapg, 'unique_items') and cls.MetaOapg.unique_items and arg): unique_items = set(arg) if len(arg) > len(unique_items): - cls._raise_validation_errror_message_oapg( + cls._raise_validation_error_message_oapg( value=arg, constraint_msg="duplicate items were found, and the tuple must not contain duplicates because", constraint_value='unique_items==True', @@ -1611,7 +1611,7 @@ class DictBase(Discriminable, ValidatorBase): if (cls._is_json_validation_enabled_oapg('maxProperties', validation_metadata.configuration) and hasattr(cls.MetaOapg, 'max_properties') and len(arg) > cls.MetaOapg.max_properties): - cls._raise_validation_errror_message_oapg( + cls._raise_validation_error_message_oapg( value=arg, constraint_msg="number of properties must be less than or equal to", constraint_value=cls.MetaOapg.max_properties, @@ -1621,7 +1621,7 @@ class DictBase(Discriminable, ValidatorBase): if (cls._is_json_validation_enabled_oapg('minProperties', validation_metadata.configuration) and hasattr(cls.MetaOapg, 'min_properties') and len(arg) < cls.MetaOapg.min_properties): - cls._raise_validation_errror_message_oapg( + cls._raise_validation_error_message_oapg( value=arg, constraint_msg="number of properties must be greater than or equal to", constraint_value=cls.MetaOapg.min_properties, diff --git a/samples/openapi3/client/features/dynamic-servers/python/git_push.sh b/samples/openapi3/client/features/dynamic-servers/python/git_push.sh index ced3be2b0c..200e975d21 100644 --- a/samples/openapi3/client/features/dynamic-servers/python/git_push.sh +++ b/samples/openapi3/client/features/dynamic-servers/python/git_push.sh @@ -1,7 +1,7 @@ #!/bin/sh # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ # -# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" git_user_id=$1 git_repo_id=$2 diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/addressable.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/addressable.dart index e0311b6595..0ab0936d56 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/addressable.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/addressable.dart @@ -8,7 +8,7 @@ import 'package:built_value/serializer.dart'; part 'addressable.g.dart'; -/// Base schema for adressable entities +/// Base schema for addressable entities /// /// Properties: /// * [href] - Hyperlink reference diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/StoreApi.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/StoreApi.md index a25dc85408..920e5a8d7b 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/StoreApi.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/StoreApi.md @@ -105,7 +105,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```dart diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/store_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/store_api.dart index 5712d8c03c..a2abc20e3b 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/store_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/store_api.dart @@ -139,7 +139,7 @@ _responseData = deserialize, int>(_response.data!, 'Map 10. Other values will generated exceptions + // For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions // //Future getOrderById(int orderId) async test('test getOrderById', () async { diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/StoreApi.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/StoreApi.md index 6094dcc401..b46dc95a5e 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/StoreApi.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/StoreApi.md @@ -105,7 +105,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```dart diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/store_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/store_api.dart index 93d5ccbe97..f3e847156e 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/store_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/store_api.dart @@ -145,7 +145,7 @@ class StoreApi { } /// Find purchase order by ID - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Parameters: /// * [orderId] - ID of pet that needs to be fetched diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/store_api_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/store_api_test.dart index b3afe7ca1e..77b3d9f002 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/store_api_test.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/test/store_api_test.dart @@ -27,7 +27,7 @@ void main() { // Find purchase order by ID // - // For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + // For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions // //Future getOrderById(int orderId) async test('test getOrderById', () async { diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/doc/StoreApi.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib/doc/StoreApi.md index 60f1f4d6f2..e523086176 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/doc/StoreApi.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/doc/StoreApi.md @@ -105,7 +105,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```dart diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api/store_api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api/store_api.dart index db1ac1f010..3378d2f635 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api/store_api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api/store_api.dart @@ -117,7 +117,7 @@ class StoreApi { /// Find purchase order by ID /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Note: This method returns the HTTP [Response]. /// @@ -153,7 +153,7 @@ class StoreApi { /// Find purchase order by ID /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Parameters: /// diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/test/store_api_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/test/store_api_test.dart index 351ef26828..4d6825e2cf 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/test/store_api_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/test/store_api_test.dart @@ -38,7 +38,7 @@ void main() { // Find purchase order by ID // - // For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + // For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions // //Future getOrderById(int orderId) async test('test getOrderById', () async { diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/StoreApi.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/StoreApi.md index 925f08c72d..d91bad0516 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/StoreApi.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/StoreApi.md @@ -105,7 +105,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```dart diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/store_api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/store_api.dart index 68c1c9fdcc..1d666113cf 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/store_api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/store_api.dart @@ -117,7 +117,7 @@ class StoreApi { /// Find purchase order by ID /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Note: This method returns the HTTP [Response]. /// @@ -153,7 +153,7 @@ class StoreApi { /// Find purchase order by ID /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// Parameters: /// diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/store_api_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/store_api_test.dart index 351ef26828..4d6825e2cf 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/store_api_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/test/store_api_test.dart @@ -38,7 +38,7 @@ void main() { // Find purchase order by ID // - // For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + // For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions // //Future getOrderById(int orderId) async test('test getOrderById', () async { diff --git a/samples/openapi3/client/petstore/elm/src/Request/Store.elm b/samples/openapi3/client/petstore/elm/src/Request/Store.elm index e2a40d4193..fca396829b 100644 --- a/samples/openapi3/client/petstore/elm/src/Request/Store.elm +++ b/samples/openapi3/client/petstore/elm/src/Request/Store.elm @@ -76,7 +76,7 @@ getInventory params = } -{-| For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +{-| For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions -} getOrderById : { onSend : Result Http.Error Order_ -> msg diff --git a/samples/openapi3/client/petstore/go/go-petstore/api/openapi.yaml b/samples/openapi3/client/petstore/go/go-petstore/api/openapi.yaml index 71097efe09..8ce9c146b7 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/api/openapi.yaml +++ b/samples/openapi3/client/petstore/go/go-petstore/api/openapi.yaml @@ -381,7 +381,7 @@ paths: - store get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched @@ -666,13 +666,13 @@ paths: style: form responses: "400": - description: Someting wrong + description: Something wrong "5XX": content: applicatino/json: schema: $ref: '#/components/schemas/OuterNumber' - description: Someting wrong + description: Something wrong security: - bearer_test: [] summary: Fake endpoint to test group parameters (optional) diff --git a/samples/openapi3/client/petstore/go/go-petstore/api_store.go b/samples/openapi3/client/petstore/go/go-petstore/api_store.go index a331652386..87abefe636 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/api_store.go +++ b/samples/openapi3/client/petstore/go/go-petstore/api_store.go @@ -53,7 +53,7 @@ type StoreApi interface { /* GetOrderById Find purchase order by ID - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param orderId ID of pet that needs to be fetched @@ -301,7 +301,7 @@ func (r ApiGetOrderByIdRequest) Execute() (*Order, *http.Response, error) { /* GetOrderById Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param orderId ID of pet that needs to be fetched diff --git a/samples/openapi3/client/petstore/go/http_signature_test.go b/samples/openapi3/client/petstore/go/http_signature_test.go index 492de97b52..c1118e9563 100644 --- a/samples/openapi3/client/petstore/go/http_signature_test.go +++ b/samples/openapi3/client/petstore/go/http_signature_test.go @@ -157,7 +157,7 @@ func writeRandomTestEcdsaPemKey(t *testing.T, filePath string) { // TestHttpSignaturePrivateKeys creates private keys of various sizes, serialization format, // clear-text and password encrypted. -// Test unmarshaling of the private key. +// Test unmarshalling of the private key. func TestHttpSignaturePrivateKeys(t *testing.T) { var err error var dir string diff --git a/samples/openapi3/client/petstore/go/model_test.go b/samples/openapi3/client/petstore/go/model_test.go index 0d7035eec8..108a961eb1 100644 --- a/samples/openapi3/client/petstore/go/model_test.go +++ b/samples/openapi3/client/petstore/go/model_test.go @@ -17,7 +17,7 @@ func TestBanana(t *testing.T) { newBanana.LengthCm = &lengthCm2 assert.Equal(newBanana.LengthCm, &lengthCm2, "Banana LengthCm should be equal") - // test additioanl properties + // test additional properties jsonBanana := `{"fruits":["apple","peach"],"lengthCm":3.1}` jsonMap := make(map[string]interface{}) json.Unmarshal([]byte(jsonBanana), &jsonMap) @@ -26,7 +26,7 @@ func TestBanana(t *testing.T) { lengthCm3 := float32(3.1) json.Unmarshal([]byte(jsonBanana), &newBanana2) assert.Equal(newBanana2.LengthCm, &lengthCm3, "Banana2 LengthCm should be equal") - assert.Equal(newBanana2.AdditionalProperties["fruits"], jsonMap["fruits"], "Banana2 AdditonalProperties should be equal") + assert.Equal(newBanana2.AdditionalProperties["fruits"], jsonMap["fruits"], "Banana2 AdditionalProperties should be equal") newBanana2Json, _ := json.Marshal(newBanana2) assert.Equal(string(newBanana2Json), jsonBanana, "Banana2 JSON string should be equal") diff --git a/samples/openapi3/client/petstore/go/user_api_test.go b/samples/openapi3/client/petstore/go/user_api_test.go index 757ac0fa97..10bebdf7ac 100644 --- a/samples/openapi3/client/petstore/go/user_api_test.go +++ b/samples/openapi3/client/petstore/go/user_api_test.go @@ -132,7 +132,7 @@ func TestUpdateUser(t *testing.T) { t.Log(apiResponse) } - //verify changings are correct + //verify changes are correct resp, apiResponse, err := client.UserApi.GetUserByName(context.Background(), "gopher").Execute() if err != nil { t.Fatalf("Error while getting user by id: %v", err) diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-swagger1/api/openapi.yaml b/samples/openapi3/client/petstore/java/jersey2-java8-swagger1/api/openapi.yaml index 2d7ea625b4..de4b48c1c4 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8-swagger1/api/openapi.yaml +++ b/samples/openapi3/client/petstore/java/jersey2-java8-swagger1/api/openapi.yaml @@ -364,7 +364,7 @@ paths: x-accepts: application/json get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-swagger1/docs/StoreApi.md b/samples/openapi3/client/petstore/java/jersey2-java8-swagger1/docs/StoreApi.md index 22a4bf0ac3..a88a09d61e 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8-swagger1/docs/StoreApi.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8-swagger1/docs/StoreApi.md @@ -150,7 +150,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-swagger1/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/openapi3/client/petstore/java/jersey2-java8-swagger1/src/main/java/org/openapitools/client/api/StoreApi.java index b3a8544fb0..612bf71da3 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8-swagger1/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8-swagger1/src/main/java/org/openapitools/client/api/StoreApi.java @@ -174,7 +174,7 @@ public class StoreApi { } /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched (required) * @return Order * @throws ApiException if fails to make API call @@ -192,7 +192,7 @@ public class StoreApi { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched (required) * @return ApiResponse<Order> * @throws ApiException if fails to make API call diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-swagger1/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/openapi3/client/petstore/java/jersey2-java8-swagger1/src/test/java/org/openapitools/client/api/StoreApiTest.java index 4f76041a94..96b759211e 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8-swagger1/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8-swagger1/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -63,7 +63,7 @@ public class StoreApiTest { /** * Find purchase order by ID * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @throws ApiException if the Api call fails */ diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/api/openapi.yaml b/samples/openapi3/client/petstore/java/jersey2-java8/api/openapi.yaml index bd4e3fa22b..3e2a497d7a 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/api/openapi.yaml +++ b/samples/openapi3/client/petstore/java/jersey2-java8/api/openapi.yaml @@ -386,7 +386,7 @@ paths: x-accepts: application/json get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched @@ -686,7 +686,7 @@ paths: style: form responses: "400": - description: Someting wrong + description: Something wrong security: - bearer_test: [] summary: Fake endpoint to test group parameters (optional) 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 00365edeae..0663bb791e 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/FakeApi.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/FakeApi.md @@ -861,7 +861,7 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **400** | Someting wrong | - | +| **400** | Something wrong | - | ## testInlineAdditionalProperties diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/StoreApi.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/StoreApi.md index a3cbc7ec05..6eab555ee0 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/StoreApi.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/StoreApi.md @@ -150,7 +150,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example 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 129e896a7a..5b555dab32 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 @@ -982,7 +982,7 @@ if (booleanGroup != null) * @http.response.details - +
Status Code Description Response Headers
400 Someting wrong -
400 Something wrong -
*/ @@ -998,7 +998,7 @@ if (booleanGroup != null) * @http.response.details - +
Status Code Description Response Headers
400 Someting wrong -
400 Something wrong -
*/ diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/StoreApi.java index d0b86d18a2..ae83b81804 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/StoreApi.java @@ -174,7 +174,7 @@ public class StoreApi { } /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched (required) * @return Order * @throws ApiException if fails to make API call @@ -192,7 +192,7 @@ public class StoreApi { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched (required) * @return ApiResponse<Order> * @throws ApiException if fails to make API call diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/JSONComposedSchemaTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/JSONComposedSchemaTest.java index 1834c34b06..7b58065953 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/JSONComposedSchemaTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/JSONComposedSchemaTest.java @@ -90,7 +90,7 @@ public class JSONComposedSchemaTest { assertTrue(o.getActualInstance() instanceof AppleReq); BananaReq inst2 = o.getBananaReq(); // should throw ClassCastException }); - // comment out below as the erorr message can be different due to JDK versions + // comment out below as the error message can be different due to JDK versions // org.opentest4j.AssertionFailedError: expected: but was: //Assertions.assertEquals("class org.openapitools.client.model.AppleReq cannot be cast to class org.openapitools.client.model.BananaReq (org.openapitools.client.model.AppleReq and org.openapitools.client.model.BananaReq are in unnamed module of loader 'app')", thrown.getMessage()); Assertions.assertNotNull(thrown); @@ -141,7 +141,7 @@ public class JSONComposedSchemaTest { }); assertTrue(exception.getMessage().contains("Failed deserialization for FruitReq: 2 classes match result")); // TODO: add a similar unit test where the oneOf child schemas have required properties. - // If the implementation is correct, the unmarshaling should take the "required" keyword + // If the implementation is correct, the unmarshalling should take the "required" keyword // into consideration, which it is not doing currently. } { @@ -232,7 +232,7 @@ public class JSONComposedSchemaTest { @Test public void testOneOfMultipleDiscriminators() throws Exception { // 'shapeType' is a discriminator for the 'Shape' model and - // 'triangleType' is a discriminator forr the 'Triangle' model. + // 'triangleType' is a discriminator for the 'Triangle' model. String str = "{ \"shapeType\": \"Triangle\", \"triangleType\": \"EquilateralTriangle\" }"; // We should be able to deserialize a equilateral triangle into a EquilateralTriangle class. diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/StoreApiTest.java index 38f008c16c..f609a37016 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -63,7 +63,7 @@ public class StoreApiTest { /** * Find purchase order by ID * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @throws ApiException if the Api call fails */ diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/api/FakeApi.java b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/api/FakeApi.java index de1af3fa9f..2f105b2b40 100644 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/api/FakeApi.java @@ -167,7 +167,7 @@ public interface FakeApi { @ApiOperation(value = "Fake endpoint to test group parameters (optional)", tags={ }) @ApiResponses(value = { - @ApiResponse(code = 400, message = "Someting wrong") }) + @ApiResponse(code = 400, message = "Something wrong") }) public void testGroupParameters(@QueryParam("required_string_group") Integer requiredStringGroup, @HeaderParam("required_boolean_group") Boolean requiredBooleanGroup, @QueryParam("required_int64_group") Long requiredInt64Group, @QueryParam("string_group") Integer stringGroup, @HeaderParam("boolean_group") Boolean booleanGroup, @QueryParam("int64_group") Long int64Group); /** diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/api/StoreApi.java index e2f31aa5ae..06afe6cc26 100644 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/gen/java/org/openapitools/api/StoreApi.java @@ -58,7 +58,7 @@ public interface StoreApi { /** * Find purchase order by ID * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * */ @GET diff --git a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/test/java/org/openapitools/api/StoreApiTest.java b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/test/java/org/openapitools/api/StoreApiTest.java index 1d11fa63e2..b43b7c5b71 100644 --- a/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/test/java/org/openapitools/api/StoreApiTest.java +++ b/samples/openapi3/client/petstore/jaxrs-cxf-client-jackson-nullable/src/test/java/org/openapitools/api/StoreApiTest.java @@ -97,7 +97,7 @@ public class StoreApiTest { /** * Find purchase order by ID * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @throws ApiException * if the Api call fails diff --git a/samples/openapi3/client/petstore/kotlin-deprecated/docs/StoreApi.md b/samples/openapi3/client/petstore/kotlin-deprecated/docs/StoreApi.md index bfe58c062c..d2c01ffc5f 100644 --- a/samples/openapi3/client/petstore/kotlin-deprecated/docs/StoreApi.md +++ b/samples/openapi3/client/petstore/kotlin-deprecated/docs/StoreApi.md @@ -108,7 +108,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/openapi3/client/petstore/kotlin-deprecated/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/openapi3/client/petstore/kotlin-deprecated/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index a444fb2671..ac0e2c7d00 100644 --- a/samples/openapi3/client/petstore/kotlin-deprecated/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/openapi3/client/petstore/kotlin-deprecated/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -115,7 +115,7 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched * @return Order * @throws UnsupportedOperationException If the API returns an informational or redirection response diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/docs/StoreApi.md b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/docs/StoreApi.md index 426b7c2695..a0bef3ca19 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/docs/StoreApi.md +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/docs/StoreApi.md @@ -89,7 +89,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/apis/FakeApi.kt b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/apis/FakeApi.kt index 0164cd8f1a..70b21c8ac0 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/apis/FakeApi.kt +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/apis/FakeApi.kt @@ -177,7 +177,7 @@ interface FakeApi { * Fake endpoint to test group parameters (optional) * Fake endpoint to test group parameters (optional) * Responses: - * - 400: Someting wrong + * - 400: Something wrong * * @param requiredStringGroup Required String in group parameters * @param requiredBooleanGroup Required Boolean in group parameters diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index 13b1b96416..278e348887 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -34,7 +34,7 @@ interface StoreApi { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Responses: * - 200: successful operation * - 400: Invalid ID supplied diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/docs/StoreApi.md b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/docs/StoreApi.md index af9cc98c26..6679986a80 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/docs/StoreApi.md +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/docs/StoreApi.md @@ -85,7 +85,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/apis/FakeApi.kt b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/apis/FakeApi.kt index 3b12c1e6fc..dc48e24db4 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/apis/FakeApi.kt +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/apis/FakeApi.kt @@ -177,7 +177,7 @@ interface FakeApi { * Fake endpoint to test group parameters (optional) * Fake endpoint to test group parameters (optional) * Responses: - * - 400: Someting wrong + * - 400: Something wrong * * @param requiredStringGroup Required String in group parameters * @param requiredBooleanGroup Required Boolean in group parameters diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index 5b2aabc8fd..743fcc8494 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -34,7 +34,7 @@ interface StoreApi { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Responses: * - 200: successful operation * - 400: Invalid ID supplied diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/docs/StoreApi.md b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/docs/StoreApi.md index af9cc98c26..6679986a80 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/docs/StoreApi.md +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/docs/StoreApi.md @@ -85,7 +85,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/apis/FakeApi.kt b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/apis/FakeApi.kt index 4e6072b49b..d994c8fd6b 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/apis/FakeApi.kt +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/apis/FakeApi.kt @@ -178,7 +178,7 @@ interface FakeApi { * Fake endpoint to test group parameters (optional) * Fake endpoint to test group parameters (optional) * Responses: - * - 400: Someting wrong + * - 400: Something wrong * * @param requiredStringGroup Required String in group parameters * @param requiredBooleanGroup Required Boolean in group parameters diff --git a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index 6c489f4640..f95035971b 100644 --- a/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -35,7 +35,7 @@ interface StoreApi { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Responses: * - 200: successful operation * - 400: Invalid ID supplied diff --git a/samples/openapi3/client/petstore/kotlin-multiplatform/docs/StoreApi.md b/samples/openapi3/client/petstore/kotlin-multiplatform/docs/StoreApi.md index 55bd8afdbc..9ffc2eb32a 100644 --- a/samples/openapi3/client/petstore/kotlin-multiplatform/docs/StoreApi.md +++ b/samples/openapi3/client/petstore/kotlin-multiplatform/docs/StoreApi.md @@ -108,7 +108,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/openapi3/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/openapi3/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/apis/StoreApi.kt index 01211e213d..fb9a1e9cab 100644 --- a/samples/openapi3/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/openapi3/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -113,7 +113,7 @@ class StoreApi @UseExperimental(UnstableDefault::class) constructor( /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched * @return Order */ diff --git a/samples/openapi3/client/petstore/kotlin/docs/StoreApi.md b/samples/openapi3/client/petstore/kotlin/docs/StoreApi.md index 55bd8afdbc..9ffc2eb32a 100644 --- a/samples/openapi3/client/petstore/kotlin/docs/StoreApi.md +++ b/samples/openapi3/client/petstore/kotlin/docs/StoreApi.md @@ -108,7 +108,7 @@ Configure api_key: Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example ```kotlin diff --git a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt index ba70261208..5bcbf030db 100644 --- a/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt +++ b/samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt @@ -115,7 +115,7 @@ class StoreApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath) /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched * @return Order * @throws UnsupportedOperationException If the API returns an informational or redirection response diff --git a/samples/openapi3/client/petstore/python-legacy/docs/FakeApi.md b/samples/openapi3/client/petstore/python-legacy/docs/FakeApi.md index 72478b719f..1fed1dfce9 100755 --- a/samples/openapi3/client/petstore/python-legacy/docs/FakeApi.md +++ b/samples/openapi3/client/petstore/python-legacy/docs/FakeApi.md @@ -1007,7 +1007,7 @@ void (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**400** | Someting wrong | - | +**400** | Something wrong | - | [[Back to top]](#) [[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/openapi3/client/petstore/python-legacy/docs/StoreApi.md b/samples/openapi3/client/petstore/python-legacy/docs/StoreApi.md index 90846d98d5..28975756fb 100755 --- a/samples/openapi3/client/petstore/python-legacy/docs/StoreApi.md +++ b/samples/openapi3/client/petstore/python-legacy/docs/StoreApi.md @@ -146,7 +146,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example diff --git a/samples/openapi3/client/petstore/python-legacy/petstore_api/api/store_api.py b/samples/openapi3/client/petstore/python-legacy/petstore_api/api/store_api.py index 02fe7dcbf5..6e0af56af8 100755 --- a/samples/openapi3/client/petstore/python-legacy/petstore_api/api/store_api.py +++ b/samples/openapi3/client/petstore/python-legacy/petstore_api/api/store_api.py @@ -297,7 +297,7 @@ class StoreApi(object): def get_order_by_id(self, order_id, **kwargs): # noqa: E501 """Find purchase order by ID # noqa: E501 - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions # noqa: E501 + For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -327,7 +327,7 @@ class StoreApi(object): def get_order_by_id_with_http_info(self, order_id, **kwargs): # noqa: E501 """Find purchase order by ID # noqa: E501 - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions # noqa: E501 + For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True diff --git a/samples/openapi3/client/petstore/python-prior/docs/FakeApi.md b/samples/openapi3/client/petstore/python-prior/docs/FakeApi.md index 07ecc5cf92..74beeb930c 100644 --- a/samples/openapi3/client/petstore/python-prior/docs/FakeApi.md +++ b/samples/openapi3/client/petstore/python-prior/docs/FakeApi.md @@ -1575,7 +1575,7 @@ void (empty response body) | Status code | Description | Response headers | |-------------|-------------|------------------| -**400** | Someting wrong | - | +**400** | Something wrong | - | [[Back to top]](#) [[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/openapi3/client/petstore/python-prior/docs/FruitReq.md b/samples/openapi3/client/petstore/python-prior/docs/FruitReq.md index 096dde5730..086a822335 100644 --- a/samples/openapi3/client/petstore/python-prior/docs/FruitReq.md +++ b/samples/openapi3/client/petstore/python-prior/docs/FruitReq.md @@ -1,6 +1,6 @@ # FruitReq -a schema where additionalProperties is on in the composed schema and off in the oneOf object schemas also, this schem accepts null as a value +a schema where additionalProperties is on in the composed schema and off in the oneOf object schemas also, this scheme accepts null as a value ## Properties Name | Type | Description | Notes diff --git a/samples/openapi3/client/petstore/python-prior/docs/StoreApi.md b/samples/openapi3/client/petstore/python-prior/docs/StoreApi.md index 13d1c6d2a5..1abbf51ab6 100644 --- a/samples/openapi3/client/petstore/python-prior/docs/StoreApi.md +++ b/samples/openapi3/client/petstore/python-prior/docs/StoreApi.md @@ -154,7 +154,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example diff --git a/samples/openapi3/client/petstore/python-prior/petstore_api/api/store_api.py b/samples/openapi3/client/petstore/python-prior/petstore_api/api/store_api.py index 1e63e3bef3..27adc2c008 100644 --- a/samples/openapi3/client/petstore/python-prior/petstore_api/api/store_api.py +++ b/samples/openapi3/client/petstore/python-prior/petstore_api/api/store_api.py @@ -402,7 +402,7 @@ class StoreApi(object): ): """Find purchase order by ID # noqa: E501 - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions # noqa: E501 + For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True diff --git a/samples/openapi3/client/petstore/python-prior/petstore_api/models/__init__.py b/samples/openapi3/client/petstore/python-prior/petstore_api/models/__init__.py index dd8afc1d8b..4be9629a18 100644 --- a/samples/openapi3/client/petstore/python-prior/petstore_api/models/__init__.py +++ b/samples/openapi3/client/petstore/python-prior/petstore_api/models/__init__.py @@ -4,7 +4,7 @@ # if you have many models here with many references from one model to another this may # raise a RecursionError # to avoid this, import only the models that you directly need like: -# from from petstore_api.model.pet import Pet +# from petstore_api.model.pet import Pet # or import this package, but before doing it, use: # import sys # sys.setrecursionlimit(n) diff --git a/samples/openapi3/client/petstore/python-prior/tests_manual/test_deserialization.py b/samples/openapi3/client/petstore/python-prior/tests_manual/test_deserialization.py index 93538160f9..1d8ab1b424 100644 --- a/samples/openapi3/client/petstore/python-prior/tests_manual/test_deserialization.py +++ b/samples/openapi3/client/petstore/python-prior/tests_manual/test_deserialization.py @@ -88,7 +88,7 @@ class DeserializationTests(unittest.TestCase): """ deserialize Animal to a Dog instance Animal uses a discriminator which has a map built of child classes - that inherrit from Animal + that inherit from Animal This is the swagger (v2) way of doing something like oneOf composition """ class_name = 'Dog' diff --git a/samples/openapi3/client/petstore/python-prior/tests_manual/test_http_signature.py b/samples/openapi3/client/petstore/python-prior/tests_manual/test_http_signature.py index c6854d666c..f299162c24 100644 --- a/samples/openapi3/client/petstore/python-prior/tests_manual/test_http_signature.py +++ b/samples/openapi3/client/petstore/python-prior/tests_manual/test_http_signature.py @@ -279,7 +279,7 @@ class PetApiTests(unittest.TestCase): ] ) config = Configuration(host=HOST, signing_info=signing_cfg) - # Set the OAuth2 acces_token to None. Here we are interested in testing + # Set the OAuth2 access_token to None. Here we are interested in testing # the HTTP signature scheme. config.access_token = None @@ -310,7 +310,7 @@ class PetApiTests(unittest.TestCase): private_key_passphrase=self.private_key_passphrase, ) config = Configuration(host=HOST, signing_info=signing_cfg) - # Set the OAuth2 acces_token to None. Here we are interested in testing + # Set the OAuth2 access_token to None. Here we are interested in testing # the HTTP signature scheme. config.access_token = None @@ -346,7 +346,7 @@ class PetApiTests(unittest.TestCase): ] ) config = Configuration(host=HOST, signing_info=signing_cfg) - # Set the OAuth2 acces_token to None. Here we are interested in testing + # Set the OAuth2 access_token to None. Here we are interested in testing # the HTTP signature scheme. config.access_token = None @@ -382,7 +382,7 @@ class PetApiTests(unittest.TestCase): ] ) config = Configuration(host=HOST, signing_info=signing_cfg) - # Set the OAuth2 acces_token to None. Here we are interested in testing + # Set the OAuth2 access_token to None. Here we are interested in testing # the HTTP signature scheme. config.access_token = None @@ -418,7 +418,7 @@ class PetApiTests(unittest.TestCase): ] ) config = Configuration(host=HOST, signing_info=signing_cfg) - # Set the OAuth2 acces_token to None. Here we are interested in testing + # Set the OAuth2 access_token to None. Here we are interested in testing # the HTTP signature scheme. config.access_token = None diff --git a/samples/openapi3/client/petstore/python/README.md b/samples/openapi3/client/petstore/python/README.md index ca7562b37e..3cff535d8e 100644 --- a/samples/openapi3/client/petstore/python/README.md +++ b/samples/openapi3/client/petstore/python/README.md @@ -198,7 +198,7 @@ Class | Method | HTTP request | Description *FakeApi* | [**object_model_with_ref_props**](docs/apis/tags/FakeApi.md#object_model_with_ref_props) | **post** /fake/refs/object_model_with_ref_props | *FakeApi* | [**parameter_collisions**](docs/apis/tags/FakeApi.md#parameter_collisions) | **post** /fake/parameterCollisions/{1}/{aB}/{Ab}/{self}/{A-B}/ | parameter collision case *FakeApi* | [**query_param_with_json_content_type**](docs/apis/tags/FakeApi.md#query_param_with_json_content_type) | **get** /fake/queryParamWithJsonContentType | query param with json content-type -*FakeApi* | [**query_parameter_collection_format**](docs/apis/tags/FakeApi.md#query_parameter_collection_format) | **put** /fake/test-query-paramters | +*FakeApi* | [**query_parameter_collection_format**](docs/apis/tags/FakeApi.md#query_parameter_collection_format) | **put** /fake/test-query-parameters | *FakeApi* | [**ref_object_in_query**](docs/apis/tags/FakeApi.md#ref_object_in_query) | **get** /fake/refObjInQuery | user list *FakeApi* | [**response_without_schema**](docs/apis/tags/FakeApi.md#response_without_schema) | **get** /fake/responseWithoutSchema | receives a response without schema *FakeApi* | [**string**](docs/apis/tags/FakeApi.md#string) | **post** /fake/refs/string | diff --git a/samples/openapi3/client/petstore/python/docs/apis/tags/FakeApi.md b/samples/openapi3/client/petstore/python/docs/apis/tags/FakeApi.md index e869010286..a3d797cec2 100644 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/FakeApi.md +++ b/samples/openapi3/client/petstore/python/docs/apis/tags/FakeApi.md @@ -30,7 +30,7 @@ Method | HTTP request | Description [**object_model_with_ref_props**](#object_model_with_ref_props) | **post** /fake/refs/object_model_with_ref_props | [**parameter_collisions**](#parameter_collisions) | **post** /fake/parameterCollisions/{1}/{aB}/{Ab}/{self}/{A-B}/ | parameter collision case [**query_param_with_json_content_type**](#query_param_with_json_content_type) | **get** /fake/queryParamWithJsonContentType | query param with json content-type -[**query_parameter_collection_format**](#query_parameter_collection_format) | **put** /fake/test-query-paramters | +[**query_parameter_collection_format**](#query_parameter_collection_format) | **put** /fake/test-query-parameters | [**ref_object_in_query**](#ref_object_in_query) | **get** /fake/refObjInQuery | user list [**response_without_schema**](#response_without_schema) | **get** /fake/responseWithoutSchema | receives a response without schema [**string**](#string) | **post** /fake/refs/string | @@ -561,7 +561,7 @@ No authorization required -Ensures that original naming is used in endpoint params, that way we on't have collisions +Ensures that original naming is used in endpoint params, that way we won't have collisions ### Example diff --git a/samples/openapi3/client/petstore/python/docs/apis/tags/StoreApi.md b/samples/openapi3/client/petstore/python/docs/apis/tags/StoreApi.md index a75abbcffc..94a5cdb8c6 100644 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/StoreApi.md +++ b/samples/openapi3/client/petstore/python/docs/apis/tags/StoreApi.md @@ -183,7 +183,7 @@ Key | Input Type | Accessed Type | Description | Notes Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example diff --git a/samples/openapi3/client/petstore/python/git_push.sh b/samples/openapi3/client/petstore/python/git_push.sh index ced3be2b0c..200e975d21 100644 --- a/samples/openapi3/client/petstore/python/git_push.sh +++ b/samples/openapi3/client/petstore/python/git_push.sh @@ -1,7 +1,7 @@ #!/bin/sh # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ # -# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" git_user_id=$1 git_repo_id=$2 diff --git a/samples/openapi3/client/petstore/python/petstore_api/api_client.py b/samples/openapi3/client/petstore/python/petstore_api/api_client.py index 163013facd..db9cfc0361 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/api_client.py +++ b/samples/openapi3/client/petstore/python/petstore_api/api_client.py @@ -1250,9 +1250,9 @@ class ApiClient: # The HTTP signature scheme requires multiple HTTP headers # that are calculated dynamically. signing_info = self.configuration.signing_info - querys = tuple() + queries = tuple() auth_headers = signing_info.get_http_signature_headers( - resource_path, method, headers, body, querys) + resource_path, method, headers, body, queries) for key, value in auth_headers.items(): headers.add(key, value) elif auth_setting['in'] == 'query': diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/path_to_api.py b/samples/openapi3/client/petstore/python/petstore_api/apis/path_to_api.py index db788e6105..125ec78c89 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/path_to_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/apis/path_to_api.py @@ -34,7 +34,7 @@ from petstore_api.apis.paths.fake_body_with_query_params import FakeBodyWithQuer from petstore_api.apis.paths.another_fake_dummy import AnotherFakeDummy from petstore_api.apis.paths.fake_body_with_file_schema import FakeBodyWithFileSchema from petstore_api.apis.paths.fake_case_sensitive_params import FakeCaseSensitiveParams -from petstore_api.apis.paths.fake_test_query_paramters import FakeTestQueryParamters +from petstore_api.apis.paths.fake_test_query_parameters import FakeTestQueryParameters from petstore_api.apis.paths.fake_pet_id_upload_image_with_required_file import FakePetIdUploadImageWithRequiredFile from petstore_api.apis.paths.fake_parameter_collisions_1_a_b_ab_self_a_b_ import FakeParameterCollisions1ABAbSelfAB from petstore_api.apis.paths.fake_upload_file import FakeUploadFile @@ -86,7 +86,7 @@ PathToApi = typing_extensions.TypedDict( PathValues.ANOTHERFAKE_DUMMY: AnotherFakeDummy, PathValues.FAKE_BODYWITHFILESCHEMA: FakeBodyWithFileSchema, PathValues.FAKE_CASESENSITIVEPARAMS: FakeCaseSensitiveParams, - PathValues.FAKE_TESTQUERYPARAMTERS: FakeTestQueryParamters, + PathValues.FAKE_TESTQUERYPARAMETERS: FakeTestQueryParameters, PathValues.FAKE_PET_ID_UPLOAD_IMAGE_WITH_REQUIRED_FILE: FakePetIdUploadImageWithRequiredFile, PathValues.FAKE_PARAMETER_COLLISIONS_1_A_B_AB_SELF_AB_: FakeParameterCollisions1ABAbSelfAB, PathValues.FAKE_UPLOAD_FILE: FakeUploadFile, @@ -139,7 +139,7 @@ path_to_api = PathToApi( PathValues.ANOTHERFAKE_DUMMY: AnotherFakeDummy, PathValues.FAKE_BODYWITHFILESCHEMA: FakeBodyWithFileSchema, PathValues.FAKE_CASESENSITIVEPARAMS: FakeCaseSensitiveParams, - PathValues.FAKE_TESTQUERYPARAMTERS: FakeTestQueryParamters, + PathValues.FAKE_TESTQUERYPARAMETERS: FakeTestQueryParameters, PathValues.FAKE_PET_ID_UPLOAD_IMAGE_WITH_REQUIRED_FILE: FakePetIdUploadImageWithRequiredFile, PathValues.FAKE_PARAMETER_COLLISIONS_1_A_B_AB_SELF_AB_: FakeParameterCollisions1ABAbSelfAB, PathValues.FAKE_UPLOAD_FILE: FakeUploadFile, diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_test_query_parameters.py b/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_test_query_parameters.py new file mode 100644 index 0000000000..bbfebcdced --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_test_query_parameters.py @@ -0,0 +1,7 @@ +from petstore_api.paths.fake_test_query_parameters.put import ApiForput + + +class FakeTestQueryParameters( + ApiForput, +): + pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_test_query_paramters.py b/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_test_query_paramters.py deleted file mode 100644 index ff97fcdf59..0000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_test_query_paramters.py +++ /dev/null @@ -1,7 +0,0 @@ -from petstore_api.paths.fake_test_query_paramters.put import ApiForput - - -class FakeTestQueryParamters( - ApiForput, -): - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/tags/fake_api.py b/samples/openapi3/client/petstore/python/petstore_api/apis/tags/fake_api.py index 564d77038a..f232a5cc5e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/tags/fake_api.py +++ b/samples/openapi3/client/petstore/python/petstore_api/apis/tags/fake_api.py @@ -34,7 +34,7 @@ from petstore_api.paths.fake_obj_in_query.get import ObjectInQuery from petstore_api.paths.fake_refs_object_model_with_ref_props.post import ObjectModelWithRefProps from petstore_api.paths.fake_parameter_collisions_1_a_b_ab_self_a_b_.post import ParameterCollisions from petstore_api.paths.fake_query_param_with_json_content_type.get import QueryParamWithJsonContentType -from petstore_api.paths.fake_test_query_paramters.put import QueryParameterCollectionFormat +from petstore_api.paths.fake_test_query_parameters.put import QueryParameterCollectionFormat from petstore_api.paths.fake_ref_obj_in_query.get import RefObjectInQuery from petstore_api.paths.fake_response_without_schema.get import ResponseWithoutSchema from petstore_api.paths.fake_refs_string.post import String diff --git a/samples/openapi3/client/petstore/python/petstore_api/configuration.py b/samples/openapi3/client/petstore/python/petstore_api/configuration.py index f7c2a3ff91..2fe7662d50 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/configuration.py +++ b/samples/openapi3/client/petstore/python/petstore_api/configuration.py @@ -131,7 +131,7 @@ conf = petstore_api.Configuration( 'Authorization' header, which is used to carry the signature. One may be tempted to sign all headers by default, but in practice it rarely works. - This is beccause explicit proxies, transparent proxies, TLS termination endpoints or + This is because explicit proxies, transparent proxies, TLS termination endpoints or load balancers may add/modify/remove headers. Include the HTTP headers that you know are not going to be modified in transit. @@ -301,7 +301,7 @@ conf = petstore_api.Configuration( "Invalid keyword: '{0}''".format(v)) self._disabled_client_side_validations = s if name == "signing_info" and value is not None: - # Ensure the host paramater from signing info is the same as + # Ensure the host parameter from signing info is the same as # Configuration.host. value.host = self.host diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/models/__init__.py index 92305b81c1..2d7b91d228 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/__init__.py @@ -6,7 +6,7 @@ # if you have many models here with many references from one model to another this may # raise a RecursionError # to avoid this, import only the models that you directly need like: -# from from petstore_api.model.pet import Pet +# from petstore_api.model.pet import Pet # or import this package, but before doing it, use: # import sys # sys.setrecursionlimit(n) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/__init__.py index 9b8c0ff4bb..79f28fc11e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/__init__.py @@ -39,7 +39,7 @@ class PathValues(str, enum.Enum): ANOTHERFAKE_DUMMY = "/another-fake/dummy" FAKE_BODYWITHFILESCHEMA = "/fake/body-with-file-schema" FAKE_CASESENSITIVEPARAMS = "/fake/case-sensitive-params" - FAKE_TESTQUERYPARAMTERS = "/fake/test-query-paramters" + FAKE_TESTQUERYPARAMETERS = "/fake/test-query-parameters" FAKE_PET_ID_UPLOAD_IMAGE_WITH_REQUIRED_FILE = "/fake/{petId}/uploadImageWithRequiredFile" FAKE_PARAMETER_COLLISIONS_1_A_B_AB_SELF_AB_ = "/fake/parameterCollisions/{1}/{aB}/{Ab}/{self}/{A-B}/" FAKE_UPLOAD_FILE = "/fake/uploadFile" diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_parameters/__init__.py similarity index 68% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/__init__.py rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_parameters/__init__.py index ada9798153..82abd0ac65 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_parameters/__init__.py @@ -1,7 +1,7 @@ # do not import all endpoints into this module because that uses a lot of memory and stack frames # if you need the ability to import all endpoints from this module, import them with -# from petstore_api.paths.fake_test_query_paramters import Api +# from petstore_api.paths.fake_test_query_parameters import Api from petstore_api.paths import PathValues -path = PathValues.FAKE_TESTQUERYPARAMTERS \ No newline at end of file +path = PathValues.FAKE_TESTQUERYPARAMETERS \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_parameters/put.py similarity index 100% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put.py rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_parameters/put.py diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_parameters/put.pyi similarity index 100% rename from samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_paramters/put.pyi rename to samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_parameters/put.pyi diff --git a/samples/openapi3/client/petstore/python/petstore_api/schemas.py b/samples/openapi3/client/petstore/python/petstore_api/schemas.py index 18d0e8c4a5..9186b8beef 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/schemas.py +++ b/samples/openapi3/client/petstore/python/petstore_api/schemas.py @@ -385,7 +385,7 @@ class Schema: _validate_oapg returns a key value pair where the key is the path to the item, and the value will be the required manufactured class made out of the matching schemas - 2. value is an instance of the the correct schema type + 2. value is an instance of the correct schema type the value is NOT validated by _validate_oapg, _validate_oapg only checks that the instance is of the correct schema type for this value, _validate_oapg does NOT return an entry for it in _path_to_schemas and in list/dict _get_items_oapg,_get_properties_oapg the value will be directly assigned @@ -868,7 +868,7 @@ class ValidatorBase: schema_keyword not in configuration._disabled_client_side_validations) @staticmethod - def _raise_validation_errror_message_oapg(value, constraint_msg, constraint_value, path_to_item, additional_txt=""): + def _raise_validation_error_message_oapg(value, constraint_msg, constraint_value, path_to_item, additional_txt=""): raise ApiValueError( "Invalid value `{value}`, {constraint_msg} `{constraint_value}`{additional_txt} at {path_to_item}".format( value=value, @@ -963,7 +963,7 @@ class StrBase(ValidatorBase): if (cls._is_json_validation_enabled_oapg('maxLength', validation_metadata.configuration) and hasattr(cls.MetaOapg, 'max_length') and len(arg) > cls.MetaOapg.max_length): - cls._raise_validation_errror_message_oapg( + cls._raise_validation_error_message_oapg( value=arg, constraint_msg="length must be less than or equal to", constraint_value=cls.MetaOapg.max_length, @@ -973,7 +973,7 @@ class StrBase(ValidatorBase): if (cls._is_json_validation_enabled_oapg('minLength', validation_metadata.configuration) and hasattr(cls.MetaOapg, 'min_length') and len(arg) < cls.MetaOapg.min_length): - cls._raise_validation_errror_message_oapg( + cls._raise_validation_error_message_oapg( value=arg, constraint_msg="length must be greater than or equal to", constraint_value=cls.MetaOapg.min_length, @@ -988,14 +988,14 @@ class StrBase(ValidatorBase): if flags != 0: # Don't print the regex flags if the flags are not # specified in the OAS document. - cls._raise_validation_errror_message_oapg( + cls._raise_validation_error_message_oapg( value=arg, constraint_msg="must match regular expression", constraint_value=regex_dict['pattern'], path_to_item=validation_metadata.path_to_item, additional_txt=" with flags=`{}`".format(flags) ) - cls._raise_validation_errror_message_oapg( + cls._raise_validation_error_message_oapg( value=arg, constraint_msg="must match regular expression", constraint_value=regex_dict['pattern'], @@ -1211,7 +1211,7 @@ class NumberBase(ValidatorBase): return self._as_float except AttributeError: if self.as_tuple().exponent >= 0: - raise ApiValueError(f'{self} is not an float') + raise ApiValueError(f'{self} is not a float') self._as_float = float(self) return self._as_float @@ -1228,7 +1228,7 @@ class NumberBase(ValidatorBase): multiple_of_value = cls.MetaOapg.multiple_of if (not (float(arg) / multiple_of_value).is_integer()): # Note 'multipleOf' will be as good as the floating point arithmetic. - cls._raise_validation_errror_message_oapg( + cls._raise_validation_error_message_oapg( value=arg, constraint_msg="value must be a multiple of", constraint_value=multiple_of_value, @@ -1249,7 +1249,7 @@ class NumberBase(ValidatorBase): if (cls._is_json_validation_enabled_oapg('exclusiveMaximum', validation_metadata.configuration) and hasattr(cls.MetaOapg, 'exclusive_maximum') and arg >= cls.MetaOapg.exclusive_maximum): - cls._raise_validation_errror_message_oapg( + cls._raise_validation_error_message_oapg( value=arg, constraint_msg="must be a value less than", constraint_value=cls.MetaOapg.exclusive_maximum, @@ -1259,7 +1259,7 @@ class NumberBase(ValidatorBase): if (cls._is_json_validation_enabled_oapg('maximum', validation_metadata.configuration) and hasattr(cls.MetaOapg, 'inclusive_maximum') and arg > cls.MetaOapg.inclusive_maximum): - cls._raise_validation_errror_message_oapg( + cls._raise_validation_error_message_oapg( value=arg, constraint_msg="must be a value less than or equal to", constraint_value=cls.MetaOapg.inclusive_maximum, @@ -1269,7 +1269,7 @@ class NumberBase(ValidatorBase): if (cls._is_json_validation_enabled_oapg('exclusiveMinimum', validation_metadata.configuration) and hasattr(cls.MetaOapg, 'exclusive_minimum') and arg <= cls.MetaOapg.exclusive_minimum): - cls._raise_validation_errror_message_oapg( + cls._raise_validation_error_message_oapg( value=arg, constraint_msg="must be a value greater than", constraint_value=cls.MetaOapg.exclusive_maximum, @@ -1279,7 +1279,7 @@ class NumberBase(ValidatorBase): if (cls._is_json_validation_enabled_oapg('minimum', validation_metadata.configuration) and hasattr(cls.MetaOapg, 'inclusive_minimum') and arg < cls.MetaOapg.inclusive_minimum): - cls._raise_validation_errror_message_oapg( + cls._raise_validation_error_message_oapg( value=arg, constraint_msg="must be a value greater than or equal to", constraint_value=cls.MetaOapg.inclusive_minimum, @@ -1347,7 +1347,7 @@ class ListBase(ValidatorBase): if (cls._is_json_validation_enabled_oapg('maxItems', validation_metadata.configuration) and hasattr(cls.MetaOapg, 'max_items') and len(arg) > cls.MetaOapg.max_items): - cls._raise_validation_errror_message_oapg( + cls._raise_validation_error_message_oapg( value=arg, constraint_msg="number of items must be less than or equal to", constraint_value=cls.MetaOapg.max_items, @@ -1357,7 +1357,7 @@ class ListBase(ValidatorBase): if (cls._is_json_validation_enabled_oapg('minItems', validation_metadata.configuration) and hasattr(cls.MetaOapg, 'min_items') and len(arg) < cls.MetaOapg.min_items): - cls._raise_validation_errror_message_oapg( + cls._raise_validation_error_message_oapg( value=arg, constraint_msg="number of items must be greater than or equal to", constraint_value=cls.MetaOapg.min_items, @@ -1368,7 +1368,7 @@ class ListBase(ValidatorBase): hasattr(cls.MetaOapg, 'unique_items') and cls.MetaOapg.unique_items and arg): unique_items = set(arg) if len(arg) > len(unique_items): - cls._raise_validation_errror_message_oapg( + cls._raise_validation_error_message_oapg( value=arg, constraint_msg="duplicate items were found, and the tuple must not contain duplicates because", constraint_value='unique_items==True', @@ -1611,7 +1611,7 @@ class DictBase(Discriminable, ValidatorBase): if (cls._is_json_validation_enabled_oapg('maxProperties', validation_metadata.configuration) and hasattr(cls.MetaOapg, 'max_properties') and len(arg) > cls.MetaOapg.max_properties): - cls._raise_validation_errror_message_oapg( + cls._raise_validation_error_message_oapg( value=arg, constraint_msg="number of properties must be less than or equal to", constraint_value=cls.MetaOapg.max_properties, @@ -1621,7 +1621,7 @@ class DictBase(Discriminable, ValidatorBase): if (cls._is_json_validation_enabled_oapg('minProperties', validation_metadata.configuration) and hasattr(cls.MetaOapg, 'min_properties') and len(arg) < cls.MetaOapg.min_properties): - cls._raise_validation_errror_message_oapg( + cls._raise_validation_error_message_oapg( value=arg, constraint_msg="number of properties must be greater than or equal to", constraint_value=cls.MetaOapg.min_properties, diff --git a/samples/openapi3/client/petstore/python/petstore_api/signing.py b/samples/openapi3/client/petstore/python/petstore_api/signing.py index 22b3bf2bf1..9a6e9e460e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/signing.py +++ b/samples/openapi3/client/petstore/python/petstore_api/signing.py @@ -341,7 +341,7 @@ class HttpSigningConfiguration(object): :return: A tuple of (digest, prefix). The digest is a hashing object that contains the cryptographic digest of the HTTP request. - The prefix is a string that identifies the cryptographc hash. It is used + The prefix is a string that identifies the cryptographic hash. It is used to generate the 'Digest' header as specified in RFC 3230. """ if self.hash_algorithm == HASH_SHA512: diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_test_query_paramters/__init__.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_test_query_parameters/__init__.py similarity index 100% rename from samples/openapi3/client/petstore/python/test/test_paths/test_fake_test_query_paramters/__init__.py rename to samples/openapi3/client/petstore/python/test/test_paths/test_fake_test_query_parameters/__init__.py diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_test_query_paramters/test_put.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_test_query_parameters/test_put.py similarity index 77% rename from samples/openapi3/client/petstore/python/test/test_paths/test_fake_test_query_paramters/test_put.py rename to samples/openapi3/client/petstore/python/test/test_paths/test_fake_test_query_parameters/test_put.py index e358588324..b7bae3ad83 100644 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_test_query_paramters/test_put.py +++ b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_test_query_parameters/test_put.py @@ -12,15 +12,15 @@ from unittest.mock import patch import urllib3 import petstore_api -from petstore_api.paths.fake_test_query_paramters import put # noqa: E501 +from petstore_api.paths.fake_test_query_parameters import put # noqa: E501 from petstore_api import configuration, schemas, api_client from .. import ApiTestMixin -class TestFakeTestQueryParamters(ApiTestMixin, unittest.TestCase): +class TestFakeTestQueryParameters(ApiTestMixin, unittest.TestCase): """ - FakeTestQueryParamters unit test stubs + FakeTestQueryParameters unit test stubs """ _configuration = configuration.Configuration() diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_deserialization.py b/samples/openapi3/client/petstore/python/tests_manual/test_deserialization.py index 7c0300fbcd..525cd78219 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_deserialization.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_deserialization.py @@ -83,7 +83,7 @@ class DeserializationTests(unittest.TestCase): """ deserialize Animal to a Dog instance Animal uses a discriminator which has a map built of child classes - that inherrit from Animal + that inherit from Animal This is the swagger (v2) way of doing something like oneOf composition """ from petstore_api.model import animal, dog diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_http_signature.py b/samples/openapi3/client/petstore/python/tests_manual/test_http_signature.py index 1db56c65dd..d1e09d1ba1 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_http_signature.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_http_signature.py @@ -279,7 +279,7 @@ # ] # ) # config = Configuration(host=HOST, signing_info=signing_cfg) -# # Set the OAuth2 acces_token to None. Here we are interested in testing +# # Set the OAuth2 access_token to None. Here we are interested in testing # # the HTTP signature scheme. # config.access_token = None # @@ -310,7 +310,7 @@ # private_key_passphrase=self.private_key_passphrase, # ) # config = Configuration(host=HOST, signing_info=signing_cfg) -# # Set the OAuth2 acces_token to None. Here we are interested in testing +# # Set the OAuth2 access_token to None. Here we are interested in testing # # the HTTP signature scheme. # config.access_token = None # @@ -346,7 +346,7 @@ # ] # ) # config = Configuration(host=HOST, signing_info=signing_cfg) -# # Set the OAuth2 acces_token to None. Here we are interested in testing +# # Set the OAuth2 access_token to None. Here we are interested in testing # # the HTTP signature scheme. # config.access_token = None # @@ -382,7 +382,7 @@ # ] # ) # config = Configuration(host=HOST, signing_info=signing_cfg) -# # Set the OAuth2 acces_token to None. Here we are interested in testing +# # Set the OAuth2 access_token to None. Here we are interested in testing # # the HTTP signature scheme. # config.access_token = None # @@ -418,7 +418,7 @@ # ] # ) # config = Configuration(host=HOST, signing_info=signing_cfg) -# # Set the OAuth2 acces_token to None. Here we are interested in testing +# # Set the OAuth2 access_token to None. Here we are interested in testing # # the HTTP signature scheme. # config.access_token = None # diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_object_with_all_of_with_req_test_prop_from_unset_add_prop.py b/samples/openapi3/client/petstore/python/tests_manual/test_object_with_all_of_with_req_test_prop_from_unset_add_prop.py index 5146c241eb..7f530f25f0 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_object_with_all_of_with_req_test_prop_from_unset_add_prop.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_object_with_all_of_with_req_test_prop_from_unset_add_prop.py @@ -23,7 +23,7 @@ class TestObjectWithAllOfWithReqTestPropFromUnsetAddProp(unittest.TestCase): ) assert inst == {'test': 'a'} - # without the required test property an execption is thrown + # without the required test property an exception is thrown with self.assertRaises(petstore_api.exceptions.ApiTypeError): ObjectWithAllOfWithReqTestPropFromUnsetAddProp( name='a' diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_request_body.py b/samples/openapi3/client/petstore/python/tests_manual/test_request_body.py index 3e8d687e61..6cfe190cfd 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_request_body.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_request_body.py @@ -122,7 +122,7 @@ class TestParameter(unittest.TestCase): ) ) - def test_throws_error_for_nonexistant_content_type(self): + def test_throws_error_for_nonexistent_content_type(self): request_body = api_client.RequestBody( content={'application/json': api_client.MediaType(schema=schemas.AnyTypeSchema)} ) diff --git a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/StoreApi.java index 5e41c53373..34a445b908 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/StoreApi.java @@ -92,7 +92,7 @@ public interface StoreApi { /** * GET /store/order/{orderId} : Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param orderId ID of pet that needs to be fetched (required) * @return successful operation (status code 200) diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java index ce3ad7a5eb..6aa67c36ac 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java @@ -93,7 +93,7 @@ public interface StoreApi { /** * GET /store/order/{orderId} : Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param orderId ID of pet that needs to be fetched (required) * @return successful operation (status code 200) diff --git a/samples/openapi3/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java b/samples/openapi3/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java index ee84e42d4c..4943e148b0 100644 --- a/samples/openapi3/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java @@ -68,7 +68,7 @@ public interface DefaultApi { * update with form data * * @param date A date path parameter (required) - * @param visitDate Updated last vist timestamp (optional, default to 1971-12-19T03:39:57-08:00) + * @param visitDate Updated last visit timestamp (optional, default to 1971-12-19T03:39:57-08:00) * @return Invalid input (status code 405) */ @Operation( @@ -84,7 +84,7 @@ public interface DefaultApi { ) ResponseEntity updatePetWithForm( @Parameter(name = "date", description = "A date path parameter", required = true) @PathVariable("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date, - @Parameter(name = "visitDate", description = "Updated last vist timestamp") @Valid @RequestParam(value = "visitDate", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime visitDate + @Parameter(name = "visitDate", description = "Updated last visit timestamp") @Valid @RequestParam(value = "visitDate", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime visitDate ); } diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeApi.java index 3cee3811ff..24844f582b 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeApi.java @@ -356,14 +356,14 @@ public interface FakeApi { * @param stringGroup String in group parameters (optional) * @param booleanGroup Boolean in group parameters (optional) * @param int64Group Integer in group parameters (optional) - * @return Someting wrong (status code 400) + * @return Something wrong (status code 400) */ @Operation( operationId = "testGroupParameters", summary = "Fake endpoint to test group parameters (optional)", tags = { "fake" }, responses = { - @ApiResponse(responseCode = "400", description = "Someting wrong") + @ApiResponse(responseCode = "400", description = "Something wrong") } ) @RequestMapping( diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/StoreApi.java index 4aa4a70392..e473e22502 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/StoreApi.java @@ -92,7 +92,7 @@ public interface StoreApi { /** * GET /store/order/{order_id} : Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param orderId ID of pet that needs to be fetched (required) * @return successful operation (status code 200) diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java index 816e870e6b..7362603c2b 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java @@ -92,7 +92,7 @@ public interface StoreApi { /** * GET /store/order/{orderId} : Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param orderId ID of pet that needs to be fetched (required) * @return successful operation (status code 200) diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java index c7ad76d699..d79552405b 100644 --- a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java @@ -92,7 +92,7 @@ public interface StoreApi { /** * GET /store/order/{orderId} : Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param orderId ID of pet that needs to be fetched (required) * @return successful operation (status code 200) diff --git a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/StoreApi.java index b58dbd9baf..1aa5ffe1b9 100644 --- a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/StoreApi.java @@ -92,7 +92,7 @@ public interface StoreApi { /** * GET /store/order/{orderId} : Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param orderId ID of pet that needs to be fetched (required) * @return successful operation (status code 200) diff --git a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java index 765941e6ab..9144b524af 100644 --- a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java @@ -102,7 +102,7 @@ public interface StoreApi { /** * GET /store/order/{orderId} : Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param orderId ID of pet that needs to be fetched (required) * @return successful operation (status code 200) diff --git a/samples/openapi3/client/petstore/typescript/builds/browser/StoreApi.md b/samples/openapi3/client/petstore/typescript/builds/browser/StoreApi.md index 9dfad28caf..b7d89db061 100644 --- a/samples/openapi3/client/petstore/typescript/builds/browser/StoreApi.md +++ b/samples/openapi3/client/petstore/typescript/builds/browser/StoreApi.md @@ -116,7 +116,7 @@ This endpoint does not need any parameter. # **getOrderById** > Order getOrderById() -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example diff --git a/samples/openapi3/client/petstore/typescript/builds/browser/apis/StoreApi.ts b/samples/openapi3/client/petstore/typescript/builds/browser/apis/StoreApi.ts index c60c1d8708..31cf3aa1f5 100644 --- a/samples/openapi3/client/petstore/typescript/builds/browser/apis/StoreApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/browser/apis/StoreApi.ts @@ -78,7 +78,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { } /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Find purchase order by ID * @param orderId ID of pet that needs to be fetched */ diff --git a/samples/openapi3/client/petstore/typescript/builds/browser/types/ObjectParamAPI.ts b/samples/openapi3/client/petstore/typescript/builds/browser/types/ObjectParamAPI.ts index acc26d9ef9..41dfaebdde 100644 --- a/samples/openapi3/client/petstore/typescript/builds/browser/types/ObjectParamAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/browser/types/ObjectParamAPI.ts @@ -253,7 +253,7 @@ export class ObjectStoreApi { } /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Find purchase order by ID * @param param the request object */ diff --git a/samples/openapi3/client/petstore/typescript/builds/browser/types/ObservableAPI.ts b/samples/openapi3/client/petstore/typescript/builds/browser/types/ObservableAPI.ts index b5b9a542b2..5e9397ea69 100644 --- a/samples/openapi3/client/petstore/typescript/builds/browser/types/ObservableAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/browser/types/ObservableAPI.ts @@ -288,7 +288,7 @@ export class ObservableStoreApi { } /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Find purchase order by ID * @param orderId ID of pet that needs to be fetched */ diff --git a/samples/openapi3/client/petstore/typescript/builds/browser/types/PromiseAPI.ts b/samples/openapi3/client/petstore/typescript/builds/browser/types/PromiseAPI.ts index 7279c47feb..c86ac4a84f 100644 --- a/samples/openapi3/client/petstore/typescript/builds/browser/types/PromiseAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/browser/types/PromiseAPI.ts @@ -145,7 +145,7 @@ export class PromiseStoreApi { } /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Find purchase order by ID * @param orderId ID of pet that needs to be fetched */ diff --git a/samples/openapi3/client/petstore/typescript/builds/default/StoreApi.md b/samples/openapi3/client/petstore/typescript/builds/default/StoreApi.md index 9dfad28caf..b7d89db061 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/StoreApi.md +++ b/samples/openapi3/client/petstore/typescript/builds/default/StoreApi.md @@ -116,7 +116,7 @@ This endpoint does not need any parameter. # **getOrderById** > Order getOrderById() -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example diff --git a/samples/openapi3/client/petstore/typescript/builds/default/apis/StoreApi.ts b/samples/openapi3/client/petstore/typescript/builds/default/apis/StoreApi.ts index 2682c0fc70..3bb0a2de75 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/apis/StoreApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/apis/StoreApi.ts @@ -80,7 +80,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { } /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Find purchase order by ID * @param orderId ID of pet that needs to be fetched */ diff --git a/samples/openapi3/client/petstore/typescript/builds/default/types/ObjectParamAPI.ts b/samples/openapi3/client/petstore/typescript/builds/default/types/ObjectParamAPI.ts index acc26d9ef9..41dfaebdde 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/types/ObjectParamAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/types/ObjectParamAPI.ts @@ -253,7 +253,7 @@ export class ObjectStoreApi { } /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Find purchase order by ID * @param param the request object */ diff --git a/samples/openapi3/client/petstore/typescript/builds/default/types/ObservableAPI.ts b/samples/openapi3/client/petstore/typescript/builds/default/types/ObservableAPI.ts index b5b9a542b2..5e9397ea69 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/types/ObservableAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/types/ObservableAPI.ts @@ -288,7 +288,7 @@ export class ObservableStoreApi { } /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Find purchase order by ID * @param orderId ID of pet that needs to be fetched */ diff --git a/samples/openapi3/client/petstore/typescript/builds/default/types/PromiseAPI.ts b/samples/openapi3/client/petstore/typescript/builds/default/types/PromiseAPI.ts index 7279c47feb..c86ac4a84f 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/types/PromiseAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/types/PromiseAPI.ts @@ -145,7 +145,7 @@ export class PromiseStoreApi { } /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Find purchase order by ID * @param orderId ID of pet that needs to be fetched */ diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/StoreApi.md b/samples/openapi3/client/petstore/typescript/builds/deno/StoreApi.md index 9dfad28caf..b7d89db061 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/StoreApi.md +++ b/samples/openapi3/client/petstore/typescript/builds/deno/StoreApi.md @@ -116,7 +116,7 @@ This endpoint does not need any parameter. # **getOrderById** > Order getOrderById() -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/apis/StoreApi.ts b/samples/openapi3/client/petstore/typescript/builds/deno/apis/StoreApi.ts index b391bc0bad..99e2f62d65 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/apis/StoreApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/apis/StoreApi.ts @@ -78,7 +78,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { } /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Find purchase order by ID * @param orderId ID of pet that needs to be fetched */ diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/types/ObjectParamAPI.ts b/samples/openapi3/client/petstore/typescript/builds/deno/types/ObjectParamAPI.ts index 271b489d45..e499b3bc62 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/types/ObjectParamAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/types/ObjectParamAPI.ts @@ -253,7 +253,7 @@ export class ObjectStoreApi { } /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Find purchase order by ID * @param param the request object */ diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/types/ObservableAPI.ts b/samples/openapi3/client/petstore/typescript/builds/deno/types/ObservableAPI.ts index a6524a2188..1857aba9f3 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/types/ObservableAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/types/ObservableAPI.ts @@ -288,7 +288,7 @@ export class ObservableStoreApi { } /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Find purchase order by ID * @param orderId ID of pet that needs to be fetched */ diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/types/PromiseAPI.ts b/samples/openapi3/client/petstore/typescript/builds/deno/types/PromiseAPI.ts index fe3712f412..087bc60cbe 100644 --- a/samples/openapi3/client/petstore/typescript/builds/deno/types/PromiseAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/deno/types/PromiseAPI.ts @@ -145,7 +145,7 @@ export class PromiseStoreApi { } /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Find purchase order by ID * @param orderId ID of pet that needs to be fetched */ diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/StoreApi.md b/samples/openapi3/client/petstore/typescript/builds/inversify/StoreApi.md index 9dfad28caf..b7d89db061 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/StoreApi.md +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/StoreApi.md @@ -116,7 +116,7 @@ This endpoint does not need any parameter. # **getOrderById** > Order getOrderById() -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/StoreApi.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/StoreApi.ts index 8c67bb3abe..7537e2b4ec 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/apis/StoreApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/apis/StoreApi.ts @@ -74,7 +74,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { } /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Find purchase order by ID * @param orderId ID of pet that needs to be fetched */ diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/services/ObjectParamAPI.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/services/ObjectParamAPI.ts index 87e9efed41..09bf61437b 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/services/ObjectParamAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/services/ObjectParamAPI.ts @@ -86,7 +86,7 @@ export abstract class AbstractObjectStoreApi { public abstract getInventory(param: req.StoreApiGetInventoryRequest, options?: Configuration): Promise<{ [key: string]: number; }>; /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Find purchase order by ID * @param param the request object */ diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/types/ObjectParamAPI.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/types/ObjectParamAPI.ts index acc26d9ef9..41dfaebdde 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/types/ObjectParamAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/types/ObjectParamAPI.ts @@ -253,7 +253,7 @@ export class ObjectStoreApi { } /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Find purchase order by ID * @param param the request object */ diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/types/ObservableAPI.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/types/ObservableAPI.ts index ac5eeb4ce5..c3c1dc4151 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/types/ObservableAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/types/ObservableAPI.ts @@ -296,7 +296,7 @@ export class ObservableStoreApi { } /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Find purchase order by ID * @param orderId ID of pet that needs to be fetched */ diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/types/PromiseAPI.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/types/PromiseAPI.ts index cf94fea92a..d1ade06825 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/types/PromiseAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/types/PromiseAPI.ts @@ -153,7 +153,7 @@ export class PromiseStoreApi { } /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Find purchase order by ID * @param orderId ID of pet that needs to be fetched */ diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/StoreApi.md b/samples/openapi3/client/petstore/typescript/builds/jquery/StoreApi.md index 9dfad28caf..b7d89db061 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/StoreApi.md +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/StoreApi.md @@ -116,7 +116,7 @@ This endpoint does not need any parameter. # **getOrderById** > Order getOrderById() -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/StoreApi.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/StoreApi.ts index c60c1d8708..31cf3aa1f5 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/apis/StoreApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/apis/StoreApi.ts @@ -78,7 +78,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { } /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Find purchase order by ID * @param orderId ID of pet that needs to be fetched */ diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/types/APIInterfaces.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/types/APIInterfaces.ts index 370e025aa0..c00a02247b 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/types/APIInterfaces.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/types/APIInterfaces.ts @@ -90,7 +90,7 @@ export interface GenericStoreApiInterface { getInventory(options?: Configuration): T2; /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Find purchase order by ID * @param orderId ID of pet that needs to be fetched */ diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/types/ObjectParamAPI.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/types/ObjectParamAPI.ts index acc26d9ef9..41dfaebdde 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/types/ObjectParamAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/types/ObjectParamAPI.ts @@ -253,7 +253,7 @@ export class ObjectStoreApi { } /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Find purchase order by ID * @param param the request object */ diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/types/ObservableAPI.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/types/ObservableAPI.ts index b5b9a542b2..5e9397ea69 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/types/ObservableAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/types/ObservableAPI.ts @@ -288,7 +288,7 @@ export class ObservableStoreApi { } /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Find purchase order by ID * @param orderId ID of pet that needs to be fetched */ diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/types/PromiseAPI.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/types/PromiseAPI.ts index 7279c47feb..c86ac4a84f 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/types/PromiseAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/types/PromiseAPI.ts @@ -145,7 +145,7 @@ export class PromiseStoreApi { } /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Find purchase order by ID * @param orderId ID of pet that needs to be fetched */ diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/StoreApi.md b/samples/openapi3/client/petstore/typescript/builds/object_params/StoreApi.md index 9dfad28caf..b7d89db061 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/StoreApi.md +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/StoreApi.md @@ -116,7 +116,7 @@ This endpoint does not need any parameter. # **getOrderById** > Order getOrderById() -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/StoreApi.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/StoreApi.ts index 2682c0fc70..3bb0a2de75 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/apis/StoreApi.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/apis/StoreApi.ts @@ -80,7 +80,7 @@ export class StoreApiRequestFactory extends BaseAPIRequestFactory { } /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Find purchase order by ID * @param orderId ID of pet that needs to be fetched */ diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/types/ObjectParamAPI.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/types/ObjectParamAPI.ts index acc26d9ef9..41dfaebdde 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/types/ObjectParamAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/types/ObjectParamAPI.ts @@ -253,7 +253,7 @@ export class ObjectStoreApi { } /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Find purchase order by ID * @param param the request object */ diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/types/ObservableAPI.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/types/ObservableAPI.ts index b5b9a542b2..5e9397ea69 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/types/ObservableAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/types/ObservableAPI.ts @@ -288,7 +288,7 @@ export class ObservableStoreApi { } /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Find purchase order by ID * @param orderId ID of pet that needs to be fetched */ diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/types/PromiseAPI.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/types/PromiseAPI.ts index 7279c47feb..c86ac4a84f 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/types/PromiseAPI.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/types/PromiseAPI.ts @@ -145,7 +145,7 @@ export class PromiseStoreApi { } /** - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Find purchase order by ID * @param orderId ID of pet that needs to be fetched */ diff --git a/samples/openapi3/client/petstore/typescript/tests/browser/test/PetApi.test.ts b/samples/openapi3/client/petstore/typescript/tests/browser/test/PetApi.test.ts index 78d07519cb..a4334fe745 100644 --- a/samples/openapi3/client/petstore/typescript/tests/browser/test/PetApi.test.ts +++ b/samples/openapi3/client/petstore/typescript/tests/browser/test/PetApi.test.ts @@ -51,11 +51,11 @@ describe("PetApi", () => { throw new Error("Pet with id " + deletedPet.id + " was not deleted!"); }) - it("deleteNonExistantPet", async () => { + it("deleteNonExistentPet", async () => { // Use an id that is too big for the server to handle. - const nonExistantId = 100000000000000000000000000.0; + const nonExistentId = 100000000000000000000000000.0; try { - await petApi.deletePet(nonExistantId) + await petApi.deletePet(nonExistentId) } catch (error) { const err = error as ApiException; // The 404 response for this endpoint is officially documented, but @@ -68,7 +68,7 @@ describe("PetApi", () => { expect(err.body).to.include("message"); return; } - throw new Error("Deleted non-existant pet with id " + nonExistantId + "!"); + throw new Error("Deleted non-existent pet with id " + nonExistentId + "!"); }) it("failRunTimeRequiredParameterCheck", async () => { diff --git a/samples/openapi3/client/petstore/typescript/tests/default/test/api/PetApi.test.ts b/samples/openapi3/client/petstore/typescript/tests/default/test/api/PetApi.test.ts index 4d52bcc20f..dd6cfbc376 100644 --- a/samples/openapi3/client/petstore/typescript/tests/default/test/api/PetApi.test.ts +++ b/samples/openapi3/client/petstore/typescript/tests/default/test/api/PetApi.test.ts @@ -42,11 +42,11 @@ describe("PetApi", () => { throw new Error("Pet with id " + deletedPet.id + " was not deleted!"); }) - it("deleteNonExistantPet", async () => { + it("deleteNonExistentPet", async () => { // Use an id that is too big for the server to handle. - const nonExistantId = 100000000000000000000000000; + const nonExistentId = 100000000000000000000000000; try { - await petApi.deletePet(nonExistantId) + await petApi.deletePet(nonExistentId) } catch (err) { // The 404 response for this endpoint is officially documented, but // that documentation is not used for generating the client code. @@ -58,7 +58,7 @@ describe("PetApi", () => { expect(err.body).to.include("message"); return; } - throw new Error("Deleted non-existant pet with id " + nonExistantId + "!"); + throw new Error("Deleted non-existent pet with id " + nonExistentId + "!"); }) it("failRunTimeRequiredParameterCheck", async () => { diff --git a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApi.kt b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApi.kt index acfb3f62ae..f14d44213c 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApi.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApi.kt @@ -70,7 +70,7 @@ class StoreApiController(@Autowired(required = true) val service: StoreApiServic @ApiOperation( value = "Find purchase order by ID", nickname = "getOrderById", - notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", response = Order::class) @ApiResponses( value = [ApiResponse(code = 200, message = "successful operation", response = Order::class),ApiResponse(code = 400, message = "Invalid ID supplied"),ApiResponse(code = 404, message = "Order not found")]) diff --git a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/test/kotlin/org/openapitools/api/StoreApiTest.kt b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/test/kotlin/org/openapitools/api/StoreApiTest.kt index b084fe87b4..438fc7078b 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/test/kotlin/org/openapitools/api/StoreApiTest.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot-reactive/src/test/kotlin/org/openapitools/api/StoreApiTest.kt @@ -47,7 +47,7 @@ class StoreApiTest { /** * Find purchase order by ID * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @throws ApiException * if the Api call fails diff --git a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApi.kt b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApi.kt index 9199ce4e30..1992a5d8e0 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApi.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApi.kt @@ -69,7 +69,7 @@ class StoreApiController(@Autowired(required = true) val service: StoreApiServic @ApiOperation( value = "Find purchase order by ID", nickname = "getOrderById", - notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", response = Order::class) @ApiResponses( value = [ApiResponse(code = 200, message = "successful operation", response = Order::class),ApiResponse(code = 400, message = "Invalid ID supplied"),ApiResponse(code = 404, message = "Order not found")]) diff --git a/samples/openapi3/server/petstore/kotlin-springboot/src/test/kotlin/org/openapitools/api/StoreApiTest.kt b/samples/openapi3/server/petstore/kotlin-springboot/src/test/kotlin/org/openapitools/api/StoreApiTest.kt index 423f98d297..2fdab9d2d7 100644 --- a/samples/openapi3/server/petstore/kotlin-springboot/src/test/kotlin/org/openapitools/api/StoreApiTest.kt +++ b/samples/openapi3/server/petstore/kotlin-springboot/src/test/kotlin/org/openapitools/api/StoreApiTest.kt @@ -45,7 +45,7 @@ class StoreApiTest { /** * Find purchase order by ID * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @throws ApiException * if the Api call fails diff --git a/samples/openapi3/server/petstore/php-symfony/SymfonyBundle-php/Resources/docs/Api/StoreApiInterface.md b/samples/openapi3/server/petstore/php-symfony/SymfonyBundle-php/Resources/docs/Api/StoreApiInterface.md index 3d3e3b18c3..7a0c046231 100644 --- a/samples/openapi3/server/petstore/php-symfony/SymfonyBundle-php/Resources/docs/Api/StoreApiInterface.md +++ b/samples/openapi3/server/petstore/php-symfony/SymfonyBundle-php/Resources/docs/Api/StoreApiInterface.md @@ -140,7 +140,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example Implementation ```php diff --git a/samples/openapi3/server/petstore/python-flask-python2/git_push.sh b/samples/openapi3/server/petstore/python-flask-python2/git_push.sh index ced3be2b0c..200e975d21 100644 --- a/samples/openapi3/server/petstore/python-flask-python2/git_push.sh +++ b/samples/openapi3/server/petstore/python-flask-python2/git_push.sh @@ -1,7 +1,7 @@ #!/bin/sh # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ # -# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" git_user_id=$1 git_repo_id=$2 diff --git a/samples/openapi3/server/petstore/python-flask-python2/openapi_server/controllers/store_controller.py b/samples/openapi3/server/petstore/python-flask-python2/openapi_server/controllers/store_controller.py index 3d16d99859..7e58cf96c2 100644 --- a/samples/openapi3/server/petstore/python-flask-python2/openapi_server/controllers/store_controller.py +++ b/samples/openapi3/server/petstore/python-flask-python2/openapi_server/controllers/store_controller.py @@ -32,7 +32,7 @@ def get_inventory(): # noqa: E501 def get_order_by_id(order_id): # noqa: E501 """Find purchase order by ID - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions # noqa: E501 + For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions # noqa: E501 :param order_id: ID of pet that needs to be fetched :type order_id: int diff --git a/samples/openapi3/server/petstore/python-flask-python2/openapi_server/openapi/openapi.yaml b/samples/openapi3/server/petstore/python-flask-python2/openapi_server/openapi/openapi.yaml index 31100fda52..2257a38868 100644 --- a/samples/openapi3/server/petstore/python-flask-python2/openapi_server/openapi/openapi.yaml +++ b/samples/openapi3/server/petstore/python-flask-python2/openapi_server/openapi/openapi.yaml @@ -367,7 +367,7 @@ paths: x-openapi-router-controller: openapi_server.controllers.store_controller get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: get_order_by_id parameters: - description: ID of pet that needs to be fetched @@ -495,7 +495,7 @@ paths: type: integer style: simple X-Expires-After: - description: date in UTC when toekn expires + description: date in UTC when token expires explode: false schema: format: date-time diff --git a/samples/openapi3/server/petstore/python-flask-python2/openapi_server/test/test_pet_controller.py b/samples/openapi3/server/petstore/python-flask-python2/openapi_server/test/test_pet_controller.py index 6c031e9f4b..dd1af21025 100644 --- a/samples/openapi3/server/petstore/python-flask-python2/openapi_server/test/test_pet_controller.py +++ b/samples/openapi3/server/petstore/python-flask-python2/openapi_server/test/test_pet_controller.py @@ -17,7 +17,7 @@ from openapi_server.test import BaseTestCase class TestPetController(BaseTestCase): """PetController integration test stubs""" - @unittest.skip("Connexion does not support multiple consummes. See https://github.com/zalando/connexion/pull/760") + @unittest.skip("Connexion does not support multiple consumes. See https://github.com/zalando/connexion/pull/760") def test_add_pet(self): """Test case for add_pet @@ -121,7 +121,7 @@ class TestPetController(BaseTestCase): self.assert200(response, 'Response body is : ' + response.data.decode('utf-8')) - @unittest.skip("Connexion does not support multiple consummes. See https://github.com/zalando/connexion/pull/760") + @unittest.skip("Connexion does not support multiple consumes. See https://github.com/zalando/connexion/pull/760") def test_update_pet(self): """Test case for update_pet diff --git a/samples/openapi3/server/petstore/python-flask/git_push.sh b/samples/openapi3/server/petstore/python-flask/git_push.sh index ced3be2b0c..200e975d21 100644 --- a/samples/openapi3/server/petstore/python-flask/git_push.sh +++ b/samples/openapi3/server/petstore/python-flask/git_push.sh @@ -1,7 +1,7 @@ #!/bin/sh # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ # -# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" git_user_id=$1 git_repo_id=$2 diff --git a/samples/openapi3/server/petstore/python-flask/openapi_server/controllers/store_controller.py b/samples/openapi3/server/petstore/python-flask/openapi_server/controllers/store_controller.py index 3d16d99859..7e58cf96c2 100644 --- a/samples/openapi3/server/petstore/python-flask/openapi_server/controllers/store_controller.py +++ b/samples/openapi3/server/petstore/python-flask/openapi_server/controllers/store_controller.py @@ -32,7 +32,7 @@ def get_inventory(): # noqa: E501 def get_order_by_id(order_id): # noqa: E501 """Find purchase order by ID - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions # noqa: E501 + For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions # noqa: E501 :param order_id: ID of pet that needs to be fetched :type order_id: int diff --git a/samples/openapi3/server/petstore/python-flask/openapi_server/openapi/openapi.yaml b/samples/openapi3/server/petstore/python-flask/openapi_server/openapi/openapi.yaml index 31100fda52..2257a38868 100644 --- a/samples/openapi3/server/petstore/python-flask/openapi_server/openapi/openapi.yaml +++ b/samples/openapi3/server/petstore/python-flask/openapi_server/openapi/openapi.yaml @@ -367,7 +367,7 @@ paths: x-openapi-router-controller: openapi_server.controllers.store_controller get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: get_order_by_id parameters: - description: ID of pet that needs to be fetched @@ -495,7 +495,7 @@ paths: type: integer style: simple X-Expires-After: - description: date in UTC when toekn expires + description: date in UTC when token expires explode: false schema: format: date-time diff --git a/samples/openapi3/server/petstore/python-flask/openapi_server/test/test_pet_controller.py b/samples/openapi3/server/petstore/python-flask/openapi_server/test/test_pet_controller.py index 2e9944b3cc..a517347293 100644 --- a/samples/openapi3/server/petstore/python-flask/openapi_server/test/test_pet_controller.py +++ b/samples/openapi3/server/petstore/python-flask/openapi_server/test/test_pet_controller.py @@ -17,7 +17,7 @@ from openapi_server.test import BaseTestCase class TestPetController(BaseTestCase): """PetController integration test stubs""" - @unittest.skip("Connexion does not support multiple consummes. See https://github.com/zalando/connexion/pull/760") + @unittest.skip("Connexion does not support multiple consumes. See https://github.com/zalando/connexion/pull/760") def test_add_pet(self): """Test case for add_pet @@ -121,7 +121,7 @@ class TestPetController(BaseTestCase): self.assert200(response, 'Response body is : ' + response.data.decode('utf-8')) - @unittest.skip("Connexion does not support multiple consummes. See https://github.com/zalando/connexion/pull/760") + @unittest.skip("Connexion does not support multiple consumes. See https://github.com/zalando/connexion/pull/760") def test_update_pet(self): """Test case for update_pet diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Addressable.java b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Addressable.java index 2cc692ebfc..950befc2fc 100644 --- a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Addressable.java +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/java/org/openapitools/model/Addressable.java @@ -15,10 +15,10 @@ import java.util.*; import javax.annotation.Generated; /** - * Base schema for adressable entities + * Base schema for addressable entities */ -@Schema(name = "Addressable", description = "Base schema for adressable entities") +@Schema(name = "Addressable", description = "Base schema for addressable entities") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen") public class Addressable { diff --git a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/resources/openapi.yaml b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/resources/openapi.yaml index 9ab9dccf5d..d0b65c8586 100644 --- a/samples/openapi3/server/petstore/spring-boot-oneof/src/main/resources/openapi.yaml +++ b/samples/openapi3/server/petstore/spring-boot-oneof/src/main/resources/openapi.yaml @@ -97,7 +97,7 @@ components: description: Success schemas: Addressable: - description: Base schema for adressable entities + description: Base schema for addressable entities properties: href: description: Hyperlink reference diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/StoreApi.java index 6d2330a325..748f4f5cc3 100644 --- a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/StoreApi.java @@ -102,7 +102,7 @@ public interface StoreApi { /** * GET /store/order/{orderId} : Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param orderId ID of pet that needs to be fetched (required) * @return successful operation (status code 200) diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/resources/openapi.yaml b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/resources/openapi.yaml index b629acd9d7..ce4ba1e4a4 100644 --- a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/resources/openapi.yaml +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/resources/openapi.yaml @@ -386,7 +386,7 @@ paths: - tag: store get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched diff --git a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/StoreApi.java index d0eed779fd..e9e58af2ab 100644 --- a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/StoreApi.java @@ -102,7 +102,7 @@ public interface StoreApi { /** * GET /store/order/{orderId} : Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param orderId ID of pet that needs to be fetched (required) * @return successful operation (status code 200) diff --git a/samples/openapi3/server/petstore/springboot-3/src/main/resources/openapi.yaml b/samples/openapi3/server/petstore/springboot-3/src/main/resources/openapi.yaml index b629acd9d7..ce4ba1e4a4 100644 --- a/samples/openapi3/server/petstore/springboot-3/src/main/resources/openapi.yaml +++ b/samples/openapi3/server/petstore/springboot-3/src/main/resources/openapi.yaml @@ -386,7 +386,7 @@ paths: - tag: store get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java index 8dcbbff9a0..c640ac479d 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java @@ -409,14 +409,14 @@ public interface FakeApi { * @param stringGroup String in group parameters (optional) * @param booleanGroup Boolean in group parameters (optional) * @param int64Group Integer in group parameters (optional) - * @return Someting wrong (status code 400) + * @return Something wrong (status code 400) */ @Operation( operationId = "testGroupParameters", summary = "Fake endpoint to test group parameters (optional)", tags = { "fake" }, responses = { - @ApiResponse(responseCode = "400", description = "Someting wrong") + @ApiResponse(responseCode = "400", description = "Something wrong") } ) @RequestMapping( diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java index 836aa2500f..77f6a5e386 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java @@ -102,7 +102,7 @@ public interface StoreApi { /** * GET /store/order/{order_id} : Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param orderId ID of pet that needs to be fetched (required) * @return successful operation (status code 200) diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/resources/openapi.yaml b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/resources/openapi.yaml index 2999e6f2f8..658d8a96b3 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/resources/openapi.yaml +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/resources/openapi.yaml @@ -392,7 +392,7 @@ paths: - tag: store get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched @@ -714,7 +714,7 @@ paths: responses: "400": content: {} - description: Someting wrong + description: Something wrong summary: Fake endpoint to test group parameters (optional) tags: - fake diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java index 21888ab0e8..ae9085e66e 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java @@ -377,14 +377,14 @@ public interface FakeApi { * @param stringGroup String in group parameters (optional) * @param booleanGroup Boolean in group parameters (optional) * @param int64Group Integer in group parameters (optional) - * @return Someting wrong (status code 400) + * @return Something wrong (status code 400) */ @Operation( operationId = "testGroupParameters", summary = "Fake endpoint to test group parameters (optional)", tags = { "fake" }, responses = { - @ApiResponse(responseCode = "400", description = "Someting wrong") + @ApiResponse(responseCode = "400", description = "Something wrong") } ) @RequestMapping( diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java index 03f67c302c..2cd684b90f 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java @@ -234,7 +234,7 @@ public interface FakeApiDelegate { * @param stringGroup String in group parameters (optional) * @param booleanGroup Boolean in group parameters (optional) * @param int64Group Integer in group parameters (optional) - * @return Someting wrong (status code 400) + * @return Something wrong (status code 400) * @see FakeApi#testGroupParameters */ default ResponseEntity testGroupParameters(Integer requiredStringGroup, diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java index a54fc47aec..80be70f876 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java @@ -96,7 +96,7 @@ public interface StoreApi { /** * GET /store/order/{order_id} : Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param orderId ID of pet that needs to be fetched (required) * @return successful operation (status code 200) diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApiDelegate.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApiDelegate.java index e9b7146b52..c4c812a9bb 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApiDelegate.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApiDelegate.java @@ -52,7 +52,7 @@ public interface StoreApiDelegate { /** * GET /store/order/{order_id} : Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param orderId ID of pet that needs to be fetched (required) * @return successful operation (status code 200) diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/resources/openapi.yaml b/samples/openapi3/server/petstore/springboot-delegate/src/main/resources/openapi.yaml index 2999e6f2f8..658d8a96b3 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/resources/openapi.yaml +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/resources/openapi.yaml @@ -392,7 +392,7 @@ paths: - tag: store get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched @@ -714,7 +714,7 @@ paths: responses: "400": content: {} - description: Someting wrong + description: Something wrong summary: Fake endpoint to test group parameters (optional) tags: - fake diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java index b408fc5c06..c54f65aab4 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java @@ -407,14 +407,14 @@ public interface FakeApi { * @param requiredInt64Group Required Integer in group parameters (required) * @param stringGroup String in group parameters (optional) * @param int64Group Integer in group parameters (optional) - * @return Someting wrong (status code 400) + * @return Something wrong (status code 400) */ @Operation( operationId = "testGroupParameters", summary = "Fake endpoint to test group parameters (optional)", tags = { "fake" }, responses = { - @ApiResponse(responseCode = "400", description = "Someting wrong") + @ApiResponse(responseCode = "400", description = "Something wrong") } ) @Parameters({ diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java index 836aa2500f..77f6a5e386 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java @@ -102,7 +102,7 @@ public interface StoreApi { /** * GET /store/order/{order_id} : Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param orderId ID of pet that needs to be fetched (required) * @return successful operation (status code 200) diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml index 2999e6f2f8..658d8a96b3 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml @@ -392,7 +392,7 @@ paths: - tag: store get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched @@ -714,7 +714,7 @@ paths: responses: "400": content: {} - description: Someting wrong + description: Something wrong summary: Fake endpoint to test group parameters (optional) tags: - fake diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java index 1a9631a15a..dd7a16a827 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java @@ -391,14 +391,14 @@ public interface FakeApi { * @param stringGroup String in group parameters (optional) * @param booleanGroup Boolean in group parameters (optional) * @param int64Group Integer in group parameters (optional) - * @return Someting wrong (status code 400) + * @return Something wrong (status code 400) */ @Operation( operationId = "testGroupParameters", summary = "Fake endpoint to test group parameters (optional)", tags = { "fake" }, responses = { - @ApiResponse(responseCode = "400", description = "Someting wrong") + @ApiResponse(responseCode = "400", description = "Something wrong") } ) @RequestMapping( diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiDelegate.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiDelegate.java index 611aad3212..98fba4fc3d 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiDelegate.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiDelegate.java @@ -264,7 +264,7 @@ public interface FakeApiDelegate { * @param stringGroup String in group parameters (optional) * @param booleanGroup Boolean in group parameters (optional) * @param int64Group Integer in group parameters (optional) - * @return Someting wrong (status code 400) + * @return Something wrong (status code 400) * @see FakeApi#testGroupParameters */ default Mono> testGroupParameters(Integer requiredStringGroup, diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java index 3e9c0e7217..9c42b929a1 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java @@ -101,7 +101,7 @@ public interface StoreApi { /** * GET /store/order/{order_id} : Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param orderId ID of pet that needs to be fetched (required) * @return successful operation (status code 200) diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApiDelegate.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApiDelegate.java index cc442cd3ae..ec665c3cd6 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApiDelegate.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApiDelegate.java @@ -61,7 +61,7 @@ public interface StoreApiDelegate { /** * GET /store/order/{order_id} : Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param orderId ID of pet that needs to be fetched (required) * @return successful operation (status code 200) diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/resources/openapi.yaml b/samples/openapi3/server/petstore/springboot-reactive/src/main/resources/openapi.yaml index 2999e6f2f8..658d8a96b3 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/resources/openapi.yaml +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/resources/openapi.yaml @@ -392,7 +392,7 @@ paths: - tag: store get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched @@ -714,7 +714,7 @@ paths: responses: "400": content: {} - description: Someting wrong + description: Something wrong summary: Fake endpoint to test group parameters (optional) tags: - fake diff --git a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/StoreApi.java index 3044b699b0..0272594908 100644 --- a/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot-source/src/main/java/org/openapitools/api/StoreApi.java @@ -71,7 +71,7 @@ public interface StoreApi { /** * GET /store/order/{orderId} : Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param orderId ID of pet that needs to be fetched (required) * @return successful operation (status code 200) diff --git a/samples/openapi3/server/petstore/springboot-source/src/main/resources/openapi.yaml b/samples/openapi3/server/petstore/springboot-source/src/main/resources/openapi.yaml index b629acd9d7..ce4ba1e4a4 100644 --- a/samples/openapi3/server/petstore/springboot-source/src/main/resources/openapi.yaml +++ b/samples/openapi3/server/petstore/springboot-source/src/main/resources/openapi.yaml @@ -386,7 +386,7 @@ paths: - tag: store get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java index fcfa5b29f4..acef662cd1 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java @@ -409,14 +409,14 @@ public interface FakeApi { * @param stringGroup String in group parameters (optional) * @param booleanGroup Boolean in group parameters (optional) * @param int64Group Integer in group parameters (optional) - * @return Someting wrong (status code 400) + * @return Something wrong (status code 400) */ @Operation( operationId = "testGroupParameters", summary = "Fake endpoint to test group parameters (optional)", tags = { "fake" }, responses = { - @ApiResponse(responseCode = "400", description = "Someting wrong") + @ApiResponse(responseCode = "400", description = "Something wrong") } ) @RequestMapping( diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java index 836aa2500f..77f6a5e386 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java @@ -102,7 +102,7 @@ public interface StoreApi { /** * GET /store/order/{order_id} : Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param orderId ID of pet that needs to be fetched (required) * @return successful operation (status code 200) diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/resources/openapi.yaml b/samples/openapi3/server/petstore/springboot-useoptional/src/main/resources/openapi.yaml index 2999e6f2f8..658d8a96b3 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/resources/openapi.yaml +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/resources/openapi.yaml @@ -392,7 +392,7 @@ paths: - tag: store get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched @@ -714,7 +714,7 @@ paths: responses: "400": content: {} - description: Someting wrong + description: Something wrong summary: Fake endpoint to test group parameters (optional) tags: - fake diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java index 6dec1f26bb..f3d4f3b21f 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java @@ -103,7 +103,7 @@ public interface StoreApi { /** * GET /store/order/{orderId} : Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param orderId ID of pet that needs to be fetched (required) * @return successful operation (status code 200) diff --git a/samples/openapi3/server/petstore/springboot/src/main/resources/openapi.yaml b/samples/openapi3/server/petstore/springboot/src/main/resources/openapi.yaml index b629acd9d7..ce4ba1e4a4 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/resources/openapi.yaml +++ b/samples/openapi3/server/petstore/springboot/src/main/resources/openapi.yaml @@ -386,7 +386,7 @@ paths: - tag: store get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched diff --git a/samples/schema/petstore/wsdl-schema/service.wsdl b/samples/schema/petstore/wsdl-schema/service.wsdl index db34eda9eb..fe115de068 100644 --- a/samples/schema/petstore/wsdl-schema/service.wsdl +++ b/samples/schema/petstore/wsdl-schema/service.wsdl @@ -836,7 +836,7 @@ - For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions + For valid response try integer IDs with value >= 1 and <= 10. Other values will generate exceptions successful operation diff --git a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/StoreApi.cs b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/StoreApi.cs index 31f24ebfc7..b925426c76 100644 --- a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/StoreApi.cs +++ b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/Controllers/StoreApi.cs @@ -78,7 +78,7 @@ namespace Org.OpenAPITools.Controllers /// /// Find purchase order by ID /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// ID of pet that needs to be fetched /// successful operation /// Invalid ID supplied diff --git a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/wwwroot/openapi-original.json b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/wwwroot/openapi-original.json index 257358c060..0ccbb4c793 100644 --- a/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/wwwroot/openapi-original.json +++ b/samples/server/petstore/aspnetcore-3.0/src/Org.OpenAPITools/wwwroot/openapi-original.json @@ -458,7 +458,7 @@ "tags" : [ "store" ] }, "get" : { - "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", "operationId" : "getOrderById", "parameters" : [ { "description" : "ID of pet that needs to be fetched", diff --git a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/StoreApi.cs b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/StoreApi.cs index 31f24ebfc7..b925426c76 100644 --- a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/StoreApi.cs +++ b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/Controllers/StoreApi.cs @@ -78,7 +78,7 @@ namespace Org.OpenAPITools.Controllers /// /// Find purchase order by ID /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// ID of pet that needs to be fetched /// successful operation /// Invalid ID supplied diff --git a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/wwwroot/openapi-original.json b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/wwwroot/openapi-original.json index 257358c060..0ccbb4c793 100644 --- a/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/wwwroot/openapi-original.json +++ b/samples/server/petstore/aspnetcore-3.1/src/Org.OpenAPITools/wwwroot/openapi-original.json @@ -458,7 +458,7 @@ "tags" : [ "store" ] }, "get" : { - "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", "operationId" : "getOrderById", "parameters" : [ { "description" : "ID of pet that needs to be fetched", diff --git a/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/StoreApi.cs b/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/StoreApi.cs index 31f24ebfc7..b925426c76 100644 --- a/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/StoreApi.cs +++ b/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/Controllers/StoreApi.cs @@ -78,7 +78,7 @@ namespace Org.OpenAPITools.Controllers /// /// Find purchase order by ID /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// ID of pet that needs to be fetched /// successful operation /// Invalid ID supplied diff --git a/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/wwwroot/openapi-original.json b/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/wwwroot/openapi-original.json index 257358c060..0ccbb4c793 100644 --- a/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/wwwroot/openapi-original.json +++ b/samples/server/petstore/aspnetcore-5.0/src/Org.OpenAPITools/wwwroot/openapi-original.json @@ -458,7 +458,7 @@ "tags" : [ "store" ] }, "get" : { - "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", "operationId" : "getOrderById", "parameters" : [ { "description" : "ID of pet that needs to be fetched", diff --git a/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Controllers/StoreApi.cs b/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Controllers/StoreApi.cs index 31f24ebfc7..b925426c76 100644 --- a/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Controllers/StoreApi.cs +++ b/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/Controllers/StoreApi.cs @@ -78,7 +78,7 @@ namespace Org.OpenAPITools.Controllers /// /// Find purchase order by ID /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// ID of pet that needs to be fetched /// successful operation /// Invalid ID supplied diff --git a/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/wwwroot/openapi-original.json b/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/wwwroot/openapi-original.json index 257358c060..0ccbb4c793 100644 --- a/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/wwwroot/openapi-original.json +++ b/samples/server/petstore/aspnetcore-6.0-pocoModels/src/Org.OpenAPITools/wwwroot/openapi-original.json @@ -458,7 +458,7 @@ "tags" : [ "store" ] }, "get" : { - "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", "operationId" : "getOrderById", "parameters" : [ { "description" : "ID of pet that needs to be fetched", diff --git a/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Controllers/StoreApi.cs b/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Controllers/StoreApi.cs index 31f24ebfc7..b925426c76 100644 --- a/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Controllers/StoreApi.cs +++ b/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Controllers/StoreApi.cs @@ -78,7 +78,7 @@ namespace Org.OpenAPITools.Controllers /// /// Find purchase order by ID /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// ID of pet that needs to be fetched /// successful operation /// Invalid ID supplied diff --git a/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/wwwroot/openapi-original.json b/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/wwwroot/openapi-original.json index 257358c060..0ccbb4c793 100644 --- a/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/wwwroot/openapi-original.json +++ b/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/wwwroot/openapi-original.json @@ -458,7 +458,7 @@ "tags" : [ "store" ] }, "get" : { - "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", "operationId" : "getOrderById", "parameters" : [ { "description" : "ID of pet that needs to be fetched", diff --git a/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Controllers/StoreApi.cs b/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Controllers/StoreApi.cs index 31f24ebfc7..b925426c76 100644 --- a/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Controllers/StoreApi.cs +++ b/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/Controllers/StoreApi.cs @@ -78,7 +78,7 @@ namespace Org.OpenAPITools.Controllers /// /// Find purchase order by ID /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// ID of pet that needs to be fetched /// successful operation /// Invalid ID supplied diff --git a/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/wwwroot/openapi-original.json b/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/wwwroot/openapi-original.json index 257358c060..0ccbb4c793 100644 --- a/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/wwwroot/openapi-original.json +++ b/samples/server/petstore/aspnetcore-6.0/src/Org.OpenAPITools/wwwroot/openapi-original.json @@ -458,7 +458,7 @@ "tags" : [ "store" ] }, "get" : { - "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", "operationId" : "getOrderById", "parameters" : [ { "description" : "ID of pet that needs to be fetched", diff --git a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/StoreApi.cs b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/StoreApi.cs index f815bf3901..8e493e3992 100644 --- a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/StoreApi.cs +++ b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/Controllers/StoreApi.cs @@ -78,7 +78,7 @@ namespace Org.OpenAPITools.Controllers /// /// Find purchase order by ID /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// ID of pet that needs to be fetched /// successful operation /// Invalid ID supplied diff --git a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/wwwroot/openapi-original.json b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/wwwroot/openapi-original.json index 81d9cb2a73..333dcf2bfc 100644 --- a/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/wwwroot/openapi-original.json +++ b/samples/server/petstore/aspnetcore/src/Org.OpenAPITools/wwwroot/openapi-original.json @@ -446,7 +446,7 @@ "tags" : [ "store" ] }, "get" : { - "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", "operationId" : "getOrderById", "parameters" : [ { "description" : "ID of pet that needs to be fetched", diff --git a/samples/server/petstore/aspnetcore3/src/Org.OpenAPITools/Controllers/StoreApi.cs b/samples/server/petstore/aspnetcore3/src/Org.OpenAPITools/Controllers/StoreApi.cs index fa909a61a1..4ec7250e14 100644 --- a/samples/server/petstore/aspnetcore3/src/Org.OpenAPITools/Controllers/StoreApi.cs +++ b/samples/server/petstore/aspnetcore3/src/Org.OpenAPITools/Controllers/StoreApi.cs @@ -77,7 +77,7 @@ namespace Org.OpenAPITools.Controllers /// /// Find purchase order by ID /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// ID of pet that needs to be fetched /// successful operation /// Invalid ID supplied diff --git a/samples/server/petstore/aspnetcore3/src/Org.OpenAPITools/wwwroot/openapi-original.json b/samples/server/petstore/aspnetcore3/src/Org.OpenAPITools/wwwroot/openapi-original.json index c72a9d39da..c275869fc6 100644 --- a/samples/server/petstore/aspnetcore3/src/Org.OpenAPITools/wwwroot/openapi-original.json +++ b/samples/server/petstore/aspnetcore3/src/Org.OpenAPITools/wwwroot/openapi-original.json @@ -465,7 +465,7 @@ "tags" : [ "store" ] }, "get" : { - "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", "operationId" : "getOrderById", "parameters" : [ { "description" : "ID of pet that needs to be fetched", @@ -634,7 +634,7 @@ } }, "X-Expires-After" : { - "description" : "date in UTC when toekn expires", + "description" : "date in UTC when token expires", "schema" : { "format" : "date-time", "type" : "string" diff --git a/samples/server/petstore/cpp-pistache/api/StoreApi.h b/samples/server/petstore/cpp-pistache/api/StoreApi.h index f6419da20f..c12d56ebe2 100644 --- a/samples/server/petstore/cpp-pistache/api/StoreApi.h +++ b/samples/server/petstore/cpp-pistache/api/StoreApi.h @@ -85,7 +85,7 @@ private: /// Find purchase order by ID ///
/// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// /// ID of pet that needs to be fetched virtual void get_order_by_id(const int64_t &orderId, Pistache::Http::ResponseWriter &response) = 0; diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/api/FakeApi.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/api/FakeApi.cpp index 07ced7c08c..29959cec0c 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/api/FakeApi.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/api/FakeApi.cpp @@ -1515,7 +1515,7 @@ void FakeResource::handler_DELETE_internal(const std::shared_ptr 10. Other values will generated exceptions", + "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", "operationId" : "getOrderById", "parameters" : [ { "description" : "ID of pet that needs to be fetched", diff --git a/samples/server/petstore/go-api-server/api/openapi.yaml b/samples/server/petstore/go-api-server/api/openapi.yaml index f96f3d8027..6c5ca4308a 100644 --- a/samples/server/petstore/go-api-server/api/openapi.yaml +++ b/samples/server/petstore/go-api-server/api/openapi.yaml @@ -348,7 +348,7 @@ paths: - store get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched diff --git a/samples/server/petstore/go-chi-server/api/openapi.yaml b/samples/server/petstore/go-chi-server/api/openapi.yaml index f96f3d8027..6c5ca4308a 100644 --- a/samples/server/petstore/go-chi-server/api/openapi.yaml +++ b/samples/server/petstore/go-chi-server/api/openapi.yaml @@ -348,7 +348,7 @@ paths: - store get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched diff --git a/samples/server/petstore/go-echo-server/.docs/api/openapi.yaml b/samples/server/petstore/go-echo-server/.docs/api/openapi.yaml index f96f3d8027..6c5ca4308a 100644 --- a/samples/server/petstore/go-echo-server/.docs/api/openapi.yaml +++ b/samples/server/petstore/go-echo-server/.docs/api/openapi.yaml @@ -348,7 +348,7 @@ paths: - store get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched diff --git a/samples/server/petstore/go-gin-api-server/api/openapi.yaml b/samples/server/petstore/go-gin-api-server/api/openapi.yaml index f96f3d8027..6c5ca4308a 100644 --- a/samples/server/petstore/go-gin-api-server/api/openapi.yaml +++ b/samples/server/petstore/go-gin-api-server/api/openapi.yaml @@ -348,7 +348,7 @@ paths: - store get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched diff --git a/samples/server/petstore/go-server-required/api/openapi.yaml b/samples/server/petstore/go-server-required/api/openapi.yaml index e807fe206a..350f69ddfd 100644 --- a/samples/server/petstore/go-server-required/api/openapi.yaml +++ b/samples/server/petstore/go-server-required/api/openapi.yaml @@ -347,7 +347,7 @@ paths: - store get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched diff --git a/samples/server/petstore/graphql-nodejs-express-server/docs/store_api.md b/samples/server/petstore/graphql-nodejs-express-server/docs/store_api.md index 10aac58f00..81227aeca2 100644 --- a/samples/server/petstore/graphql-nodejs-express-server/docs/store_api.md +++ b/samples/server/petstore/graphql-nodejs-express-server/docs/store_api.md @@ -30,7 +30,7 @@ Returns a map of status codes to quantities Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions # **PlaceOrder** > Order PlaceOrder(body) diff --git a/samples/server/petstore/graphql-nodejs-express-server/petstore/api/store_api.graphql b/samples/server/petstore/graphql-nodejs-express-server/petstore/api/store_api.graphql index 28bf223d35..261c1832b6 100644 --- a/samples/server/petstore/graphql-nodejs-express-server/petstore/api/store_api.graphql +++ b/samples/server/petstore/graphql-nodejs-express-server/petstore/api/store_api.graphql @@ -42,7 +42,7 @@ type Query { # @return [Int!] GetInventory: Int! # Find purchase order by ID - # For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + # For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions # @param Int! orderId ID of pet that needs to be fetched # @return [Order] GetOrderById(orderId: Int!): Order diff --git a/samples/server/petstore/haskell-servant/lib/OpenAPIPetstore/API.hs b/samples/server/petstore/haskell-servant/lib/OpenAPIPetstore/API.hs index e788e55956..5a0b734dba 100644 --- a/samples/server/petstore/haskell-servant/lib/OpenAPIPetstore/API.hs +++ b/samples/server/petstore/haskell-servant/lib/OpenAPIPetstore/API.hs @@ -196,7 +196,7 @@ data OpenAPIPetstoreBackend a m = OpenAPIPetstoreBackend , uploadFile :: a -> Integer -> FormUploadFile -> m ApiResponse{- ^ -} , deleteOrder :: Text -> m NoContent{- ^ For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors -} , getInventory :: a -> m ((Map.Map String Int)){- ^ Returns a map of status codes to quantities -} - , getOrderById :: Integer -> m Order{- ^ For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions -} + , getOrderById :: Integer -> m Order{- ^ For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions -} , placeOrder :: Order -> m Order{- ^ -} , createUser :: User -> m NoContent{- ^ This can only be done by the logged in user. -} , createUsersWithArrayInput :: [User] -> m NoContent{- ^ -} diff --git a/samples/server/petstore/haskell-yesod/src/Handler/Store.hs b/samples/server/petstore/haskell-yesod/src/Handler/Store.hs index e359631ea2..52273ac6be 100644 --- a/samples/server/petstore/haskell-yesod/src/Handler/Store.hs +++ b/samples/server/petstore/haskell-yesod/src/Handler/Store.hs @@ -22,7 +22,7 @@ getStoreInventoryR = notImplemented -- | Find purchase order by ID -- --- For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +-- For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions -- operationId: getOrderById getStoreOrderByInt64R :: Int64 -- ^ ID of pet that needs to be fetched -> Handler Value diff --git a/samples/server/petstore/java-helidon-server/mp/src/main/resources/META-INF/openapi.yml b/samples/server/petstore/java-helidon-server/mp/src/main/resources/META-INF/openapi.yml index a599f08c0f..7a9042f14f 100644 --- a/samples/server/petstore/java-helidon-server/mp/src/main/resources/META-INF/openapi.yml +++ b/samples/server/petstore/java-helidon-server/mp/src/main/resources/META-INF/openapi.yml @@ -412,7 +412,7 @@ paths: x-accepts: application/json get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched @@ -712,7 +712,7 @@ paths: style: form responses: "400": - description: Someting wrong + description: Something wrong security: - bearer_test: [] summary: Fake endpoint to test group parameters (optional) diff --git a/samples/server/petstore/java-helidon-server/se/src/main/resources/META-INF/openapi.yml b/samples/server/petstore/java-helidon-server/se/src/main/resources/META-INF/openapi.yml index a599f08c0f..7a9042f14f 100644 --- a/samples/server/petstore/java-helidon-server/se/src/main/resources/META-INF/openapi.yml +++ b/samples/server/petstore/java-helidon-server/se/src/main/resources/META-INF/openapi.yml @@ -412,7 +412,7 @@ paths: x-accepts: application/json get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched @@ -712,7 +712,7 @@ paths: style: form responses: "400": - description: Someting wrong + description: Something wrong security: - bearer_test: [] summary: Fake endpoint to test group parameters (optional) diff --git a/samples/server/petstore/java-inflector/src/main/openapi/openapi.yaml b/samples/server/petstore/java-inflector/src/main/openapi/openapi.yaml index 0c89ed2142..82d6b7b8bc 100644 --- a/samples/server/petstore/java-inflector/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/java-inflector/src/main/openapi/openapi.yaml @@ -383,7 +383,7 @@ paths: x-accepts: application/json get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched @@ -685,7 +685,7 @@ paths: responses: "400": content: {} - description: Someting wrong + description: Something wrong summary: Fake endpoint to test group parameters (optional) tags: - fake diff --git a/samples/server/petstore/java-micronaut-server/docs/controllers/StoreController.md b/samples/server/petstore/java-micronaut-server/docs/controllers/StoreController.md index f8e82ff30e..db2aa91763 100644 --- a/samples/server/petstore/java-micronaut-server/docs/controllers/StoreController.md +++ b/samples/server/petstore/java-micronaut-server/docs/controllers/StoreController.md @@ -61,7 +61,7 @@ Mono StoreController.getOrderById(orderId) Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Parameters Name | Type | Description | Notes diff --git a/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/controller/StoreController.java b/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/controller/StoreController.java index 406b780b5a..c7f319e57b 100644 --- a/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/controller/StoreController.java +++ b/samples/server/petstore/java-micronaut-server/src/main/java/org/openapitools/controller/StoreController.java @@ -94,7 +94,7 @@ public class StoreController { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param orderId ID of pet that needs to be fetched (required) * @return Order diff --git a/samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/controller/StoreControllerSpec.groovy b/samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/controller/StoreControllerSpec.groovy index 4af6ebffac..98a808ccb1 100644 --- a/samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/controller/StoreControllerSpec.groovy +++ b/samples/server/petstore/java-micronaut-server/src/test/groovy/org/openapitools/controller/StoreControllerSpec.groovy @@ -127,7 +127,7 @@ class StoreControllerSpec extends Specification { * * The method should: Find purchase order by ID * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * TODO fill in the parameters and test return value. */ diff --git a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/FakeApi.java index de8256e692..bd993c1f0b 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/FakeApi.java @@ -194,7 +194,7 @@ public class FakeApi { @io.swagger.annotations.ApiOperation(value = "Fake endpoint to test group parameters (optional)", notes = "Fake endpoint to test group parameters (optional)", response = Void.class, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 400, message = "Someting wrong", response = Void.class) }) + @io.swagger.annotations.ApiResponse(code = 400, message = "Something wrong", response = Void.class) }) public Response testGroupParameters(@ApiParam(value = "Required String in group parameters",required=true) @QueryParam("required_string_group") Integer requiredStringGroup ,@ApiParam(value = "Required Boolean in group parameters" ,required=true)@HeaderParam("required_boolean_group") Boolean requiredBooleanGroup ,@ApiParam(value = "Required Integer in group parameters",required=true) @QueryParam("required_int64_group") Long requiredInt64Group diff --git a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/StoreApi.java index 63dd05bf4d..8266330ccc 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/StoreApi.java @@ -62,7 +62,7 @@ public class StoreApi { @Path("/order/{order_id}") @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", }) + @io.swagger.annotations.ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", response = Order.class, tags={ "store", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class), diff --git a/samples/server/petstore/java-pkmst/Readme.md b/samples/server/petstore/java-pkmst/Readme.md index 9867e11590..8b1886af39 100644 --- a/samples/server/petstore/java-pkmst/Readme.md +++ b/samples/server/petstore/java-pkmst/Readme.md @@ -6,7 +6,7 @@ but can enable as your microservice capabilities needs to be extended to meet st PKMST feature set. a)Read the Swagger supplied and will create a maven project b)Create basic controller based on rest verb and path configured in swagger -c)generate default unit test cose using junit +c)generate default unit test case using junit d)generate all needed dependency needed to run the microservice on local e)generate a default manifest file that allows you to push code to cloudfoundry instance ( eg pcf , ibm bluemix etc) @@ -19,7 +19,7 @@ i)Allow you to configure Oauth2 security based authorization for your microservi Additional Features j)generate sample cucumber file and dependency to drive your Behaviour driven development. - k)generate gatling based performance test, which can be excuted via build pipeline like jenkins etc. + k)generate gatling based performance test, which can be executed via build pipeline like jenkins etc. Working: diff --git a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/PetApiController.java b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/PetApiController.java index 4e520a049f..179e261e47 100644 --- a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/PetApiController.java +++ b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/PetApiController.java @@ -21,7 +21,7 @@ import java.util.List; import com.fasterxml.jackson.databind.ObjectMapper; import java.io.IOException; /** - * Api implemention + * Api implementation * @author pkmst * */ diff --git a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/StoreApi.java b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/StoreApi.java index e6efb7af18..7f8af21d7d 100644 --- a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/StoreApi.java +++ b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/StoreApi.java @@ -46,7 +46,7 @@ public interface StoreApi { ResponseEntity> getInventory( @RequestHeader(value = "Accept", required = false) String accept) throws Exception; - @ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", }) + @ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", response = Order.class, tags={ "store", }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Order.class), @ApiResponse(code = 400, message = "Invalid ID supplied"), diff --git a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/StoreApiController.java b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/StoreApiController.java index 8583b8b0a5..bac810e0ac 100644 --- a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/StoreApiController.java +++ b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/StoreApiController.java @@ -20,7 +20,7 @@ import java.util.List; import com.fasterxml.jackson.databind.ObjectMapper; import java.io.IOException; /** - * Api implemention + * Api implementation * @author pkmst * */ diff --git a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/UserApiController.java b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/UserApiController.java index 409941aa94..3ab411b8fe 100644 --- a/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/UserApiController.java +++ b/samples/server/petstore/java-pkmst/src/main/java/com/prokarma/pkmst/controller/UserApiController.java @@ -20,7 +20,7 @@ import java.util.List; import com.fasterxml.jackson.databind.ObjectMapper; import java.io.IOException; /** - * Api implemention + * Api implementation * @author pkmst * */ diff --git a/samples/server/petstore/java-pkmst/src/test/java/com/prokarma/pkmst/controller/StoreApiTest.java b/samples/server/petstore/java-pkmst/src/test/java/com/prokarma/pkmst/controller/StoreApiTest.java index 9232117121..1564ff4b85 100644 --- a/samples/server/petstore/java-pkmst/src/test/java/com/prokarma/pkmst/controller/StoreApiTest.java +++ b/samples/server/petstore/java-pkmst/src/test/java/com/prokarma/pkmst/controller/StoreApiTest.java @@ -74,7 +74,7 @@ public class StoreApiTest { /** * Find purchase order by ID * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @throws Exception * if the Api call fails diff --git a/samples/server/petstore/java-play-framework-api-package-override/public/openapi.json b/samples/server/petstore/java-play-framework-api-package-override/public/openapi.json index e5d8a0e3b0..8b12859e64 100644 --- a/samples/server/petstore/java-play-framework-api-package-override/public/openapi.json +++ b/samples/server/petstore/java-play-framework-api-package-override/public/openapi.json @@ -462,7 +462,7 @@ "x-accepts" : "application/json" }, "get" : { - "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", "operationId" : "getOrderById", "parameters" : [ { "description" : "ID of pet that needs to be fetched", diff --git a/samples/server/petstore/java-play-framework-async/public/openapi.json b/samples/server/petstore/java-play-framework-async/public/openapi.json index e5d8a0e3b0..8b12859e64 100644 --- a/samples/server/petstore/java-play-framework-async/public/openapi.json +++ b/samples/server/petstore/java-play-framework-async/public/openapi.json @@ -462,7 +462,7 @@ "x-accepts" : "application/json" }, "get" : { - "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", "operationId" : "getOrderById", "parameters" : [ { "description" : "ID of pet that needs to be fetched", diff --git a/samples/server/petstore/java-play-framework-controller-only/public/openapi.json b/samples/server/petstore/java-play-framework-controller-only/public/openapi.json index e5d8a0e3b0..8b12859e64 100644 --- a/samples/server/petstore/java-play-framework-controller-only/public/openapi.json +++ b/samples/server/petstore/java-play-framework-controller-only/public/openapi.json @@ -462,7 +462,7 @@ "x-accepts" : "application/json" }, "get" : { - "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", "operationId" : "getOrderById", "parameters" : [ { "description" : "ID of pet that needs to be fetched", diff --git a/samples/server/petstore/java-play-framework-fake-endpoints-with-security/public/openapi.json b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/public/openapi.json index 9657373ab3..ece66be6e4 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints-with-security/public/openapi.json +++ b/samples/server/petstore/java-play-framework-fake-endpoints-with-security/public/openapi.json @@ -352,7 +352,7 @@ }, "securitySchemes" : { "petstore_token" : { - "description" : "security definition for using keycloak authentification with control site.", + "description" : "security definition for using keycloak authentication with control site.", "flows" : { "authorizationCode" : { "authorizationUrl" : "https://keycloak-dev.business.stingray.com/auth/realms/CSLocal/protocol/openid-connect/auth", diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json b/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json index 2e2d45c7b3..2e6dec7bc5 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json +++ b/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json @@ -477,7 +477,7 @@ "x-accepts" : "application/json" }, "get" : { - "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", "operationId" : "getOrderById", "parameters" : [ { "description" : "ID of pet that needs to be fetched", @@ -884,7 +884,7 @@ "responses" : { "400" : { "content" : { }, - "description" : "Someting wrong" + "description" : "Something wrong" } }, "summary" : "Fake endpoint to test group parameters (optional)", diff --git a/samples/server/petstore/java-play-framework-no-bean-validation/public/openapi.json b/samples/server/petstore/java-play-framework-no-bean-validation/public/openapi.json index e5d8a0e3b0..8b12859e64 100644 --- a/samples/server/petstore/java-play-framework-no-bean-validation/public/openapi.json +++ b/samples/server/petstore/java-play-framework-no-bean-validation/public/openapi.json @@ -462,7 +462,7 @@ "x-accepts" : "application/json" }, "get" : { - "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", "operationId" : "getOrderById", "parameters" : [ { "description" : "ID of pet that needs to be fetched", diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/public/openapi.json b/samples/server/petstore/java-play-framework-no-exception-handling/public/openapi.json index e5d8a0e3b0..8b12859e64 100644 --- a/samples/server/petstore/java-play-framework-no-exception-handling/public/openapi.json +++ b/samples/server/petstore/java-play-framework-no-exception-handling/public/openapi.json @@ -462,7 +462,7 @@ "x-accepts" : "application/json" }, "get" : { - "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", "operationId" : "getOrderById", "parameters" : [ { "description" : "ID of pet that needs to be fetched", diff --git a/samples/server/petstore/java-play-framework-no-interface/public/openapi.json b/samples/server/petstore/java-play-framework-no-interface/public/openapi.json index e5d8a0e3b0..8b12859e64 100644 --- a/samples/server/petstore/java-play-framework-no-interface/public/openapi.json +++ b/samples/server/petstore/java-play-framework-no-interface/public/openapi.json @@ -462,7 +462,7 @@ "x-accepts" : "application/json" }, "get" : { - "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", "operationId" : "getOrderById", "parameters" : [ { "description" : "ID of pet that needs to be fetched", diff --git a/samples/server/petstore/java-play-framework-no-nullable/public/openapi.json b/samples/server/petstore/java-play-framework-no-nullable/public/openapi.json index e5d8a0e3b0..8b12859e64 100644 --- a/samples/server/petstore/java-play-framework-no-nullable/public/openapi.json +++ b/samples/server/petstore/java-play-framework-no-nullable/public/openapi.json @@ -462,7 +462,7 @@ "x-accepts" : "application/json" }, "get" : { - "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", "operationId" : "getOrderById", "parameters" : [ { "description" : "ID of pet that needs to be fetched", diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/public/openapi.json b/samples/server/petstore/java-play-framework-no-wrap-calls/public/openapi.json index e5d8a0e3b0..8b12859e64 100644 --- a/samples/server/petstore/java-play-framework-no-wrap-calls/public/openapi.json +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/public/openapi.json @@ -462,7 +462,7 @@ "x-accepts" : "application/json" }, "get" : { - "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", "operationId" : "getOrderById", "parameters" : [ { "description" : "ID of pet that needs to be fetched", diff --git a/samples/server/petstore/java-play-framework/public/openapi.json b/samples/server/petstore/java-play-framework/public/openapi.json index e5d8a0e3b0..8b12859e64 100644 --- a/samples/server/petstore/java-play-framework/public/openapi.json +++ b/samples/server/petstore/java-play-framework/public/openapi.json @@ -462,7 +462,7 @@ "x-accepts" : "application/json" }, "get" : { - "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", "operationId" : "getOrderById", "parameters" : [ { "description" : "ID of pet that needs to be fetched", diff --git a/samples/server/petstore/java-undertow/src/main/java/org/openapitools/handler/PathHandlerInterface.java b/samples/server/petstore/java-undertow/src/main/java/org/openapitools/handler/PathHandlerInterface.java index a9083dc97b..84384bbef8 100644 --- a/samples/server/petstore/java-undertow/src/main/java/org/openapitools/handler/PathHandlerInterface.java +++ b/samples/server/petstore/java-undertow/src/main/java/org/openapitools/handler/PathHandlerInterface.java @@ -342,7 +342,7 @@ public interface PathHandlerInterface { /** *

Find purchase order by ID

* - *

For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions

+ *

For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions

* *

Endpoint: {@link Methods#GET GET} "/v2/store/order/{orderId}" (privileged: false)

* diff --git a/samples/server/petstore/java-undertow/src/main/resources/config/openapi.json b/samples/server/petstore/java-undertow/src/main/resources/config/openapi.json index e5d8a0e3b0..8b12859e64 100644 --- a/samples/server/petstore/java-undertow/src/main/resources/config/openapi.json +++ b/samples/server/petstore/java-undertow/src/main/resources/config/openapi.json @@ -462,7 +462,7 @@ "x-accepts" : "application/json" }, "get" : { - "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", "operationId" : "getOrderById", "parameters" : [ { "description" : "ID of pet that needs to be fetched", diff --git a/samples/server/petstore/java-vertx-web/src/main/resources/openapi.yaml b/samples/server/petstore/java-vertx-web/src/main/resources/openapi.yaml index 206abd76cb..3020b80831 100644 --- a/samples/server/petstore/java-vertx-web/src/main/resources/openapi.yaml +++ b/samples/server/petstore/java-vertx-web/src/main/resources/openapi.yaml @@ -364,7 +364,7 @@ paths: x-accepts: application/json get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/api/StoreApi.java index 07e1505d06..820d6ef767 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/gen/java/org/openapitools/api/StoreApi.java @@ -61,7 +61,7 @@ public interface StoreApi { /** * Find purchase order by ID * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * */ @GET diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java index 3944d1fd04..c83c4ff691 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java @@ -51,7 +51,7 @@ public class StoreApiServiceImpl implements StoreApi { /** * Find purchase order by ID * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * */ public Order getOrderById(Long orderId) { diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/org/openapitools/api/StoreApiTest.java b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/org/openapitools/api/StoreApiTest.java index 54eb5757b9..58d1014fcd 100644 --- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/org/openapitools/api/StoreApiTest.java +++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/src/test/java/org/openapitools/api/StoreApiTest.java @@ -110,7 +110,7 @@ public class StoreApiTest { /** * Find purchase order by ID * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @throws ApiException * if the Api call fails diff --git a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/api/StoreApi.java index db73aad9f6..40870e41c7 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/api/StoreApi.java @@ -66,7 +66,7 @@ public class StoreApi { @Path("/order/{orderId}") @Produces({ "application/xml", "application/json" }) - @ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store" }) + @ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", response = Order.class, tags={ "store" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Order.class), @ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/api/StoreApi.java index 8cf7a84715..96b4b99c44 100644 --- a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/gen/java/org/openapitools/api/StoreApi.java @@ -61,7 +61,7 @@ public interface StoreApi { /** * Find purchase order by ID * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * */ @GET diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java index 3944d1fd04..c83c4ff691 100644 --- a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java @@ -51,7 +51,7 @@ public class StoreApiServiceImpl implements StoreApi { /** * Find purchase order by ID * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * */ public Order getOrderById(Long orderId) { diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/test/java/org/openapitools/api/StoreApiTest.java b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/test/java/org/openapitools/api/StoreApiTest.java index 54eb5757b9..58d1014fcd 100644 --- a/samples/server/petstore/jaxrs-cxf-non-spring-app/src/test/java/org/openapitools/api/StoreApiTest.java +++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/src/test/java/org/openapitools/api/StoreApiTest.java @@ -110,7 +110,7 @@ public class StoreApiTest { /** * Find purchase order by ID * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @throws ApiException * if the Api call fails 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 fc4cb1ebee..6b159ebc17 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 @@ -161,7 +161,7 @@ public interface FakeApi { @ApiOperation(value = "Fake endpoint to test group parameters (optional)", tags={ "fake" }) @ApiResponses(value = { - @ApiResponse(code = 400, message = "Someting wrong") }) + @ApiResponse(code = 400, message = "Something wrong") }) public void testGroupParameters(@QueryParam("required_string_group") @NotNull Integer requiredStringGroup, @HeaderParam("required_boolean_group") @NotNull Boolean requiredBooleanGroup, @QueryParam("required_int64_group") @NotNull Long requiredInt64Group, @QueryParam("string_group") Integer stringGroup, @HeaderParam("boolean_group") Boolean booleanGroup, @QueryParam("int64_group") Long int64Group); /** diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/api/StoreApi.java index cb4bbe78aa..b1d2de63d0 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/api/StoreApi.java @@ -62,7 +62,7 @@ public interface StoreApi { /** * Find purchase order by ID * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * */ @GET 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 ee016a4fd3..06d50eaabd 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 @@ -72,7 +72,7 @@ public class StoreApiServiceImpl implements StoreApi { /** * Find purchase order by ID * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * */ @Override diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/test/java/org/openapitools/api/StoreApiTest.java b/samples/server/petstore/jaxrs-cxf-test-data/src/test/java/org/openapitools/api/StoreApiTest.java index b56220e980..5d869e6ffd 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/src/test/java/org/openapitools/api/StoreApiTest.java +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/test/java/org/openapitools/api/StoreApiTest.java @@ -146,7 +146,7 @@ public class StoreApiTest { /** * Find purchase order by ID * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @throws ApiException if the API call fails */ diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/FakeApi.java index b21fadcb1b..fc6c48b50d 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/FakeApi.java @@ -158,7 +158,7 @@ public interface FakeApi { @ApiOperation(value = "Fake endpoint to test group parameters (optional)", tags={ "fake" }) @ApiResponses(value = { - @ApiResponse(code = 400, message = "Someting wrong") }) + @ApiResponse(code = 400, message = "Something wrong") }) public void testGroupParameters(@QueryParam("required_string_group") @NotNull Integer requiredStringGroup, @HeaderParam("required_boolean_group") @NotNull Boolean requiredBooleanGroup, @QueryParam("required_int64_group") @NotNull Long requiredInt64Group, @QueryParam("string_group") Integer stringGroup, @HeaderParam("boolean_group") Boolean booleanGroup, @QueryParam("int64_group") Long int64Group); /** diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/StoreApi.java index 6b23b7c95a..9cfd254736 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/StoreApi.java @@ -61,7 +61,7 @@ public interface StoreApi { /** * Find purchase order by ID * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * */ @GET diff --git a/samples/server/petstore/jaxrs-cxf/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java b/samples/server/petstore/jaxrs-cxf/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java index 668e92ac0a..b55199d58d 100644 --- a/samples/server/petstore/jaxrs-cxf/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-cxf/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java @@ -51,7 +51,7 @@ public class StoreApiServiceImpl implements StoreApi { /** * Find purchase order by ID * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * */ public Order getOrderById(Long orderId) { diff --git a/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/StoreApiTest.java b/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/StoreApiTest.java index 7f1910cf79..53eee27fdd 100644 --- a/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/StoreApiTest.java +++ b/samples/server/petstore/jaxrs-cxf/src/test/java/org/openapitools/api/StoreApiTest.java @@ -98,7 +98,7 @@ public class StoreApiTest { /** * Find purchase order by ID * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @throws ApiException * if the Api call fails diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeApi.java index 3f87596c76..899dfde8ef 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeApi.java @@ -195,7 +195,7 @@ public class FakeApi { @io.swagger.annotations.ApiOperation(value = "Fake endpoint to test group parameters (optional)", notes = "Fake endpoint to test group parameters (optional)", response = Void.class, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 400, message = "Someting wrong", response = Void.class) + @io.swagger.annotations.ApiResponse(code = 400, message = "Something wrong", response = Void.class) }) public Response testGroupParameters(@ApiParam(value = "Required String in group parameters", required = true) @QueryParam("required_string_group") @NotNull Integer requiredStringGroup,@ApiParam(value = "Required Boolean in group parameters" ,required=true)@HeaderParam("required_boolean_group") Boolean requiredBooleanGroup,@ApiParam(value = "Required Integer in group parameters", required = true) @QueryParam("required_int64_group") @NotNull Long requiredInt64Group,@ApiParam(value = "String in group parameters") @QueryParam("string_group") Integer stringGroup,@ApiParam(value = "Boolean in group parameters" )@HeaderParam("boolean_group") Boolean booleanGroup,@ApiParam(value = "Integer in group parameters") @QueryParam("int64_group") Long int64Group,@Context SecurityContext securityContext) throws NotFoundException { diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/StoreApi.java index 92d0a9cda8..9e52fe58f5 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/StoreApi.java @@ -86,7 +86,7 @@ public class StoreApi { @Path("/order/{order_id}") @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", }) + @io.swagger.annotations.ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", response = Order.class, tags={ "store", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeApi.java index 8bc0907117..1d59248393 100644 --- a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/FakeApi.java @@ -237,7 +237,7 @@ public class FakeApi { @io.swagger.annotations.Authorization(value = "bearer_test") }, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 400, message = "Someting wrong", response = Void.class) + @io.swagger.annotations.ApiResponse(code = 400, message = "Something wrong", response = Void.class) }) public Response testGroupParameters(@ApiParam(value = "Required String in group parameters", required = true) @QueryParam("required_string_group") @NotNull Integer requiredStringGroup,@ApiParam(value = "Required Boolean in group parameters" ,required=true)@HeaderParam("required_boolean_group") Boolean requiredBooleanGroup,@ApiParam(value = "Required Integer in group parameters", required = true) @QueryParam("required_int64_group") @NotNull Long requiredInt64Group,@ApiParam(value = "String in group parameters") @QueryParam("string_group") Integer stringGroup,@ApiParam(value = "Boolean in group parameters" )@HeaderParam("boolean_group") Boolean booleanGroup,@ApiParam(value = "Integer in group parameters") @QueryParam("int64_group") Long int64Group,@Context SecurityContext securityContext) throws NotFoundException { diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/StoreApi.java index 6f9333a9b0..aaaa25f410 100644 --- a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/api/StoreApi.java @@ -86,7 +86,7 @@ public class StoreApi { @Path("/order/{order_id}") @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", }) + @io.swagger.annotations.ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", response = Order.class, tags={ "store", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), diff --git a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/api/StoreApi.java index a797123273..3439a9fab1 100644 --- a/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-resteasy/default/src/gen/java/org/openapitools/api/StoreApi.java @@ -63,7 +63,7 @@ public class StoreApi { @Path("/order/{orderId}") @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", }) + @io.swagger.annotations.ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", response = Order.class, tags={ "store", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class), diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/api/StoreApi.java index 11213b47e3..74a885d263 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/src/gen/java/org/openapitools/api/StoreApi.java @@ -51,7 +51,7 @@ public interface StoreApi { @Path("/order/{orderId}") @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", }) + @io.swagger.annotations.ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", response = Order.class, tags={ "store", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class), diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/api/StoreApi.java index 11213b47e3..74a885d263 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/src/gen/java/org/openapitools/api/StoreApi.java @@ -51,7 +51,7 @@ public interface StoreApi { @Path("/order/{orderId}") @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", }) + @io.swagger.annotations.ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", response = Order.class, tags={ "store", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class), diff --git a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/api/StoreApi.java index 11213b47e3..74a885d263 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-resteasy/eap/src/gen/java/org/openapitools/api/StoreApi.java @@ -51,7 +51,7 @@ public interface StoreApi { @Path("/order/{orderId}") @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", }) + @io.swagger.annotations.ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", response = Order.class, tags={ "store", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class), diff --git a/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/api/StoreApi.java index a797123273..3439a9fab1 100644 --- a/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-resteasy/java8/src/gen/java/org/openapitools/api/StoreApi.java @@ -63,7 +63,7 @@ public class StoreApi { @Path("/order/{orderId}") @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", }) + @io.swagger.annotations.ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", response = Order.class, tags={ "store", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class), diff --git a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/api/StoreApi.java index a797123273..3439a9fab1 100644 --- a/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-resteasy/joda/src/gen/java/org/openapitools/api/StoreApi.java @@ -63,7 +63,7 @@ public class StoreApi { @Path("/order/{orderId}") @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", }) + @io.swagger.annotations.ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", response = Order.class, tags={ "store", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class), diff --git a/samples/server/petstore/jaxrs-spec-interface-response/README.md b/samples/server/petstore/jaxrs-spec-interface-response/README.md index 553be1f4b1..0fccd2bb18 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/README.md +++ b/samples/server/petstore/jaxrs-spec-interface-response/README.md @@ -8,5 +8,5 @@ This is an example of building a OpenAPI-enabled JAX-RS server. This example uses the [JAX-RS](https://jax-rs-spec.java.net/) framework. This project produces a jar that defines some interfaces. -The jar can be used in combination with an other project providing the implementation. +The jar can be used in combination with another project providing the implementation. diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/FakeApi.java index ca6bdded41..23a56fbb37 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/FakeApi.java @@ -114,7 +114,7 @@ public interface FakeApi { @DELETE @ApiOperation(value = "Fake endpoint to test group parameters (optional)", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake" }) @ApiResponses(value = { - @ApiResponse(code = 400, message = "Someting wrong", response = Void.class) }) + @ApiResponse(code = 400, message = "Something wrong", response = Void.class) }) Response testGroupParameters(@QueryParam("required_string_group") @NotNull @ApiParam("Required String in group parameters") Integer requiredStringGroup,@HeaderParam("required_boolean_group") @NotNull @ApiParam("Required Boolean in group parameters") Boolean requiredBooleanGroup,@QueryParam("required_int64_group") @NotNull @ApiParam("Required Integer in group parameters") Long requiredInt64Group,@QueryParam("string_group") @ApiParam("String in group parameters") Integer stringGroup,@HeaderParam("boolean_group") @ApiParam("Boolean in group parameters") Boolean booleanGroup,@QueryParam("int64_group") @ApiParam("Integer in group parameters") Long int64Group); @POST diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/StoreApi.java index 98797af84d..b2a8f9c8ee 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/gen/java/org/openapitools/api/StoreApi.java @@ -41,7 +41,7 @@ public interface StoreApi { @GET @Path("/order/{order_id}") @Produces({ "application/xml", "application/json" }) - @ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", tags={ "store" }) + @ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", tags={ "store" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Order.class), @ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), diff --git a/samples/server/petstore/jaxrs-spec-interface-response/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec-interface-response/src/main/openapi/openapi.yaml index bf1a427641..d96b78131c 100644 --- a/samples/server/petstore/jaxrs-spec-interface-response/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec-interface-response/src/main/openapi/openapi.yaml @@ -392,7 +392,7 @@ paths: - tag: store get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched @@ -714,7 +714,7 @@ paths: responses: "400": content: {} - description: Someting wrong + description: Something wrong summary: Fake endpoint to test group parameters (optional) tags: - fake diff --git a/samples/server/petstore/jaxrs-spec-interface/README.md b/samples/server/petstore/jaxrs-spec-interface/README.md index 553be1f4b1..0fccd2bb18 100644 --- a/samples/server/petstore/jaxrs-spec-interface/README.md +++ b/samples/server/petstore/jaxrs-spec-interface/README.md @@ -8,5 +8,5 @@ This is an example of building a OpenAPI-enabled JAX-RS server. This example uses the [JAX-RS](https://jax-rs-spec.java.net/) framework. This project produces a jar that defines some interfaces. -The jar can be used in combination with an other project providing the implementation. +The jar can be used in combination with another project providing the implementation. diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/FakeApi.java index 8268f49481..77b99b940c 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/FakeApi.java @@ -117,7 +117,7 @@ public interface FakeApi { @DELETE @ApiOperation(value = "Fake endpoint to test group parameters (optional)", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake" }) @ApiResponses(value = { - @ApiResponse(code = 400, message = "Someting wrong", response = Void.class) }) + @ApiResponse(code = 400, message = "Something wrong", response = Void.class) }) void testGroupParameters(@QueryParam("required_string_group") @NotNull @ApiParam("Required String in group parameters") Integer requiredStringGroup,@HeaderParam("required_boolean_group") @NotNull @ApiParam("Required Boolean in group parameters") Boolean requiredBooleanGroup,@QueryParam("required_int64_group") @NotNull @ApiParam("Required Integer in group parameters") Long requiredInt64Group,@QueryParam("string_group") @ApiParam("String in group parameters") Integer stringGroup,@HeaderParam("boolean_group") @ApiParam("Boolean in group parameters") Boolean booleanGroup,@QueryParam("int64_group") @ApiParam("Integer in group parameters") Long int64Group); @POST diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/StoreApi.java index 5d2ed08217..aac5337518 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/StoreApi.java @@ -41,7 +41,7 @@ public interface StoreApi { @GET @Path("/order/{order_id}") @Produces({ "application/xml", "application/json" }) - @ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", tags={ "store" }) + @ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", tags={ "store" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Order.class), @ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), diff --git a/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml index 2999e6f2f8..658d8a96b3 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml @@ -392,7 +392,7 @@ paths: - tag: store get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched @@ -714,7 +714,7 @@ paths: responses: "400": content: {} - description: Someting wrong + description: Something wrong summary: Fake endpoint to test group parameters (optional) tags: - fake diff --git a/samples/server/petstore/jaxrs-spec/README.md b/samples/server/petstore/jaxrs-spec/README.md index 603301eaf3..da90cb71c1 100644 --- a/samples/server/petstore/jaxrs-spec/README.md +++ b/samples/server/petstore/jaxrs-spec/README.md @@ -10,7 +10,7 @@ This example uses the [JAX-RS](https://jax-rs-spec.java.net/) framework. The JAX-RS implementation needs to be provided by the application server you are deploying on. -To run the server from the command line, you can use maven to provision an start a TomEE Server. +To run the server from the command line, you can use maven to provision and start a TomEE Server. Please execute the following: ``` diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/FakeApi.java index da38dd5407..43f4d635a0 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/FakeApi.java @@ -147,7 +147,7 @@ public class FakeApi { @DELETE @ApiOperation(value = "Fake endpoint to test group parameters (optional)", notes = "Fake endpoint to test group parameters (optional)", response = Void.class, tags={ "fake" }) @ApiResponses(value = { - @ApiResponse(code = 400, message = "Someting wrong", response = Void.class) + @ApiResponse(code = 400, message = "Something wrong", response = Void.class) }) public Response testGroupParameters(@QueryParam("required_string_group") @NotNull @ApiParam("Required String in group parameters") Integer requiredStringGroup,@HeaderParam("required_boolean_group") @NotNull @ApiParam("Required Boolean in group parameters") Boolean requiredBooleanGroup,@QueryParam("required_int64_group") @NotNull @ApiParam("Required Integer in group parameters") Long requiredInt64Group,@QueryParam("string_group") @ApiParam("String in group parameters") Integer stringGroup,@HeaderParam("boolean_group") @ApiParam("Boolean in group parameters") Boolean booleanGroup,@QueryParam("int64_group") @ApiParam("Integer in group parameters") Long int64Group) { return Response.ok().entity("magic!").build(); diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/StoreApi.java index ada18d6e78..470a9fc2bb 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/StoreApi.java @@ -47,7 +47,7 @@ public class StoreApi { @GET @Path("/order/{order_id}") @Produces({ "application/xml", "application/json" }) - @ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store" }) + @ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", response = Order.class, tags={ "store" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Order.class), @ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), diff --git a/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml index 2999e6f2f8..658d8a96b3 100644 --- a/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml @@ -392,7 +392,7 @@ paths: - tag: store get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched @@ -714,7 +714,7 @@ paths: responses: "400": content: {} - description: Someting wrong + description: Something wrong summary: Fake endpoint to test group parameters (optional) tags: - fake diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/FakeApi.java index 6c784c0d2b..57d6f247a4 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/FakeApi.java @@ -202,7 +202,7 @@ public class FakeApi { @io.swagger.annotations.ApiOperation(value = "Fake endpoint to test group parameters (optional)", notes = "Fake endpoint to test group parameters (optional)", response = Void.class, tags={ "fake" }) @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 400, message = "Someting wrong", response = Void.class) }) + @io.swagger.annotations.ApiResponse(code = 400, message = "Something wrong", response = Void.class) }) public Response testGroupParameters( @ApiParam(value = "Required String in group parameters", required = true) @QueryParam("required_string_group") @NotNull Integer requiredStringGroup, @ApiParam(value = "Required Boolean in group parameters" ,required=true)@HeaderParam("required_boolean_group") Boolean requiredBooleanGroup, diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/StoreApi.java index 90fdaa5342..7350bcfcaa 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/StoreApi.java @@ -66,7 +66,7 @@ public class StoreApi { @Path("/order/{order_id}") @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store" }) + @io.swagger.annotations.ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", response = Order.class, tags={ "store" }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/FakeApi.java index 6cd432d975..698d61867b 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/FakeApi.java @@ -203,7 +203,7 @@ public class FakeApi { @io.swagger.annotations.ApiOperation(value = "Fake endpoint to test group parameters (optional)", notes = "Fake endpoint to test group parameters (optional)", response = Void.class, tags={ "fake" }) @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 400, message = "Someting wrong", response = Void.class) }) + @io.swagger.annotations.ApiResponse(code = 400, message = "Something wrong", response = Void.class) }) public Response testGroupParameters( @ApiParam(value = "Required String in group parameters", required = true) @QueryParam("required_string_group") @NotNull Integer requiredStringGroup, @ApiParam(value = "Required Boolean in group parameters" ,required=true)@HeaderParam("required_boolean_group") Boolean requiredBooleanGroup, diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/StoreApi.java index 601e971958..b0692bfa87 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/StoreApi.java @@ -66,7 +66,7 @@ public class StoreApi { @Path("/order/{order_id}") @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store" }) + @io.swagger.annotations.ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", response = Order.class, tags={ "store" }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/FakeApi.java index f76bb76e05..b37b7cad26 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/FakeApi.java @@ -193,7 +193,7 @@ public class FakeApi { @io.swagger.annotations.ApiOperation(value = "Fake endpoint to test group parameters (optional)", notes = "Fake endpoint to test group parameters (optional)", response = Void.class, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 400, message = "Someting wrong", response = Void.class) + @io.swagger.annotations.ApiResponse(code = 400, message = "Something wrong", response = Void.class) }) public Response testGroupParameters(@ApiParam(value = "Required String in group parameters", required = true) @QueryParam("required_string_group") @NotNull Integer requiredStringGroup,@ApiParam(value = "Required Boolean in group parameters" ,required=true)@HeaderParam("required_boolean_group") Boolean requiredBooleanGroup,@ApiParam(value = "Required Integer in group parameters", required = true) @QueryParam("required_int64_group") @NotNull Long requiredInt64Group,@ApiParam(value = "String in group parameters") @QueryParam("string_group") Integer stringGroup,@ApiParam(value = "Boolean in group parameters" )@HeaderParam("boolean_group") Boolean booleanGroup,@ApiParam(value = "Integer in group parameters") @QueryParam("int64_group") Long int64Group,@Context SecurityContext securityContext) throws NotFoundException { diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/StoreApi.java index c208045360..4e45841df4 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/StoreApi.java @@ -86,7 +86,7 @@ public class StoreApi { @Path("/order/{order_id}") @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", }) + @io.swagger.annotations.ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", response = Order.class, tags={ "store", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/FakeApi.java index 59ee63b188..ad937f064f 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/FakeApi.java @@ -194,7 +194,7 @@ public class FakeApi { @io.swagger.annotations.ApiOperation(value = "Fake endpoint to test group parameters (optional)", notes = "Fake endpoint to test group parameters (optional)", response = Void.class, tags={ "fake", }) @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 400, message = "Someting wrong", response = Void.class) + @io.swagger.annotations.ApiResponse(code = 400, message = "Something wrong", response = Void.class) }) public Response testGroupParameters(@ApiParam(value = "Required String in group parameters", required = true) @QueryParam("required_string_group") @NotNull Integer requiredStringGroup,@ApiParam(value = "Required Boolean in group parameters" ,required=true)@HeaderParam("required_boolean_group") Boolean requiredBooleanGroup,@ApiParam(value = "Required Integer in group parameters", required = true) @QueryParam("required_int64_group") @NotNull Long requiredInt64Group,@ApiParam(value = "String in group parameters") @QueryParam("string_group") Integer stringGroup,@ApiParam(value = "Boolean in group parameters" )@HeaderParam("boolean_group") Boolean booleanGroup,@ApiParam(value = "Integer in group parameters") @QueryParam("int64_group") Long int64Group,@Context SecurityContext securityContext) throws NotFoundException { diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/StoreApi.java index 92d0a9cda8..9e52fe58f5 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/StoreApi.java @@ -86,7 +86,7 @@ public class StoreApi { @Path("/order/{order_id}") @Produces({ "application/xml", "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", }) + @io.swagger.annotations.ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", response = Order.class, tags={ "store", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Order.class), @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class), diff --git a/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/Paths.kt b/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/Paths.kt index 3c3d343ceb..71bc64b1cc 100644 --- a/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/Paths.kt +++ b/samples/server/petstore/kotlin-server-modelMutable/src/main/kotlin/org/openapitools/server/Paths.kt @@ -92,7 +92,7 @@ object Paths { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched */ @Location("/store/order/{orderId}") class getOrderById(val orderId: kotlin.Long) diff --git a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/Paths.kt b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/Paths.kt index dfde64ce91..4920198e0f 100644 --- a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/Paths.kt +++ b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/Paths.kt @@ -92,7 +92,7 @@ object Paths { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched */ @Location("/store/order/{orderId}") class getOrderById(val orderId: kotlin.Long) diff --git a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/StoreApi.kt b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/StoreApi.kt index 20ed842ab9..2db3541159 100644 --- a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/StoreApi.kt +++ b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/StoreApi.kt @@ -77,7 +77,7 @@ interface StoreApi { @Operation( summary = "Find purchase order by ID", operationId = "getOrderById", - description = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + description = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = Order::class))]), ApiResponse(responseCode = "400", description = "Invalid ID supplied"), diff --git a/samples/server/petstore/kotlin-springboot-delegate/src/main/resources/openapi.yaml b/samples/server/petstore/kotlin-springboot-delegate/src/main/resources/openapi.yaml index f96f3d8027..6c5ca4308a 100644 --- a/samples/server/petstore/kotlin-springboot-delegate/src/main/resources/openapi.yaml +++ b/samples/server/petstore/kotlin-springboot-delegate/src/main/resources/openapi.yaml @@ -348,7 +348,7 @@ paths: - store get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched diff --git a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/api/StoreApiController.kt b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/api/StoreApiController.kt index 4106e3ed94..47ab1dbbea 100644 --- a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/api/StoreApiController.kt +++ b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/api/StoreApiController.kt @@ -69,7 +69,7 @@ class StoreApiController(@Autowired(required = true) val service: StoreApiServic @Operation( summary = "Find purchase order by ID", operationId = "getOrderById", - description = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + description = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = Order::class))]), ApiResponse(responseCode = "400", description = "Invalid ID supplied"), diff --git a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/api/StoreApiService.kt b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/api/StoreApiService.kt index 6de3e6cc1d..60e7545294 100644 --- a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/api/StoreApiService.kt +++ b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/api/StoreApiService.kt @@ -26,7 +26,7 @@ interface StoreApiService { /** * GET /store/order/{orderId} : Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param orderId ID of pet that needs to be fetched (required) * @return successful operation (status code 200) diff --git a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/resources/openapi.yaml b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/resources/openapi.yaml index f3e1fb465f..1f68d6c2c1 100644 --- a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/resources/openapi.yaml +++ b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/resources/openapi.yaml @@ -341,7 +341,7 @@ paths: - store get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApiController.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApiController.kt index 9c90d7d38d..73c731b6ea 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApiController.kt +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApiController.kt @@ -70,7 +70,7 @@ class StoreApiController(@Autowired(required = true) val service: StoreApiServic @Operation( summary = "Find purchase order by ID", operationId = "getOrderById", - description = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + description = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = Order::class))]), ApiResponse(responseCode = "400", description = "Invalid ID supplied"), diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApiService.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApiService.kt index aa755f1fe6..fd78633b80 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApiService.kt +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/StoreApiService.kt @@ -27,7 +27,7 @@ interface StoreApiService { /** * GET /store/order/{orderId} : Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param orderId ID of pet that needs to be fetched (required) * @return successful operation (status code 200) diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/resources/openapi.yaml b/samples/server/petstore/kotlin-springboot-reactive/src/main/resources/openapi.yaml index f3e1fb465f..1f68d6c2c1 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/src/main/resources/openapi.yaml +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/resources/openapi.yaml @@ -341,7 +341,7 @@ paths: - store get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched diff --git a/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/api/StoreApiController.kt b/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/api/StoreApiController.kt index c3e90f46fd..764c1073e5 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/api/StoreApiController.kt +++ b/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/api/StoreApiController.kt @@ -74,7 +74,7 @@ class StoreApiController(@Autowired(required = true) val service: StoreApiServic @ApiOperation( value = "Find purchase order by ID", nickname = "getOrderById", - notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", response = Order::class) @ApiResponses( value = [ApiResponse(code = 200, message = "successful operation", response = Order::class),ApiResponse(code = 400, message = "Invalid ID supplied"),ApiResponse(code = 404, message = "Order not found")]) diff --git a/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/api/StoreApiService.kt b/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/api/StoreApiService.kt index 6de3e6cc1d..60e7545294 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/api/StoreApiService.kt +++ b/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/api/StoreApiService.kt @@ -26,7 +26,7 @@ interface StoreApiService { /** * GET /store/order/{orderId} : Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param orderId ID of pet that needs to be fetched (required) * @return successful operation (status code 200) diff --git a/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/resources/openapi.yaml b/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/resources/openapi.yaml index f3e1fb465f..1f68d6c2c1 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/resources/openapi.yaml +++ b/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/resources/openapi.yaml @@ -341,7 +341,7 @@ paths: - store get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched diff --git a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/api/StoreApiController.kt b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/api/StoreApiController.kt index 4106e3ed94..47ab1dbbea 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/api/StoreApiController.kt +++ b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/api/StoreApiController.kt @@ -69,7 +69,7 @@ class StoreApiController(@Autowired(required = true) val service: StoreApiServic @Operation( summary = "Find purchase order by ID", operationId = "getOrderById", - description = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + description = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", responses = [ ApiResponse(responseCode = "200", description = "successful operation", content = [Content(schema = Schema(implementation = Order::class))]), ApiResponse(responseCode = "400", description = "Invalid ID supplied"), diff --git a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/api/StoreApiService.kt b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/api/StoreApiService.kt index 6de3e6cc1d..60e7545294 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/api/StoreApiService.kt +++ b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/api/StoreApiService.kt @@ -26,7 +26,7 @@ interface StoreApiService { /** * GET /store/order/{orderId} : Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param orderId ID of pet that needs to be fetched (required) * @return successful operation (status code 200) diff --git a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/resources/openapi.yaml b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/resources/openapi.yaml index f3e1fb465f..1f68d6c2c1 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/resources/openapi.yaml +++ b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/resources/openapi.yaml @@ -341,7 +341,7 @@ paths: - store get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched diff --git a/samples/server/petstore/kotlin-springboot-springfox/src/main/kotlin/org/openapitools/api/StoreApiController.kt b/samples/server/petstore/kotlin-springboot-springfox/src/main/kotlin/org/openapitools/api/StoreApiController.kt index c3e90f46fd..764c1073e5 100644 --- a/samples/server/petstore/kotlin-springboot-springfox/src/main/kotlin/org/openapitools/api/StoreApiController.kt +++ b/samples/server/petstore/kotlin-springboot-springfox/src/main/kotlin/org/openapitools/api/StoreApiController.kt @@ -74,7 +74,7 @@ class StoreApiController(@Autowired(required = true) val service: StoreApiServic @ApiOperation( value = "Find purchase order by ID", nickname = "getOrderById", - notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", response = Order::class) @ApiResponses( value = [ApiResponse(code = 200, message = "successful operation", response = Order::class),ApiResponse(code = 400, message = "Invalid ID supplied"),ApiResponse(code = 404, message = "Order not found")]) diff --git a/samples/server/petstore/kotlin-springboot-springfox/src/main/kotlin/org/openapitools/api/StoreApiService.kt b/samples/server/petstore/kotlin-springboot-springfox/src/main/kotlin/org/openapitools/api/StoreApiService.kt index 6de3e6cc1d..60e7545294 100644 --- a/samples/server/petstore/kotlin-springboot-springfox/src/main/kotlin/org/openapitools/api/StoreApiService.kt +++ b/samples/server/petstore/kotlin-springboot-springfox/src/main/kotlin/org/openapitools/api/StoreApiService.kt @@ -26,7 +26,7 @@ interface StoreApiService { /** * GET /store/order/{orderId} : Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param orderId ID of pet that needs to be fetched (required) * @return successful operation (status code 200) diff --git a/samples/server/petstore/kotlin-springboot-springfox/src/main/resources/openapi.yaml b/samples/server/petstore/kotlin-springboot-springfox/src/main/resources/openapi.yaml index f3e1fb465f..1f68d6c2c1 100644 --- a/samples/server/petstore/kotlin-springboot-springfox/src/main/resources/openapi.yaml +++ b/samples/server/petstore/kotlin-springboot-springfox/src/main/resources/openapi.yaml @@ -341,7 +341,7 @@ paths: - store get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched diff --git a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApiService.kt b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApiService.kt index 6de3e6cc1d..60e7545294 100644 --- a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApiService.kt +++ b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/StoreApiService.kt @@ -26,7 +26,7 @@ interface StoreApiService { /** * GET /store/order/{orderId} : Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param orderId ID of pet that needs to be fetched (required) * @return successful operation (status code 200) diff --git a/samples/server/petstore/nodejs-express-server/README.md b/samples/server/petstore/nodejs-express-server/README.md index ffd6e8397a..a083a1ae2f 100644 --- a/samples/server/petstore/nodejs-express-server/README.md +++ b/samples/server/petstore/nodejs-express-server/README.md @@ -36,7 +36,7 @@ Unfortunately, I have not written any unit-tests. Those will come in the future. 1. API documentation, and to check the available endpoints: http://localhost:3000/api-docs/. To -2. Download the oepnapi.yaml document: http://localhost:3000/openapi. +2. Download the openapi.yaml document: http://localhost:3000/openapi. 3. Every call to an endpoint that was defined in the openapi document will return a 200 and a list of all the parameters and objects that were sent in the request. 4. Endpoints that require security need to have security handlers configured before they can return a successful response. At this point they will return [ a response code of 401](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/401). 5. ##### At this stage the server does not support document body sent in xml format. @@ -87,4 +87,4 @@ Future tests should be written to ensure that the response of every request sent #### models/ -Currently a concept awaiting feedback. The idea is to have the objects defined in the openapi.yaml act as models which are passed between the different modules. This will conform the programmers to interact using defined objects, rather than loosley-defined JSON objects. Given the nature of JavaScript progrmmers, who want to work with their own bootstrapped parameters, this concept might not work. Keeping this here for future discussion and feedback. +Currently a concept awaiting feedback. The idea is to have the objects defined in the openapi.yaml act as models which are passed between the different modules. This will conform the programmers to interact using defined objects, rather than loosely-defined JSON objects. Given the nature of JavaScript programmers, who want to work with their own bootstrapped parameters, this concept might not work. Keeping this here for future discussion and feedback. diff --git a/samples/server/petstore/nodejs-express-server/api/openapi.yaml b/samples/server/petstore/nodejs-express-server/api/openapi.yaml index db29b0bab2..6fa9dd7eed 100644 --- a/samples/server/petstore/nodejs-express-server/api/openapi.yaml +++ b/samples/server/petstore/nodejs-express-server/api/openapi.yaml @@ -365,7 +365,7 @@ paths: x-eov-operation-handler: controllers/StoreController get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched @@ -492,7 +492,7 @@ paths: format: int32 type: integer X-Expires-After: - description: date in UTC when toekn expires + description: date in UTC when token expires schema: format: date-time type: string diff --git a/samples/server/petstore/nodejs-express-server/controllers/Controller.js b/samples/server/petstore/nodejs-express-server/controllers/Controller.js index c791a89158..a4115d0143 100644 --- a/samples/server/petstore/nodejs-express-server/controllers/Controller.js +++ b/samples/server/petstore/nodejs-express-server/controllers/Controller.js @@ -32,7 +32,7 @@ class Controller { /** * Files have been uploaded to the directory defined by config.js as upload directory * Files have a temporary name, that was saved as 'filename' of the file object that is - * referenced in reuquest.files array. + * referenced in request.files array. * This method finds the file and changes it to the file name that was originally called * when it was uploaded. To prevent files from being overwritten, a timestamp is added between * the filename and its extension diff --git a/samples/server/petstore/nodejs-express-server/controllers/PetController.js b/samples/server/petstore/nodejs-express-server/controllers/PetController.js index 9f6477cc26..e15b4d7673 100644 --- a/samples/server/petstore/nodejs-express-server/controllers/PetController.js +++ b/samples/server/petstore/nodejs-express-server/controllers/PetController.js @@ -1,6 +1,6 @@ /** * The PetController file is a very simple one, which does not need to be changed manually, - * unless there's a case where business logic reoutes the request to an entity which is not + * unless there's a case where business logic routes the request to an entity which is not * the service. * The heavy lifting of the Controller item is done in Request.js - that is where request * parameters are extracted and sent to the service, and where response is handled. diff --git a/samples/server/petstore/nodejs-express-server/controllers/StoreController.js b/samples/server/petstore/nodejs-express-server/controllers/StoreController.js index 90ea784f0e..18a330c1d5 100644 --- a/samples/server/petstore/nodejs-express-server/controllers/StoreController.js +++ b/samples/server/petstore/nodejs-express-server/controllers/StoreController.js @@ -1,6 +1,6 @@ /** * The StoreController file is a very simple one, which does not need to be changed manually, - * unless there's a case where business logic reoutes the request to an entity which is not + * unless there's a case where business logic routes the request to an entity which is not * the service. * The heavy lifting of the Controller item is done in Request.js - that is where request * parameters are extracted and sent to the service, and where response is handled. diff --git a/samples/server/petstore/nodejs-express-server/controllers/UserController.js b/samples/server/petstore/nodejs-express-server/controllers/UserController.js index 20f84fa76c..59bafe4ef3 100644 --- a/samples/server/petstore/nodejs-express-server/controllers/UserController.js +++ b/samples/server/petstore/nodejs-express-server/controllers/UserController.js @@ -1,6 +1,6 @@ /** * The UserController file is a very simple one, which does not need to be changed manually, - * unless there's a case where business logic reoutes the request to an entity which is not + * unless there's a case where business logic routes the request to an entity which is not * the service. * The heavy lifting of the Controller item is done in Request.js - that is where request * parameters are extracted and sent to the service, and where response is handled. diff --git a/samples/server/petstore/nodejs-express-server/services/StoreService.js b/samples/server/petstore/nodejs-express-server/services/StoreService.js index 49157c3172..28b095edd2 100644 --- a/samples/server/petstore/nodejs-express-server/services/StoreService.js +++ b/samples/server/petstore/nodejs-express-server/services/StoreService.js @@ -43,7 +43,7 @@ const getInventory = () => new Promise( ); /** * Find purchase order by ID -* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +* For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * orderId Long ID of pet that needs to be fetched * returns Order diff --git a/samples/server/petstore/nodejs-express-server/utils/openapiRouter.js b/samples/server/petstore/nodejs-express-server/utils/openapiRouter.js index 1a77fec7b6..4c7bbdca7f 100644 --- a/samples/server/petstore/nodejs-express-server/utils/openapiRouter.js +++ b/samples/server/petstore/nodejs-express-server/utils/openapiRouter.js @@ -16,14 +16,14 @@ function handleError(err, request, response, next) { /** * The purpose of this route is to collect the request variables as defined in the * OpenAPI document and pass them to the handling controller as another Express - * middleware. All parameters are collected in the requet.swagger.values key-value object + * middleware. All parameters are collected in the request.swagger.values key-value object * * The assumption is that security handlers have already verified and allowed access - * to this path. If the business-logic of a particular path is dependant on authentication + * to this path. If the business-logic of a particular path is dependent on authentication * parameters (e.g. scope checking) - it is recommended to define the authentication header * as one of the parameters expected in the OpenAPI/Swagger document. * - * Requests made to paths that are not in the OpernAPI scope + * Requests made to paths that are not in the OpenAPI scope * are passed on to the next middleware handler. * @returns {Function} */ diff --git a/samples/server/petstore/php-laravel/lib/routes/api.php b/samples/server/petstore/php-laravel/lib/routes/api.php index 2127861b2e..ca0e27d224 100644 --- a/samples/server/petstore/php-laravel/lib/routes/api.php +++ b/samples/server/petstore/php-laravel/lib/routes/api.php @@ -248,7 +248,7 @@ Route::delete('/v2/store/order/{order_id}', 'StoreController@deleteOrder'); /** * get getOrderById * Summary: Find purchase order by ID - * Notes: For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * Notes: For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Output-Formats: [application/xml, application/json] */ Route::get('/v2/store/order/{order_id}', 'StoreController@getOrderById'); diff --git a/samples/server/petstore/php-lumen/lib/routes/web.php b/samples/server/petstore/php-lumen/lib/routes/web.php index 33eaaa40a6..8e987b5165 100644 --- a/samples/server/petstore/php-lumen/lib/routes/web.php +++ b/samples/server/petstore/php-lumen/lib/routes/web.php @@ -264,7 +264,7 @@ $router->delete('/v2/store/order/{order_id}', 'StoreApi@deleteOrder'); /** * get getOrderById * Summary: Find purchase order by ID - * Notes: For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * Notes: For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions */ $router->get('/v2/store/order/{order_id}', 'StoreApi@getOrderById'); diff --git a/samples/server/petstore/php-slim4/lib/Api/AbstractStoreApi.php b/samples/server/petstore/php-slim4/lib/Api/AbstractStoreApi.php index 226f58c35a..2bac5b6b2b 100644 --- a/samples/server/petstore/php-slim4/lib/Api/AbstractStoreApi.php +++ b/samples/server/petstore/php-slim4/lib/Api/AbstractStoreApi.php @@ -81,7 +81,7 @@ abstract class AbstractStoreApi /** * GET getOrderById * Summary: Find purchase order by ID - * Notes: For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * Notes: For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * Output-Formats: [application/xml, application/json] * * @param ServerRequestInterface $request Request diff --git a/samples/server/petstore/php-slim4/pom.xml b/samples/server/petstore/php-slim4/pom.xml index cde894e958..e5f532b7fa 100644 --- a/samples/server/petstore/php-slim4/pom.xml +++ b/samples/server/petstore/php-slim4/pom.xml @@ -1,6 +1,6 @@ 4.0.0 - org.opoenapitools + org.openapitools Slim4PetstoreServerTests pom 1.0-SNAPSHOT diff --git a/samples/server/petstore/php-symfony/SymfonyBundle-php/docs/Api/StoreApiInterface.md b/samples/server/petstore/php-symfony/SymfonyBundle-php/docs/Api/StoreApiInterface.md index c9aedf55e3..b6ed0824d5 100644 --- a/samples/server/petstore/php-symfony/SymfonyBundle-php/docs/Api/StoreApiInterface.md +++ b/samples/server/petstore/php-symfony/SymfonyBundle-php/docs/Api/StoreApiInterface.md @@ -139,7 +139,7 @@ This endpoint does not need any parameter. Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Example Implementation ```php diff --git a/samples/server/petstore/python-aiohttp-srclayout/README.md b/samples/server/petstore/python-aiohttp-srclayout/README.md index 6aa7491711..b68e70a6a9 100644 --- a/samples/server/petstore/python-aiohttp-srclayout/README.md +++ b/samples/server/petstore/python-aiohttp-srclayout/README.md @@ -38,7 +38,7 @@ pytest ## Prevent file overriding -After first generation, add edited files to _.openapi-generator-ignore_ to prevent generator to overwrite them. Typically: +After first generation, add edited files to _.openapi-generator-ignore_ to prevent generator from overwriting them. Typically: ``` server/controllers/* test/* diff --git a/samples/server/petstore/python-aiohttp-srclayout/src/openapi_server/controllers/store_controller.py b/samples/server/petstore/python-aiohttp-srclayout/src/openapi_server/controllers/store_controller.py index 80512d357f..38792ced26 100644 --- a/samples/server/petstore/python-aiohttp-srclayout/src/openapi_server/controllers/store_controller.py +++ b/samples/server/petstore/python-aiohttp-srclayout/src/openapi_server/controllers/store_controller.py @@ -30,7 +30,7 @@ async def get_inventory(request: web.Request, ) -> web.Response: async def get_order_by_id(request: web.Request, order_id) -> web.Response: """Find purchase order by ID - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions :param order_id: ID of pet that needs to be fetched :type order_id: int diff --git a/samples/server/petstore/python-aiohttp-srclayout/src/openapi_server/openapi/openapi.yaml b/samples/server/petstore/python-aiohttp-srclayout/src/openapi_server/openapi/openapi.yaml index b7d45bc575..7f83054c4a 100644 --- a/samples/server/petstore/python-aiohttp-srclayout/src/openapi_server/openapi/openapi.yaml +++ b/samples/server/petstore/python-aiohttp-srclayout/src/openapi_server/openapi/openapi.yaml @@ -359,7 +359,7 @@ paths: x-openapi-router-controller: openapi_server.controllers.store_controller get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: get_order_by_id parameters: - description: ID of pet that needs to be fetched diff --git a/samples/server/petstore/python-aiohttp-srclayout/tests/test_pet_controller.py b/samples/server/petstore/python-aiohttp-srclayout/tests/test_pet_controller.py index 5f6384a34f..3cac35cc24 100644 --- a/samples/server/petstore/python-aiohttp-srclayout/tests/test_pet_controller.py +++ b/samples/server/petstore/python-aiohttp-srclayout/tests/test_pet_controller.py @@ -9,7 +9,7 @@ from openapi_server.models.api_response import ApiResponse from openapi_server.models.pet import Pet -@pytest.mark.skip("Connexion does not support multiple consummes. See https://github.com/zalando/connexion/pull/760") +@pytest.mark.skip("Connexion does not support multiple consumes. See https://github.com/zalando/connexion/pull/760") async def test_add_pet(client): """Test case for add_pet @@ -117,7 +117,7 @@ async def test_get_pet_by_id(client): assert response.status == 200, 'Response body is : ' + (await response.read()).decode('utf-8') -@pytest.mark.skip("Connexion does not support multiple consummes. See https://github.com/zalando/connexion/pull/760") +@pytest.mark.skip("Connexion does not support multiple consumes. See https://github.com/zalando/connexion/pull/760") async def test_update_pet(client): """Test case for update_pet diff --git a/samples/server/petstore/python-aiohttp/README.md b/samples/server/petstore/python-aiohttp/README.md index 6aa7491711..b68e70a6a9 100644 --- a/samples/server/petstore/python-aiohttp/README.md +++ b/samples/server/petstore/python-aiohttp/README.md @@ -38,7 +38,7 @@ pytest ## Prevent file overriding -After first generation, add edited files to _.openapi-generator-ignore_ to prevent generator to overwrite them. Typically: +After first generation, add edited files to _.openapi-generator-ignore_ to prevent generator from overwriting them. Typically: ``` server/controllers/* test/* diff --git a/samples/server/petstore/python-aiohttp/openapi_server/controllers/store_controller.py b/samples/server/petstore/python-aiohttp/openapi_server/controllers/store_controller.py index 80512d357f..38792ced26 100644 --- a/samples/server/petstore/python-aiohttp/openapi_server/controllers/store_controller.py +++ b/samples/server/petstore/python-aiohttp/openapi_server/controllers/store_controller.py @@ -30,7 +30,7 @@ async def get_inventory(request: web.Request, ) -> web.Response: async def get_order_by_id(request: web.Request, order_id) -> web.Response: """Find purchase order by ID - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions :param order_id: ID of pet that needs to be fetched :type order_id: int diff --git a/samples/server/petstore/python-aiohttp/openapi_server/openapi/openapi.yaml b/samples/server/petstore/python-aiohttp/openapi_server/openapi/openapi.yaml index b7d45bc575..7f83054c4a 100644 --- a/samples/server/petstore/python-aiohttp/openapi_server/openapi/openapi.yaml +++ b/samples/server/petstore/python-aiohttp/openapi_server/openapi/openapi.yaml @@ -359,7 +359,7 @@ paths: x-openapi-router-controller: openapi_server.controllers.store_controller get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: get_order_by_id parameters: - description: ID of pet that needs to be fetched diff --git a/samples/server/petstore/python-blueplanet/app/openapi_server/controllers/store_controller.py b/samples/server/petstore/python-blueplanet/app/openapi_server/controllers/store_controller.py index 30e6bbd3a9..b6485ae10a 100644 --- a/samples/server/petstore/python-blueplanet/app/openapi_server/controllers/store_controller.py +++ b/samples/server/petstore/python-blueplanet/app/openapi_server/controllers/store_controller.py @@ -32,7 +32,7 @@ def get_inventory(): # noqa: E501 def get_order_by_id(order_id): # noqa: E501 """Find purchase order by ID - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions # noqa: E501 + For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions # noqa: E501 :param order_id: ID of pet that needs to be fetched :type order_id: int diff --git a/samples/server/petstore/python-fastapi/openapi.yaml b/samples/server/petstore/python-fastapi/openapi.yaml index 49ab56baa7..d082ad0709 100644 --- a/samples/server/petstore/python-fastapi/openapi.yaml +++ b/samples/server/petstore/python-fastapi/openapi.yaml @@ -348,7 +348,7 @@ paths: - store get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched diff --git a/samples/server/petstore/python-fastapi/src/openapi_server/apis/store_api.py b/samples/server/petstore/python-fastapi/src/openapi_server/apis/store_api.py index b21e32f26f..63315cfe54 100644 --- a/samples/server/petstore/python-fastapi/src/openapi_server/apis/store_api.py +++ b/samples/server/petstore/python-fastapi/src/openapi_server/apis/store_api.py @@ -72,7 +72,7 @@ async def get_inventory( async def get_order_by_id( orderId: int = Path(None, description="ID of pet that needs to be fetched", ge=1, le=5), ) -> Order: - """For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions""" + """For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions""" ... diff --git a/samples/server/petstore/python-flask/openapi_server/controllers/store_controller.py b/samples/server/petstore/python-flask/openapi_server/controllers/store_controller.py index 218a6d811b..21bc29621f 100644 --- a/samples/server/petstore/python-flask/openapi_server/controllers/store_controller.py +++ b/samples/server/petstore/python-flask/openapi_server/controllers/store_controller.py @@ -35,7 +35,7 @@ def get_inventory(): # noqa: E501 def get_order_by_id(order_id): # noqa: E501 """Find purchase order by ID - For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions # noqa: E501 + For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions # noqa: E501 :param order_id: ID of pet that needs to be fetched :type order_id: int diff --git a/samples/server/petstore/python-flask/openapi_server/openapi/openapi.yaml b/samples/server/petstore/python-flask/openapi_server/openapi/openapi.yaml index ff528ad1f4..0d47b9c980 100644 --- a/samples/server/petstore/python-flask/openapi_server/openapi/openapi.yaml +++ b/samples/server/petstore/python-flask/openapi_server/openapi/openapi.yaml @@ -352,7 +352,7 @@ paths: x-openapi-router-controller: openapi_server.controllers.store_controller get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: get_order_by_id parameters: - description: ID of pet that needs to be fetched diff --git a/samples/server/petstore/ruby-on-rails/pom.xml b/samples/server/petstore/ruby-on-rails/pom.xml index 53cf1b97ad..7d16212d00 100644 --- a/samples/server/petstore/ruby-on-rails/pom.xml +++ b/samples/server/petstore/ruby-on-rails/pom.xml @@ -1,6 +1,6 @@ 4.0.0 - org.opoenapitools + org.openapitools RORPetstoreServerTests pom 1.0-SNAPSHOT diff --git a/samples/server/petstore/ruby-sinatra/api/store_api.rb b/samples/server/petstore/ruby-sinatra/api/store_api.rb index 7d1b54b2b7..5605a23266 100644 --- a/samples/server/petstore/ruby-sinatra/api/store_api.rb +++ b/samples/server/petstore/ruby-sinatra/api/store_api.rb @@ -45,7 +45,7 @@ MyApp.add_route('GET', '/v2/store/order/{orderId}', { "nickname" => "get_order_by_id", "responseClass" => "Order", "endpoint" => "/store/order/{orderId}", - "notes" => "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + "notes" => "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", "parameters" => [ { "name" => "order_id", diff --git a/samples/server/petstore/ruby-sinatra/openapi.yaml b/samples/server/petstore/ruby-sinatra/openapi.yaml index 26aaeac34b..612ca3c815 100644 --- a/samples/server/petstore/ruby-sinatra/openapi.yaml +++ b/samples/server/petstore/ruby-sinatra/openapi.yaml @@ -358,7 +358,7 @@ paths: - store get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched @@ -482,7 +482,7 @@ paths: type: integer style: simple X-Expires-After: - description: date in UTC when toekn expires + description: date in UTC when token expires explode: false schema: format: date-time diff --git a/samples/server/petstore/rust-server/output/no-example-v3/api/openapi.yaml b/samples/server/petstore/rust-server/output/no-example-v3/api/openapi.yaml index a60a7da8f3..ff77d0c732 100644 --- a/samples/server/petstore/rust-server/output/no-example-v3/api/openapi.yaml +++ b/samples/server/petstore/rust-server/output/no-example-v3/api/openapi.yaml @@ -20,7 +20,7 @@ components: schemas: _op_get_request: properties: - propery: + property: type: string required: - property diff --git a/samples/server/petstore/rust-server/output/no-example-v3/docs/InlineObject.md b/samples/server/petstore/rust-server/output/no-example-v3/docs/InlineObject.md index de17071caf..75f57d2c00 100644 --- a/samples/server/petstore/rust-server/output/no-example-v3/docs/InlineObject.md +++ b/samples/server/petstore/rust-server/output/no-example-v3/docs/InlineObject.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**propery** | **String** | | [optional] [default to None] +**property** | **String** | | [optional] [default to None] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/server/petstore/rust-server/output/no-example-v3/docs/InlineRequest.md b/samples/server/petstore/rust-server/output/no-example-v3/docs/InlineRequest.md index 1b792f66d8..73ca04d176 100644 --- a/samples/server/petstore/rust-server/output/no-example-v3/docs/InlineRequest.md +++ b/samples/server/petstore/rust-server/output/no-example-v3/docs/InlineRequest.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**propery** | **String** | | [optional] [default to None] +**property** | **String** | | [optional] [default to None] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/server/petstore/rust-server/output/no-example-v3/docs/OpGetRequest.md b/samples/server/petstore/rust-server/output/no-example-v3/docs/OpGetRequest.md index fc7bb0c542..70c884fc7b 100644 --- a/samples/server/petstore/rust-server/output/no-example-v3/docs/OpGetRequest.md +++ b/samples/server/petstore/rust-server/output/no-example-v3/docs/OpGetRequest.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**propery** | **String** | | [optional] [default to None] +**property** | **String** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/server/petstore/rust-server/output/no-example-v3/src/models.rs b/samples/server/petstore/rust-server/output/no-example-v3/src/models.rs index cc90dcda97..dec1190139 100644 --- a/samples/server/petstore/rust-server/output/no-example-v3/src/models.rs +++ b/samples/server/petstore/rust-server/output/no-example-v3/src/models.rs @@ -7,17 +7,16 @@ use crate::header; #[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] #[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))] pub struct OpGetRequest { - #[serde(rename = "propery")] - #[serde(skip_serializing_if="Option::is_none")] - pub propery: Option, + #[serde(rename = "property")] + pub property: String, } impl OpGetRequest { #[allow(clippy::new_without_default)] - pub fn new() -> OpGetRequest { + pub fn new(property: String, ) -> OpGetRequest { OpGetRequest { - propery: None, + property, } } } @@ -29,12 +28,8 @@ impl std::string::ToString for OpGetRequest { fn to_string(&self) -> String { let params: Vec> = vec![ - self.propery.as_ref().map(|propery| { - vec![ - "propery".to_string(), - propery.to_string(), - ].join(",") - }), + Some("property".to_string()), + Some(self.property.to_string()), ]; @@ -53,7 +48,7 @@ impl std::str::FromStr for OpGetRequest { #[derive(Default)] #[allow(dead_code)] struct IntermediateRep { - pub propery: Vec, + pub property: Vec, } let mut intermediate_rep = IntermediateRep::default(); @@ -72,7 +67,7 @@ impl std::str::FromStr for OpGetRequest { #[allow(clippy::match_single_binding)] match key { #[allow(clippy::redundant_clone)] - "propery" => intermediate_rep.propery.push(::from_str(val).map_err(|x| x.to_string())?), + "property" => intermediate_rep.property.push(::from_str(val).map_err(|x| x.to_string())?), _ => return std::result::Result::Err("Unexpected key while parsing OpGetRequest".to_string()) } } @@ -83,7 +78,7 @@ impl std::str::FromStr for OpGetRequest { // Use the intermediate representation to return the struct std::result::Result::Ok(OpGetRequest { - propery: intermediate_rep.propery.into_iter().next(), + property: intermediate_rep.property.into_iter().next().ok_or_else(|| "property missing in OpGetRequest".to_string())?, }) } } diff --git a/samples/server/petstore/rust-server/output/openapi-v3/src/models.rs b/samples/server/petstore/rust-server/output/openapi-v3/src/models.rs index 2f238bd1d9..7ecada6db3 100644 --- a/samples/server/petstore/rust-server/output/openapi-v3/src/models.rs +++ b/samples/server/petstore/rust-server/output/openapi-v3/src/models.rs @@ -639,7 +639,7 @@ impl AnyOfObject { } /// Enumeration of values. -/// Since this enum's variants do not hold data, we can easily define them them as `#[repr(C)]` +/// Since this enum's variants do not hold data, we can easily define them as `#[repr(C)]` /// which helps with FFI. #[allow(non_camel_case_types)] #[repr(C)] @@ -975,7 +975,7 @@ impl DuplicateXmlObject { /// Test a model containing a special character in the enum /// Enumeration of values. -/// Since this enum's variants do not hold data, we can easily define them them as `#[repr(C)]` +/// Since this enum's variants do not hold data, we can easily define them as `#[repr(C)]` /// which helps with FFI. #[allow(non_camel_case_types)] #[repr(C)] @@ -1243,7 +1243,7 @@ impl Model12345AnyOfObject { } /// Enumeration of values. -/// Since this enum's variants do not hold data, we can easily define them them as `#[repr(C)]` +/// Since this enum's variants do not hold data, we can easily define them as `#[repr(C)]` /// which helps with FFI. #[allow(non_camel_case_types)] #[repr(C)] @@ -2670,7 +2670,7 @@ impl Result { } /// Enumeration of values. -/// Since this enum's variants do not hold data, we can easily define them them as `#[repr(C)]` +/// Since this enum's variants do not hold data, we can easily define them as `#[repr(C)]` /// which helps with FFI. #[allow(non_camel_case_types)] #[repr(C)] diff --git a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/api/openapi.yaml b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/api/openapi.yaml index 14bc8aeebe..6acd275ac2 100644 --- a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/api/openapi.yaml +++ b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/api/openapi.yaml @@ -342,7 +342,7 @@ paths: - store get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched diff --git a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/docs/store_api.md b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/docs/store_api.md index 314d2533d6..9c8c27bcc3 100644 --- a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/docs/store_api.md +++ b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/docs/store_api.md @@ -65,7 +65,7 @@ This endpoint does not need any parameter. > models::Order getOrderById(order_id) Find purchase order by ID -For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions ### Required Parameters diff --git a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/models.rs b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/models.rs index faf92e4f9a..44ead8dc18 100644 --- a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/models.rs +++ b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/src/models.rs @@ -2526,7 +2526,7 @@ impl EnumArrays { } /// Enumeration of values. -/// Since this enum's variants do not hold data, we can easily define them them as `#[repr(C)]` +/// Since this enum's variants do not hold data, we can easily define them as `#[repr(C)]` /// which helps with FFI. #[allow(non_camel_case_types)] #[repr(C)] @@ -4706,7 +4706,7 @@ impl OuterComposite { } /// Enumeration of values. -/// Since this enum's variants do not hold data, we can easily define them them as `#[repr(C)]` +/// Since this enum's variants do not hold data, we can easily define them as `#[repr(C)]` /// which helps with FFI. #[allow(non_camel_case_types)] #[repr(C)] diff --git a/samples/server/petstore/rust-server/output/rust-server-test/api/openapi.yaml b/samples/server/petstore/rust-server/output/rust-server-test/api/openapi.yaml index 81e4b4dc23..fcec6c8fa8 100644 --- a/samples/server/petstore/rust-server/output/rust-server-test/api/openapi.yaml +++ b/samples/server/petstore/rust-server/output/rust-server-test/api/openapi.yaml @@ -153,7 +153,7 @@ components: type: string baseAllOf: properties: - sampleBasePropery: + sampleBaseProperty: type: string type: object aNullableContainer: diff --git a/samples/server/petstore/rust-server/output/rust-server-test/docs/AllOfObject.md b/samples/server/petstore/rust-server/output/rust-server-test/docs/AllOfObject.md index 2c1484d148..d9f96cbbc2 100644 --- a/samples/server/petstore/rust-server/output/rust-server-test/docs/AllOfObject.md +++ b/samples/server/petstore/rust-server/output/rust-server-test/docs/AllOfObject.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **sample_property** | **String** | | [optional] [default to None] -**sample_base_propery** | **String** | | [optional] [default to None] +**sample_base_property** | **String** | | [optional] [default to None] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/server/petstore/rust-server/output/rust-server-test/docs/BaseAllOf.md b/samples/server/petstore/rust-server/output/rust-server-test/docs/BaseAllOf.md index aa39ac2475..9de71eae81 100644 --- a/samples/server/petstore/rust-server/output/rust-server-test/docs/BaseAllOf.md +++ b/samples/server/petstore/rust-server/output/rust-server-test/docs/BaseAllOf.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**sample_base_propery** | **String** | | [optional] [default to None] +**sample_base_property** | **String** | | [optional] [default to None] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/server/petstore/rust-server/output/rust-server-test/src/models.rs b/samples/server/petstore/rust-server/output/rust-server-test/src/models.rs index a05942751b..2c227c2b98 100644 --- a/samples/server/petstore/rust-server/output/rust-server-test/src/models.rs +++ b/samples/server/petstore/rust-server/output/rust-server-test/src/models.rs @@ -197,9 +197,9 @@ pub struct AllOfObject { #[serde(skip_serializing_if="Option::is_none")] pub sample_property: Option, - #[serde(rename = "sampleBasePropery")] + #[serde(rename = "sampleBaseProperty")] #[serde(skip_serializing_if="Option::is_none")] - pub sample_base_propery: Option, + pub sample_base_property: Option, } @@ -208,7 +208,7 @@ impl AllOfObject { pub fn new() -> AllOfObject { AllOfObject { sample_property: None, - sample_base_propery: None, + sample_base_property: None, } } } @@ -228,10 +228,10 @@ impl std::string::ToString for AllOfObject { }), - self.sample_base_propery.as_ref().map(|sample_base_propery| { + self.sample_base_property.as_ref().map(|sample_base_property| { vec![ - "sampleBasePropery".to_string(), - sample_base_propery.to_string(), + "sampleBaseProperty".to_string(), + sample_base_property.to_string(), ].join(",") }), @@ -253,7 +253,7 @@ impl std::str::FromStr for AllOfObject { #[allow(dead_code)] struct IntermediateRep { pub sample_property: Vec, - pub sample_base_propery: Vec, + pub sample_base_property: Vec, } let mut intermediate_rep = IntermediateRep::default(); @@ -274,7 +274,7 @@ impl std::str::FromStr for AllOfObject { #[allow(clippy::redundant_clone)] "sampleProperty" => intermediate_rep.sample_property.push(::from_str(val).map_err(|x| x.to_string())?), #[allow(clippy::redundant_clone)] - "sampleBasePropery" => intermediate_rep.sample_base_propery.push(::from_str(val).map_err(|x| x.to_string())?), + "sampleBaseProperty" => intermediate_rep.sample_base_property.push(::from_str(val).map_err(|x| x.to_string())?), _ => return std::result::Result::Err("Unexpected key while parsing AllOfObject".to_string()) } } @@ -286,7 +286,7 @@ impl std::str::FromStr for AllOfObject { // Use the intermediate representation to return the struct std::result::Result::Ok(AllOfObject { sample_property: intermediate_rep.sample_property.into_iter().next(), - sample_base_propery: intermediate_rep.sample_base_propery.into_iter().next(), + sample_base_property: intermediate_rep.sample_base_property.into_iter().next(), }) } } @@ -333,9 +333,9 @@ impl std::convert::TryFrom for header::IntoHeaderVal #[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] #[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))] pub struct BaseAllOf { - #[serde(rename = "sampleBasePropery")] + #[serde(rename = "sampleBaseProperty")] #[serde(skip_serializing_if="Option::is_none")] - pub sample_base_propery: Option, + pub sample_base_property: Option, } @@ -343,7 +343,7 @@ impl BaseAllOf { #[allow(clippy::new_without_default)] pub fn new() -> BaseAllOf { BaseAllOf { - sample_base_propery: None, + sample_base_property: None, } } } @@ -355,10 +355,10 @@ impl std::string::ToString for BaseAllOf { fn to_string(&self) -> String { let params: Vec> = vec![ - self.sample_base_propery.as_ref().map(|sample_base_propery| { + self.sample_base_property.as_ref().map(|sample_base_property| { vec![ - "sampleBasePropery".to_string(), - sample_base_propery.to_string(), + "sampleBaseProperty".to_string(), + sample_base_property.to_string(), ].join(",") }), @@ -379,7 +379,7 @@ impl std::str::FromStr for BaseAllOf { #[derive(Default)] #[allow(dead_code)] struct IntermediateRep { - pub sample_base_propery: Vec, + pub sample_base_property: Vec, } let mut intermediate_rep = IntermediateRep::default(); @@ -398,7 +398,7 @@ impl std::str::FromStr for BaseAllOf { #[allow(clippy::match_single_binding)] match key { #[allow(clippy::redundant_clone)] - "sampleBasePropery" => intermediate_rep.sample_base_propery.push(::from_str(val).map_err(|x| x.to_string())?), + "sampleBaseProperty" => intermediate_rep.sample_base_property.push(::from_str(val).map_err(|x| x.to_string())?), _ => return std::result::Result::Err("Unexpected key while parsing BaseAllOf".to_string()) } } @@ -409,7 +409,7 @@ impl std::str::FromStr for BaseAllOf { // Use the intermediate representation to return the struct std::result::Result::Ok(BaseAllOf { - sample_base_propery: intermediate_rep.sample_base_propery.into_iter().next(), + sample_base_property: intermediate_rep.sample_base_property.into_iter().next(), }) } } diff --git a/samples/server/petstore/scala-lagom-server/.openapi-generator-ignore b/samples/server/petstore/scala-lagom-server/.openapi-generator-ignore index c5fa491b4c..deed424f8a 100644 --- a/samples/server/petstore/scala-lagom-server/.openapi-generator-ignore +++ b/samples/server/petstore/scala-lagom-server/.openapi-generator-ignore @@ -5,7 +5,7 @@ # The patterns follow closely to .gitignore or .dockerignore. # As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +# You can make changes and tell Swagger Codegen 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 (*): diff --git a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/PetApi.scala b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/PetApi.scala index c452652ee5..61ab724d00 100644 --- a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/PetApi.scala +++ b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/PetApi.scala @@ -49,7 +49,7 @@ trait PetApi extends Service { def addPet(): ServiceCall[Pet ,Pet] - // apiKey:String -- not yet supported heder params + // apiKey:String -- not yet supported header params /** * Deletes a pet * diff --git a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/StoreApi.scala b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/StoreApi.scala index 2386c18298..a432ebfccb 100644 --- a/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/StoreApi.scala +++ b/samples/server/petstore/scala-lagom-server/src/main/scala/io/swagger/client/api/StoreApi.scala @@ -53,7 +53,7 @@ trait StoreApi extends Service { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param orderId ID of pet that needs to be fetched * @return Order diff --git a/samples/server/petstore/scala-play-server/app/api/StoreApi.scala b/samples/server/petstore/scala-play-server/app/api/StoreApi.scala index 0c0f205203..427c188c5b 100644 --- a/samples/server/petstore/scala-play-server/app/api/StoreApi.scala +++ b/samples/server/petstore/scala-play-server/app/api/StoreApi.scala @@ -19,7 +19,7 @@ trait StoreApi { /** * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * @param orderId ID of pet that needs to be fetched */ def getOrderById(orderId: Long): Order diff --git a/samples/server/petstore/scala-play-server/public/openapi.json b/samples/server/petstore/scala-play-server/public/openapi.json index 75103813bb..be5a2b9e16 100644 --- a/samples/server/petstore/scala-play-server/public/openapi.json +++ b/samples/server/petstore/scala-play-server/public/openapi.json @@ -474,7 +474,7 @@ "tags" : [ "store" ] }, "get" : { - "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + "description" : "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", "operationId" : "getOrderById", "parameters" : [ { "description" : "ID of pet that needs to be fetched", @@ -640,7 +640,7 @@ "style" : "simple" }, "X-Expires-After" : { - "description" : "date in UTC when toekn expires", + "description" : "date in UTC when token expires", "explode" : false, "schema" : { "format" : "date-time", diff --git a/samples/server/petstore/scalatra/src/main/webapp/WEB-INF/web.xml b/samples/server/petstore/scalatra/src/main/webapp/WEB-INF/web.xml index bf99b05808..3003f2941b 100644 --- a/samples/server/petstore/scalatra/src/main/webapp/WEB-INF/web.xml +++ b/samples/server/petstore/scalatra/src/main/webapp/WEB-INF/web.xml @@ -7,7 +7,7 @@ diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeApi.java index eb2dd16ccd..f57640f366 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeApi.java @@ -357,14 +357,14 @@ public interface FakeApi { * @param stringGroup String in group parameters (optional) * @param booleanGroup Boolean in group parameters (optional) * @param int64Group Integer in group parameters (optional) - * @return Someting wrong (status code 400) + * @return Something wrong (status code 400) */ @Operation( operationId = "testGroupParameters", summary = "Fake endpoint to test group parameters (optional)", tags = { "fake" }, responses = { - @ApiResponse(responseCode = "400", description = "Someting wrong") + @ApiResponse(responseCode = "400", description = "Something wrong") } ) @RequestMapping( diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/StoreApi.java index 32c6eda856..7f4f5f24b5 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/StoreApi.java @@ -92,7 +92,7 @@ public interface StoreApi { /** * GET /store/order/{order_id} : Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param orderId ID of pet that needs to be fetched (required) * @return successful operation (status code 200) diff --git a/samples/server/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java index cc4d05b2bb..05577ea0b5 100644 --- a/samples/server/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java @@ -97,7 +97,7 @@ public interface StoreApi { /** * GET /store/order/{orderId} : Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param orderId ID of pet that needs to be fetched (required) * @return successful operation (status code 200) @@ -108,7 +108,7 @@ public interface StoreApi { tags = { "store" }, value = "Find purchase order by ID", nickname = "getOrderById", - notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", response = Order.class ) @ApiResponses({ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java index 1220ac16e0..f1bdf363a8 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java @@ -413,7 +413,7 @@ public interface FakeApi { * @param stringGroup String in group parameters (optional) * @param booleanGroup Boolean in group parameters (optional) * @param int64Group Integer in group parameters (optional) - * @return Someting wrong (status code 400) + * @return Something wrong (status code 400) */ @ApiOperation( tags = { "fake" }, @@ -422,7 +422,7 @@ public interface FakeApi { notes = "Fake endpoint to test group parameters (optional)" ) @ApiResponses({ - @ApiResponse(code = 400, message = "Someting wrong") + @ApiResponse(code = 400, message = "Something wrong") }) @RequestMapping( method = RequestMethod.DELETE, diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java index 1afb547b40..05119e4309 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java @@ -97,7 +97,7 @@ public interface StoreApi { /** * GET /store/order/{order_id} : Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param orderId ID of pet that needs to be fetched (required) * @return successful operation (status code 200) @@ -108,7 +108,7 @@ public interface StoreApi { tags = { "store" }, value = "Find purchase order by ID", nickname = "getOrderById", - notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", response = Order.class ) @ApiResponses({ diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/resources/openapi.yaml index 2999e6f2f8..658d8a96b3 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/resources/openapi.yaml @@ -392,7 +392,7 @@ paths: - tag: store get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched @@ -714,7 +714,7 @@ paths: responses: "400": content: {} - description: Someting wrong + description: Something wrong summary: Fake endpoint to test group parameters (optional) tags: - fake diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java index 1220ac16e0..f1bdf363a8 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java @@ -413,7 +413,7 @@ public interface FakeApi { * @param stringGroup String in group parameters (optional) * @param booleanGroup Boolean in group parameters (optional) * @param int64Group Integer in group parameters (optional) - * @return Someting wrong (status code 400) + * @return Something wrong (status code 400) */ @ApiOperation( tags = { "fake" }, @@ -422,7 +422,7 @@ public interface FakeApi { notes = "Fake endpoint to test group parameters (optional)" ) @ApiResponses({ - @ApiResponse(code = 400, message = "Someting wrong") + @ApiResponse(code = 400, message = "Something wrong") }) @RequestMapping( method = RequestMethod.DELETE, diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java index 1afb547b40..05119e4309 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java @@ -97,7 +97,7 @@ public interface StoreApi { /** * GET /store/order/{order_id} : Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param orderId ID of pet that needs to be fetched (required) * @return successful operation (status code 200) @@ -108,7 +108,7 @@ public interface StoreApi { tags = { "store" }, value = "Find purchase order by ID", nickname = "getOrderById", - notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", response = Order.class ) @ApiResponses({ diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-beanvalidation/src/main/resources/openapi.yaml index 2999e6f2f8..658d8a96b3 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-beanvalidation/src/main/resources/openapi.yaml @@ -392,7 +392,7 @@ paths: - tag: store get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched @@ -714,7 +714,7 @@ paths: responses: "400": content: {} - description: Someting wrong + description: Something wrong summary: Fake endpoint to test group parameters (optional) tags: - fake diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java index 261a033dd8..a2d0eb80df 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java @@ -381,7 +381,7 @@ public interface FakeApi { * @param stringGroup String in group parameters (optional) * @param booleanGroup Boolean in group parameters (optional) * @param int64Group Integer in group parameters (optional) - * @return Someting wrong (status code 400) + * @return Something wrong (status code 400) */ @ApiOperation( tags = { "fake" }, @@ -390,7 +390,7 @@ public interface FakeApi { notes = "Fake endpoint to test group parameters (optional)" ) @ApiResponses({ - @ApiResponse(code = 400, message = "Someting wrong") + @ApiResponse(code = 400, message = "Something wrong") }) @RequestMapping( method = RequestMethod.DELETE, diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java index 03f67c302c..2cd684b90f 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java @@ -234,7 +234,7 @@ public interface FakeApiDelegate { * @param stringGroup String in group parameters (optional) * @param booleanGroup Boolean in group parameters (optional) * @param int64Group Integer in group parameters (optional) - * @return Someting wrong (status code 400) + * @return Something wrong (status code 400) * @see FakeApi#testGroupParameters */ default ResponseEntity testGroupParameters(Integer requiredStringGroup, diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java index c9e8abe50b..1dabfb6ff4 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java @@ -91,7 +91,7 @@ public interface StoreApi { /** * GET /store/order/{order_id} : Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param orderId ID of pet that needs to be fetched (required) * @return successful operation (status code 200) @@ -102,7 +102,7 @@ public interface StoreApi { tags = { "store" }, value = "Find purchase order by ID", nickname = "getOrderById", - notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", response = Order.class ) @ApiResponses({ diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApiDelegate.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApiDelegate.java index e9b7146b52..c4c812a9bb 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApiDelegate.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApiDelegate.java @@ -52,7 +52,7 @@ public interface StoreApiDelegate { /** * GET /store/order/{order_id} : Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param orderId ID of pet that needs to be fetched (required) * @return successful operation (status code 200) diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-delegate-j8/src/main/resources/openapi.yaml index 2999e6f2f8..658d8a96b3 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-delegate-j8/src/main/resources/openapi.yaml @@ -392,7 +392,7 @@ paths: - tag: store get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched @@ -714,7 +714,7 @@ paths: responses: "400": content: {} - description: Someting wrong + description: Something wrong summary: Fake endpoint to test group parameters (optional) tags: - fake diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java index 261a033dd8..a2d0eb80df 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java @@ -381,7 +381,7 @@ public interface FakeApi { * @param stringGroup String in group parameters (optional) * @param booleanGroup Boolean in group parameters (optional) * @param int64Group Integer in group parameters (optional) - * @return Someting wrong (status code 400) + * @return Something wrong (status code 400) */ @ApiOperation( tags = { "fake" }, @@ -390,7 +390,7 @@ public interface FakeApi { notes = "Fake endpoint to test group parameters (optional)" ) @ApiResponses({ - @ApiResponse(code = 400, message = "Someting wrong") + @ApiResponse(code = 400, message = "Something wrong") }) @RequestMapping( method = RequestMethod.DELETE, diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java index 03f67c302c..2cd684b90f 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java @@ -234,7 +234,7 @@ public interface FakeApiDelegate { * @param stringGroup String in group parameters (optional) * @param booleanGroup Boolean in group parameters (optional) * @param int64Group Integer in group parameters (optional) - * @return Someting wrong (status code 400) + * @return Something wrong (status code 400) * @see FakeApi#testGroupParameters */ default ResponseEntity testGroupParameters(Integer requiredStringGroup, diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java index c9e8abe50b..1dabfb6ff4 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java @@ -91,7 +91,7 @@ public interface StoreApi { /** * GET /store/order/{order_id} : Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param orderId ID of pet that needs to be fetched (required) * @return successful operation (status code 200) @@ -102,7 +102,7 @@ public interface StoreApi { tags = { "store" }, value = "Find purchase order by ID", nickname = "getOrderById", - notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", response = Order.class ) @ApiResponses({ diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApiDelegate.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApiDelegate.java index e9b7146b52..c4c812a9bb 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApiDelegate.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApiDelegate.java @@ -52,7 +52,7 @@ public interface StoreApiDelegate { /** * GET /store/order/{order_id} : Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param orderId ID of pet that needs to be fetched (required) * @return successful operation (status code 200) diff --git a/samples/server/petstore/springboot-delegate/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-delegate/src/main/resources/openapi.yaml index 2999e6f2f8..658d8a96b3 100644 --- a/samples/server/petstore/springboot-delegate/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-delegate/src/main/resources/openapi.yaml @@ -392,7 +392,7 @@ paths: - tag: store get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched @@ -714,7 +714,7 @@ paths: responses: "400": content: {} - description: Someting wrong + description: Something wrong summary: Fake endpoint to test group parameters (optional) tags: - fake diff --git a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/StoreApi.java index 3044b699b0..0272594908 100644 --- a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/java/org/openapitools/api/StoreApi.java @@ -71,7 +71,7 @@ public interface StoreApi { /** * GET /store/order/{orderId} : Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param orderId ID of pet that needs to be fetched (required) * @return successful operation (status code 200) diff --git a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/resources/openapi.yaml index b629acd9d7..ce4ba1e4a4 100644 --- a/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-implicitHeaders-annotationLibrary/src/main/resources/openapi.yaml @@ -386,7 +386,7 @@ paths: - tag: store get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java index 88b13d8704..0126531c3b 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java @@ -411,7 +411,7 @@ public interface FakeApi { * @param requiredInt64Group Required Integer in group parameters (required) * @param stringGroup String in group parameters (optional) * @param int64Group Integer in group parameters (optional) - * @return Someting wrong (status code 400) + * @return Something wrong (status code 400) */ @ApiOperation( tags = { "fake" }, @@ -420,7 +420,7 @@ public interface FakeApi { notes = "Fake endpoint to test group parameters (optional)" ) @ApiResponses({ - @ApiResponse(code = 400, message = "Someting wrong") + @ApiResponse(code = 400, message = "Something wrong") }) @ApiImplicitParams({ @ApiImplicitParam(name = "required_boolean_group", value = "Required Boolean in group parameters", required = true, dataType = "Boolean", paramType = "header"), diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java index 1afb547b40..05119e4309 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java @@ -97,7 +97,7 @@ public interface StoreApi { /** * GET /store/order/{order_id} : Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param orderId ID of pet that needs to be fetched (required) * @return successful operation (status code 200) @@ -108,7 +108,7 @@ public interface StoreApi { tags = { "store" }, value = "Find purchase order by ID", nickname = "getOrderById", - notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", response = Order.class ) @ApiResponses({ diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml index 2999e6f2f8..658d8a96b3 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/resources/openapi.yaml @@ -392,7 +392,7 @@ paths: - tag: store get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched @@ -714,7 +714,7 @@ paths: responses: "400": content: {} - description: Someting wrong + description: Something wrong summary: Fake endpoint to test group parameters (optional) tags: - fake diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java index f598c33202..f6501130e3 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java @@ -396,7 +396,7 @@ public interface FakeApi { * @param stringGroup String in group parameters (optional) * @param booleanGroup Boolean in group parameters (optional) * @param int64Group Integer in group parameters (optional) - * @return Someting wrong (status code 400) + * @return Something wrong (status code 400) */ @ApiOperation( tags = { "fake" }, @@ -405,7 +405,7 @@ public interface FakeApi { notes = "Fake endpoint to test group parameters (optional)" ) @ApiResponses({ - @ApiResponse(code = 400, message = "Someting wrong") + @ApiResponse(code = 400, message = "Something wrong") }) @RequestMapping( method = RequestMethod.DELETE, diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiDelegate.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiDelegate.java index 67da639c92..af978b31c2 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiDelegate.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApiDelegate.java @@ -265,7 +265,7 @@ public interface FakeApiDelegate { * @param stringGroup String in group parameters (optional) * @param booleanGroup Boolean in group parameters (optional) * @param int64Group Integer in group parameters (optional) - * @return Someting wrong (status code 400) + * @return Something wrong (status code 400) * @see FakeApi#testGroupParameters */ default Mono> testGroupParameters(Integer requiredStringGroup, diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java index 826fe6283a..00999c7fd6 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java @@ -97,7 +97,7 @@ public interface StoreApi { /** * GET /store/order/{order_id} : Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param orderId ID of pet that needs to be fetched (required) * @return successful operation (status code 200) @@ -108,7 +108,7 @@ public interface StoreApi { tags = { "store" }, value = "Find purchase order by ID", nickname = "getOrderById", - notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", response = Order.class ) @ApiResponses({ diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApiDelegate.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApiDelegate.java index 0d94aece42..48ed754068 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApiDelegate.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApiDelegate.java @@ -62,7 +62,7 @@ public interface StoreApiDelegate { /** * GET /store/order/{order_id} : Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param orderId ID of pet that needs to be fetched (required) * @return successful operation (status code 200) diff --git a/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml index 2999e6f2f8..658d8a96b3 100644 --- a/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml @@ -392,7 +392,7 @@ paths: - tag: store get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched @@ -714,7 +714,7 @@ paths: responses: "400": content: {} - description: Someting wrong + description: Something wrong summary: Fake endpoint to test group parameters (optional) tags: - fake diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApi.java index 599c2a879c..e1cfb57d60 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApi.java @@ -381,7 +381,7 @@ public interface FakeApi { * @param stringGroup String in group parameters (optional) * @param booleanGroup Boolean in group parameters (optional) * @param int64Group Integer in group parameters (optional) - * @return Someting wrong (status code 400) + * @return Something wrong (status code 400) */ @ApiOperation( tags = { "fake" }, @@ -390,7 +390,7 @@ public interface FakeApi { notes = "Fake endpoint to test group parameters (optional)" ) @ApiResponses({ - @ApiResponse(code = 400, message = "Someting wrong") + @ApiResponse(code = 400, message = "Something wrong") }) @RequestMapping( method = RequestMethod.DELETE, diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java index 397c677c99..5242544c6d 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java @@ -234,7 +234,7 @@ public interface FakeApiDelegate { * @param stringGroup String in group parameters (optional) * @param booleanGroup Boolean in group parameters (optional) * @param int64Group Integer in group parameters (optional) - * @return Someting wrong (status code 400) + * @return Something wrong (status code 400) * @see FakeApi#testGroupParameters */ default ResponseEntity testGroupParameters(Integer requiredStringGroup, diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApi.java index c9e8abe50b..1dabfb6ff4 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApi.java @@ -91,7 +91,7 @@ public interface StoreApi { /** * GET /store/order/{order_id} : Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param orderId ID of pet that needs to be fetched (required) * @return successful operation (status code 200) @@ -102,7 +102,7 @@ public interface StoreApi { tags = { "store" }, value = "Find purchase order by ID", nickname = "getOrderById", - notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", response = Order.class ) @ApiResponses({ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApiDelegate.java index e9b7146b52..c4c812a9bb 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApiDelegate.java @@ -52,7 +52,7 @@ public interface StoreApiDelegate { /** * GET /store/order/{order_id} : Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param orderId ID of pet that needs to be fetched (required) * @return successful operation (status code 200) diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/resources/openapi.yaml index d28bcff839..e0a2517abd 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/resources/openapi.yaml @@ -391,7 +391,7 @@ paths: - tag: store get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched @@ -713,7 +713,7 @@ paths: responses: "400": content: {} - description: Someting wrong + description: Something wrong summary: Fake endpoint to test group parameters (optional) tags: - fake diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApi.java index 599c2a879c..e1cfb57d60 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApi.java @@ -381,7 +381,7 @@ public interface FakeApi { * @param stringGroup String in group parameters (optional) * @param booleanGroup Boolean in group parameters (optional) * @param int64Group Integer in group parameters (optional) - * @return Someting wrong (status code 400) + * @return Something wrong (status code 400) */ @ApiOperation( tags = { "fake" }, @@ -390,7 +390,7 @@ public interface FakeApi { notes = "Fake endpoint to test group parameters (optional)" ) @ApiResponses({ - @ApiResponse(code = 400, message = "Someting wrong") + @ApiResponse(code = 400, message = "Something wrong") }) @RequestMapping( method = RequestMethod.DELETE, diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApiDelegate.java index 397c677c99..5242544c6d 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApiDelegate.java @@ -234,7 +234,7 @@ public interface FakeApiDelegate { * @param stringGroup String in group parameters (optional) * @param booleanGroup Boolean in group parameters (optional) * @param int64Group Integer in group parameters (optional) - * @return Someting wrong (status code 400) + * @return Something wrong (status code 400) * @see FakeApi#testGroupParameters */ default ResponseEntity testGroupParameters(Integer requiredStringGroup, diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApi.java index c9e8abe50b..1dabfb6ff4 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApi.java @@ -91,7 +91,7 @@ public interface StoreApi { /** * GET /store/order/{order_id} : Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param orderId ID of pet that needs to be fetched (required) * @return successful operation (status code 200) @@ -102,7 +102,7 @@ public interface StoreApi { tags = { "store" }, value = "Find purchase order by ID", nickname = "getOrderById", - notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", response = Order.class ) @ApiResponses({ diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApiDelegate.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApiDelegate.java index e9b7146b52..c4c812a9bb 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApiDelegate.java +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApiDelegate.java @@ -52,7 +52,7 @@ public interface StoreApiDelegate { /** * GET /store/order/{order_id} : Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param orderId ID of pet that needs to be fetched (required) * @return successful operation (status code 200) diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/resources/openapi.yaml index d28bcff839..e0a2517abd 100644 --- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/resources/openapi.yaml @@ -391,7 +391,7 @@ paths: - tag: store get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched @@ -713,7 +713,7 @@ paths: responses: "400": content: {} - description: Someting wrong + description: Something wrong summary: Fake endpoint to test group parameters (optional) tags: - fake diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApi.java index c07a605db9..6140ef834b 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApi.java @@ -413,7 +413,7 @@ public interface FakeApi { * @param stringGroup String in group parameters (optional) * @param booleanGroup Boolean in group parameters (optional) * @param int64Group Integer in group parameters (optional) - * @return Someting wrong (status code 400) + * @return Something wrong (status code 400) */ @ApiOperation( tags = { "fake" }, @@ -422,7 +422,7 @@ public interface FakeApi { notes = "Fake endpoint to test group parameters (optional)" ) @ApiResponses({ - @ApiResponse(code = 400, message = "Someting wrong") + @ApiResponse(code = 400, message = "Something wrong") }) @RequestMapping( method = RequestMethod.DELETE, diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApi.java index 1afb547b40..05119e4309 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApi.java @@ -97,7 +97,7 @@ public interface StoreApi { /** * GET /store/order/{order_id} : Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param orderId ID of pet that needs to be fetched (required) * @return successful operation (status code 200) @@ -108,7 +108,7 @@ public interface StoreApi { tags = { "store" }, value = "Find purchase order by ID", nickname = "getOrderById", - notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", response = Order.class ) @ApiResponses({ diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/resources/openapi.yaml index d28bcff839..e0a2517abd 100644 --- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/resources/openapi.yaml @@ -391,7 +391,7 @@ paths: - tag: store get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched @@ -713,7 +713,7 @@ paths: responses: "400": content: {} - description: Someting wrong + description: Something wrong summary: Fake endpoint to test group parameters (optional) tags: - fake diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java index c07a605db9..6140ef834b 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java @@ -413,7 +413,7 @@ public interface FakeApi { * @param stringGroup String in group parameters (optional) * @param booleanGroup Boolean in group parameters (optional) * @param int64Group Integer in group parameters (optional) - * @return Someting wrong (status code 400) + * @return Something wrong (status code 400) */ @ApiOperation( tags = { "fake" }, @@ -422,7 +422,7 @@ public interface FakeApi { notes = "Fake endpoint to test group parameters (optional)" ) @ApiResponses({ - @ApiResponse(code = 400, message = "Someting wrong") + @ApiResponse(code = 400, message = "Something wrong") }) @RequestMapping( method = RequestMethod.DELETE, diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java index 1afb547b40..05119e4309 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java @@ -97,7 +97,7 @@ public interface StoreApi { /** * GET /store/order/{order_id} : Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param orderId ID of pet that needs to be fetched (required) * @return successful operation (status code 200) @@ -108,7 +108,7 @@ public interface StoreApi { tags = { "store" }, value = "Find purchase order by ID", nickname = "getOrderById", - notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", response = Order.class ) @ApiResponses({ diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-spring-pageable/src/main/resources/openapi.yaml index d28bcff839..e0a2517abd 100644 --- a/samples/server/petstore/springboot-spring-pageable/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-spring-pageable/src/main/resources/openapi.yaml @@ -391,7 +391,7 @@ paths: - tag: store get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched @@ -713,7 +713,7 @@ paths: responses: "400": content: {} - description: Someting wrong + description: Something wrong summary: Fake endpoint to test group parameters (optional) tags: - fake diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java index b8085e150e..c4663cf12f 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java @@ -413,7 +413,7 @@ public interface FakeApi { * @param stringGroup String in group parameters (optional) * @param booleanGroup Boolean in group parameters (optional) * @param int64Group Integer in group parameters (optional) - * @return Someting wrong (status code 400) + * @return Something wrong (status code 400) */ @ApiOperation( tags = { "fake" }, @@ -422,7 +422,7 @@ public interface FakeApi { notes = "Fake endpoint to test group parameters (optional)" ) @ApiResponses({ - @ApiResponse(code = 400, message = "Someting wrong") + @ApiResponse(code = 400, message = "Something wrong") }) @RequestMapping( method = RequestMethod.DELETE, diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java index 1afb547b40..05119e4309 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java @@ -97,7 +97,7 @@ public interface StoreApi { /** * GET /store/order/{order_id} : Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param orderId ID of pet that needs to be fetched (required) * @return successful operation (status code 200) @@ -108,7 +108,7 @@ public interface StoreApi { tags = { "store" }, value = "Find purchase order by ID", nickname = "getOrderById", - notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", response = Order.class ) @ApiResponses({ diff --git a/samples/server/petstore/springboot-useoptional/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-useoptional/src/main/resources/openapi.yaml index 2999e6f2f8..658d8a96b3 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-useoptional/src/main/resources/openapi.yaml @@ -392,7 +392,7 @@ paths: - tag: store get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched @@ -714,7 +714,7 @@ paths: responses: "400": content: {} - description: Someting wrong + description: Something wrong summary: Fake endpoint to test group parameters (optional) tags: - fake diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java index d610b3cc01..269695baca 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java @@ -422,7 +422,7 @@ public interface FakeApi { * @param stringGroup String in group parameters (optional) * @param booleanGroup Boolean in group parameters (optional) * @param int64Group Integer in group parameters (optional) - * @return Someting wrong (status code 400) + * @return Something wrong (status code 400) */ @ApiVirtual @Operation( @@ -430,7 +430,7 @@ public interface FakeApi { summary = "Fake endpoint to test group parameters (optional)", tags = { "fake" }, responses = { - @ApiResponse(responseCode = "400", description = "Someting wrong") + @ApiResponse(responseCode = "400", description = "Something wrong") } ) @RequestMapping( diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java index 9f5d667b14..4239e75c31 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java @@ -107,7 +107,7 @@ public interface StoreApi { /** * GET /store/order/{order_id} : Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param orderId ID of pet that needs to be fetched (required) * @return successful operation (status code 200) diff --git a/samples/server/petstore/springboot-virtualan/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-virtualan/src/main/resources/openapi.yaml index 2999e6f2f8..658d8a96b3 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot-virtualan/src/main/resources/openapi.yaml @@ -392,7 +392,7 @@ paths: - tag: store get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched @@ -714,7 +714,7 @@ paths: responses: "400": content: {} - description: Someting wrong + description: Something wrong summary: Fake endpoint to test group parameters (optional) tags: - fake diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java index 1220ac16e0..f1bdf363a8 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java @@ -413,7 +413,7 @@ public interface FakeApi { * @param stringGroup String in group parameters (optional) * @param booleanGroup Boolean in group parameters (optional) * @param int64Group Integer in group parameters (optional) - * @return Someting wrong (status code 400) + * @return Something wrong (status code 400) */ @ApiOperation( tags = { "fake" }, @@ -422,7 +422,7 @@ public interface FakeApi { notes = "Fake endpoint to test group parameters (optional)" ) @ApiResponses({ - @ApiResponse(code = 400, message = "Someting wrong") + @ApiResponse(code = 400, message = "Something wrong") }) @RequestMapping( method = RequestMethod.DELETE, diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java index 1afb547b40..05119e4309 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java @@ -97,7 +97,7 @@ public interface StoreApi { /** * GET /store/order/{order_id} : Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions * * @param orderId ID of pet that needs to be fetched (required) * @return successful operation (status code 200) @@ -108,7 +108,7 @@ public interface StoreApi { tags = { "store" }, value = "Find purchase order by ID", nickname = "getOrderById", - notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", + notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", response = Order.class ) @ApiResponses({ diff --git a/samples/server/petstore/springboot/src/main/resources/openapi.yaml b/samples/server/petstore/springboot/src/main/resources/openapi.yaml index 2999e6f2f8..658d8a96b3 100644 --- a/samples/server/petstore/springboot/src/main/resources/openapi.yaml +++ b/samples/server/petstore/springboot/src/main/resources/openapi.yaml @@ -392,7 +392,7 @@ paths: - tag: store get: description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generated exceptions + values will generate exceptions operationId: getOrderById parameters: - description: ID of pet that needs to be fetched @@ -714,7 +714,7 @@ paths: responses: "400": content: {} - description: Someting wrong + description: Something wrong summary: Fake endpoint to test group parameters (optional) tags: - fake From 7a17d3dc55afdedf4b0ca6ab39fa05c9eb3102b6 Mon Sep 17 00:00:00 2001 From: Beppe Catanese <1771700+gcatanese@users.noreply.github.com> Date: Mon, 7 Nov 2022 15:05:42 +0100 Subject: [PATCH 003/189] Correct import, add test (#13905) --- .../src/main/resources/go/api_test.mustache | 2 +- .../codegen/go/GoClientCodegenTest.java | 21 +++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/resources/go/api_test.mustache b/modules/openapi-generator/src/main/resources/go/api_test.mustache index 0bbbbf757b..b62cacca02 100644 --- a/modules/openapi-generator/src/main/resources/go/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/go/api_test.mustache @@ -16,7 +16,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "testing" - {{goImportAlias}} "./openapi" + {{goImportAlias}} "{{gitHost}}/{{gitUserId}}/{{gitRepoId}}{{#isGoSubmodule}}/{{packageName}}{{/isGoSubmodule}}" ) func Test_{{packageName}}_{{classname}}Service(t *testing.T) { diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/go/GoClientCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/go/GoClientCodegenTest.java index b55967fdaf..55706dc106 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/go/GoClientCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/go/GoClientCodegenTest.java @@ -222,6 +222,27 @@ public class GoClientCodegenTest { "func Test_openapi_PetApiService(t *testing.T) {"); } + @Test + public void verifyTestImport() throws IOException { + File output = Files.createTempDirectory("test").toFile(); + output.deleteOnExit(); + + final CodegenConfigurator configurator = new CodegenConfigurator() + .setGeneratorName("go") + .setGitUserId("OpenAPITools") + .setGitRepoId("openapi-generator") + .setInputSpec("src/test/resources/3_0/petstore.yaml") + .setOutputDir(output.getAbsolutePath().replace("\\", "/")); + + DefaultGenerator generator = new DefaultGenerator(); + List files = generator.opts(configurator.toClientOptInput()).generate(); + files.forEach(File::deleteOnExit); + + TestUtils.assertFileExists(Paths.get(output + "/test/api_pet_test.go")); + TestUtils.assertFileContains(Paths.get(output + "/test/api_pet_test.go"), + "openapiclient \"github.com/OpenAPITools/openapi-generator\""); + } + @Test public void verifyFormatErrorMessageInUse() throws IOException { File output = Files.createTempDirectory("test").toFile(); From 3eec4eb326a6c7abd49dcd60e63f3019b966466f Mon Sep 17 00:00:00 2001 From: Daniel Hoffmann Date: Mon, 7 Nov 2022 16:32:58 +0100 Subject: [PATCH 004/189] #13726 Introduce new remoteInputSpec parameter (#13727) * #13726 Introduce new remoteInputSpec parameter * #13726 Add documentation and new warning log --- .../README.adoc | 5 ++ .../gradle/plugin/OpenApiGeneratorPlugin.kt | 1 + .../OpenApiGeneratorGenerateExtension.kt | 5 ++ .../gradle/plugin/tasks/GenerateTask.kt | 16 +++++ .../src/test/kotlin/GenerateTaskDslTest.kt | 59 +++++++++++++++++++ 5 files changed, 86 insertions(+) diff --git a/modules/openapi-generator-gradle-plugin/README.adoc b/modules/openapi-generator-gradle-plugin/README.adoc index 60a20a16c3..f9cb667959 100644 --- a/modules/openapi-generator-gradle-plugin/README.adoc +++ b/modules/openapi-generator-gradle-plugin/README.adoc @@ -154,6 +154,11 @@ apply plugin: 'org.openapi.generator' |None |The Open API 2.0/3.x specification location. +|remoteInputSpec +|String +|None +|The remote Open API 2.0/3.x specification URL location. + |templateDir |String |None diff --git a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/OpenApiGeneratorPlugin.kt b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/OpenApiGeneratorPlugin.kt index 03cff61a00..19c9a7c4b9 100644 --- a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/OpenApiGeneratorPlugin.kt +++ b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/OpenApiGeneratorPlugin.kt @@ -97,6 +97,7 @@ class OpenApiGeneratorPlugin : Plugin { generatorName.set(generate.generatorName) outputDir.set(generate.outputDir) inputSpec.set(generate.inputSpec) + remoteInputSpec.set(generate.remoteInputSpec) templateDir.set(generate.templateDir) auth.set(generate.auth) globalProperties.set(generate.globalProperties) diff --git a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorGenerateExtension.kt b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorGenerateExtension.kt index 6fbb11d45d..6e88fa7964 100644 --- a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorGenerateExtension.kt +++ b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorGenerateExtension.kt @@ -52,6 +52,11 @@ open class OpenApiGeneratorGenerateExtension(project: Project) { */ val inputSpec = project.objects.property() + /** + * The remote Open API 2.0/3.x specification URL location. + */ + val remoteInputSpec = project.objects.property() + /** * The template directory holding a custom template. */ diff --git a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt index a610baa80e..38c128a4b8 100644 --- a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt +++ b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt @@ -91,10 +91,18 @@ open class GenerateTask : DefaultTask() { /** * The Open API 2.0/3.x specification location. */ + @Optional @get:InputFile @PathSensitive(PathSensitivity.RELATIVE) val inputSpec = project.objects.property() + /** + * The remote Open API 2.0/3.x specification URL location. + */ + @Input + @Optional + val remoteInputSpec = project.objects.property() + /** * The template directory holding a custom template. */ @@ -556,6 +564,10 @@ open class GenerateTask : DefaultTask() { GlobalSettings.setProperty(CodegenConstants.WITH_XML, withXml.get().toString()) } + if (inputSpec.isPresent && remoteInputSpec.isPresent) { + logger.warn("Both inputSpec and remoteInputSpec is specified. The remoteInputSpec will take priority over inputSpec.") + } + // now override with any specified parameters verbose.ifNotEmpty { value -> configurator.setVerbose(value) @@ -573,6 +585,10 @@ open class GenerateTask : DefaultTask() { configurator.setInputSpec(value) } + remoteInputSpec.ifNotEmpty { value -> + configurator.setInputSpec(value) + } + generatorName.ifNotEmpty { value -> configurator.setGeneratorName(value) } diff --git a/modules/openapi-generator-gradle-plugin/src/test/kotlin/GenerateTaskDslTest.kt b/modules/openapi-generator-gradle-plugin/src/test/kotlin/GenerateTaskDslTest.kt index 4d5a96fd95..660f0845bd 100644 --- a/modules/openapi-generator-gradle-plugin/src/test/kotlin/GenerateTaskDslTest.kt +++ b/modules/openapi-generator-gradle-plugin/src/test/kotlin/GenerateTaskDslTest.kt @@ -29,6 +29,65 @@ class GenerateTaskDslTest : TestBase() { } """.trimIndent() + @Test + fun `openApiGenerate should create an expected file structure from URL config`() { + val specUrl = "https://raw.githubusercontent.com/OpenAPITools/openapi-generator/b6b8c0db872fb4a418ae496e89c7e656e14be165/modules/openapi-generator-gradle-plugin/src/test/resources/specs/petstore-v3.0.yaml" + // Arrange + val buildContents = """ + plugins { + id 'org.openapi.generator' + } + openApiGenerate { + generatorName = "kotlin" + remoteInputSpec = "$specUrl" + outputDir = file("build/kotlin").absolutePath + apiPackage = "org.openapitools.example.api" + invokerPackage = "org.openapitools.example.invoker" + modelPackage = "org.openapitools.example.model" + configOptions = [ + dateLibrary: "java8" + ] + } + """.trimIndent() + File(temp, "build.gradle").writeText(buildContents) + + // Act + val result = GradleRunner.create() + .withProjectDir(temp) + .withArguments("openApiGenerate") + .withPluginClasspath() + .build() + + // Assert + assertTrue( + result.output.contains("Successfully generated code to"), + "User friendly generate notice is missing." + ) + + listOf( + "build/kotlin/.openapi-generator-ignore", + "build/kotlin/docs/PetsApi.md", + "build/kotlin/docs/Error.md", + "build/kotlin/docs/Pet.md", + "build/kotlin/README.md", + "build/kotlin/build.gradle", + "build/kotlin/.openapi-generator/VERSION", + "build/kotlin/settings.gradle", + "build/kotlin/src/main/kotlin/org/openapitools/example/model/Pet.kt", + "build/kotlin/src/main/kotlin/org/openapitools/example/model/Error.kt", + "build/kotlin/src/main/kotlin/org/openapitools/example/api/PetsApi.kt", + "build/kotlin/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt" + ).map { + val f = File(temp, it) + assertTrue(f.exists() && f.isFile, "An expected file was not generated when invoking the generation: $f") + } + + assertEquals( + TaskOutcome.SUCCESS, result.task(":openApiGenerate")?.outcome, + "Expected a successful run, but found ${result.task(":openApiGenerate")?.outcome}" + ) + } + @Test fun `openApiGenerate should create an expected file structure from DSL config`() { // Arrange From 6a7b8fcebe6bd3b3953d7e00c8ad1f88c6570cf1 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 8 Nov 2022 10:40:28 +0800 Subject: [PATCH 005/189] [Go][client] better code format, regenerate go client tests (#13940) * go client regenerate test * replace 4-space with tabs, regenerate tests --- .../src/main/resources/go/api_test.mustache | 44 ++-- .../src/main/resources/go/client.mustache | 25 +- .../main/resources/go/model_oneof.mustache | 52 ++-- .../main/resources/go/model_simple.mustache | 12 +- .../src/main/resources/go/utils.mustache | 24 +- .../client/petstore/go/go-petstore/client.go | 25 +- .../petstore/go/go-petstore/model_animal.go | 2 +- .../petstore/go/go-petstore/model_category.go | 2 +- .../go/go-petstore/model_enum_test_.go | 2 +- .../go/go-petstore/model_format_test_.go | 8 +- .../petstore/go/go-petstore/model_name.go | 2 +- .../petstore/go/go-petstore/model_pet.go | 4 +- .../go-petstore/model_type_holder_default.go | 10 +- .../go-petstore/model_type_holder_example.go | 12 +- .../client/petstore/go/go-petstore/utils.go | 24 +- .../x-auth-id-alias/go-experimental/client.go | 25 +- .../x-auth-id-alias/go-experimental/utils.go | 24 +- .../client/petstore/go/go-petstore/client.go | 25 +- .../petstore/go/go-petstore/model_animal.go | 2 +- .../go/go-petstore/model_apple_req.go | 2 +- .../go/go-petstore/model_banana_req.go | 2 +- .../petstore/go/go-petstore/model_category.go | 2 +- .../model_duplicated_prop_parent.go | 2 +- .../go/go-petstore/model_enum_test_.go | 2 +- .../go/go-petstore/model_format_test_.go | 8 +- .../petstore/go/go-petstore/model_name.go | 2 +- .../petstore/go/go-petstore/model_pet.go | 4 +- .../petstore/go/go-petstore/model_whale.go | 2 +- .../petstore/go/go-petstore/model_zebra.go | 2 +- .../go-petstore/test/api_another_fake_test.go | 28 +-- .../go/go-petstore/test/api_default_test.go | 28 +-- .../test/api_fake_classname_tags123_test.go | 28 +-- .../go/go-petstore/test/api_fake_test.go | 224 +++++++++--------- .../go/go-petstore/test/api_pet_test.go | 150 ++++++------ .../go/go-petstore/test/api_store_test.go | 74 +++--- .../go/go-petstore/test/api_user_test.go | 132 +++++------ .../client/petstore/go/go-petstore/utils.go | 24 +- samples/openapi3/client/petstore/go/go.mod | 5 +- samples/openapi3/client/petstore/go/go.sum | 17 ++ 39 files changed, 537 insertions(+), 525 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/go/api_test.mustache b/modules/openapi-generator/src/main/resources/go/api_test.mustache index b62cacca02..87a1f6c844 100644 --- a/modules/openapi-generator/src/main/resources/go/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/go/api_test.mustache @@ -12,40 +12,40 @@ Testing {{classname}}Service package {{packageName}} import ( - "context" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" - {{goImportAlias}} "{{gitHost}}/{{gitUserId}}/{{gitRepoId}}{{#isGoSubmodule}}/{{packageName}}{{/isGoSubmodule}}" + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + {{goImportAlias}} "{{gitHost}}/{{gitUserId}}/{{gitRepoId}}{{#isGoSubmodule}}/{{packageName}}{{/isGoSubmodule}}" ) func Test_{{packageName}}_{{classname}}Service(t *testing.T) { - configuration := {{goImportAlias}}.NewConfiguration() - apiClient := {{goImportAlias}}.NewAPIClient(configuration) + configuration := {{goImportAlias}}.NewConfiguration() + apiClient := {{goImportAlias}}.NewAPIClient(configuration) {{#operations}} {{#operation}} - t.Run("Test {{classname}}Service {{{nickname}}}", func(t *testing.T) { + t.Run("Test {{classname}}Service {{{nickname}}}", func(t *testing.T) { - {{^pathParams}} - t.Skip("skip test") // remove to run test - {{/pathParams}} - {{#pathParams}} - {{#-first}} - t.Skip("skip test") // remove to run test + {{^pathParams}} + t.Skip("skip test") // remove to run test + {{/pathParams}} + {{#pathParams}} + {{#-first}} + t.Skip("skip test") // remove to run test - {{/-first}} - var {{paramName}} {{{dataType}}} - {{/pathParams}} + {{/-first}} + var {{paramName}} {{{dataType}}} + {{/pathParams}} - resp, httpRes, err := apiClient.{{classname}}.{{operationId}}(context.Background(){{#pathParams}}, {{paramName}}{{/pathParams}}).Execute() + resp, httpRes, err := apiClient.{{classname}}.{{operationId}}(context.Background(){{#pathParams}}, {{paramName}}{{/pathParams}}).Execute() - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) - }) + }) {{/operation}} {{/operations}} diff --git a/modules/openapi-generator/src/main/resources/go/client.mustache b/modules/openapi-generator/src/main/resources/go/client.mustache index d5e45dfb03..dd5ea6ce22 100644 --- a/modules/openapi-generator/src/main/resources/go/client.mustache +++ b/modules/openapi-generator/src/main/resources/go/client.mustache @@ -619,20 +619,19 @@ func (e GenericOpenAPIError) Model() interface{} { // format error message using title and detail when model implements rfc7807 func formatErrorMessage(status string, v interface{}) string { + str := "" + metaValue := reflect.ValueOf(v).Elem() - str := "" - metaValue := reflect.ValueOf(v).Elem() + field := metaValue.FieldByName("Title") + if field != (reflect.Value{}) { + str = fmt.Sprintf("%s", field.Interface()) + } - field := metaValue.FieldByName("Title") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s", field.Interface()) - } + field = metaValue.FieldByName("Detail") + if field != (reflect.Value{}) { + str = fmt.Sprintf("%s (%s)", str, field.Interface()) + } - field = metaValue.FieldByName("Detail") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s (%s)", str, field.Interface()) - } - - // status title (detail) - return fmt.Sprintf("%s %s", status, str) + // status title (detail) + return fmt.Sprintf("%s %s", status, str) } diff --git a/modules/openapi-generator/src/main/resources/go/model_oneof.mustache b/modules/openapi-generator/src/main/resources/go/model_oneof.mustache index 3f70f61168..83660147cf 100644 --- a/modules/openapi-generator/src/main/resources/go/model_oneof.mustache +++ b/modules/openapi-generator/src/main/resources/go/model_oneof.mustache @@ -53,34 +53,34 @@ func (dst *{{classname}}) UnmarshalJSON(data []byte) error { return nil {{/discriminator}} {{^discriminator}} - match := 0 - {{#oneOf}} - // try to unmarshal data into {{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}} - err = json.Unmarshal(data, &dst.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}}) - if err == nil { - json{{{.}}}, _ := json.Marshal(dst.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}}) - if string(json{{{.}}}) == "{}" { // empty struct - dst.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}} = nil - } else { - match++ - } - } else { - dst.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}} = nil - } + match := 0 + {{#oneOf}} + // try to unmarshal data into {{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}} + err = json.Unmarshal(data, &dst.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}}) + if err == nil { + json{{{.}}}, _ := json.Marshal(dst.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}}) + if string(json{{{.}}}) == "{}" { // empty struct + dst.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}} = nil + } else { + match++ + } + } else { + dst.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}} = nil + } - {{/oneOf}} - if match > 1 { // more than 1 match - // reset to nil - {{#oneOf}} - dst.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}} = nil - {{/oneOf}} + {{/oneOf}} + if match > 1 { // more than 1 match + // reset to nil + {{#oneOf}} + dst.{{#lambda.type-to-name}}{{{.}}}{{/lambda.type-to-name}} = nil + {{/oneOf}} - return fmt.Errorf("data matches more than one schema in oneOf({{classname}})") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf({{classname}})") - } + return fmt.Errorf("data matches more than one schema in oneOf({{classname}})") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf({{classname}})") + } {{/discriminator}} {{/useOneOfDiscriminatorLookup}} {{^useOneOfDiscriminatorLookup}} diff --git a/modules/openapi-generator/src/main/resources/go/model_simple.mustache b/modules/openapi-generator/src/main/resources/go/model_simple.mustache index 809cced75f..43e11b8f7d 100644 --- a/modules/openapi-generator/src/main/resources/go/model_simple.mustache +++ b/modules/openapi-generator/src/main/resources/go/model_simple.mustache @@ -123,12 +123,12 @@ func (o *{{classname}}) Get{{name}}() {{vendorExtensions.x-go-base-type}} { {{/deprecated}} func (o *{{classname}}) Get{{name}}Ok() ({{^isArray}}{{^isFreeFormObject}}*{{/isFreeFormObject}}{{/isArray}}{{vendorExtensions.x-go-base-type}}, bool) { if o == nil{{#isNullable}}{{#vendorExtensions.x-golang-is-container}} || isNil(o.{{name}}){{/vendorExtensions.x-golang-is-container}}{{/isNullable}} { -{{^isFreeFormObject}} - return nil, false - {{/isFreeFormObject}} - {{#isFreeFormObject}} - return {{vendorExtensions.x-go-base-type}}{}, false - {{/isFreeFormObject}} + {{^isFreeFormObject}} + return nil, false + {{/isFreeFormObject}} + {{#isFreeFormObject}} + return {{vendorExtensions.x-go-base-type}}{}, false + {{/isFreeFormObject}} } {{#isNullable}} {{#vendorExtensions.x-golang-is-container}} diff --git a/modules/openapi-generator/src/main/resources/go/utils.mustache b/modules/openapi-generator/src/main/resources/go/utils.mustache index cc42e879c8..7732f9767c 100644 --- a/modules/openapi-generator/src/main/resources/go/utils.mustache +++ b/modules/openapi-generator/src/main/resources/go/utils.mustache @@ -3,7 +3,7 @@ package {{packageName}} import ( "encoding/json" - "reflect" + "reflect" "time" ) @@ -321,14 +321,14 @@ func (v *NullableTime) UnmarshalJSON(src []byte) error { // isNil checks if an input is nil func isNil(i interface{}) bool { - if i == nil { - return true - } - switch reflect.TypeOf(i).Kind() { - case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: - return reflect.ValueOf(i).IsNil() - case reflect.Array: - return reflect.ValueOf(i).IsZero() - } - return false -} \ No newline at end of file + if i == nil { + return true + } + switch reflect.TypeOf(i).Kind() { + case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: + return reflect.ValueOf(i).IsNil() + case reflect.Array: + return reflect.ValueOf(i).IsZero() + } + return false +} diff --git a/samples/client/petstore/go/go-petstore/client.go b/samples/client/petstore/go/go-petstore/client.go index b48d903b06..00aefb0645 100644 --- a/samples/client/petstore/go/go-petstore/client.go +++ b/samples/client/petstore/go/go-petstore/client.go @@ -579,20 +579,19 @@ func (e GenericOpenAPIError) Model() interface{} { // format error message using title and detail when model implements rfc7807 func formatErrorMessage(status string, v interface{}) string { + str := "" + metaValue := reflect.ValueOf(v).Elem() - str := "" - metaValue := reflect.ValueOf(v).Elem() + field := metaValue.FieldByName("Title") + if field != (reflect.Value{}) { + str = fmt.Sprintf("%s", field.Interface()) + } - field := metaValue.FieldByName("Title") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s", field.Interface()) - } + field = metaValue.FieldByName("Detail") + if field != (reflect.Value{}) { + str = fmt.Sprintf("%s (%s)", str, field.Interface()) + } - field = metaValue.FieldByName("Detail") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s (%s)", str, field.Interface()) - } - - // status title (detail) - return fmt.Sprintf("%s %s", status, str) + // status title (detail) + return fmt.Sprintf("%s %s", status, str) } diff --git a/samples/client/petstore/go/go-petstore/model_animal.go b/samples/client/petstore/go/go-petstore/model_animal.go index 298fb25081..17d1e225f9 100644 --- a/samples/client/petstore/go/go-petstore/model_animal.go +++ b/samples/client/petstore/go/go-petstore/model_animal.go @@ -56,7 +56,7 @@ func (o *Animal) GetClassName() string { // and a boolean to check if the value has been set. func (o *Animal) GetClassNameOk() (*string, bool) { if o == nil { - return nil, false + return nil, false } return &o.ClassName, true } diff --git a/samples/client/petstore/go/go-petstore/model_category.go b/samples/client/petstore/go/go-petstore/model_category.go index 4c154f3fb6..fb29e1554a 100644 --- a/samples/client/petstore/go/go-petstore/model_category.go +++ b/samples/client/petstore/go/go-petstore/model_category.go @@ -86,7 +86,7 @@ func (o *Category) GetName() string { // and a boolean to check if the value has been set. func (o *Category) GetNameOk() (*string, bool) { if o == nil { - return nil, false + return nil, false } return &o.Name, true } diff --git a/samples/client/petstore/go/go-petstore/model_enum_test_.go b/samples/client/petstore/go/go-petstore/model_enum_test_.go index 1627dd1872..99cd7eb4af 100644 --- a/samples/client/petstore/go/go-petstore/model_enum_test_.go +++ b/samples/client/petstore/go/go-petstore/model_enum_test_.go @@ -87,7 +87,7 @@ func (o *EnumTest) GetEnumStringRequired() string { // and a boolean to check if the value has been set. func (o *EnumTest) GetEnumStringRequiredOk() (*string, bool) { if o == nil { - return nil, false + return nil, false } return &o.EnumStringRequired, true } diff --git a/samples/client/petstore/go/go-petstore/model_format_test_.go b/samples/client/petstore/go/go-petstore/model_format_test_.go index cb08e78c06..c505cdb3a4 100644 --- a/samples/client/petstore/go/go-petstore/model_format_test_.go +++ b/samples/client/petstore/go/go-petstore/model_format_test_.go @@ -165,7 +165,7 @@ func (o *FormatTest) GetNumber() float32 { // and a boolean to check if the value has been set. func (o *FormatTest) GetNumberOk() (*float32, bool) { if o == nil { - return nil, false + return nil, false } return &o.Number, true } @@ -285,7 +285,7 @@ func (o *FormatTest) GetByte() string { // and a boolean to check if the value has been set. func (o *FormatTest) GetByteOk() (*string, bool) { if o == nil { - return nil, false + return nil, false } return &o.Byte, true } @@ -341,7 +341,7 @@ func (o *FormatTest) GetDate() string { // and a boolean to check if the value has been set. func (o *FormatTest) GetDateOk() (*string, bool) { if o == nil { - return nil, false + return nil, false } return &o.Date, true } @@ -429,7 +429,7 @@ func (o *FormatTest) GetPassword() string { // and a boolean to check if the value has been set. func (o *FormatTest) GetPasswordOk() (*string, bool) { if o == nil { - return nil, false + return nil, false } return &o.Password, true } diff --git a/samples/client/petstore/go/go-petstore/model_name.go b/samples/client/petstore/go/go-petstore/model_name.go index 8392121e84..ae54981cd3 100644 --- a/samples/client/petstore/go/go-petstore/model_name.go +++ b/samples/client/petstore/go/go-petstore/model_name.go @@ -54,7 +54,7 @@ func (o *Name) GetName() int32 { // and a boolean to check if the value has been set. func (o *Name) GetNameOk() (*int32, bool) { if o == nil { - return nil, false + return nil, false } return &o.Name, true } diff --git a/samples/client/petstore/go/go-petstore/model_pet.go b/samples/client/petstore/go/go-petstore/model_pet.go index 15c9ec6b76..900f539b9b 100644 --- a/samples/client/petstore/go/go-petstore/model_pet.go +++ b/samples/client/petstore/go/go-petstore/model_pet.go @@ -122,7 +122,7 @@ func (o *Pet) GetName() string { // and a boolean to check if the value has been set. func (o *Pet) GetNameOk() (*string, bool) { if o == nil { - return nil, false + return nil, false } return &o.Name, true } @@ -146,7 +146,7 @@ func (o *Pet) GetPhotoUrls() []string { // and a boolean to check if the value has been set. func (o *Pet) GetPhotoUrlsOk() ([]string, bool) { if o == nil { - return nil, false + return nil, false } return o.PhotoUrls, true } diff --git a/samples/client/petstore/go/go-petstore/model_type_holder_default.go b/samples/client/petstore/go/go-petstore/model_type_holder_default.go index 4d5b3f612b..ab921b3f1e 100644 --- a/samples/client/petstore/go/go-petstore/model_type_holder_default.go +++ b/samples/client/petstore/go/go-petstore/model_type_holder_default.go @@ -63,7 +63,7 @@ func (o *TypeHolderDefault) GetStringItem() string { // and a boolean to check if the value has been set. func (o *TypeHolderDefault) GetStringItemOk() (*string, bool) { if o == nil { - return nil, false + return nil, false } return &o.StringItem, true } @@ -87,7 +87,7 @@ func (o *TypeHolderDefault) GetNumberItem() float32 { // and a boolean to check if the value has been set. func (o *TypeHolderDefault) GetNumberItemOk() (*float32, bool) { if o == nil { - return nil, false + return nil, false } return &o.NumberItem, true } @@ -111,7 +111,7 @@ func (o *TypeHolderDefault) GetIntegerItem() int32 { // and a boolean to check if the value has been set. func (o *TypeHolderDefault) GetIntegerItemOk() (*int32, bool) { if o == nil { - return nil, false + return nil, false } return &o.IntegerItem, true } @@ -135,7 +135,7 @@ func (o *TypeHolderDefault) GetBoolItem() bool { // and a boolean to check if the value has been set. func (o *TypeHolderDefault) GetBoolItemOk() (*bool, bool) { if o == nil { - return nil, false + return nil, false } return &o.BoolItem, true } @@ -159,7 +159,7 @@ func (o *TypeHolderDefault) GetArrayItem() []int32 { // and a boolean to check if the value has been set. func (o *TypeHolderDefault) GetArrayItemOk() ([]int32, bool) { if o == nil { - return nil, false + return nil, false } return o.ArrayItem, true } diff --git a/samples/client/petstore/go/go-petstore/model_type_holder_example.go b/samples/client/petstore/go/go-petstore/model_type_holder_example.go index c166ea0cff..9d0979ff14 100644 --- a/samples/client/petstore/go/go-petstore/model_type_holder_example.go +++ b/samples/client/petstore/go/go-petstore/model_type_holder_example.go @@ -61,7 +61,7 @@ func (o *TypeHolderExample) GetStringItem() string { // and a boolean to check if the value has been set. func (o *TypeHolderExample) GetStringItemOk() (*string, bool) { if o == nil { - return nil, false + return nil, false } return &o.StringItem, true } @@ -85,7 +85,7 @@ func (o *TypeHolderExample) GetNumberItem() float32 { // and a boolean to check if the value has been set. func (o *TypeHolderExample) GetNumberItemOk() (*float32, bool) { if o == nil { - return nil, false + return nil, false } return &o.NumberItem, true } @@ -109,7 +109,7 @@ func (o *TypeHolderExample) GetFloatItem() float32 { // and a boolean to check if the value has been set. func (o *TypeHolderExample) GetFloatItemOk() (*float32, bool) { if o == nil { - return nil, false + return nil, false } return &o.FloatItem, true } @@ -133,7 +133,7 @@ func (o *TypeHolderExample) GetIntegerItem() int32 { // and a boolean to check if the value has been set. func (o *TypeHolderExample) GetIntegerItemOk() (*int32, bool) { if o == nil { - return nil, false + return nil, false } return &o.IntegerItem, true } @@ -157,7 +157,7 @@ func (o *TypeHolderExample) GetBoolItem() bool { // and a boolean to check if the value has been set. func (o *TypeHolderExample) GetBoolItemOk() (*bool, bool) { if o == nil { - return nil, false + return nil, false } return &o.BoolItem, true } @@ -181,7 +181,7 @@ func (o *TypeHolderExample) GetArrayItem() []int32 { // and a boolean to check if the value has been set. func (o *TypeHolderExample) GetArrayItemOk() ([]int32, bool) { if o == nil { - return nil, false + return nil, false } return o.ArrayItem, true } diff --git a/samples/client/petstore/go/go-petstore/utils.go b/samples/client/petstore/go/go-petstore/utils.go index 866bbf7f1e..f55144e1b4 100644 --- a/samples/client/petstore/go/go-petstore/utils.go +++ b/samples/client/petstore/go/go-petstore/utils.go @@ -12,7 +12,7 @@ package petstore import ( "encoding/json" - "reflect" + "reflect" "time" ) @@ -330,14 +330,14 @@ func (v *NullableTime) UnmarshalJSON(src []byte) error { // isNil checks if an input is nil func isNil(i interface{}) bool { - if i == nil { - return true - } - switch reflect.TypeOf(i).Kind() { - case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: - return reflect.ValueOf(i).IsNil() - case reflect.Array: - return reflect.ValueOf(i).IsZero() - } - return false -} \ No newline at end of file + if i == nil { + return true + } + switch reflect.TypeOf(i).Kind() { + case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: + return reflect.ValueOf(i).IsNil() + case reflect.Array: + return reflect.ValueOf(i).IsZero() + } + return false +} diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/client.go b/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/client.go index 7501f46564..67f09822d2 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/client.go +++ b/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/client.go @@ -564,20 +564,19 @@ func (e GenericOpenAPIError) Model() interface{} { // format error message using title and detail when model implements rfc7807 func formatErrorMessage(status string, v interface{}) string { + str := "" + metaValue := reflect.ValueOf(v).Elem() - str := "" - metaValue := reflect.ValueOf(v).Elem() + field := metaValue.FieldByName("Title") + if field != (reflect.Value{}) { + str = fmt.Sprintf("%s", field.Interface()) + } - field := metaValue.FieldByName("Title") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s", field.Interface()) - } + field = metaValue.FieldByName("Detail") + if field != (reflect.Value{}) { + str = fmt.Sprintf("%s (%s)", str, field.Interface()) + } - field = metaValue.FieldByName("Detail") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s (%s)", str, field.Interface()) - } - - // status title (detail) - return fmt.Sprintf("%s %s", status, str) + // status title (detail) + return fmt.Sprintf("%s %s", status, str) } diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/utils.go b/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/utils.go index 4cff93795c..8a5993e8eb 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/utils.go +++ b/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/utils.go @@ -12,7 +12,7 @@ package x_auth_id_alias import ( "encoding/json" - "reflect" + "reflect" "time" ) @@ -330,14 +330,14 @@ func (v *NullableTime) UnmarshalJSON(src []byte) error { // isNil checks if an input is nil func isNil(i interface{}) bool { - if i == nil { - return true - } - switch reflect.TypeOf(i).Kind() { - case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: - return reflect.ValueOf(i).IsNil() - case reflect.Array: - return reflect.ValueOf(i).IsZero() - } - return false -} \ No newline at end of file + if i == nil { + return true + } + switch reflect.TypeOf(i).Kind() { + case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: + return reflect.ValueOf(i).IsNil() + case reflect.Array: + return reflect.ValueOf(i).IsZero() + } + return false +} diff --git a/samples/openapi3/client/petstore/go/go-petstore/client.go b/samples/openapi3/client/petstore/go/go-petstore/client.go index a573bd4fa8..0bb67d159c 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/client.go +++ b/samples/openapi3/client/petstore/go/go-petstore/client.go @@ -592,20 +592,19 @@ func (e GenericOpenAPIError) Model() interface{} { // format error message using title and detail when model implements rfc7807 func formatErrorMessage(status string, v interface{}) string { + str := "" + metaValue := reflect.ValueOf(v).Elem() - str := "" - metaValue := reflect.ValueOf(v).Elem() + field := metaValue.FieldByName("Title") + if field != (reflect.Value{}) { + str = fmt.Sprintf("%s", field.Interface()) + } - field := metaValue.FieldByName("Title") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s", field.Interface()) - } + field = metaValue.FieldByName("Detail") + if field != (reflect.Value{}) { + str = fmt.Sprintf("%s (%s)", str, field.Interface()) + } - field = metaValue.FieldByName("Detail") - if field != (reflect.Value{}) { - str = fmt.Sprintf("%s (%s)", str, field.Interface()) - } - - // status title (detail) - return fmt.Sprintf("%s %s", status, str) + // status title (detail) + return fmt.Sprintf("%s %s", status, str) } diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_animal.go b/samples/openapi3/client/petstore/go/go-petstore/model_animal.go index 467198bac0..20913dc1d7 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_animal.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_animal.go @@ -59,7 +59,7 @@ func (o *Animal) GetClassName() string { // and a boolean to check if the value has been set. func (o *Animal) GetClassNameOk() (*string, bool) { if o == nil { - return nil, false + return nil, false } return &o.ClassName, true } diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_apple_req.go b/samples/openapi3/client/petstore/go/go-petstore/model_apple_req.go index 0371df1610..e49e229308 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_apple_req.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_apple_req.go @@ -55,7 +55,7 @@ func (o *AppleReq) GetCultivar() string { // and a boolean to check if the value has been set. func (o *AppleReq) GetCultivarOk() (*string, bool) { if o == nil { - return nil, false + return nil, false } return &o.Cultivar, true } diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_banana_req.go b/samples/openapi3/client/petstore/go/go-petstore/model_banana_req.go index 660165fbd4..92b660dd30 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_banana_req.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_banana_req.go @@ -55,7 +55,7 @@ func (o *BananaReq) GetLengthCm() float32 { // and a boolean to check if the value has been set. func (o *BananaReq) GetLengthCmOk() (*float32, bool) { if o == nil { - return nil, false + return nil, false } return &o.LengthCm, true } diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_category.go b/samples/openapi3/client/petstore/go/go-petstore/model_category.go index 741ba897c4..5900a618b9 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_category.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_category.go @@ -89,7 +89,7 @@ func (o *Category) GetName() string { // and a boolean to check if the value has been set. func (o *Category) GetNameOk() (*string, bool) { if o == nil { - return nil, false + return nil, false } return &o.Name, true } diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_duplicated_prop_parent.go b/samples/openapi3/client/petstore/go/go-petstore/model_duplicated_prop_parent.go index fa95a4edf5..59f7f32eb7 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_duplicated_prop_parent.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_duplicated_prop_parent.go @@ -55,7 +55,7 @@ func (o *DuplicatedPropParent) GetDupProp() string { // and a boolean to check if the value has been set. func (o *DuplicatedPropParent) GetDupPropOk() (*string, bool) { if o == nil { - return nil, false + return nil, false } return &o.DupProp, true } diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_enum_test_.go b/samples/openapi3/client/petstore/go/go-petstore/model_enum_test_.go index bd301a13f3..fb07b82d2f 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_enum_test_.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_enum_test_.go @@ -101,7 +101,7 @@ func (o *EnumTest) GetEnumStringRequired() string { // and a boolean to check if the value has been set. func (o *EnumTest) GetEnumStringRequiredOk() (*string, bool) { if o == nil { - return nil, false + return nil, false } return &o.EnumStringRequired, true } diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_format_test_.go b/samples/openapi3/client/petstore/go/go-petstore/model_format_test_.go index 2afa74b82b..3bbcbca749 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_format_test_.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_format_test_.go @@ -171,7 +171,7 @@ func (o *FormatTest) GetNumber() float32 { // and a boolean to check if the value has been set. func (o *FormatTest) GetNumberOk() (*float32, bool) { if o == nil { - return nil, false + return nil, false } return &o.Number, true } @@ -291,7 +291,7 @@ func (o *FormatTest) GetByte() string { // and a boolean to check if the value has been set. func (o *FormatTest) GetByteOk() (*string, bool) { if o == nil { - return nil, false + return nil, false } return &o.Byte, true } @@ -347,7 +347,7 @@ func (o *FormatTest) GetDate() string { // and a boolean to check if the value has been set. func (o *FormatTest) GetDateOk() (*string, bool) { if o == nil { - return nil, false + return nil, false } return &o.Date, true } @@ -435,7 +435,7 @@ func (o *FormatTest) GetPassword() string { // and a boolean to check if the value has been set. func (o *FormatTest) GetPasswordOk() (*string, bool) { if o == nil { - return nil, false + return nil, false } return &o.Password, true } diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_name.go b/samples/openapi3/client/petstore/go/go-petstore/model_name.go index 326d392863..167e669b2f 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_name.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_name.go @@ -57,7 +57,7 @@ func (o *Name) GetName() int32 { // and a boolean to check if the value has been set. func (o *Name) GetNameOk() (*int32, bool) { if o == nil { - return nil, false + return nil, false } return &o.Name, true } diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_pet.go b/samples/openapi3/client/petstore/go/go-petstore/model_pet.go index e57066d7d9..3171045e49 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_pet.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_pet.go @@ -126,7 +126,7 @@ func (o *Pet) GetName() string { // and a boolean to check if the value has been set. func (o *Pet) GetNameOk() (*string, bool) { if o == nil { - return nil, false + return nil, false } return &o.Name, true } @@ -150,7 +150,7 @@ func (o *Pet) GetPhotoUrls() []string { // and a boolean to check if the value has been set. func (o *Pet) GetPhotoUrlsOk() ([]string, bool) { if o == nil { - return nil, false + return nil, false } return o.PhotoUrls, true } diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_whale.go b/samples/openapi3/client/petstore/go/go-petstore/model_whale.go index cec72e2bec..8da3060406 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_whale.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_whale.go @@ -120,7 +120,7 @@ func (o *Whale) GetClassName() string { // and a boolean to check if the value has been set. func (o *Whale) GetClassNameOk() (*string, bool) { if o == nil { - return nil, false + return nil, false } return &o.ClassName, true } diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_zebra.go b/samples/openapi3/client/petstore/go/go-petstore/model_zebra.go index a06c7f5eaa..70a1ee363c 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_zebra.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_zebra.go @@ -87,7 +87,7 @@ func (o *Zebra) GetClassName() string { // and a boolean to check if the value has been set. func (o *Zebra) GetClassNameOk() (*string, bool) { if o == nil { - return nil, false + return nil, false } return &o.ClassName, true } diff --git a/samples/openapi3/client/petstore/go/go-petstore/test/api_another_fake_test.go b/samples/openapi3/client/petstore/go/go-petstore/test/api_another_fake_test.go index bf60a1c855..8e2bd6755d 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/test/api_another_fake_test.go +++ b/samples/openapi3/client/petstore/go/go-petstore/test/api_another_fake_test.go @@ -10,28 +10,28 @@ Testing AnotherFakeApiService package petstore import ( - "context" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" - openapiclient "./openapi" + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func Test_petstore_AnotherFakeApiService(t *testing.T) { - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) - t.Run("Test AnotherFakeApiService Call123TestSpecialTags", func(t *testing.T) { + t.Run("Test AnotherFakeApiService Call123TestSpecialTags", func(t *testing.T) { - t.Skip("skip test") // remove to run test + t.Skip("skip test") // remove to run test - resp, httpRes, err := apiClient.AnotherFakeApi.Call123TestSpecialTags(context.Background()).Execute() + resp, httpRes, err := apiClient.AnotherFakeApi.Call123TestSpecialTags(context.Background()).Execute() - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) - }) + }) } diff --git a/samples/openapi3/client/petstore/go/go-petstore/test/api_default_test.go b/samples/openapi3/client/petstore/go/go-petstore/test/api_default_test.go index 111a0bd49b..7502c34094 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/test/api_default_test.go +++ b/samples/openapi3/client/petstore/go/go-petstore/test/api_default_test.go @@ -10,28 +10,28 @@ Testing DefaultApiService package petstore import ( - "context" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" - openapiclient "./openapi" + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func Test_petstore_DefaultApiService(t *testing.T) { - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) - t.Run("Test DefaultApiService FooGet", func(t *testing.T) { + t.Run("Test DefaultApiService FooGet", func(t *testing.T) { - t.Skip("skip test") // remove to run test + t.Skip("skip test") // remove to run test - resp, httpRes, err := apiClient.DefaultApi.FooGet(context.Background()).Execute() + resp, httpRes, err := apiClient.DefaultApi.FooGet(context.Background()).Execute() - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) - }) + }) } diff --git a/samples/openapi3/client/petstore/go/go-petstore/test/api_fake_classname_tags123_test.go b/samples/openapi3/client/petstore/go/go-petstore/test/api_fake_classname_tags123_test.go index 963e4a42da..079d91861a 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/test/api_fake_classname_tags123_test.go +++ b/samples/openapi3/client/petstore/go/go-petstore/test/api_fake_classname_tags123_test.go @@ -10,28 +10,28 @@ Testing FakeClassnameTags123ApiService package petstore import ( - "context" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" - openapiclient "./openapi" + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func Test_petstore_FakeClassnameTags123ApiService(t *testing.T) { - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) - t.Run("Test FakeClassnameTags123ApiService TestClassname", func(t *testing.T) { + t.Run("Test FakeClassnameTags123ApiService TestClassname", func(t *testing.T) { - t.Skip("skip test") // remove to run test + t.Skip("skip test") // remove to run test - resp, httpRes, err := apiClient.FakeClassnameTags123Api.TestClassname(context.Background()).Execute() + resp, httpRes, err := apiClient.FakeClassnameTags123Api.TestClassname(context.Background()).Execute() - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) - }) + }) } diff --git a/samples/openapi3/client/petstore/go/go-petstore/test/api_fake_test.go b/samples/openapi3/client/petstore/go/go-petstore/test/api_fake_test.go index 8a5882019b..5abc08871a 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/test/api_fake_test.go +++ b/samples/openapi3/client/petstore/go/go-petstore/test/api_fake_test.go @@ -10,196 +10,196 @@ Testing FakeApiService package petstore import ( - "context" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" - openapiclient "./openapi" + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func Test_petstore_FakeApiService(t *testing.T) { - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) - t.Run("Test FakeApiService FakeHealthGet", func(t *testing.T) { + t.Run("Test FakeApiService FakeHealthGet", func(t *testing.T) { - t.Skip("skip test") // remove to run test + t.Skip("skip test") // remove to run test - resp, httpRes, err := apiClient.FakeApi.FakeHealthGet(context.Background()).Execute() + resp, httpRes, err := apiClient.FakeApi.FakeHealthGet(context.Background()).Execute() - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) - }) + }) - t.Run("Test FakeApiService FakeOuterBooleanSerialize", func(t *testing.T) { + t.Run("Test FakeApiService FakeOuterBooleanSerialize", func(t *testing.T) { - t.Skip("skip test") // remove to run test + t.Skip("skip test") // remove to run test - resp, httpRes, err := apiClient.FakeApi.FakeOuterBooleanSerialize(context.Background()).Execute() + resp, httpRes, err := apiClient.FakeApi.FakeOuterBooleanSerialize(context.Background()).Execute() - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) - }) + }) - t.Run("Test FakeApiService FakeOuterCompositeSerialize", func(t *testing.T) { + t.Run("Test FakeApiService FakeOuterCompositeSerialize", func(t *testing.T) { - t.Skip("skip test") // remove to run test + t.Skip("skip test") // remove to run test - resp, httpRes, err := apiClient.FakeApi.FakeOuterCompositeSerialize(context.Background()).Execute() + resp, httpRes, err := apiClient.FakeApi.FakeOuterCompositeSerialize(context.Background()).Execute() - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) - }) + }) - t.Run("Test FakeApiService FakeOuterNumberSerialize", func(t *testing.T) { + t.Run("Test FakeApiService FakeOuterNumberSerialize", func(t *testing.T) { - t.Skip("skip test") // remove to run test + t.Skip("skip test") // remove to run test - resp, httpRes, err := apiClient.FakeApi.FakeOuterNumberSerialize(context.Background()).Execute() + resp, httpRes, err := apiClient.FakeApi.FakeOuterNumberSerialize(context.Background()).Execute() - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) - }) + }) - t.Run("Test FakeApiService FakeOuterStringSerialize", func(t *testing.T) { + t.Run("Test FakeApiService FakeOuterStringSerialize", func(t *testing.T) { - t.Skip("skip test") // remove to run test + t.Skip("skip test") // remove to run test - resp, httpRes, err := apiClient.FakeApi.FakeOuterStringSerialize(context.Background()).Execute() + resp, httpRes, err := apiClient.FakeApi.FakeOuterStringSerialize(context.Background()).Execute() - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) - }) + }) - t.Run("Test FakeApiService TestBodyWithFileSchema", func(t *testing.T) { + t.Run("Test FakeApiService TestBodyWithFileSchema", func(t *testing.T) { - t.Skip("skip test") // remove to run test + t.Skip("skip test") // remove to run test - resp, httpRes, err := apiClient.FakeApi.TestBodyWithFileSchema(context.Background()).Execute() + resp, httpRes, err := apiClient.FakeApi.TestBodyWithFileSchema(context.Background()).Execute() - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) - }) + }) - t.Run("Test FakeApiService TestBodyWithQueryParams", func(t *testing.T) { + t.Run("Test FakeApiService TestBodyWithQueryParams", func(t *testing.T) { - t.Skip("skip test") // remove to run test + t.Skip("skip test") // remove to run test - resp, httpRes, err := apiClient.FakeApi.TestBodyWithQueryParams(context.Background()).Execute() + resp, httpRes, err := apiClient.FakeApi.TestBodyWithQueryParams(context.Background()).Execute() - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) - }) + }) - t.Run("Test FakeApiService TestClientModel", func(t *testing.T) { + t.Run("Test FakeApiService TestClientModel", func(t *testing.T) { - t.Skip("skip test") // remove to run test + t.Skip("skip test") // remove to run test - resp, httpRes, err := apiClient.FakeApi.TestClientModel(context.Background()).Execute() + resp, httpRes, err := apiClient.FakeApi.TestClientModel(context.Background()).Execute() - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) - }) + }) - t.Run("Test FakeApiService TestEndpointParameters", func(t *testing.T) { + t.Run("Test FakeApiService TestEndpointParameters", func(t *testing.T) { - t.Skip("skip test") // remove to run test + t.Skip("skip test") // remove to run test - resp, httpRes, err := apiClient.FakeApi.TestEndpointParameters(context.Background()).Execute() + resp, httpRes, err := apiClient.FakeApi.TestEndpointParameters(context.Background()).Execute() - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) - }) + }) - t.Run("Test FakeApiService TestEnumParameters", func(t *testing.T) { + t.Run("Test FakeApiService TestEnumParameters", func(t *testing.T) { - t.Skip("skip test") // remove to run test + t.Skip("skip test") // remove to run test - resp, httpRes, err := apiClient.FakeApi.TestEnumParameters(context.Background()).Execute() + resp, httpRes, err := apiClient.FakeApi.TestEnumParameters(context.Background()).Execute() - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) - }) + }) - t.Run("Test FakeApiService TestGroupParameters", func(t *testing.T) { + t.Run("Test FakeApiService TestGroupParameters", func(t *testing.T) { - t.Skip("skip test") // remove to run test + t.Skip("skip test") // remove to run test - resp, httpRes, err := apiClient.FakeApi.TestGroupParameters(context.Background()).Execute() + resp, httpRes, err := apiClient.FakeApi.TestGroupParameters(context.Background()).Execute() - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) - }) + }) - t.Run("Test FakeApiService TestInlineAdditionalProperties", func(t *testing.T) { + t.Run("Test FakeApiService TestInlineAdditionalProperties", func(t *testing.T) { - t.Skip("skip test") // remove to run test + t.Skip("skip test") // remove to run test - resp, httpRes, err := apiClient.FakeApi.TestInlineAdditionalProperties(context.Background()).Execute() + resp, httpRes, err := apiClient.FakeApi.TestInlineAdditionalProperties(context.Background()).Execute() - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) - }) + }) - t.Run("Test FakeApiService TestJsonFormData", func(t *testing.T) { + t.Run("Test FakeApiService TestJsonFormData", func(t *testing.T) { - t.Skip("skip test") // remove to run test + t.Skip("skip test") // remove to run test - resp, httpRes, err := apiClient.FakeApi.TestJsonFormData(context.Background()).Execute() + resp, httpRes, err := apiClient.FakeApi.TestJsonFormData(context.Background()).Execute() - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) - }) + }) - t.Run("Test FakeApiService TestQueryParameterCollectionFormat", func(t *testing.T) { + t.Run("Test FakeApiService TestQueryParameterCollectionFormat", func(t *testing.T) { - t.Skip("skip test") // remove to run test + t.Skip("skip test") // remove to run test - resp, httpRes, err := apiClient.FakeApi.TestQueryParameterCollectionFormat(context.Background()).Execute() + resp, httpRes, err := apiClient.FakeApi.TestQueryParameterCollectionFormat(context.Background()).Execute() - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) - }) + }) - t.Run("Test FakeApiService TestUniqueItemsHeaderAndQueryParameterCollectionFormat", func(t *testing.T) { + t.Run("Test FakeApiService TestUniqueItemsHeaderAndQueryParameterCollectionFormat", func(t *testing.T) { - t.Skip("skip test") // remove to run test + t.Skip("skip test") // remove to run test - resp, httpRes, err := apiClient.FakeApi.TestUniqueItemsHeaderAndQueryParameterCollectionFormat(context.Background()).Execute() + resp, httpRes, err := apiClient.FakeApi.TestUniqueItemsHeaderAndQueryParameterCollectionFormat(context.Background()).Execute() - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) - }) + }) } diff --git a/samples/openapi3/client/petstore/go/go-petstore/test/api_pet_test.go b/samples/openapi3/client/petstore/go/go-petstore/test/api_pet_test.go index 94d4d0fa7f..c8c10c0dd7 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/test/api_pet_test.go +++ b/samples/openapi3/client/petstore/go/go-petstore/test/api_pet_test.go @@ -10,134 +10,134 @@ Testing PetApiService package petstore import ( - "context" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" - openapiclient "./openapi" + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func Test_petstore_PetApiService(t *testing.T) { - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) - t.Run("Test PetApiService AddPet", func(t *testing.T) { + t.Run("Test PetApiService AddPet", func(t *testing.T) { - t.Skip("skip test") // remove to run test + t.Skip("skip test") // remove to run test - resp, httpRes, err := apiClient.PetApi.AddPet(context.Background()).Execute() + resp, httpRes, err := apiClient.PetApi.AddPet(context.Background()).Execute() - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) - }) + }) - t.Run("Test PetApiService DeletePet", func(t *testing.T) { + t.Run("Test PetApiService DeletePet", func(t *testing.T) { - t.Skip("skip test") // remove to run test + t.Skip("skip test") // remove to run test - var petId int64 + var petId int64 - resp, httpRes, err := apiClient.PetApi.DeletePet(context.Background(), petId).Execute() + resp, httpRes, err := apiClient.PetApi.DeletePet(context.Background(), petId).Execute() - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) - }) + }) - t.Run("Test PetApiService FindPetsByStatus", func(t *testing.T) { + t.Run("Test PetApiService FindPetsByStatus", func(t *testing.T) { - t.Skip("skip test") // remove to run test + t.Skip("skip test") // remove to run test - resp, httpRes, err := apiClient.PetApi.FindPetsByStatus(context.Background()).Execute() + resp, httpRes, err := apiClient.PetApi.FindPetsByStatus(context.Background()).Execute() - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) - }) + }) - t.Run("Test PetApiService FindPetsByTags", func(t *testing.T) { + t.Run("Test PetApiService FindPetsByTags", func(t *testing.T) { - t.Skip("skip test") // remove to run test + t.Skip("skip test") // remove to run test - resp, httpRes, err := apiClient.PetApi.FindPetsByTags(context.Background()).Execute() + resp, httpRes, err := apiClient.PetApi.FindPetsByTags(context.Background()).Execute() - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) - }) + }) - t.Run("Test PetApiService GetPetById", func(t *testing.T) { + t.Run("Test PetApiService GetPetById", func(t *testing.T) { - t.Skip("skip test") // remove to run test + t.Skip("skip test") // remove to run test - var petId int64 + var petId int64 - resp, httpRes, err := apiClient.PetApi.GetPetById(context.Background(), petId).Execute() + resp, httpRes, err := apiClient.PetApi.GetPetById(context.Background(), petId).Execute() - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) - }) + }) - t.Run("Test PetApiService UpdatePet", func(t *testing.T) { + t.Run("Test PetApiService UpdatePet", func(t *testing.T) { - t.Skip("skip test") // remove to run test + t.Skip("skip test") // remove to run test - resp, httpRes, err := apiClient.PetApi.UpdatePet(context.Background()).Execute() + resp, httpRes, err := apiClient.PetApi.UpdatePet(context.Background()).Execute() - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) - }) + }) - t.Run("Test PetApiService UpdatePetWithForm", func(t *testing.T) { + t.Run("Test PetApiService UpdatePetWithForm", func(t *testing.T) { - t.Skip("skip test") // remove to run test + t.Skip("skip test") // remove to run test - var petId int64 + var petId int64 - resp, httpRes, err := apiClient.PetApi.UpdatePetWithForm(context.Background(), petId).Execute() + resp, httpRes, err := apiClient.PetApi.UpdatePetWithForm(context.Background(), petId).Execute() - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) - }) + }) - t.Run("Test PetApiService UploadFile", func(t *testing.T) { + t.Run("Test PetApiService UploadFile", func(t *testing.T) { - t.Skip("skip test") // remove to run test + t.Skip("skip test") // remove to run test - var petId int64 + var petId int64 - resp, httpRes, err := apiClient.PetApi.UploadFile(context.Background(), petId).Execute() + resp, httpRes, err := apiClient.PetApi.UploadFile(context.Background(), petId).Execute() - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) - }) + }) - t.Run("Test PetApiService UploadFileWithRequiredFile", func(t *testing.T) { + t.Run("Test PetApiService UploadFileWithRequiredFile", func(t *testing.T) { - t.Skip("skip test") // remove to run test + t.Skip("skip test") // remove to run test - var petId int64 + var petId int64 - resp, httpRes, err := apiClient.PetApi.UploadFileWithRequiredFile(context.Background(), petId).Execute() + resp, httpRes, err := apiClient.PetApi.UploadFileWithRequiredFile(context.Background(), petId).Execute() - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) - }) + }) } diff --git a/samples/openapi3/client/petstore/go/go-petstore/test/api_store_test.go b/samples/openapi3/client/petstore/go/go-petstore/test/api_store_test.go index 48c1db2eb5..e8fb16e53a 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/test/api_store_test.go +++ b/samples/openapi3/client/petstore/go/go-petstore/test/api_store_test.go @@ -10,68 +10,68 @@ Testing StoreApiService package petstore import ( - "context" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" - openapiclient "./openapi" + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func Test_petstore_StoreApiService(t *testing.T) { - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) - t.Run("Test StoreApiService DeleteOrder", func(t *testing.T) { + t.Run("Test StoreApiService DeleteOrder", func(t *testing.T) { - t.Skip("skip test") // remove to run test + t.Skip("skip test") // remove to run test - var orderId string + var orderId string - resp, httpRes, err := apiClient.StoreApi.DeleteOrder(context.Background(), orderId).Execute() + resp, httpRes, err := apiClient.StoreApi.DeleteOrder(context.Background(), orderId).Execute() - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) - }) + }) - t.Run("Test StoreApiService GetInventory", func(t *testing.T) { + t.Run("Test StoreApiService GetInventory", func(t *testing.T) { - t.Skip("skip test") // remove to run test + t.Skip("skip test") // remove to run test - resp, httpRes, err := apiClient.StoreApi.GetInventory(context.Background()).Execute() + resp, httpRes, err := apiClient.StoreApi.GetInventory(context.Background()).Execute() - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) - }) + }) - t.Run("Test StoreApiService GetOrderById", func(t *testing.T) { + t.Run("Test StoreApiService GetOrderById", func(t *testing.T) { - t.Skip("skip test") // remove to run test + t.Skip("skip test") // remove to run test - var orderId int64 + var orderId int64 - resp, httpRes, err := apiClient.StoreApi.GetOrderById(context.Background(), orderId).Execute() + resp, httpRes, err := apiClient.StoreApi.GetOrderById(context.Background(), orderId).Execute() - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) - }) + }) - t.Run("Test StoreApiService PlaceOrder", func(t *testing.T) { + t.Run("Test StoreApiService PlaceOrder", func(t *testing.T) { - t.Skip("skip test") // remove to run test + t.Skip("skip test") // remove to run test - resp, httpRes, err := apiClient.StoreApi.PlaceOrder(context.Background()).Execute() + resp, httpRes, err := apiClient.StoreApi.PlaceOrder(context.Background()).Execute() - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) - }) + }) } diff --git a/samples/openapi3/client/petstore/go/go-petstore/test/api_user_test.go b/samples/openapi3/client/petstore/go/go-petstore/test/api_user_test.go index 072179b486..be3904a903 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/test/api_user_test.go +++ b/samples/openapi3/client/petstore/go/go-petstore/test/api_user_test.go @@ -10,118 +10,118 @@ Testing UserApiService package petstore import ( - "context" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "testing" - openapiclient "./openapi" + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" ) func Test_petstore_UserApiService(t *testing.T) { - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) - t.Run("Test UserApiService CreateUser", func(t *testing.T) { + t.Run("Test UserApiService CreateUser", func(t *testing.T) { - t.Skip("skip test") // remove to run test + t.Skip("skip test") // remove to run test - resp, httpRes, err := apiClient.UserApi.CreateUser(context.Background()).Execute() + resp, httpRes, err := apiClient.UserApi.CreateUser(context.Background()).Execute() - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) - }) + }) - t.Run("Test UserApiService CreateUsersWithArrayInput", func(t *testing.T) { + t.Run("Test UserApiService CreateUsersWithArrayInput", func(t *testing.T) { - t.Skip("skip test") // remove to run test + t.Skip("skip test") // remove to run test - resp, httpRes, err := apiClient.UserApi.CreateUsersWithArrayInput(context.Background()).Execute() + resp, httpRes, err := apiClient.UserApi.CreateUsersWithArrayInput(context.Background()).Execute() - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) - }) + }) - t.Run("Test UserApiService CreateUsersWithListInput", func(t *testing.T) { + t.Run("Test UserApiService CreateUsersWithListInput", func(t *testing.T) { - t.Skip("skip test") // remove to run test + t.Skip("skip test") // remove to run test - resp, httpRes, err := apiClient.UserApi.CreateUsersWithListInput(context.Background()).Execute() + resp, httpRes, err := apiClient.UserApi.CreateUsersWithListInput(context.Background()).Execute() - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) - }) + }) - t.Run("Test UserApiService DeleteUser", func(t *testing.T) { + t.Run("Test UserApiService DeleteUser", func(t *testing.T) { - t.Skip("skip test") // remove to run test + t.Skip("skip test") // remove to run test - var username string + var username string - resp, httpRes, err := apiClient.UserApi.DeleteUser(context.Background(), username).Execute() + resp, httpRes, err := apiClient.UserApi.DeleteUser(context.Background(), username).Execute() - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) - }) + }) - t.Run("Test UserApiService GetUserByName", func(t *testing.T) { + t.Run("Test UserApiService GetUserByName", func(t *testing.T) { - t.Skip("skip test") // remove to run test + t.Skip("skip test") // remove to run test - var username string + var username string - resp, httpRes, err := apiClient.UserApi.GetUserByName(context.Background(), username).Execute() + resp, httpRes, err := apiClient.UserApi.GetUserByName(context.Background(), username).Execute() - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) - }) + }) - t.Run("Test UserApiService LoginUser", func(t *testing.T) { + t.Run("Test UserApiService LoginUser", func(t *testing.T) { - t.Skip("skip test") // remove to run test + t.Skip("skip test") // remove to run test - resp, httpRes, err := apiClient.UserApi.LoginUser(context.Background()).Execute() + resp, httpRes, err := apiClient.UserApi.LoginUser(context.Background()).Execute() - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) - }) + }) - t.Run("Test UserApiService LogoutUser", func(t *testing.T) { + t.Run("Test UserApiService LogoutUser", func(t *testing.T) { - t.Skip("skip test") // remove to run test + t.Skip("skip test") // remove to run test - resp, httpRes, err := apiClient.UserApi.LogoutUser(context.Background()).Execute() + resp, httpRes, err := apiClient.UserApi.LogoutUser(context.Background()).Execute() - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) - }) + }) - t.Run("Test UserApiService UpdateUser", func(t *testing.T) { + t.Run("Test UserApiService UpdateUser", func(t *testing.T) { - t.Skip("skip test") // remove to run test + t.Skip("skip test") // remove to run test - var username string + var username string - resp, httpRes, err := apiClient.UserApi.UpdateUser(context.Background(), username).Execute() + resp, httpRes, err := apiClient.UserApi.UpdateUser(context.Background(), username).Execute() - require.Nil(t, err) - require.NotNil(t, resp) - assert.Equal(t, 200, httpRes.StatusCode) + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) - }) + }) } diff --git a/samples/openapi3/client/petstore/go/go-petstore/utils.go b/samples/openapi3/client/petstore/go/go-petstore/utils.go index 866bbf7f1e..f55144e1b4 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/utils.go +++ b/samples/openapi3/client/petstore/go/go-petstore/utils.go @@ -12,7 +12,7 @@ package petstore import ( "encoding/json" - "reflect" + "reflect" "time" ) @@ -330,14 +330,14 @@ func (v *NullableTime) UnmarshalJSON(src []byte) error { // isNil checks if an input is nil func isNil(i interface{}) bool { - if i == nil { - return true - } - switch reflect.TypeOf(i).Kind() { - case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: - return reflect.ValueOf(i).IsNil() - case reflect.Array: - return reflect.ValueOf(i).IsZero() - } - return false -} \ No newline at end of file + if i == nil { + return true + } + switch reflect.TypeOf(i).Kind() { + case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: + return reflect.ValueOf(i).IsNil() + case reflect.Array: + return reflect.ValueOf(i).IsZero() + } + return false +} diff --git a/samples/openapi3/client/petstore/go/go.mod b/samples/openapi3/client/petstore/go/go.mod index 92b2d6ee6b..f365bc6ad1 100644 --- a/samples/openapi3/client/petstore/go/go.mod +++ b/samples/openapi3/client/petstore/go/go.mod @@ -5,8 +5,7 @@ go 1.16 replace go-petstore => ./go-petstore require ( - github.com/stretchr/testify v1.8.0 + github.com/stretchr/testify v1.8.1 go-petstore v0.0.0-00010101000000-000000000000 - golang.org/x/net v0.0.0-20221014081412-f15817d10f9b // indirect - golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783 + golang.org/x/oauth2 v0.1.0 ) diff --git a/samples/openapi3/client/petstore/go/go.sum b/samples/openapi3/client/petstore/go/go.sum index 3ddd48e10f..5fe3bbcc56 100644 --- a/samples/openapi3/client/petstore/go/go.sum +++ b/samples/openapi3/client/petstore/go/go.sum @@ -192,6 +192,7 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= @@ -200,11 +201,14 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -218,6 +222,7 @@ golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -253,6 +258,7 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -299,6 +305,7 @@ golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e h1:TsQ7F31D3bUCLeqPT0u+yjp1guoArKaNKmCr22PYgTQ= golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220805013720-a33c5aa5df48 h1:N9Vc/rorQUDes6B9CNdIxAn5jODGj2wzfrei2x4wNj4= golang.org/x/net v0.0.0-20220805013720-a33c5aa5df48/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.0.0-20220809184613-07c6da5e1ced h1:3dYNDff0VT5xj+mbj2XucFst9WKk6PdGOrb9n+SbIvw= @@ -307,6 +314,8 @@ golang.org/x/net v0.0.0-20221004154528-8021a29435af h1:wv66FM3rLZGPdxpYL+ApnDe2H golang.org/x/net v0.0.0-20221004154528-8021a29435af/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.0.0-20221014081412-f15817d10f9b h1:tvrvnPFcdzp294diPnrdZZZ8XUt2Tyj7svb7X52iDuU= golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.1.0 h1:hZ/3BUoy5aId7sCpA/Tc5lt8DkFgdVS2onTpJsZ/fl0= +golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -336,6 +345,8 @@ golang.org/x/oauth2 v0.0.0-20221006150949-b44042a4b9c1 h1:3VPzK7eqH25j7GYw5w6g/G golang.org/x/oauth2 v0.0.0-20221006150949-b44042a4b9c1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783 h1:nt+Q6cXKz4MosCSpnbMtqiQ8Oz0pxTef2B4Vca2lvfk= golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.1.0 h1:isLCZuhj4v+tYv7eskaN4v/TM+A1begWWgyVJDdl1+Y= +golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -348,6 +359,7 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -406,9 +418,12 @@ golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -418,6 +433,7 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -472,6 +488,7 @@ golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= From d80cd099cafab51e89241c3cb2acee198a64af2e Mon Sep 17 00:00:00 2001 From: Mark Delk Date: Mon, 7 Nov 2022 20:46:18 -0600 Subject: [PATCH 006/189] [BUG][RUBY] Fix ruby faraday HTTP 0 issue without libcurl (#13945) * Fix ruby faraday HTTP 0 issue without libcurl * commit generated files --- .../resources/ruby-client/api_client_faraday_partial.mustache | 2 +- samples/client/petstore/ruby-faraday/lib/petstore/api_client.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/ruby-client/api_client_faraday_partial.mustache b/modules/openapi-generator/src/main/resources/ruby-client/api_client_faraday_partial.mustache index be5e26dcd6..8327a3492f 100644 --- a/modules/openapi-generator/src/main/resources/ruby-client/api_client_faraday_partial.mustache +++ b/modules/openapi-generator/src/main/resources/ruby-client/api_client_faraday_partial.mustache @@ -13,7 +13,7 @@ end unless response.success? - if response.status == 0 + if response.status == 0 && response.respond_to?(:return_message) # Errors from libcurl will be made visible here fail ApiError.new(code: 0, message: response.return_message) diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api_client.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api_client.rb index 5a52719c53..8f0d3598b4 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api_client.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api_client.rb @@ -58,7 +58,7 @@ module Petstore end unless response.success? - if response.status == 0 + if response.status == 0 && response.respond_to?(:return_message) # Errors from libcurl will be made visible here fail ApiError.new(code: 0, message: response.return_message) From 099a96b1adce77456fd630de6253c144e3c7f1bb Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 8 Nov 2022 10:48:32 +0800 Subject: [PATCH 007/189] add option to skip reusing inline schemas (#13892) --- docs/customization.md | 4 +-- .../openapitools/codegen/cmd/Generate.java | 2 +- .../codegen/InlineModelResolver.java | 10 ++++++ .../codegen/InlineModelResolverTest.java | 36 +++++++++++++++++++ .../resources/3_0/inline_model_resolver.yaml | 31 ++++++++++++++++ 5 files changed, 80 insertions(+), 3 deletions(-) diff --git a/docs/customization.md b/docs/customization.md index 51ef57b6aa..45255f009c 100644 --- a/docs/customization.md +++ b/docs/customization.md @@ -438,7 +438,7 @@ java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generat Another useful option is `inlineSchemaNameDefaults`, which allows you to customize the suffix of the auto-generated inline schema name, e.g. in CLI ``` ---inline-schema-name-defaults arrayItemSuffix=_array_item +--inline-schema-name-defaults arrayItemSuffix=_array_item,mapItemSuffix=_map_item ``` -Note: Only arrayItemSuffix, mapItemSuffix are supported at the moment. +Note: Only arrayItemSuffix, mapItemSuffix are supported at the moment. `SKIP_SCHEMA_REUSE=true` is a special value to skip reusing inline schemas. diff --git a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Generate.java b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Generate.java index 02f6f99f61..ae78b2f9fd 100644 --- a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Generate.java +++ b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Generate.java @@ -177,7 +177,7 @@ public class Generate extends OpenApiGeneratorCommand { name = {"--inline-schema-name-defaults"}, title = "inline schema name defaults", description = "specifies the default values used when naming inline schema as such array items in the format of arrayItemSuffix=_inner,mapItemSuffix=_value. " - + " ONLY arrayItemSuffix, mapItemSuffix at the moment.") + + " ONLY arrayItemSuffix, mapItemSuffix are supported at the moment. `SKIP_SCHEMA_REUSE=true` is a special value to skip reusing inline schemas.") private List inlineSchemaNameDefaults = new ArrayList<>(); @Option( diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java index fb4d0a1e9d..d9b77e10a6 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/InlineModelResolver.java @@ -45,6 +45,7 @@ public class InlineModelResolver { private Map inlineSchemaNameDefaults = new HashMap<>(); private Set inlineSchemaNameMappingValues = new HashSet<>(); public boolean resolveInlineEnums = false; + public boolean skipSchemaReuse = false; // skip reusing inline schema if set to true // structure mapper sorts properties alphabetically on write to ensure models are // serialized consistently for lookup of existing models @@ -73,6 +74,11 @@ public class InlineModelResolver { public void setInlineSchemaNameDefaults(Map inlineSchemaNameDefaults) { this.inlineSchemaNameDefaults.putAll(inlineSchemaNameDefaults); + + if ("true".equalsIgnoreCase( + this.inlineSchemaNameDefaults.getOrDefault("SKIP_SCHEMA_REUSE", "false"))) { + this.skipSchemaReuse = true; + } } void flatten(OpenAPI openAPI) { @@ -638,6 +644,10 @@ public class InlineModelResolver { } private String matchGenerated(Schema model) { + if (skipSchemaReuse) { // skip reusing schema + return null; + } + try { String json = structureMapper.writeValueAsString(model); if (generatedSignature.containsKey(json)) { diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/InlineModelResolverTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/InlineModelResolverTest.java index 6e4fa4f84f..f21dcb2202 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/InlineModelResolverTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/InlineModelResolverTest.java @@ -1050,6 +1050,42 @@ public class InlineModelResolverTest { assertTrue(nothingNew.getProperties().get("arbitrary_request_body_array_property") instanceof ObjectSchema); } + @Test + public void testInlineSchemaSkipReuseSetToFalse() { + OpenAPI openAPI = TestUtils.parseSpec("src/test/resources/3_0/inline_model_resolver.yaml"); + InlineModelResolver resolver = new InlineModelResolver(); + Map inlineSchemaNameDefaults = new HashMap<>(); + //inlineSchemaNameDefaults.put("SKIP_SCHEMA_REUSE", "false"); // default is false + resolver.setInlineSchemaNameDefaults(inlineSchemaNameDefaults); + resolver.flatten(openAPI); + + Schema schema = openAPI.getComponents().getSchemas().get("meta_200_response"); + assertTrue(schema.getProperties().get("name") instanceof StringSchema); + assertTrue(schema.getProperties().get("id") instanceof IntegerSchema); + + // mega_200_response is NOT created since meta_200_response is reused + Schema schema2 = openAPI.getComponents().getSchemas().get("mega_200_response"); + assertNull(schema2); + } + + @Test + public void testInlineSchemaSkipReuseSetToTrue() { + OpenAPI openAPI = TestUtils.parseSpec("src/test/resources/3_0/inline_model_resolver.yaml"); + InlineModelResolver resolver = new InlineModelResolver(); + Map inlineSchemaNameDefaults = new HashMap<>(); + inlineSchemaNameDefaults.put("SKIP_SCHEMA_REUSE", "true"); + resolver.setInlineSchemaNameDefaults(inlineSchemaNameDefaults); + resolver.flatten(openAPI); + + Schema schema = openAPI.getComponents().getSchemas().get("meta_200_response"); + assertTrue(schema.getProperties().get("name") instanceof StringSchema); + assertTrue(schema.getProperties().get("id") instanceof IntegerSchema); + + Schema schema2 = openAPI.getComponents().getSchemas().get("mega_200_response"); + assertTrue(schema2.getProperties().get("name") instanceof StringSchema); + assertTrue(schema2.getProperties().get("id") instanceof IntegerSchema); + } + @Test public void resolveInlineRequestBodyAllOf() { OpenAPI openAPI = TestUtils.parseSpec("src/test/resources/3_0/inline_model_resolver.yaml"); diff --git a/modules/openapi-generator/src/test/resources/3_0/inline_model_resolver.yaml b/modules/openapi-generator/src/test/resources/3_0/inline_model_resolver.yaml index 7f1d9bdd1d..725bfb59b0 100644 --- a/modules/openapi-generator/src/test/resources/3_0/inline_model_resolver.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/inline_model_resolver.yaml @@ -252,6 +252,37 @@ paths: application/json: schema: type: object + /meta: + get: + operationId: meta + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + name: + type: string + id: + type: integer + /mega: + get: + operationId: mega + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + name: + type: string + id: + type: integer + /arbitrary_object_response_array: get: operationId: arbitraryObjectResponseArray From ca5d9b5e69a4ca4d12a65a985b4fc1f81969b393 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 8 Nov 2022 11:16:16 +0800 Subject: [PATCH 008/189] Add isEnumRef, isEnumOrRef to CodegenProperty (#13880) * add isEnumRef to codegen property * better format * update R template to use isEnumOrRef * update powershell template to use isEnumOrRef * update samples --- .../openapitools/codegen/CodegenProperty.java | 42 +++- .../openapitools/codegen/DefaultCodegen.java | 5 +- .../powershell/model_simple.mustache | 8 +- .../main/resources/r/modelGeneric.mustache | 16 +- .../src/main/resources/r/model_doc.mustache | 2 +- .../codegen/DefaultCodegenTest.java | 46 ++++ .../test/resources/3_0/issue-5676-enums.yaml | 213 ++++++++++++++++++ .../src/PSPetstore/Model/EnumTest.ps1 | 1 + .../models/outer_object_with_enum_property.rb | 22 ++ .../models/outer_object_with_enum_property.rb | 22 ++ .../models/outer_object_with_enum_property.rb | 22 ++ .../3_0/model/OuterObjectWithEnumProperty.cpp | 1 + .../3_0/model/OuterObjectWithEnumProperty.h | 1 + .../model/OuterObjectWithEnumProperty.java | 2 + .../model/OuterObjectWithEnumProperty.java | 2 + .../handler/PathHandlerInterface.java | 4 +- .../model/OuterObjectWithEnumProperty.java | 1 + 17 files changed, 384 insertions(+), 26 deletions(-) create mode 100644 modules/openapi-generator/src/test/resources/3_0/issue-5676-enums.yaml diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java index e5fe46954b..c3cf38349b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java @@ -148,8 +148,9 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti public boolean isAnyType; public boolean isArray; public boolean isMap; - public boolean isEnum; + public boolean isEnum; // true if the enum is defined inline public boolean isInnerEnum; // Enums declared inline will be located inside the generic model, changing how the enum is referenced in some cases. + public boolean isEnumRef; // true if it's a reference to an enum public boolean isReadOnly; public boolean isWriteOnly; public boolean isNullable; @@ -225,10 +226,14 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti } @Override - public void setFormat(String format) { this.format = format; } + public void setFormat(String format) { + this.format = format; + } @Override - public String getFormat() { return format; } + public String getFormat() { + return format; + } @Override public boolean getIsBooleanSchemaTrue() { @@ -500,7 +505,7 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti return required; } - public boolean compulsory(){ + public boolean compulsory() { return getRequired() && !isNullable; } @@ -963,15 +968,32 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti this.hasMultipleTypes = hasMultipleTypes; } - public boolean getIsUuid() { return isUuid; } + public boolean getIsUuid() { + return isUuid; + } - public void setIsUuid(boolean isUuid) { this.isUuid = isUuid; } + public void setIsUuid(boolean isUuid) { + this.isUuid = isUuid; + } @Override - public Map getRequiredVarsMap() { return requiredVarsMap; } + public Map getRequiredVarsMap() { + return requiredVarsMap; + } @Override - public void setRequiredVarsMap(Map requiredVarsMap) { this.requiredVarsMap=requiredVarsMap; } + public void setRequiredVarsMap(Map requiredVarsMap) { + this.requiredVarsMap = requiredVarsMap; + } + + /** + * Return true if it's an enum (inline or ref) + * + * @return true if it's an enum (inline or ref) + */ + public boolean getIsEnumOrRef() { + return isEnum || isEnumRef; + } @Override public String toString() { @@ -1033,6 +1055,7 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti sb.append(", isMap=").append(isMap); sb.append(", isEnum=").append(isEnum); sb.append(", isInnerEnum=").append(isInnerEnum); + sb.append(", isEnumRef=").append(isEnumRef); sb.append(", isAnyType=").append(isAnyType); sb.append(", isReadOnly=").append(isReadOnly); sb.append(", isWriteOnly=").append(isWriteOnly); @@ -1122,6 +1145,7 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti isMap == that.isMap && isEnum == that.isEnum && isInnerEnum == that.isInnerEnum && + isEnumRef == that.isEnumRef && isAnyType == that.isAnyType && isReadOnly == that.isReadOnly && isWriteOnly == that.isWriteOnly && @@ -1205,7 +1229,7 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti hasMoreNonReadOnly, isPrimitiveType, isModel, isContainer, isString, isNumeric, isInteger, isLong, isNumber, isFloat, isDouble, isDecimal, isByteArray, isBinary, isFile, isBoolean, isDate, isDateTime, isUuid, isUri, isEmail, isFreeFormObject, - isArray, isMap, isEnum, isInnerEnum, isAnyType, isReadOnly, isWriteOnly, isNullable, isShort, + isArray, isMap, isEnum, isInnerEnum, isEnumRef, isAnyType, isReadOnly, isWriteOnly, isNullable, isShort, isUnboundedInteger, isSelfReference, isCircularReference, isDiscriminator, _enum, allowableValues, items, mostInnerItems, additionalProperties, vars, requiredVars, vendorExtensions, hasValidation, isInherited, discriminatorValue, nameInCamelCase, diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index 63efb10c2d..e6f0dd8d22 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java @@ -3798,6 +3798,8 @@ public class DefaultCodegen implements CodegenConfig { if (referencedSchema.getEnum() != null && !referencedSchema.getEnum().isEmpty()) { List _enum = referencedSchema.getEnum(); + property.isEnumRef = true; + Map allowableValues = new HashMap<>(); allowableValues.put("values", _enum); if (allowableValues.size() > 0) { @@ -3868,7 +3870,6 @@ public class DefaultCodegen implements CodegenConfig { updatePropertyForAnyType(property, p); } else if (!ModelUtils.isNullType(p)) { // referenced model - ; } if (p.get$ref() != null) { property.setRef(p.get$ref()); @@ -5626,7 +5627,7 @@ public class DefaultCodegen implements CodegenConfig { continue; } cm.hasOptional = cm.hasOptional || !cp.required; - if (cp.isEnum) { + if (cp.getIsEnumOrRef()) { // isEnum or isEnumRef set to true // FIXME: if supporting inheritance, when called a second time for allProperties it is possible for // m.hasEnums to be set incorrectly if allProperties has enumerations but properties does not. cm.hasEnums = true; diff --git a/modules/openapi-generator/src/main/resources/powershell/model_simple.mustache b/modules/openapi-generator/src/main/resources/powershell/model_simple.mustache index f7954411df..8596a35858 100644 --- a/modules/openapi-generator/src/main/resources/powershell/model_simple.mustache +++ b/modules/openapi-generator/src/main/resources/powershell/model_simple.mustache @@ -34,11 +34,11 @@ function Initialize-{{{apiNamePrefix}}}{{{classname}}} { {{#pattern}} [ValidatePattern("{{{.}}}")] {{/pattern}} - {{#isEnum}} + {{#isEnumOrRef}} {{#allowableValues}} [ValidateSet({{#values}}"{{{.}}}"{{^-last}}, {{/-last}}{{/values}})] {{/allowableValues}} - {{/isEnum}} + {{/isEnumOrRef}} [{{vendorExtensions.x-powershell-data-type}}] {{=<% %>=}} ${<%name%>}<%#defaultValue%> = <%&.%><%/defaultValue%><%^vendorExtensions.x-powershell-last-writable%>,<%/vendorExtensions.x-powershell-last-writable%> @@ -52,11 +52,11 @@ function Initialize-{{{apiNamePrefix}}}{{{classname}}} { {{#pattern}} [ValidatePattern("{{{.}}}")] {{/pattern}} - {{#isEnum}} + {{#isEnumOrRef}} {{#allowableValues}} [ValidateSet({{#values}}"{{{.}}}"{{^-last}}, {{/-last}}{{/values}})] {{/allowableValues}} - {{/isEnum}} + {{/isEnumOrRef}} [{{vendorExtensions.x-powershell-data-type}}] {{=<% %>=}} ${<%name%>}<%#defaultValue%> = <%&.%><%/defaultValue%><%^-last%>,<%/-last%> diff --git a/modules/openapi-generator/src/main/resources/r/modelGeneric.mustache b/modules/openapi-generator/src/main/resources/r/modelGeneric.mustache index a75dd49ae0..6d404195a0 100644 --- a/modules/openapi-generator/src/main/resources/r/modelGeneric.mustache +++ b/modules/openapi-generator/src/main/resources/r/modelGeneric.mustache @@ -54,11 +54,11 @@ {{#requiredVars}} if (!missing(`{{name}}`)) { {{^isContainer}} - {{#isEnum}} + {{#isEnumOrRef}} if (!(`{{name}}` %in% c({{#_enum}}"{{{.}}}"{{^-last}}, {{/-last}}{{/_enum}}))) { stop(paste("Error! \"", `{{name}}`, "\" cannot be assigned to `{{name}}`. Must be {{#_enum}}\"{{{.}}}\"{{^-last}}, {{/-last}}{{/_enum}}.", sep = "")) } - {{/isEnum}} + {{/isEnumOrRef}} {{#isInteger}} if (!(is.numeric(`{{name}}`) && length(`{{name}}`) == 1)) { stop(paste("Error! Invalid data for `{{name}}`. Must be an integer:", `{{name}}`)) @@ -126,11 +126,11 @@ {{#optionalVars}} if (!is.null(`{{name}}`)) { {{^isContainer}} - {{#isEnum}} + {{#isEnumOrRef}} if (!(`{{name}}` %in% c({{#_enum}}"{{{.}}}"{{^-last}}, {{/-last}}{{/_enum}}))) { stop(paste("Error! \"", `{{name}}`, "\" cannot be assigned to `{{name}}`. Must be {{#_enum}}\"{{{.}}}\"{{^-last}}, {{/-last}}{{/_enum}}.", sep = "")) } - {{/isEnum}} + {{/isEnumOrRef}} {{#isInteger}} if (!(is.numeric(`{{name}}`) && length(`{{name}}`) == 1)) { stop(paste("Error! Invalid data for `{{name}}`. Must be an integer:", `{{name}}`)) @@ -275,11 +275,11 @@ {{/isContainer}} {{^isContainer}} {{#isPrimitiveType}} - {{#isEnum}} + {{#isEnumOrRef}} if (!is.null(this_object$`{{baseName}}`) && !(this_object$`{{baseName}}` %in% c({{#_enum}}"{{{.}}}"{{^-last}}, {{/-last}}{{/_enum}}))) { stop(paste("Error! \"", this_object$`{{baseName}}`, "\" cannot be assigned to `{{baseName}}`. Must be {{#_enum}}\"{{{.}}}\"{{^-last}}, {{/-last}}{{/_enum}}.", sep = "")) } - {{/isEnum}} + {{/isEnumOrRef}} {{#isUri}} # to validate URL. ref: https://stackoverflow.com/questions/73952024/url-validation-in-r if (!stringr::str_detect(this_object$`{{baseName}}`, "(https?|ftp)://[^ /$.?#].[^\\s]*")) { @@ -407,11 +407,11 @@ {{/isContainer}} {{^isContainer}} {{#isPrimitiveType}} - {{#isEnum}} + {{#isEnumOrRef}} if (!is.null(this_object$`{{baseName}}`) && !(this_object$`{{baseName}}` %in% c({{#_enum}}"{{{.}}}"{{^-last}}, {{/-last}}{{/_enum}}))) { stop(paste("Error! \"", this_object$`{{baseName}}`, "\" cannot be assigned to `{{baseName}}`. Must be {{#_enum}}\"{{{.}}}\"{{^-last}}, {{/-last}}{{/_enum}}.", sep = "")) } - {{/isEnum}} + {{/isEnumOrRef}} {{#isUri}} # to validate URL. ref: https://stackoverflow.com/questions/73952024/url-validation-in-r if (!stringr::str_detect(this_object$`{{name}}`, "(https?|ftp)://[^ /$.?#].[^\\s]*")) { diff --git a/modules/openapi-generator/src/main/resources/r/model_doc.mustache b/modules/openapi-generator/src/main/resources/r/model_doc.mustache index c0c8f5b7df..2156292b47 100644 --- a/modules/openapi-generator/src/main/resources/r/model_doc.mustache +++ b/modules/openapi-generator/src/main/resources/r/model_doc.mustache @@ -6,7 +6,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{.}}] {{/defaultValue}}{{#maximum}}[Max: {{{.}}}] {{/maximum}}{{#minimum}}[Min: {{{.}}}] {{/minimum}}{{#isEnum}}[Enum: {{_enum}}] {{/isEnum}}{{#pattern}}[Pattern: {{.}}] {{/pattern}}{{#maxItems}}[Max. items: {{.}}] {{/maxItems}}{{#minItems}}[Min. items: {{.}}] {{/minItems}}{{#maxLength}}[Max. length: {{.}}] {{/maxLength}}{{#minLength}}[Min. length: {{.}}] {{/minLength}} +{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{.}}] {{/defaultValue}}{{#maximum}}[Max: {{{.}}}] {{/maximum}}{{#minimum}}[Min: {{{.}}}] {{/minimum}}{{#isEnumOrRef}}[Enum: {{_enum}}] {{/isEnumOrRef}}{{#pattern}}[Pattern: {{.}}] {{/pattern}}{{#maxItems}}[Max. items: {{.}}] {{/maxItems}}{{#minItems}}[Min. items: {{.}}] {{/minItems}}{{#maxLength}}[Max. length: {{.}}] {{/maxLength}}{{#minLength}}[Min. length: {{.}}] {{/minLength}} {{/vars}} {{/model}}{{/models}} diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java index 593a45266b..6df19a1311 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java @@ -4253,4 +4253,50 @@ public class DefaultCodegenTest { codegen.setOpenAPI(openAPI); assertEquals(openAPI, codegen.openAPI); } + + @Test + public void testReferencedEnumType() { + final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/issue-5676-enums.yaml"); + final DefaultCodegen codegen = new DefaultCodegen(); + codegen.setOpenAPI(openAPI); + String modelName = "fakeRequestObjectWithReferencedEnum_request"; + + Schema schemaWithReferencedEnum = openAPI.getComponents().getSchemas().get(modelName); + CodegenModel modelWithReferencedSchema = codegen.fromModel(modelName, schemaWithReferencedEnum); + CodegenProperty referencedEnumSchemaProperty = modelWithReferencedSchema.vars.get(1); + + Assert.assertNotNull(schemaWithReferencedEnum); + Assert.assertTrue(modelWithReferencedSchema.hasEnums); + Assert.assertEquals(referencedEnumSchemaProperty.getName(), "enumType"); + Assert.assertFalse(referencedEnumSchemaProperty.isEnum); + Assert.assertTrue(referencedEnumSchemaProperty.getIsEnumOrRef()); + Assert.assertTrue(referencedEnumSchemaProperty.isEnumRef); + Assert.assertFalse(referencedEnumSchemaProperty.isInnerEnum); + Assert.assertFalse(referencedEnumSchemaProperty.isString); + Assert.assertFalse(referencedEnumSchemaProperty.isContainer); + Assert.assertFalse(referencedEnumSchemaProperty.isPrimitiveType); + } + + @Test + public void testInlineEnumType() { + final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/issue-5676-enums.yaml"); + final DefaultCodegen codegen = new DefaultCodegen(); + codegen.setOpenAPI(openAPI); + String modelName = "fakeRequestObjectWithInlineEnum_request"; + + Schema schemaWithReferencedEnum = openAPI.getComponents().getSchemas().get(modelName); + CodegenModel modelWithReferencedSchema = codegen.fromModel(modelName, schemaWithReferencedEnum); + CodegenProperty inlineEnumSchemaProperty = modelWithReferencedSchema.vars.get(1); + + Assert.assertNotNull(schemaWithReferencedEnum); + Assert.assertTrue(modelWithReferencedSchema.hasEnums); + Assert.assertEquals(inlineEnumSchemaProperty.getName(), "enumType"); + Assert.assertTrue(inlineEnumSchemaProperty.isEnum); + Assert.assertTrue(inlineEnumSchemaProperty.isInnerEnum); + Assert.assertTrue(inlineEnumSchemaProperty.isEnumRef); + Assert.assertTrue(inlineEnumSchemaProperty.getIsEnumOrRef()); + Assert.assertTrue(inlineEnumSchemaProperty.isString); + Assert.assertFalse(inlineEnumSchemaProperty.isContainer); + Assert.assertFalse(inlineEnumSchemaProperty.isPrimitiveType); + } } diff --git a/modules/openapi-generator/src/test/resources/3_0/issue-5676-enums.yaml b/modules/openapi-generator/src/test/resources/3_0/issue-5676-enums.yaml new file mode 100644 index 0000000000..23cdfdc053 --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/issue-5676-enums.yaml @@ -0,0 +1,213 @@ +openapi: 3.0.0 +info: + version: 1.0.0 + title: Enum test +servers: + - url: http://localhost:3000 +paths: + /fake/request-object-with-inline-enum: + post: + operationId: fakeRequestObjectWithInlineEnum + requestBody: + content: + application/json: + schema: + description: Contains property enumType that represents inline enum. + properties: + id: + type: number + enumType: + type: string + enum: + - one + - two + - three + responses: + 200: + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/EnumPatternObject' + /fake/request-object-with-referenced-enum: + post: + operationId: fakeRequestObjectWithReferencedEnum + requestBody: + content: + application/json: + schema: + description: Contains property enumType that represents referenced enum. + properties: + id: + type: number + enumType: + $ref: '#/components/schemas/StringEnum' + responses: + 200: + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/EnumPatternObject' + /fake/request-array-with-inline-enum: + post: + operationId: fakeRequestArrayWithInlineEnum + requestBody: + content: + application/json: + schema: + description: Contains property enumTypes that represents array of inline enums. + properties: + id: + type: number + enumTypes: + type: array + items: + type: string + enum: + - one + - two + - three + responses: + 200: + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/EnumPatternObject' + /fake/request-array-with-referenced-enum: + post: + operationId: fakeRequestArrayWithReferencedEnum + requestBody: + content: + application/json: + schema: + description: Contains property enumTypes that represents array of referenced enums. + properties: + id: + type: number + enumTypes: + type: array + items: + $ref: '#/components/schemas/StringEnum' + responses: + 200: + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/EnumPatternObject' + /fake/request-map-with-inline-enum: + post: + operationId: fakeRequestMapWithInlineEnum + requestBody: + content: + application/json: + schema: + description: Contains property enumTypes that represents map of inline enums. + properties: + id: + type: number + enumTypes: + type: object + additionalProperties: + type: string + enum: + - one + - two + - three + responses: + 200: + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/EnumPatternObject' + /fake/request-map-with-referenced-enum: + post: + operationId: fakeRequestMapWithReferencedEnum + requestBody: + content: + application/json: + schema: + description: Contains property enumTypes that represents map of referenced enums. + properties: + id: + type: number + enumTypes: + type: object + additionalProperties: + $ref: '#/components/schemas/StringEnum' + responses: + 200: + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/EnumPatternObject' + /fake/multipart-request-with-inline-enum: + post: + operationId: fakeRequestMultipartWithInlineEnum + requestBody: + content: + multipart/form-data: + schema: + description: Contains property enumType that represents inline enum. + properties: + id: + type: number + enumType: + type: string + enum: + - one + - two + - three + /fake/multipart-request-with-referenced-enum: + post: + operationId: fakeRequestMultipartWithReferencedEnum + requestBody: + content: + multipart/form-data: + schema: + description: Contains property enumType that represents referenced enum. + properties: + id: + type: number + enumType: + $ref: '#/components/schemas/StringEnum' + responses: + 200: + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/EnumPatternObject' +components: + schemas: + StringEnum: + type: string + enum: + - one + - two + - three + NumberEnum: + type: number + enum: + - 1 + - 2 + - 3 + EnumPatternObject: + type: object + properties: + string-enum: + $ref: "#/components/schemas/StringEnum" + nullable-string-enum: + nullable: true + allOf: + - $ref: "#/components/schemas/StringEnum" + number-enum: + $ref: "#/components/schemas/NumberEnum" + nullable-number-enum: + nullable: true + allOf: + - $ref: "#/components/schemas/NumberEnum" diff --git a/samples/client/petstore/powershell/src/PSPetstore/Model/EnumTest.ps1 b/samples/client/petstore/powershell/src/PSPetstore/Model/EnumTest.ps1 index 8b9608f192..867691b249 100644 --- a/samples/client/petstore/powershell/src/PSPetstore/Model/EnumTest.ps1 +++ b/samples/client/petstore/powershell/src/PSPetstore/Model/EnumTest.ps1 @@ -55,6 +55,7 @@ function Initialize-PSEnumTest { [System.Nullable[Double]] ${EnumNumber}, [Parameter(Position = 5, ValueFromPipelineByPropertyName = $true)] + [ValidateSet("placed", "approved", "delivered")] [PSCustomObject] ${OuterEnum} ) diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/models/outer_object_with_enum_property.rb b/samples/client/petstore/ruby-autoload/lib/petstore/models/outer_object_with_enum_property.rb index 1fc41768c4..f330319f59 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/models/outer_object_with_enum_property.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/models/outer_object_with_enum_property.rb @@ -17,6 +17,28 @@ module Petstore class OuterObjectWithEnumProperty attr_accessor :value + 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 { diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_object_with_enum_property.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_object_with_enum_property.rb index 1fc41768c4..f330319f59 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_object_with_enum_property.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_object_with_enum_property.rb @@ -17,6 +17,28 @@ module Petstore class OuterObjectWithEnumProperty attr_accessor :value + 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 { diff --git a/samples/client/petstore/ruby/lib/petstore/models/outer_object_with_enum_property.rb b/samples/client/petstore/ruby/lib/petstore/models/outer_object_with_enum_property.rb index 1fc41768c4..f330319f59 100644 --- a/samples/client/petstore/ruby/lib/petstore/models/outer_object_with_enum_property.rb +++ b/samples/client/petstore/ruby/lib/petstore/models/outer_object_with_enum_property.rb @@ -17,6 +17,28 @@ module Petstore class OuterObjectWithEnumProperty attr_accessor :value + 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 { diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/OuterObjectWithEnumProperty.cpp b/samples/server/petstore/cpp-restbed/generated/3_0/model/OuterObjectWithEnumProperty.cpp index d32bc53fdb..74e7df4338 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/OuterObjectWithEnumProperty.cpp +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/OuterObjectWithEnumProperty.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include diff --git a/samples/server/petstore/cpp-restbed/generated/3_0/model/OuterObjectWithEnumProperty.h b/samples/server/petstore/cpp-restbed/generated/3_0/model/OuterObjectWithEnumProperty.h index f3e5ef3f51..e3f5886c24 100644 --- a/samples/server/petstore/cpp-restbed/generated/3_0/model/OuterObjectWithEnumProperty.h +++ b/samples/server/petstore/cpp-restbed/generated/3_0/model/OuterObjectWithEnumProperty.h @@ -24,6 +24,7 @@ #include "OuterEnumInteger.h" #include #include +#include #include #include "helpers.h" diff --git a/samples/server/petstore/java-helidon-server/mp/src/main/java/org/openapitools/server/model/OuterObjectWithEnumProperty.java b/samples/server/petstore/java-helidon-server/mp/src/main/java/org/openapitools/server/model/OuterObjectWithEnumProperty.java index 45002fd1d7..552f07ecc3 100644 --- a/samples/server/petstore/java-helidon-server/mp/src/main/java/org/openapitools/server/model/OuterObjectWithEnumProperty.java +++ b/samples/server/petstore/java-helidon-server/mp/src/main/java/org/openapitools/server/model/OuterObjectWithEnumProperty.java @@ -12,6 +12,8 @@ package org.openapitools.server.model; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.server.model.OuterEnumInteger; import jakarta.validation.constraints.*; import jakarta.validation.Valid; diff --git a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/OuterObjectWithEnumProperty.java b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/OuterObjectWithEnumProperty.java index 7a75e0e3b6..54e563c42d 100644 --- a/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/OuterObjectWithEnumProperty.java +++ b/samples/server/petstore/java-helidon-server/se/src/main/java/org/openapitools/server/model/OuterObjectWithEnumProperty.java @@ -1,5 +1,7 @@ package org.openapitools.server.model; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.server.model.OuterEnumInteger; diff --git a/samples/server/petstore/java-undertow/src/main/java/org/openapitools/handler/PathHandlerInterface.java b/samples/server/petstore/java-undertow/src/main/java/org/openapitools/handler/PathHandlerInterface.java index 84384bbef8..57217ef3e9 100644 --- a/samples/server/petstore/java-undertow/src/main/java/org/openapitools/handler/PathHandlerInterface.java +++ b/samples/server/petstore/java-undertow/src/main/java/org/openapitools/handler/PathHandlerInterface.java @@ -539,10 +539,10 @@ public interface PathHandlerInterface { *

Response headers: [CodegenProperty{openApiType='integer', baseName='X-Rate-Limit', complexType='null', getter='getxRateLimit', setter='setxRateLimit', description='calls per hour allowed by the user', dataType='Integer', datatypeWithEnum='Integer', dataFormat='int32', name='xRateLimit', min='null', max='null', defaultValue='null', defaultValueWithParam=' = data.X-Rate-Limit;', baseType='Integer', containerType='null', title='null', unescapedDescription='calls per hour allowed by the user', maxLength=null, minLength=null, pattern='null', example='null', jsonSchema='{ "type" : "integer", "format" : "int32" -}', minimum='null', maximum='null', exclusiveMinimum=false, exclusiveMaximum=false, required=false, deprecated=false, hasMoreNonReadOnly=false, isPrimitiveType=true, isModel=false, isContainer=false, isString=false, isNumeric=true, isInteger=true, isShort=true, isLong=false, isUnboundedInteger=false, isNumber=false, isFloat=false, isDouble=false, isDecimal=false, isByteArray=false, isBinary=false, isFile=false, isBoolean=false, isDate=false, isDateTime=false, isUuid=false, isUri=false, isEmail=false, isFreeFormObject=false, isArray=false, isMap=false, isEnum=false, isInnerEnum=false, isAnyType=false, isReadOnly=false, isWriteOnly=false, isNullable=false, isSelfReference=false, isCircularReference=false, isDiscriminator=false, _enum=null, allowableValues=null, items=null, additionalProperties=null, vars=[], requiredVars=[], mostInnerItems=null, vendorExtensions={}, hasValidation=false, isInherited=false, discriminatorValue='null', nameInCamelCase='XRateLimit', nameInSnakeCase='X_RATE_LIMIT', enumName='null', maxItems=null, minItems=null, maxProperties=null, minProperties=null, uniqueItems=false, uniqueItemsBoolean=null, multipleOf=null, isXmlAttribute=false, xmlPrefix='null', xmlName='null', xmlNamespace='null', isXmlWrapped=false, isNull=false, getAdditionalPropertiesIsAnyType=false, getHasVars=false, getHasRequired=false, getHasDiscriminatorWithNonEmptyMapping=false, composedSchemas=null, hasMultipleTypes=false, requiredVarsMap=null, ref=null, schemaIsFromAdditionalProperties=false, isBooleanSchemaTrue=false, isBooleanSchemaFalse=false, format=int32, dependentRequired=null, contains=null}, CodegenProperty{openApiType='string', baseName='X-Expires-After', complexType='Date', getter='getxExpiresAfter', setter='setxExpiresAfter', description='date in UTC when token expires', dataType='Date', datatypeWithEnum='Date', dataFormat='date-time', name='xExpiresAfter', min='null', max='null', defaultValue='null', defaultValueWithParam=' = data.X-Expires-After;', baseType='Date', containerType='null', title='null', unescapedDescription='date in UTC when token expires', maxLength=null, minLength=null, pattern='null', example='null', jsonSchema='{ +}', minimum='null', maximum='null', exclusiveMinimum=false, exclusiveMaximum=false, required=false, deprecated=false, hasMoreNonReadOnly=false, isPrimitiveType=true, isModel=false, isContainer=false, isString=false, isNumeric=true, isInteger=true, isShort=true, isLong=false, isUnboundedInteger=false, isNumber=false, isFloat=false, isDouble=false, isDecimal=false, isByteArray=false, isBinary=false, isFile=false, isBoolean=false, isDate=false, isDateTime=false, isUuid=false, isUri=false, isEmail=false, isFreeFormObject=false, isArray=false, isMap=false, isEnum=false, isInnerEnum=false, isEnumRef=false, isAnyType=false, isReadOnly=false, isWriteOnly=false, isNullable=false, isSelfReference=false, isCircularReference=false, isDiscriminator=false, _enum=null, allowableValues=null, items=null, additionalProperties=null, vars=[], requiredVars=[], mostInnerItems=null, vendorExtensions={}, hasValidation=false, isInherited=false, discriminatorValue='null', nameInCamelCase='XRateLimit', nameInSnakeCase='X_RATE_LIMIT', enumName='null', maxItems=null, minItems=null, maxProperties=null, minProperties=null, uniqueItems=false, uniqueItemsBoolean=null, multipleOf=null, isXmlAttribute=false, xmlPrefix='null', xmlName='null', xmlNamespace='null', isXmlWrapped=false, isNull=false, getAdditionalPropertiesIsAnyType=false, getHasVars=false, getHasRequired=false, getHasDiscriminatorWithNonEmptyMapping=false, composedSchemas=null, hasMultipleTypes=false, requiredVarsMap=null, ref=null, schemaIsFromAdditionalProperties=false, isBooleanSchemaTrue=false, isBooleanSchemaFalse=false, format=int32, dependentRequired=null, contains=null}, CodegenProperty{openApiType='string', baseName='X-Expires-After', complexType='Date', getter='getxExpiresAfter', setter='setxExpiresAfter', description='date in UTC when token expires', dataType='Date', datatypeWithEnum='Date', dataFormat='date-time', name='xExpiresAfter', min='null', max='null', defaultValue='null', defaultValueWithParam=' = data.X-Expires-After;', baseType='Date', containerType='null', title='null', unescapedDescription='date in UTC when token expires', maxLength=null, minLength=null, pattern='null', example='null', jsonSchema='{ "type" : "string", "format" : "date-time" -}', minimum='null', maximum='null', exclusiveMinimum=false, exclusiveMaximum=false, required=false, deprecated=false, hasMoreNonReadOnly=false, isPrimitiveType=false, isModel=false, isContainer=false, isString=false, isNumeric=false, isInteger=false, isShort=false, isLong=false, isUnboundedInteger=false, isNumber=false, isFloat=false, isDouble=false, isDecimal=false, isByteArray=false, isBinary=false, isFile=false, isBoolean=false, isDate=false, isDateTime=true, isUuid=false, isUri=false, isEmail=false, isFreeFormObject=false, isArray=false, isMap=false, isEnum=false, isInnerEnum=false, isAnyType=false, isReadOnly=false, isWriteOnly=false, isNullable=false, isSelfReference=false, isCircularReference=false, isDiscriminator=false, _enum=null, allowableValues=null, items=null, additionalProperties=null, vars=[], requiredVars=[], mostInnerItems=null, vendorExtensions={}, hasValidation=false, isInherited=false, discriminatorValue='null', nameInCamelCase='XExpiresAfter', nameInSnakeCase='X_EXPIRES_AFTER', enumName='null', maxItems=null, minItems=null, maxProperties=null, minProperties=null, uniqueItems=false, uniqueItemsBoolean=null, multipleOf=null, isXmlAttribute=false, xmlPrefix='null', xmlName='null', xmlNamespace='null', isXmlWrapped=false, isNull=false, getAdditionalPropertiesIsAnyType=false, getHasVars=false, getHasRequired=false, getHasDiscriminatorWithNonEmptyMapping=false, composedSchemas=null, hasMultipleTypes=false, requiredVarsMap=null, ref=null, schemaIsFromAdditionalProperties=false, isBooleanSchemaTrue=false, isBooleanSchemaFalse=false, format=date-time, dependentRequired=null, contains=null}]

+}', minimum='null', maximum='null', exclusiveMinimum=false, exclusiveMaximum=false, required=false, deprecated=false, hasMoreNonReadOnly=false, isPrimitiveType=false, isModel=false, isContainer=false, isString=false, isNumeric=false, isInteger=false, isShort=false, isLong=false, isUnboundedInteger=false, isNumber=false, isFloat=false, isDouble=false, isDecimal=false, isByteArray=false, isBinary=false, isFile=false, isBoolean=false, isDate=false, isDateTime=true, isUuid=false, isUri=false, isEmail=false, isFreeFormObject=false, isArray=false, isMap=false, isEnum=false, isInnerEnum=false, isEnumRef=false, isAnyType=false, isReadOnly=false, isWriteOnly=false, isNullable=false, isSelfReference=false, isCircularReference=false, isDiscriminator=false, _enum=null, allowableValues=null, items=null, additionalProperties=null, vars=[], requiredVars=[], mostInnerItems=null, vendorExtensions={}, hasValidation=false, isInherited=false, discriminatorValue='null', nameInCamelCase='XExpiresAfter', nameInSnakeCase='X_EXPIRES_AFTER', enumName='null', maxItems=null, minItems=null, maxProperties=null, minProperties=null, uniqueItems=false, uniqueItemsBoolean=null, multipleOf=null, isXmlAttribute=false, xmlPrefix='null', xmlName='null', xmlNamespace='null', isXmlWrapped=false, isNull=false, getAdditionalPropertiesIsAnyType=false, getHasVars=false, getHasRequired=false, getHasDiscriminatorWithNonEmptyMapping=false, composedSchemas=null, hasMultipleTypes=false, requiredVarsMap=null, ref=null, schemaIsFromAdditionalProperties=false, isBooleanSchemaTrue=false, isBooleanSchemaFalse=false, format=date-time, dependentRequired=null, contains=null}]

* *

Produces: [{mediaType=application/xml}, {mediaType=application/json}]

*

Returns: {@link String}

diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/OuterObjectWithEnumProperty.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/OuterObjectWithEnumProperty.java index 3db01589ab..9d2f9f0e10 100644 --- a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/OuterObjectWithEnumProperty.java +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/OuterObjectWithEnumProperty.java @@ -16,6 +16,7 @@ package org.openapitools.model; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.OuterEnumInteger; From 4667b7e4719ae4af2822ac451acbd13a2c7ef04c Mon Sep 17 00:00:00 2001 From: Mustansir Soni <72849573+MustansirS@users.noreply.github.com> Date: Thu, 10 Nov 2022 04:10:29 +0900 Subject: [PATCH 009/189] [#13954] Allows args and arg as schema properties in python client (#13955) * Add args to reserved words * arg and args to _arg and _args in templates * Corrections * Test added * Corrections * Use arg and args as defined properties * Removed unnecessary assertion * Suggested change --- .../python/model_templates/new.handlebars | 12 +-- .../main/resources/python/schemas.handlebars | 102 +++++++++--------- ...odels-for-testing-with-http-signature.yaml | 10 ++ ...s_allows_a_schema_which_should_validate.py | 4 +- ..._allows_a_schema_which_should_validate.pyi | 4 +- ...tionalproperties_are_allowed_by_default.py | 4 +- ...ionalproperties_are_allowed_by_default.pyi | 4 +- ...dditionalproperties_can_exist_by_itself.py | 4 +- ...ditionalproperties_can_exist_by_itself.pyi | 4 +- ...operties_should_not_look_in_applicators.py | 8 +- ...perties_should_not_look_in_applicators.pyi | 8 +- .../python/unit_test_api/model/allof.py | 12 +-- .../python/unit_test_api/model/allof.pyi | 12 +-- .../model/allof_combined_with_anyof_oneof.py | 16 +-- .../model/allof_combined_with_anyof_oneof.pyi | 16 +-- .../unit_test_api/model/allof_simple_types.py | 12 +-- .../model/allof_simple_types.pyi | 12 +-- .../model/allof_with_base_schema.py | 12 +-- .../model/allof_with_base_schema.pyi | 12 +-- .../model/allof_with_one_empty_schema.py | 4 +- .../model/allof_with_one_empty_schema.pyi | 4 +- .../allof_with_the_first_empty_schema.py | 4 +- .../allof_with_the_first_empty_schema.pyi | 4 +- .../model/allof_with_the_last_empty_schema.py | 4 +- .../allof_with_the_last_empty_schema.pyi | 4 +- .../model/allof_with_two_empty_schemas.py | 4 +- .../model/allof_with_two_empty_schemas.pyi | 4 +- .../python/unit_test_api/model/anyof.py | 8 +- .../python/unit_test_api/model/anyof.pyi | 8 +- .../model/anyof_complex_types.py | 12 +-- .../model/anyof_complex_types.pyi | 12 +-- .../model/anyof_with_base_schema.py | 12 +-- .../model/anyof_with_base_schema.pyi | 12 +-- .../model/anyof_with_one_empty_schema.py | 4 +- .../model/anyof_with_one_empty_schema.pyi | 4 +- .../model/array_type_matches_arrays.py | 4 +- .../model/array_type_matches_arrays.pyi | 4 +- .../python/unit_test_api/model/by_int.py | 4 +- .../python/unit_test_api/model/by_int.pyi | 4 +- .../python/unit_test_api/model/by_number.py | 4 +- .../python/unit_test_api/model/by_number.pyi | 4 +- .../unit_test_api/model/by_small_number.py | 4 +- .../unit_test_api/model/by_small_number.pyi | 4 +- .../unit_test_api/model/date_time_format.py | 4 +- .../unit_test_api/model/date_time_format.pyi | 4 +- .../unit_test_api/model/email_format.py | 4 +- .../unit_test_api/model/email_format.pyi | 4 +- .../model/enums_in_properties.py | 4 +- .../model/enums_in_properties.pyi | 4 +- .../unit_test_api/model/forbidden_property.py | 4 +- .../model/forbidden_property.pyi | 4 +- .../unit_test_api/model/hostname_format.py | 4 +- .../unit_test_api/model/hostname_format.pyi | 4 +- .../model/invalid_string_value_for_default.py | 4 +- .../invalid_string_value_for_default.pyi | 4 +- .../python/unit_test_api/model/ipv4_format.py | 4 +- .../unit_test_api/model/ipv4_format.pyi | 4 +- .../python/unit_test_api/model/ipv6_format.py | 4 +- .../unit_test_api/model/ipv6_format.pyi | 4 +- .../model/json_pointer_format.py | 4 +- .../model/json_pointer_format.pyi | 4 +- .../unit_test_api/model/maximum_validation.py | 4 +- .../model/maximum_validation.pyi | 4 +- ...aximum_validation_with_unsigned_integer.py | 4 +- ...ximum_validation_with_unsigned_integer.pyi | 4 +- .../model/maxitems_validation.py | 4 +- .../model/maxitems_validation.pyi | 4 +- .../model/maxlength_validation.py | 4 +- .../model/maxlength_validation.pyi | 4 +- ...axproperties0_means_the_object_is_empty.py | 4 +- ...xproperties0_means_the_object_is_empty.pyi | 4 +- .../model/maxproperties_validation.py | 4 +- .../model/maxproperties_validation.pyi | 4 +- .../unit_test_api/model/minimum_validation.py | 4 +- .../model/minimum_validation.pyi | 4 +- .../minimum_validation_with_signed_integer.py | 4 +- ...minimum_validation_with_signed_integer.pyi | 4 +- .../model/minitems_validation.py | 4 +- .../model/minitems_validation.pyi | 4 +- .../model/minlength_validation.py | 4 +- .../model/minlength_validation.pyi | 4 +- .../model/minproperties_validation.py | 4 +- .../model/minproperties_validation.pyi | 4 +- .../python/unit_test_api/model/model_not.py | 4 +- .../python/unit_test_api/model/model_not.pyi | 4 +- ...ted_allof_to_check_validation_semantics.py | 8 +- ...ed_allof_to_check_validation_semantics.pyi | 8 +- ...ted_anyof_to_check_validation_semantics.py | 8 +- ...ed_anyof_to_check_validation_semantics.pyi | 8 +- .../unit_test_api/model/nested_items.py | 16 +-- .../unit_test_api/model/nested_items.pyi | 16 +-- ...ted_oneof_to_check_validation_semantics.py | 8 +- ...ed_oneof_to_check_validation_semantics.pyi | 8 +- .../model/not_more_complex_schema.py | 8 +- .../model/not_more_complex_schema.pyi | 8 +- .../model/object_properties_validation.py | 4 +- .../model/object_properties_validation.pyi | 4 +- .../python/unit_test_api/model/oneof.py | 8 +- .../python/unit_test_api/model/oneof.pyi | 8 +- .../model/oneof_complex_types.py | 12 +-- .../model/oneof_complex_types.pyi | 12 +-- .../model/oneof_with_base_schema.py | 12 +-- .../model/oneof_with_base_schema.pyi | 12 +-- .../model/oneof_with_empty_schema.py | 4 +- .../model/oneof_with_empty_schema.pyi | 4 +- .../model/oneof_with_required.py | 12 +-- .../model/oneof_with_required.pyi | 12 +-- .../model/pattern_is_not_anchored.py | 4 +- .../model/pattern_is_not_anchored.pyi | 4 +- .../unit_test_api/model/pattern_validation.py | 4 +- .../model/pattern_validation.pyi | 4 +- .../properties_with_escaped_characters.py | 4 +- .../properties_with_escaped_characters.pyi | 4 +- ...perty_named_ref_that_is_not_a_reference.py | 4 +- ...erty_named_ref_that_is_not_a_reference.pyi | 4 +- .../model/ref_in_additionalproperties.py | 4 +- .../model/ref_in_additionalproperties.pyi | 4 +- .../unit_test_api/model/ref_in_allof.py | 4 +- .../unit_test_api/model/ref_in_allof.pyi | 4 +- .../unit_test_api/model/ref_in_anyof.py | 4 +- .../unit_test_api/model/ref_in_anyof.pyi | 4 +- .../unit_test_api/model/ref_in_items.py | 4 +- .../unit_test_api/model/ref_in_items.pyi | 4 +- .../python/unit_test_api/model/ref_in_not.py | 4 +- .../python/unit_test_api/model/ref_in_not.pyi | 4 +- .../unit_test_api/model/ref_in_oneof.py | 4 +- .../unit_test_api/model/ref_in_oneof.pyi | 4 +- .../unit_test_api/model/ref_in_property.py | 4 +- .../unit_test_api/model/ref_in_property.pyi | 4 +- .../model/required_default_validation.py | 4 +- .../model/required_default_validation.pyi | 4 +- .../model/required_validation.py | 4 +- .../model/required_validation.pyi | 4 +- .../model/required_with_empty_array.py | 4 +- .../model/required_with_empty_array.pyi | 4 +- .../model/required_with_escaped_characters.py | 4 +- .../required_with_escaped_characters.pyi | 4 +- ..._do_anything_if_the_property_is_missing.py | 4 +- ...do_anything_if_the_property_is_missing.pyi | 4 +- .../model/uniqueitems_false_validation.py | 4 +- .../model/uniqueitems_false_validation.pyi | 4 +- .../model/uniqueitems_validation.py | 4 +- .../model/uniqueitems_validation.pyi | 4 +- .../python/unit_test_api/model/uri_format.py | 4 +- .../python/unit_test_api/model/uri_format.pyi | 4 +- .../model/uri_reference_format.py | 4 +- .../model/uri_reference_format.pyi | 4 +- .../model/uri_template_format.py | 4 +- .../model/uri_template_format.pyi | 4 +- .../post.py | 4 +- .../post.pyi | 4 +- .../post.py | 4 +- .../post.pyi | 4 +- .../post.py | 4 +- .../post.pyi | 4 +- .../post.py | 4 +- .../post.pyi | 4 +- .../post.py | 4 +- .../post.pyi | 4 +- .../post.py | 4 +- .../post.pyi | 4 +- .../post.py | 8 +- .../post.pyi | 8 +- .../post.py | 4 +- .../post.pyi | 4 +- .../post.py | 4 +- .../post.pyi | 4 +- .../post.py | 4 +- .../post.pyi | 4 +- .../post.py | 4 +- .../post.pyi | 4 +- .../post.py | 4 +- .../post.pyi | 4 +- .../post.py | 4 +- .../post.pyi | 4 +- .../post.py | 4 +- .../post.pyi | 4 +- .../post.py | 4 +- .../post.pyi | 4 +- .../post.py | 4 +- .../post.pyi | 4 +- .../post.py | 4 +- .../post.pyi | 4 +- .../post.py | 4 +- .../post.pyi | 4 +- .../post.py | 4 +- .../post.pyi | 4 +- .../post.py | 8 +- .../post.pyi | 8 +- .../post.py | 4 +- .../post.pyi | 4 +- .../post.py | 4 +- .../post.pyi | 4 +- .../post.py | 4 +- .../post.pyi | 4 +- .../post.py | 4 +- .../post.pyi | 4 +- .../post.py | 4 +- .../post.pyi | 4 +- .../post.py | 4 +- .../post.pyi | 4 +- .../python/unit_test_api/schemas.py | 102 +++++++++--------- .../python/dynamic_servers/schemas.py | 102 +++++++++--------- .../petstore/python/.openapi-generator/FILES | 3 + .../openapi3/client/petstore/python/README.md | 1 + .../ObjectModelWithArgAndArgsProperties.md | 16 +++ .../model/additional_properties_class.py | 28 ++--- .../model/additional_properties_class.pyi | 28 ++--- .../model/additional_properties_validator.py | 24 ++--- .../model/additional_properties_validator.pyi | 24 ++--- ...ditional_properties_with_array_of_enums.py | 8 +- ...itional_properties_with_array_of_enums.pyi | 8 +- .../python/petstore_api/model/address.py | 4 +- .../python/petstore_api/model/address.pyi | 4 +- .../python/petstore_api/model/animal.py | 4 +- .../python/petstore_api/model/animal.pyi | 4 +- .../python/petstore_api/model/animal_farm.py | 4 +- .../python/petstore_api/model/animal_farm.pyi | 4 +- .../petstore_api/model/any_type_and_format.py | 40 +++---- .../model/any_type_and_format.pyi | 40 +++---- .../petstore_api/model/any_type_not_string.py | 4 +- .../model/any_type_not_string.pyi | 4 +- .../python/petstore_api/model/api_response.py | 4 +- .../petstore_api/model/api_response.pyi | 4 +- .../python/petstore_api/model/apple.py | 4 +- .../python/petstore_api/model/apple.pyi | 4 +- .../python/petstore_api/model/apple_req.py | 4 +- .../python/petstore_api/model/apple_req.pyi | 4 +- .../model/array_holding_any_type.py | 4 +- .../model/array_holding_any_type.pyi | 4 +- .../model/array_of_array_of_number_only.py | 12 +-- .../model/array_of_array_of_number_only.pyi | 12 +-- .../petstore_api/model/array_of_enums.py | 4 +- .../petstore_api/model/array_of_enums.pyi | 4 +- .../model/array_of_number_only.py | 8 +- .../model/array_of_number_only.pyi | 8 +- .../python/petstore_api/model/array_test.py | 24 ++--- .../python/petstore_api/model/array_test.pyi | 24 ++--- .../model/array_with_validations_in_items.py | 4 +- .../model/array_with_validations_in_items.pyi | 4 +- .../python/petstore_api/model/banana.py | 4 +- .../python/petstore_api/model/banana.pyi | 4 +- .../python/petstore_api/model/banana_req.py | 4 +- .../python/petstore_api/model/banana_req.pyi | 4 +- .../python/petstore_api/model/basque_pig.py | 4 +- .../python/petstore_api/model/basque_pig.pyi | 4 +- .../petstore_api/model/capitalization.py | 4 +- .../petstore_api/model/capitalization.pyi | 4 +- .../petstore/python/petstore_api/model/cat.py | 8 +- .../python/petstore_api/model/cat.pyi | 8 +- .../python/petstore_api/model/category.py | 4 +- .../python/petstore_api/model/category.pyi | 4 +- .../python/petstore_api/model/child_cat.py | 8 +- .../python/petstore_api/model/child_cat.pyi | 8 +- .../python/petstore_api/model/class_model.py | 4 +- .../python/petstore_api/model/class_model.pyi | 4 +- .../python/petstore_api/model/client.py | 4 +- .../python/petstore_api/model/client.pyi | 4 +- .../model/complex_quadrilateral.py | 8 +- .../model/complex_quadrilateral.pyi | 8 +- ...d_any_of_different_types_no_validations.py | 8 +- ..._any_of_different_types_no_validations.pyi | 8 +- .../petstore_api/model/composed_array.py | 4 +- .../petstore_api/model/composed_array.pyi | 4 +- .../petstore_api/model/composed_bool.py | 4 +- .../petstore_api/model/composed_bool.pyi | 4 +- .../petstore_api/model/composed_none.py | 4 +- .../petstore_api/model/composed_none.pyi | 4 +- .../petstore_api/model/composed_number.py | 4 +- .../petstore_api/model/composed_number.pyi | 4 +- .../petstore_api/model/composed_object.py | 4 +- .../petstore_api/model/composed_object.pyi | 4 +- .../model/composed_one_of_different_types.py | 12 +-- .../model/composed_one_of_different_types.pyi | 12 +-- .../petstore_api/model/composed_string.py | 4 +- .../petstore_api/model/composed_string.pyi | 4 +- .../python/petstore_api/model/danish_pig.py | 4 +- .../python/petstore_api/model/danish_pig.pyi | 4 +- .../petstore/python/petstore_api/model/dog.py | 8 +- .../python/petstore_api/model/dog.pyi | 8 +- .../python/petstore_api/model/drawing.py | 8 +- .../python/petstore_api/model/drawing.pyi | 8 +- .../python/petstore_api/model/enum_arrays.py | 8 +- .../python/petstore_api/model/enum_arrays.pyi | 8 +- .../python/petstore_api/model/enum_test.py | 4 +- .../python/petstore_api/model/enum_test.pyi | 4 +- .../model/equilateral_triangle.py | 8 +- .../model/equilateral_triangle.pyi | 8 +- .../python/petstore_api/model/file.py | 4 +- .../python/petstore_api/model/file.pyi | 4 +- .../model/file_schema_test_class.py | 8 +- .../model/file_schema_test_class.pyi | 8 +- .../petstore/python/petstore_api/model/foo.py | 4 +- .../python/petstore_api/model/foo.pyi | 4 +- .../python/petstore_api/model/format_test.py | 8 +- .../python/petstore_api/model/format_test.pyi | 8 +- .../python/petstore_api/model/from_schema.py | 4 +- .../python/petstore_api/model/from_schema.pyi | 4 +- .../python/petstore_api/model/fruit.py | 4 +- .../python/petstore_api/model/fruit.pyi | 4 +- .../python/petstore_api/model/fruit_req.py | 4 +- .../python/petstore_api/model/fruit_req.pyi | 4 +- .../python/petstore_api/model/gm_fruit.py | 4 +- .../python/petstore_api/model/gm_fruit.pyi | 4 +- .../petstore_api/model/grandparent_animal.py | 4 +- .../petstore_api/model/grandparent_animal.pyi | 4 +- .../petstore_api/model/has_only_read_only.py | 4 +- .../petstore_api/model/has_only_read_only.pyi | 4 +- .../petstore_api/model/health_check_result.py | 8 +- .../model/health_check_result.pyi | 8 +- .../petstore_api/model/isosceles_triangle.py | 8 +- .../petstore_api/model/isosceles_triangle.pyi | 8 +- .../petstore_api/model/json_patch_request.py | 8 +- .../petstore_api/model/json_patch_request.pyi | 8 +- .../json_patch_request_add_replace_test.py | 4 +- .../json_patch_request_add_replace_test.pyi | 4 +- .../model/json_patch_request_move_copy.py | 4 +- .../model/json_patch_request_move_copy.pyi | 4 +- .../model/json_patch_request_remove.py | 4 +- .../model/json_patch_request_remove.pyi | 4 +- .../python/petstore_api/model/mammal.py | 4 +- .../python/petstore_api/model/mammal.pyi | 4 +- .../python/petstore_api/model/map_test.py | 20 ++-- .../python/petstore_api/model/map_test.pyi | 20 ++-- ...perties_and_additional_properties_class.py | 8 +- ...erties_and_additional_properties_class.pyi | 8 +- .../petstore_api/model/model200_response.py | 4 +- .../petstore_api/model/model200_response.pyi | 4 +- .../python/petstore_api/model/model_return.py | 4 +- .../petstore_api/model/model_return.pyi | 4 +- .../python/petstore_api/model/money.py | 4 +- .../python/petstore_api/model/money.pyi | 4 +- .../python/petstore_api/model/name.py | 4 +- .../python/petstore_api/model/name.pyi | 4 +- .../model/no_additional_properties.py | 4 +- .../model/no_additional_properties.pyi | 4 +- .../petstore_api/model/nullable_class.py | 72 ++++++------- .../petstore_api/model/nullable_class.pyi | 72 ++++++------- .../petstore_api/model/nullable_shape.py | 4 +- .../petstore_api/model/nullable_shape.pyi | 4 +- .../petstore_api/model/nullable_string.py | 4 +- .../petstore_api/model/nullable_string.pyi | 4 +- .../python/petstore_api/model/number_only.py | 4 +- .../python/petstore_api/model/number_only.pyi | 4 +- ...ject_model_with_arg_and_args_properties.py | 95 ++++++++++++++++ ...ect_model_with_arg_and_args_properties.pyi | 95 ++++++++++++++++ .../model/object_model_with_ref_props.py | 4 +- .../model/object_model_with_ref_props.pyi | 4 +- ..._with_req_test_prop_from_unset_add_prop.py | 8 +- ...with_req_test_prop_from_unset_add_prop.pyi | 8 +- .../model/object_with_decimal_properties.py | 4 +- .../model/object_with_decimal_properties.pyi | 4 +- .../object_with_difficultly_named_props.py | 4 +- .../object_with_difficultly_named_props.pyi | 4 +- ...object_with_inline_composition_property.py | 8 +- ...bject_with_inline_composition_property.pyi | 8 +- ...ect_with_invalid_named_refed_properties.py | 4 +- ...ct_with_invalid_named_refed_properties.pyi | 4 +- .../model/object_with_optional_test_prop.py | 4 +- .../model/object_with_optional_test_prop.pyi | 4 +- .../model/object_with_validations.py | 4 +- .../model/object_with_validations.pyi | 4 +- .../python/petstore_api/model/order.py | 4 +- .../python/petstore_api/model/order.pyi | 4 +- .../python/petstore_api/model/parent_pet.py | 4 +- .../python/petstore_api/model/parent_pet.pyi | 4 +- .../petstore/python/petstore_api/model/pet.py | 12 +-- .../python/petstore_api/model/pet.pyi | 12 +-- .../petstore/python/petstore_api/model/pig.py | 4 +- .../python/petstore_api/model/pig.pyi | 4 +- .../python/petstore_api/model/player.py | 4 +- .../python/petstore_api/model/player.pyi | 4 +- .../petstore_api/model/quadrilateral.py | 4 +- .../petstore_api/model/quadrilateral.pyi | 4 +- .../model/quadrilateral_interface.py | 4 +- .../model/quadrilateral_interface.pyi | 4 +- .../petstore_api/model/read_only_first.py | 4 +- .../petstore_api/model/read_only_first.pyi | 4 +- .../petstore_api/model/scalene_triangle.py | 8 +- .../petstore_api/model/scalene_triangle.pyi | 8 +- .../python/petstore_api/model/shape.py | 4 +- .../python/petstore_api/model/shape.pyi | 4 +- .../petstore_api/model/shape_or_null.py | 4 +- .../petstore_api/model/shape_or_null.pyi | 4 +- .../model/simple_quadrilateral.py | 8 +- .../model/simple_quadrilateral.pyi | 8 +- .../python/petstore_api/model/some_object.py | 4 +- .../python/petstore_api/model/some_object.pyi | 4 +- .../petstore_api/model/special_model_name.py | 4 +- .../petstore_api/model/special_model_name.pyi | 4 +- .../petstore_api/model/string_boolean_map.py | 4 +- .../petstore_api/model/string_boolean_map.pyi | 4 +- .../python/petstore_api/model/string_enum.py | 4 +- .../python/petstore_api/model/string_enum.pyi | 4 +- .../petstore/python/petstore_api/model/tag.py | 4 +- .../python/petstore_api/model/tag.pyi | 4 +- .../python/petstore_api/model/triangle.py | 4 +- .../python/petstore_api/model/triangle.pyi | 4 +- .../petstore_api/model/triangle_interface.py | 4 +- .../petstore_api/model/triangle_interface.pyi | 4 +- .../python/petstore_api/model/user.py | 12 +-- .../python/petstore_api/model/user.pyi | 12 +-- .../python/petstore_api/model/whale.py | 4 +- .../python/petstore_api/model/whale.pyi | 4 +- .../python/petstore_api/model/zebra.py | 4 +- .../python/petstore_api/model/zebra.pyi | 4 +- .../python/petstore_api/models/__init__.py | 1 + .../python/petstore_api/paths/fake/get.py | 16 +-- .../python/petstore_api/paths/fake/get.pyi | 16 +-- .../python/petstore_api/paths/fake/post.py | 4 +- .../python/petstore_api/paths/fake/post.pyi | 4 +- .../fake_inline_additional_properties/post.py | 4 +- .../post.pyi | 4 +- .../paths/fake_inline_composition_/post.py | 36 +++---- .../paths/fake_inline_composition_/post.pyi | 36 +++---- .../paths/fake_json_form_data/get.py | 4 +- .../paths/fake_json_form_data/get.pyi | 4 +- .../paths/fake_obj_in_query/get.py | 4 +- .../paths/fake_obj_in_query/get.pyi | 4 +- .../post.py | 4 +- .../post.pyi | 4 +- .../paths/fake_test_query_parameters/put.py | 20 ++-- .../paths/fake_test_query_parameters/put.pyi | 20 ++-- .../paths/fake_upload_file/post.py | 4 +- .../paths/fake_upload_file/post.pyi | 4 +- .../paths/fake_upload_files/post.py | 8 +- .../paths/fake_upload_files/post.pyi | 8 +- .../python/petstore_api/paths/foo/get.py | 4 +- .../python/petstore_api/paths/foo/get.pyi | 4 +- .../paths/pet_find_by_status/get.py | 12 +-- .../paths/pet_find_by_status/get.pyi | 12 +-- .../paths/pet_find_by_tags/get.py | 12 +-- .../paths/pet_find_by_tags/get.pyi | 12 +-- .../petstore_api/paths/pet_pet_id/post.py | 4 +- .../petstore_api/paths/pet_pet_id/post.pyi | 4 +- .../paths/pet_pet_id_upload_image/post.py | 4 +- .../paths/pet_pet_id_upload_image/post.pyi | 4 +- .../petstore_api/paths/store_inventory/get.py | 4 +- .../paths/store_inventory/get.pyi | 4 +- .../paths/user_create_with_array/post.py | 4 +- .../paths/user_create_with_array/post.pyi | 4 +- .../paths/user_create_with_list/post.py | 4 +- .../paths/user_create_with_list/post.pyi | 4 +- .../petstore/python/petstore_api/schemas.py | 102 +++++++++--------- ...ject_model_with_arg_and_args_properties.py | 25 +++++ ...ject_model_with_arg_and_args_properties.py | 41 +++++++ 446 files changed, 1861 insertions(+), 1574 deletions(-) create mode 100644 samples/openapi3/client/petstore/python/docs/models/ObjectModelWithArgAndArgsProperties.md create mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/object_model_with_arg_and_args_properties.py create mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/object_model_with_arg_and_args_properties.pyi create mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_object_model_with_arg_and_args_properties.py create mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_object_model_with_arg_and_args_properties.py diff --git a/modules/openapi-generator/src/main/resources/python/model_templates/new.handlebars b/modules/openapi-generator/src/main/resources/python/model_templates/new.handlebars index fbf25512ba..955d6395ec 100644 --- a/modules/openapi-generator/src/main/resources/python/model_templates/new.handlebars +++ b/modules/openapi-generator/src/main/resources/python/model_templates/new.handlebars @@ -1,12 +1,12 @@ def __new__( cls, {{#if getHasMultipleTypes}} - *args: typing.Union[{{> model_templates/schema_python_types }}], + *_args: typing.Union[{{> model_templates/schema_python_types }}], {{else}} {{#if isArray }} - arg: typing.Union[typing.Tuple[{{#with items}}{{#if complexType}}'{{complexType}}'{{else}}typing.Union[MetaOapg.{{baseName}}, {{> model_templates/schema_python_types }}]{{/if}}{{/with}}], typing.List[{{#with items}}{{#if complexType}}'{{complexType}}'{{else}}typing.Union[MetaOapg.{{baseName}}, {{> model_templates/schema_python_types }}]{{/if}}{{/with}}]], + _arg: typing.Union[typing.Tuple[{{#with items}}{{#if complexType}}'{{complexType}}'{{else}}typing.Union[MetaOapg.{{baseName}}, {{> model_templates/schema_python_types }}]{{/if}}{{/with}}], typing.List[{{#with items}}{{#if complexType}}'{{complexType}}'{{else}}typing.Union[MetaOapg.{{baseName}}, {{> model_templates/schema_python_types }}]{{/if}}{{/with}}]], {{else}} - *args: typing.Union[{{> model_templates/schema_python_types }}], + *_args: typing.Union[{{> model_templates/schema_python_types }}], {{/if}} {{/if}} {{#unless isNull}} @@ -61,12 +61,12 @@ def __new__( return super().__new__( cls, {{#if getHasMultipleTypes}} - *args, + *_args, {{else}} {{#if isArray }} - arg, + _arg, {{else}} - *args, + *_args, {{/if}} {{/if}} {{#unless isNull}} diff --git a/modules/openapi-generator/src/main/resources/python/schemas.handlebars b/modules/openapi-generator/src/main/resources/python/schemas.handlebars index 2971f28985..22999b1306 100644 --- a/modules/openapi-generator/src/main/resources/python/schemas.handlebars +++ b/modules/openapi-generator/src/main/resources/python/schemas.handlebars @@ -43,17 +43,17 @@ class FileIO(io.FileIO): Note: this class is not immutable """ - def __new__(cls, arg: typing.Union[io.FileIO, io.BufferedReader]): - if isinstance(arg, (io.FileIO, io.BufferedReader)): - if arg.closed: + def __new__(cls, _arg: typing.Union[io.FileIO, io.BufferedReader]): + if isinstance(_arg, (io.FileIO, io.BufferedReader)): + if _arg.closed: raise ApiValueError('Invalid file state; file is closed and must be open') - arg.close() - inst = super(FileIO, cls).__new__(cls, arg.name) - super(FileIO, inst).__init__(arg.name) + _arg.close() + inst = super(FileIO, cls).__new__(cls, _arg.name) + super(FileIO, inst).__init__(_arg.name) return inst - raise ApiValueError('FileIO must be passed arg which contains the open file') + raise ApiValueError('FileIO must be passed _arg which contains the open file') - def __init__(self, arg: typing.Union[io.FileIO, io.BufferedReader]): + def __init__(self, _arg: typing.Union[io.FileIO, io.BufferedReader]): pass @@ -144,11 +144,11 @@ class ValidationMetadata(frozendict.frozendict): class Singleton: """ Enums and singletons are the same - The same instance is returned for a given key of (cls, arg) + The same instance is returned for a given key of (cls, _arg) """ _instances = {} - def __new__(cls, arg: typing.Any, **kwargs): + def __new__(cls, _arg: typing.Any, **kwargs): """ cls base classes: BoolClass, NoneClass, str, decimal.Decimal The 3rd key is used in the tuple below for a corner case where an enum contains integer 1 @@ -156,15 +156,15 @@ class Singleton: Decimal('1.0') == Decimal('1') But if we omitted the 3rd value in the key, then Decimal('1.0') would be stored as Decimal('1') and json serializing that instance would be '1' rather than the expected '1.0' - Adding the 3rd value, the str of arg ensures that 1.0 -> Decimal('1.0') which is serialized as 1.0 + Adding the 3rd value, the str of _arg ensures that 1.0 -> Decimal('1.0') which is serialized as 1.0 """ - key = (cls, arg, str(arg)) + key = (cls, _arg, str(_arg)) if key not in cls._instances: - if isinstance(arg, (none_type, bool, BoolClass, NoneClass)): + if isinstance(_arg, (none_type, bool, BoolClass, NoneClass)): inst = super().__new__(cls) cls._instances[key] = inst else: - cls._instances[key] = super().__new__(cls, arg) + cls._instances[key] = super().__new__(cls, _arg) return cls._instances[key] def __repr__(self): @@ -492,12 +492,12 @@ class Schema: def __remove_unsets(kwargs): return {key: val for key, val in kwargs.items() if val is not unset} - def __new__(cls, *args: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema'], _configuration: typing.Optional[Configuration] = None, **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema', Unset]): + def __new__(cls, *_args: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema'], _configuration: typing.Optional[Configuration] = None, **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema', Unset]): """ Schema __new__ Args: - args (int/float/decimal.Decimal/str/list/tuple/dict/frozendict.frozendict/bool/None): the value + _args (int/float/decimal.Decimal/str/list/tuple/dict/frozendict.frozendict/bool/None): the value kwargs (str, int/float/decimal.Decimal/str/list/tuple/dict/frozendict.frozendict/bool/None): dict values _configuration: contains the Configuration that enables json schema validation keywords like minItems, minLength etc @@ -506,14 +506,14 @@ class Schema: are instance properties if they are named normally :( """ __kwargs = cls.__remove_unsets(kwargs) - if not args and not __kwargs: + if not _args and not __kwargs: raise TypeError( 'No input given. args or kwargs must be given.' ) - if not __kwargs and args and not isinstance(args[0], dict): - __arg = args[0] + if not __kwargs and _args and not isinstance(_args[0], dict): + __arg = _args[0] else: - __arg = cls.__get_input_dict(*args, **__kwargs) + __arg = cls.__get_input_dict(*_args, **__kwargs) __from_server = False __validated_path_to_schemas = {} __arg = cast_to_allowed_types( @@ -530,7 +530,7 @@ class Schema: def __init__( self, - *args: typing.Union[ + *_args: typing.Union[ dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema'], _configuration: typing.Optional[Configuration] = None, **kwargs: typing.Union[ @@ -2079,8 +2079,8 @@ class ListSchema( def from_openapi_data_oapg(cls, arg: typing.List[typing.Any], _configuration: typing.Optional[Configuration] = None): return super().from_openapi_data_oapg(arg, _configuration=_configuration) - def __new__(cls, arg: typing.Union[typing.List[typing.Any], typing.Tuple[typing.Any]], **kwargs: Configuration): - return super().__new__(cls, arg, **kwargs) + def __new__(cls, _arg: typing.Union[typing.List[typing.Any], typing.Tuple[typing.Any]], **kwargs: Configuration): + return super().__new__(cls, _arg, **kwargs) class NoneSchema( @@ -2093,8 +2093,8 @@ class NoneSchema( def from_openapi_data_oapg(cls, arg: None, _configuration: typing.Optional[Configuration] = None): return super().from_openapi_data_oapg(arg, _configuration=_configuration) - def __new__(cls, arg: None, **kwargs: Configuration): - return super().__new__(cls, arg, **kwargs) + def __new__(cls, _arg: None, **kwargs: Configuration): + return super().__new__(cls, _arg, **kwargs) class NumberSchema( @@ -2111,8 +2111,8 @@ class NumberSchema( def from_openapi_data_oapg(cls, arg: typing.Union[int, float], _configuration: typing.Optional[Configuration] = None): return super().from_openapi_data_oapg(arg, _configuration=_configuration) - def __new__(cls, arg: typing.Union[decimal.Decimal, int, float], **kwargs: Configuration): - return super().__new__(cls, arg, **kwargs) + def __new__(cls, _arg: typing.Union[decimal.Decimal, int, float], **kwargs: Configuration): + return super().__new__(cls, _arg, **kwargs) class IntBase: @@ -2154,8 +2154,8 @@ class IntSchema(IntBase, NumberSchema): def from_openapi_data_oapg(cls, arg: int, _configuration: typing.Optional[Configuration] = None): return super().from_openapi_data_oapg(arg, _configuration=_configuration) - def __new__(cls, arg: typing.Union[decimal.Decimal, int], **kwargs: Configuration): - return super().__new__(cls, arg, **kwargs) + def __new__(cls, _arg: typing.Union[decimal.Decimal, int], **kwargs: Configuration): + return super().__new__(cls, _arg, **kwargs) class Int32Base: @@ -2308,31 +2308,31 @@ class StrSchema( def from_openapi_data_oapg(cls, arg: str, _configuration: typing.Optional[Configuration] = None) -> 'StrSchema': return super().from_openapi_data_oapg(arg, _configuration=_configuration) - def __new__(cls, arg: typing.Union[str, date, datetime, uuid.UUID], **kwargs: Configuration): - return super().__new__(cls, arg, **kwargs) + def __new__(cls, _arg: typing.Union[str, date, datetime, uuid.UUID], **kwargs: Configuration): + return super().__new__(cls, _arg, **kwargs) class UUIDSchema(UUIDBase, StrSchema): - def __new__(cls, arg: typing.Union[str, uuid.UUID], **kwargs: Configuration): - return super().__new__(cls, arg, **kwargs) + def __new__(cls, _arg: typing.Union[str, uuid.UUID], **kwargs: Configuration): + return super().__new__(cls, _arg, **kwargs) class DateSchema(DateBase, StrSchema): - def __new__(cls, arg: typing.Union[str, date], **kwargs: Configuration): - return super().__new__(cls, arg, **kwargs) + def __new__(cls, _arg: typing.Union[str, date], **kwargs: Configuration): + return super().__new__(cls, _arg, **kwargs) class DateTimeSchema(DateTimeBase, StrSchema): - def __new__(cls, arg: typing.Union[str, datetime], **kwargs: Configuration): - return super().__new__(cls, arg, **kwargs) + def __new__(cls, _arg: typing.Union[str, datetime], **kwargs: Configuration): + return super().__new__(cls, _arg, **kwargs) class DecimalSchema(DecimalBase, StrSchema): - def __new__(cls, arg: str, **kwargs: Configuration): + def __new__(cls, _arg: str, **kwargs: Configuration): """ Note: Decimals may not be passed in because cast_to_allowed_types is only invoked once for payloads which can be simple (str) or complex (dicts or lists with nested values) @@ -2341,7 +2341,7 @@ class DecimalSchema(DecimalBase, StrSchema): if one was using it for a StrSchema (where it should be cast to str) or one is using it for NumberSchema where it should stay as Decimal. """ - return super().__new__(cls, arg, **kwargs) + return super().__new__(cls, _arg, **kwargs) class BytesSchema( @@ -2351,8 +2351,8 @@ class BytesSchema( """ this class will subclass bytes and is immutable """ - def __new__(cls, arg: bytes, **kwargs: Configuration): - return super(Schema, cls).__new__(cls, arg) + def __new__(cls, _arg: bytes, **kwargs: Configuration): + return super(Schema, cls).__new__(cls, _arg) class FileSchema( @@ -2376,8 +2376,8 @@ class FileSchema( - to be able to preserve file name info """ - def __new__(cls, arg: typing.Union[io.FileIO, io.BufferedReader], **kwargs: Configuration): - return super(Schema, cls).__new__(cls, arg) + def __new__(cls, _arg: typing.Union[io.FileIO, io.BufferedReader], **kwargs: Configuration): + return super(Schema, cls).__new__(cls, _arg) class BinaryBase: @@ -2398,8 +2398,8 @@ class BinarySchema( FileSchema, ] - def __new__(cls, arg: typing.Union[io.FileIO, io.BufferedReader, bytes], **kwargs: Configuration): - return super().__new__(cls, arg) + def __new__(cls, _arg: typing.Union[io.FileIO, io.BufferedReader, bytes], **kwargs: Configuration): + return super().__new__(cls, _arg) class BoolSchema( @@ -2412,8 +2412,8 @@ class BoolSchema( def from_openapi_data_oapg(cls, arg: bool, _configuration: typing.Optional[Configuration] = None): return super().from_openapi_data_oapg(arg, _configuration=_configuration) - def __new__(cls, arg: bool, **kwargs: ValidationMetadata): - return super().__new__(cls, arg, **kwargs) + def __new__(cls, _arg: bool, **kwargs: ValidationMetadata): + return super().__new__(cls, _arg, **kwargs) class AnyTypeSchema( @@ -2449,12 +2449,12 @@ class NotAnyTypeSchema( def __new__( cls, - *args, + *_args, _configuration: typing.Optional[Configuration] = None, ) -> 'NotAnyTypeSchema': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, ) @@ -2468,8 +2468,8 @@ class DictSchema( def from_openapi_data_oapg(cls, arg: typing.Dict[str, typing.Any], _configuration: typing.Optional[Configuration] = None): return super().from_openapi_data_oapg(arg, _configuration=_configuration) - def __new__(cls, *args: typing.Union[dict, frozendict.frozendict], **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, bytes, Schema, Unset, ValidationMetadata]): - return super().__new__(cls, *args, **kwargs) + def __new__(cls, *_args: typing.Union[dict, frozendict.frozendict], **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, bytes, Schema, Unset, ValidationMetadata]): + return super().__new__(cls, *_args, **kwargs) schema_type_classes = {NoneSchema, DictSchema, ListSchema, NumberSchema, StrSchema, BoolSchema, AnyTypeSchema} diff --git a/modules/openapi-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml b/modules/openapi-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml index e5b0be9633..eb23278db4 100644 --- a/modules/openapi-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml @@ -2032,6 +2032,16 @@ components: - (xyz) - COUNT_1M - COUNT_50M + ObjectModelWithArgAndArgsProperties: + type: object + properties: + arg: + type: string + args: + type: string + required: + - arg + - args Enum_Test: type: object required: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_allows_a_schema_which_should_validate.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_allows_a_schema_which_should_validate.py index 66cc28eb41..9e581b19d8 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_allows_a_schema_which_should_validate.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_allows_a_schema_which_should_validate.py @@ -71,7 +71,7 @@ class AdditionalpropertiesAllowsASchemaWhichShouldValidate( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], foo: typing.Union[MetaOapg.properties.foo, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, bar: typing.Union[MetaOapg.properties.bar, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, @@ -79,7 +79,7 @@ class AdditionalpropertiesAllowsASchemaWhichShouldValidate( ) -> 'AdditionalpropertiesAllowsASchemaWhichShouldValidate': return super().__new__( cls, - *args, + *_args, foo=foo, bar=bar, _configuration=_configuration, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_allows_a_schema_which_should_validate.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_allows_a_schema_which_should_validate.pyi index 66cc28eb41..9e581b19d8 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_allows_a_schema_which_should_validate.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_allows_a_schema_which_should_validate.pyi @@ -71,7 +71,7 @@ class AdditionalpropertiesAllowsASchemaWhichShouldValidate( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], foo: typing.Union[MetaOapg.properties.foo, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, bar: typing.Union[MetaOapg.properties.bar, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, @@ -79,7 +79,7 @@ class AdditionalpropertiesAllowsASchemaWhichShouldValidate( ) -> 'AdditionalpropertiesAllowsASchemaWhichShouldValidate': return super().__new__( cls, - *args, + *_args, foo=foo, bar=bar, _configuration=_configuration, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_are_allowed_by_default.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_are_allowed_by_default.py index 273766346b..67bcff89af 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_are_allowed_by_default.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_are_allowed_by_default.py @@ -73,7 +73,7 @@ class AdditionalpropertiesAreAllowedByDefault( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], foo: typing.Union[MetaOapg.properties.foo, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, bar: typing.Union[MetaOapg.properties.bar, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, @@ -81,7 +81,7 @@ class AdditionalpropertiesAreAllowedByDefault( ) -> 'AdditionalpropertiesAreAllowedByDefault': return super().__new__( cls, - *args, + *_args, foo=foo, bar=bar, _configuration=_configuration, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_are_allowed_by_default.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_are_allowed_by_default.pyi index 273766346b..67bcff89af 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_are_allowed_by_default.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_are_allowed_by_default.pyi @@ -73,7 +73,7 @@ class AdditionalpropertiesAreAllowedByDefault( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], foo: typing.Union[MetaOapg.properties.foo, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, bar: typing.Union[MetaOapg.properties.bar, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, @@ -81,7 +81,7 @@ class AdditionalpropertiesAreAllowedByDefault( ) -> 'AdditionalpropertiesAreAllowedByDefault': return super().__new__( cls, - *args, + *_args, foo=foo, bar=bar, _configuration=_configuration, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_can_exist_by_itself.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_can_exist_by_itself.py index 6f57c6b4e8..9d86ab6eea 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_can_exist_by_itself.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_can_exist_by_itself.py @@ -45,13 +45,13 @@ class AdditionalpropertiesCanExistByItself( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[MetaOapg.additional_properties, bool, ], ) -> 'AdditionalpropertiesCanExistByItself': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_can_exist_by_itself.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_can_exist_by_itself.pyi index 6f57c6b4e8..9d86ab6eea 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_can_exist_by_itself.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_can_exist_by_itself.pyi @@ -45,13 +45,13 @@ class AdditionalpropertiesCanExistByItself( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[MetaOapg.additional_properties, bool, ], ) -> 'AdditionalpropertiesCanExistByItself': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_should_not_look_in_applicators.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_should_not_look_in_applicators.py index cabf9af560..629a345a67 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_should_not_look_in_applicators.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_should_not_look_in_applicators.py @@ -74,14 +74,14 @@ class AdditionalpropertiesShouldNotLookInApplicators( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], foo: typing.Union[MetaOapg.properties.foo, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'all_of_0': return super().__new__( cls, - *args, + *_args, foo=foo, _configuration=_configuration, **kwargs, @@ -111,13 +111,13 @@ class AdditionalpropertiesShouldNotLookInApplicators( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[MetaOapg.additional_properties, bool, ], ) -> 'AdditionalpropertiesShouldNotLookInApplicators': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_should_not_look_in_applicators.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_should_not_look_in_applicators.pyi index cabf9af560..629a345a67 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_should_not_look_in_applicators.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_should_not_look_in_applicators.pyi @@ -74,14 +74,14 @@ class AdditionalpropertiesShouldNotLookInApplicators( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], foo: typing.Union[MetaOapg.properties.foo, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'all_of_0': return super().__new__( cls, - *args, + *_args, foo=foo, _configuration=_configuration, **kwargs, @@ -111,13 +111,13 @@ class AdditionalpropertiesShouldNotLookInApplicators( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[MetaOapg.additional_properties, bool, ], ) -> 'AdditionalpropertiesShouldNotLookInApplicators': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof.py index 2e093c6cec..2c672855e2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof.py @@ -78,14 +78,14 @@ class Allof( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], bar: typing.Union[MetaOapg.properties.bar, decimal.Decimal, int, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'all_of_0': return super().__new__( cls, - *args, + *_args, bar=bar, _configuration=_configuration, **kwargs, @@ -134,14 +134,14 @@ class Allof( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], foo: typing.Union[MetaOapg.properties.foo, str, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'all_of_1': return super().__new__( cls, - *args, + *_args, foo=foo, _configuration=_configuration, **kwargs, @@ -165,13 +165,13 @@ class Allof( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'Allof': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof.pyi index 2e093c6cec..2c672855e2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof.pyi @@ -78,14 +78,14 @@ class Allof( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], bar: typing.Union[MetaOapg.properties.bar, decimal.Decimal, int, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'all_of_0': return super().__new__( cls, - *args, + *_args, bar=bar, _configuration=_configuration, **kwargs, @@ -134,14 +134,14 @@ class Allof( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], foo: typing.Union[MetaOapg.properties.foo, str, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'all_of_1': return super().__new__( cls, - *args, + *_args, foo=foo, _configuration=_configuration, **kwargs, @@ -165,13 +165,13 @@ class Allof( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'Allof': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_combined_with_anyof_oneof.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_combined_with_anyof_oneof.py index e40aab43eb..2ff1d34cf0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_combined_with_anyof_oneof.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_combined_with_anyof_oneof.py @@ -47,13 +47,13 @@ class AllofCombinedWithAnyofOneof( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'all_of_0': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -70,13 +70,13 @@ class AllofCombinedWithAnyofOneof( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'one_of_0': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -93,13 +93,13 @@ class AllofCombinedWithAnyofOneof( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'any_of_0': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -149,13 +149,13 @@ class AllofCombinedWithAnyofOneof( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'AllofCombinedWithAnyofOneof': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_combined_with_anyof_oneof.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_combined_with_anyof_oneof.pyi index bc7e2eaf6b..b9afb0232d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_combined_with_anyof_oneof.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_combined_with_anyof_oneof.pyi @@ -46,13 +46,13 @@ class AllofCombinedWithAnyofOneof( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'all_of_0': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -68,13 +68,13 @@ class AllofCombinedWithAnyofOneof( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'one_of_0': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -90,13 +90,13 @@ class AllofCombinedWithAnyofOneof( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'any_of_0': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -146,13 +146,13 @@ class AllofCombinedWithAnyofOneof( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'AllofCombinedWithAnyofOneof': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_simple_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_simple_types.py index da2bd54477..5ede861b17 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_simple_types.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_simple_types.py @@ -47,13 +47,13 @@ class AllofSimpleTypes( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'all_of_0': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -70,13 +70,13 @@ class AllofSimpleTypes( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'all_of_1': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -99,13 +99,13 @@ class AllofSimpleTypes( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'AllofSimpleTypes': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_simple_types.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_simple_types.pyi index ce96198a3e..709f757916 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_simple_types.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_simple_types.pyi @@ -46,13 +46,13 @@ class AllofSimpleTypes( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'all_of_0': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -68,13 +68,13 @@ class AllofSimpleTypes( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'all_of_1': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -97,13 +97,13 @@ class AllofSimpleTypes( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'AllofSimpleTypes': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_base_schema.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_base_schema.py index 6677ca50a7..a2d8ed50db 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_base_schema.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_base_schema.py @@ -87,14 +87,14 @@ class AllofWithBaseSchema( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], foo: typing.Union[MetaOapg.properties.foo, str, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'all_of_0': return super().__new__( cls, - *args, + *_args, foo=foo, _configuration=_configuration, **kwargs, @@ -143,14 +143,14 @@ class AllofWithBaseSchema( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], baz: typing.Union[MetaOapg.properties.baz, None, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'all_of_1': return super().__new__( cls, - *args, + *_args, baz=baz, _configuration=_configuration, **kwargs, @@ -197,14 +197,14 @@ class AllofWithBaseSchema( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], bar: typing.Union[MetaOapg.properties.bar, decimal.Decimal, int, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'AllofWithBaseSchema': return super().__new__( cls, - *args, + *_args, bar=bar, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_base_schema.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_base_schema.pyi index 6677ca50a7..a2d8ed50db 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_base_schema.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_base_schema.pyi @@ -87,14 +87,14 @@ class AllofWithBaseSchema( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], foo: typing.Union[MetaOapg.properties.foo, str, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'all_of_0': return super().__new__( cls, - *args, + *_args, foo=foo, _configuration=_configuration, **kwargs, @@ -143,14 +143,14 @@ class AllofWithBaseSchema( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], baz: typing.Union[MetaOapg.properties.baz, None, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'all_of_1': return super().__new__( cls, - *args, + *_args, baz=baz, _configuration=_configuration, **kwargs, @@ -197,14 +197,14 @@ class AllofWithBaseSchema( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], bar: typing.Union[MetaOapg.properties.bar, decimal.Decimal, int, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'AllofWithBaseSchema': return super().__new__( cls, - *args, + *_args, bar=bar, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_one_empty_schema.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_one_empty_schema.py index ccdf6237db..66d64a6d84 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_one_empty_schema.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_one_empty_schema.py @@ -53,13 +53,13 @@ class AllofWithOneEmptySchema( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'AllofWithOneEmptySchema': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_one_empty_schema.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_one_empty_schema.pyi index ccdf6237db..66d64a6d84 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_one_empty_schema.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_one_empty_schema.pyi @@ -53,13 +53,13 @@ class AllofWithOneEmptySchema( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'AllofWithOneEmptySchema': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_the_first_empty_schema.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_the_first_empty_schema.py index ca512486cf..d4e8af5a1e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_the_first_empty_schema.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_the_first_empty_schema.py @@ -55,13 +55,13 @@ class AllofWithTheFirstEmptySchema( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'AllofWithTheFirstEmptySchema': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_the_first_empty_schema.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_the_first_empty_schema.pyi index ca512486cf..d4e8af5a1e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_the_first_empty_schema.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_the_first_empty_schema.pyi @@ -55,13 +55,13 @@ class AllofWithTheFirstEmptySchema( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'AllofWithTheFirstEmptySchema': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_the_last_empty_schema.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_the_last_empty_schema.py index d243c83104..18a96eca19 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_the_last_empty_schema.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_the_last_empty_schema.py @@ -55,13 +55,13 @@ class AllofWithTheLastEmptySchema( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'AllofWithTheLastEmptySchema': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_the_last_empty_schema.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_the_last_empty_schema.pyi index d243c83104..18a96eca19 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_the_last_empty_schema.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_the_last_empty_schema.pyi @@ -55,13 +55,13 @@ class AllofWithTheLastEmptySchema( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'AllofWithTheLastEmptySchema': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_two_empty_schemas.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_two_empty_schemas.py index 0ee8f8a324..ba5f5783b2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_two_empty_schemas.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_two_empty_schemas.py @@ -55,13 +55,13 @@ class AllofWithTwoEmptySchemas( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'AllofWithTwoEmptySchemas': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_two_empty_schemas.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_two_empty_schemas.pyi index 0ee8f8a324..ba5f5783b2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_two_empty_schemas.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_two_empty_schemas.pyi @@ -55,13 +55,13 @@ class AllofWithTwoEmptySchemas( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'AllofWithTwoEmptySchemas': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof.py index fe69e48143..3792ff6b58 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof.py @@ -48,13 +48,13 @@ class Anyof( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'any_of_1': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -77,13 +77,13 @@ class Anyof( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'Anyof': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof.pyi index d2bf4a03d2..9cc5c73fd2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof.pyi @@ -47,13 +47,13 @@ class Anyof( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'any_of_1': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -76,13 +76,13 @@ class Anyof( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'Anyof': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof_complex_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof_complex_types.py index 6e0b801eef..6bf61e0e75 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof_complex_types.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof_complex_types.py @@ -78,14 +78,14 @@ class AnyofComplexTypes( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], bar: typing.Union[MetaOapg.properties.bar, decimal.Decimal, int, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'any_of_0': return super().__new__( cls, - *args, + *_args, bar=bar, _configuration=_configuration, **kwargs, @@ -134,14 +134,14 @@ class AnyofComplexTypes( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], foo: typing.Union[MetaOapg.properties.foo, str, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'any_of_1': return super().__new__( cls, - *args, + *_args, foo=foo, _configuration=_configuration, **kwargs, @@ -165,13 +165,13 @@ class AnyofComplexTypes( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'AnyofComplexTypes': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof_complex_types.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof_complex_types.pyi index 6e0b801eef..6bf61e0e75 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof_complex_types.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof_complex_types.pyi @@ -78,14 +78,14 @@ class AnyofComplexTypes( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], bar: typing.Union[MetaOapg.properties.bar, decimal.Decimal, int, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'any_of_0': return super().__new__( cls, - *args, + *_args, bar=bar, _configuration=_configuration, **kwargs, @@ -134,14 +134,14 @@ class AnyofComplexTypes( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], foo: typing.Union[MetaOapg.properties.foo, str, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'any_of_1': return super().__new__( cls, - *args, + *_args, foo=foo, _configuration=_configuration, **kwargs, @@ -165,13 +165,13 @@ class AnyofComplexTypes( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'AnyofComplexTypes': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof_with_base_schema.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof_with_base_schema.py index a310a33c9d..281e1fe4df 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof_with_base_schema.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof_with_base_schema.py @@ -48,13 +48,13 @@ class AnyofWithBaseSchema( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'any_of_0': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -71,13 +71,13 @@ class AnyofWithBaseSchema( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'any_of_1': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -100,11 +100,11 @@ class AnyofWithBaseSchema( def __new__( cls, - *args: typing.Union[str, ], + *_args: typing.Union[str, ], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'AnyofWithBaseSchema': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof_with_base_schema.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof_with_base_schema.pyi index 65862600d5..3f1b667bca 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof_with_base_schema.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof_with_base_schema.pyi @@ -47,13 +47,13 @@ class AnyofWithBaseSchema( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'any_of_0': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -69,13 +69,13 @@ class AnyofWithBaseSchema( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'any_of_1': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -98,11 +98,11 @@ class AnyofWithBaseSchema( def __new__( cls, - *args: typing.Union[str, ], + *_args: typing.Union[str, ], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'AnyofWithBaseSchema': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof_with_one_empty_schema.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof_with_one_empty_schema.py index 117c0374aa..a7c4a89c9d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof_with_one_empty_schema.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof_with_one_empty_schema.py @@ -55,13 +55,13 @@ class AnyofWithOneEmptySchema( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'AnyofWithOneEmptySchema': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof_with_one_empty_schema.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof_with_one_empty_schema.pyi index 117c0374aa..a7c4a89c9d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof_with_one_empty_schema.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof_with_one_empty_schema.pyi @@ -55,13 +55,13 @@ class AnyofWithOneEmptySchema( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'AnyofWithOneEmptySchema': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/array_type_matches_arrays.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/array_type_matches_arrays.py index 7c6cc33a3d..1d3739deba 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/array_type_matches_arrays.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/array_type_matches_arrays.py @@ -38,12 +38,12 @@ class ArrayTypeMatchesArrays( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'ArrayTypeMatchesArrays': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/array_type_matches_arrays.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/array_type_matches_arrays.pyi index 7c6cc33a3d..1d3739deba 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/array_type_matches_arrays.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/array_type_matches_arrays.pyi @@ -38,12 +38,12 @@ class ArrayTypeMatchesArrays( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'ArrayTypeMatchesArrays': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/by_int.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/by_int.py index 76988d6593..916ccf4c8f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/by_int.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/by_int.py @@ -39,13 +39,13 @@ class ByInt( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'ByInt': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/by_int.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/by_int.pyi index d93f787d68..1ade1d20fc 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/by_int.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/by_int.pyi @@ -38,13 +38,13 @@ class ByInt( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'ByInt': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/by_number.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/by_number.py index 184acb97b7..c6c7b904e2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/by_number.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/by_number.py @@ -39,13 +39,13 @@ class ByNumber( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'ByNumber': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/by_number.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/by_number.pyi index 1a082d5d3e..5e0068ad3f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/by_number.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/by_number.pyi @@ -38,13 +38,13 @@ class ByNumber( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'ByNumber': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/by_small_number.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/by_small_number.py index 426ee59b91..7708e25f2a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/by_small_number.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/by_small_number.py @@ -39,13 +39,13 @@ class BySmallNumber( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'BySmallNumber': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/by_small_number.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/by_small_number.pyi index 95da8644ea..c7658f0e2e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/by_small_number.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/by_small_number.pyi @@ -38,13 +38,13 @@ class BySmallNumber( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'BySmallNumber': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/date_time_format.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/date_time_format.py index 9fed78c490..3004856abd 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/date_time_format.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/date_time_format.py @@ -40,13 +40,13 @@ class DateTimeFormat( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'DateTimeFormat': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/date_time_format.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/date_time_format.pyi index 9fed78c490..3004856abd 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/date_time_format.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/date_time_format.pyi @@ -40,13 +40,13 @@ class DateTimeFormat( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'DateTimeFormat': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/email_format.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/email_format.py index 8a3fa4bbab..cd12884a05 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/email_format.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/email_format.py @@ -39,13 +39,13 @@ class EmailFormat( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'EmailFormat': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/email_format.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/email_format.pyi index 8a3fa4bbab..cd12884a05 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/email_format.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/email_format.pyi @@ -39,13 +39,13 @@ class EmailFormat( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'EmailFormat': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/enums_in_properties.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/enums_in_properties.py index 0010f712ab..049126041d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/enums_in_properties.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/enums_in_properties.py @@ -107,7 +107,7 @@ class EnumsInProperties( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], bar: typing.Union[MetaOapg.properties.bar, str, ], foo: typing.Union[MetaOapg.properties.foo, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, @@ -115,7 +115,7 @@ class EnumsInProperties( ) -> 'EnumsInProperties': return super().__new__( cls, - *args, + *_args, bar=bar, foo=foo, _configuration=_configuration, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/enums_in_properties.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/enums_in_properties.pyi index d45a82aad0..b6a1914124 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/enums_in_properties.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/enums_in_properties.pyi @@ -95,7 +95,7 @@ class EnumsInProperties( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], bar: typing.Union[MetaOapg.properties.bar, str, ], foo: typing.Union[MetaOapg.properties.foo, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, @@ -103,7 +103,7 @@ class EnumsInProperties( ) -> 'EnumsInProperties': return super().__new__( cls, - *args, + *_args, bar=bar, foo=foo, _configuration=_configuration, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/forbidden_property.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/forbidden_property.py index b81f17e5b1..7e30cfceb3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/forbidden_property.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/forbidden_property.py @@ -65,14 +65,14 @@ class ForbiddenProperty( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], foo: typing.Union[MetaOapg.properties.foo, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'ForbiddenProperty': return super().__new__( cls, - *args, + *_args, foo=foo, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/forbidden_property.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/forbidden_property.pyi index b81f17e5b1..7e30cfceb3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/forbidden_property.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/forbidden_property.pyi @@ -65,14 +65,14 @@ class ForbiddenProperty( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], foo: typing.Union[MetaOapg.properties.foo, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'ForbiddenProperty': return super().__new__( cls, - *args, + *_args, foo=foo, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/hostname_format.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/hostname_format.py index 40942f67b8..d63fc48311 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/hostname_format.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/hostname_format.py @@ -39,13 +39,13 @@ class HostnameFormat( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'HostnameFormat': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/hostname_format.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/hostname_format.pyi index 40942f67b8..d63fc48311 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/hostname_format.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/hostname_format.pyi @@ -39,13 +39,13 @@ class HostnameFormat( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'HostnameFormat': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/invalid_string_value_for_default.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/invalid_string_value_for_default.py index 4752986369..badf060b3a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/invalid_string_value_for_default.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/invalid_string_value_for_default.py @@ -73,14 +73,14 @@ class InvalidStringValueForDefault( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], bar: typing.Union[MetaOapg.properties.bar, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'InvalidStringValueForDefault': return super().__new__( cls, - *args, + *_args, bar=bar, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/invalid_string_value_for_default.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/invalid_string_value_for_default.pyi index 7ab2145d29..4ade4dce93 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/invalid_string_value_for_default.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/invalid_string_value_for_default.pyi @@ -70,14 +70,14 @@ class InvalidStringValueForDefault( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], bar: typing.Union[MetaOapg.properties.bar, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'InvalidStringValueForDefault': return super().__new__( cls, - *args, + *_args, bar=bar, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ipv4_format.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ipv4_format.py index 0eae025a87..89b1ccc1ca 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ipv4_format.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ipv4_format.py @@ -39,13 +39,13 @@ class Ipv4Format( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'Ipv4Format': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ipv4_format.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ipv4_format.pyi index 0eae025a87..89b1ccc1ca 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ipv4_format.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ipv4_format.pyi @@ -39,13 +39,13 @@ class Ipv4Format( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'Ipv4Format': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ipv6_format.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ipv6_format.py index 23a8aa658d..a33fc23d78 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ipv6_format.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ipv6_format.py @@ -39,13 +39,13 @@ class Ipv6Format( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'Ipv6Format': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ipv6_format.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ipv6_format.pyi index 23a8aa658d..a33fc23d78 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ipv6_format.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ipv6_format.pyi @@ -39,13 +39,13 @@ class Ipv6Format( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'Ipv6Format': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/json_pointer_format.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/json_pointer_format.py index ddbc508423..b7f7798cfe 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/json_pointer_format.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/json_pointer_format.py @@ -39,13 +39,13 @@ class JsonPointerFormat( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'JsonPointerFormat': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/json_pointer_format.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/json_pointer_format.pyi index ddbc508423..b7f7798cfe 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/json_pointer_format.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/json_pointer_format.pyi @@ -39,13 +39,13 @@ class JsonPointerFormat( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'JsonPointerFormat': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maximum_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maximum_validation.py index 5a992b87f0..2c02065c5e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maximum_validation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maximum_validation.py @@ -39,13 +39,13 @@ class MaximumValidation( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'MaximumValidation': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maximum_validation.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maximum_validation.pyi index f0f3010b94..fb94c3a96d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maximum_validation.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maximum_validation.pyi @@ -38,13 +38,13 @@ class MaximumValidation( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'MaximumValidation': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maximum_validation_with_unsigned_integer.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maximum_validation_with_unsigned_integer.py index dc28bf37f3..e2bd6d9c82 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maximum_validation_with_unsigned_integer.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maximum_validation_with_unsigned_integer.py @@ -39,13 +39,13 @@ class MaximumValidationWithUnsignedInteger( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'MaximumValidationWithUnsignedInteger': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maximum_validation_with_unsigned_integer.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maximum_validation_with_unsigned_integer.pyi index 223cf29f83..af52478419 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maximum_validation_with_unsigned_integer.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maximum_validation_with_unsigned_integer.pyi @@ -38,13 +38,13 @@ class MaximumValidationWithUnsignedInteger( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'MaximumValidationWithUnsignedInteger': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxitems_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxitems_validation.py index de40bec0b0..2c2d296451 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxitems_validation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxitems_validation.py @@ -39,13 +39,13 @@ class MaxitemsValidation( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'MaxitemsValidation': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxitems_validation.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxitems_validation.pyi index 7c0a10e4fb..ee591cf4ac 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxitems_validation.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxitems_validation.pyi @@ -38,13 +38,13 @@ class MaxitemsValidation( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'MaxitemsValidation': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxlength_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxlength_validation.py index c34f02ea11..9e8bbff567 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxlength_validation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxlength_validation.py @@ -39,13 +39,13 @@ class MaxlengthValidation( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'MaxlengthValidation': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxlength_validation.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxlength_validation.pyi index 1ed6a96b36..f1d4241ab9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxlength_validation.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxlength_validation.pyi @@ -38,13 +38,13 @@ class MaxlengthValidation( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'MaxlengthValidation': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxproperties0_means_the_object_is_empty.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxproperties0_means_the_object_is_empty.py index 24dd02220f..78c925c92d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxproperties0_means_the_object_is_empty.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxproperties0_means_the_object_is_empty.py @@ -39,13 +39,13 @@ class Maxproperties0MeansTheObjectIsEmpty( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'Maxproperties0MeansTheObjectIsEmpty': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxproperties0_means_the_object_is_empty.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxproperties0_means_the_object_is_empty.pyi index 82013206b8..2d26e8f679 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxproperties0_means_the_object_is_empty.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxproperties0_means_the_object_is_empty.pyi @@ -38,13 +38,13 @@ class Maxproperties0MeansTheObjectIsEmpty( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'Maxproperties0MeansTheObjectIsEmpty': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxproperties_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxproperties_validation.py index 2adf12f750..0c29fe0428 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxproperties_validation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxproperties_validation.py @@ -39,13 +39,13 @@ class MaxpropertiesValidation( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'MaxpropertiesValidation': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxproperties_validation.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxproperties_validation.pyi index 4252e69a43..9f60d59043 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxproperties_validation.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxproperties_validation.pyi @@ -38,13 +38,13 @@ class MaxpropertiesValidation( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'MaxpropertiesValidation': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minimum_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minimum_validation.py index 6409f72d48..82c4ace13f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minimum_validation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minimum_validation.py @@ -39,13 +39,13 @@ class MinimumValidation( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'MinimumValidation': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minimum_validation.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minimum_validation.pyi index a96f7db6e3..9643ac0424 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minimum_validation.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minimum_validation.pyi @@ -38,13 +38,13 @@ class MinimumValidation( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'MinimumValidation': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minimum_validation_with_signed_integer.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minimum_validation_with_signed_integer.py index 73e0b2613d..1e4729e990 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minimum_validation_with_signed_integer.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minimum_validation_with_signed_integer.py @@ -39,13 +39,13 @@ class MinimumValidationWithSignedInteger( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'MinimumValidationWithSignedInteger': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minimum_validation_with_signed_integer.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minimum_validation_with_signed_integer.pyi index c57929021a..298bf570df 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minimum_validation_with_signed_integer.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minimum_validation_with_signed_integer.pyi @@ -38,13 +38,13 @@ class MinimumValidationWithSignedInteger( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'MinimumValidationWithSignedInteger': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minitems_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minitems_validation.py index 2ae9925d45..af50bd074f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minitems_validation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minitems_validation.py @@ -39,13 +39,13 @@ class MinitemsValidation( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'MinitemsValidation': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minitems_validation.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minitems_validation.pyi index d84e653cfc..23864e2ce9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minitems_validation.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minitems_validation.pyi @@ -38,13 +38,13 @@ class MinitemsValidation( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'MinitemsValidation': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minlength_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minlength_validation.py index acd0d6d892..d83ad8cb67 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minlength_validation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minlength_validation.py @@ -39,13 +39,13 @@ class MinlengthValidation( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'MinlengthValidation': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minlength_validation.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minlength_validation.pyi index 7e633c88ee..d69c6fcea9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minlength_validation.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minlength_validation.pyi @@ -38,13 +38,13 @@ class MinlengthValidation( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'MinlengthValidation': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minproperties_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minproperties_validation.py index ebc2b1db51..5e032e7f09 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minproperties_validation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minproperties_validation.py @@ -39,13 +39,13 @@ class MinpropertiesValidation( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'MinpropertiesValidation': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minproperties_validation.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minproperties_validation.pyi index ea06a20b31..ff14e068f9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minproperties_validation.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minproperties_validation.pyi @@ -38,13 +38,13 @@ class MinpropertiesValidation( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'MinpropertiesValidation': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/model_not.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/model_not.py index 317bddb0d8..fb8e10a029 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/model_not.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/model_not.py @@ -39,13 +39,13 @@ class ModelNot( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'ModelNot': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/model_not.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/model_not.pyi index 317bddb0d8..fb8e10a029 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/model_not.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/model_not.pyi @@ -39,13 +39,13 @@ class ModelNot( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'ModelNot': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_allof_to_check_validation_semantics.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_allof_to_check_validation_semantics.py index f6f8069357..a948721b22 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_allof_to_check_validation_semantics.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_allof_to_check_validation_semantics.py @@ -61,13 +61,13 @@ class NestedAllofToCheckValidationSemantics( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'all_of_0': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -89,13 +89,13 @@ class NestedAllofToCheckValidationSemantics( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'NestedAllofToCheckValidationSemantics': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_allof_to_check_validation_semantics.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_allof_to_check_validation_semantics.pyi index f6f8069357..a948721b22 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_allof_to_check_validation_semantics.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_allof_to_check_validation_semantics.pyi @@ -61,13 +61,13 @@ class NestedAllofToCheckValidationSemantics( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'all_of_0': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -89,13 +89,13 @@ class NestedAllofToCheckValidationSemantics( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'NestedAllofToCheckValidationSemantics': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_anyof_to_check_validation_semantics.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_anyof_to_check_validation_semantics.py index 65ae3adef0..28e998bbd2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_anyof_to_check_validation_semantics.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_anyof_to_check_validation_semantics.py @@ -61,13 +61,13 @@ class NestedAnyofToCheckValidationSemantics( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'any_of_0': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -89,13 +89,13 @@ class NestedAnyofToCheckValidationSemantics( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'NestedAnyofToCheckValidationSemantics': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_anyof_to_check_validation_semantics.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_anyof_to_check_validation_semantics.pyi index 65ae3adef0..28e998bbd2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_anyof_to_check_validation_semantics.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_anyof_to_check_validation_semantics.pyi @@ -61,13 +61,13 @@ class NestedAnyofToCheckValidationSemantics( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'any_of_0': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -89,13 +89,13 @@ class NestedAnyofToCheckValidationSemantics( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'NestedAnyofToCheckValidationSemantics': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_items.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_items.py index 36f1aad97f..5300883011 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_items.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_items.py @@ -62,12 +62,12 @@ class NestedItems( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, decimal.Decimal, int, float, ]], typing.List[typing.Union[MetaOapg.items, decimal.Decimal, int, float, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, decimal.Decimal, int, float, ]], typing.List[typing.Union[MetaOapg.items, decimal.Decimal, int, float, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'items': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -76,12 +76,12 @@ class NestedItems( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, list, tuple, ]], typing.List[typing.Union[MetaOapg.items, list, tuple, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, list, tuple, ]], typing.List[typing.Union[MetaOapg.items, list, tuple, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'items': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -90,12 +90,12 @@ class NestedItems( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, list, tuple, ]], typing.List[typing.Union[MetaOapg.items, list, tuple, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, list, tuple, ]], typing.List[typing.Union[MetaOapg.items, list, tuple, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'items': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -104,12 +104,12 @@ class NestedItems( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, list, tuple, ]], typing.List[typing.Union[MetaOapg.items, list, tuple, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, list, tuple, ]], typing.List[typing.Union[MetaOapg.items, list, tuple, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'NestedItems': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_items.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_items.pyi index 36f1aad97f..5300883011 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_items.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_items.pyi @@ -62,12 +62,12 @@ class NestedItems( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, decimal.Decimal, int, float, ]], typing.List[typing.Union[MetaOapg.items, decimal.Decimal, int, float, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, decimal.Decimal, int, float, ]], typing.List[typing.Union[MetaOapg.items, decimal.Decimal, int, float, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'items': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -76,12 +76,12 @@ class NestedItems( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, list, tuple, ]], typing.List[typing.Union[MetaOapg.items, list, tuple, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, list, tuple, ]], typing.List[typing.Union[MetaOapg.items, list, tuple, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'items': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -90,12 +90,12 @@ class NestedItems( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, list, tuple, ]], typing.List[typing.Union[MetaOapg.items, list, tuple, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, list, tuple, ]], typing.List[typing.Union[MetaOapg.items, list, tuple, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'items': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -104,12 +104,12 @@ class NestedItems( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, list, tuple, ]], typing.List[typing.Union[MetaOapg.items, list, tuple, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, list, tuple, ]], typing.List[typing.Union[MetaOapg.items, list, tuple, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'NestedItems': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_oneof_to_check_validation_semantics.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_oneof_to_check_validation_semantics.py index ebede9469d..4e855cfc08 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_oneof_to_check_validation_semantics.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_oneof_to_check_validation_semantics.py @@ -61,13 +61,13 @@ class NestedOneofToCheckValidationSemantics( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'one_of_0': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -89,13 +89,13 @@ class NestedOneofToCheckValidationSemantics( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'NestedOneofToCheckValidationSemantics': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_oneof_to_check_validation_semantics.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_oneof_to_check_validation_semantics.pyi index ebede9469d..4e855cfc08 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_oneof_to_check_validation_semantics.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_oneof_to_check_validation_semantics.pyi @@ -61,13 +61,13 @@ class NestedOneofToCheckValidationSemantics( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'one_of_0': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -89,13 +89,13 @@ class NestedOneofToCheckValidationSemantics( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'NestedOneofToCheckValidationSemantics': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/not_more_complex_schema.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/not_more_complex_schema.py index f04fa2d4d9..111590e7b3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/not_more_complex_schema.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/not_more_complex_schema.py @@ -72,14 +72,14 @@ class NotMoreComplexSchema( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], foo: typing.Union[MetaOapg.properties.foo, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'not_schema': return super().__new__( cls, - *args, + *_args, foo=foo, _configuration=_configuration, **kwargs, @@ -88,13 +88,13 @@ class NotMoreComplexSchema( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'NotMoreComplexSchema': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/not_more_complex_schema.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/not_more_complex_schema.pyi index f04fa2d4d9..111590e7b3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/not_more_complex_schema.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/not_more_complex_schema.pyi @@ -72,14 +72,14 @@ class NotMoreComplexSchema( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], foo: typing.Union[MetaOapg.properties.foo, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'not_schema': return super().__new__( cls, - *args, + *_args, foo=foo, _configuration=_configuration, **kwargs, @@ -88,13 +88,13 @@ class NotMoreComplexSchema( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'NotMoreComplexSchema': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/object_properties_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/object_properties_validation.py index d74b394f06..d5e7c6cf93 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/object_properties_validation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/object_properties_validation.py @@ -73,7 +73,7 @@ class ObjectPropertiesValidation( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], foo: typing.Union[MetaOapg.properties.foo, decimal.Decimal, int, schemas.Unset] = schemas.unset, bar: typing.Union[MetaOapg.properties.bar, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, @@ -81,7 +81,7 @@ class ObjectPropertiesValidation( ) -> 'ObjectPropertiesValidation': return super().__new__( cls, - *args, + *_args, foo=foo, bar=bar, _configuration=_configuration, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/object_properties_validation.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/object_properties_validation.pyi index d74b394f06..d5e7c6cf93 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/object_properties_validation.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/object_properties_validation.pyi @@ -73,7 +73,7 @@ class ObjectPropertiesValidation( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], foo: typing.Union[MetaOapg.properties.foo, decimal.Decimal, int, schemas.Unset] = schemas.unset, bar: typing.Union[MetaOapg.properties.bar, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, @@ -81,7 +81,7 @@ class ObjectPropertiesValidation( ) -> 'ObjectPropertiesValidation': return super().__new__( cls, - *args, + *_args, foo=foo, bar=bar, _configuration=_configuration, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof.py index 072f28a7fb..3b54b5a2ec 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof.py @@ -48,13 +48,13 @@ class Oneof( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'one_of_1': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -77,13 +77,13 @@ class Oneof( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'Oneof': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof.pyi index fcf3fb1022..f896a11c67 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof.pyi @@ -47,13 +47,13 @@ class Oneof( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'one_of_1': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -76,13 +76,13 @@ class Oneof( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'Oneof': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_complex_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_complex_types.py index b38b5751a7..3867b8e3d0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_complex_types.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_complex_types.py @@ -78,14 +78,14 @@ class OneofComplexTypes( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], bar: typing.Union[MetaOapg.properties.bar, decimal.Decimal, int, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'one_of_0': return super().__new__( cls, - *args, + *_args, bar=bar, _configuration=_configuration, **kwargs, @@ -134,14 +134,14 @@ class OneofComplexTypes( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], foo: typing.Union[MetaOapg.properties.foo, str, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'one_of_1': return super().__new__( cls, - *args, + *_args, foo=foo, _configuration=_configuration, **kwargs, @@ -165,13 +165,13 @@ class OneofComplexTypes( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'OneofComplexTypes': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_complex_types.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_complex_types.pyi index b38b5751a7..3867b8e3d0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_complex_types.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_complex_types.pyi @@ -78,14 +78,14 @@ class OneofComplexTypes( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], bar: typing.Union[MetaOapg.properties.bar, decimal.Decimal, int, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'one_of_0': return super().__new__( cls, - *args, + *_args, bar=bar, _configuration=_configuration, **kwargs, @@ -134,14 +134,14 @@ class OneofComplexTypes( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], foo: typing.Union[MetaOapg.properties.foo, str, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'one_of_1': return super().__new__( cls, - *args, + *_args, foo=foo, _configuration=_configuration, **kwargs, @@ -165,13 +165,13 @@ class OneofComplexTypes( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'OneofComplexTypes': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_with_base_schema.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_with_base_schema.py index 343181f846..bc743b5221 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_with_base_schema.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_with_base_schema.py @@ -48,13 +48,13 @@ class OneofWithBaseSchema( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'one_of_0': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -71,13 +71,13 @@ class OneofWithBaseSchema( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'one_of_1': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -100,11 +100,11 @@ class OneofWithBaseSchema( def __new__( cls, - *args: typing.Union[str, ], + *_args: typing.Union[str, ], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'OneofWithBaseSchema': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_with_base_schema.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_with_base_schema.pyi index dbd9a7fdf3..4d521f17ab 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_with_base_schema.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_with_base_schema.pyi @@ -47,13 +47,13 @@ class OneofWithBaseSchema( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'one_of_0': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -69,13 +69,13 @@ class OneofWithBaseSchema( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'one_of_1': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -98,11 +98,11 @@ class OneofWithBaseSchema( def __new__( cls, - *args: typing.Union[str, ], + *_args: typing.Union[str, ], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'OneofWithBaseSchema': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_with_empty_schema.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_with_empty_schema.py index d0339f57ed..6c106531e0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_with_empty_schema.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_with_empty_schema.py @@ -55,13 +55,13 @@ class OneofWithEmptySchema( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'OneofWithEmptySchema': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_with_empty_schema.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_with_empty_schema.pyi index d0339f57ed..6c106531e0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_with_empty_schema.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_with_empty_schema.pyi @@ -55,13 +55,13 @@ class OneofWithEmptySchema( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'OneofWithEmptySchema': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_with_required.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_with_required.py index 06bb23edda..65e3c48bd5 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_with_required.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_with_required.py @@ -54,13 +54,13 @@ class OneofWithRequired( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'one_of_0': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -83,13 +83,13 @@ class OneofWithRequired( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'one_of_1': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -112,13 +112,13 @@ class OneofWithRequired( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'OneofWithRequired': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_with_required.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_with_required.pyi index 06bb23edda..65e3c48bd5 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_with_required.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_with_required.pyi @@ -54,13 +54,13 @@ class OneofWithRequired( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'one_of_0': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -83,13 +83,13 @@ class OneofWithRequired( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'one_of_1': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -112,13 +112,13 @@ class OneofWithRequired( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'OneofWithRequired': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/pattern_is_not_anchored.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/pattern_is_not_anchored.py index 48773cbbe5..c28ee2c4e9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/pattern_is_not_anchored.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/pattern_is_not_anchored.py @@ -41,13 +41,13 @@ class PatternIsNotAnchored( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'PatternIsNotAnchored': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/pattern_is_not_anchored.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/pattern_is_not_anchored.pyi index d4c18e7fc2..23cf254031 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/pattern_is_not_anchored.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/pattern_is_not_anchored.pyi @@ -38,13 +38,13 @@ class PatternIsNotAnchored( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'PatternIsNotAnchored': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/pattern_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/pattern_validation.py index 49594057cf..6c35cf6a75 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/pattern_validation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/pattern_validation.py @@ -41,13 +41,13 @@ class PatternValidation( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'PatternValidation': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/pattern_validation.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/pattern_validation.pyi index a2fb9d02f1..c0b53bd013 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/pattern_validation.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/pattern_validation.pyi @@ -38,13 +38,13 @@ class PatternValidation( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'PatternValidation': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/properties_with_escaped_characters.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/properties_with_escaped_characters.py index 7c73a200e5..cac2e048c9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/properties_with_escaped_characters.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/properties_with_escaped_characters.py @@ -105,13 +105,13 @@ class PropertiesWithEscapedCharacters( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'PropertiesWithEscapedCharacters': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/properties_with_escaped_characters.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/properties_with_escaped_characters.pyi index 7c73a200e5..cac2e048c9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/properties_with_escaped_characters.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/properties_with_escaped_characters.pyi @@ -105,13 +105,13 @@ class PropertiesWithEscapedCharacters( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'PropertiesWithEscapedCharacters': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/property_named_ref_that_is_not_a_reference.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/property_named_ref_that_is_not_a_reference.py index 344414e9cc..45e0df4506 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/property_named_ref_that_is_not_a_reference.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/property_named_ref_that_is_not_a_reference.py @@ -65,13 +65,13 @@ class PropertyNamedRefThatIsNotAReference( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'PropertyNamedRefThatIsNotAReference': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/property_named_ref_that_is_not_a_reference.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/property_named_ref_that_is_not_a_reference.pyi index 344414e9cc..45e0df4506 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/property_named_ref_that_is_not_a_reference.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/property_named_ref_that_is_not_a_reference.pyi @@ -65,13 +65,13 @@ class PropertyNamedRefThatIsNotAReference( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'PropertyNamedRefThatIsNotAReference': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_additionalproperties.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_additionalproperties.py index a15df31054..5ae9aeffff 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_additionalproperties.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_additionalproperties.py @@ -48,13 +48,13 @@ class RefInAdditionalproperties( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: 'PropertyNamedRefThatIsNotAReference', ) -> 'RefInAdditionalproperties': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_additionalproperties.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_additionalproperties.pyi index a15df31054..5ae9aeffff 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_additionalproperties.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_additionalproperties.pyi @@ -48,13 +48,13 @@ class RefInAdditionalproperties( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: 'PropertyNamedRefThatIsNotAReference', ) -> 'RefInAdditionalproperties': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_allof.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_allof.py index 979c66540f..0fad528f4d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_allof.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_allof.py @@ -52,13 +52,13 @@ class RefInAllof( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'RefInAllof': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_allof.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_allof.pyi index 979c66540f..0fad528f4d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_allof.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_allof.pyi @@ -52,13 +52,13 @@ class RefInAllof( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'RefInAllof': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_anyof.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_anyof.py index df7546c1c2..f7ce71a11a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_anyof.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_anyof.py @@ -52,13 +52,13 @@ class RefInAnyof( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'RefInAnyof': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_anyof.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_anyof.pyi index df7546c1c2..f7ce71a11a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_anyof.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_anyof.pyi @@ -52,13 +52,13 @@ class RefInAnyof( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'RefInAnyof': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_items.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_items.py index 73663ab9c0..664bc90905 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_items.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_items.py @@ -41,12 +41,12 @@ class RefInItems( def __new__( cls, - arg: typing.Union[typing.Tuple['PropertyNamedRefThatIsNotAReference'], typing.List['PropertyNamedRefThatIsNotAReference']], + _arg: typing.Union[typing.Tuple['PropertyNamedRefThatIsNotAReference'], typing.List['PropertyNamedRefThatIsNotAReference']], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'RefInItems': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_items.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_items.pyi index 73663ab9c0..664bc90905 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_items.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_items.pyi @@ -41,12 +41,12 @@ class RefInItems( def __new__( cls, - arg: typing.Union[typing.Tuple['PropertyNamedRefThatIsNotAReference'], typing.List['PropertyNamedRefThatIsNotAReference']], + _arg: typing.Union[typing.Tuple['PropertyNamedRefThatIsNotAReference'], typing.List['PropertyNamedRefThatIsNotAReference']], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'RefInItems': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_not.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_not.py index b1362b851a..b8c574e16b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_not.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_not.py @@ -42,13 +42,13 @@ class RefInNot( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'RefInNot': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_not.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_not.pyi index b1362b851a..b8c574e16b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_not.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_not.pyi @@ -42,13 +42,13 @@ class RefInNot( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'RefInNot': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_oneof.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_oneof.py index 99be8069ed..9c76a655bb 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_oneof.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_oneof.py @@ -52,13 +52,13 @@ class RefInOneof( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'RefInOneof': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_oneof.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_oneof.pyi index 99be8069ed..9c76a655bb 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_oneof.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_oneof.pyi @@ -52,13 +52,13 @@ class RefInOneof( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'RefInOneof': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_property.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_property.py index 00390b0805..13f303fa14 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_property.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_property.py @@ -68,14 +68,14 @@ class RefInProperty( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], a: typing.Union['PropertyNamedRefThatIsNotAReference', schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'RefInProperty': return super().__new__( cls, - *args, + *_args, a=a, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_property.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_property.pyi index 00390b0805..13f303fa14 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_property.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_property.pyi @@ -68,14 +68,14 @@ class RefInProperty( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], a: typing.Union['PropertyNamedRefThatIsNotAReference', schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'RefInProperty': return super().__new__( cls, - *args, + *_args, a=a, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_default_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_default_validation.py index 464498e13f..e1e2bfdd42 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_default_validation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_default_validation.py @@ -65,14 +65,14 @@ class RequiredDefaultValidation( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], foo: typing.Union[MetaOapg.properties.foo, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'RequiredDefaultValidation': return super().__new__( cls, - *args, + *_args, foo=foo, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_default_validation.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_default_validation.pyi index 464498e13f..e1e2bfdd42 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_default_validation.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_default_validation.pyi @@ -65,14 +65,14 @@ class RequiredDefaultValidation( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], foo: typing.Union[MetaOapg.properties.foo, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'RequiredDefaultValidation': return super().__new__( cls, - *args, + *_args, foo=foo, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_validation.py index aa43367ca2..b190508311 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_validation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_validation.py @@ -78,7 +78,7 @@ class RequiredValidation( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], foo: typing.Union[MetaOapg.properties.foo, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], bar: typing.Union[MetaOapg.properties.bar, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, @@ -86,7 +86,7 @@ class RequiredValidation( ) -> 'RequiredValidation': return super().__new__( cls, - *args, + *_args, foo=foo, bar=bar, _configuration=_configuration, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_validation.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_validation.pyi index aa43367ca2..b190508311 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_validation.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_validation.pyi @@ -78,7 +78,7 @@ class RequiredValidation( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], foo: typing.Union[MetaOapg.properties.foo, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], bar: typing.Union[MetaOapg.properties.bar, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, @@ -86,7 +86,7 @@ class RequiredValidation( ) -> 'RequiredValidation': return super().__new__( cls, - *args, + *_args, foo=foo, bar=bar, _configuration=_configuration, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_with_empty_array.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_with_empty_array.py index 98018693bc..d91c0e7cf2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_with_empty_array.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_with_empty_array.py @@ -65,14 +65,14 @@ class RequiredWithEmptyArray( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], foo: typing.Union[MetaOapg.properties.foo, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'RequiredWithEmptyArray': return super().__new__( cls, - *args, + *_args, foo=foo, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_with_empty_array.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_with_empty_array.pyi index 98018693bc..d91c0e7cf2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_with_empty_array.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_with_empty_array.pyi @@ -65,14 +65,14 @@ class RequiredWithEmptyArray( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], foo: typing.Union[MetaOapg.properties.foo, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'RequiredWithEmptyArray': return super().__new__( cls, - *args, + *_args, foo=foo, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_with_escaped_characters.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_with_escaped_characters.py index 52a8999cd2..a482d65db3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_with_escaped_characters.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_with_escaped_characters.py @@ -47,13 +47,13 @@ class RequiredWithEscapedCharacters( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'RequiredWithEscapedCharacters': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_with_escaped_characters.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_with_escaped_characters.pyi index 52a8999cd2..a482d65db3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_with_escaped_characters.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_with_escaped_characters.pyi @@ -47,13 +47,13 @@ class RequiredWithEscapedCharacters( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'RequiredWithEscapedCharacters': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/the_default_keyword_does_not_do_anything_if_the_property_is_missing.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/the_default_keyword_does_not_do_anything_if_the_property_is_missing.py index 57a001ad75..4033b5a2e5 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/the_default_keyword_does_not_do_anything_if_the_property_is_missing.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/the_default_keyword_does_not_do_anything_if_the_property_is_missing.py @@ -72,14 +72,14 @@ class TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], alpha: typing.Union[MetaOapg.properties.alpha, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing': return super().__new__( cls, - *args, + *_args, alpha=alpha, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/the_default_keyword_does_not_do_anything_if_the_property_is_missing.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/the_default_keyword_does_not_do_anything_if_the_property_is_missing.pyi index caec048424..4deb08abe2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/the_default_keyword_does_not_do_anything_if_the_property_is_missing.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/the_default_keyword_does_not_do_anything_if_the_property_is_missing.pyi @@ -69,14 +69,14 @@ class TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], alpha: typing.Union[MetaOapg.properties.alpha, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing': return super().__new__( cls, - *args, + *_args, alpha=alpha, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uniqueitems_false_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uniqueitems_false_validation.py index 485edf4e3c..9a1260048b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uniqueitems_false_validation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uniqueitems_false_validation.py @@ -39,13 +39,13 @@ class UniqueitemsFalseValidation( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'UniqueitemsFalseValidation': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uniqueitems_false_validation.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uniqueitems_false_validation.pyi index c5ded11279..e1854bc77e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uniqueitems_false_validation.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uniqueitems_false_validation.pyi @@ -38,13 +38,13 @@ class UniqueitemsFalseValidation( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'UniqueitemsFalseValidation': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uniqueitems_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uniqueitems_validation.py index 9fd610f660..33f292d4ea 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uniqueitems_validation.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uniqueitems_validation.py @@ -39,13 +39,13 @@ class UniqueitemsValidation( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'UniqueitemsValidation': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uniqueitems_validation.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uniqueitems_validation.pyi index 175556c680..c23e7c8a00 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uniqueitems_validation.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uniqueitems_validation.pyi @@ -38,13 +38,13 @@ class UniqueitemsValidation( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'UniqueitemsValidation': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uri_format.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uri_format.py index c8202e8dcc..7ade387ae2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uri_format.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uri_format.py @@ -39,13 +39,13 @@ class UriFormat( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'UriFormat': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uri_format.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uri_format.pyi index c8202e8dcc..7ade387ae2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uri_format.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uri_format.pyi @@ -39,13 +39,13 @@ class UriFormat( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'UriFormat': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uri_reference_format.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uri_reference_format.py index 8a66998c4f..5fc3716e2d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uri_reference_format.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uri_reference_format.py @@ -39,13 +39,13 @@ class UriReferenceFormat( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'UriReferenceFormat': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uri_reference_format.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uri_reference_format.pyi index 8a66998c4f..5fc3716e2d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uri_reference_format.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uri_reference_format.pyi @@ -39,13 +39,13 @@ class UriReferenceFormat( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'UriReferenceFormat': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uri_template_format.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uri_template_format.py index 50fb98bcac..fa7bdb515f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uri_template_format.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uri_template_format.py @@ -39,13 +39,13 @@ class UriTemplateFormat( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'UriTemplateFormat': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uri_template_format.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uri_template_format.pyi index 50fb98bcac..fa7bdb515f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uri_template_format.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uri_template_format.pyi @@ -39,13 +39,13 @@ class UriTemplateFormat( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'UriTemplateFormat': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_date_time_format_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_date_time_format_request_body/post.py index 9499c4998d..9b0a98cd78 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_date_time_format_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_date_time_format_request_body/post.py @@ -42,13 +42,13 @@ class SchemaForRequestBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaForRequestBodyApplicationJson': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_date_time_format_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_date_time_format_request_body/post.pyi index e75c82d05c..dcbd13ab8d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_date_time_format_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_date_time_format_request_body/post.pyi @@ -40,13 +40,13 @@ class SchemaForRequestBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaForRequestBodyApplicationJson': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_email_format_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_email_format_request_body/post.py index 61c0e558b2..856d421c6d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_email_format_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_email_format_request_body/post.py @@ -41,13 +41,13 @@ class SchemaForRequestBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaForRequestBodyApplicationJson': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_email_format_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_email_format_request_body/post.pyi index 624a2c83bd..3946a3bf74 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_email_format_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_email_format_request_body/post.pyi @@ -39,13 +39,13 @@ class SchemaForRequestBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaForRequestBodyApplicationJson': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_hostname_format_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_hostname_format_request_body/post.py index 531dc56c32..ef7ce36a48 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_hostname_format_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_hostname_format_request_body/post.py @@ -41,13 +41,13 @@ class SchemaForRequestBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaForRequestBodyApplicationJson': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_hostname_format_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_hostname_format_request_body/post.pyi index 96b59201e8..e07113312d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_hostname_format_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_hostname_format_request_body/post.pyi @@ -39,13 +39,13 @@ class SchemaForRequestBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaForRequestBodyApplicationJson': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv4_format_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv4_format_request_body/post.py index 9ffdb8d5be..8941531c90 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv4_format_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv4_format_request_body/post.py @@ -41,13 +41,13 @@ class SchemaForRequestBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaForRequestBodyApplicationJson': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv4_format_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv4_format_request_body/post.pyi index 21a1c8c504..3ceee11abd 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv4_format_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv4_format_request_body/post.pyi @@ -39,13 +39,13 @@ class SchemaForRequestBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaForRequestBodyApplicationJson': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv6_format_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv6_format_request_body/post.py index 8fb701cc61..6abd8b3052 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv6_format_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv6_format_request_body/post.py @@ -41,13 +41,13 @@ class SchemaForRequestBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaForRequestBodyApplicationJson': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv6_format_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv6_format_request_body/post.pyi index b50a09052e..e871858fd6 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv6_format_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv6_format_request_body/post.pyi @@ -39,13 +39,13 @@ class SchemaForRequestBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaForRequestBodyApplicationJson': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post.py index 1ad92bc825..080abd4531 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post.py @@ -41,13 +41,13 @@ class SchemaForRequestBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaForRequestBodyApplicationJson': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post.pyi index 4e2d9ef6c5..72cade7049 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post.pyi @@ -39,13 +39,13 @@ class SchemaForRequestBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaForRequestBodyApplicationJson': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post.py index 7d44a344cc..4b9d4f471a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post.py @@ -74,14 +74,14 @@ class SchemaForRequestBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], foo: typing.Union[MetaOapg.properties.foo, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'not_schema': return super().__new__( cls, - *args, + *_args, foo=foo, _configuration=_configuration, **kwargs, @@ -90,13 +90,13 @@ class SchemaForRequestBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaForRequestBodyApplicationJson': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post.pyi index 5f1d96b0b8..e5412ed2f8 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post.pyi @@ -72,14 +72,14 @@ class SchemaForRequestBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], foo: typing.Union[MetaOapg.properties.foo, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'not_schema': return super().__new__( cls, - *args, + *_args, foo=foo, _configuration=_configuration, **kwargs, @@ -88,13 +88,13 @@ class SchemaForRequestBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaForRequestBodyApplicationJson': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_request_body/post.py index 1fdc493740..2427ff532b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_request_body/post.py @@ -41,13 +41,13 @@ class SchemaForRequestBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaForRequestBodyApplicationJson': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_request_body/post.pyi index ef2e02253e..0f838b6761 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_request_body/post.pyi @@ -39,13 +39,13 @@ class SchemaForRequestBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaForRequestBodyApplicationJson': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_not_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_not_request_body/post.py index 16778e01bf..a2e1e6435a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_not_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_not_request_body/post.py @@ -46,13 +46,13 @@ class SchemaForRequestBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaForRequestBodyApplicationJson': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_not_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_not_request_body/post.pyi index 18e7489d24..48bf3c1d40 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_not_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_not_request_body/post.pyi @@ -44,13 +44,13 @@ class SchemaForRequestBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaForRequestBodyApplicationJson': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post.py index 5546b1c722..cdbb400dcd 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post.py @@ -49,13 +49,13 @@ class SchemaForRequestBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaForRequestBodyApplicationJson': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post.pyi index 4b9319331a..e71b565a2b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post.pyi @@ -47,13 +47,13 @@ class SchemaForRequestBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaForRequestBodyApplicationJson': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_format_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_format_request_body/post.py index 01f1e01a38..6e73966d5f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_format_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_format_request_body/post.py @@ -41,13 +41,13 @@ class SchemaForRequestBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaForRequestBodyApplicationJson': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_format_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_format_request_body/post.pyi index bd57141d4f..154e8dbae2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_format_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_format_request_body/post.pyi @@ -39,13 +39,13 @@ class SchemaForRequestBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaForRequestBodyApplicationJson': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post.py index ac7b2ca12e..1458ad9578 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post.py @@ -41,13 +41,13 @@ class SchemaForRequestBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaForRequestBodyApplicationJson': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post.pyi index 32efe64f38..28a8d97602 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post.pyi @@ -39,13 +39,13 @@ class SchemaForRequestBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaForRequestBodyApplicationJson': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_template_format_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_template_format_request_body/post.py index ecbb8a5992..4861fea6f1 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_template_format_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_template_format_request_body/post.py @@ -41,13 +41,13 @@ class SchemaForRequestBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaForRequestBodyApplicationJson': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_template_format_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_template_format_request_body/post.pyi index c11c280ca8..44f6c896b7 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_template_format_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_template_format_request_body/post.pyi @@ -39,13 +39,13 @@ class SchemaForRequestBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaForRequestBodyApplicationJson': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post.py index d1eff06e69..babbaf5e02 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post.py @@ -41,13 +41,13 @@ class SchemaFor200ResponseBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaFor200ResponseBodyApplicationJson': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post.pyi index c05db7d83d..28b79bc2c0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post.pyi @@ -39,13 +39,13 @@ class SchemaFor200ResponseBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaFor200ResponseBodyApplicationJson': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post.py index 852d0ec405..9c30fddb2f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post.py @@ -40,13 +40,13 @@ class SchemaFor200ResponseBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaFor200ResponseBodyApplicationJson': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post.pyi index dfa5becb7a..2ded27d082 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post.pyi @@ -38,13 +38,13 @@ class SchemaFor200ResponseBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaFor200ResponseBodyApplicationJson': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post.py index 1eb1128097..4ce939e768 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post.py @@ -40,13 +40,13 @@ class SchemaFor200ResponseBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaFor200ResponseBodyApplicationJson': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post.pyi index 3695f168cc..18254b405c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post.pyi @@ -38,13 +38,13 @@ class SchemaFor200ResponseBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaFor200ResponseBodyApplicationJson': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post.py index deb135e6eb..c86d37eecf 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post.py @@ -40,13 +40,13 @@ class SchemaFor200ResponseBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaFor200ResponseBodyApplicationJson': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post.pyi index 7c0f7f47cb..5a44c28175 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post.pyi @@ -38,13 +38,13 @@ class SchemaFor200ResponseBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaFor200ResponseBodyApplicationJson': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post.py index 3aa10226b8..7bd78b3120 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post.py @@ -40,13 +40,13 @@ class SchemaFor200ResponseBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaFor200ResponseBodyApplicationJson': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post.pyi index 54392bcfc3..b89bfe9a05 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post.pyi @@ -38,13 +38,13 @@ class SchemaFor200ResponseBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaFor200ResponseBodyApplicationJson': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.py index c50bd66546..8c458cdef9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.py @@ -40,13 +40,13 @@ class SchemaFor200ResponseBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaFor200ResponseBodyApplicationJson': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.pyi index 93604bb85c..1172d0b668 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.pyi @@ -38,13 +38,13 @@ class SchemaFor200ResponseBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaFor200ResponseBodyApplicationJson': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.py index 9cf3c05972..9b45623d2d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.py @@ -73,14 +73,14 @@ class SchemaFor200ResponseBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], foo: typing.Union[MetaOapg.properties.foo, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'not_schema': return super().__new__( cls, - *args, + *_args, foo=foo, _configuration=_configuration, **kwargs, @@ -89,13 +89,13 @@ class SchemaFor200ResponseBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaFor200ResponseBodyApplicationJson': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.pyi index dba719e135..b97cc8d5f7 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.pyi @@ -71,14 +71,14 @@ class SchemaFor200ResponseBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], foo: typing.Union[MetaOapg.properties.foo, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'not_schema': return super().__new__( cls, - *args, + *_args, foo=foo, _configuration=_configuration, **kwargs, @@ -87,13 +87,13 @@ class SchemaFor200ResponseBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaFor200ResponseBodyApplicationJson': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post.py index 9c464a7df4..1b87bc301b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post.py @@ -40,13 +40,13 @@ class SchemaFor200ResponseBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaFor200ResponseBodyApplicationJson': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post.pyi index b3fc90331f..820f6bcd9a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post.pyi @@ -38,13 +38,13 @@ class SchemaFor200ResponseBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaFor200ResponseBodyApplicationJson': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post.py index b4c707bd61..5fbe6ef713 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post.py @@ -45,13 +45,13 @@ class SchemaFor200ResponseBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaFor200ResponseBodyApplicationJson': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post.pyi index 33edd4ec97..1c106d1722 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post.pyi @@ -43,13 +43,13 @@ class SchemaFor200ResponseBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaFor200ResponseBodyApplicationJson': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.py index 7745f092fb..694a648e37 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.py @@ -48,13 +48,13 @@ class SchemaFor200ResponseBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaFor200ResponseBodyApplicationJson': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.pyi index 654dea6b47..033c7350ce 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.pyi @@ -46,13 +46,13 @@ class SchemaFor200ResponseBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaFor200ResponseBodyApplicationJson': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post.py index 5049eb56e9..f139d4ae86 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post.py @@ -40,13 +40,13 @@ class SchemaFor200ResponseBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaFor200ResponseBodyApplicationJson': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post.pyi index 119a9678d7..57ca87cbd7 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post.pyi @@ -38,13 +38,13 @@ class SchemaFor200ResponseBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaFor200ResponseBodyApplicationJson': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.py index 65ecca6b55..58dd04bdba 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.py @@ -40,13 +40,13 @@ class SchemaFor200ResponseBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaFor200ResponseBodyApplicationJson': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.pyi index 985665f548..d3b186e351 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.pyi @@ -38,13 +38,13 @@ class SchemaFor200ResponseBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaFor200ResponseBodyApplicationJson': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post.py index 52dcf6763d..e9fe65c627 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post.py @@ -40,13 +40,13 @@ class SchemaFor200ResponseBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaFor200ResponseBodyApplicationJson': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post.pyi index 7d1760c1b7..669f2b49d7 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post.pyi @@ -38,13 +38,13 @@ class SchemaFor200ResponseBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaFor200ResponseBodyApplicationJson': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/schemas.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/schemas.py index e76f2b13dc..d6c0284ab1 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/schemas.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/schemas.py @@ -50,17 +50,17 @@ class FileIO(io.FileIO): Note: this class is not immutable """ - def __new__(cls, arg: typing.Union[io.FileIO, io.BufferedReader]): - if isinstance(arg, (io.FileIO, io.BufferedReader)): - if arg.closed: + def __new__(cls, _arg: typing.Union[io.FileIO, io.BufferedReader]): + if isinstance(_arg, (io.FileIO, io.BufferedReader)): + if _arg.closed: raise ApiValueError('Invalid file state; file is closed and must be open') - arg.close() - inst = super(FileIO, cls).__new__(cls, arg.name) - super(FileIO, inst).__init__(arg.name) + _arg.close() + inst = super(FileIO, cls).__new__(cls, _arg.name) + super(FileIO, inst).__init__(_arg.name) return inst - raise ApiValueError('FileIO must be passed arg which contains the open file') + raise ApiValueError('FileIO must be passed _arg which contains the open file') - def __init__(self, arg: typing.Union[io.FileIO, io.BufferedReader]): + def __init__(self, _arg: typing.Union[io.FileIO, io.BufferedReader]): pass @@ -151,11 +151,11 @@ class ValidationMetadata(frozendict.frozendict): class Singleton: """ Enums and singletons are the same - The same instance is returned for a given key of (cls, arg) + The same instance is returned for a given key of (cls, _arg) """ _instances = {} - def __new__(cls, arg: typing.Any, **kwargs): + def __new__(cls, _arg: typing.Any, **kwargs): """ cls base classes: BoolClass, NoneClass, str, decimal.Decimal The 3rd key is used in the tuple below for a corner case where an enum contains integer 1 @@ -163,15 +163,15 @@ class Singleton: Decimal('1.0') == Decimal('1') But if we omitted the 3rd value in the key, then Decimal('1.0') would be stored as Decimal('1') and json serializing that instance would be '1' rather than the expected '1.0' - Adding the 3rd value, the str of arg ensures that 1.0 -> Decimal('1.0') which is serialized as 1.0 + Adding the 3rd value, the str of _arg ensures that 1.0 -> Decimal('1.0') which is serialized as 1.0 """ - key = (cls, arg, str(arg)) + key = (cls, _arg, str(_arg)) if key not in cls._instances: - if isinstance(arg, (none_type, bool, BoolClass, NoneClass)): + if isinstance(_arg, (none_type, bool, BoolClass, NoneClass)): inst = super().__new__(cls) cls._instances[key] = inst else: - cls._instances[key] = super().__new__(cls, arg) + cls._instances[key] = super().__new__(cls, _arg) return cls._instances[key] def __repr__(self): @@ -499,12 +499,12 @@ class Schema: def __remove_unsets(kwargs): return {key: val for key, val in kwargs.items() if val is not unset} - def __new__(cls, *args: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema'], _configuration: typing.Optional[Configuration] = None, **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema', Unset]): + def __new__(cls, *_args: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema'], _configuration: typing.Optional[Configuration] = None, **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema', Unset]): """ Schema __new__ Args: - args (int/float/decimal.Decimal/str/list/tuple/dict/frozendict.frozendict/bool/None): the value + _args (int/float/decimal.Decimal/str/list/tuple/dict/frozendict.frozendict/bool/None): the value kwargs (str, int/float/decimal.Decimal/str/list/tuple/dict/frozendict.frozendict/bool/None): dict values _configuration: contains the Configuration that enables json schema validation keywords like minItems, minLength etc @@ -513,14 +513,14 @@ class Schema: are instance properties if they are named normally :( """ __kwargs = cls.__remove_unsets(kwargs) - if not args and not __kwargs: + if not _args and not __kwargs: raise TypeError( 'No input given. args or kwargs must be given.' ) - if not __kwargs and args and not isinstance(args[0], dict): - __arg = args[0] + if not __kwargs and _args and not isinstance(_args[0], dict): + __arg = _args[0] else: - __arg = cls.__get_input_dict(*args, **__kwargs) + __arg = cls.__get_input_dict(*_args, **__kwargs) __from_server = False __validated_path_to_schemas = {} __arg = cast_to_allowed_types( @@ -537,7 +537,7 @@ class Schema: def __init__( self, - *args: typing.Union[ + *_args: typing.Union[ dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema'], _configuration: typing.Optional[Configuration] = None, **kwargs: typing.Union[ @@ -2046,8 +2046,8 @@ class ListSchema( def from_openapi_data_oapg(cls, arg: typing.List[typing.Any], _configuration: typing.Optional[Configuration] = None): return super().from_openapi_data_oapg(arg, _configuration=_configuration) - def __new__(cls, arg: typing.Union[typing.List[typing.Any], typing.Tuple[typing.Any]], **kwargs: Configuration): - return super().__new__(cls, arg, **kwargs) + def __new__(cls, _arg: typing.Union[typing.List[typing.Any], typing.Tuple[typing.Any]], **kwargs: Configuration): + return super().__new__(cls, _arg, **kwargs) class NoneSchema( @@ -2060,8 +2060,8 @@ class NoneSchema( def from_openapi_data_oapg(cls, arg: None, _configuration: typing.Optional[Configuration] = None): return super().from_openapi_data_oapg(arg, _configuration=_configuration) - def __new__(cls, arg: None, **kwargs: Configuration): - return super().__new__(cls, arg, **kwargs) + def __new__(cls, _arg: None, **kwargs: Configuration): + return super().__new__(cls, _arg, **kwargs) class NumberSchema( @@ -2078,8 +2078,8 @@ class NumberSchema( def from_openapi_data_oapg(cls, arg: typing.Union[int, float], _configuration: typing.Optional[Configuration] = None): return super().from_openapi_data_oapg(arg, _configuration=_configuration) - def __new__(cls, arg: typing.Union[decimal.Decimal, int, float], **kwargs: Configuration): - return super().__new__(cls, arg, **kwargs) + def __new__(cls, _arg: typing.Union[decimal.Decimal, int, float], **kwargs: Configuration): + return super().__new__(cls, _arg, **kwargs) class IntBase: @@ -2121,8 +2121,8 @@ class IntSchema(IntBase, NumberSchema): def from_openapi_data_oapg(cls, arg: int, _configuration: typing.Optional[Configuration] = None): return super().from_openapi_data_oapg(arg, _configuration=_configuration) - def __new__(cls, arg: typing.Union[decimal.Decimal, int], **kwargs: Configuration): - return super().__new__(cls, arg, **kwargs) + def __new__(cls, _arg: typing.Union[decimal.Decimal, int], **kwargs: Configuration): + return super().__new__(cls, _arg, **kwargs) class Int32Base: @@ -2275,31 +2275,31 @@ class StrSchema( def from_openapi_data_oapg(cls, arg: str, _configuration: typing.Optional[Configuration] = None) -> 'StrSchema': return super().from_openapi_data_oapg(arg, _configuration=_configuration) - def __new__(cls, arg: typing.Union[str, date, datetime, uuid.UUID], **kwargs: Configuration): - return super().__new__(cls, arg, **kwargs) + def __new__(cls, _arg: typing.Union[str, date, datetime, uuid.UUID], **kwargs: Configuration): + return super().__new__(cls, _arg, **kwargs) class UUIDSchema(UUIDBase, StrSchema): - def __new__(cls, arg: typing.Union[str, uuid.UUID], **kwargs: Configuration): - return super().__new__(cls, arg, **kwargs) + def __new__(cls, _arg: typing.Union[str, uuid.UUID], **kwargs: Configuration): + return super().__new__(cls, _arg, **kwargs) class DateSchema(DateBase, StrSchema): - def __new__(cls, arg: typing.Union[str, date], **kwargs: Configuration): - return super().__new__(cls, arg, **kwargs) + def __new__(cls, _arg: typing.Union[str, date], **kwargs: Configuration): + return super().__new__(cls, _arg, **kwargs) class DateTimeSchema(DateTimeBase, StrSchema): - def __new__(cls, arg: typing.Union[str, datetime], **kwargs: Configuration): - return super().__new__(cls, arg, **kwargs) + def __new__(cls, _arg: typing.Union[str, datetime], **kwargs: Configuration): + return super().__new__(cls, _arg, **kwargs) class DecimalSchema(DecimalBase, StrSchema): - def __new__(cls, arg: str, **kwargs: Configuration): + def __new__(cls, _arg: str, **kwargs: Configuration): """ Note: Decimals may not be passed in because cast_to_allowed_types is only invoked once for payloads which can be simple (str) or complex (dicts or lists with nested values) @@ -2308,7 +2308,7 @@ class DecimalSchema(DecimalBase, StrSchema): if one was using it for a StrSchema (where it should be cast to str) or one is using it for NumberSchema where it should stay as Decimal. """ - return super().__new__(cls, arg, **kwargs) + return super().__new__(cls, _arg, **kwargs) class BytesSchema( @@ -2318,8 +2318,8 @@ class BytesSchema( """ this class will subclass bytes and is immutable """ - def __new__(cls, arg: bytes, **kwargs: Configuration): - return super(Schema, cls).__new__(cls, arg) + def __new__(cls, _arg: bytes, **kwargs: Configuration): + return super(Schema, cls).__new__(cls, _arg) class FileSchema( @@ -2343,8 +2343,8 @@ class FileSchema( - to be able to preserve file name info """ - def __new__(cls, arg: typing.Union[io.FileIO, io.BufferedReader], **kwargs: Configuration): - return super(Schema, cls).__new__(cls, arg) + def __new__(cls, _arg: typing.Union[io.FileIO, io.BufferedReader], **kwargs: Configuration): + return super(Schema, cls).__new__(cls, _arg) class BinaryBase: @@ -2365,8 +2365,8 @@ class BinarySchema( FileSchema, ] - def __new__(cls, arg: typing.Union[io.FileIO, io.BufferedReader, bytes], **kwargs: Configuration): - return super().__new__(cls, arg) + def __new__(cls, _arg: typing.Union[io.FileIO, io.BufferedReader, bytes], **kwargs: Configuration): + return super().__new__(cls, _arg) class BoolSchema( @@ -2379,8 +2379,8 @@ class BoolSchema( def from_openapi_data_oapg(cls, arg: bool, _configuration: typing.Optional[Configuration] = None): return super().from_openapi_data_oapg(arg, _configuration=_configuration) - def __new__(cls, arg: bool, **kwargs: ValidationMetadata): - return super().__new__(cls, arg, **kwargs) + def __new__(cls, _arg: bool, **kwargs: ValidationMetadata): + return super().__new__(cls, _arg, **kwargs) class AnyTypeSchema( @@ -2416,12 +2416,12 @@ class NotAnyTypeSchema( def __new__( cls, - *args, + *_args, _configuration: typing.Optional[Configuration] = None, ) -> 'NotAnyTypeSchema': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, ) @@ -2435,8 +2435,8 @@ class DictSchema( def from_openapi_data_oapg(cls, arg: typing.Dict[str, typing.Any], _configuration: typing.Optional[Configuration] = None): return super().from_openapi_data_oapg(arg, _configuration=_configuration) - def __new__(cls, *args: typing.Union[dict, frozendict.frozendict], **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, bytes, Schema, Unset, ValidationMetadata]): - return super().__new__(cls, *args, **kwargs) + def __new__(cls, *_args: typing.Union[dict, frozendict.frozendict], **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, bytes, Schema, Unset, ValidationMetadata]): + return super().__new__(cls, *_args, **kwargs) schema_type_classes = {NoneSchema, DictSchema, ListSchema, NumberSchema, StrSchema, BoolSchema, AnyTypeSchema} diff --git a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/schemas.py b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/schemas.py index c0641412cb..49f42952e2 100644 --- a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/schemas.py +++ b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/schemas.py @@ -50,17 +50,17 @@ class FileIO(io.FileIO): Note: this class is not immutable """ - def __new__(cls, arg: typing.Union[io.FileIO, io.BufferedReader]): - if isinstance(arg, (io.FileIO, io.BufferedReader)): - if arg.closed: + def __new__(cls, _arg: typing.Union[io.FileIO, io.BufferedReader]): + if isinstance(_arg, (io.FileIO, io.BufferedReader)): + if _arg.closed: raise ApiValueError('Invalid file state; file is closed and must be open') - arg.close() - inst = super(FileIO, cls).__new__(cls, arg.name) - super(FileIO, inst).__init__(arg.name) + _arg.close() + inst = super(FileIO, cls).__new__(cls, _arg.name) + super(FileIO, inst).__init__(_arg.name) return inst - raise ApiValueError('FileIO must be passed arg which contains the open file') + raise ApiValueError('FileIO must be passed _arg which contains the open file') - def __init__(self, arg: typing.Union[io.FileIO, io.BufferedReader]): + def __init__(self, _arg: typing.Union[io.FileIO, io.BufferedReader]): pass @@ -151,11 +151,11 @@ class ValidationMetadata(frozendict.frozendict): class Singleton: """ Enums and singletons are the same - The same instance is returned for a given key of (cls, arg) + The same instance is returned for a given key of (cls, _arg) """ _instances = {} - def __new__(cls, arg: typing.Any, **kwargs): + def __new__(cls, _arg: typing.Any, **kwargs): """ cls base classes: BoolClass, NoneClass, str, decimal.Decimal The 3rd key is used in the tuple below for a corner case where an enum contains integer 1 @@ -163,15 +163,15 @@ class Singleton: Decimal('1.0') == Decimal('1') But if we omitted the 3rd value in the key, then Decimal('1.0') would be stored as Decimal('1') and json serializing that instance would be '1' rather than the expected '1.0' - Adding the 3rd value, the str of arg ensures that 1.0 -> Decimal('1.0') which is serialized as 1.0 + Adding the 3rd value, the str of _arg ensures that 1.0 -> Decimal('1.0') which is serialized as 1.0 """ - key = (cls, arg, str(arg)) + key = (cls, _arg, str(_arg)) if key not in cls._instances: - if isinstance(arg, (none_type, bool, BoolClass, NoneClass)): + if isinstance(_arg, (none_type, bool, BoolClass, NoneClass)): inst = super().__new__(cls) cls._instances[key] = inst else: - cls._instances[key] = super().__new__(cls, arg) + cls._instances[key] = super().__new__(cls, _arg) return cls._instances[key] def __repr__(self): @@ -499,12 +499,12 @@ class Schema: def __remove_unsets(kwargs): return {key: val for key, val in kwargs.items() if val is not unset} - def __new__(cls, *args: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema'], _configuration: typing.Optional[Configuration] = None, **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema', Unset]): + def __new__(cls, *_args: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema'], _configuration: typing.Optional[Configuration] = None, **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema', Unset]): """ Schema __new__ Args: - args (int/float/decimal.Decimal/str/list/tuple/dict/frozendict.frozendict/bool/None): the value + _args (int/float/decimal.Decimal/str/list/tuple/dict/frozendict.frozendict/bool/None): the value kwargs (str, int/float/decimal.Decimal/str/list/tuple/dict/frozendict.frozendict/bool/None): dict values _configuration: contains the Configuration that enables json schema validation keywords like minItems, minLength etc @@ -513,14 +513,14 @@ class Schema: are instance properties if they are named normally :( """ __kwargs = cls.__remove_unsets(kwargs) - if not args and not __kwargs: + if not _args and not __kwargs: raise TypeError( 'No input given. args or kwargs must be given.' ) - if not __kwargs and args and not isinstance(args[0], dict): - __arg = args[0] + if not __kwargs and _args and not isinstance(_args[0], dict): + __arg = _args[0] else: - __arg = cls.__get_input_dict(*args, **__kwargs) + __arg = cls.__get_input_dict(*_args, **__kwargs) __from_server = False __validated_path_to_schemas = {} __arg = cast_to_allowed_types( @@ -537,7 +537,7 @@ class Schema: def __init__( self, - *args: typing.Union[ + *_args: typing.Union[ dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema'], _configuration: typing.Optional[Configuration] = None, **kwargs: typing.Union[ @@ -2046,8 +2046,8 @@ class ListSchema( def from_openapi_data_oapg(cls, arg: typing.List[typing.Any], _configuration: typing.Optional[Configuration] = None): return super().from_openapi_data_oapg(arg, _configuration=_configuration) - def __new__(cls, arg: typing.Union[typing.List[typing.Any], typing.Tuple[typing.Any]], **kwargs: Configuration): - return super().__new__(cls, arg, **kwargs) + def __new__(cls, _arg: typing.Union[typing.List[typing.Any], typing.Tuple[typing.Any]], **kwargs: Configuration): + return super().__new__(cls, _arg, **kwargs) class NoneSchema( @@ -2060,8 +2060,8 @@ class NoneSchema( def from_openapi_data_oapg(cls, arg: None, _configuration: typing.Optional[Configuration] = None): return super().from_openapi_data_oapg(arg, _configuration=_configuration) - def __new__(cls, arg: None, **kwargs: Configuration): - return super().__new__(cls, arg, **kwargs) + def __new__(cls, _arg: None, **kwargs: Configuration): + return super().__new__(cls, _arg, **kwargs) class NumberSchema( @@ -2078,8 +2078,8 @@ class NumberSchema( def from_openapi_data_oapg(cls, arg: typing.Union[int, float], _configuration: typing.Optional[Configuration] = None): return super().from_openapi_data_oapg(arg, _configuration=_configuration) - def __new__(cls, arg: typing.Union[decimal.Decimal, int, float], **kwargs: Configuration): - return super().__new__(cls, arg, **kwargs) + def __new__(cls, _arg: typing.Union[decimal.Decimal, int, float], **kwargs: Configuration): + return super().__new__(cls, _arg, **kwargs) class IntBase: @@ -2121,8 +2121,8 @@ class IntSchema(IntBase, NumberSchema): def from_openapi_data_oapg(cls, arg: int, _configuration: typing.Optional[Configuration] = None): return super().from_openapi_data_oapg(arg, _configuration=_configuration) - def __new__(cls, arg: typing.Union[decimal.Decimal, int], **kwargs: Configuration): - return super().__new__(cls, arg, **kwargs) + def __new__(cls, _arg: typing.Union[decimal.Decimal, int], **kwargs: Configuration): + return super().__new__(cls, _arg, **kwargs) class Int32Base: @@ -2275,31 +2275,31 @@ class StrSchema( def from_openapi_data_oapg(cls, arg: str, _configuration: typing.Optional[Configuration] = None) -> 'StrSchema': return super().from_openapi_data_oapg(arg, _configuration=_configuration) - def __new__(cls, arg: typing.Union[str, date, datetime, uuid.UUID], **kwargs: Configuration): - return super().__new__(cls, arg, **kwargs) + def __new__(cls, _arg: typing.Union[str, date, datetime, uuid.UUID], **kwargs: Configuration): + return super().__new__(cls, _arg, **kwargs) class UUIDSchema(UUIDBase, StrSchema): - def __new__(cls, arg: typing.Union[str, uuid.UUID], **kwargs: Configuration): - return super().__new__(cls, arg, **kwargs) + def __new__(cls, _arg: typing.Union[str, uuid.UUID], **kwargs: Configuration): + return super().__new__(cls, _arg, **kwargs) class DateSchema(DateBase, StrSchema): - def __new__(cls, arg: typing.Union[str, date], **kwargs: Configuration): - return super().__new__(cls, arg, **kwargs) + def __new__(cls, _arg: typing.Union[str, date], **kwargs: Configuration): + return super().__new__(cls, _arg, **kwargs) class DateTimeSchema(DateTimeBase, StrSchema): - def __new__(cls, arg: typing.Union[str, datetime], **kwargs: Configuration): - return super().__new__(cls, arg, **kwargs) + def __new__(cls, _arg: typing.Union[str, datetime], **kwargs: Configuration): + return super().__new__(cls, _arg, **kwargs) class DecimalSchema(DecimalBase, StrSchema): - def __new__(cls, arg: str, **kwargs: Configuration): + def __new__(cls, _arg: str, **kwargs: Configuration): """ Note: Decimals may not be passed in because cast_to_allowed_types is only invoked once for payloads which can be simple (str) or complex (dicts or lists with nested values) @@ -2308,7 +2308,7 @@ class DecimalSchema(DecimalBase, StrSchema): if one was using it for a StrSchema (where it should be cast to str) or one is using it for NumberSchema where it should stay as Decimal. """ - return super().__new__(cls, arg, **kwargs) + return super().__new__(cls, _arg, **kwargs) class BytesSchema( @@ -2318,8 +2318,8 @@ class BytesSchema( """ this class will subclass bytes and is immutable """ - def __new__(cls, arg: bytes, **kwargs: Configuration): - return super(Schema, cls).__new__(cls, arg) + def __new__(cls, _arg: bytes, **kwargs: Configuration): + return super(Schema, cls).__new__(cls, _arg) class FileSchema( @@ -2343,8 +2343,8 @@ class FileSchema( - to be able to preserve file name info """ - def __new__(cls, arg: typing.Union[io.FileIO, io.BufferedReader], **kwargs: Configuration): - return super(Schema, cls).__new__(cls, arg) + def __new__(cls, _arg: typing.Union[io.FileIO, io.BufferedReader], **kwargs: Configuration): + return super(Schema, cls).__new__(cls, _arg) class BinaryBase: @@ -2365,8 +2365,8 @@ class BinarySchema( FileSchema, ] - def __new__(cls, arg: typing.Union[io.FileIO, io.BufferedReader, bytes], **kwargs: Configuration): - return super().__new__(cls, arg) + def __new__(cls, _arg: typing.Union[io.FileIO, io.BufferedReader, bytes], **kwargs: Configuration): + return super().__new__(cls, _arg) class BoolSchema( @@ -2379,8 +2379,8 @@ class BoolSchema( def from_openapi_data_oapg(cls, arg: bool, _configuration: typing.Optional[Configuration] = None): return super().from_openapi_data_oapg(arg, _configuration=_configuration) - def __new__(cls, arg: bool, **kwargs: ValidationMetadata): - return super().__new__(cls, arg, **kwargs) + def __new__(cls, _arg: bool, **kwargs: ValidationMetadata): + return super().__new__(cls, _arg, **kwargs) class AnyTypeSchema( @@ -2416,12 +2416,12 @@ class NotAnyTypeSchema( def __new__( cls, - *args, + *_args, _configuration: typing.Optional[Configuration] = None, ) -> 'NotAnyTypeSchema': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, ) @@ -2435,8 +2435,8 @@ class DictSchema( def from_openapi_data_oapg(cls, arg: typing.Dict[str, typing.Any], _configuration: typing.Optional[Configuration] = None): return super().from_openapi_data_oapg(arg, _configuration=_configuration) - def __new__(cls, *args: typing.Union[dict, frozendict.frozendict], **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, bytes, Schema, Unset, ValidationMetadata]): - return super().__new__(cls, *args, **kwargs) + def __new__(cls, *_args: typing.Union[dict, frozendict.frozendict], **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, bytes, Schema, Unset, ValidationMetadata]): + return super().__new__(cls, *_args, **kwargs) schema_type_classes = {NoneSchema, DictSchema, ListSchema, NumberSchema, StrSchema, BoolSchema, AnyTypeSchema} diff --git a/samples/openapi3/client/petstore/python/.openapi-generator/FILES b/samples/openapi3/client/petstore/python/.openapi-generator/FILES index 24d52d4e13..2b3ab5ca46 100644 --- a/samples/openapi3/client/petstore/python/.openapi-generator/FILES +++ b/samples/openapi3/client/petstore/python/.openapi-generator/FILES @@ -96,6 +96,7 @@ docs/models/Number.md docs/models/NumberOnly.md docs/models/NumberWithValidations.md docs/models/ObjectInterface.md +docs/models/ObjectModelWithArgAndArgsProperties.md docs/models/ObjectModelWithRefProps.md docs/models/ObjectWithAllOfWithReqTestPropFromUnsetAddProp.md docs/models/ObjectWithDecimalProperties.md @@ -318,6 +319,8 @@ petstore_api/model/number_with_validations.py petstore_api/model/number_with_validations.pyi petstore_api/model/object_interface.py petstore_api/model/object_interface.pyi +petstore_api/model/object_model_with_arg_and_args_properties.py +petstore_api/model/object_model_with_arg_and_args_properties.pyi petstore_api/model/object_model_with_ref_props.py petstore_api/model/object_model_with_ref_props.pyi petstore_api/model/object_with_all_of_with_req_test_prop_from_unset_add_prop.py diff --git a/samples/openapi3/client/petstore/python/README.md b/samples/openapi3/client/petstore/python/README.md index 3cff535d8e..152d38ce00 100644 --- a/samples/openapi3/client/petstore/python/README.md +++ b/samples/openapi3/client/petstore/python/README.md @@ -318,6 +318,7 @@ Class | Method | HTTP request | Description - [NumberOnly](docs/models/NumberOnly.md) - [NumberWithValidations](docs/models/NumberWithValidations.md) - [ObjectInterface](docs/models/ObjectInterface.md) + - [ObjectModelWithArgAndArgsProperties](docs/models/ObjectModelWithArgAndArgsProperties.md) - [ObjectModelWithRefProps](docs/models/ObjectModelWithRefProps.md) - [ObjectWithAllOfWithReqTestPropFromUnsetAddProp](docs/models/ObjectWithAllOfWithReqTestPropFromUnsetAddProp.md) - [ObjectWithDecimalProperties](docs/models/ObjectWithDecimalProperties.md) diff --git a/samples/openapi3/client/petstore/python/docs/models/ObjectModelWithArgAndArgsProperties.md b/samples/openapi3/client/petstore/python/docs/models/ObjectModelWithArgAndArgsProperties.md new file mode 100644 index 0000000000..f7d2a85950 --- /dev/null +++ b/samples/openapi3/client/petstore/python/docs/models/ObjectModelWithArgAndArgsProperties.md @@ -0,0 +1,16 @@ +# petstore_api.model.object_model_with_arg_and_args_properties.ObjectModelWithArgAndArgsProperties + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**args** | str, | str, | | +**arg** | str, | str, | | +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_class.py b/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_class.py index 79ca58cf23..3417b0b35c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_class.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_class.py @@ -55,13 +55,13 @@ class AdditionalPropertiesClass( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[MetaOapg.additional_properties, str, ], ) -> 'map_property': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -92,13 +92,13 @@ class AdditionalPropertiesClass( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[MetaOapg.additional_properties, str, ], ) -> 'additional_properties': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -112,13 +112,13 @@ class AdditionalPropertiesClass( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, ], ) -> 'map_of_map_property': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -144,13 +144,13 @@ class AdditionalPropertiesClass( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], ) -> 'map_with_undeclared_properties_anytype_3': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -166,12 +166,12 @@ class AdditionalPropertiesClass( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'empty_map': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, ) @@ -193,13 +193,13 @@ class AdditionalPropertiesClass( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[MetaOapg.additional_properties, str, ], ) -> 'map_with_undeclared_properties_string': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -279,7 +279,7 @@ class AdditionalPropertiesClass( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], map_property: typing.Union[MetaOapg.properties.map_property, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, map_of_map_property: typing.Union[MetaOapg.properties.map_of_map_property, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, anytype_1: typing.Union[MetaOapg.properties.anytype_1, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, @@ -293,7 +293,7 @@ class AdditionalPropertiesClass( ) -> 'AdditionalPropertiesClass': return super().__new__( cls, - *args, + *_args, map_property=map_property, map_of_map_property=map_of_map_property, anytype_1=anytype_1, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_class.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_class.pyi index 79ca58cf23..3417b0b35c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_class.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_class.pyi @@ -55,13 +55,13 @@ class AdditionalPropertiesClass( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[MetaOapg.additional_properties, str, ], ) -> 'map_property': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -92,13 +92,13 @@ class AdditionalPropertiesClass( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[MetaOapg.additional_properties, str, ], ) -> 'additional_properties': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -112,13 +112,13 @@ class AdditionalPropertiesClass( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, ], ) -> 'map_of_map_property': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -144,13 +144,13 @@ class AdditionalPropertiesClass( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], ) -> 'map_with_undeclared_properties_anytype_3': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -166,12 +166,12 @@ class AdditionalPropertiesClass( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'empty_map': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, ) @@ -193,13 +193,13 @@ class AdditionalPropertiesClass( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[MetaOapg.additional_properties, str, ], ) -> 'map_with_undeclared_properties_string': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -279,7 +279,7 @@ class AdditionalPropertiesClass( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], map_property: typing.Union[MetaOapg.properties.map_property, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, map_of_map_property: typing.Union[MetaOapg.properties.map_of_map_property, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, anytype_1: typing.Union[MetaOapg.properties.anytype_1, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, @@ -293,7 +293,7 @@ class AdditionalPropertiesClass( ) -> 'AdditionalPropertiesClass': return super().__new__( cls, - *args, + *_args, map_property=map_property, map_of_map_property=map_of_map_property, anytype_1=anytype_1, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_validator.py b/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_validator.py index e139b25269..102c99fac1 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_validator.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_validator.py @@ -54,13 +54,13 @@ class AdditionalPropertiesValidator( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], ) -> 'all_of_0': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -85,13 +85,13 @@ class AdditionalPropertiesValidator( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'additional_properties': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -105,13 +105,13 @@ class AdditionalPropertiesValidator( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], ) -> 'all_of_1': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -136,13 +136,13 @@ class AdditionalPropertiesValidator( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'additional_properties': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -156,13 +156,13 @@ class AdditionalPropertiesValidator( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], ) -> 'all_of_2': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -186,13 +186,13 @@ class AdditionalPropertiesValidator( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'AdditionalPropertiesValidator': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_validator.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_validator.pyi index aa4a7355b2..41f0865542 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_validator.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_validator.pyi @@ -54,13 +54,13 @@ class AdditionalPropertiesValidator( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], ) -> 'all_of_0': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -84,13 +84,13 @@ class AdditionalPropertiesValidator( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'additional_properties': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -104,13 +104,13 @@ class AdditionalPropertiesValidator( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], ) -> 'all_of_1': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -134,13 +134,13 @@ class AdditionalPropertiesValidator( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'additional_properties': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -154,13 +154,13 @@ class AdditionalPropertiesValidator( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], ) -> 'all_of_2': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -184,13 +184,13 @@ class AdditionalPropertiesValidator( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'AdditionalPropertiesValidator': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_with_array_of_enums.py b/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_with_array_of_enums.py index 2a0bbc3031..a2955cc292 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_with_array_of_enums.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_with_array_of_enums.py @@ -49,12 +49,12 @@ class AdditionalPropertiesWithArrayOfEnums( def __new__( cls, - arg: typing.Union[typing.Tuple['EnumClass'], typing.List['EnumClass']], + _arg: typing.Union[typing.Tuple['EnumClass'], typing.List['EnumClass']], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'additional_properties': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -70,13 +70,13 @@ class AdditionalPropertiesWithArrayOfEnums( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[MetaOapg.additional_properties, list, tuple, ], ) -> 'AdditionalPropertiesWithArrayOfEnums': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_with_array_of_enums.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_with_array_of_enums.pyi index 2a0bbc3031..a2955cc292 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_with_array_of_enums.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_with_array_of_enums.pyi @@ -49,12 +49,12 @@ class AdditionalPropertiesWithArrayOfEnums( def __new__( cls, - arg: typing.Union[typing.Tuple['EnumClass'], typing.List['EnumClass']], + _arg: typing.Union[typing.Tuple['EnumClass'], typing.List['EnumClass']], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'additional_properties': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -70,13 +70,13 @@ class AdditionalPropertiesWithArrayOfEnums( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[MetaOapg.additional_properties, list, tuple, ], ) -> 'AdditionalPropertiesWithArrayOfEnums': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/address.py b/samples/openapi3/client/petstore/python/petstore_api/model/address.py index 64fb96cfb9..46e70b0aac 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/address.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/address.py @@ -45,13 +45,13 @@ class Address( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[MetaOapg.additional_properties, decimal.Decimal, int, ], ) -> 'Address': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/address.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/address.pyi index 64fb96cfb9..46e70b0aac 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/address.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/address.pyi @@ -45,13 +45,13 @@ class Address( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[MetaOapg.additional_properties, decimal.Decimal, int, ], ) -> 'Address': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/animal.py b/samples/openapi3/client/petstore/python/petstore_api/model/animal.py index 06d7246fa3..10cc8231ca 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/animal.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/animal.py @@ -86,7 +86,7 @@ class Animal( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], className: typing.Union[MetaOapg.properties.className, str, ], color: typing.Union[MetaOapg.properties.color, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, @@ -94,7 +94,7 @@ class Animal( ) -> 'Animal': return super().__new__( cls, - *args, + *_args, className=className, color=color, _configuration=_configuration, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/animal.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/animal.pyi index 06d7246fa3..10cc8231ca 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/animal.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/animal.pyi @@ -86,7 +86,7 @@ class Animal( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], className: typing.Union[MetaOapg.properties.className, str, ], color: typing.Union[MetaOapg.properties.color, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, @@ -94,7 +94,7 @@ class Animal( ) -> 'Animal': return super().__new__( cls, - *args, + *_args, className=className, color=color, _configuration=_configuration, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/animal_farm.py b/samples/openapi3/client/petstore/python/petstore_api/model/animal_farm.py index 082a4988ce..6fda316363 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/animal_farm.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/animal_farm.py @@ -41,12 +41,12 @@ class AnimalFarm( def __new__( cls, - arg: typing.Union[typing.Tuple['Animal'], typing.List['Animal']], + _arg: typing.Union[typing.Tuple['Animal'], typing.List['Animal']], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'AnimalFarm': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/animal_farm.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/animal_farm.pyi index 082a4988ce..6fda316363 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/animal_farm.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/animal_farm.pyi @@ -41,12 +41,12 @@ class AnimalFarm( def __new__( cls, - arg: typing.Union[typing.Tuple['Animal'], typing.List['Animal']], + _arg: typing.Union[typing.Tuple['Animal'], typing.List['Animal']], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'AnimalFarm': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/any_type_and_format.py b/samples/openapi3/client/petstore/python/petstore_api/model/any_type_and_format.py index 7bccdfa416..79ef085dbf 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/any_type_and_format.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/any_type_and_format.py @@ -50,13 +50,13 @@ class AnyTypeAndFormat( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'uuid': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -74,13 +74,13 @@ class AnyTypeAndFormat( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'date': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -98,13 +98,13 @@ class AnyTypeAndFormat( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'date_time': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -122,13 +122,13 @@ class AnyTypeAndFormat( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'number': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -146,13 +146,13 @@ class AnyTypeAndFormat( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'binary': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -170,13 +170,13 @@ class AnyTypeAndFormat( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'int32': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -194,13 +194,13 @@ class AnyTypeAndFormat( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'int64': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -218,13 +218,13 @@ class AnyTypeAndFormat( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'double': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -242,13 +242,13 @@ class AnyTypeAndFormat( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> '_float': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -335,7 +335,7 @@ class AnyTypeAndFormat( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], uuid: typing.Union[MetaOapg.properties.uuid, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, date: typing.Union[MetaOapg.properties.date, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, number: typing.Union[MetaOapg.properties.number, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, @@ -348,7 +348,7 @@ class AnyTypeAndFormat( ) -> 'AnyTypeAndFormat': return super().__new__( cls, - *args, + *_args, uuid=uuid, date=date, number=number, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/any_type_and_format.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/any_type_and_format.pyi index 7bccdfa416..79ef085dbf 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/any_type_and_format.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/any_type_and_format.pyi @@ -50,13 +50,13 @@ class AnyTypeAndFormat( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'uuid': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -74,13 +74,13 @@ class AnyTypeAndFormat( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'date': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -98,13 +98,13 @@ class AnyTypeAndFormat( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'date_time': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -122,13 +122,13 @@ class AnyTypeAndFormat( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'number': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -146,13 +146,13 @@ class AnyTypeAndFormat( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'binary': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -170,13 +170,13 @@ class AnyTypeAndFormat( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'int32': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -194,13 +194,13 @@ class AnyTypeAndFormat( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'int64': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -218,13 +218,13 @@ class AnyTypeAndFormat( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'double': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -242,13 +242,13 @@ class AnyTypeAndFormat( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> '_float': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -335,7 +335,7 @@ class AnyTypeAndFormat( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], uuid: typing.Union[MetaOapg.properties.uuid, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, date: typing.Union[MetaOapg.properties.date, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, number: typing.Union[MetaOapg.properties.number, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, @@ -348,7 +348,7 @@ class AnyTypeAndFormat( ) -> 'AnyTypeAndFormat': return super().__new__( cls, - *args, + *_args, uuid=uuid, date=date, number=number, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/any_type_not_string.py b/samples/openapi3/client/petstore/python/petstore_api/model/any_type_not_string.py index 993207a77f..032003cf1c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/any_type_not_string.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/any_type_not_string.py @@ -39,13 +39,13 @@ class AnyTypeNotString( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'AnyTypeNotString': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/any_type_not_string.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/any_type_not_string.pyi index 993207a77f..032003cf1c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/any_type_not_string.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/any_type_not_string.pyi @@ -39,13 +39,13 @@ class AnyTypeNotString( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'AnyTypeNotString': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/api_response.py b/samples/openapi3/client/petstore/python/petstore_api/model/api_response.py index 236e29d4e7..a5ffc8f4b9 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/api_response.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/api_response.py @@ -80,7 +80,7 @@ class ApiResponse( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], code: typing.Union[MetaOapg.properties.code, decimal.Decimal, int, schemas.Unset] = schemas.unset, type: typing.Union[MetaOapg.properties.type, str, schemas.Unset] = schemas.unset, message: typing.Union[MetaOapg.properties.message, str, schemas.Unset] = schemas.unset, @@ -89,7 +89,7 @@ class ApiResponse( ) -> 'ApiResponse': return super().__new__( cls, - *args, + *_args, code=code, type=type, message=message, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/api_response.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/api_response.pyi index 236e29d4e7..a5ffc8f4b9 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/api_response.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/api_response.pyi @@ -80,7 +80,7 @@ class ApiResponse( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], code: typing.Union[MetaOapg.properties.code, decimal.Decimal, int, schemas.Unset] = schemas.unset, type: typing.Union[MetaOapg.properties.type, str, schemas.Unset] = schemas.unset, message: typing.Union[MetaOapg.properties.message, str, schemas.Unset] = schemas.unset, @@ -89,7 +89,7 @@ class ApiResponse( ) -> 'ApiResponse': return super().__new__( cls, - *args, + *_args, code=code, type=type, message=message, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/apple.py b/samples/openapi3/client/petstore/python/petstore_api/model/apple.py index 638edc274d..9b0a5b7d64 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/apple.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/apple.py @@ -104,14 +104,14 @@ class Apple( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, None, ], + *_args: typing.Union[dict, frozendict.frozendict, None, ], origin: typing.Union[MetaOapg.properties.origin, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'Apple': return super().__new__( cls, - *args, + *_args, origin=origin, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/apple.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/apple.pyi index 95bd5e3a90..635b090967 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/apple.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/apple.pyi @@ -91,14 +91,14 @@ class Apple( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, None, ], + *_args: typing.Union[dict, frozendict.frozendict, None, ], origin: typing.Union[MetaOapg.properties.origin, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'Apple': return super().__new__( cls, - *args, + *_args, origin=origin, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/apple_req.py b/samples/openapi3/client/petstore/python/petstore_api/model/apple_req.py index 03d83c22cf..d6bbd106ea 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/apple_req.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/apple_req.py @@ -70,14 +70,14 @@ class AppleReq( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], cultivar: typing.Union[MetaOapg.properties.cultivar, str, ], mealy: typing.Union[MetaOapg.properties.mealy, bool, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'AppleReq': return super().__new__( cls, - *args, + *_args, cultivar=cultivar, mealy=mealy, _configuration=_configuration, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/apple_req.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/apple_req.pyi index 03d83c22cf..d6bbd106ea 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/apple_req.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/apple_req.pyi @@ -70,14 +70,14 @@ class AppleReq( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], cultivar: typing.Union[MetaOapg.properties.cultivar, str, ], mealy: typing.Union[MetaOapg.properties.mealy, bool, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'AppleReq': return super().__new__( cls, - *args, + *_args, cultivar=cultivar, mealy=mealy, _configuration=_configuration, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/array_holding_any_type.py b/samples/openapi3/client/petstore/python/petstore_api/model/array_holding_any_type.py index 19b1c0e1a6..1c8e2491bd 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/array_holding_any_type.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/array_holding_any_type.py @@ -38,12 +38,12 @@ class ArrayHoldingAnyType( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'ArrayHoldingAnyType': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/array_holding_any_type.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/array_holding_any_type.pyi index 19b1c0e1a6..1c8e2491bd 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/array_holding_any_type.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/array_holding_any_type.pyi @@ -38,12 +38,12 @@ class ArrayHoldingAnyType( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'ArrayHoldingAnyType': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/array_of_array_of_number_only.py b/samples/openapi3/client/petstore/python/petstore_api/model/array_of_array_of_number_only.py index 5237741d83..c2cad28411 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/array_of_array_of_number_only.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/array_of_array_of_number_only.py @@ -56,12 +56,12 @@ class ArrayOfArrayOfNumberOnly( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, decimal.Decimal, int, float, ]], typing.List[typing.Union[MetaOapg.items, decimal.Decimal, int, float, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, decimal.Decimal, int, float, ]], typing.List[typing.Union[MetaOapg.items, decimal.Decimal, int, float, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'items': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -70,12 +70,12 @@ class ArrayOfArrayOfNumberOnly( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, list, tuple, ]], typing.List[typing.Union[MetaOapg.items, list, tuple, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, list, tuple, ]], typing.List[typing.Union[MetaOapg.items, list, tuple, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'ArrayArrayNumber': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -108,14 +108,14 @@ class ArrayOfArrayOfNumberOnly( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], ArrayArrayNumber: typing.Union[MetaOapg.properties.ArrayArrayNumber, list, tuple, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'ArrayOfArrayOfNumberOnly': return super().__new__( cls, - *args, + *_args, ArrayArrayNumber=ArrayArrayNumber, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/array_of_array_of_number_only.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/array_of_array_of_number_only.pyi index 5237741d83..c2cad28411 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/array_of_array_of_number_only.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/array_of_array_of_number_only.pyi @@ -56,12 +56,12 @@ class ArrayOfArrayOfNumberOnly( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, decimal.Decimal, int, float, ]], typing.List[typing.Union[MetaOapg.items, decimal.Decimal, int, float, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, decimal.Decimal, int, float, ]], typing.List[typing.Union[MetaOapg.items, decimal.Decimal, int, float, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'items': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -70,12 +70,12 @@ class ArrayOfArrayOfNumberOnly( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, list, tuple, ]], typing.List[typing.Union[MetaOapg.items, list, tuple, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, list, tuple, ]], typing.List[typing.Union[MetaOapg.items, list, tuple, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'ArrayArrayNumber': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -108,14 +108,14 @@ class ArrayOfArrayOfNumberOnly( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], ArrayArrayNumber: typing.Union[MetaOapg.properties.ArrayArrayNumber, list, tuple, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'ArrayOfArrayOfNumberOnly': return super().__new__( cls, - *args, + *_args, ArrayArrayNumber=ArrayArrayNumber, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/array_of_enums.py b/samples/openapi3/client/petstore/python/petstore_api/model/array_of_enums.py index d7eb9d4838..1be72e32c3 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/array_of_enums.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/array_of_enums.py @@ -41,12 +41,12 @@ class ArrayOfEnums( def __new__( cls, - arg: typing.Union[typing.Tuple['StringEnum'], typing.List['StringEnum']], + _arg: typing.Union[typing.Tuple['StringEnum'], typing.List['StringEnum']], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'ArrayOfEnums': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/array_of_enums.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/array_of_enums.pyi index d7eb9d4838..1be72e32c3 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/array_of_enums.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/array_of_enums.pyi @@ -41,12 +41,12 @@ class ArrayOfEnums( def __new__( cls, - arg: typing.Union[typing.Tuple['StringEnum'], typing.List['StringEnum']], + _arg: typing.Union[typing.Tuple['StringEnum'], typing.List['StringEnum']], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'ArrayOfEnums': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/array_of_number_only.py b/samples/openapi3/client/petstore/python/petstore_api/model/array_of_number_only.py index 9c5a9b55d2..6a9731e65c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/array_of_number_only.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/array_of_number_only.py @@ -48,12 +48,12 @@ class ArrayOfNumberOnly( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, decimal.Decimal, int, float, ]], typing.List[typing.Union[MetaOapg.items, decimal.Decimal, int, float, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, decimal.Decimal, int, float, ]], typing.List[typing.Union[MetaOapg.items, decimal.Decimal, int, float, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'ArrayNumber': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -86,14 +86,14 @@ class ArrayOfNumberOnly( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], ArrayNumber: typing.Union[MetaOapg.properties.ArrayNumber, list, tuple, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'ArrayOfNumberOnly': return super().__new__( cls, - *args, + *_args, ArrayNumber=ArrayNumber, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/array_of_number_only.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/array_of_number_only.pyi index 9c5a9b55d2..6a9731e65c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/array_of_number_only.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/array_of_number_only.pyi @@ -48,12 +48,12 @@ class ArrayOfNumberOnly( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, decimal.Decimal, int, float, ]], typing.List[typing.Union[MetaOapg.items, decimal.Decimal, int, float, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, decimal.Decimal, int, float, ]], typing.List[typing.Union[MetaOapg.items, decimal.Decimal, int, float, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'ArrayNumber': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -86,14 +86,14 @@ class ArrayOfNumberOnly( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], ArrayNumber: typing.Union[MetaOapg.properties.ArrayNumber, list, tuple, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'ArrayOfNumberOnly': return super().__new__( cls, - *args, + *_args, ArrayNumber=ArrayNumber, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/array_test.py b/samples/openapi3/client/petstore/python/petstore_api/model/array_test.py index d53b0df62d..e17a16af2a 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/array_test.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/array_test.py @@ -48,12 +48,12 @@ class ArrayTest( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'array_of_string': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -79,12 +79,12 @@ class ArrayTest( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, decimal.Decimal, int, ]], typing.List[typing.Union[MetaOapg.items, decimal.Decimal, int, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, decimal.Decimal, int, ]], typing.List[typing.Union[MetaOapg.items, decimal.Decimal, int, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'items': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -93,12 +93,12 @@ class ArrayTest( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, list, tuple, ]], typing.List[typing.Union[MetaOapg.items, list, tuple, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, list, tuple, ]], typing.List[typing.Union[MetaOapg.items, list, tuple, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'array_array_of_integer': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -127,12 +127,12 @@ class ArrayTest( def __new__( cls, - arg: typing.Union[typing.Tuple['ReadOnlyFirst'], typing.List['ReadOnlyFirst']], + _arg: typing.Union[typing.Tuple['ReadOnlyFirst'], typing.List['ReadOnlyFirst']], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'items': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -141,12 +141,12 @@ class ArrayTest( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, list, tuple, ]], typing.List[typing.Union[MetaOapg.items, list, tuple, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, list, tuple, ]], typing.List[typing.Union[MetaOapg.items, list, tuple, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'array_array_of_model': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -193,7 +193,7 @@ class ArrayTest( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], array_of_string: typing.Union[MetaOapg.properties.array_of_string, list, tuple, schemas.Unset] = schemas.unset, array_array_of_integer: typing.Union[MetaOapg.properties.array_array_of_integer, list, tuple, schemas.Unset] = schemas.unset, array_array_of_model: typing.Union[MetaOapg.properties.array_array_of_model, list, tuple, schemas.Unset] = schemas.unset, @@ -202,7 +202,7 @@ class ArrayTest( ) -> 'ArrayTest': return super().__new__( cls, - *args, + *_args, array_of_string=array_of_string, array_array_of_integer=array_array_of_integer, array_array_of_model=array_array_of_model, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/array_test.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/array_test.pyi index d53b0df62d..e17a16af2a 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/array_test.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/array_test.pyi @@ -48,12 +48,12 @@ class ArrayTest( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'array_of_string': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -79,12 +79,12 @@ class ArrayTest( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, decimal.Decimal, int, ]], typing.List[typing.Union[MetaOapg.items, decimal.Decimal, int, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, decimal.Decimal, int, ]], typing.List[typing.Union[MetaOapg.items, decimal.Decimal, int, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'items': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -93,12 +93,12 @@ class ArrayTest( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, list, tuple, ]], typing.List[typing.Union[MetaOapg.items, list, tuple, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, list, tuple, ]], typing.List[typing.Union[MetaOapg.items, list, tuple, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'array_array_of_integer': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -127,12 +127,12 @@ class ArrayTest( def __new__( cls, - arg: typing.Union[typing.Tuple['ReadOnlyFirst'], typing.List['ReadOnlyFirst']], + _arg: typing.Union[typing.Tuple['ReadOnlyFirst'], typing.List['ReadOnlyFirst']], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'items': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -141,12 +141,12 @@ class ArrayTest( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, list, tuple, ]], typing.List[typing.Union[MetaOapg.items, list, tuple, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, list, tuple, ]], typing.List[typing.Union[MetaOapg.items, list, tuple, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'array_array_of_model': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -193,7 +193,7 @@ class ArrayTest( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], array_of_string: typing.Union[MetaOapg.properties.array_of_string, list, tuple, schemas.Unset] = schemas.unset, array_array_of_integer: typing.Union[MetaOapg.properties.array_array_of_integer, list, tuple, schemas.Unset] = schemas.unset, array_array_of_model: typing.Union[MetaOapg.properties.array_array_of_model, list, tuple, schemas.Unset] = schemas.unset, @@ -202,7 +202,7 @@ class ArrayTest( ) -> 'ArrayTest': return super().__new__( cls, - *args, + *_args, array_of_string=array_of_string, array_array_of_integer=array_array_of_integer, array_array_of_model=array_array_of_model, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/array_with_validations_in_items.py b/samples/openapi3/client/petstore/python/petstore_api/model/array_with_validations_in_items.py index f68cb1a4c2..4871e13359 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/array_with_validations_in_items.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/array_with_validations_in_items.py @@ -48,12 +48,12 @@ class ArrayWithValidationsInItems( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, decimal.Decimal, int, ]], typing.List[typing.Union[MetaOapg.items, decimal.Decimal, int, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, decimal.Decimal, int, ]], typing.List[typing.Union[MetaOapg.items, decimal.Decimal, int, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'ArrayWithValidationsInItems': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/array_with_validations_in_items.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/array_with_validations_in_items.pyi index 2f1d07e328..4adeeacb60 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/array_with_validations_in_items.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/array_with_validations_in_items.pyi @@ -43,12 +43,12 @@ class ArrayWithValidationsInItems( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, decimal.Decimal, int, ]], typing.List[typing.Union[MetaOapg.items, decimal.Decimal, int, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, decimal.Decimal, int, ]], typing.List[typing.Union[MetaOapg.items, decimal.Decimal, int, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'ArrayWithValidationsInItems': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/banana.py b/samples/openapi3/client/petstore/python/petstore_api/model/banana.py index b3d1c7d792..e98306eb7d 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/banana.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/banana.py @@ -69,14 +69,14 @@ class Banana( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], lengthCm: typing.Union[MetaOapg.properties.lengthCm, decimal.Decimal, int, float, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'Banana': return super().__new__( cls, - *args, + *_args, lengthCm=lengthCm, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/banana.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/banana.pyi index b3d1c7d792..e98306eb7d 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/banana.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/banana.pyi @@ -69,14 +69,14 @@ class Banana( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], lengthCm: typing.Union[MetaOapg.properties.lengthCm, decimal.Decimal, int, float, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'Banana': return super().__new__( cls, - *args, + *_args, lengthCm=lengthCm, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/banana_req.py b/samples/openapi3/client/petstore/python/petstore_api/model/banana_req.py index 1fdfa7d34a..0fd0634e23 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/banana_req.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/banana_req.py @@ -70,14 +70,14 @@ class BananaReq( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], lengthCm: typing.Union[MetaOapg.properties.lengthCm, decimal.Decimal, int, float, ], sweet: typing.Union[MetaOapg.properties.sweet, bool, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'BananaReq': return super().__new__( cls, - *args, + *_args, lengthCm=lengthCm, sweet=sweet, _configuration=_configuration, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/banana_req.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/banana_req.pyi index 1fdfa7d34a..0fd0634e23 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/banana_req.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/banana_req.pyi @@ -70,14 +70,14 @@ class BananaReq( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], lengthCm: typing.Union[MetaOapg.properties.lengthCm, decimal.Decimal, int, float, ], sweet: typing.Union[MetaOapg.properties.sweet, bool, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'BananaReq': return super().__new__( cls, - *args, + *_args, lengthCm=lengthCm, sweet=sweet, _configuration=_configuration, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/basque_pig.py b/samples/openapi3/client/petstore/python/petstore_api/model/basque_pig.py index 528cfa498b..89ea200394 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/basque_pig.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/basque_pig.py @@ -84,14 +84,14 @@ class BasquePig( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], className: typing.Union[MetaOapg.properties.className, str, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'BasquePig': return super().__new__( cls, - *args, + *_args, className=className, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/basque_pig.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/basque_pig.pyi index 8b36451f84..9eaea822ed 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/basque_pig.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/basque_pig.pyi @@ -78,14 +78,14 @@ class BasquePig( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], className: typing.Union[MetaOapg.properties.className, str, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'BasquePig': return super().__new__( cls, - *args, + *_args, className=className, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/capitalization.py b/samples/openapi3/client/petstore/python/petstore_api/model/capitalization.py index 3dc195865d..b8888bde18 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/capitalization.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/capitalization.py @@ -104,7 +104,7 @@ class Capitalization( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], smallCamel: typing.Union[MetaOapg.properties.smallCamel, str, schemas.Unset] = schemas.unset, CapitalCamel: typing.Union[MetaOapg.properties.CapitalCamel, str, schemas.Unset] = schemas.unset, small_Snake: typing.Union[MetaOapg.properties.small_Snake, str, schemas.Unset] = schemas.unset, @@ -116,7 +116,7 @@ class Capitalization( ) -> 'Capitalization': return super().__new__( cls, - *args, + *_args, smallCamel=smallCamel, CapitalCamel=CapitalCamel, small_Snake=small_Snake, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/capitalization.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/capitalization.pyi index 3dc195865d..b8888bde18 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/capitalization.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/capitalization.pyi @@ -104,7 +104,7 @@ class Capitalization( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], smallCamel: typing.Union[MetaOapg.properties.smallCamel, str, schemas.Unset] = schemas.unset, CapitalCamel: typing.Union[MetaOapg.properties.CapitalCamel, str, schemas.Unset] = schemas.unset, small_Snake: typing.Union[MetaOapg.properties.small_Snake, str, schemas.Unset] = schemas.unset, @@ -116,7 +116,7 @@ class Capitalization( ) -> 'Capitalization': return super().__new__( cls, - *args, + *_args, smallCamel=smallCamel, CapitalCamel=CapitalCamel, small_Snake=small_Snake, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/cat.py b/samples/openapi3/client/petstore/python/petstore_api/model/cat.py index da07def367..0545d82aca 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/cat.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/cat.py @@ -72,14 +72,14 @@ class Cat( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], declawed: typing.Union[MetaOapg.properties.declawed, bool, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'all_of_1': return super().__new__( cls, - *args, + *_args, declawed=declawed, _configuration=_configuration, **kwargs, @@ -103,13 +103,13 @@ class Cat( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'Cat': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/cat.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/cat.pyi index da07def367..0545d82aca 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/cat.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/cat.pyi @@ -72,14 +72,14 @@ class Cat( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], declawed: typing.Union[MetaOapg.properties.declawed, bool, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'all_of_1': return super().__new__( cls, - *args, + *_args, declawed=declawed, _configuration=_configuration, **kwargs, @@ -103,13 +103,13 @@ class Cat( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'Cat': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/category.py b/samples/openapi3/client/petstore/python/petstore_api/model/category.py index 5537a4437b..ed26c6fe29 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/category.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/category.py @@ -77,7 +77,7 @@ class Category( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], name: typing.Union[MetaOapg.properties.name, str, ], id: typing.Union[MetaOapg.properties.id, decimal.Decimal, int, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, @@ -85,7 +85,7 @@ class Category( ) -> 'Category': return super().__new__( cls, - *args, + *_args, name=name, id=id, _configuration=_configuration, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/category.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/category.pyi index 5537a4437b..ed26c6fe29 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/category.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/category.pyi @@ -77,7 +77,7 @@ class Category( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], name: typing.Union[MetaOapg.properties.name, str, ], id: typing.Union[MetaOapg.properties.id, decimal.Decimal, int, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, @@ -85,7 +85,7 @@ class Category( ) -> 'Category': return super().__new__( cls, - *args, + *_args, name=name, id=id, _configuration=_configuration, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/child_cat.py b/samples/openapi3/client/petstore/python/petstore_api/model/child_cat.py index 32db862b8a..e17837b7a4 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/child_cat.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/child_cat.py @@ -72,14 +72,14 @@ class ChildCat( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'all_of_1': return super().__new__( cls, - *args, + *_args, name=name, _configuration=_configuration, **kwargs, @@ -103,13 +103,13 @@ class ChildCat( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'ChildCat': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/child_cat.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/child_cat.pyi index 32db862b8a..e17837b7a4 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/child_cat.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/child_cat.pyi @@ -72,14 +72,14 @@ class ChildCat( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'all_of_1': return super().__new__( cls, - *args, + *_args, name=name, _configuration=_configuration, **kwargs, @@ -103,13 +103,13 @@ class ChildCat( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'ChildCat': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/class_model.py b/samples/openapi3/client/petstore/python/petstore_api/model/class_model.py index 75d36e823c..cf43a386a7 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/class_model.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/class_model.py @@ -67,14 +67,14 @@ class ClassModel( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _class: typing.Union[MetaOapg.properties._class, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'ClassModel': return super().__new__( cls, - *args, + *_args, _class=_class, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/class_model.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/class_model.pyi index 75d36e823c..cf43a386a7 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/class_model.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/class_model.pyi @@ -67,14 +67,14 @@ class ClassModel( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _class: typing.Union[MetaOapg.properties._class, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'ClassModel': return super().__new__( cls, - *args, + *_args, _class=_class, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/client.py b/samples/openapi3/client/petstore/python/petstore_api/model/client.py index 4c7c16b564..fb8e65556d 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/client.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/client.py @@ -64,14 +64,14 @@ class Client( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], client: typing.Union[MetaOapg.properties.client, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'Client': return super().__new__( cls, - *args, + *_args, client=client, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/client.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/client.pyi index 4c7c16b564..fb8e65556d 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/client.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/client.pyi @@ -64,14 +64,14 @@ class Client( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], client: typing.Union[MetaOapg.properties.client, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'Client': return super().__new__( cls, - *args, + *_args, client=client, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/complex_quadrilateral.py b/samples/openapi3/client/petstore/python/petstore_api/model/complex_quadrilateral.py index 434c2c0c77..e24a3e3b0b 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/complex_quadrilateral.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/complex_quadrilateral.py @@ -87,14 +87,14 @@ class ComplexQuadrilateral( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], quadrilateralType: typing.Union[MetaOapg.properties.quadrilateralType, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'all_of_1': return super().__new__( cls, - *args, + *_args, quadrilateralType=quadrilateralType, _configuration=_configuration, **kwargs, @@ -118,13 +118,13 @@ class ComplexQuadrilateral( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'ComplexQuadrilateral': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/complex_quadrilateral.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/complex_quadrilateral.pyi index 43d8724caa..efaa4be332 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/complex_quadrilateral.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/complex_quadrilateral.pyi @@ -81,14 +81,14 @@ class ComplexQuadrilateral( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], quadrilateralType: typing.Union[MetaOapg.properties.quadrilateralType, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'all_of_1': return super().__new__( cls, - *args, + *_args, quadrilateralType=quadrilateralType, _configuration=_configuration, **kwargs, @@ -112,13 +112,13 @@ class ComplexQuadrilateral( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'ComplexQuadrilateral': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/composed_any_of_different_types_no_validations.py b/samples/openapi3/client/petstore/python/petstore_api/model/composed_any_of_different_types_no_validations.py index 9e077ff0db..85e9296899 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/composed_any_of_different_types_no_validations.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/composed_any_of_different_types_no_validations.py @@ -55,12 +55,12 @@ class ComposedAnyOfDifferentTypesNoValidations( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'any_of_9': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -105,13 +105,13 @@ class ComposedAnyOfDifferentTypesNoValidations( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'ComposedAnyOfDifferentTypesNoValidations': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/composed_any_of_different_types_no_validations.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/composed_any_of_different_types_no_validations.pyi index 9e077ff0db..85e9296899 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/composed_any_of_different_types_no_validations.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/composed_any_of_different_types_no_validations.pyi @@ -55,12 +55,12 @@ class ComposedAnyOfDifferentTypesNoValidations( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'any_of_9': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -105,13 +105,13 @@ class ComposedAnyOfDifferentTypesNoValidations( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'ComposedAnyOfDifferentTypesNoValidations': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/composed_array.py b/samples/openapi3/client/petstore/python/petstore_api/model/composed_array.py index 41e7107528..792eb8c78a 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/composed_array.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/composed_array.py @@ -38,12 +38,12 @@ class ComposedArray( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'ComposedArray': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/composed_array.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/composed_array.pyi index 41e7107528..792eb8c78a 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/composed_array.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/composed_array.pyi @@ -38,12 +38,12 @@ class ComposedArray( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'ComposedArray': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/composed_bool.py b/samples/openapi3/client/petstore/python/petstore_api/model/composed_bool.py index 4a42a8626d..9252324147 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/composed_bool.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/composed_bool.py @@ -54,11 +54,11 @@ class ComposedBool( def __new__( cls, - *args: typing.Union[bool, ], + *_args: typing.Union[bool, ], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'ComposedBool': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/composed_bool.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/composed_bool.pyi index 4a42a8626d..9252324147 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/composed_bool.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/composed_bool.pyi @@ -54,11 +54,11 @@ class ComposedBool( def __new__( cls, - *args: typing.Union[bool, ], + *_args: typing.Union[bool, ], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'ComposedBool': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/composed_none.py b/samples/openapi3/client/petstore/python/petstore_api/model/composed_none.py index f442971abb..5facdd344b 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/composed_none.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/composed_none.py @@ -54,11 +54,11 @@ class ComposedNone( def __new__( cls, - *args: typing.Union[None, ], + *_args: typing.Union[None, ], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'ComposedNone': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/composed_none.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/composed_none.pyi index f442971abb..5facdd344b 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/composed_none.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/composed_none.pyi @@ -54,11 +54,11 @@ class ComposedNone( def __new__( cls, - *args: typing.Union[None, ], + *_args: typing.Union[None, ], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'ComposedNone': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/composed_number.py b/samples/openapi3/client/petstore/python/petstore_api/model/composed_number.py index 36f53dbf21..b417ee0ee6 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/composed_number.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/composed_number.py @@ -54,11 +54,11 @@ class ComposedNumber( def __new__( cls, - *args: typing.Union[decimal.Decimal, int, float, ], + *_args: typing.Union[decimal.Decimal, int, float, ], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'ComposedNumber': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/composed_number.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/composed_number.pyi index 36f53dbf21..b417ee0ee6 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/composed_number.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/composed_number.pyi @@ -54,11 +54,11 @@ class ComposedNumber( def __new__( cls, - *args: typing.Union[decimal.Decimal, int, float, ], + *_args: typing.Union[decimal.Decimal, int, float, ], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'ComposedNumber': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/composed_object.py b/samples/openapi3/client/petstore/python/petstore_api/model/composed_object.py index 44171746f1..474f09ef8e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/composed_object.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/composed_object.py @@ -54,13 +54,13 @@ class ComposedObject( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'ComposedObject': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/composed_object.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/composed_object.pyi index 44171746f1..474f09ef8e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/composed_object.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/composed_object.pyi @@ -54,13 +54,13 @@ class ComposedObject( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'ComposedObject': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/composed_one_of_different_types.py b/samples/openapi3/client/petstore/python/petstore_api/model/composed_one_of_different_types.py index b3cf4aea1c..a49a14190e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/composed_one_of_different_types.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/composed_one_of_different_types.py @@ -51,13 +51,13 @@ class ComposedOneOfDifferentTypes( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'one_of_4': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -75,12 +75,12 @@ class ComposedOneOfDifferentTypes( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'one_of_5': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -122,13 +122,13 @@ class ComposedOneOfDifferentTypes( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'ComposedOneOfDifferentTypes': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/composed_one_of_different_types.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/composed_one_of_different_types.pyi index 0fd6b4dd0f..3e108524af 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/composed_one_of_different_types.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/composed_one_of_different_types.pyi @@ -46,13 +46,13 @@ class ComposedOneOfDifferentTypes( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'one_of_4': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -68,12 +68,12 @@ class ComposedOneOfDifferentTypes( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'one_of_5': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -109,13 +109,13 @@ class ComposedOneOfDifferentTypes( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'ComposedOneOfDifferentTypes': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/composed_string.py b/samples/openapi3/client/petstore/python/petstore_api/model/composed_string.py index 50d61de169..23be061de4 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/composed_string.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/composed_string.py @@ -54,11 +54,11 @@ class ComposedString( def __new__( cls, - *args: typing.Union[str, ], + *_args: typing.Union[str, ], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'ComposedString': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/composed_string.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/composed_string.pyi index 50d61de169..23be061de4 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/composed_string.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/composed_string.pyi @@ -54,11 +54,11 @@ class ComposedString( def __new__( cls, - *args: typing.Union[str, ], + *_args: typing.Union[str, ], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'ComposedString': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/danish_pig.py b/samples/openapi3/client/petstore/python/petstore_api/model/danish_pig.py index bcffd8ff00..b6081d20e2 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/danish_pig.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/danish_pig.py @@ -84,14 +84,14 @@ class DanishPig( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], className: typing.Union[MetaOapg.properties.className, str, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'DanishPig': return super().__new__( cls, - *args, + *_args, className=className, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/danish_pig.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/danish_pig.pyi index 9f64db8274..f67a4b5d8c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/danish_pig.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/danish_pig.pyi @@ -78,14 +78,14 @@ class DanishPig( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], className: typing.Union[MetaOapg.properties.className, str, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'DanishPig': return super().__new__( cls, - *args, + *_args, className=className, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/dog.py b/samples/openapi3/client/petstore/python/petstore_api/model/dog.py index a8dd43038d..aa5ccd90aa 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/dog.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/dog.py @@ -72,14 +72,14 @@ class Dog( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], breed: typing.Union[MetaOapg.properties.breed, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'all_of_1': return super().__new__( cls, - *args, + *_args, breed=breed, _configuration=_configuration, **kwargs, @@ -103,13 +103,13 @@ class Dog( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'Dog': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/dog.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/dog.pyi index a8dd43038d..aa5ccd90aa 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/dog.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/dog.pyi @@ -72,14 +72,14 @@ class Dog( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], breed: typing.Union[MetaOapg.properties.breed, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'all_of_1': return super().__new__( cls, - *args, + *_args, breed=breed, _configuration=_configuration, **kwargs, @@ -103,13 +103,13 @@ class Dog( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'Dog': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/drawing.py b/samples/openapi3/client/petstore/python/petstore_api/model/drawing.py index 9c7b54ae9c..b4b8da6a73 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/drawing.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/drawing.py @@ -63,12 +63,12 @@ class Drawing( def __new__( cls, - arg: typing.Union[typing.Tuple['Shape'], typing.List['Shape']], + _arg: typing.Union[typing.Tuple['Shape'], typing.List['Shape']], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'shapes': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -124,7 +124,7 @@ class Drawing( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], mainShape: typing.Union['Shape', schemas.Unset] = schemas.unset, shapeOrNull: typing.Union['ShapeOrNull', schemas.Unset] = schemas.unset, nullableShape: typing.Union['NullableShape', schemas.Unset] = schemas.unset, @@ -134,7 +134,7 @@ class Drawing( ) -> 'Drawing': return super().__new__( cls, - *args, + *_args, mainShape=mainShape, shapeOrNull=shapeOrNull, nullableShape=nullableShape, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/drawing.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/drawing.pyi index 9c7b54ae9c..b4b8da6a73 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/drawing.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/drawing.pyi @@ -63,12 +63,12 @@ class Drawing( def __new__( cls, - arg: typing.Union[typing.Tuple['Shape'], typing.List['Shape']], + _arg: typing.Union[typing.Tuple['Shape'], typing.List['Shape']], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'shapes': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -124,7 +124,7 @@ class Drawing( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], mainShape: typing.Union['Shape', schemas.Unset] = schemas.unset, shapeOrNull: typing.Union['ShapeOrNull', schemas.Unset] = schemas.unset, nullableShape: typing.Union['NullableShape', schemas.Unset] = schemas.unset, @@ -134,7 +134,7 @@ class Drawing( ) -> 'Drawing': return super().__new__( cls, - *args, + *_args, mainShape=mainShape, shapeOrNull=shapeOrNull, nullableShape=nullableShape, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/enum_arrays.py b/samples/openapi3/client/petstore/python/petstore_api/model/enum_arrays.py index 1e7e0843da..37e81347d5 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/enum_arrays.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/enum_arrays.py @@ -89,12 +89,12 @@ class EnumArrays( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'array_enum': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -134,7 +134,7 @@ class EnumArrays( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], just_symbol: typing.Union[MetaOapg.properties.just_symbol, str, schemas.Unset] = schemas.unset, array_enum: typing.Union[MetaOapg.properties.array_enum, list, tuple, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, @@ -142,7 +142,7 @@ class EnumArrays( ) -> 'EnumArrays': return super().__new__( cls, - *args, + *_args, just_symbol=just_symbol, array_enum=array_enum, _configuration=_configuration, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/enum_arrays.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/enum_arrays.pyi index 31b854f7d1..ec85821f0e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/enum_arrays.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/enum_arrays.pyi @@ -75,12 +75,12 @@ class EnumArrays( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'array_enum': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -120,7 +120,7 @@ class EnumArrays( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], just_symbol: typing.Union[MetaOapg.properties.just_symbol, str, schemas.Unset] = schemas.unset, array_enum: typing.Union[MetaOapg.properties.array_enum, list, tuple, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, @@ -128,7 +128,7 @@ class EnumArrays( ) -> 'EnumArrays': return super().__new__( cls, - *args, + *_args, just_symbol=just_symbol, array_enum=array_enum, _configuration=_configuration, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/enum_test.py b/samples/openapi3/client/petstore/python/petstore_api/model/enum_test.py index 094073cddc..2642717145 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/enum_test.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/enum_test.py @@ -240,7 +240,7 @@ class EnumTest( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], enum_string_required: typing.Union[MetaOapg.properties.enum_string_required, str, ], enum_string: typing.Union[MetaOapg.properties.enum_string, str, schemas.Unset] = schemas.unset, enum_integer: typing.Union[MetaOapg.properties.enum_integer, decimal.Decimal, int, schemas.Unset] = schemas.unset, @@ -255,7 +255,7 @@ class EnumTest( ) -> 'EnumTest': return super().__new__( cls, - *args, + *_args, enum_string_required=enum_string_required, enum_string=enum_string, enum_integer=enum_integer, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/enum_test.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/enum_test.pyi index 1f885dcf36..7cfb414bb0 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/enum_test.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/enum_test.pyi @@ -208,7 +208,7 @@ class EnumTest( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], enum_string_required: typing.Union[MetaOapg.properties.enum_string_required, str, ], enum_string: typing.Union[MetaOapg.properties.enum_string, str, schemas.Unset] = schemas.unset, enum_integer: typing.Union[MetaOapg.properties.enum_integer, decimal.Decimal, int, schemas.Unset] = schemas.unset, @@ -223,7 +223,7 @@ class EnumTest( ) -> 'EnumTest': return super().__new__( cls, - *args, + *_args, enum_string_required=enum_string_required, enum_string=enum_string, enum_integer=enum_integer, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/equilateral_triangle.py b/samples/openapi3/client/petstore/python/petstore_api/model/equilateral_triangle.py index a45ac99de8..1d2acc4177 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/equilateral_triangle.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/equilateral_triangle.py @@ -87,14 +87,14 @@ class EquilateralTriangle( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], triangleType: typing.Union[MetaOapg.properties.triangleType, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'all_of_1': return super().__new__( cls, - *args, + *_args, triangleType=triangleType, _configuration=_configuration, **kwargs, @@ -118,13 +118,13 @@ class EquilateralTriangle( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'EquilateralTriangle': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/equilateral_triangle.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/equilateral_triangle.pyi index 7e9d4d3802..120edbf1a2 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/equilateral_triangle.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/equilateral_triangle.pyi @@ -81,14 +81,14 @@ class EquilateralTriangle( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], triangleType: typing.Union[MetaOapg.properties.triangleType, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'all_of_1': return super().__new__( cls, - *args, + *_args, triangleType=triangleType, _configuration=_configuration, **kwargs, @@ -112,13 +112,13 @@ class EquilateralTriangle( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'EquilateralTriangle': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/file.py b/samples/openapi3/client/petstore/python/petstore_api/model/file.py index 886f7a62d3..9a159ffe89 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/file.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/file.py @@ -66,14 +66,14 @@ class File( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], sourceURI: typing.Union[MetaOapg.properties.sourceURI, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'File': return super().__new__( cls, - *args, + *_args, sourceURI=sourceURI, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/file.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/file.pyi index 886f7a62d3..9a159ffe89 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/file.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/file.pyi @@ -66,14 +66,14 @@ class File( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], sourceURI: typing.Union[MetaOapg.properties.sourceURI, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'File': return super().__new__( cls, - *args, + *_args, sourceURI=sourceURI, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/file_schema_test_class.py b/samples/openapi3/client/petstore/python/petstore_api/model/file_schema_test_class.py index e9320d9a0e..1a0851a5c4 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/file_schema_test_class.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/file_schema_test_class.py @@ -55,12 +55,12 @@ class FileSchemaTestClass( def __new__( cls, - arg: typing.Union[typing.Tuple['File'], typing.List['File']], + _arg: typing.Union[typing.Tuple['File'], typing.List['File']], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'files': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -100,7 +100,7 @@ class FileSchemaTestClass( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], file: typing.Union['File', schemas.Unset] = schemas.unset, files: typing.Union[MetaOapg.properties.files, list, tuple, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, @@ -108,7 +108,7 @@ class FileSchemaTestClass( ) -> 'FileSchemaTestClass': return super().__new__( cls, - *args, + *_args, file=file, files=files, _configuration=_configuration, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/file_schema_test_class.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/file_schema_test_class.pyi index e9320d9a0e..1a0851a5c4 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/file_schema_test_class.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/file_schema_test_class.pyi @@ -55,12 +55,12 @@ class FileSchemaTestClass( def __new__( cls, - arg: typing.Union[typing.Tuple['File'], typing.List['File']], + _arg: typing.Union[typing.Tuple['File'], typing.List['File']], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'files': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -100,7 +100,7 @@ class FileSchemaTestClass( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], file: typing.Union['File', schemas.Unset] = schemas.unset, files: typing.Union[MetaOapg.properties.files, list, tuple, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, @@ -108,7 +108,7 @@ class FileSchemaTestClass( ) -> 'FileSchemaTestClass': return super().__new__( cls, - *args, + *_args, file=file, files=files, _configuration=_configuration, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/foo.py b/samples/openapi3/client/petstore/python/petstore_api/model/foo.py index ce7d00afa0..e77d76a165 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/foo.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/foo.py @@ -64,14 +64,14 @@ class Foo( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], bar: typing.Union[MetaOapg.properties.bar, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'Foo': return super().__new__( cls, - *args, + *_args, bar=bar, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/foo.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/foo.pyi index ce7d00afa0..e77d76a165 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/foo.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/foo.pyi @@ -64,14 +64,14 @@ class Foo( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], bar: typing.Union[MetaOapg.properties.bar, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'Foo': return super().__new__( cls, - *args, + *_args, bar=bar, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/format_test.py b/samples/openapi3/client/petstore/python/petstore_api/model/format_test.py index b16b10a048..a734b96135 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/format_test.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/format_test.py @@ -127,12 +127,12 @@ class FormatTest( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, decimal.Decimal, int, float, ]], typing.List[typing.Union[MetaOapg.items, decimal.Decimal, int, float, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, decimal.Decimal, int, float, ]], typing.List[typing.Union[MetaOapg.items, decimal.Decimal, int, float, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'arrayWithUniqueItems': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -354,7 +354,7 @@ class FormatTest( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], date: typing.Union[MetaOapg.properties.date, str, date, ], number: typing.Union[MetaOapg.properties.number, decimal.Decimal, int, float, ], password: typing.Union[MetaOapg.properties.password, str, ], @@ -380,7 +380,7 @@ class FormatTest( ) -> 'FormatTest': return super().__new__( cls, - *args, + *_args, date=date, number=number, password=password, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/format_test.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/format_test.pyi index dc49d47fd8..54eb193a6d 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/format_test.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/format_test.pyi @@ -96,12 +96,12 @@ class FormatTest( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, decimal.Decimal, int, float, ]], typing.List[typing.Union[MetaOapg.items, decimal.Decimal, int, float, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, decimal.Decimal, int, float, ]], typing.List[typing.Union[MetaOapg.items, decimal.Decimal, int, float, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'arrayWithUniqueItems': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -302,7 +302,7 @@ class FormatTest( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], date: typing.Union[MetaOapg.properties.date, str, date, ], number: typing.Union[MetaOapg.properties.number, decimal.Decimal, int, float, ], password: typing.Union[MetaOapg.properties.password, str, ], @@ -328,7 +328,7 @@ class FormatTest( ) -> 'FormatTest': return super().__new__( cls, - *args, + *_args, date=date, number=number, password=password, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/from_schema.py b/samples/openapi3/client/petstore/python/petstore_api/model/from_schema.py index 556b85187c..637d16a5ea 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/from_schema.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/from_schema.py @@ -72,7 +72,7 @@ class FromSchema( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], data: typing.Union[MetaOapg.properties.data, str, schemas.Unset] = schemas.unset, id: typing.Union[MetaOapg.properties.id, decimal.Decimal, int, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, @@ -80,7 +80,7 @@ class FromSchema( ) -> 'FromSchema': return super().__new__( cls, - *args, + *_args, data=data, id=id, _configuration=_configuration, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/from_schema.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/from_schema.pyi index 556b85187c..637d16a5ea 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/from_schema.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/from_schema.pyi @@ -72,7 +72,7 @@ class FromSchema( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], data: typing.Union[MetaOapg.properties.data, str, schemas.Unset] = schemas.unset, id: typing.Union[MetaOapg.properties.id, decimal.Decimal, int, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, @@ -80,7 +80,7 @@ class FromSchema( ) -> 'FromSchema': return super().__new__( cls, - *args, + *_args, data=data, id=id, _configuration=_configuration, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/fruit.py b/samples/openapi3/client/petstore/python/petstore_api/model/fruit.py index 056b33f22f..892ccdbf6e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/fruit.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/fruit.py @@ -80,14 +80,14 @@ class Fruit( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], color: typing.Union[MetaOapg.properties.color, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'Fruit': return super().__new__( cls, - *args, + *_args, color=color, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/fruit.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/fruit.pyi index 056b33f22f..892ccdbf6e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/fruit.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/fruit.pyi @@ -80,14 +80,14 @@ class Fruit( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], color: typing.Union[MetaOapg.properties.color, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'Fruit': return super().__new__( cls, - *args, + *_args, color=color, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/fruit_req.py b/samples/openapi3/client/petstore/python/petstore_api/model/fruit_req.py index 18879cd45c..d95300a1ce 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/fruit_req.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/fruit_req.py @@ -55,13 +55,13 @@ class FruitReq( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'FruitReq': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/fruit_req.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/fruit_req.pyi index 18879cd45c..d95300a1ce 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/fruit_req.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/fruit_req.pyi @@ -55,13 +55,13 @@ class FruitReq( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'FruitReq': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/gm_fruit.py b/samples/openapi3/client/petstore/python/petstore_api/model/gm_fruit.py index 5646a4704e..07ebabbc3f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/gm_fruit.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/gm_fruit.py @@ -80,14 +80,14 @@ class GmFruit( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], color: typing.Union[MetaOapg.properties.color, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'GmFruit': return super().__new__( cls, - *args, + *_args, color=color, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/gm_fruit.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/gm_fruit.pyi index 5646a4704e..07ebabbc3f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/gm_fruit.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/gm_fruit.pyi @@ -80,14 +80,14 @@ class GmFruit( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], color: typing.Union[MetaOapg.properties.color, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'GmFruit': return super().__new__( cls, - *args, + *_args, color=color, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/grandparent_animal.py b/samples/openapi3/client/petstore/python/petstore_api/model/grandparent_animal.py index 838d96a814..08f64735dc 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/grandparent_animal.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/grandparent_animal.py @@ -78,14 +78,14 @@ class GrandparentAnimal( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], pet_type: typing.Union[MetaOapg.properties.pet_type, str, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'GrandparentAnimal': return super().__new__( cls, - *args, + *_args, pet_type=pet_type, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/grandparent_animal.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/grandparent_animal.pyi index 838d96a814..08f64735dc 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/grandparent_animal.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/grandparent_animal.pyi @@ -78,14 +78,14 @@ class GrandparentAnimal( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], pet_type: typing.Union[MetaOapg.properties.pet_type, str, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'GrandparentAnimal': return super().__new__( cls, - *args, + *_args, pet_type=pet_type, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/has_only_read_only.py b/samples/openapi3/client/petstore/python/petstore_api/model/has_only_read_only.py index f56f17aad8..809b27defd 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/has_only_read_only.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/has_only_read_only.py @@ -72,7 +72,7 @@ class HasOnlyReadOnly( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], bar: typing.Union[MetaOapg.properties.bar, str, schemas.Unset] = schemas.unset, foo: typing.Union[MetaOapg.properties.foo, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, @@ -80,7 +80,7 @@ class HasOnlyReadOnly( ) -> 'HasOnlyReadOnly': return super().__new__( cls, - *args, + *_args, bar=bar, foo=foo, _configuration=_configuration, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/has_only_read_only.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/has_only_read_only.pyi index f56f17aad8..809b27defd 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/has_only_read_only.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/has_only_read_only.pyi @@ -72,7 +72,7 @@ class HasOnlyReadOnly( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], bar: typing.Union[MetaOapg.properties.bar, str, schemas.Unset] = schemas.unset, foo: typing.Union[MetaOapg.properties.foo, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, @@ -80,7 +80,7 @@ class HasOnlyReadOnly( ) -> 'HasOnlyReadOnly': return super().__new__( cls, - *args, + *_args, bar=bar, foo=foo, _configuration=_configuration, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/health_check_result.py b/samples/openapi3/client/petstore/python/petstore_api/model/health_check_result.py index 840a5ad96f..be6712279e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/health_check_result.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/health_check_result.py @@ -50,12 +50,12 @@ class HealthCheckResult( def __new__( cls, - *args: typing.Union[None, str, ], + *_args: typing.Union[None, str, ], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'NullableMessage': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, ) __annotations__ = { @@ -85,14 +85,14 @@ class HealthCheckResult( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], NullableMessage: typing.Union[MetaOapg.properties.NullableMessage, None, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'HealthCheckResult': return super().__new__( cls, - *args, + *_args, NullableMessage=NullableMessage, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/health_check_result.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/health_check_result.pyi index 840a5ad96f..be6712279e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/health_check_result.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/health_check_result.pyi @@ -50,12 +50,12 @@ class HealthCheckResult( def __new__( cls, - *args: typing.Union[None, str, ], + *_args: typing.Union[None, str, ], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'NullableMessage': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, ) __annotations__ = { @@ -85,14 +85,14 @@ class HealthCheckResult( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], NullableMessage: typing.Union[MetaOapg.properties.NullableMessage, None, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'HealthCheckResult': return super().__new__( cls, - *args, + *_args, NullableMessage=NullableMessage, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/isosceles_triangle.py b/samples/openapi3/client/petstore/python/petstore_api/model/isosceles_triangle.py index ddce91c9b9..5ca02f0fa5 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/isosceles_triangle.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/isosceles_triangle.py @@ -87,14 +87,14 @@ class IsoscelesTriangle( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], triangleType: typing.Union[MetaOapg.properties.triangleType, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'all_of_1': return super().__new__( cls, - *args, + *_args, triangleType=triangleType, _configuration=_configuration, **kwargs, @@ -118,13 +118,13 @@ class IsoscelesTriangle( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'IsoscelesTriangle': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/isosceles_triangle.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/isosceles_triangle.pyi index 5addd14160..1ae4ed92df 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/isosceles_triangle.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/isosceles_triangle.pyi @@ -81,14 +81,14 @@ class IsoscelesTriangle( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], triangleType: typing.Union[MetaOapg.properties.triangleType, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'all_of_1': return super().__new__( cls, - *args, + *_args, triangleType=triangleType, _configuration=_configuration, **kwargs, @@ -112,13 +112,13 @@ class IsoscelesTriangle( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'IsoscelesTriangle': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request.py b/samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request.py index 223b0c5512..bcbf6521ca 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request.py @@ -62,25 +62,25 @@ class JSONPatchRequest( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'items': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'JSONPatchRequest': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request.pyi index 223b0c5512..bcbf6521ca 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request.pyi @@ -62,25 +62,25 @@ class JSONPatchRequest( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'items': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'JSONPatchRequest': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request_add_replace_test.py b/samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request_add_replace_test.py index bf95ea98af..7198cce903 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request_add_replace_test.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request_add_replace_test.py @@ -107,7 +107,7 @@ class JSONPatchRequestAddReplaceTest( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], op: typing.Union[MetaOapg.properties.op, str, ], path: typing.Union[MetaOapg.properties.path, str, ], value: typing.Union[MetaOapg.properties.value, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], @@ -115,7 +115,7 @@ class JSONPatchRequestAddReplaceTest( ) -> 'JSONPatchRequestAddReplaceTest': return super().__new__( cls, - *args, + *_args, op=op, path=path, value=value, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request_add_replace_test.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request_add_replace_test.pyi index 50e1a870bd..682f79942a 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request_add_replace_test.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request_add_replace_test.pyi @@ -99,7 +99,7 @@ class JSONPatchRequestAddReplaceTest( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], op: typing.Union[MetaOapg.properties.op, str, ], path: typing.Union[MetaOapg.properties.path, str, ], value: typing.Union[MetaOapg.properties.value, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], @@ -107,7 +107,7 @@ class JSONPatchRequestAddReplaceTest( ) -> 'JSONPatchRequestAddReplaceTest': return super().__new__( cls, - *args, + *_args, op=op, path=path, value=value, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request_move_copy.py b/samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request_move_copy.py index 0b84fba097..0a4e78afa7 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request_move_copy.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request_move_copy.py @@ -101,14 +101,14 @@ class JSONPatchRequestMoveCopy( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], op: typing.Union[MetaOapg.properties.op, str, ], path: typing.Union[MetaOapg.properties.path, str, ], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'JSONPatchRequestMoveCopy': return super().__new__( cls, - *args, + *_args, op=op, path=path, _configuration=_configuration, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request_move_copy.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request_move_copy.pyi index 0654ee60fb..ac1b968a3d 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request_move_copy.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request_move_copy.pyi @@ -94,14 +94,14 @@ class JSONPatchRequestMoveCopy( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], op: typing.Union[MetaOapg.properties.op, str, ], path: typing.Union[MetaOapg.properties.path, str, ], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'JSONPatchRequestMoveCopy': return super().__new__( cls, - *args, + *_args, op=op, path=path, _configuration=_configuration, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request_remove.py b/samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request_remove.py index 4e15b41cef..f4d5490a99 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request_remove.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request_remove.py @@ -87,14 +87,14 @@ class JSONPatchRequestRemove( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], op: typing.Union[MetaOapg.properties.op, str, ], path: typing.Union[MetaOapg.properties.path, str, ], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'JSONPatchRequestRemove': return super().__new__( cls, - *args, + *_args, op=op, path=path, _configuration=_configuration, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request_remove.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request_remove.pyi index 325cbe8a98..306cb088da 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request_remove.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request_remove.pyi @@ -81,14 +81,14 @@ class JSONPatchRequestRemove( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], op: typing.Union[MetaOapg.properties.op, str, ], path: typing.Union[MetaOapg.properties.path, str, ], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'JSONPatchRequestRemove': return super().__new__( cls, - *args, + *_args, op=op, path=path, _configuration=_configuration, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/mammal.py b/samples/openapi3/client/petstore/python/petstore_api/model/mammal.py index e90d419cc6..d69264dd94 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/mammal.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/mammal.py @@ -64,13 +64,13 @@ class Mammal( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'Mammal': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/mammal.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/mammal.pyi index e90d419cc6..d69264dd94 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/mammal.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/mammal.pyi @@ -64,13 +64,13 @@ class Mammal( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'Mammal': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/map_test.py b/samples/openapi3/client/petstore/python/petstore_api/model/map_test.py index 031503142c..18f0a81e87 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/map_test.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/map_test.py @@ -63,13 +63,13 @@ class MapTest( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[MetaOapg.additional_properties, str, ], ) -> 'additional_properties': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -83,13 +83,13 @@ class MapTest( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, ], ) -> 'map_map_of_string': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -132,13 +132,13 @@ class MapTest( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[MetaOapg.additional_properties, str, ], ) -> 'map_of_enum_string': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -161,13 +161,13 @@ class MapTest( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[MetaOapg.additional_properties, bool, ], ) -> 'direct_map': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -223,7 +223,7 @@ class MapTest( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], map_map_of_string: typing.Union[MetaOapg.properties.map_map_of_string, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, map_of_enum_string: typing.Union[MetaOapg.properties.map_of_enum_string, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, direct_map: typing.Union[MetaOapg.properties.direct_map, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, @@ -233,7 +233,7 @@ class MapTest( ) -> 'MapTest': return super().__new__( cls, - *args, + *_args, map_map_of_string=map_map_of_string, map_of_enum_string=map_of_enum_string, direct_map=direct_map, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/map_test.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/map_test.pyi index a89ebb2fc8..027c7831cc 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/map_test.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/map_test.pyi @@ -63,13 +63,13 @@ class MapTest( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[MetaOapg.additional_properties, str, ], ) -> 'additional_properties': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -83,13 +83,13 @@ class MapTest( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, ], ) -> 'map_map_of_string': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -125,13 +125,13 @@ class MapTest( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[MetaOapg.additional_properties, str, ], ) -> 'map_of_enum_string': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -154,13 +154,13 @@ class MapTest( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[MetaOapg.additional_properties, bool, ], ) -> 'direct_map': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -216,7 +216,7 @@ class MapTest( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], map_map_of_string: typing.Union[MetaOapg.properties.map_map_of_string, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, map_of_enum_string: typing.Union[MetaOapg.properties.map_of_enum_string, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, direct_map: typing.Union[MetaOapg.properties.direct_map, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, @@ -226,7 +226,7 @@ class MapTest( ) -> 'MapTest': return super().__new__( cls, - *args, + *_args, map_map_of_string=map_map_of_string, map_of_enum_string=map_of_enum_string, direct_map=direct_map, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/mixed_properties_and_additional_properties_class.py b/samples/openapi3/client/petstore/python/petstore_api/model/mixed_properties_and_additional_properties_class.py index b146d15b6a..9096dc7782 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/mixed_properties_and_additional_properties_class.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/mixed_properties_and_additional_properties_class.py @@ -60,13 +60,13 @@ class MixedPropertiesAndAdditionalPropertiesClass( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: 'Animal', ) -> 'map': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -111,7 +111,7 @@ class MixedPropertiesAndAdditionalPropertiesClass( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], uuid: typing.Union[MetaOapg.properties.uuid, str, uuid.UUID, schemas.Unset] = schemas.unset, dateTime: typing.Union[MetaOapg.properties.dateTime, str, datetime, schemas.Unset] = schemas.unset, map: typing.Union[MetaOapg.properties.map, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, @@ -120,7 +120,7 @@ class MixedPropertiesAndAdditionalPropertiesClass( ) -> 'MixedPropertiesAndAdditionalPropertiesClass': return super().__new__( cls, - *args, + *_args, uuid=uuid, dateTime=dateTime, map=map, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/mixed_properties_and_additional_properties_class.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/mixed_properties_and_additional_properties_class.pyi index b146d15b6a..9096dc7782 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/mixed_properties_and_additional_properties_class.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/mixed_properties_and_additional_properties_class.pyi @@ -60,13 +60,13 @@ class MixedPropertiesAndAdditionalPropertiesClass( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: 'Animal', ) -> 'map': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -111,7 +111,7 @@ class MixedPropertiesAndAdditionalPropertiesClass( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], uuid: typing.Union[MetaOapg.properties.uuid, str, uuid.UUID, schemas.Unset] = schemas.unset, dateTime: typing.Union[MetaOapg.properties.dateTime, str, datetime, schemas.Unset] = schemas.unset, map: typing.Union[MetaOapg.properties.map, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, @@ -120,7 +120,7 @@ class MixedPropertiesAndAdditionalPropertiesClass( ) -> 'MixedPropertiesAndAdditionalPropertiesClass': return super().__new__( cls, - *args, + *_args, uuid=uuid, dateTime=dateTime, map=map, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/model200_response.py b/samples/openapi3/client/petstore/python/petstore_api/model/model200_response.py index 7cdc34c576..ba582159e8 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/model200_response.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/model200_response.py @@ -75,14 +75,14 @@ class Model200Response( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], name: typing.Union[MetaOapg.properties.name, decimal.Decimal, int, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'Model200Response': return super().__new__( cls, - *args, + *_args, name=name, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/model200_response.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/model200_response.pyi index 7cdc34c576..ba582159e8 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/model200_response.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/model200_response.pyi @@ -75,14 +75,14 @@ class Model200Response( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], name: typing.Union[MetaOapg.properties.name, decimal.Decimal, int, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'Model200Response': return super().__new__( cls, - *args, + *_args, name=name, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/model_return.py b/samples/openapi3/client/petstore/python/petstore_api/model/model_return.py index 1549dc1120..be6cb94a5e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/model_return.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/model_return.py @@ -67,13 +67,13 @@ class ModelReturn( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'ModelReturn': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/model_return.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/model_return.pyi index 1549dc1120..be6cb94a5e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/model_return.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/model_return.pyi @@ -67,13 +67,13 @@ class ModelReturn( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'ModelReturn': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/money.py b/samples/openapi3/client/petstore/python/petstore_api/model/money.py index 5804737d2f..16d3850594 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/money.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/money.py @@ -82,7 +82,7 @@ class Money( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], amount: typing.Union[MetaOapg.properties.amount, str, ], currency: 'Currency', _configuration: typing.Optional[schemas.Configuration] = None, @@ -90,7 +90,7 @@ class Money( ) -> 'Money': return super().__new__( cls, - *args, + *_args, amount=amount, currency=currency, _configuration=_configuration, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/money.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/money.pyi index 5804737d2f..16d3850594 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/money.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/money.pyi @@ -82,7 +82,7 @@ class Money( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], amount: typing.Union[MetaOapg.properties.amount, str, ], currency: 'Currency', _configuration: typing.Optional[schemas.Configuration] = None, @@ -90,7 +90,7 @@ class Money( ) -> 'Money': return super().__new__( cls, - *args, + *_args, amount=amount, currency=currency, _configuration=_configuration, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/name.py b/samples/openapi3/client/petstore/python/petstore_api/model/name.py index e67d017f24..94e37c1dab 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/name.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/name.py @@ -88,7 +88,7 @@ class Name( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], name: typing.Union[MetaOapg.properties.name, decimal.Decimal, int, ], snake_case: typing.Union[MetaOapg.properties.snake_case, decimal.Decimal, int, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, @@ -96,7 +96,7 @@ class Name( ) -> 'Name': return super().__new__( cls, - *args, + *_args, name=name, snake_case=snake_case, _configuration=_configuration, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/name.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/name.pyi index e67d017f24..94e37c1dab 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/name.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/name.pyi @@ -88,7 +88,7 @@ class Name( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], name: typing.Union[MetaOapg.properties.name, decimal.Decimal, int, ], snake_case: typing.Union[MetaOapg.properties.snake_case, decimal.Decimal, int, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, @@ -96,7 +96,7 @@ class Name( ) -> 'Name': return super().__new__( cls, - *args, + *_args, name=name, snake_case=snake_case, _configuration=_configuration, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/no_additional_properties.py b/samples/openapi3/client/petstore/python/petstore_api/model/no_additional_properties.py index cacfe6027e..4eb3cf9bbb 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/no_additional_properties.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/no_additional_properties.py @@ -70,14 +70,14 @@ class NoAdditionalProperties( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], id: typing.Union[MetaOapg.properties.id, decimal.Decimal, int, ], petId: typing.Union[MetaOapg.properties.petId, decimal.Decimal, int, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'NoAdditionalProperties': return super().__new__( cls, - *args, + *_args, id=id, petId=petId, _configuration=_configuration, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/no_additional_properties.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/no_additional_properties.pyi index cacfe6027e..4eb3cf9bbb 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/no_additional_properties.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/no_additional_properties.pyi @@ -70,14 +70,14 @@ class NoAdditionalProperties( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], id: typing.Union[MetaOapg.properties.id, decimal.Decimal, int, ], petId: typing.Union[MetaOapg.properties.petId, decimal.Decimal, int, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'NoAdditionalProperties': return super().__new__( cls, - *args, + *_args, id=id, petId=petId, _configuration=_configuration, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/nullable_class.py b/samples/openapi3/client/petstore/python/petstore_api/model/nullable_class.py index 0d3c13b457..4bc17e7e05 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/nullable_class.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/nullable_class.py @@ -48,12 +48,12 @@ class NullableClass( def __new__( cls, - *args: typing.Union[None, decimal.Decimal, int, ], + *_args: typing.Union[None, decimal.Decimal, int, ], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'integer_prop': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, ) @@ -68,12 +68,12 @@ class NullableClass( def __new__( cls, - *args: typing.Union[None, decimal.Decimal, int, float, ], + *_args: typing.Union[None, decimal.Decimal, int, float, ], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'number_prop': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, ) @@ -88,12 +88,12 @@ class NullableClass( def __new__( cls, - *args: typing.Union[None, bool, ], + *_args: typing.Union[None, bool, ], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'boolean_prop': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, ) @@ -108,12 +108,12 @@ class NullableClass( def __new__( cls, - *args: typing.Union[None, str, ], + *_args: typing.Union[None, str, ], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'string_prop': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, ) @@ -133,12 +133,12 @@ class NullableClass( def __new__( cls, - *args: typing.Union[None, str, date, ], + *_args: typing.Union[None, str, date, ], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'date_prop': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, ) @@ -158,12 +158,12 @@ class NullableClass( def __new__( cls, - *args: typing.Union[None, str, datetime, ], + *_args: typing.Union[None, str, datetime, ], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'datetime_prop': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, ) @@ -182,12 +182,12 @@ class NullableClass( def __new__( cls, - *args: typing.Union[list, tuple, None, ], + *_args: typing.Union[list, tuple, None, ], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'array_nullable_prop': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, ) @@ -213,13 +213,13 @@ class NullableClass( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, None, ], + *_args: typing.Union[dict, frozendict.frozendict, None, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'items': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -227,12 +227,12 @@ class NullableClass( def __new__( cls, - *args: typing.Union[list, tuple, None, ], + *_args: typing.Union[list, tuple, None, ], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'array_and_items_nullable_prop': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, ) @@ -255,25 +255,25 @@ class NullableClass( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, None, ], + *_args: typing.Union[dict, frozendict.frozendict, None, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'items': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, None, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, None, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, None, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, None, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'array_items_nullable': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -302,13 +302,13 @@ class NullableClass( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, None, ], + *_args: typing.Union[dict, frozendict.frozendict, None, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, ], ) -> 'object_nullable_prop': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -335,13 +335,13 @@ class NullableClass( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, None, ], + *_args: typing.Union[dict, frozendict.frozendict, None, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'additional_properties': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -356,13 +356,13 @@ class NullableClass( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, None, ], + *_args: typing.Union[dict, frozendict.frozendict, None, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, None, ], ) -> 'object_and_items_nullable_prop': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -386,13 +386,13 @@ class NullableClass( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, None, ], + *_args: typing.Union[dict, frozendict.frozendict, None, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'additional_properties': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -406,13 +406,13 @@ class NullableClass( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, None, ], ) -> 'object_items_nullable': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -442,13 +442,13 @@ class NullableClass( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, None, ], + *_args: typing.Union[dict, frozendict.frozendict, None, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'additional_properties': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -540,7 +540,7 @@ class NullableClass( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], integer_prop: typing.Union[MetaOapg.properties.integer_prop, None, decimal.Decimal, int, schemas.Unset] = schemas.unset, number_prop: typing.Union[MetaOapg.properties.number_prop, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, boolean_prop: typing.Union[MetaOapg.properties.boolean_prop, None, bool, schemas.Unset] = schemas.unset, @@ -558,7 +558,7 @@ class NullableClass( ) -> 'NullableClass': return super().__new__( cls, - *args, + *_args, integer_prop=integer_prop, number_prop=number_prop, boolean_prop=boolean_prop, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/nullable_class.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/nullable_class.pyi index 0d3c13b457..4bc17e7e05 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/nullable_class.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/nullable_class.pyi @@ -48,12 +48,12 @@ class NullableClass( def __new__( cls, - *args: typing.Union[None, decimal.Decimal, int, ], + *_args: typing.Union[None, decimal.Decimal, int, ], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'integer_prop': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, ) @@ -68,12 +68,12 @@ class NullableClass( def __new__( cls, - *args: typing.Union[None, decimal.Decimal, int, float, ], + *_args: typing.Union[None, decimal.Decimal, int, float, ], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'number_prop': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, ) @@ -88,12 +88,12 @@ class NullableClass( def __new__( cls, - *args: typing.Union[None, bool, ], + *_args: typing.Union[None, bool, ], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'boolean_prop': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, ) @@ -108,12 +108,12 @@ class NullableClass( def __new__( cls, - *args: typing.Union[None, str, ], + *_args: typing.Union[None, str, ], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'string_prop': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, ) @@ -133,12 +133,12 @@ class NullableClass( def __new__( cls, - *args: typing.Union[None, str, date, ], + *_args: typing.Union[None, str, date, ], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'date_prop': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, ) @@ -158,12 +158,12 @@ class NullableClass( def __new__( cls, - *args: typing.Union[None, str, datetime, ], + *_args: typing.Union[None, str, datetime, ], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'datetime_prop': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, ) @@ -182,12 +182,12 @@ class NullableClass( def __new__( cls, - *args: typing.Union[list, tuple, None, ], + *_args: typing.Union[list, tuple, None, ], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'array_nullable_prop': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, ) @@ -213,13 +213,13 @@ class NullableClass( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, None, ], + *_args: typing.Union[dict, frozendict.frozendict, None, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'items': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -227,12 +227,12 @@ class NullableClass( def __new__( cls, - *args: typing.Union[list, tuple, None, ], + *_args: typing.Union[list, tuple, None, ], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'array_and_items_nullable_prop': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, ) @@ -255,25 +255,25 @@ class NullableClass( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, None, ], + *_args: typing.Union[dict, frozendict.frozendict, None, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'items': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, None, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, None, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, None, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, None, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'array_items_nullable': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -302,13 +302,13 @@ class NullableClass( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, None, ], + *_args: typing.Union[dict, frozendict.frozendict, None, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, ], ) -> 'object_nullable_prop': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -335,13 +335,13 @@ class NullableClass( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, None, ], + *_args: typing.Union[dict, frozendict.frozendict, None, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'additional_properties': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -356,13 +356,13 @@ class NullableClass( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, None, ], + *_args: typing.Union[dict, frozendict.frozendict, None, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, None, ], ) -> 'object_and_items_nullable_prop': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -386,13 +386,13 @@ class NullableClass( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, None, ], + *_args: typing.Union[dict, frozendict.frozendict, None, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'additional_properties': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -406,13 +406,13 @@ class NullableClass( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, None, ], ) -> 'object_items_nullable': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -442,13 +442,13 @@ class NullableClass( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, None, ], + *_args: typing.Union[dict, frozendict.frozendict, None, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'additional_properties': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -540,7 +540,7 @@ class NullableClass( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], integer_prop: typing.Union[MetaOapg.properties.integer_prop, None, decimal.Decimal, int, schemas.Unset] = schemas.unset, number_prop: typing.Union[MetaOapg.properties.number_prop, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, boolean_prop: typing.Union[MetaOapg.properties.boolean_prop, None, bool, schemas.Unset] = schemas.unset, @@ -558,7 +558,7 @@ class NullableClass( ) -> 'NullableClass': return super().__new__( cls, - *args, + *_args, integer_prop=integer_prop, number_prop=number_prop, boolean_prop=boolean_prop, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/nullable_shape.py b/samples/openapi3/client/petstore/python/petstore_api/model/nullable_shape.py index e22e8d824e..8db6f7f445 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/nullable_shape.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/nullable_shape.py @@ -57,13 +57,13 @@ class NullableShape( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'NullableShape': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/nullable_shape.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/nullable_shape.pyi index e22e8d824e..8db6f7f445 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/nullable_shape.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/nullable_shape.pyi @@ -57,13 +57,13 @@ class NullableShape( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'NullableShape': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/nullable_string.py b/samples/openapi3/client/petstore/python/petstore_api/model/nullable_string.py index 94353cf0fd..6a101a6f19 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/nullable_string.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/nullable_string.py @@ -38,11 +38,11 @@ class NullableString( def __new__( cls, - *args: typing.Union[None, str, ], + *_args: typing.Union[None, str, ], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'NullableString': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/nullable_string.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/nullable_string.pyi index 94353cf0fd..6a101a6f19 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/nullable_string.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/nullable_string.pyi @@ -38,11 +38,11 @@ class NullableString( def __new__( cls, - *args: typing.Union[None, str, ], + *_args: typing.Union[None, str, ], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'NullableString': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/number_only.py b/samples/openapi3/client/petstore/python/petstore_api/model/number_only.py index 91aaaa507b..1fe492fe06 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/number_only.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/number_only.py @@ -64,14 +64,14 @@ class NumberOnly( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], JustNumber: typing.Union[MetaOapg.properties.JustNumber, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'NumberOnly': return super().__new__( cls, - *args, + *_args, JustNumber=JustNumber, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/number_only.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/number_only.pyi index 91aaaa507b..1fe492fe06 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/number_only.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/number_only.pyi @@ -64,14 +64,14 @@ class NumberOnly( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], JustNumber: typing.Union[MetaOapg.properties.JustNumber, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'NumberOnly': return super().__new__( cls, - *args, + *_args, JustNumber=JustNumber, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/object_model_with_arg_and_args_properties.py b/samples/openapi3/client/petstore/python/petstore_api/model/object_model_with_arg_and_args_properties.py new file mode 100644 index 0000000000..7e933ca8ef --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/model/object_model_with_arg_and_args_properties.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + OpenAPI Petstore + + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from petstore_api import schemas # noqa: F401 + + +class ObjectModelWithArgAndArgsProperties( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + + class MetaOapg: + required = { + "args", + "arg", + } + + class properties: + arg = schemas.StrSchema + args = schemas.StrSchema + __annotations__ = { + "arg": arg, + "args": args, + } + + args: MetaOapg.properties.args + arg: MetaOapg.properties.arg + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["arg"]) -> MetaOapg.properties.arg: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["args"]) -> MetaOapg.properties.args: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["arg", "args", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["arg"]) -> MetaOapg.properties.arg: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["args"]) -> MetaOapg.properties.args: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["arg", "args", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + args: typing.Union[MetaOapg.properties.args, str, ], + arg: typing.Union[MetaOapg.properties.arg, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ObjectModelWithArgAndArgsProperties': + return super().__new__( + cls, + *_args, + args=args, + arg=arg, + _configuration=_configuration, + **kwargs, + ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/object_model_with_arg_and_args_properties.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/object_model_with_arg_and_args_properties.pyi new file mode 100644 index 0000000000..7e933ca8ef --- /dev/null +++ b/samples/openapi3/client/petstore/python/petstore_api/model/object_model_with_arg_and_args_properties.pyi @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + OpenAPI Petstore + + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from petstore_api import schemas # noqa: F401 + + +class ObjectModelWithArgAndArgsProperties( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + + class MetaOapg: + required = { + "args", + "arg", + } + + class properties: + arg = schemas.StrSchema + args = schemas.StrSchema + __annotations__ = { + "arg": arg, + "args": args, + } + + args: MetaOapg.properties.args + arg: MetaOapg.properties.arg + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["arg"]) -> MetaOapg.properties.arg: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["args"]) -> MetaOapg.properties.args: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["arg", "args", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["arg"]) -> MetaOapg.properties.arg: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["args"]) -> MetaOapg.properties.args: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["arg", "args", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + args: typing.Union[MetaOapg.properties.args, str, ], + arg: typing.Union[MetaOapg.properties.arg, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ObjectModelWithArgAndArgsProperties': + return super().__new__( + cls, + *_args, + args=args, + arg=arg, + _configuration=_configuration, + **kwargs, + ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/object_model_with_ref_props.py b/samples/openapi3/client/petstore/python/petstore_api/model/object_model_with_ref_props.py index e68caff871..c8a6acc6e6 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/object_model_with_ref_props.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/object_model_with_ref_props.py @@ -85,7 +85,7 @@ class ObjectModelWithRefProps( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], myNumber: typing.Union['NumberWithValidations', schemas.Unset] = schemas.unset, myString: typing.Union[MetaOapg.properties.myString, str, schemas.Unset] = schemas.unset, myBoolean: typing.Union[MetaOapg.properties.myBoolean, bool, schemas.Unset] = schemas.unset, @@ -94,7 +94,7 @@ class ObjectModelWithRefProps( ) -> 'ObjectModelWithRefProps': return super().__new__( cls, - *args, + *_args, myNumber=myNumber, myString=myString, myBoolean=myBoolean, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/object_model_with_ref_props.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/object_model_with_ref_props.pyi index e68caff871..c8a6acc6e6 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/object_model_with_ref_props.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/object_model_with_ref_props.pyi @@ -85,7 +85,7 @@ class ObjectModelWithRefProps( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], myNumber: typing.Union['NumberWithValidations', schemas.Unset] = schemas.unset, myString: typing.Union[MetaOapg.properties.myString, str, schemas.Unset] = schemas.unset, myBoolean: typing.Union[MetaOapg.properties.myBoolean, bool, schemas.Unset] = schemas.unset, @@ -94,7 +94,7 @@ class ObjectModelWithRefProps( ) -> 'ObjectModelWithRefProps': return super().__new__( cls, - *args, + *_args, myNumber=myNumber, myString=myString, myBoolean=myBoolean, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_all_of_with_req_test_prop_from_unset_add_prop.py b/samples/openapi3/client/petstore/python/petstore_api/model/object_with_all_of_with_req_test_prop_from_unset_add_prop.py index beef11f655..8e2e6d57fb 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_all_of_with_req_test_prop_from_unset_add_prop.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/object_with_all_of_with_req_test_prop_from_unset_add_prop.py @@ -77,7 +77,7 @@ class ObjectWithAllOfWithReqTestPropFromUnsetAddProp( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], test: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, @@ -85,7 +85,7 @@ class ObjectWithAllOfWithReqTestPropFromUnsetAddProp( ) -> 'all_of_1': return super().__new__( cls, - *args, + *_args, test=test, name=name, _configuration=_configuration, @@ -110,13 +110,13 @@ class ObjectWithAllOfWithReqTestPropFromUnsetAddProp( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'ObjectWithAllOfWithReqTestPropFromUnsetAddProp': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_all_of_with_req_test_prop_from_unset_add_prop.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/object_with_all_of_with_req_test_prop_from_unset_add_prop.pyi index beef11f655..8e2e6d57fb 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_all_of_with_req_test_prop_from_unset_add_prop.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/object_with_all_of_with_req_test_prop_from_unset_add_prop.pyi @@ -77,7 +77,7 @@ class ObjectWithAllOfWithReqTestPropFromUnsetAddProp( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], test: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, @@ -85,7 +85,7 @@ class ObjectWithAllOfWithReqTestPropFromUnsetAddProp( ) -> 'all_of_1': return super().__new__( cls, - *args, + *_args, test=test, name=name, _configuration=_configuration, @@ -110,13 +110,13 @@ class ObjectWithAllOfWithReqTestPropFromUnsetAddProp( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'ObjectWithAllOfWithReqTestPropFromUnsetAddProp': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_decimal_properties.py b/samples/openapi3/client/petstore/python/petstore_api/model/object_with_decimal_properties.py index 068f21457b..0a7e903931 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_decimal_properties.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/object_with_decimal_properties.py @@ -83,7 +83,7 @@ class ObjectWithDecimalProperties( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], length: typing.Union[MetaOapg.properties.length, str, schemas.Unset] = schemas.unset, width: typing.Union[MetaOapg.properties.width, str, schemas.Unset] = schemas.unset, cost: typing.Union['Money', schemas.Unset] = schemas.unset, @@ -92,7 +92,7 @@ class ObjectWithDecimalProperties( ) -> 'ObjectWithDecimalProperties': return super().__new__( cls, - *args, + *_args, length=length, width=width, cost=cost, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_decimal_properties.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/object_with_decimal_properties.pyi index 068f21457b..0a7e903931 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_decimal_properties.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/object_with_decimal_properties.pyi @@ -83,7 +83,7 @@ class ObjectWithDecimalProperties( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], length: typing.Union[MetaOapg.properties.length, str, schemas.Unset] = schemas.unset, width: typing.Union[MetaOapg.properties.width, str, schemas.Unset] = schemas.unset, cost: typing.Union['Money', schemas.Unset] = schemas.unset, @@ -92,7 +92,7 @@ class ObjectWithDecimalProperties( ) -> 'ObjectWithDecimalProperties': return super().__new__( cls, - *args, + *_args, length=length, width=width, cost=cost, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_difficultly_named_props.py b/samples/openapi3/client/petstore/python/petstore_api/model/object_with_difficultly_named_props.py index 0e6aa7d4a1..37f42e7b07 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_difficultly_named_props.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/object_with_difficultly_named_props.py @@ -86,13 +86,13 @@ class ObjectWithDifficultlyNamedProps( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'ObjectWithDifficultlyNamedProps': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_difficultly_named_props.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/object_with_difficultly_named_props.pyi index 0e6aa7d4a1..37f42e7b07 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_difficultly_named_props.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/object_with_difficultly_named_props.pyi @@ -86,13 +86,13 @@ class ObjectWithDifficultlyNamedProps( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'ObjectWithDifficultlyNamedProps': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_inline_composition_property.py b/samples/openapi3/client/petstore/python/petstore_api/model/object_with_inline_composition_property.py index 31e422370f..9e3d9a1742 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_inline_composition_property.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/object_with_inline_composition_property.py @@ -71,13 +71,13 @@ class ObjectWithInlineCompositionProperty( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'someProp': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -108,14 +108,14 @@ class ObjectWithInlineCompositionProperty( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], someProp: typing.Union[MetaOapg.properties.someProp, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'ObjectWithInlineCompositionProperty': return super().__new__( cls, - *args, + *_args, someProp=someProp, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_inline_composition_property.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/object_with_inline_composition_property.pyi index 294520bd23..f1c85b1203 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_inline_composition_property.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/object_with_inline_composition_property.pyi @@ -68,13 +68,13 @@ class ObjectWithInlineCompositionProperty( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'someProp': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -105,14 +105,14 @@ class ObjectWithInlineCompositionProperty( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], someProp: typing.Union[MetaOapg.properties.someProp, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'ObjectWithInlineCompositionProperty': return super().__new__( cls, - *args, + *_args, someProp=someProp, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_invalid_named_refed_properties.py b/samples/openapi3/client/petstore/python/petstore_api/model/object_with_invalid_named_refed_properties.py index 0efcbfa5f4..4a2cff9803 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_invalid_named_refed_properties.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/object_with_invalid_named_refed_properties.py @@ -83,13 +83,13 @@ class ObjectWithInvalidNamedRefedProperties( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'ObjectWithInvalidNamedRefedProperties': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_invalid_named_refed_properties.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/object_with_invalid_named_refed_properties.pyi index 0efcbfa5f4..4a2cff9803 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_invalid_named_refed_properties.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/object_with_invalid_named_refed_properties.pyi @@ -83,13 +83,13 @@ class ObjectWithInvalidNamedRefedProperties( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'ObjectWithInvalidNamedRefedProperties': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_optional_test_prop.py b/samples/openapi3/client/petstore/python/petstore_api/model/object_with_optional_test_prop.py index 07cae57d4c..9a75d3bd02 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_optional_test_prop.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/object_with_optional_test_prop.py @@ -64,14 +64,14 @@ class ObjectWithOptionalTestProp( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], test: typing.Union[MetaOapg.properties.test, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'ObjectWithOptionalTestProp': return super().__new__( cls, - *args, + *_args, test=test, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_optional_test_prop.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/object_with_optional_test_prop.pyi index 07cae57d4c..9a75d3bd02 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_optional_test_prop.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/object_with_optional_test_prop.pyi @@ -64,14 +64,14 @@ class ObjectWithOptionalTestProp( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], test: typing.Union[MetaOapg.properties.test, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'ObjectWithOptionalTestProp': return super().__new__( cls, - *args, + *_args, test=test, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_validations.py b/samples/openapi3/client/petstore/python/petstore_api/model/object_with_validations.py index 50c2269817..474721b040 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_validations.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/object_with_validations.py @@ -38,13 +38,13 @@ class ObjectWithValidations( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'ObjectWithValidations': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_validations.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/object_with_validations.pyi index f45e30eed5..d1937c96fa 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_validations.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/object_with_validations.pyi @@ -34,13 +34,13 @@ class ObjectWithValidations( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'ObjectWithValidations': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/order.py b/samples/openapi3/client/petstore/python/petstore_api/model/order.py index 6d653b0ab0..83a587222a 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/order.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/order.py @@ -129,7 +129,7 @@ class Order( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], id: typing.Union[MetaOapg.properties.id, decimal.Decimal, int, schemas.Unset] = schemas.unset, petId: typing.Union[MetaOapg.properties.petId, decimal.Decimal, int, schemas.Unset] = schemas.unset, quantity: typing.Union[MetaOapg.properties.quantity, decimal.Decimal, int, schemas.Unset] = schemas.unset, @@ -141,7 +141,7 @@ class Order( ) -> 'Order': return super().__new__( cls, - *args, + *_args, id=id, petId=petId, quantity=quantity, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/order.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/order.pyi index ccbca89e08..61ac9cf6f6 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/order.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/order.pyi @@ -121,7 +121,7 @@ class Order( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], id: typing.Union[MetaOapg.properties.id, decimal.Decimal, int, schemas.Unset] = schemas.unset, petId: typing.Union[MetaOapg.properties.petId, decimal.Decimal, int, schemas.Unset] = schemas.unset, quantity: typing.Union[MetaOapg.properties.quantity, decimal.Decimal, int, schemas.Unset] = schemas.unset, @@ -133,7 +133,7 @@ class Order( ) -> 'Order': return super().__new__( cls, - *args, + *_args, id=id, petId=petId, quantity=quantity, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/parent_pet.py b/samples/openapi3/client/petstore/python/petstore_api/model/parent_pet.py index 178eab4e5a..6988fb92ef 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/parent_pet.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/parent_pet.py @@ -61,13 +61,13 @@ class ParentPet( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'ParentPet': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/parent_pet.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/parent_pet.pyi index 178eab4e5a..6988fb92ef 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/parent_pet.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/parent_pet.pyi @@ -61,13 +61,13 @@ class ParentPet( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'ParentPet': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/pet.py b/samples/openapi3/client/petstore/python/petstore_api/model/pet.py index 5b1b6b8275..4a9b590202 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/pet.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/pet.py @@ -55,12 +55,12 @@ class Pet( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'photoUrls': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -86,12 +86,12 @@ class Pet( def __new__( cls, - arg: typing.Union[typing.Tuple['Tag'], typing.List['Tag']], + _arg: typing.Union[typing.Tuple['Tag'], typing.List['Tag']], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'tags': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -188,7 +188,7 @@ class Pet( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], photoUrls: typing.Union[MetaOapg.properties.photoUrls, list, tuple, ], name: typing.Union[MetaOapg.properties.name, str, ], id: typing.Union[MetaOapg.properties.id, decimal.Decimal, int, schemas.Unset] = schemas.unset, @@ -200,7 +200,7 @@ class Pet( ) -> 'Pet': return super().__new__( cls, - *args, + *_args, photoUrls=photoUrls, name=name, id=id, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/pet.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/pet.pyi index 01529098ea..e0a7276e14 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/pet.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/pet.pyi @@ -55,12 +55,12 @@ class Pet( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'photoUrls': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -86,12 +86,12 @@ class Pet( def __new__( cls, - arg: typing.Union[typing.Tuple['Tag'], typing.List['Tag']], + _arg: typing.Union[typing.Tuple['Tag'], typing.List['Tag']], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'tags': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -180,7 +180,7 @@ class Pet( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], photoUrls: typing.Union[MetaOapg.properties.photoUrls, list, tuple, ], name: typing.Union[MetaOapg.properties.name, str, ], id: typing.Union[MetaOapg.properties.id, decimal.Decimal, int, schemas.Unset] = schemas.unset, @@ -192,7 +192,7 @@ class Pet( ) -> 'Pet': return super().__new__( cls, - *args, + *_args, photoUrls=photoUrls, name=name, id=id, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/pig.py b/samples/openapi3/client/petstore/python/petstore_api/model/pig.py index db4887c110..55fd75d15d 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/pig.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/pig.py @@ -62,13 +62,13 @@ class Pig( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'Pig': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/pig.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/pig.pyi index db4887c110..55fd75d15d 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/pig.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/pig.pyi @@ -62,13 +62,13 @@ class Pig( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'Pig': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/player.py b/samples/openapi3/client/petstore/python/petstore_api/model/player.py index d08a18d2ee..832a0af469 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/player.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/player.py @@ -77,7 +77,7 @@ class Player( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, enemyPlayer: typing.Union['Player', schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, @@ -85,7 +85,7 @@ class Player( ) -> 'Player': return super().__new__( cls, - *args, + *_args, name=name, enemyPlayer=enemyPlayer, _configuration=_configuration, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/player.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/player.pyi index d08a18d2ee..832a0af469 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/player.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/player.pyi @@ -77,7 +77,7 @@ class Player( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, enemyPlayer: typing.Union['Player', schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, @@ -85,7 +85,7 @@ class Player( ) -> 'Player': return super().__new__( cls, - *args, + *_args, name=name, enemyPlayer=enemyPlayer, _configuration=_configuration, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/quadrilateral.py b/samples/openapi3/client/petstore/python/petstore_api/model/quadrilateral.py index 6a9b08fa1f..757991e0b8 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/quadrilateral.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/quadrilateral.py @@ -62,13 +62,13 @@ class Quadrilateral( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'Quadrilateral': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/quadrilateral.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/quadrilateral.pyi index 6a9b08fa1f..757991e0b8 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/quadrilateral.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/quadrilateral.pyi @@ -62,13 +62,13 @@ class Quadrilateral( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'Quadrilateral': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/quadrilateral_interface.py b/samples/openapi3/client/petstore/python/petstore_api/model/quadrilateral_interface.py index 90c85c2388..2370a2a994 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/quadrilateral_interface.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/quadrilateral_interface.py @@ -95,7 +95,7 @@ class QuadrilateralInterface( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], shapeType: typing.Union[MetaOapg.properties.shapeType, str, ], quadrilateralType: typing.Union[MetaOapg.properties.quadrilateralType, str, ], _configuration: typing.Optional[schemas.Configuration] = None, @@ -103,7 +103,7 @@ class QuadrilateralInterface( ) -> 'QuadrilateralInterface': return super().__new__( cls, - *args, + *_args, shapeType=shapeType, quadrilateralType=quadrilateralType, _configuration=_configuration, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/quadrilateral_interface.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/quadrilateral_interface.pyi index 9250542904..0cf90d5391 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/quadrilateral_interface.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/quadrilateral_interface.pyi @@ -89,7 +89,7 @@ class QuadrilateralInterface( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], shapeType: typing.Union[MetaOapg.properties.shapeType, str, ], quadrilateralType: typing.Union[MetaOapg.properties.quadrilateralType, str, ], _configuration: typing.Optional[schemas.Configuration] = None, @@ -97,7 +97,7 @@ class QuadrilateralInterface( ) -> 'QuadrilateralInterface': return super().__new__( cls, - *args, + *_args, shapeType=shapeType, quadrilateralType=quadrilateralType, _configuration=_configuration, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/read_only_first.py b/samples/openapi3/client/petstore/python/petstore_api/model/read_only_first.py index c849de1906..8636a04494 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/read_only_first.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/read_only_first.py @@ -72,7 +72,7 @@ class ReadOnlyFirst( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], bar: typing.Union[MetaOapg.properties.bar, str, schemas.Unset] = schemas.unset, baz: typing.Union[MetaOapg.properties.baz, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, @@ -80,7 +80,7 @@ class ReadOnlyFirst( ) -> 'ReadOnlyFirst': return super().__new__( cls, - *args, + *_args, bar=bar, baz=baz, _configuration=_configuration, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/read_only_first.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/read_only_first.pyi index c849de1906..8636a04494 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/read_only_first.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/read_only_first.pyi @@ -72,7 +72,7 @@ class ReadOnlyFirst( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], bar: typing.Union[MetaOapg.properties.bar, str, schemas.Unset] = schemas.unset, baz: typing.Union[MetaOapg.properties.baz, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, @@ -80,7 +80,7 @@ class ReadOnlyFirst( ) -> 'ReadOnlyFirst': return super().__new__( cls, - *args, + *_args, bar=bar, baz=baz, _configuration=_configuration, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/scalene_triangle.py b/samples/openapi3/client/petstore/python/petstore_api/model/scalene_triangle.py index 46083ad564..2bb4e44cf5 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/scalene_triangle.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/scalene_triangle.py @@ -87,14 +87,14 @@ class ScaleneTriangle( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], triangleType: typing.Union[MetaOapg.properties.triangleType, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'all_of_1': return super().__new__( cls, - *args, + *_args, triangleType=triangleType, _configuration=_configuration, **kwargs, @@ -118,13 +118,13 @@ class ScaleneTriangle( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'ScaleneTriangle': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/scalene_triangle.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/scalene_triangle.pyi index b602ba62d5..7411424cfa 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/scalene_triangle.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/scalene_triangle.pyi @@ -81,14 +81,14 @@ class ScaleneTriangle( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], triangleType: typing.Union[MetaOapg.properties.triangleType, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'all_of_1': return super().__new__( cls, - *args, + *_args, triangleType=triangleType, _configuration=_configuration, **kwargs, @@ -112,13 +112,13 @@ class ScaleneTriangle( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'ScaleneTriangle': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/shape.py b/samples/openapi3/client/petstore/python/petstore_api/model/shape.py index bab6e983c8..59fb712a68 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/shape.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/shape.py @@ -62,13 +62,13 @@ class Shape( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'Shape': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/shape.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/shape.pyi index bab6e983c8..59fb712a68 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/shape.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/shape.pyi @@ -62,13 +62,13 @@ class Shape( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'Shape': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/shape_or_null.py b/samples/openapi3/client/petstore/python/petstore_api/model/shape_or_null.py index 10342b8d03..8481fb3a8d 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/shape_or_null.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/shape_or_null.py @@ -66,13 +66,13 @@ class ShapeOrNull( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'ShapeOrNull': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/shape_or_null.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/shape_or_null.pyi index 10342b8d03..8481fb3a8d 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/shape_or_null.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/shape_or_null.pyi @@ -66,13 +66,13 @@ class ShapeOrNull( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'ShapeOrNull': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/simple_quadrilateral.py b/samples/openapi3/client/petstore/python/petstore_api/model/simple_quadrilateral.py index 93d3c1f932..b7037f9a54 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/simple_quadrilateral.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/simple_quadrilateral.py @@ -87,14 +87,14 @@ class SimpleQuadrilateral( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], quadrilateralType: typing.Union[MetaOapg.properties.quadrilateralType, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'all_of_1': return super().__new__( cls, - *args, + *_args, quadrilateralType=quadrilateralType, _configuration=_configuration, **kwargs, @@ -118,13 +118,13 @@ class SimpleQuadrilateral( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SimpleQuadrilateral': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/simple_quadrilateral.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/simple_quadrilateral.pyi index 59505edad8..5c0b4007b8 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/simple_quadrilateral.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/simple_quadrilateral.pyi @@ -81,14 +81,14 @@ class SimpleQuadrilateral( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], quadrilateralType: typing.Union[MetaOapg.properties.quadrilateralType, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'all_of_1': return super().__new__( cls, - *args, + *_args, quadrilateralType=quadrilateralType, _configuration=_configuration, **kwargs, @@ -112,13 +112,13 @@ class SimpleQuadrilateral( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SimpleQuadrilateral': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/some_object.py b/samples/openapi3/client/petstore/python/petstore_api/model/some_object.py index 3ce8eab0b4..6bab0aa21b 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/some_object.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/some_object.py @@ -52,13 +52,13 @@ class SomeObject( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SomeObject': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/some_object.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/some_object.pyi index 3ce8eab0b4..6bab0aa21b 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/some_object.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/some_object.pyi @@ -52,13 +52,13 @@ class SomeObject( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SomeObject': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/special_model_name.py b/samples/openapi3/client/petstore/python/petstore_api/model/special_model_name.py index ca1f5c6ab8..cf21054ba5 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/special_model_name.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/special_model_name.py @@ -66,14 +66,14 @@ class SpecialModelName( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], a: typing.Union[MetaOapg.properties.a, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SpecialModelName': return super().__new__( cls, - *args, + *_args, a=a, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/special_model_name.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/special_model_name.pyi index ca1f5c6ab8..cf21054ba5 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/special_model_name.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/special_model_name.pyi @@ -66,14 +66,14 @@ class SpecialModelName( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], a: typing.Union[MetaOapg.properties.a, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SpecialModelName': return super().__new__( cls, - *args, + *_args, a=a, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/string_boolean_map.py b/samples/openapi3/client/petstore/python/petstore_api/model/string_boolean_map.py index 9d4a6136b5..005f6d1ade 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/string_boolean_map.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/string_boolean_map.py @@ -45,13 +45,13 @@ class StringBooleanMap( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[MetaOapg.additional_properties, bool, ], ) -> 'StringBooleanMap': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/string_boolean_map.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/string_boolean_map.pyi index 9d4a6136b5..005f6d1ade 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/string_boolean_map.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/string_boolean_map.pyi @@ -45,13 +45,13 @@ class StringBooleanMap( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[MetaOapg.additional_properties, bool, ], ) -> 'StringBooleanMap': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/string_enum.py b/samples/openapi3/client/petstore/python/petstore_api/model/string_enum.py index abc1696bc1..0f3c256162 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/string_enum.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/string_enum.py @@ -79,11 +79,11 @@ class StringEnum( def __new__( cls, - *args: typing.Union[None, str, ], + *_args: typing.Union[None, str, ], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'StringEnum': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/string_enum.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/string_enum.pyi index abc1696bc1..0f3c256162 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/string_enum.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/string_enum.pyi @@ -79,11 +79,11 @@ class StringEnum( def __new__( cls, - *args: typing.Union[None, str, ], + *_args: typing.Union[None, str, ], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'StringEnum': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/tag.py b/samples/openapi3/client/petstore/python/petstore_api/model/tag.py index a0176eead3..2628e605ba 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/tag.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/tag.py @@ -72,7 +72,7 @@ class Tag( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], id: typing.Union[MetaOapg.properties.id, decimal.Decimal, int, schemas.Unset] = schemas.unset, name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, @@ -80,7 +80,7 @@ class Tag( ) -> 'Tag': return super().__new__( cls, - *args, + *_args, id=id, name=name, _configuration=_configuration, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/tag.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/tag.pyi index a0176eead3..2628e605ba 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/tag.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/tag.pyi @@ -72,7 +72,7 @@ class Tag( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], id: typing.Union[MetaOapg.properties.id, decimal.Decimal, int, schemas.Unset] = schemas.unset, name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, @@ -80,7 +80,7 @@ class Tag( ) -> 'Tag': return super().__new__( cls, - *args, + *_args, id=id, name=name, _configuration=_configuration, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/triangle.py b/samples/openapi3/client/petstore/python/petstore_api/model/triangle.py index 0701b6d511..1e7b13c278 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/triangle.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/triangle.py @@ -64,13 +64,13 @@ class Triangle( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'Triangle': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/triangle.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/triangle.pyi index 0701b6d511..1e7b13c278 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/triangle.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/triangle.pyi @@ -64,13 +64,13 @@ class Triangle( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'Triangle': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/triangle_interface.py b/samples/openapi3/client/petstore/python/petstore_api/model/triangle_interface.py index 7ac28c0031..2521058b48 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/triangle_interface.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/triangle_interface.py @@ -95,7 +95,7 @@ class TriangleInterface( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], shapeType: typing.Union[MetaOapg.properties.shapeType, str, ], triangleType: typing.Union[MetaOapg.properties.triangleType, str, ], _configuration: typing.Optional[schemas.Configuration] = None, @@ -103,7 +103,7 @@ class TriangleInterface( ) -> 'TriangleInterface': return super().__new__( cls, - *args, + *_args, shapeType=shapeType, triangleType=triangleType, _configuration=_configuration, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/triangle_interface.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/triangle_interface.pyi index 86b525d359..24d263a569 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/triangle_interface.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/triangle_interface.pyi @@ -89,7 +89,7 @@ class TriangleInterface( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], shapeType: typing.Union[MetaOapg.properties.shapeType, str, ], triangleType: typing.Union[MetaOapg.properties.triangleType, str, ], _configuration: typing.Optional[schemas.Configuration] = None, @@ -97,7 +97,7 @@ class TriangleInterface( ) -> 'TriangleInterface': return super().__new__( cls, - *args, + *_args, shapeType=shapeType, triangleType=triangleType, _configuration=_configuration, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/user.py b/samples/openapi3/client/petstore/python/petstore_api/model/user.py index c8beb19d82..ade6f72fce 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/user.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/user.py @@ -57,13 +57,13 @@ class User( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, None, ], + *_args: typing.Union[dict, frozendict.frozendict, None, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'objectWithNoDeclaredPropsNullable': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -81,13 +81,13 @@ class User( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'anyTypeExceptNullProp': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -203,7 +203,7 @@ class User( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], id: typing.Union[MetaOapg.properties.id, decimal.Decimal, int, schemas.Unset] = schemas.unset, username: typing.Union[MetaOapg.properties.username, str, schemas.Unset] = schemas.unset, firstName: typing.Union[MetaOapg.properties.firstName, str, schemas.Unset] = schemas.unset, @@ -222,7 +222,7 @@ class User( ) -> 'User': return super().__new__( cls, - *args, + *_args, id=id, username=username, firstName=firstName, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/user.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/user.pyi index c8beb19d82..ade6f72fce 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/user.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/user.pyi @@ -57,13 +57,13 @@ class User( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, None, ], + *_args: typing.Union[dict, frozendict.frozendict, None, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'objectWithNoDeclaredPropsNullable': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -81,13 +81,13 @@ class User( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'anyTypeExceptNullProp': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -203,7 +203,7 @@ class User( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], id: typing.Union[MetaOapg.properties.id, decimal.Decimal, int, schemas.Unset] = schemas.unset, username: typing.Union[MetaOapg.properties.username, str, schemas.Unset] = schemas.unset, firstName: typing.Union[MetaOapg.properties.firstName, str, schemas.Unset] = schemas.unset, @@ -222,7 +222,7 @@ class User( ) -> 'User': return super().__new__( cls, - *args, + *_args, id=id, username=username, firstName=firstName, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/whale.py b/samples/openapi3/client/petstore/python/petstore_api/model/whale.py index b645789bd1..40c14099ab 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/whale.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/whale.py @@ -100,7 +100,7 @@ class Whale( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], className: typing.Union[MetaOapg.properties.className, str, ], hasBaleen: typing.Union[MetaOapg.properties.hasBaleen, bool, schemas.Unset] = schemas.unset, hasTeeth: typing.Union[MetaOapg.properties.hasTeeth, bool, schemas.Unset] = schemas.unset, @@ -109,7 +109,7 @@ class Whale( ) -> 'Whale': return super().__new__( cls, - *args, + *_args, className=className, hasBaleen=hasBaleen, hasTeeth=hasTeeth, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/whale.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/whale.pyi index 48e2538cb8..3eb37ff18d 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/whale.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/whale.pyi @@ -94,7 +94,7 @@ class Whale( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], className: typing.Union[MetaOapg.properties.className, str, ], hasBaleen: typing.Union[MetaOapg.properties.hasBaleen, bool, schemas.Unset] = schemas.unset, hasTeeth: typing.Union[MetaOapg.properties.hasTeeth, bool, schemas.Unset] = schemas.unset, @@ -103,7 +103,7 @@ class Whale( ) -> 'Whale': return super().__new__( cls, - *args, + *_args, className=className, hasBaleen=hasBaleen, hasTeeth=hasTeeth, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/zebra.py b/samples/openapi3/client/petstore/python/petstore_api/model/zebra.py index 960a43f592..92723dd978 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/zebra.py +++ b/samples/openapi3/client/petstore/python/petstore_api/model/zebra.py @@ -116,7 +116,7 @@ class Zebra( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], className: typing.Union[MetaOapg.properties.className, str, ], type: typing.Union[MetaOapg.properties.type, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, @@ -124,7 +124,7 @@ class Zebra( ) -> 'Zebra': return super().__new__( cls, - *args, + *_args, className=className, type=type, _configuration=_configuration, diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/zebra.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/zebra.pyi index 3666395b31..ee12ea4ba4 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/model/zebra.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/model/zebra.pyi @@ -102,7 +102,7 @@ class Zebra( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], className: typing.Union[MetaOapg.properties.className, str, ], type: typing.Union[MetaOapg.properties.type, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, @@ -110,7 +110,7 @@ class Zebra( ) -> 'Zebra': return super().__new__( cls, - *args, + *_args, className=className, type=type, _configuration=_configuration, diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/models/__init__.py index 2d7b91d228..c2efa73d6a 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/models/__init__.py +++ b/samples/openapi3/client/petstore/python/petstore_api/models/__init__.py @@ -98,6 +98,7 @@ from petstore_api.model.number import Number from petstore_api.model.number_only import NumberOnly from petstore_api.model.number_with_validations import NumberWithValidations from petstore_api.model.object_interface import ObjectInterface +from petstore_api.model.object_model_with_arg_and_args_properties import ObjectModelWithArgAndArgsProperties from petstore_api.model.object_model_with_ref_props import ObjectModelWithRefProps from petstore_api.model.object_with_all_of_with_req_test_prop_from_unset_add_prop import ObjectWithAllOfWithReqTestPropFromUnsetAddProp from petstore_api.model.object_with_decimal_properties import ObjectWithDecimalProperties diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get.py index f56f26eac5..25044c6b7d 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get.py @@ -60,12 +60,12 @@ class EnumQueryStringArraySchema( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'EnumQueryStringArraySchema': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -219,12 +219,12 @@ class EnumHeaderStringArraySchema( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'EnumHeaderStringArraySchema': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -328,12 +328,12 @@ class SchemaForRequestBodyApplicationXWwwFormUrlencoded( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'enum_form_string_array': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -399,7 +399,7 @@ class SchemaForRequestBodyApplicationXWwwFormUrlencoded( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], enum_form_string_array: typing.Union[MetaOapg.properties.enum_form_string_array, list, tuple, schemas.Unset] = schemas.unset, enum_form_string: typing.Union[MetaOapg.properties.enum_form_string, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, @@ -407,7 +407,7 @@ class SchemaForRequestBodyApplicationXWwwFormUrlencoded( ) -> 'SchemaForRequestBodyApplicationXWwwFormUrlencoded': return super().__new__( cls, - *args, + *_args, enum_form_string_array=enum_form_string_array, enum_form_string=enum_form_string, _configuration=_configuration, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get.pyi index a2468eb18d..5b24afaf78 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get.pyi @@ -51,12 +51,12 @@ class EnumQueryStringArraySchema( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'EnumQueryStringArraySchema': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -179,12 +179,12 @@ class EnumHeaderStringArraySchema( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'EnumHeaderStringArraySchema': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -273,12 +273,12 @@ class SchemaForRequestBodyApplicationXWwwFormUrlencoded( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'enum_form_string_array': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -336,7 +336,7 @@ class SchemaForRequestBodyApplicationXWwwFormUrlencoded( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], enum_form_string_array: typing.Union[MetaOapg.properties.enum_form_string_array, list, tuple, schemas.Unset] = schemas.unset, enum_form_string: typing.Union[MetaOapg.properties.enum_form_string, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, @@ -344,7 +344,7 @@ class SchemaForRequestBodyApplicationXWwwFormUrlencoded( ) -> 'SchemaForRequestBodyApplicationXWwwFormUrlencoded': return super().__new__( cls, - *args, + *_args, enum_form_string_array=enum_form_string_array, enum_form_string=enum_form_string, _configuration=_configuration, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post.py index 5bded5d3e0..33297e12cf 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post.py @@ -261,7 +261,7 @@ class SchemaForRequestBodyApplicationXWwwFormUrlencoded( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], number: typing.Union[MetaOapg.properties.number, decimal.Decimal, int, float, ], pattern_without_delimiter: typing.Union[MetaOapg.properties.pattern_without_delimiter, str, ], byte: typing.Union[MetaOapg.properties.byte, str, ], @@ -280,7 +280,7 @@ class SchemaForRequestBodyApplicationXWwwFormUrlencoded( ) -> 'SchemaForRequestBodyApplicationXWwwFormUrlencoded': return super().__new__( cls, - *args, + *_args, number=number, pattern_without_delimiter=pattern_without_delimiter, byte=byte, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post.pyi index a7dc2f6dec..0ef264888a 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post.pyi @@ -219,7 +219,7 @@ class SchemaForRequestBodyApplicationXWwwFormUrlencoded( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], number: typing.Union[MetaOapg.properties.number, decimal.Decimal, int, float, ], pattern_without_delimiter: typing.Union[MetaOapg.properties.pattern_without_delimiter, str, ], byte: typing.Union[MetaOapg.properties.byte, str, ], @@ -238,7 +238,7 @@ class SchemaForRequestBodyApplicationXWwwFormUrlencoded( ) -> 'SchemaForRequestBodyApplicationXWwwFormUrlencoded': return super().__new__( cls, - *args, + *_args, number=number, pattern_without_delimiter=pattern_without_delimiter, byte=byte, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post.py index 2363305f7c..7b915f0346 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post.py @@ -47,13 +47,13 @@ class SchemaForRequestBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[MetaOapg.additional_properties, str, ], ) -> 'SchemaForRequestBodyApplicationJson': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post.pyi index 71113ab91a..a435623079 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post.pyi @@ -45,13 +45,13 @@ class SchemaForRequestBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[MetaOapg.additional_properties, str, ], ) -> 'SchemaForRequestBodyApplicationJson': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post.py index d7904db7a8..400a670686 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post.py @@ -63,13 +63,13 @@ class CompositionAtRootSchema( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'CompositionAtRootSchema': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -118,13 +118,13 @@ class CompositionInPropertySchema( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'someProp': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -155,14 +155,14 @@ class CompositionInPropertySchema( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], someProp: typing.Union[MetaOapg.properties.someProp, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'CompositionInPropertySchema': return super().__new__( cls, - *args, + *_args, someProp=someProp, _configuration=_configuration, **kwargs, @@ -234,13 +234,13 @@ class SchemaForRequestBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaForRequestBodyApplicationJson': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -289,13 +289,13 @@ class SchemaForRequestBodyMultipartFormData( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'someProp': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -326,14 +326,14 @@ class SchemaForRequestBodyMultipartFormData( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], someProp: typing.Union[MetaOapg.properties.someProp, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaForRequestBodyMultipartFormData': return super().__new__( cls, - *args, + *_args, someProp=someProp, _configuration=_configuration, **kwargs, @@ -383,13 +383,13 @@ class SchemaFor200ResponseBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaFor200ResponseBodyApplicationJson': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -438,13 +438,13 @@ class SchemaFor200ResponseBodyMultipartFormData( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'someProp': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -475,14 +475,14 @@ class SchemaFor200ResponseBodyMultipartFormData( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], someProp: typing.Union[MetaOapg.properties.someProp, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaFor200ResponseBodyMultipartFormData': return super().__new__( cls, - *args, + *_args, someProp=someProp, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post.pyi index 56503791e7..4544446690 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post.pyi @@ -58,13 +58,13 @@ class CompositionAtRootSchema( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'CompositionAtRootSchema': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -110,13 +110,13 @@ class CompositionInPropertySchema( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'someProp': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -147,14 +147,14 @@ class CompositionInPropertySchema( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], someProp: typing.Union[MetaOapg.properties.someProp, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'CompositionInPropertySchema': return super().__new__( cls, - *args, + *_args, someProp=someProp, _configuration=_configuration, **kwargs, @@ -223,13 +223,13 @@ class SchemaForRequestBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaForRequestBodyApplicationJson': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -275,13 +275,13 @@ class SchemaForRequestBodyMultipartFormData( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'someProp': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -312,14 +312,14 @@ class SchemaForRequestBodyMultipartFormData( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], someProp: typing.Union[MetaOapg.properties.someProp, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaForRequestBodyMultipartFormData': return super().__new__( cls, - *args, + *_args, someProp=someProp, _configuration=_configuration, **kwargs, @@ -366,13 +366,13 @@ class SchemaFor200ResponseBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaFor200ResponseBodyApplicationJson': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -418,13 +418,13 @@ class SchemaFor200ResponseBodyMultipartFormData( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'someProp': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) @@ -455,14 +455,14 @@ class SchemaFor200ResponseBodyMultipartFormData( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], someProp: typing.Union[MetaOapg.properties.someProp, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaFor200ResponseBodyMultipartFormData': return super().__new__( cls, - *args, + *_args, someProp=someProp, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get.py index 262f5e3a77..61e22a57e8 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get.py @@ -81,7 +81,7 @@ class SchemaForRequestBodyApplicationXWwwFormUrlencoded( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], param: typing.Union[MetaOapg.properties.param, str, ], param2: typing.Union[MetaOapg.properties.param2, str, ], _configuration: typing.Optional[schemas.Configuration] = None, @@ -89,7 +89,7 @@ class SchemaForRequestBodyApplicationXWwwFormUrlencoded( ) -> 'SchemaForRequestBodyApplicationXWwwFormUrlencoded': return super().__new__( cls, - *args, + *_args, param=param, param2=param2, _configuration=_configuration, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get.pyi index e1ce657827..11810c7d70 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get.pyi @@ -79,7 +79,7 @@ class SchemaForRequestBodyApplicationXWwwFormUrlencoded( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], param: typing.Union[MetaOapg.properties.param, str, ], param2: typing.Union[MetaOapg.properties.param2, str, ], _configuration: typing.Optional[schemas.Configuration] = None, @@ -87,7 +87,7 @@ class SchemaForRequestBodyApplicationXWwwFormUrlencoded( ) -> 'SchemaForRequestBodyApplicationXWwwFormUrlencoded': return super().__new__( cls, - *args, + *_args, param=param, param2=param2, _configuration=_configuration, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get.py index 035b7c3bd9..39f303918e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get.py @@ -65,14 +65,14 @@ class MapBeanSchema( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], keyword: typing.Union[MetaOapg.properties.keyword, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'MapBeanSchema': return super().__new__( cls, - *args, + *_args, keyword=keyword, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get.pyi index ddfcbed621..3ac48d9e1c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get.pyi @@ -63,14 +63,14 @@ class MapBeanSchema( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], keyword: typing.Union[MetaOapg.properties.keyword, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'MapBeanSchema': return super().__new__( cls, - *args, + *_args, keyword=keyword, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post.py index d5fb0a61b0..c330be841a 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post.py @@ -107,7 +107,7 @@ class SchemaForRequestBodyMultipartFormData( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], requiredFile: typing.Union[MetaOapg.properties.requiredFile, bytes, io.FileIO, io.BufferedReader, ], additionalMetadata: typing.Union[MetaOapg.properties.additionalMetadata, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, @@ -115,7 +115,7 @@ class SchemaForRequestBodyMultipartFormData( ) -> 'SchemaForRequestBodyMultipartFormData': return super().__new__( cls, - *args, + *_args, requiredFile=requiredFile, additionalMetadata=additionalMetadata, _configuration=_configuration, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post.pyi index 94f430e8bb..593beed150 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post.pyi @@ -105,7 +105,7 @@ class SchemaForRequestBodyMultipartFormData( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], requiredFile: typing.Union[MetaOapg.properties.requiredFile, bytes, io.FileIO, io.BufferedReader, ], additionalMetadata: typing.Union[MetaOapg.properties.additionalMetadata, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, @@ -113,7 +113,7 @@ class SchemaForRequestBodyMultipartFormData( ) -> 'SchemaForRequestBodyMultipartFormData': return super().__new__( cls, - *args, + *_args, requiredFile=requiredFile, additionalMetadata=additionalMetadata, _configuration=_configuration, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_parameters/put.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_parameters/put.py index 1384c49ad1..1b14889b7c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_parameters/put.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_parameters/put.py @@ -41,12 +41,12 @@ class PipeSchema( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'PipeSchema': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -64,12 +64,12 @@ class IoutilSchema( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'IoutilSchema': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -87,12 +87,12 @@ class HttpSchema( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'HttpSchema': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -110,12 +110,12 @@ class UrlSchema( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'UrlSchema': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -133,12 +133,12 @@ class ContextSchema( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'ContextSchema': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_parameters/put.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_parameters/put.pyi index 230c45c3ae..c8ceaccc78 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_parameters/put.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_parameters/put.pyi @@ -39,12 +39,12 @@ class PipeSchema( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'PipeSchema': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -62,12 +62,12 @@ class IoutilSchema( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'IoutilSchema': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -85,12 +85,12 @@ class HttpSchema( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'HttpSchema': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -108,12 +108,12 @@ class UrlSchema( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'UrlSchema': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -131,12 +131,12 @@ class ContextSchema( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'ContextSchema': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post.py index 867654e95f..4e063e9ce4 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post.py @@ -81,7 +81,7 @@ class SchemaForRequestBodyMultipartFormData( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], file: typing.Union[MetaOapg.properties.file, bytes, io.FileIO, io.BufferedReader, ], additionalMetadata: typing.Union[MetaOapg.properties.additionalMetadata, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, @@ -89,7 +89,7 @@ class SchemaForRequestBodyMultipartFormData( ) -> 'SchemaForRequestBodyMultipartFormData': return super().__new__( cls, - *args, + *_args, file=file, additionalMetadata=additionalMetadata, _configuration=_configuration, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post.pyi index c77969fbf7..53c99c04e8 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post.pyi @@ -79,7 +79,7 @@ class SchemaForRequestBodyMultipartFormData( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], file: typing.Union[MetaOapg.properties.file, bytes, io.FileIO, io.BufferedReader, ], additionalMetadata: typing.Union[MetaOapg.properties.additionalMetadata, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, @@ -87,7 +87,7 @@ class SchemaForRequestBodyMultipartFormData( ) -> 'SchemaForRequestBodyMultipartFormData': return super().__new__( cls, - *args, + *_args, file=file, additionalMetadata=additionalMetadata, _configuration=_configuration, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post.py index 4284b0119c..680e3ab74e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post.py @@ -52,12 +52,12 @@ class SchemaForRequestBodyMultipartFormData( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, bytes, io.FileIO, io.BufferedReader, ]], typing.List[typing.Union[MetaOapg.items, bytes, io.FileIO, io.BufferedReader, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, bytes, io.FileIO, io.BufferedReader, ]], typing.List[typing.Union[MetaOapg.items, bytes, io.FileIO, io.BufferedReader, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'files': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -90,14 +90,14 @@ class SchemaForRequestBodyMultipartFormData( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], files: typing.Union[MetaOapg.properties.files, list, tuple, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaForRequestBodyMultipartFormData': return super().__new__( cls, - *args, + *_args, files=files, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post.pyi index 2b1e1f508f..47f188f923 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post.pyi @@ -50,12 +50,12 @@ class SchemaForRequestBodyMultipartFormData( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, bytes, io.FileIO, io.BufferedReader, ]], typing.List[typing.Union[MetaOapg.items, bytes, io.FileIO, io.BufferedReader, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, bytes, io.FileIO, io.BufferedReader, ]], typing.List[typing.Union[MetaOapg.items, bytes, io.FileIO, io.BufferedReader, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'files': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -88,14 +88,14 @@ class SchemaForRequestBodyMultipartFormData( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], files: typing.Union[MetaOapg.properties.files, list, tuple, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaForRequestBodyMultipartFormData': return super().__new__( cls, - *args, + *_args, files=files, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get.py index e2d1fda9cf..043cf915fc 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get.py @@ -70,14 +70,14 @@ class SchemaFor0ResponseBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], string: typing.Union['Foo', schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaFor0ResponseBodyApplicationJson': return super().__new__( cls, - *args, + *_args, string=string, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get.pyi index 9cfee5e76d..734621db67 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get.pyi @@ -68,14 +68,14 @@ class SchemaFor0ResponseBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], string: typing.Union['Foo', schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'SchemaFor0ResponseBodyApplicationJson': return super().__new__( cls, - *args, + *_args, string=string, _configuration=_configuration, **kwargs, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get.py index 5b753a5bb5..698c3d1816 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get.py @@ -67,12 +67,12 @@ class StatusSchema( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'StatusSchema': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -121,12 +121,12 @@ class SchemaFor200ResponseBodyApplicationXml( def __new__( cls, - arg: typing.Union[typing.Tuple['Pet'], typing.List['Pet']], + _arg: typing.Union[typing.Tuple['Pet'], typing.List['Pet']], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'SchemaFor200ResponseBodyApplicationXml': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -147,12 +147,12 @@ class SchemaFor200ResponseBodyApplicationJson( def __new__( cls, - arg: typing.Union[typing.Tuple['Pet'], typing.List['Pet']], + _arg: typing.Union[typing.Tuple['Pet'], typing.List['Pet']], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'SchemaFor200ResponseBodyApplicationJson': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get.pyi index 59b71f5fc1..b3c24534ec 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get.pyi @@ -57,12 +57,12 @@ class StatusSchema( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'StatusSchema': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -107,12 +107,12 @@ class SchemaFor200ResponseBodyApplicationXml( def __new__( cls, - arg: typing.Union[typing.Tuple['Pet'], typing.List['Pet']], + _arg: typing.Union[typing.Tuple['Pet'], typing.List['Pet']], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'SchemaFor200ResponseBodyApplicationXml': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -133,12 +133,12 @@ class SchemaFor200ResponseBodyApplicationJson( def __new__( cls, - arg: typing.Union[typing.Tuple['Pet'], typing.List['Pet']], + _arg: typing.Union[typing.Tuple['Pet'], typing.List['Pet']], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'SchemaFor200ResponseBodyApplicationJson': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get.py index 4725d356cf..1f153d03c7 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get.py @@ -42,12 +42,12 @@ class TagsSchema( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'TagsSchema': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -96,12 +96,12 @@ class SchemaFor200ResponseBodyApplicationXml( def __new__( cls, - arg: typing.Union[typing.Tuple['Pet'], typing.List['Pet']], + _arg: typing.Union[typing.Tuple['Pet'], typing.List['Pet']], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'SchemaFor200ResponseBodyApplicationXml': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -122,12 +122,12 @@ class SchemaFor200ResponseBodyApplicationJson( def __new__( cls, - arg: typing.Union[typing.Tuple['Pet'], typing.List['Pet']], + _arg: typing.Union[typing.Tuple['Pet'], typing.List['Pet']], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'SchemaFor200ResponseBodyApplicationJson': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get.pyi index e512a26f01..7f84406d6a 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get.pyi @@ -40,12 +40,12 @@ class TagsSchema( def __new__( cls, - arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], + _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'TagsSchema': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -90,12 +90,12 @@ class SchemaFor200ResponseBodyApplicationXml( def __new__( cls, - arg: typing.Union[typing.Tuple['Pet'], typing.List['Pet']], + _arg: typing.Union[typing.Tuple['Pet'], typing.List['Pet']], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'SchemaFor200ResponseBodyApplicationXml': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) @@ -116,12 +116,12 @@ class SchemaFor200ResponseBodyApplicationJson( def __new__( cls, - arg: typing.Union[typing.Tuple['Pet'], typing.List['Pet']], + _arg: typing.Union[typing.Tuple['Pet'], typing.List['Pet']], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'SchemaFor200ResponseBodyApplicationJson': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post.py index 101ac83216..4e1e7a7136 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post.py @@ -100,7 +100,7 @@ class SchemaForRequestBodyApplicationXWwwFormUrlencoded( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, status: typing.Union[MetaOapg.properties.status, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, @@ -108,7 +108,7 @@ class SchemaForRequestBodyApplicationXWwwFormUrlencoded( ) -> 'SchemaForRequestBodyApplicationXWwwFormUrlencoded': return super().__new__( cls, - *args, + *_args, name=name, status=status, _configuration=_configuration, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post.pyi index f2be056a38..e95c257148 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post.pyi @@ -98,7 +98,7 @@ class SchemaForRequestBodyApplicationXWwwFormUrlencoded( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, status: typing.Union[MetaOapg.properties.status, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, @@ -106,7 +106,7 @@ class SchemaForRequestBodyApplicationXWwwFormUrlencoded( ) -> 'SchemaForRequestBodyApplicationXWwwFormUrlencoded': return super().__new__( cls, - *args, + *_args, name=name, status=status, _configuration=_configuration, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post.py index 196f0beccf..375b2cf16e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post.py @@ -102,7 +102,7 @@ class SchemaForRequestBodyMultipartFormData( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], additionalMetadata: typing.Union[MetaOapg.properties.additionalMetadata, str, schemas.Unset] = schemas.unset, file: typing.Union[MetaOapg.properties.file, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, @@ -110,7 +110,7 @@ class SchemaForRequestBodyMultipartFormData( ) -> 'SchemaForRequestBodyMultipartFormData': return super().__new__( cls, - *args, + *_args, additionalMetadata=additionalMetadata, file=file, _configuration=_configuration, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post.pyi index 84c05ddf6e..b9131a0485 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post.pyi @@ -100,7 +100,7 @@ class SchemaForRequestBodyMultipartFormData( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], additionalMetadata: typing.Union[MetaOapg.properties.additionalMetadata, str, schemas.Unset] = schemas.unset, file: typing.Union[MetaOapg.properties.file, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, @@ -108,7 +108,7 @@ class SchemaForRequestBodyMultipartFormData( ) -> 'SchemaForRequestBodyMultipartFormData': return super().__new__( cls, - *args, + *_args, additionalMetadata=additionalMetadata, file=file, _configuration=_configuration, diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get.py index 56ed16e1cc..7cf9163c1e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get.py @@ -49,13 +49,13 @@ class SchemaFor200ResponseBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[MetaOapg.additional_properties, decimal.Decimal, int, ], ) -> 'SchemaFor200ResponseBodyApplicationJson': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get.pyi index b2eb524a8e..8e2e7f1eb4 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get.pyi @@ -44,13 +44,13 @@ class SchemaFor200ResponseBodyApplicationJson( def __new__( cls, - *args: typing.Union[dict, frozendict.frozendict, ], + *_args: typing.Union[dict, frozendict.frozendict, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[MetaOapg.additional_properties, decimal.Decimal, int, ], ) -> 'SchemaFor200ResponseBodyApplicationJson': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, **kwargs, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post.py index d596822b47..186cc7195f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post.py @@ -45,12 +45,12 @@ class SchemaForRequestBodyApplicationJson( def __new__( cls, - arg: typing.Union[typing.Tuple['User'], typing.List['User']], + _arg: typing.Union[typing.Tuple['User'], typing.List['User']], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'SchemaForRequestBodyApplicationJson': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post.pyi index 6c83bb4f8b..8a66592df7 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post.pyi @@ -43,12 +43,12 @@ class SchemaForRequestBodyApplicationJson( def __new__( cls, - arg: typing.Union[typing.Tuple['User'], typing.List['User']], + _arg: typing.Union[typing.Tuple['User'], typing.List['User']], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'SchemaForRequestBodyApplicationJson': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post.py index fd0fe46f1b..9647b9ca3e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post.py @@ -45,12 +45,12 @@ class SchemaForRequestBodyApplicationJson( def __new__( cls, - arg: typing.Union[typing.Tuple['User'], typing.List['User']], + _arg: typing.Union[typing.Tuple['User'], typing.List['User']], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'SchemaForRequestBodyApplicationJson': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post.pyi index ef9c94f622..3bdc5950ba 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post.pyi @@ -43,12 +43,12 @@ class SchemaForRequestBodyApplicationJson( def __new__( cls, - arg: typing.Union[typing.Tuple['User'], typing.List['User']], + _arg: typing.Union[typing.Tuple['User'], typing.List['User']], _configuration: typing.Optional[schemas.Configuration] = None, ) -> 'SchemaForRequestBodyApplicationJson': return super().__new__( cls, - arg, + _arg, _configuration=_configuration, ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/schemas.py b/samples/openapi3/client/petstore/python/petstore_api/schemas.py index 9186b8beef..e2c6c665dd 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/schemas.py +++ b/samples/openapi3/client/petstore/python/petstore_api/schemas.py @@ -50,17 +50,17 @@ class FileIO(io.FileIO): Note: this class is not immutable """ - def __new__(cls, arg: typing.Union[io.FileIO, io.BufferedReader]): - if isinstance(arg, (io.FileIO, io.BufferedReader)): - if arg.closed: + def __new__(cls, _arg: typing.Union[io.FileIO, io.BufferedReader]): + if isinstance(_arg, (io.FileIO, io.BufferedReader)): + if _arg.closed: raise ApiValueError('Invalid file state; file is closed and must be open') - arg.close() - inst = super(FileIO, cls).__new__(cls, arg.name) - super(FileIO, inst).__init__(arg.name) + _arg.close() + inst = super(FileIO, cls).__new__(cls, _arg.name) + super(FileIO, inst).__init__(_arg.name) return inst - raise ApiValueError('FileIO must be passed arg which contains the open file') + raise ApiValueError('FileIO must be passed _arg which contains the open file') - def __init__(self, arg: typing.Union[io.FileIO, io.BufferedReader]): + def __init__(self, _arg: typing.Union[io.FileIO, io.BufferedReader]): pass @@ -151,11 +151,11 @@ class ValidationMetadata(frozendict.frozendict): class Singleton: """ Enums and singletons are the same - The same instance is returned for a given key of (cls, arg) + The same instance is returned for a given key of (cls, _arg) """ _instances = {} - def __new__(cls, arg: typing.Any, **kwargs): + def __new__(cls, _arg: typing.Any, **kwargs): """ cls base classes: BoolClass, NoneClass, str, decimal.Decimal The 3rd key is used in the tuple below for a corner case where an enum contains integer 1 @@ -163,15 +163,15 @@ class Singleton: Decimal('1.0') == Decimal('1') But if we omitted the 3rd value in the key, then Decimal('1.0') would be stored as Decimal('1') and json serializing that instance would be '1' rather than the expected '1.0' - Adding the 3rd value, the str of arg ensures that 1.0 -> Decimal('1.0') which is serialized as 1.0 + Adding the 3rd value, the str of _arg ensures that 1.0 -> Decimal('1.0') which is serialized as 1.0 """ - key = (cls, arg, str(arg)) + key = (cls, _arg, str(_arg)) if key not in cls._instances: - if isinstance(arg, (none_type, bool, BoolClass, NoneClass)): + if isinstance(_arg, (none_type, bool, BoolClass, NoneClass)): inst = super().__new__(cls) cls._instances[key] = inst else: - cls._instances[key] = super().__new__(cls, arg) + cls._instances[key] = super().__new__(cls, _arg) return cls._instances[key] def __repr__(self): @@ -499,12 +499,12 @@ class Schema: def __remove_unsets(kwargs): return {key: val for key, val in kwargs.items() if val is not unset} - def __new__(cls, *args: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema'], _configuration: typing.Optional[Configuration] = None, **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema', Unset]): + def __new__(cls, *_args: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema'], _configuration: typing.Optional[Configuration] = None, **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema', Unset]): """ Schema __new__ Args: - args (int/float/decimal.Decimal/str/list/tuple/dict/frozendict.frozendict/bool/None): the value + _args (int/float/decimal.Decimal/str/list/tuple/dict/frozendict.frozendict/bool/None): the value kwargs (str, int/float/decimal.Decimal/str/list/tuple/dict/frozendict.frozendict/bool/None): dict values _configuration: contains the Configuration that enables json schema validation keywords like minItems, minLength etc @@ -513,14 +513,14 @@ class Schema: are instance properties if they are named normally :( """ __kwargs = cls.__remove_unsets(kwargs) - if not args and not __kwargs: + if not _args and not __kwargs: raise TypeError( 'No input given. args or kwargs must be given.' ) - if not __kwargs and args and not isinstance(args[0], dict): - __arg = args[0] + if not __kwargs and _args and not isinstance(_args[0], dict): + __arg = _args[0] else: - __arg = cls.__get_input_dict(*args, **__kwargs) + __arg = cls.__get_input_dict(*_args, **__kwargs) __from_server = False __validated_path_to_schemas = {} __arg = cast_to_allowed_types( @@ -537,7 +537,7 @@ class Schema: def __init__( self, - *args: typing.Union[ + *_args: typing.Union[ dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema'], _configuration: typing.Optional[Configuration] = None, **kwargs: typing.Union[ @@ -2046,8 +2046,8 @@ class ListSchema( def from_openapi_data_oapg(cls, arg: typing.List[typing.Any], _configuration: typing.Optional[Configuration] = None): return super().from_openapi_data_oapg(arg, _configuration=_configuration) - def __new__(cls, arg: typing.Union[typing.List[typing.Any], typing.Tuple[typing.Any]], **kwargs: Configuration): - return super().__new__(cls, arg, **kwargs) + def __new__(cls, _arg: typing.Union[typing.List[typing.Any], typing.Tuple[typing.Any]], **kwargs: Configuration): + return super().__new__(cls, _arg, **kwargs) class NoneSchema( @@ -2060,8 +2060,8 @@ class NoneSchema( def from_openapi_data_oapg(cls, arg: None, _configuration: typing.Optional[Configuration] = None): return super().from_openapi_data_oapg(arg, _configuration=_configuration) - def __new__(cls, arg: None, **kwargs: Configuration): - return super().__new__(cls, arg, **kwargs) + def __new__(cls, _arg: None, **kwargs: Configuration): + return super().__new__(cls, _arg, **kwargs) class NumberSchema( @@ -2078,8 +2078,8 @@ class NumberSchema( def from_openapi_data_oapg(cls, arg: typing.Union[int, float], _configuration: typing.Optional[Configuration] = None): return super().from_openapi_data_oapg(arg, _configuration=_configuration) - def __new__(cls, arg: typing.Union[decimal.Decimal, int, float], **kwargs: Configuration): - return super().__new__(cls, arg, **kwargs) + def __new__(cls, _arg: typing.Union[decimal.Decimal, int, float], **kwargs: Configuration): + return super().__new__(cls, _arg, **kwargs) class IntBase: @@ -2121,8 +2121,8 @@ class IntSchema(IntBase, NumberSchema): def from_openapi_data_oapg(cls, arg: int, _configuration: typing.Optional[Configuration] = None): return super().from_openapi_data_oapg(arg, _configuration=_configuration) - def __new__(cls, arg: typing.Union[decimal.Decimal, int], **kwargs: Configuration): - return super().__new__(cls, arg, **kwargs) + def __new__(cls, _arg: typing.Union[decimal.Decimal, int], **kwargs: Configuration): + return super().__new__(cls, _arg, **kwargs) class Int32Base: @@ -2275,31 +2275,31 @@ class StrSchema( def from_openapi_data_oapg(cls, arg: str, _configuration: typing.Optional[Configuration] = None) -> 'StrSchema': return super().from_openapi_data_oapg(arg, _configuration=_configuration) - def __new__(cls, arg: typing.Union[str, date, datetime, uuid.UUID], **kwargs: Configuration): - return super().__new__(cls, arg, **kwargs) + def __new__(cls, _arg: typing.Union[str, date, datetime, uuid.UUID], **kwargs: Configuration): + return super().__new__(cls, _arg, **kwargs) class UUIDSchema(UUIDBase, StrSchema): - def __new__(cls, arg: typing.Union[str, uuid.UUID], **kwargs: Configuration): - return super().__new__(cls, arg, **kwargs) + def __new__(cls, _arg: typing.Union[str, uuid.UUID], **kwargs: Configuration): + return super().__new__(cls, _arg, **kwargs) class DateSchema(DateBase, StrSchema): - def __new__(cls, arg: typing.Union[str, date], **kwargs: Configuration): - return super().__new__(cls, arg, **kwargs) + def __new__(cls, _arg: typing.Union[str, date], **kwargs: Configuration): + return super().__new__(cls, _arg, **kwargs) class DateTimeSchema(DateTimeBase, StrSchema): - def __new__(cls, arg: typing.Union[str, datetime], **kwargs: Configuration): - return super().__new__(cls, arg, **kwargs) + def __new__(cls, _arg: typing.Union[str, datetime], **kwargs: Configuration): + return super().__new__(cls, _arg, **kwargs) class DecimalSchema(DecimalBase, StrSchema): - def __new__(cls, arg: str, **kwargs: Configuration): + def __new__(cls, _arg: str, **kwargs: Configuration): """ Note: Decimals may not be passed in because cast_to_allowed_types is only invoked once for payloads which can be simple (str) or complex (dicts or lists with nested values) @@ -2308,7 +2308,7 @@ class DecimalSchema(DecimalBase, StrSchema): if one was using it for a StrSchema (where it should be cast to str) or one is using it for NumberSchema where it should stay as Decimal. """ - return super().__new__(cls, arg, **kwargs) + return super().__new__(cls, _arg, **kwargs) class BytesSchema( @@ -2318,8 +2318,8 @@ class BytesSchema( """ this class will subclass bytes and is immutable """ - def __new__(cls, arg: bytes, **kwargs: Configuration): - return super(Schema, cls).__new__(cls, arg) + def __new__(cls, _arg: bytes, **kwargs: Configuration): + return super(Schema, cls).__new__(cls, _arg) class FileSchema( @@ -2343,8 +2343,8 @@ class FileSchema( - to be able to preserve file name info """ - def __new__(cls, arg: typing.Union[io.FileIO, io.BufferedReader], **kwargs: Configuration): - return super(Schema, cls).__new__(cls, arg) + def __new__(cls, _arg: typing.Union[io.FileIO, io.BufferedReader], **kwargs: Configuration): + return super(Schema, cls).__new__(cls, _arg) class BinaryBase: @@ -2365,8 +2365,8 @@ class BinarySchema( FileSchema, ] - def __new__(cls, arg: typing.Union[io.FileIO, io.BufferedReader, bytes], **kwargs: Configuration): - return super().__new__(cls, arg) + def __new__(cls, _arg: typing.Union[io.FileIO, io.BufferedReader, bytes], **kwargs: Configuration): + return super().__new__(cls, _arg) class BoolSchema( @@ -2379,8 +2379,8 @@ class BoolSchema( def from_openapi_data_oapg(cls, arg: bool, _configuration: typing.Optional[Configuration] = None): return super().from_openapi_data_oapg(arg, _configuration=_configuration) - def __new__(cls, arg: bool, **kwargs: ValidationMetadata): - return super().__new__(cls, arg, **kwargs) + def __new__(cls, _arg: bool, **kwargs: ValidationMetadata): + return super().__new__(cls, _arg, **kwargs) class AnyTypeSchema( @@ -2416,12 +2416,12 @@ class NotAnyTypeSchema( def __new__( cls, - *args, + *_args, _configuration: typing.Optional[Configuration] = None, ) -> 'NotAnyTypeSchema': return super().__new__( cls, - *args, + *_args, _configuration=_configuration, ) @@ -2435,8 +2435,8 @@ class DictSchema( def from_openapi_data_oapg(cls, arg: typing.Dict[str, typing.Any], _configuration: typing.Optional[Configuration] = None): return super().from_openapi_data_oapg(arg, _configuration=_configuration) - def __new__(cls, *args: typing.Union[dict, frozendict.frozendict], **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, bytes, Schema, Unset, ValidationMetadata]): - return super().__new__(cls, *args, **kwargs) + def __new__(cls, *_args: typing.Union[dict, frozendict.frozendict], **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, bytes, Schema, Unset, ValidationMetadata]): + return super().__new__(cls, *_args, **kwargs) schema_type_classes = {NoneSchema, DictSchema, ListSchema, NumberSchema, StrSchema, BoolSchema, AnyTypeSchema} diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_object_model_with_arg_and_args_properties.py b/samples/openapi3/client/petstore/python/test/test_models/test_object_model_with_arg_and_args_properties.py new file mode 100644 index 0000000000..75de5dd965 --- /dev/null +++ b/samples/openapi3/client/petstore/python/test/test_models/test_object_model_with_arg_and_args_properties.py @@ -0,0 +1,25 @@ +# coding: utf-8 + +""" + OpenAPI Petstore + + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +import unittest + +import petstore_api +from petstore_api.model.object_model_with_arg_and_args_properties import ObjectModelWithArgAndArgsProperties +from petstore_api import configuration + + +class TestObjectModelWithArgAndArgsProperties(unittest.TestCase): + """ObjectModelWithArgAndArgsProperties unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_object_model_with_arg_and_args_properties.py b/samples/openapi3/client/petstore/python/tests_manual/test_object_model_with_arg_and_args_properties.py new file mode 100644 index 0000000000..0814470225 --- /dev/null +++ b/samples/openapi3/client/petstore/python/tests_manual/test_object_model_with_arg_and_args_properties.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + OpenAPI Petstore + + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +import unittest + +from petstore_api import schemas, exceptions +from petstore_api.model.object_model_with_arg_and_args_properties import ObjectModelWithArgAndArgsProperties + + +class TestObjectModelWithArgAndArgsProperties(unittest.TestCase): + """ObjectModelWithArgAndArgsProperties unit test stubs""" + + def test_ObjectModelWithArgAndArgsProperties(self): + """Test ObjectModelWithArgAndArgsProperties""" + model = ObjectModelWithArgAndArgsProperties(arg='a', args='as') + self.assertTrue( + isinstance( + model["arg"], + ObjectModelWithArgAndArgsProperties.MetaOapg.properties.arg + ) + ) + self.assertTrue( + isinstance( + model["args"], + ObjectModelWithArgAndArgsProperties.MetaOapg.properties.args + ) + ) + self.assertTrue(isinstance(model["arg"], schemas.StrSchema)) + self.assertTrue(isinstance(model["args"], schemas.StrSchema)) + + +if __name__ == '__main__': + unittest.main() From d8bed4228d8b0aa5e5f0c12b4485d20c7310505c Mon Sep 17 00:00:00 2001 From: Onur Elibol Date: Thu, 10 Nov 2022 10:49:39 +0100 Subject: [PATCH 010/189] Using import type for types imports [typescript-axios] (#13964) * type imports to use import type instead of import * generated samples Co-authored-by: onur-caplena --- .../src/main/resources/typescript-axios/api.mustache | 8 +++++--- .../src/main/resources/typescript-axios/apiInner.mustache | 5 +++-- .../src/main/resources/typescript-axios/baseApi.mustache | 5 +++-- .../src/main/resources/typescript-axios/common.mustache | 7 ++++--- .../with-separate-models-and-api-inheritance/base.ts | 5 +++-- .../with-separate-models-and-api-inheritance/common.ts | 7 ++++--- .../typescript-axios/builds/composed-schemas/api.ts | 8 +++++--- .../typescript-axios/builds/composed-schemas/base.ts | 5 +++-- .../typescript-axios/builds/composed-schemas/common.ts | 7 ++++--- .../petstore/typescript-axios/builds/default/api.ts | 8 +++++--- .../petstore/typescript-axios/builds/default/base.ts | 5 +++-- .../petstore/typescript-axios/builds/default/common.ts | 7 ++++--- .../petstore/typescript-axios/builds/es6-target/api.ts | 8 +++++--- .../petstore/typescript-axios/builds/es6-target/base.ts | 5 +++-- .../petstore/typescript-axios/builds/es6-target/common.ts | 7 ++++--- .../petstore/typescript-axios/builds/test-petstore/api.ts | 8 +++++--- .../typescript-axios/builds/test-petstore/base.ts | 5 +++-- .../typescript-axios/builds/test-petstore/common.ts | 7 ++++--- .../typescript-axios/builds/with-complex-headers/api.ts | 8 +++++--- .../typescript-axios/builds/with-complex-headers/base.ts | 5 +++-- .../builds/with-complex-headers/common.ts | 7 ++++--- .../api.ts | 8 +++++--- .../base.ts | 5 +++-- .../common.ts | 7 ++++--- .../typescript-axios/builds/with-interfaces/api.ts | 8 +++++--- .../typescript-axios/builds/with-interfaces/base.ts | 5 +++-- .../typescript-axios/builds/with-interfaces/common.ts | 7 ++++--- .../typescript-axios/builds/with-node-imports/api.ts | 8 +++++--- .../typescript-axios/builds/with-node-imports/base.ts | 5 +++-- .../typescript-axios/builds/with-node-imports/common.ts | 7 ++++--- .../api/another/level/pet-api.ts | 5 +++-- .../api/another/level/store-api.ts | 5 +++-- .../api/another/level/user-api.ts | 5 +++-- .../with-npm-version-and-separate-models-and-api/base.ts | 5 +++-- .../common.ts | 7 ++++--- .../typescript-axios/builds/with-npm-version/api.ts | 8 +++++--- .../typescript-axios/builds/with-npm-version/base.ts | 5 +++-- .../typescript-axios/builds/with-npm-version/common.ts | 7 ++++--- .../builds/with-single-request-parameters/api.ts | 8 +++++--- .../builds/with-single-request-parameters/base.ts | 5 +++-- .../builds/with-single-request-parameters/common.ts | 7 ++++--- .../typescript-axios/builds/with-string-enums/api.ts | 8 +++++--- .../typescript-axios/builds/with-string-enums/base.ts | 5 +++-- .../typescript-axios/builds/with-string-enums/common.ts | 7 ++++--- 44 files changed, 170 insertions(+), 114 deletions(-) mode change 100644 => 100755 modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache mode change 100644 => 100755 modules/openapi-generator/src/main/resources/typescript-axios/baseApi.mustache mode change 100644 => 100755 modules/openapi-generator/src/main/resources/typescript-axios/common.mustache diff --git a/modules/openapi-generator/src/main/resources/typescript-axios/api.mustache b/modules/openapi-generator/src/main/resources/typescript-axios/api.mustache index 707faf3a1b..0df770bdc0 100644 --- a/modules/openapi-generator/src/main/resources/typescript-axios/api.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-axios/api.mustache @@ -3,8 +3,9 @@ {{>licenseInfo}} {{^withSeparateModelsAndApi}} -import { Configuration } from './configuration'; -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { Configuration } from './configuration'; +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; {{#withNodeImports}} // URLSearchParams not necessarily used // @ts-ignore @@ -16,8 +17,9 @@ import FormData from 'form-data' // Some imports not used depending on template conditions // @ts-ignore import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; +import type { RequestArgs } from './base'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base'; +import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError } from './base'; {{#models}} {{#model}}{{#isEnum}}{{>modelEnum}}{{/isEnum}}{{#oneOf}}{{#-first}}{{>modelOneOf}}{{/-first}}{{/oneOf}}{{^isEnum}}{{^oneOf}}{{>modelGeneric}}{{/oneOf}}{{/isEnum}}{{/model}} diff --git a/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache b/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache old mode 100644 new mode 100755 index e40a0cd13c..24b7dabc94 --- a/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache @@ -3,8 +3,9 @@ /* eslint-disable */ {{>licenseInfo}} -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import { Configuration } from '{{apiRelativeToRoot}}configuration'; +import type { Configuration } from '{{apiRelativeToRoot}}configuration'; +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; {{#withNodeImports}} // URLSearchParams not necessarily used // @ts-ignore diff --git a/modules/openapi-generator/src/main/resources/typescript-axios/baseApi.mustache b/modules/openapi-generator/src/main/resources/typescript-axios/baseApi.mustache old mode 100644 new mode 100755 index 94fcf213f3..6f3ee1bddd --- a/modules/openapi-generator/src/main/resources/typescript-axios/baseApi.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-axios/baseApi.mustache @@ -2,10 +2,11 @@ /* eslint-disable */ {{>licenseInfo}} -import { Configuration } from "./configuration"; +import type { Configuration } from './configuration'; +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; // Some imports not used depending on template conditions // @ts-ignore -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; export const BASE_PATH = "{{{basePath}}}".replace(/\/+$/, ""); diff --git a/modules/openapi-generator/src/main/resources/typescript-axios/common.mustache b/modules/openapi-generator/src/main/resources/typescript-axios/common.mustache old mode 100644 new mode 100755 index 9a97e1c8e6..2d1c8dc8e4 --- a/modules/openapi-generator/src/main/resources/typescript-axios/common.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-axios/common.mustache @@ -2,9 +2,10 @@ /* eslint-disable */ {{>licenseInfo}} -import { Configuration } from "./configuration"; -import { RequiredError, RequestArgs } from "./base"; -import { AxiosInstance, AxiosResponse } from 'axios'; +import type { Configuration } from "./configuration"; +import type { RequestArgs } from "./base"; +import type { AxiosInstance, AxiosResponse } from 'axios'; +import { RequiredError } from "./base"; {{#withNodeImports}} import { URL, URLSearchParams } from 'url'; {{/withNodeImports}} diff --git a/samples/client/others/typescript-axios/with-separate-models-and-api-inheritance/base.ts b/samples/client/others/typescript-axios/with-separate-models-and-api-inheritance/base.ts index 9046b16626..3c3717e605 100644 --- a/samples/client/others/typescript-axios/with-separate-models-and-api-inheritance/base.ts +++ b/samples/client/others/typescript-axios/with-separate-models-and-api-inheritance/base.ts @@ -13,10 +13,11 @@ */ -import { Configuration } from "./configuration"; +import type { Configuration } from './configuration'; +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; // Some imports not used depending on template conditions // @ts-ignore -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; export const BASE_PATH = "http://localhost".replace(/\/+$/, ""); diff --git a/samples/client/others/typescript-axios/with-separate-models-and-api-inheritance/common.ts b/samples/client/others/typescript-axios/with-separate-models-and-api-inheritance/common.ts index 76b5d76500..6c84026abc 100644 --- a/samples/client/others/typescript-axios/with-separate-models-and-api-inheritance/common.ts +++ b/samples/client/others/typescript-axios/with-separate-models-and-api-inheritance/common.ts @@ -13,9 +13,10 @@ */ -import { Configuration } from "./configuration"; -import { RequiredError, RequestArgs } from "./base"; -import { AxiosInstance, AxiosResponse } from 'axios'; +import type { Configuration } from "./configuration"; +import type { RequestArgs } from "./base"; +import type { AxiosInstance, AxiosResponse } from 'axios'; +import { RequiredError } from "./base"; /** * diff --git a/samples/client/petstore/typescript-axios/builds/composed-schemas/api.ts b/samples/client/petstore/typescript-axios/builds/composed-schemas/api.ts index 2d67e55947..67b506057e 100644 --- a/samples/client/petstore/typescript-axios/builds/composed-schemas/api.ts +++ b/samples/client/petstore/typescript-axios/builds/composed-schemas/api.ts @@ -13,13 +13,15 @@ */ -import { Configuration } from './configuration'; -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { Configuration } from './configuration'; +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; +import type { RequestArgs } from './base'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base'; +import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError } from './base'; /** * diff --git a/samples/client/petstore/typescript-axios/builds/composed-schemas/base.ts b/samples/client/petstore/typescript-axios/builds/composed-schemas/base.ts index 316a0beeec..7a04aaa189 100644 --- a/samples/client/petstore/typescript-axios/builds/composed-schemas/base.ts +++ b/samples/client/petstore/typescript-axios/builds/composed-schemas/base.ts @@ -13,10 +13,11 @@ */ -import { Configuration } from "./configuration"; +import type { Configuration } from './configuration'; +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; // Some imports not used depending on template conditions // @ts-ignore -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; export const BASE_PATH = "http://api.example.xyz/v1".replace(/\/+$/, ""); diff --git a/samples/client/petstore/typescript-axios/builds/composed-schemas/common.ts b/samples/client/petstore/typescript-axios/builds/composed-schemas/common.ts index 57e263ddf7..3c485ae19a 100644 --- a/samples/client/petstore/typescript-axios/builds/composed-schemas/common.ts +++ b/samples/client/petstore/typescript-axios/builds/composed-schemas/common.ts @@ -13,9 +13,10 @@ */ -import { Configuration } from "./configuration"; -import { RequiredError, RequestArgs } from "./base"; -import { AxiosInstance, AxiosResponse } from 'axios'; +import type { Configuration } from "./configuration"; +import type { RequestArgs } from "./base"; +import type { AxiosInstance, AxiosResponse } from 'axios'; +import { RequiredError } from "./base"; /** * diff --git a/samples/client/petstore/typescript-axios/builds/default/api.ts b/samples/client/petstore/typescript-axios/builds/default/api.ts index 5bebd4db3b..9b72e0df4e 100644 --- a/samples/client/petstore/typescript-axios/builds/default/api.ts +++ b/samples/client/petstore/typescript-axios/builds/default/api.ts @@ -13,13 +13,15 @@ */ -import { Configuration } from './configuration'; -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { Configuration } from './configuration'; +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; +import type { RequestArgs } from './base'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base'; +import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError } from './base'; /** * Describes the result of uploading an image resource diff --git a/samples/client/petstore/typescript-axios/builds/default/base.ts b/samples/client/petstore/typescript-axios/builds/default/base.ts index e23d972eeb..c279e56310 100644 --- a/samples/client/petstore/typescript-axios/builds/default/base.ts +++ b/samples/client/petstore/typescript-axios/builds/default/base.ts @@ -13,10 +13,11 @@ */ -import { Configuration } from "./configuration"; +import type { Configuration } from './configuration'; +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; // Some imports not used depending on template conditions // @ts-ignore -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, ""); diff --git a/samples/client/petstore/typescript-axios/builds/default/common.ts b/samples/client/petstore/typescript-axios/builds/default/common.ts index bb1c102350..be9b7df624 100644 --- a/samples/client/petstore/typescript-axios/builds/default/common.ts +++ b/samples/client/petstore/typescript-axios/builds/default/common.ts @@ -13,9 +13,10 @@ */ -import { Configuration } from "./configuration"; -import { RequiredError, RequestArgs } from "./base"; -import { AxiosInstance, AxiosResponse } from 'axios'; +import type { Configuration } from "./configuration"; +import type { RequestArgs } from "./base"; +import type { AxiosInstance, AxiosResponse } from 'axios'; +import { RequiredError } from "./base"; /** * diff --git a/samples/client/petstore/typescript-axios/builds/es6-target/api.ts b/samples/client/petstore/typescript-axios/builds/es6-target/api.ts index 5bebd4db3b..9b72e0df4e 100644 --- a/samples/client/petstore/typescript-axios/builds/es6-target/api.ts +++ b/samples/client/petstore/typescript-axios/builds/es6-target/api.ts @@ -13,13 +13,15 @@ */ -import { Configuration } from './configuration'; -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { Configuration } from './configuration'; +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; +import type { RequestArgs } from './base'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base'; +import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError } from './base'; /** * Describes the result of uploading an image resource diff --git a/samples/client/petstore/typescript-axios/builds/es6-target/base.ts b/samples/client/petstore/typescript-axios/builds/es6-target/base.ts index e23d972eeb..c279e56310 100644 --- a/samples/client/petstore/typescript-axios/builds/es6-target/base.ts +++ b/samples/client/petstore/typescript-axios/builds/es6-target/base.ts @@ -13,10 +13,11 @@ */ -import { Configuration } from "./configuration"; +import type { Configuration } from './configuration'; +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; // Some imports not used depending on template conditions // @ts-ignore -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, ""); diff --git a/samples/client/petstore/typescript-axios/builds/es6-target/common.ts b/samples/client/petstore/typescript-axios/builds/es6-target/common.ts index bb1c102350..be9b7df624 100644 --- a/samples/client/petstore/typescript-axios/builds/es6-target/common.ts +++ b/samples/client/petstore/typescript-axios/builds/es6-target/common.ts @@ -13,9 +13,10 @@ */ -import { Configuration } from "./configuration"; -import { RequiredError, RequestArgs } from "./base"; -import { AxiosInstance, AxiosResponse } from 'axios'; +import type { Configuration } from "./configuration"; +import type { RequestArgs } from "./base"; +import type { AxiosInstance, AxiosResponse } from 'axios'; +import { RequiredError } from "./base"; /** * diff --git a/samples/client/petstore/typescript-axios/builds/test-petstore/api.ts b/samples/client/petstore/typescript-axios/builds/test-petstore/api.ts index fa769208e5..f1d0e01639 100644 --- a/samples/client/petstore/typescript-axios/builds/test-petstore/api.ts +++ b/samples/client/petstore/typescript-axios/builds/test-petstore/api.ts @@ -13,13 +13,15 @@ */ -import { Configuration } from './configuration'; -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { Configuration } from './configuration'; +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; +import type { RequestArgs } from './base'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base'; +import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError } from './base'; /** * diff --git a/samples/client/petstore/typescript-axios/builds/test-petstore/base.ts b/samples/client/petstore/typescript-axios/builds/test-petstore/base.ts index 87d8fc9127..694f781cdc 100644 --- a/samples/client/petstore/typescript-axios/builds/test-petstore/base.ts +++ b/samples/client/petstore/typescript-axios/builds/test-petstore/base.ts @@ -13,10 +13,11 @@ */ -import { Configuration } from "./configuration"; +import type { Configuration } from './configuration'; +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; // Some imports not used depending on template conditions // @ts-ignore -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; export const BASE_PATH = "http://petstore.swagger.io:80/v2".replace(/\/+$/, ""); diff --git a/samples/client/petstore/typescript-axios/builds/test-petstore/common.ts b/samples/client/petstore/typescript-axios/builds/test-petstore/common.ts index b21850044c..9e9ca0742f 100644 --- a/samples/client/petstore/typescript-axios/builds/test-petstore/common.ts +++ b/samples/client/petstore/typescript-axios/builds/test-petstore/common.ts @@ -13,9 +13,10 @@ */ -import { Configuration } from "./configuration"; -import { RequiredError, RequestArgs } from "./base"; -import { AxiosInstance, AxiosResponse } from 'axios'; +import type { Configuration } from "./configuration"; +import type { RequestArgs } from "./base"; +import type { AxiosInstance, AxiosResponse } from 'axios'; +import { RequiredError } from "./base"; /** * diff --git a/samples/client/petstore/typescript-axios/builds/with-complex-headers/api.ts b/samples/client/petstore/typescript-axios/builds/with-complex-headers/api.ts index 425fc0f4ea..0d89311855 100644 --- a/samples/client/petstore/typescript-axios/builds/with-complex-headers/api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-complex-headers/api.ts @@ -13,13 +13,15 @@ */ -import { Configuration } from './configuration'; -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { Configuration } from './configuration'; +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; +import type { RequestArgs } from './base'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base'; +import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError } from './base'; /** * Describes the result of uploading an image resource diff --git a/samples/client/petstore/typescript-axios/builds/with-complex-headers/base.ts b/samples/client/petstore/typescript-axios/builds/with-complex-headers/base.ts index e23d972eeb..c279e56310 100644 --- a/samples/client/petstore/typescript-axios/builds/with-complex-headers/base.ts +++ b/samples/client/petstore/typescript-axios/builds/with-complex-headers/base.ts @@ -13,10 +13,11 @@ */ -import { Configuration } from "./configuration"; +import type { Configuration } from './configuration'; +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; // Some imports not used depending on template conditions // @ts-ignore -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, ""); diff --git a/samples/client/petstore/typescript-axios/builds/with-complex-headers/common.ts b/samples/client/petstore/typescript-axios/builds/with-complex-headers/common.ts index bb1c102350..be9b7df624 100644 --- a/samples/client/petstore/typescript-axios/builds/with-complex-headers/common.ts +++ b/samples/client/petstore/typescript-axios/builds/with-complex-headers/common.ts @@ -13,9 +13,10 @@ */ -import { Configuration } from "./configuration"; -import { RequiredError, RequestArgs } from "./base"; -import { AxiosInstance, AxiosResponse } from 'axios'; +import type { Configuration } from "./configuration"; +import type { RequestArgs } from "./base"; +import type { AxiosInstance, AxiosResponse } from 'axios'; +import { RequiredError } from "./base"; /** * diff --git a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/api.ts b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/api.ts index 90f71ba9ff..c4d9c703ba 100644 --- a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/api.ts @@ -13,13 +13,15 @@ */ -import { Configuration } from './configuration'; -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { Configuration } from './configuration'; +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; +import type { RequestArgs } from './base'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base'; +import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError } from './base'; /** * diff --git a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/base.ts b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/base.ts index 87d8fc9127..694f781cdc 100644 --- a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/base.ts +++ b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/base.ts @@ -13,10 +13,11 @@ */ -import { Configuration } from "./configuration"; +import type { Configuration } from './configuration'; +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; // Some imports not used depending on template conditions // @ts-ignore -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; export const BASE_PATH = "http://petstore.swagger.io:80/v2".replace(/\/+$/, ""); diff --git a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/common.ts b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/common.ts index b21850044c..9e9ca0742f 100644 --- a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/common.ts +++ b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/common.ts @@ -13,9 +13,10 @@ */ -import { Configuration } from "./configuration"; -import { RequiredError, RequestArgs } from "./base"; -import { AxiosInstance, AxiosResponse } from 'axios'; +import type { Configuration } from "./configuration"; +import type { RequestArgs } from "./base"; +import type { AxiosInstance, AxiosResponse } from 'axios'; +import { RequiredError } from "./base"; /** * diff --git a/samples/client/petstore/typescript-axios/builds/with-interfaces/api.ts b/samples/client/petstore/typescript-axios/builds/with-interfaces/api.ts index 1f7c23fddf..873d62f1ef 100644 --- a/samples/client/petstore/typescript-axios/builds/with-interfaces/api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-interfaces/api.ts @@ -13,13 +13,15 @@ */ -import { Configuration } from './configuration'; -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { Configuration } from './configuration'; +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; +import type { RequestArgs } from './base'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base'; +import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError } from './base'; /** * Describes the result of uploading an image resource diff --git a/samples/client/petstore/typescript-axios/builds/with-interfaces/base.ts b/samples/client/petstore/typescript-axios/builds/with-interfaces/base.ts index e23d972eeb..c279e56310 100644 --- a/samples/client/petstore/typescript-axios/builds/with-interfaces/base.ts +++ b/samples/client/petstore/typescript-axios/builds/with-interfaces/base.ts @@ -13,10 +13,11 @@ */ -import { Configuration } from "./configuration"; +import type { Configuration } from './configuration'; +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; // Some imports not used depending on template conditions // @ts-ignore -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, ""); diff --git a/samples/client/petstore/typescript-axios/builds/with-interfaces/common.ts b/samples/client/petstore/typescript-axios/builds/with-interfaces/common.ts index bb1c102350..be9b7df624 100644 --- a/samples/client/petstore/typescript-axios/builds/with-interfaces/common.ts +++ b/samples/client/petstore/typescript-axios/builds/with-interfaces/common.ts @@ -13,9 +13,10 @@ */ -import { Configuration } from "./configuration"; -import { RequiredError, RequestArgs } from "./base"; -import { AxiosInstance, AxiosResponse } from 'axios'; +import type { Configuration } from "./configuration"; +import type { RequestArgs } from "./base"; +import type { AxiosInstance, AxiosResponse } from 'axios'; +import { RequiredError } from "./base"; /** * diff --git a/samples/client/petstore/typescript-axios/builds/with-node-imports/api.ts b/samples/client/petstore/typescript-axios/builds/with-node-imports/api.ts index 879b843a5e..71d504d706 100644 --- a/samples/client/petstore/typescript-axios/builds/with-node-imports/api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-node-imports/api.ts @@ -13,8 +13,9 @@ */ -import { Configuration } from './configuration'; -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { Configuration } from './configuration'; +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; // URLSearchParams not necessarily used // @ts-ignore import { URL, URLSearchParams } from 'url'; @@ -22,8 +23,9 @@ import FormData from 'form-data' // Some imports not used depending on template conditions // @ts-ignore import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; +import type { RequestArgs } from './base'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base'; +import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError } from './base'; /** * Describes the result of uploading an image resource diff --git a/samples/client/petstore/typescript-axios/builds/with-node-imports/base.ts b/samples/client/petstore/typescript-axios/builds/with-node-imports/base.ts index e23d972eeb..c279e56310 100644 --- a/samples/client/petstore/typescript-axios/builds/with-node-imports/base.ts +++ b/samples/client/petstore/typescript-axios/builds/with-node-imports/base.ts @@ -13,10 +13,11 @@ */ -import { Configuration } from "./configuration"; +import type { Configuration } from './configuration'; +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; // Some imports not used depending on template conditions // @ts-ignore -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, ""); diff --git a/samples/client/petstore/typescript-axios/builds/with-node-imports/common.ts b/samples/client/petstore/typescript-axios/builds/with-node-imports/common.ts index 60db95f613..cbb8723f77 100644 --- a/samples/client/petstore/typescript-axios/builds/with-node-imports/common.ts +++ b/samples/client/petstore/typescript-axios/builds/with-node-imports/common.ts @@ -13,9 +13,10 @@ */ -import { Configuration } from "./configuration"; -import { RequiredError, RequestArgs } from "./base"; -import { AxiosInstance, AxiosResponse } from 'axios'; +import type { Configuration } from "./configuration"; +import type { RequestArgs } from "./base"; +import type { AxiosInstance, AxiosResponse } from 'axios'; +import { RequiredError } from "./base"; import { URL, URLSearchParams } from 'url'; /** diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/pet-api.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/pet-api.ts index d7ad1f2870..0a511e77b0 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/pet-api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/pet-api.ts @@ -13,8 +13,9 @@ */ -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import { Configuration } from '../../../configuration'; +import type { Configuration } from '../../../configuration'; +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../../../common'; diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/store-api.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/store-api.ts index 19227a79b3..8c773569b5 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/store-api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/store-api.ts @@ -13,8 +13,9 @@ */ -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import { Configuration } from '../../../configuration'; +import type { Configuration } from '../../../configuration'; +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../../../common'; diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/user-api.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/user-api.ts index 44258306cc..4071b826d5 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/user-api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/user-api.ts @@ -13,8 +13,9 @@ */ -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; -import { Configuration } from '../../../configuration'; +import type { Configuration } from '../../../configuration'; +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../../../common'; diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/base.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/base.ts index e23d972eeb..c279e56310 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/base.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/base.ts @@ -13,10 +13,11 @@ */ -import { Configuration } from "./configuration"; +import type { Configuration } from './configuration'; +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; // Some imports not used depending on template conditions // @ts-ignore -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, ""); diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/common.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/common.ts index bb1c102350..be9b7df624 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/common.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/common.ts @@ -13,9 +13,10 @@ */ -import { Configuration } from "./configuration"; -import { RequiredError, RequestArgs } from "./base"; -import { AxiosInstance, AxiosResponse } from 'axios'; +import type { Configuration } from "./configuration"; +import type { RequestArgs } from "./base"; +import type { AxiosInstance, AxiosResponse } from 'axios'; +import { RequiredError } from "./base"; /** * diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version/api.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version/api.ts index 5bebd4db3b..9b72e0df4e 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version/api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version/api.ts @@ -13,13 +13,15 @@ */ -import { Configuration } from './configuration'; -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { Configuration } from './configuration'; +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; +import type { RequestArgs } from './base'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base'; +import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError } from './base'; /** * Describes the result of uploading an image resource diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version/base.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version/base.ts index e23d972eeb..c279e56310 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version/base.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version/base.ts @@ -13,10 +13,11 @@ */ -import { Configuration } from "./configuration"; +import type { Configuration } from './configuration'; +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; // Some imports not used depending on template conditions // @ts-ignore -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, ""); diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version/common.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version/common.ts index bb1c102350..be9b7df624 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version/common.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version/common.ts @@ -13,9 +13,10 @@ */ -import { Configuration } from "./configuration"; -import { RequiredError, RequestArgs } from "./base"; -import { AxiosInstance, AxiosResponse } from 'axios'; +import type { Configuration } from "./configuration"; +import type { RequestArgs } from "./base"; +import type { AxiosInstance, AxiosResponse } from 'axios'; +import { RequiredError } from "./base"; /** * diff --git a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/api.ts b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/api.ts index 3de428e657..e14057829b 100644 --- a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/api.ts @@ -13,13 +13,15 @@ */ -import { Configuration } from './configuration'; -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { Configuration } from './configuration'; +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; +import type { RequestArgs } from './base'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base'; +import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError } from './base'; /** * Describes the result of uploading an image resource diff --git a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/base.ts b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/base.ts index e23d972eeb..c279e56310 100644 --- a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/base.ts +++ b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/base.ts @@ -13,10 +13,11 @@ */ -import { Configuration } from "./configuration"; +import type { Configuration } from './configuration'; +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; // Some imports not used depending on template conditions // @ts-ignore -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, ""); diff --git a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/common.ts b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/common.ts index bb1c102350..be9b7df624 100644 --- a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/common.ts +++ b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/common.ts @@ -13,9 +13,10 @@ */ -import { Configuration } from "./configuration"; -import { RequiredError, RequestArgs } from "./base"; -import { AxiosInstance, AxiosResponse } from 'axios'; +import type { Configuration } from "./configuration"; +import type { RequestArgs } from "./base"; +import type { AxiosInstance, AxiosResponse } from 'axios'; +import { RequiredError } from "./base"; /** * diff --git a/samples/client/petstore/typescript-axios/builds/with-string-enums/api.ts b/samples/client/petstore/typescript-axios/builds/with-string-enums/api.ts index 140bd02c74..09c68fa97e 100644 --- a/samples/client/petstore/typescript-axios/builds/with-string-enums/api.ts +++ b/samples/client/petstore/typescript-axios/builds/with-string-enums/api.ts @@ -13,13 +13,15 @@ */ -import { Configuration } from './configuration'; -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import type { Configuration } from './configuration'; +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common'; +import type { RequestArgs } from './base'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base'; +import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError } from './base'; /** * Describes the result of uploading an image resource diff --git a/samples/client/petstore/typescript-axios/builds/with-string-enums/base.ts b/samples/client/petstore/typescript-axios/builds/with-string-enums/base.ts index e23d972eeb..c279e56310 100644 --- a/samples/client/petstore/typescript-axios/builds/with-string-enums/base.ts +++ b/samples/client/petstore/typescript-axios/builds/with-string-enums/base.ts @@ -13,10 +13,11 @@ */ -import { Configuration } from "./configuration"; +import type { Configuration } from './configuration'; +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; // Some imports not used depending on template conditions // @ts-ignore -import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, ""); diff --git a/samples/client/petstore/typescript-axios/builds/with-string-enums/common.ts b/samples/client/petstore/typescript-axios/builds/with-string-enums/common.ts index bb1c102350..be9b7df624 100644 --- a/samples/client/petstore/typescript-axios/builds/with-string-enums/common.ts +++ b/samples/client/petstore/typescript-axios/builds/with-string-enums/common.ts @@ -13,9 +13,10 @@ */ -import { Configuration } from "./configuration"; -import { RequiredError, RequestArgs } from "./base"; -import { AxiosInstance, AxiosResponse } from 'axios'; +import type { Configuration } from "./configuration"; +import type { RequestArgs } from "./base"; +import type { AxiosInstance, AxiosResponse } from 'axios'; +import { RequiredError } from "./base"; /** * From 7ad9f835ff1dfe99d2504929bfd4c41b80a550f1 Mon Sep 17 00:00:00 2001 From: Jonas Reichert <75073818+Jonas1893@users.noreply.github.com> Date: Thu, 10 Nov 2022 15:28:36 +0100 Subject: [PATCH 011/189] [swift5] support content types with charsets (#13981) * enable possibility to add charset to content-type * update samples --- .../libraries/alamofire/AlamofireImplementations.mustache | 6 +++--- .../libraries/urlsession/URLSessionImplementations.mustache | 6 +++--- .../Classes/OpenAPIs/AlamofireImplementations.swift | 6 +++--- .../Classes/OpenAPIs/URLSessionImplementations.swift | 6 +++--- .../Classes/OpenAPIs/URLSessionImplementations.swift | 6 +++--- .../Classes/OpenAPIs/URLSessionImplementations.swift | 6 +++--- .../Classes/OpenAPIs/URLSessionImplementations.swift | 6 +++--- .../Classes/OpenAPIs/URLSessionImplementations.swift | 6 +++--- .../Classes/OpenAPIs/URLSessionImplementations.swift | 6 +++--- .../Classes/OpenAPIs/URLSessionImplementations.swift | 6 +++--- .../Classes/OpenAPIs/URLSessionImplementations.swift | 6 +++--- .../Classes/OpenAPIs/URLSessionImplementations.swift | 6 +++--- .../Classes/OpenAPIs/URLSessionImplementations.swift | 6 +++--- .../Classes/OpenAPIs/URLSessionImplementations.swift | 6 +++--- .../Classes/OpenAPIs/URLSessionImplementations.swift | 6 +++--- .../Sources/PetstoreClient/URLSessionImplementations.swift | 6 +++--- .../Classes/OpenAPIs/URLSessionImplementations.swift | 6 +++--- 17 files changed, 51 insertions(+), 51 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/swift5/libraries/alamofire/AlamofireImplementations.mustache b/modules/openapi-generator/src/main/resources/swift5/libraries/alamofire/AlamofireImplementations.mustache index dd936dd68f..a2b5502bcf 100644 --- a/modules/openapi-generator/src/main/resources/swift5/libraries/alamofire/AlamofireImplementations.mustache +++ b/modules/openapi-generator/src/main/resources/swift5/libraries/alamofire/AlamofireImplementations.mustache @@ -96,9 +96,9 @@ private var managerStore = SynchronizedDictionary() case .options, .post, .put, .patch, .delete, .trace, .connect: let contentType = headers["Content-Type"] ?? "application/json" - if contentType == "application/json" { + if contentType.hasPrefix("application/json") { encoding = JSONDataEncoding() - } else if contentType == "multipart/form-data" { + } else if contentType.hasPrefix("multipart/form-data") { encoding = nil let upload = manager.upload(multipartFormData: { mpForm in @@ -134,7 +134,7 @@ private var managerStore = SynchronizedDictionary() requestTask.set(request: upload) self.processRequest(request: upload, managerId, apiResponseQueue, completion) - } else if contentType == "application/x-www-form-urlencoded" { + } else if contentType.hasPrefix("application/x-www-form-urlencoded") { encoding = URLEncoding(destination: .httpBody) } else { fatalError("Unsupported Media Type - \(contentType)") diff --git a/modules/openapi-generator/src/main/resources/swift5/libraries/urlsession/URLSessionImplementations.mustache b/modules/openapi-generator/src/main/resources/swift5/libraries/urlsession/URLSessionImplementations.mustache index 17a9d5f274..1fc988e327 100644 --- a/modules/openapi-generator/src/main/resources/swift5/libraries/urlsession/URLSessionImplementations.mustache +++ b/modules/openapi-generator/src/main/resources/swift5/libraries/urlsession/URLSessionImplementations.mustache @@ -122,11 +122,11 @@ private var credentialStore = SynchronizedDictionary() case .options, .post, .put, .patch, .delete, .trace, .connect: let contentType = headers["Content-Type"] ?? "application/json" - if contentType == "application/json" { + if contentType.hasPrefix("application/json") { encoding = JSONDataEncoding() - } else if contentType == "multipart/form-data" { + } else if contentType.hasPrefix("multipart/form-data") { encoding = FormDataEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:)) - } else if contentType == "application/x-www-form-urlencoded" { + } else if contentType.hasPrefix("application/x-www-form-urlencoded") { encoding = FormURLEncoding() } else { fatalError("Unsupported Media Type - \(contentType)") 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 bc4759a803..a7d8f89665 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift @@ -96,9 +96,9 @@ open class AlamofireRequestBuilder: RequestBuilder { case .options, .post, .put, .patch, .delete, .trace, .connect: let contentType = headers["Content-Type"] ?? "application/json" - if contentType == "application/json" { + if contentType.hasPrefix("application/json") { encoding = JSONDataEncoding() - } else if contentType == "multipart/form-data" { + } else if contentType.hasPrefix("multipart/form-data") { encoding = nil let upload = manager.upload(multipartFormData: { mpForm in @@ -134,7 +134,7 @@ open class AlamofireRequestBuilder: RequestBuilder { requestTask.set(request: upload) self.processRequest(request: upload, managerId, apiResponseQueue, completion) - } else if contentType == "application/x-www-form-urlencoded" { + } else if contentType.hasPrefix("application/x-www-form-urlencoded") { encoding = URLEncoding(destination: .httpBody) } else { fatalError("Unsupported Media Type - \(contentType)") diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index 0edf7e8dac..3c7d97b470 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -122,11 +122,11 @@ open class URLSessionRequestBuilder: RequestBuilder { case .options, .post, .put, .patch, .delete, .trace, .connect: let contentType = headers["Content-Type"] ?? "application/json" - if contentType == "application/json" { + if contentType.hasPrefix("application/json") { encoding = JSONDataEncoding() - } else if contentType == "multipart/form-data" { + } else if contentType.hasPrefix("multipart/form-data") { encoding = FormDataEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:)) - } else if contentType == "application/x-www-form-urlencoded" { + } else if contentType.hasPrefix("application/x-www-form-urlencoded") { encoding = FormURLEncoding() } else { fatalError("Unsupported Media Type - \(contentType)") 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 0edf7e8dac..3c7d97b470 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -122,11 +122,11 @@ open class URLSessionRequestBuilder: RequestBuilder { case .options, .post, .put, .patch, .delete, .trace, .connect: let contentType = headers["Content-Type"] ?? "application/json" - if contentType == "application/json" { + if contentType.hasPrefix("application/json") { encoding = JSONDataEncoding() - } else if contentType == "multipart/form-data" { + } else if contentType.hasPrefix("multipart/form-data") { encoding = FormDataEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:)) - } else if contentType == "application/x-www-form-urlencoded" { + } else if contentType.hasPrefix("application/x-www-form-urlencoded") { encoding = FormURLEncoding() } else { fatalError("Unsupported Media Type - \(contentType)") 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 0edf7e8dac..3c7d97b470 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -122,11 +122,11 @@ open class URLSessionRequestBuilder: RequestBuilder { case .options, .post, .put, .patch, .delete, .trace, .connect: let contentType = headers["Content-Type"] ?? "application/json" - if contentType == "application/json" { + if contentType.hasPrefix("application/json") { encoding = JSONDataEncoding() - } else if contentType == "multipart/form-data" { + } else if contentType.hasPrefix("multipart/form-data") { encoding = FormDataEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:)) - } else if contentType == "application/x-www-form-urlencoded" { + } else if contentType.hasPrefix("application/x-www-form-urlencoded") { encoding = FormURLEncoding() } else { fatalError("Unsupported Media Type - \(contentType)") 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 0edf7e8dac..3c7d97b470 100644 --- a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -122,11 +122,11 @@ open class URLSessionRequestBuilder: RequestBuilder { case .options, .post, .put, .patch, .delete, .trace, .connect: let contentType = headers["Content-Type"] ?? "application/json" - if contentType == "application/json" { + if contentType.hasPrefix("application/json") { encoding = JSONDataEncoding() - } else if contentType == "multipart/form-data" { + } else if contentType.hasPrefix("multipart/form-data") { encoding = FormDataEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:)) - } else if contentType == "application/x-www-form-urlencoded" { + } else if contentType.hasPrefix("application/x-www-form-urlencoded") { encoding = FormURLEncoding() } else { fatalError("Unsupported Media Type - \(contentType)") diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index 0edf7e8dac..3c7d97b470 100644 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -122,11 +122,11 @@ open class URLSessionRequestBuilder: RequestBuilder { case .options, .post, .put, .patch, .delete, .trace, .connect: let contentType = headers["Content-Type"] ?? "application/json" - if contentType == "application/json" { + if contentType.hasPrefix("application/json") { encoding = JSONDataEncoding() - } else if contentType == "multipart/form-data" { + } else if contentType.hasPrefix("multipart/form-data") { encoding = FormDataEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:)) - } else if contentType == "application/x-www-form-urlencoded" { + } else if contentType.hasPrefix("application/x-www-form-urlencoded") { encoding = FormURLEncoding() } else { fatalError("Unsupported Media Type - \(contentType)") 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 30474ed8cb..fd237a105d 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -122,11 +122,11 @@ internal class URLSessionRequestBuilder: RequestBuilder { case .options, .post, .put, .patch, .delete, .trace, .connect: let contentType = headers["Content-Type"] ?? "application/json" - if contentType == "application/json" { + if contentType.hasPrefix("application/json") { encoding = JSONDataEncoding() - } else if contentType == "multipart/form-data" { + } else if contentType.hasPrefix("multipart/form-data") { encoding = FormDataEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:)) - } else if contentType == "application/x-www-form-urlencoded" { + } else if contentType.hasPrefix("application/x-www-form-urlencoded") { encoding = FormURLEncoding() } else { fatalError("Unsupported Media Type - \(contentType)") 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 0edf7e8dac..3c7d97b470 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -122,11 +122,11 @@ open class URLSessionRequestBuilder: RequestBuilder { case .options, .post, .put, .patch, .delete, .trace, .connect: let contentType = headers["Content-Type"] ?? "application/json" - if contentType == "application/json" { + if contentType.hasPrefix("application/json") { encoding = JSONDataEncoding() - } else if contentType == "multipart/form-data" { + } else if contentType.hasPrefix("multipart/form-data") { encoding = FormDataEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:)) - } else if contentType == "application/x-www-form-urlencoded" { + } else if contentType.hasPrefix("application/x-www-form-urlencoded") { encoding = FormURLEncoding() } else { fatalError("Unsupported Media Type - \(contentType)") diff --git a/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index 0edf7e8dac..3c7d97b470 100644 --- a/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -122,11 +122,11 @@ open class URLSessionRequestBuilder: RequestBuilder { case .options, .post, .put, .patch, .delete, .trace, .connect: let contentType = headers["Content-Type"] ?? "application/json" - if contentType == "application/json" { + if contentType.hasPrefix("application/json") { encoding = JSONDataEncoding() - } else if contentType == "multipart/form-data" { + } else if contentType.hasPrefix("multipart/form-data") { encoding = FormDataEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:)) - } else if contentType == "application/x-www-form-urlencoded" { + } else if contentType.hasPrefix("application/x-www-form-urlencoded") { encoding = FormURLEncoding() } else { fatalError("Unsupported Media Type - \(contentType)") 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 0edf7e8dac..3c7d97b470 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -122,11 +122,11 @@ open class URLSessionRequestBuilder: RequestBuilder { case .options, .post, .put, .patch, .delete, .trace, .connect: let contentType = headers["Content-Type"] ?? "application/json" - if contentType == "application/json" { + if contentType.hasPrefix("application/json") { encoding = JSONDataEncoding() - } else if contentType == "multipart/form-data" { + } else if contentType.hasPrefix("multipart/form-data") { encoding = FormDataEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:)) - } else if contentType == "application/x-www-form-urlencoded" { + } else if contentType.hasPrefix("application/x-www-form-urlencoded") { encoding = FormURLEncoding() } else { fatalError("Unsupported Media Type - \(contentType)") 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 0edf7e8dac..3c7d97b470 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -122,11 +122,11 @@ open class URLSessionRequestBuilder: RequestBuilder { case .options, .post, .put, .patch, .delete, .trace, .connect: let contentType = headers["Content-Type"] ?? "application/json" - if contentType == "application/json" { + if contentType.hasPrefix("application/json") { encoding = JSONDataEncoding() - } else if contentType == "multipart/form-data" { + } else if contentType.hasPrefix("multipart/form-data") { encoding = FormDataEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:)) - } else if contentType == "application/x-www-form-urlencoded" { + } else if contentType.hasPrefix("application/x-www-form-urlencoded") { encoding = FormURLEncoding() } else { fatalError("Unsupported Media Type - \(contentType)") 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 0edf7e8dac..3c7d97b470 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -122,11 +122,11 @@ open class URLSessionRequestBuilder: RequestBuilder { case .options, .post, .put, .patch, .delete, .trace, .connect: let contentType = headers["Content-Type"] ?? "application/json" - if contentType == "application/json" { + if contentType.hasPrefix("application/json") { encoding = JSONDataEncoding() - } else if contentType == "multipart/form-data" { + } else if contentType.hasPrefix("multipart/form-data") { encoding = FormDataEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:)) - } else if contentType == "application/x-www-form-urlencoded" { + } else if contentType.hasPrefix("application/x-www-form-urlencoded") { encoding = FormURLEncoding() } else { fatalError("Unsupported Media Type - \(contentType)") 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 0edf7e8dac..3c7d97b470 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -122,11 +122,11 @@ open class URLSessionRequestBuilder: RequestBuilder { case .options, .post, .put, .patch, .delete, .trace, .connect: let contentType = headers["Content-Type"] ?? "application/json" - if contentType == "application/json" { + if contentType.hasPrefix("application/json") { encoding = JSONDataEncoding() - } else if contentType == "multipart/form-data" { + } else if contentType.hasPrefix("multipart/form-data") { encoding = FormDataEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:)) - } else if contentType == "application/x-www-form-urlencoded" { + } else if contentType.hasPrefix("application/x-www-form-urlencoded") { encoding = FormURLEncoding() } else { fatalError("Unsupported Media Type - \(contentType)") diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/URLSessionImplementations.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/URLSessionImplementations.swift index 0edf7e8dac..3c7d97b470 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/URLSessionImplementations.swift @@ -122,11 +122,11 @@ open class URLSessionRequestBuilder: RequestBuilder { case .options, .post, .put, .patch, .delete, .trace, .connect: let contentType = headers["Content-Type"] ?? "application/json" - if contentType == "application/json" { + if contentType.hasPrefix("application/json") { encoding = JSONDataEncoding() - } else if contentType == "multipart/form-data" { + } else if contentType.hasPrefix("multipart/form-data") { encoding = FormDataEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:)) - } else if contentType == "application/x-www-form-urlencoded" { + } else if contentType.hasPrefix("application/x-www-form-urlencoded") { encoding = FormURLEncoding() } else { fatalError("Unsupported Media Type - \(contentType)") diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index 0edf7e8dac..3c7d97b470 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -122,11 +122,11 @@ open class URLSessionRequestBuilder: RequestBuilder { case .options, .post, .put, .patch, .delete, .trace, .connect: let contentType = headers["Content-Type"] ?? "application/json" - if contentType == "application/json" { + if contentType.hasPrefix("application/json") { encoding = JSONDataEncoding() - } else if contentType == "multipart/form-data" { + } else if contentType.hasPrefix("multipart/form-data") { encoding = FormDataEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:)) - } else if contentType == "application/x-www-form-urlencoded" { + } else if contentType.hasPrefix("application/x-www-form-urlencoded") { encoding = FormURLEncoding() } else { fatalError("Unsupported Media Type - \(contentType)") From f1b8190b19c3b89f2da53df8541d19825cedbebb Mon Sep 17 00:00:00 2001 From: Jonas Reichert <75073818+Jonas1893@users.noreply.github.com> Date: Thu, 10 Nov 2022 18:27:24 +0100 Subject: [PATCH 012/189] [swift5] less restrictive alamofire dependency resolution (#13977) * modify Alamofire version in podspec * modify Alamofire version in Package.swift * also pin optimistically in Cartfile * optimistically resolve all other dependencies to next major version --- .../src/main/resources/swift5/Cartfile.mustache | 8 ++++---- .../src/main/resources/swift5/Package.swift.mustache | 8 ++++---- .../src/main/resources/swift5/Podspec.mustache | 8 ++++---- samples/client/petstore/swift5/alamofireLibrary/Cartfile | 4 ++-- .../client/petstore/swift5/alamofireLibrary/Package.swift | 4 ++-- .../swift5/alamofireLibrary/PetstoreClient.podspec | 4 ++-- samples/client/petstore/swift5/asyncAwaitLibrary/Cartfile | 2 +- .../petstore/swift5/asyncAwaitLibrary/Package.swift | 2 +- .../swift5/asyncAwaitLibrary/PetstoreClient.podspec | 2 +- samples/client/petstore/swift5/combineLibrary/Cartfile | 2 +- .../client/petstore/swift5/combineLibrary/Package.swift | 2 +- .../petstore/swift5/combineLibrary/PetstoreClient.podspec | 2 +- samples/client/petstore/swift5/default/Cartfile | 2 +- samples/client/petstore/swift5/default/Package.swift | 2 +- .../client/petstore/swift5/default/PetstoreClient.podspec | 2 +- samples/client/petstore/swift5/deprecated/Cartfile | 2 +- samples/client/petstore/swift5/deprecated/Package.swift | 2 +- .../petstore/swift5/deprecated/PetstoreClient.podspec | 2 +- samples/client/petstore/swift5/frozenEnums/Cartfile | 2 +- samples/client/petstore/swift5/frozenEnums/Package.swift | 2 +- .../petstore/swift5/frozenEnums/PetstoreClient.podspec | 2 +- samples/client/petstore/swift5/nonPublicApi/Cartfile | 2 +- samples/client/petstore/swift5/nonPublicApi/Package.swift | 2 +- .../petstore/swift5/nonPublicApi/PetstoreClient.podspec | 2 +- samples/client/petstore/swift5/objcCompatible/Cartfile | 2 +- .../client/petstore/swift5/objcCompatible/Package.swift | 2 +- .../petstore/swift5/objcCompatible/PetstoreClient.podspec | 2 +- samples/client/petstore/swift5/oneOf/Cartfile | 2 +- samples/client/petstore/swift5/oneOf/Package.swift | 2 +- .../client/petstore/swift5/oneOf/PetstoreClient.podspec | 2 +- samples/client/petstore/swift5/promisekitLibrary/Cartfile | 4 ++-- .../petstore/swift5/promisekitLibrary/Package.swift | 4 ++-- .../swift5/promisekitLibrary/PetstoreClient.podspec | 4 ++-- .../client/petstore/swift5/readonlyProperties/Cartfile | 2 +- .../petstore/swift5/readonlyProperties/Package.swift | 2 +- .../swift5/readonlyProperties/PetstoreClient.podspec | 2 +- samples/client/petstore/swift5/resultLibrary/Cartfile | 2 +- .../client/petstore/swift5/resultLibrary/Package.swift | 2 +- .../petstore/swift5/resultLibrary/PetstoreClient.podspec | 2 +- samples/client/petstore/swift5/rxswiftLibrary/Cartfile | 4 ++-- .../client/petstore/swift5/rxswiftLibrary/Package.swift | 4 ++-- .../petstore/swift5/rxswiftLibrary/PetstoreClient.podspec | 4 ++-- samples/client/petstore/swift5/urlsessionLibrary/Cartfile | 2 +- .../petstore/swift5/urlsessionLibrary/Package.swift | 2 +- .../swift5/urlsessionLibrary/PetstoreClient.podspec | 2 +- samples/client/petstore/swift5/vaporLibrary/Package.swift | 2 +- samples/client/petstore/swift5/x-swift-hashable/Cartfile | 2 +- .../client/petstore/swift5/x-swift-hashable/Package.swift | 2 +- .../swift5/x-swift-hashable/PetstoreClient.podspec | 2 +- 49 files changed, 67 insertions(+), 67 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/swift5/Cartfile.mustache b/modules/openapi-generator/src/main/resources/swift5/Cartfile.mustache index ddc84910bb..2f4d0516c7 100644 --- a/modules/openapi-generator/src/main/resources/swift5/Cartfile.mustache +++ b/modules/openapi-generator/src/main/resources/swift5/Cartfile.mustache @@ -1,4 +1,4 @@ -github "Flight-School/AnyCodable" ~> 0.6.1{{#useAlamofire}} -github "Alamofire/Alamofire" ~> 5.4.3{{/useAlamofire}}{{#usePromiseKit}} -github "mxcl/PromiseKit" ~> 6.15.3{{/usePromiseKit}}{{#useRxSwift}} -github "ReactiveX/RxSwift" ~> 6.2.0{{/useRxSwift}} +github "Flight-School/AnyCodable" ~> 0.6{{#useAlamofire}} +github "Alamofire/Alamofire" ~> 5.4{{/useAlamofire}}{{#usePromiseKit}} +github "mxcl/PromiseKit" ~> 6.15{{/usePromiseKit}}{{#useRxSwift}} +github "ReactiveX/RxSwift" ~> 6.2{{/useRxSwift}} diff --git a/modules/openapi-generator/src/main/resources/swift5/Package.swift.mustache b/modules/openapi-generator/src/main/resources/swift5/Package.swift.mustache index c84db4b5c7..fa14799f0d 100644 --- a/modules/openapi-generator/src/main/resources/swift5/Package.swift.mustache +++ b/modules/openapi-generator/src/main/resources/swift5/Package.swift.mustache @@ -31,15 +31,15 @@ let package = Package( ], dependencies: [ // Dependencies declare other packages that this package depends on. - .package(url: "https://github.com/Flight-School/AnyCodable", from: "0.6.1"), + .package(url: "https://github.com/Flight-School/AnyCodable", .upToNextMajor(from: "0.6.1")), {{#useAlamofire}} - .package(url: "https://github.com/Alamofire/Alamofire", from: "5.4.3"), + .package(url: "https://github.com/Alamofire/Alamofire", .upToNextMajor(from: "5.4.3")), {{/useAlamofire}} {{#usePromiseKit}} - .package(url: "https://github.com/mxcl/PromiseKit", from: "6.15.3"), + .package(url: "https://github.com/mxcl/PromiseKit", .upToNextMajor(from: "6.15.3")), {{/usePromiseKit}} {{#useRxSwift}} - .package(url: "https://github.com/ReactiveX/RxSwift", from: "6.2.0"), + .package(url: "https://github.com/ReactiveX/RxSwift", .upToNextMajor(from: "6.2.0")), {{/useRxSwift}} {{#useVapor}} .package(url: "https://github.com/vapor/vapor", from: "4.0.0") diff --git a/modules/openapi-generator/src/main/resources/swift5/Podspec.mustache b/modules/openapi-generator/src/main/resources/swift5/Podspec.mustache index 29bd02cefd..dcc73c4da9 100644 --- a/modules/openapi-generator/src/main/resources/swift5/Podspec.mustache +++ b/modules/openapi-generator/src/main/resources/swift5/Podspec.mustache @@ -33,14 +33,14 @@ Pod::Spec.new do |s| s.documentation_url = '{{.}}' {{/podDocumentationURL}} s.source_files = '{{swiftPackagePath}}{{^swiftPackagePath}}{{#useSPMFileStructure}}Sources/{{projectName}}{{/useSPMFileStructure}}{{^useSPMFileStructure}}{{projectName}}/Classes{{/useSPMFileStructure}}{{/swiftPackagePath}}/**/*.swift' - s.dependency 'AnyCodable-FlightSchool', '~> 0.6.1' + s.dependency 'AnyCodable-FlightSchool', '~> 0.6' {{#useAlamofire}} - s.dependency 'Alamofire', '~> 5.4.3' + s.dependency 'Alamofire', '~> 5.4' {{/useAlamofire}} {{#usePromiseKit}} - s.dependency 'PromiseKit/CorePromise', '~> 6.15.3' + s.dependency 'PromiseKit/CorePromise', '~> 6.15' {{/usePromiseKit}} {{#useRxSwift}} - s.dependency 'RxSwift', '~> 6.2.0' + s.dependency 'RxSwift', '~> 6.2' {{/useRxSwift}} end diff --git a/samples/client/petstore/swift5/alamofireLibrary/Cartfile b/samples/client/petstore/swift5/alamofireLibrary/Cartfile index 4fdc3a603d..1850ee6f7d 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/Cartfile +++ b/samples/client/petstore/swift5/alamofireLibrary/Cartfile @@ -1,2 +1,2 @@ -github "Flight-School/AnyCodable" ~> 0.6.1 -github "Alamofire/Alamofire" ~> 5.4.3 +github "Flight-School/AnyCodable" ~> 0.6 +github "Alamofire/Alamofire" ~> 5.4 diff --git a/samples/client/petstore/swift5/alamofireLibrary/Package.swift b/samples/client/petstore/swift5/alamofireLibrary/Package.swift index 214fa50f4d..c62e486887 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/Package.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/Package.swift @@ -19,8 +19,8 @@ let package = Package( ], dependencies: [ // Dependencies declare other packages that this package depends on. - .package(url: "https://github.com/Flight-School/AnyCodable", from: "0.6.1"), - .package(url: "https://github.com/Alamofire/Alamofire", from: "5.4.3"), + .package(url: "https://github.com/Flight-School/AnyCodable", .upToNextMajor(from: "0.6.1")), + .package(url: "https://github.com/Alamofire/Alamofire", .upToNextMajor(from: "5.4.3")), ], targets: [ // Targets are the basic building blocks of a package. A target can define a module or a test suite. diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient.podspec b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient.podspec index a93e7df2c9..9cabd7d377 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient.podspec +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient.podspec @@ -11,6 +11,6 @@ Pod::Spec.new do |s| s.homepage = 'https://github.com/openapitools/openapi-generator' s.summary = 'PetstoreClient' s.source_files = 'PetstoreClient/Classes/**/*.swift' - s.dependency 'AnyCodable-FlightSchool', '~> 0.6.1' - s.dependency 'Alamofire', '~> 5.4.3' + s.dependency 'AnyCodable-FlightSchool', '~> 0.6' + s.dependency 'Alamofire', '~> 5.4' end diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/Cartfile b/samples/client/petstore/swift5/asyncAwaitLibrary/Cartfile index 3f7e6304ca..92bac17454 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/Cartfile +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/Cartfile @@ -1 +1 @@ -github "Flight-School/AnyCodable" ~> 0.6.1 +github "Flight-School/AnyCodable" ~> 0.6 diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/Package.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/Package.swift index 87bb775fb7..5335b0a309 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/Package.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/Package.swift @@ -19,7 +19,7 @@ let package = Package( ], dependencies: [ // Dependencies declare other packages that this package depends on. - .package(url: "https://github.com/Flight-School/AnyCodable", from: "0.6.1"), + .package(url: "https://github.com/Flight-School/AnyCodable", .upToNextMajor(from: "0.6.1")), ], targets: [ // Targets are the basic building blocks of a package. A target can define a module or a test suite. diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient.podspec b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient.podspec index 0e6bf7ec02..4265bb2dc1 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient.podspec +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient.podspec @@ -11,5 +11,5 @@ Pod::Spec.new do |s| s.homepage = 'https://github.com/openapitools/openapi-generator' s.summary = 'PetstoreClient' s.source_files = 'PetstoreClient/Classes/**/*.swift' - s.dependency 'AnyCodable-FlightSchool', '~> 0.6.1' + s.dependency 'AnyCodable-FlightSchool', '~> 0.6' end diff --git a/samples/client/petstore/swift5/combineLibrary/Cartfile b/samples/client/petstore/swift5/combineLibrary/Cartfile index 3f7e6304ca..92bac17454 100644 --- a/samples/client/petstore/swift5/combineLibrary/Cartfile +++ b/samples/client/petstore/swift5/combineLibrary/Cartfile @@ -1 +1 @@ -github "Flight-School/AnyCodable" ~> 0.6.1 +github "Flight-School/AnyCodable" ~> 0.6 diff --git a/samples/client/petstore/swift5/combineLibrary/Package.swift b/samples/client/petstore/swift5/combineLibrary/Package.swift index 87bb775fb7..5335b0a309 100644 --- a/samples/client/petstore/swift5/combineLibrary/Package.swift +++ b/samples/client/petstore/swift5/combineLibrary/Package.swift @@ -19,7 +19,7 @@ let package = Package( ], dependencies: [ // Dependencies declare other packages that this package depends on. - .package(url: "https://github.com/Flight-School/AnyCodable", from: "0.6.1"), + .package(url: "https://github.com/Flight-School/AnyCodable", .upToNextMajor(from: "0.6.1")), ], targets: [ // Targets are the basic building blocks of a package. A target can define a module or a test suite. diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient.podspec b/samples/client/petstore/swift5/combineLibrary/PetstoreClient.podspec index 0e6bf7ec02..4265bb2dc1 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient.podspec +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient.podspec @@ -11,5 +11,5 @@ Pod::Spec.new do |s| s.homepage = 'https://github.com/openapitools/openapi-generator' s.summary = 'PetstoreClient' s.source_files = 'PetstoreClient/Classes/**/*.swift' - s.dependency 'AnyCodable-FlightSchool', '~> 0.6.1' + s.dependency 'AnyCodable-FlightSchool', '~> 0.6' end diff --git a/samples/client/petstore/swift5/default/Cartfile b/samples/client/petstore/swift5/default/Cartfile index 3f7e6304ca..92bac17454 100644 --- a/samples/client/petstore/swift5/default/Cartfile +++ b/samples/client/petstore/swift5/default/Cartfile @@ -1 +1 @@ -github "Flight-School/AnyCodable" ~> 0.6.1 +github "Flight-School/AnyCodable" ~> 0.6 diff --git a/samples/client/petstore/swift5/default/Package.swift b/samples/client/petstore/swift5/default/Package.swift index 87bb775fb7..5335b0a309 100644 --- a/samples/client/petstore/swift5/default/Package.swift +++ b/samples/client/petstore/swift5/default/Package.swift @@ -19,7 +19,7 @@ let package = Package( ], dependencies: [ // Dependencies declare other packages that this package depends on. - .package(url: "https://github.com/Flight-School/AnyCodable", from: "0.6.1"), + .package(url: "https://github.com/Flight-School/AnyCodable", .upToNextMajor(from: "0.6.1")), ], targets: [ // Targets are the basic building blocks of a package. A target can define a module or a test suite. diff --git a/samples/client/petstore/swift5/default/PetstoreClient.podspec b/samples/client/petstore/swift5/default/PetstoreClient.podspec index 0e6bf7ec02..4265bb2dc1 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient.podspec +++ b/samples/client/petstore/swift5/default/PetstoreClient.podspec @@ -11,5 +11,5 @@ Pod::Spec.new do |s| s.homepage = 'https://github.com/openapitools/openapi-generator' s.summary = 'PetstoreClient' s.source_files = 'PetstoreClient/Classes/**/*.swift' - s.dependency 'AnyCodable-FlightSchool', '~> 0.6.1' + s.dependency 'AnyCodable-FlightSchool', '~> 0.6' end diff --git a/samples/client/petstore/swift5/deprecated/Cartfile b/samples/client/petstore/swift5/deprecated/Cartfile index 3f7e6304ca..92bac17454 100644 --- a/samples/client/petstore/swift5/deprecated/Cartfile +++ b/samples/client/petstore/swift5/deprecated/Cartfile @@ -1 +1 @@ -github "Flight-School/AnyCodable" ~> 0.6.1 +github "Flight-School/AnyCodable" ~> 0.6 diff --git a/samples/client/petstore/swift5/deprecated/Package.swift b/samples/client/petstore/swift5/deprecated/Package.swift index 87bb775fb7..5335b0a309 100644 --- a/samples/client/petstore/swift5/deprecated/Package.swift +++ b/samples/client/petstore/swift5/deprecated/Package.swift @@ -19,7 +19,7 @@ let package = Package( ], dependencies: [ // Dependencies declare other packages that this package depends on. - .package(url: "https://github.com/Flight-School/AnyCodable", from: "0.6.1"), + .package(url: "https://github.com/Flight-School/AnyCodable", .upToNextMajor(from: "0.6.1")), ], targets: [ // Targets are the basic building blocks of a package. A target can define a module or a test suite. diff --git a/samples/client/petstore/swift5/deprecated/PetstoreClient.podspec b/samples/client/petstore/swift5/deprecated/PetstoreClient.podspec index 0e6bf7ec02..4265bb2dc1 100644 --- a/samples/client/petstore/swift5/deprecated/PetstoreClient.podspec +++ b/samples/client/petstore/swift5/deprecated/PetstoreClient.podspec @@ -11,5 +11,5 @@ Pod::Spec.new do |s| s.homepage = 'https://github.com/openapitools/openapi-generator' s.summary = 'PetstoreClient' s.source_files = 'PetstoreClient/Classes/**/*.swift' - s.dependency 'AnyCodable-FlightSchool', '~> 0.6.1' + s.dependency 'AnyCodable-FlightSchool', '~> 0.6' end diff --git a/samples/client/petstore/swift5/frozenEnums/Cartfile b/samples/client/petstore/swift5/frozenEnums/Cartfile index 3f7e6304ca..92bac17454 100644 --- a/samples/client/petstore/swift5/frozenEnums/Cartfile +++ b/samples/client/petstore/swift5/frozenEnums/Cartfile @@ -1 +1 @@ -github "Flight-School/AnyCodable" ~> 0.6.1 +github "Flight-School/AnyCodable" ~> 0.6 diff --git a/samples/client/petstore/swift5/frozenEnums/Package.swift b/samples/client/petstore/swift5/frozenEnums/Package.swift index 87bb775fb7..5335b0a309 100644 --- a/samples/client/petstore/swift5/frozenEnums/Package.swift +++ b/samples/client/petstore/swift5/frozenEnums/Package.swift @@ -19,7 +19,7 @@ let package = Package( ], dependencies: [ // Dependencies declare other packages that this package depends on. - .package(url: "https://github.com/Flight-School/AnyCodable", from: "0.6.1"), + .package(url: "https://github.com/Flight-School/AnyCodable", .upToNextMajor(from: "0.6.1")), ], targets: [ // Targets are the basic building blocks of a package. A target can define a module or a test suite. diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient.podspec b/samples/client/petstore/swift5/frozenEnums/PetstoreClient.podspec index 0e6bf7ec02..4265bb2dc1 100644 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient.podspec +++ b/samples/client/petstore/swift5/frozenEnums/PetstoreClient.podspec @@ -11,5 +11,5 @@ Pod::Spec.new do |s| s.homepage = 'https://github.com/openapitools/openapi-generator' s.summary = 'PetstoreClient' s.source_files = 'PetstoreClient/Classes/**/*.swift' - s.dependency 'AnyCodable-FlightSchool', '~> 0.6.1' + s.dependency 'AnyCodable-FlightSchool', '~> 0.6' end diff --git a/samples/client/petstore/swift5/nonPublicApi/Cartfile b/samples/client/petstore/swift5/nonPublicApi/Cartfile index 3f7e6304ca..92bac17454 100644 --- a/samples/client/petstore/swift5/nonPublicApi/Cartfile +++ b/samples/client/petstore/swift5/nonPublicApi/Cartfile @@ -1 +1 @@ -github "Flight-School/AnyCodable" ~> 0.6.1 +github "Flight-School/AnyCodable" ~> 0.6 diff --git a/samples/client/petstore/swift5/nonPublicApi/Package.swift b/samples/client/petstore/swift5/nonPublicApi/Package.swift index 87bb775fb7..5335b0a309 100644 --- a/samples/client/petstore/swift5/nonPublicApi/Package.swift +++ b/samples/client/petstore/swift5/nonPublicApi/Package.swift @@ -19,7 +19,7 @@ let package = Package( ], dependencies: [ // Dependencies declare other packages that this package depends on. - .package(url: "https://github.com/Flight-School/AnyCodable", from: "0.6.1"), + .package(url: "https://github.com/Flight-School/AnyCodable", .upToNextMajor(from: "0.6.1")), ], targets: [ // Targets are the basic building blocks of a package. A target can define a module or a test suite. diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient.podspec b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient.podspec index 0e6bf7ec02..4265bb2dc1 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient.podspec +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient.podspec @@ -11,5 +11,5 @@ Pod::Spec.new do |s| s.homepage = 'https://github.com/openapitools/openapi-generator' s.summary = 'PetstoreClient' s.source_files = 'PetstoreClient/Classes/**/*.swift' - s.dependency 'AnyCodable-FlightSchool', '~> 0.6.1' + s.dependency 'AnyCodable-FlightSchool', '~> 0.6' end diff --git a/samples/client/petstore/swift5/objcCompatible/Cartfile b/samples/client/petstore/swift5/objcCompatible/Cartfile index 3f7e6304ca..92bac17454 100644 --- a/samples/client/petstore/swift5/objcCompatible/Cartfile +++ b/samples/client/petstore/swift5/objcCompatible/Cartfile @@ -1 +1 @@ -github "Flight-School/AnyCodable" ~> 0.6.1 +github "Flight-School/AnyCodable" ~> 0.6 diff --git a/samples/client/petstore/swift5/objcCompatible/Package.swift b/samples/client/petstore/swift5/objcCompatible/Package.swift index 87bb775fb7..5335b0a309 100644 --- a/samples/client/petstore/swift5/objcCompatible/Package.swift +++ b/samples/client/petstore/swift5/objcCompatible/Package.swift @@ -19,7 +19,7 @@ let package = Package( ], dependencies: [ // Dependencies declare other packages that this package depends on. - .package(url: "https://github.com/Flight-School/AnyCodable", from: "0.6.1"), + .package(url: "https://github.com/Flight-School/AnyCodable", .upToNextMajor(from: "0.6.1")), ], targets: [ // Targets are the basic building blocks of a package. A target can define a module or a test suite. diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient.podspec b/samples/client/petstore/swift5/objcCompatible/PetstoreClient.podspec index 0e6bf7ec02..4265bb2dc1 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient.podspec +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient.podspec @@ -11,5 +11,5 @@ Pod::Spec.new do |s| s.homepage = 'https://github.com/openapitools/openapi-generator' s.summary = 'PetstoreClient' s.source_files = 'PetstoreClient/Classes/**/*.swift' - s.dependency 'AnyCodable-FlightSchool', '~> 0.6.1' + s.dependency 'AnyCodable-FlightSchool', '~> 0.6' end diff --git a/samples/client/petstore/swift5/oneOf/Cartfile b/samples/client/petstore/swift5/oneOf/Cartfile index 3f7e6304ca..92bac17454 100644 --- a/samples/client/petstore/swift5/oneOf/Cartfile +++ b/samples/client/petstore/swift5/oneOf/Cartfile @@ -1 +1 @@ -github "Flight-School/AnyCodable" ~> 0.6.1 +github "Flight-School/AnyCodable" ~> 0.6 diff --git a/samples/client/petstore/swift5/oneOf/Package.swift b/samples/client/petstore/swift5/oneOf/Package.swift index 87bb775fb7..5335b0a309 100644 --- a/samples/client/petstore/swift5/oneOf/Package.swift +++ b/samples/client/petstore/swift5/oneOf/Package.swift @@ -19,7 +19,7 @@ let package = Package( ], dependencies: [ // Dependencies declare other packages that this package depends on. - .package(url: "https://github.com/Flight-School/AnyCodable", from: "0.6.1"), + .package(url: "https://github.com/Flight-School/AnyCodable", .upToNextMajor(from: "0.6.1")), ], targets: [ // Targets are the basic building blocks of a package. A target can define a module or a test suite. diff --git a/samples/client/petstore/swift5/oneOf/PetstoreClient.podspec b/samples/client/petstore/swift5/oneOf/PetstoreClient.podspec index 0657f66982..03b5c2dab4 100644 --- a/samples/client/petstore/swift5/oneOf/PetstoreClient.podspec +++ b/samples/client/petstore/swift5/oneOf/PetstoreClient.podspec @@ -11,5 +11,5 @@ Pod::Spec.new do |s| s.homepage = 'https://github.com/openapitools/openapi-generator' s.summary = 'PetstoreClient' s.source_files = 'PetstoreClient/Classes/**/*.swift' - s.dependency 'AnyCodable-FlightSchool', '~> 0.6.1' + s.dependency 'AnyCodable-FlightSchool', '~> 0.6' end diff --git a/samples/client/petstore/swift5/promisekitLibrary/Cartfile b/samples/client/petstore/swift5/promisekitLibrary/Cartfile index 90c7669089..7a967784f1 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/Cartfile +++ b/samples/client/petstore/swift5/promisekitLibrary/Cartfile @@ -1,2 +1,2 @@ -github "Flight-School/AnyCodable" ~> 0.6.1 -github "mxcl/PromiseKit" ~> 6.15.3 +github "Flight-School/AnyCodable" ~> 0.6 +github "mxcl/PromiseKit" ~> 6.15 diff --git a/samples/client/petstore/swift5/promisekitLibrary/Package.swift b/samples/client/petstore/swift5/promisekitLibrary/Package.swift index 1f18577a22..3b6a429a22 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/Package.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/Package.swift @@ -19,8 +19,8 @@ let package = Package( ], dependencies: [ // Dependencies declare other packages that this package depends on. - .package(url: "https://github.com/Flight-School/AnyCodable", from: "0.6.1"), - .package(url: "https://github.com/mxcl/PromiseKit", from: "6.15.3"), + .package(url: "https://github.com/Flight-School/AnyCodable", .upToNextMajor(from: "0.6.1")), + .package(url: "https://github.com/mxcl/PromiseKit", .upToNextMajor(from: "6.15.3")), ], targets: [ // Targets are the basic building blocks of a package. A target can define a module or a test suite. diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient.podspec b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient.podspec index b933500fe0..b0bb045a4e 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient.podspec +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient.podspec @@ -11,6 +11,6 @@ Pod::Spec.new do |s| s.homepage = 'https://github.com/openapitools/openapi-generator' s.summary = 'PetstoreClient' s.source_files = 'PetstoreClient/Classes/**/*.swift' - s.dependency 'AnyCodable-FlightSchool', '~> 0.6.1' - s.dependency 'PromiseKit/CorePromise', '~> 6.15.3' + s.dependency 'AnyCodable-FlightSchool', '~> 0.6' + s.dependency 'PromiseKit/CorePromise', '~> 6.15' end diff --git a/samples/client/petstore/swift5/readonlyProperties/Cartfile b/samples/client/petstore/swift5/readonlyProperties/Cartfile index 3f7e6304ca..92bac17454 100644 --- a/samples/client/petstore/swift5/readonlyProperties/Cartfile +++ b/samples/client/petstore/swift5/readonlyProperties/Cartfile @@ -1 +1 @@ -github "Flight-School/AnyCodable" ~> 0.6.1 +github "Flight-School/AnyCodable" ~> 0.6 diff --git a/samples/client/petstore/swift5/readonlyProperties/Package.swift b/samples/client/petstore/swift5/readonlyProperties/Package.swift index 87bb775fb7..5335b0a309 100644 --- a/samples/client/petstore/swift5/readonlyProperties/Package.swift +++ b/samples/client/petstore/swift5/readonlyProperties/Package.swift @@ -19,7 +19,7 @@ let package = Package( ], dependencies: [ // Dependencies declare other packages that this package depends on. - .package(url: "https://github.com/Flight-School/AnyCodable", from: "0.6.1"), + .package(url: "https://github.com/Flight-School/AnyCodable", .upToNextMajor(from: "0.6.1")), ], targets: [ // Targets are the basic building blocks of a package. A target can define a module or a test suite. diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient.podspec b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient.podspec index 0e6bf7ec02..4265bb2dc1 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient.podspec +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient.podspec @@ -11,5 +11,5 @@ Pod::Spec.new do |s| s.homepage = 'https://github.com/openapitools/openapi-generator' s.summary = 'PetstoreClient' s.source_files = 'PetstoreClient/Classes/**/*.swift' - s.dependency 'AnyCodable-FlightSchool', '~> 0.6.1' + s.dependency 'AnyCodable-FlightSchool', '~> 0.6' end diff --git a/samples/client/petstore/swift5/resultLibrary/Cartfile b/samples/client/petstore/swift5/resultLibrary/Cartfile index 3f7e6304ca..92bac17454 100644 --- a/samples/client/petstore/swift5/resultLibrary/Cartfile +++ b/samples/client/petstore/swift5/resultLibrary/Cartfile @@ -1 +1 @@ -github "Flight-School/AnyCodable" ~> 0.6.1 +github "Flight-School/AnyCodable" ~> 0.6 diff --git a/samples/client/petstore/swift5/resultLibrary/Package.swift b/samples/client/petstore/swift5/resultLibrary/Package.swift index 87bb775fb7..5335b0a309 100644 --- a/samples/client/petstore/swift5/resultLibrary/Package.swift +++ b/samples/client/petstore/swift5/resultLibrary/Package.swift @@ -19,7 +19,7 @@ let package = Package( ], dependencies: [ // Dependencies declare other packages that this package depends on. - .package(url: "https://github.com/Flight-School/AnyCodable", from: "0.6.1"), + .package(url: "https://github.com/Flight-School/AnyCodable", .upToNextMajor(from: "0.6.1")), ], targets: [ // Targets are the basic building blocks of a package. A target can define a module or a test suite. diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient.podspec b/samples/client/petstore/swift5/resultLibrary/PetstoreClient.podspec index 0e6bf7ec02..4265bb2dc1 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient.podspec +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient.podspec @@ -11,5 +11,5 @@ Pod::Spec.new do |s| s.homepage = 'https://github.com/openapitools/openapi-generator' s.summary = 'PetstoreClient' s.source_files = 'PetstoreClient/Classes/**/*.swift' - s.dependency 'AnyCodable-FlightSchool', '~> 0.6.1' + s.dependency 'AnyCodable-FlightSchool', '~> 0.6' end diff --git a/samples/client/petstore/swift5/rxswiftLibrary/Cartfile b/samples/client/petstore/swift5/rxswiftLibrary/Cartfile index bd01f4a21d..b5c3d62033 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/Cartfile +++ b/samples/client/petstore/swift5/rxswiftLibrary/Cartfile @@ -1,2 +1,2 @@ -github "Flight-School/AnyCodable" ~> 0.6.1 -github "ReactiveX/RxSwift" ~> 6.2.0 +github "Flight-School/AnyCodable" ~> 0.6 +github "ReactiveX/RxSwift" ~> 6.2 diff --git a/samples/client/petstore/swift5/rxswiftLibrary/Package.swift b/samples/client/petstore/swift5/rxswiftLibrary/Package.swift index c70e60a1a8..0509fe3560 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/Package.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/Package.swift @@ -19,8 +19,8 @@ let package = Package( ], dependencies: [ // Dependencies declare other packages that this package depends on. - .package(url: "https://github.com/Flight-School/AnyCodable", from: "0.6.1"), - .package(url: "https://github.com/ReactiveX/RxSwift", from: "6.2.0"), + .package(url: "https://github.com/Flight-School/AnyCodable", .upToNextMajor(from: "0.6.1")), + .package(url: "https://github.com/ReactiveX/RxSwift", .upToNextMajor(from: "6.2.0")), ], targets: [ // Targets are the basic building blocks of a package. A target can define a module or a test suite. diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient.podspec b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient.podspec index 044fb63835..c5f2c2360b 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient.podspec +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient.podspec @@ -11,6 +11,6 @@ Pod::Spec.new do |s| s.homepage = 'https://github.com/openapitools/openapi-generator' s.summary = 'PetstoreClient' s.source_files = 'PetstoreClient/Classes/**/*.swift' - s.dependency 'AnyCodable-FlightSchool', '~> 0.6.1' - s.dependency 'RxSwift', '~> 6.2.0' + s.dependency 'AnyCodable-FlightSchool', '~> 0.6' + s.dependency 'RxSwift', '~> 6.2' end diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Cartfile b/samples/client/petstore/swift5/urlsessionLibrary/Cartfile index 3f7e6304ca..92bac17454 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Cartfile +++ b/samples/client/petstore/swift5/urlsessionLibrary/Cartfile @@ -1 +1 @@ -github "Flight-School/AnyCodable" ~> 0.6.1 +github "Flight-School/AnyCodable" ~> 0.6 diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Package.swift b/samples/client/petstore/swift5/urlsessionLibrary/Package.swift index 300e741427..1f3295b56c 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Package.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Package.swift @@ -19,7 +19,7 @@ let package = Package( ], dependencies: [ // Dependencies declare other packages that this package depends on. - .package(url: "https://github.com/Flight-School/AnyCodable", from: "0.6.1"), + .package(url: "https://github.com/Flight-School/AnyCodable", .upToNextMajor(from: "0.6.1")), ], targets: [ // Targets are the basic building blocks of a package. A target can define a module or a test suite. diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient.podspec b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient.podspec index 571e1d8a51..a43f3af18d 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient.podspec +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient.podspec @@ -11,5 +11,5 @@ Pod::Spec.new do |s| s.homepage = 'https://github.com/openapitools/openapi-generator' s.summary = 'PetstoreClient' s.source_files = 'Sources/PetstoreClient/**/*.swift' - s.dependency 'AnyCodable-FlightSchool', '~> 0.6.1' + s.dependency 'AnyCodable-FlightSchool', '~> 0.6' end diff --git a/samples/client/petstore/swift5/vaporLibrary/Package.swift b/samples/client/petstore/swift5/vaporLibrary/Package.swift index d467b6e4a2..cab135e31e 100644 --- a/samples/client/petstore/swift5/vaporLibrary/Package.swift +++ b/samples/client/petstore/swift5/vaporLibrary/Package.swift @@ -16,7 +16,7 @@ let package = Package( ], dependencies: [ // Dependencies declare other packages that this package depends on. - .package(url: "https://github.com/Flight-School/AnyCodable", from: "0.6.1"), + .package(url: "https://github.com/Flight-School/AnyCodable", .upToNextMajor(from: "0.6.1")), .package(url: "https://github.com/vapor/vapor", from: "4.0.0") ], targets: [ diff --git a/samples/client/petstore/swift5/x-swift-hashable/Cartfile b/samples/client/petstore/swift5/x-swift-hashable/Cartfile index 3f7e6304ca..92bac17454 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/Cartfile +++ b/samples/client/petstore/swift5/x-swift-hashable/Cartfile @@ -1 +1 @@ -github "Flight-School/AnyCodable" ~> 0.6.1 +github "Flight-School/AnyCodable" ~> 0.6 diff --git a/samples/client/petstore/swift5/x-swift-hashable/Package.swift b/samples/client/petstore/swift5/x-swift-hashable/Package.swift index 87bb775fb7..5335b0a309 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/Package.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/Package.swift @@ -19,7 +19,7 @@ let package = Package( ], dependencies: [ // Dependencies declare other packages that this package depends on. - .package(url: "https://github.com/Flight-School/AnyCodable", from: "0.6.1"), + .package(url: "https://github.com/Flight-School/AnyCodable", .upToNextMajor(from: "0.6.1")), ], targets: [ // Targets are the basic building blocks of a package. A target can define a module or a test suite. diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient.podspec b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient.podspec index 0e6bf7ec02..4265bb2dc1 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient.podspec +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient.podspec @@ -11,5 +11,5 @@ Pod::Spec.new do |s| s.homepage = 'https://github.com/openapitools/openapi-generator' s.summary = 'PetstoreClient' s.source_files = 'PetstoreClient/Classes/**/*.swift' - s.dependency 'AnyCodable-FlightSchool', '~> 0.6.1' + s.dependency 'AnyCodable-FlightSchool', '~> 0.6' end From 01f0763ec3b72b8a3ce0f4ad77713d876702f070 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Thu, 10 Nov 2022 13:44:36 -0800 Subject: [PATCH 013/189] [python] fixes enum naming bug (#13985) * Adds fix * Adds needed java imports --- .../languages/PythonClientCodegen.java | 11 ++++++++ .../codegen/python/PythonClientTest.java | 27 +++++++++++++++++++ .../3_0/13942_schema_enum_names.yaml | 12 +++++++++ 3 files changed, 50 insertions(+) create mode 100644 modules/openapi-generator/src/test/resources/3_0/13942_schema_enum_names.yaml diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java index 0aeee921a0..3508b2775a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java @@ -1273,7 +1273,10 @@ public class PythonClientCodegen extends AbstractPythonCodegen { // Replace " " with _ String usedValue = value.replaceAll("\\s+", "_"); // strip first character if it is invalid + int lengthBeforeFirstCharStrip = usedValue.length(); + Character firstChar = usedValue.charAt(0); usedValue = usedValue.replaceAll("^[^_a-zA-Z]", ""); + boolean firstCharStripped = usedValue.length() == lengthBeforeFirstCharStrip - 1; // Replace / with _ for path enums usedValue = usedValue.replaceAll("/", "_"); // Replace . with _ for tag enums @@ -1296,6 +1299,14 @@ public class PythonClientCodegen extends AbstractPythonCodegen { // remove trailing _ usedValue = usedValue.replaceAll("[_]$", ""); } + // check first character to see if it is valid + // if not then add a valid prefix + boolean validFirstChar = Pattern.matches("^[_a-zA-Z]", usedValue.substring(0,1)); + if (!validFirstChar && firstCharStripped) { + String charName = Character.getName(firstChar.hashCode()); + usedValue = charNameToVarName(charName) + "_" + usedValue; + } + return usedValue; } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonClientTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonClientTest.java index 47e5569c71..6e293eb845 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonClientTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonClientTest.java @@ -23,6 +23,8 @@ import io.swagger.v3.oas.models.media.*; import org.openapitools.codegen.*; import org.openapitools.codegen.config.CodegenConfigurator; import org.openapitools.codegen.languages.PythonClientCodegen; +import org.openapitools.codegen.model.ModelMap; +import org.openapitools.codegen.model.ModelsMap; import org.openapitools.codegen.utils.ModelUtils; import org.testng.Assert; import org.testng.annotations.Test; @@ -32,6 +34,7 @@ import java.io.IOException; import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Path; +import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; @@ -197,4 +200,28 @@ public class PythonClientTest { Assert.assertEquals(cm.vendorExtensions.get("x-regex"), expectedRegexPattern); Assert.assertEquals(cm.vendorExtensions.get("x-modifiers"), Arrays.asList("DOTALL", "IGNORECASE", "MULTILINE")); } + + @Test + public void testEnumNames() { + OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/13942_schema_enum_names.yaml"); + PythonClientCodegen codegen = new PythonClientCodegen(); + codegen.setOpenAPI(openAPI); + + String modelName = "StringEnum"; + Schema schema = openAPI.getComponents().getSchemas().get(modelName); + + CodegenModel cm = codegen.fromModel(modelName, schema); + + ModelMap modelMap = new ModelMap(); + modelMap.setModel(cm); + + ModelsMap modelsMap = new ModelsMap(); + modelsMap.setModels(Collections.singletonList(modelMap)); + codegen.postProcessModels(modelsMap); + + ArrayList> enumVars = (ArrayList>) cm.getAllowableValues().get("enumVars"); + Assert.assertEquals(enumVars.size(), 2); + Assert.assertEquals(enumVars.get(0).get("name"), "DIGIT_THREE_67B9C"); + Assert.assertEquals(enumVars.get(1).get("name"), "FFA5A4"); + } } \ No newline at end of file diff --git a/modules/openapi-generator/src/test/resources/3_0/13942_schema_enum_names.yaml b/modules/openapi-generator/src/test/resources/3_0/13942_schema_enum_names.yaml new file mode 100644 index 0000000000..8c441ea032 --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/13942_schema_enum_names.yaml @@ -0,0 +1,12 @@ +openapi: 3.0.3 +info: + title: Test + version: 1.0.0-SNAPSHOT +paths: {} +components: + schemas: + StringEnum: + type: string + enum: + - "#367B9C" + - "#FFA5A4" \ No newline at end of file From f81eb7e6f0c68777a014eb6300cc7cbc4db606ec Mon Sep 17 00:00:00 2001 From: Antoine Reilles Date: Fri, 11 Nov 2022 11:18:19 +0100 Subject: [PATCH 014/189] [jaxrs-cxf-cdi] use jackson for enum serialization (#13766) --- .../src/main/resources/JavaJaxRS/cxf-cdi/enumClass.mustache | 2 +- .../src/gen/java/org/openapitools/model/Order.java | 2 +- .../jaxrs-cxf-cdi/src/gen/java/org/openapitools/model/Pet.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/enumClass.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/enumClass.mustache index dea53ac621..f447ba8411 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/enumClass.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi/enumClass.mustache @@ -5,7 +5,7 @@ {{>additionalEnumTypeAnnotations}}public enum {{{datatypeWithEnum}}}{{^datatypeWithEnum}}{{{classname}}}{{/datatypeWithEnum}} { {{#allowableValues}} - {{#enumVars}}{{#withXml}}@XmlEnumValue({{^isString}}"{{/isString}}{{{value}}}{{^isString}}"{{/isString}}) {{/withXml}}{{name}}({{dataType}}.valueOf({{{value}}})){{^-last}}, {{/-last}}{{#-last}};{{/-last}}{{/enumVars}} + {{#enumVars}}{{#withXml}}@XmlEnumValue({{^isString}}"{{/isString}}{{{value}}}{{^isString}}"{{/isString}}) {{/withXml}}@JsonProperty({{^isString}}"{{/isString}}{{{value}}}{{^isString}}"{{/isString}}) {{name}}({{dataType}}.valueOf({{{value}}})){{^-last}}, {{/-last}}{{#-last}};{{/-last}}{{/enumVars}} {{/allowableValues}} diff --git a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/model/Order.java b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/model/Order.java index 5fd6be2b15..9cc76d30df 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/model/Order.java @@ -28,7 +28,7 @@ public class Order { public enum StatusEnum { - PLACED(String.valueOf("placed")), APPROVED(String.valueOf("approved")), DELIVERED(String.valueOf("delivered")); + @JsonProperty("placed") PLACED(String.valueOf("placed")), @JsonProperty("approved") APPROVED(String.valueOf("approved")), @JsonProperty("delivered") DELIVERED(String.valueOf("delivered")); private String value; diff --git a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/model/Pet.java b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/model/Pet.java index acd246a87f..ba6f130341 100644 --- a/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/jaxrs-cxf-cdi/src/gen/java/org/openapitools/model/Pet.java @@ -34,7 +34,7 @@ public class Pet { public enum StatusEnum { - AVAILABLE(String.valueOf("available")), PENDING(String.valueOf("pending")), SOLD(String.valueOf("sold")); + @JsonProperty("available") AVAILABLE(String.valueOf("available")), @JsonProperty("pending") PENDING(String.valueOf("pending")), @JsonProperty("sold") SOLD(String.valueOf("sold")); private String value; From 1670e952ff56d706a2a721ea7fe16ce6899e99d8 Mon Sep 17 00:00:00 2001 From: Elric Milon Date: Fri, 11 Nov 2022 11:25:01 +0100 Subject: [PATCH 015/189] [Rust] Add support for reqwest-middleware when using reqwest (#13946) Co-authored-by: Elric Milon --- ...ust-reqwest-petstore-async-middleware.yaml | 11 + docs/generators/rust.md | 1 + .../codegen/languages/RustClientCodegen.java | 17 + .../src/main/resources/rust/Cargo.mustache | 3 + .../resources/rust/reqwest/api_mod.mustache | 17 + .../rust/reqwest/configuration.mustache | 6 +- .../petstore-async-middleware/.gitignore | 3 + .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 43 ++ .../.openapi-generator/VERSION | 1 + .../petstore-async-middleware/.travis.yml | 1 + .../petstore-async-middleware/Cargo.toml | 19 + .../petstore-async-middleware/README.md | 78 +++ .../docs/ActionContainer.md | 11 + .../docs/ApiResponse.md | 13 + .../petstore-async-middleware/docs/Baz.md | 10 + .../docs/Category.md | 12 + .../petstore-async-middleware/docs/FakeApi.md | 41 ++ .../docs/OptionalTesting.md | 14 + .../petstore-async-middleware/docs/Order.md | 16 + .../petstore-async-middleware/docs/Pet.md | 16 + .../petstore-async-middleware/docs/PetApi.md | 261 +++++++++ .../docs/PropertyTest.md | 11 + .../petstore-async-middleware/docs/Return.md | 13 + .../docs/StoreApi.md | 129 +++++ .../petstore-async-middleware/docs/Tag.md | 12 + .../docs/TestingApi.md | 60 ++ .../docs/TypeTesting.md | 17 + .../petstore-async-middleware/docs/User.md | 18 + .../petstore-async-middleware/docs/UserApi.md | 255 ++++++++ .../petstore-async-middleware/git_push.sh | 57 ++ .../src/apis/configuration.rs | 53 ++ .../src/apis/fake_api.rs | 89 +++ .../petstore-async-middleware/src/apis/mod.rs | 79 +++ .../src/apis/pet_api.rs | 544 ++++++++++++++++++ .../src/apis/store_api.rs | 247 ++++++++ .../src/apis/testing_api.rs | 112 ++++ .../src/apis/user_api.rs | 523 +++++++++++++++++ .../petstore-async-middleware/src/lib.rs | 10 + .../src/models/action_container.rs | 28 + .../src/models/api_response.rs | 36 ++ .../src/models/baz.rs | 43 ++ .../src/models/category.rs | 33 ++ .../src/models/mod.rs | 24 + .../src/models/model_return.rs | 36 ++ .../src/models/optional_testing.rs | 39 ++ .../src/models/order.rs | 62 ++ .../src/models/pet.rs | 62 ++ .../src/models/property_test.rs | 30 + .../src/models/tag.rs | 33 ++ .../src/models/type_testing.rs | 48 ++ .../src/models/user.rs | 52 ++ .../petstore-async/src/apis/configuration.rs | 2 - .../src/apis/configuration.rs | 2 - .../petstore/src/apis/configuration.rs | 2 - .../Converters/CustomEnumConverter.cs | 42 ++ .../Org.OpenAPITools/Models/ApiResponse.cs | 147 +++++ .../src/Org.OpenAPITools/Models/Category.cs | 134 +++++ .../src/Org.OpenAPITools/Models/Order.cs | 219 +++++++ .../src/Org.OpenAPITools/Models/Pet.cs | 223 +++++++ .../src/Org.OpenAPITools/Models/Tag.cs | 133 +++++ .../src/Org.OpenAPITools/Models/User.cs | 218 +++++++ 62 files changed, 4484 insertions(+), 10 deletions(-) create mode 100644 bin/configs/rust-reqwest-petstore-async-middleware.yaml create mode 100644 samples/client/petstore/rust/reqwest/petstore-async-middleware/.gitignore create mode 100644 samples/client/petstore/rust/reqwest/petstore-async-middleware/.openapi-generator-ignore create mode 100644 samples/client/petstore/rust/reqwest/petstore-async-middleware/.openapi-generator/FILES create mode 100644 samples/client/petstore/rust/reqwest/petstore-async-middleware/.openapi-generator/VERSION create mode 100644 samples/client/petstore/rust/reqwest/petstore-async-middleware/.travis.yml create mode 100644 samples/client/petstore/rust/reqwest/petstore-async-middleware/Cargo.toml create mode 100644 samples/client/petstore/rust/reqwest/petstore-async-middleware/README.md create mode 100644 samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/ActionContainer.md create mode 100644 samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/ApiResponse.md create mode 100644 samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/Baz.md create mode 100644 samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/Category.md create mode 100644 samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/FakeApi.md create mode 100644 samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/OptionalTesting.md create mode 100644 samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/Order.md create mode 100644 samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/Pet.md create mode 100644 samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/PetApi.md create mode 100644 samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/PropertyTest.md create mode 100644 samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/Return.md create mode 100644 samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/StoreApi.md create mode 100644 samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/Tag.md create mode 100644 samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/TestingApi.md create mode 100644 samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/TypeTesting.md create mode 100644 samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/User.md create mode 100644 samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/UserApi.md create mode 100644 samples/client/petstore/rust/reqwest/petstore-async-middleware/git_push.sh create mode 100644 samples/client/petstore/rust/reqwest/petstore-async-middleware/src/apis/configuration.rs create mode 100644 samples/client/petstore/rust/reqwest/petstore-async-middleware/src/apis/fake_api.rs create mode 100644 samples/client/petstore/rust/reqwest/petstore-async-middleware/src/apis/mod.rs create mode 100644 samples/client/petstore/rust/reqwest/petstore-async-middleware/src/apis/pet_api.rs create mode 100644 samples/client/petstore/rust/reqwest/petstore-async-middleware/src/apis/store_api.rs create mode 100644 samples/client/petstore/rust/reqwest/petstore-async-middleware/src/apis/testing_api.rs create mode 100644 samples/client/petstore/rust/reqwest/petstore-async-middleware/src/apis/user_api.rs create mode 100644 samples/client/petstore/rust/reqwest/petstore-async-middleware/src/lib.rs create mode 100644 samples/client/petstore/rust/reqwest/petstore-async-middleware/src/models/action_container.rs create mode 100644 samples/client/petstore/rust/reqwest/petstore-async-middleware/src/models/api_response.rs create mode 100644 samples/client/petstore/rust/reqwest/petstore-async-middleware/src/models/baz.rs create mode 100644 samples/client/petstore/rust/reqwest/petstore-async-middleware/src/models/category.rs create mode 100644 samples/client/petstore/rust/reqwest/petstore-async-middleware/src/models/mod.rs create mode 100644 samples/client/petstore/rust/reqwest/petstore-async-middleware/src/models/model_return.rs create mode 100644 samples/client/petstore/rust/reqwest/petstore-async-middleware/src/models/optional_testing.rs create mode 100644 samples/client/petstore/rust/reqwest/petstore-async-middleware/src/models/order.rs create mode 100644 samples/client/petstore/rust/reqwest/petstore-async-middleware/src/models/pet.rs create mode 100644 samples/client/petstore/rust/reqwest/petstore-async-middleware/src/models/property_test.rs create mode 100644 samples/client/petstore/rust/reqwest/petstore-async-middleware/src/models/tag.rs create mode 100644 samples/client/petstore/rust/reqwest/petstore-async-middleware/src/models/type_testing.rs create mode 100644 samples/client/petstore/rust/reqwest/petstore-async-middleware/src/models/user.rs create mode 100644 samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Converters/CustomEnumConverter.cs create mode 100644 samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Models/ApiResponse.cs create mode 100644 samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Models/Category.cs create mode 100644 samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Models/Order.cs create mode 100644 samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Models/Pet.cs create mode 100644 samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Models/Tag.cs create mode 100644 samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Models/User.cs diff --git a/bin/configs/rust-reqwest-petstore-async-middleware.yaml b/bin/configs/rust-reqwest-petstore-async-middleware.yaml new file mode 100644 index 0000000000..e790831596 --- /dev/null +++ b/bin/configs/rust-reqwest-petstore-async-middleware.yaml @@ -0,0 +1,11 @@ +generatorName: rust +outputDir: samples/client/petstore/rust/reqwest/petstore-async-middleware +library: reqwest +inputSpec: modules/openapi-generator/src/test/resources/3_0/rust/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/rust +additionalProperties: + supportAsync: true + supportMiddleware: true + supportMultipleResponses: true + packageName: petstore-reqwest-async-middleware + useSingleRequestParameter: true diff --git a/docs/generators/rust.md b/docs/generators/rust.md index e0ac78e620..cdfb65be18 100644 --- a/docs/generators/rust.md +++ b/docs/generators/rust.md @@ -26,6 +26,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |packageVersion|Rust package version.| |1.0.0| |preferUnsignedInt|Prefer unsigned integers where minimum value is >= 0| |false| |supportAsync|If set, generate async function call instead. This option is for 'reqwest' library only| |true| +|supportMiddleware|If set, add support for reqwest-middleware. This option is for 'reqwest' library only| |false| |supportMultipleResponses|If set, return type wraps an enum of all possible 2xx schemas. This option is for 'reqwest' library only| |false| |useSingleRequestParameter|Setting this property to true will generate functions with a single argument containing all API endpoint parameters instead of one argument per parameter.| |false| |withAWSV4Signature|whether to include AWS v4 signature support| |false| diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java index bbfa8f6afb..cac8dc933e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java @@ -48,6 +48,7 @@ public class RustClientCodegen extends AbstractRustCodegen implements CodegenCon private final Logger LOGGER = LoggerFactory.getLogger(RustClientCodegen.class); private boolean useSingleRequestParameter = false; private boolean supportAsync = true; + private boolean supportMiddleware = false; private boolean supportMultipleResponses = false; private boolean withAWSV4Signature = false; private boolean preferUnsignedInt = false; @@ -58,6 +59,7 @@ public class RustClientCodegen extends AbstractRustCodegen implements CodegenCon public static final String HYPER_LIBRARY = "hyper"; public static final String REQWEST_LIBRARY = "reqwest"; public static final String SUPPORT_ASYNC = "supportAsync"; + public static final String SUPPORT_MIDDLEWARE = "supportMiddleware"; public static final String SUPPORT_MULTIPLE_RESPONSES = "supportMultipleResponses"; public static final String PREFER_UNSIGNED_INT = "preferUnsignedInt"; public static final String BEST_FIT_INT = "bestFitInt"; @@ -175,6 +177,8 @@ public class RustClientCodegen extends AbstractRustCodegen implements CodegenCon .defaultValue(Boolean.FALSE.toString())); cliOptions.add(new CliOption(SUPPORT_ASYNC, "If set, generate async function call instead. This option is for 'reqwest' library only", SchemaTypeUtil.BOOLEAN_TYPE) .defaultValue(Boolean.TRUE.toString())); + cliOptions.add(new CliOption(SUPPORT_MIDDLEWARE, "If set, add support for reqwest-middleware. This option is for 'reqwest' library only", SchemaTypeUtil.BOOLEAN_TYPE) + .defaultValue(Boolean.FALSE.toString())); cliOptions.add(new CliOption(SUPPORT_MULTIPLE_RESPONSES, "If set, return type wraps an enum of all possible 2xx schemas. This option is for 'reqwest' library only", SchemaTypeUtil.BOOLEAN_TYPE) .defaultValue(Boolean.FALSE.toString())); cliOptions.add(new CliOption(CodegenConstants.ENUM_NAME_SUFFIX, CodegenConstants.ENUM_NAME_SUFFIX_DESC).defaultValue(this.enumSuffix)); @@ -282,6 +286,11 @@ public class RustClientCodegen extends AbstractRustCodegen implements CodegenCon } writePropertyBack(SUPPORT_ASYNC, getSupportAsync()); + if (additionalProperties.containsKey(SUPPORT_MIDDLEWARE)) { + this.setSupportMiddleware(convertPropertyToBoolean(SUPPORT_MIDDLEWARE)); + } + writePropertyBack(SUPPORT_MIDDLEWARE, getSupportMiddleware()); + if (additionalProperties.containsKey(SUPPORT_MULTIPLE_RESPONSES)) { this.setSupportMultipleReturns(convertPropertyToBoolean(SUPPORT_MULTIPLE_RESPONSES)); } @@ -353,6 +362,14 @@ public class RustClientCodegen extends AbstractRustCodegen implements CodegenCon this.supportAsync = supportAsync; } + private boolean getSupportMiddleware() { + return supportMiddleware; + } + + private void setSupportMiddleware(boolean supportMiddleware) { + this.supportMiddleware = supportMiddleware; + } + public boolean getSupportMultipleReturns() { return supportMultipleResponses; } diff --git a/modules/openapi-generator/src/main/resources/rust/Cargo.mustache b/modules/openapi-generator/src/main/resources/rust/Cargo.mustache index 98b1024cc0..083cfab09b 100644 --- a/modules/openapi-generator/src/main/resources/rust/Cargo.mustache +++ b/modules/openapi-generator/src/main/resources/rust/Cargo.mustache @@ -57,6 +57,9 @@ secrecy = "0.8.0" reqwest = "~0.9" {{/supportAsync}} {{#supportAsync}} +{{#supportMiddleware}} +reqwest-middleware = "0.1.6" +{{/supportMiddleware}} [dependencies.reqwest] version = "^0.11" features = ["json", "multipart"] diff --git a/modules/openapi-generator/src/main/resources/rust/reqwest/api_mod.mustache b/modules/openapi-generator/src/main/resources/rust/reqwest/api_mod.mustache index 628ec898a9..807162b922 100644 --- a/modules/openapi-generator/src/main/resources/rust/reqwest/api_mod.mustache +++ b/modules/openapi-generator/src/main/resources/rust/reqwest/api_mod.mustache @@ -14,6 +14,9 @@ pub struct ResponseContent { #[derive(Debug)] pub enum Error { Reqwest(reqwest::Error), + {{#supportMiddleware}} + ReqwestMiddleware(reqwest_middleware::Error), + {{/supportMiddleware}} Serde(serde_json::Error), Io(std::io::Error), ResponseError(ResponseContent), @@ -26,6 +29,9 @@ impl fmt::Display for Error { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { let (module, e) = match self { Error::Reqwest(e) => ("reqwest", e.to_string()), + {{#supportMiddleware}} + Error::ReqwestMiddleware(e) => ("reqwest-middleware", e.to_string()), + {{/supportMiddleware}} Error::Serde(e) => ("serde", e.to_string()), Error::Io(e) => ("IO", e.to_string()), Error::ResponseError(e) => ("response", format!("status code {}", e.status)), @@ -41,6 +47,9 @@ impl error::Error for Error { fn source(&self) -> Option<&(dyn error::Error + 'static)> { Some(match self { Error::Reqwest(e) => e, + {{#supportMiddleware}} + Error::ReqwestMiddleware(e) => e, + {{/supportMiddleware}} Error::Serde(e) => e, Error::Io(e) => e, Error::ResponseError(_) => return None, @@ -57,6 +66,14 @@ impl From for Error { } } +{{#supportMiddleware}} +impl From for Error { + fn from(e: reqwest_middleware::Error) -> Self { + Error::ReqwestMiddleware(e) + } +} + +{{/supportMiddleware}} impl From for Error { fn from(e: serde_json::Error) -> Self { Error::Serde(e) diff --git a/modules/openapi-generator/src/main/resources/rust/reqwest/configuration.mustache b/modules/openapi-generator/src/main/resources/rust/reqwest/configuration.mustache index cbc21644e2..32b2fd8a7c 100644 --- a/modules/openapi-generator/src/main/resources/rust/reqwest/configuration.mustache +++ b/modules/openapi-generator/src/main/resources/rust/reqwest/configuration.mustache @@ -1,7 +1,5 @@ {{>partial_header}} -use reqwest; - {{#withAWSV4Signature}} use std::time::SystemTime; use aws_sigv4::http_request::{sign, SigningSettings, SigningParams, SignableRequest}; @@ -13,7 +11,7 @@ use secrecy::{SecretString, ExposeSecret}; pub struct Configuration { pub base_path: String, pub user_agent: Option, - pub client: reqwest::Client, + pub client: {{#supportMiddleware}}reqwest_middleware::ClientWithMiddleware{{/supportMiddleware}}{{^supportMiddleware}}reqwest::Client{{/supportMiddleware}}, pub basic_auth: Option, pub oauth_access_token: Option, pub bearer_access_token: Option, @@ -82,7 +80,7 @@ impl Default for Configuration { Configuration { base_path: "{{{basePath}}}".to_owned(), user_agent: {{#httpUserAgent}}Some("{{{.}}}".to_owned()){{/httpUserAgent}}{{^httpUserAgent}}Some("OpenAPI-Generator/{{{version}}}/rust".to_owned()){{/httpUserAgent}}, - client: reqwest::Client::new(), + client: {{#supportMiddleware}}reqwest_middleware::ClientBuilder::new(reqwest::Client::new()).build(){{/supportMiddleware}}{{^supportMiddleware}}reqwest::Client::new(){{/supportMiddleware}}, basic_auth: None, oauth_access_token: None, bearer_access_token: None, diff --git a/samples/client/petstore/rust/reqwest/petstore-async-middleware/.gitignore b/samples/client/petstore/rust/reqwest/petstore-async-middleware/.gitignore new file mode 100644 index 0000000000..6aa106405a --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async-middleware/.gitignore @@ -0,0 +1,3 @@ +/target/ +**/*.rs.bk +Cargo.lock diff --git a/samples/client/petstore/rust/reqwest/petstore-async-middleware/.openapi-generator-ignore b/samples/client/petstore/rust/reqwest/petstore-async-middleware/.openapi-generator-ignore new file mode 100644 index 0000000000..7484ee590a --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async-middleware/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/samples/client/petstore/rust/reqwest/petstore-async-middleware/.openapi-generator/FILES b/samples/client/petstore/rust/reqwest/petstore-async-middleware/.openapi-generator/FILES new file mode 100644 index 0000000000..4b2347f5e6 --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async-middleware/.openapi-generator/FILES @@ -0,0 +1,43 @@ +.gitignore +.travis.yml +Cargo.toml +README.md +docs/ActionContainer.md +docs/ApiResponse.md +docs/Baz.md +docs/Category.md +docs/FakeApi.md +docs/OptionalTesting.md +docs/Order.md +docs/Pet.md +docs/PetApi.md +docs/PropertyTest.md +docs/Return.md +docs/StoreApi.md +docs/Tag.md +docs/TestingApi.md +docs/TypeTesting.md +docs/User.md +docs/UserApi.md +git_push.sh +src/apis/configuration.rs +src/apis/fake_api.rs +src/apis/mod.rs +src/apis/pet_api.rs +src/apis/store_api.rs +src/apis/testing_api.rs +src/apis/user_api.rs +src/lib.rs +src/models/action_container.rs +src/models/api_response.rs +src/models/baz.rs +src/models/category.rs +src/models/mod.rs +src/models/model_return.rs +src/models/optional_testing.rs +src/models/order.rs +src/models/pet.rs +src/models/property_test.rs +src/models/tag.rs +src/models/type_testing.rs +src/models/user.rs diff --git a/samples/client/petstore/rust/reqwest/petstore-async-middleware/.openapi-generator/VERSION b/samples/client/petstore/rust/reqwest/petstore-async-middleware/.openapi-generator/VERSION new file mode 100644 index 0000000000..d6b4ec4aa7 --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async-middleware/.openapi-generator/VERSION @@ -0,0 +1 @@ +6.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/rust/reqwest/petstore-async-middleware/.travis.yml b/samples/client/petstore/rust/reqwest/petstore-async-middleware/.travis.yml new file mode 100644 index 0000000000..22761ba7ee --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async-middleware/.travis.yml @@ -0,0 +1 @@ +language: rust diff --git a/samples/client/petstore/rust/reqwest/petstore-async-middleware/Cargo.toml b/samples/client/petstore/rust/reqwest/petstore-async-middleware/Cargo.toml new file mode 100644 index 0000000000..0710153e50 --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async-middleware/Cargo.toml @@ -0,0 +1,19 @@ +[package] +name = "petstore-reqwest-async-middleware" +version = "1.0.0" +authors = ["OpenAPI Generator team and contributors"] +description = "This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters." +license = "Apache-2.0" +edition = "2018" + +[dependencies] +serde = "^1.0" +serde_derive = "^1.0" +serde_with = "^2.0" +serde_json = "^1.0" +url = "^2.2" +uuid = { version = "^1.0", features = ["serde"] } +reqwest-middleware = "0.1.6" +[dependencies.reqwest] +version = "^0.11" +features = ["json", "multipart"] diff --git a/samples/client/petstore/rust/reqwest/petstore-async-middleware/README.md b/samples/client/petstore/rust/reqwest/petstore-async-middleware/README.md new file mode 100644 index 0000000000..1509c190bf --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async-middleware/README.md @@ -0,0 +1,78 @@ +# Rust API client for petstore-reqwest-async-middleware + +This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + + +## Overview + +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://openapis.org) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: 1.0.0 +- Build package: `org.openapitools.codegen.languages.RustClientCodegen` + +## Installation + +Put the package under your project folder in a directory named `petstore-reqwest-async-middleware` and add the following to `Cargo.toml` under `[dependencies]`: + +``` +petstore-reqwest-async-middleware = { path = "./petstore-reqwest-async-middleware" } +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://petstore.swagger.io/v2* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*FakeApi* | [**test_nullable_required_param**](docs/FakeApi.md#test_nullable_required_param) | **GET** /fake/user/{username} | To test nullable required parameters +*PetApi* | [**add_pet**](docs/PetApi.md#add_pet) | **POST** /pet | Add a new pet to the store +*PetApi* | [**delete_pet**](docs/PetApi.md#delete_pet) | **DELETE** /pet/{petId} | Deletes a pet +*PetApi* | [**find_pets_by_status**](docs/PetApi.md#find_pets_by_status) | **GET** /pet/findByStatus | Finds Pets by status +*PetApi* | [**find_pets_by_tags**](docs/PetApi.md#find_pets_by_tags) | **GET** /pet/findByTags | Finds Pets by tags +*PetApi* | [**get_pet_by_id**](docs/PetApi.md#get_pet_by_id) | **GET** /pet/{petId} | Find pet by ID +*PetApi* | [**update_pet**](docs/PetApi.md#update_pet) | **PUT** /pet | Update an existing pet +*PetApi* | [**update_pet_with_form**](docs/PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data +*PetApi* | [**upload_file**](docs/PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image +*StoreApi* | [**delete_order**](docs/StoreApi.md#delete_order) | **DELETE** /store/order/{orderId} | Delete purchase order by ID +*StoreApi* | [**get_inventory**](docs/StoreApi.md#get_inventory) | **GET** /store/inventory | Returns pet inventories by status +*StoreApi* | [**get_order_by_id**](docs/StoreApi.md#get_order_by_id) | **GET** /store/order/{orderId} | Find purchase order by ID +*StoreApi* | [**place_order**](docs/StoreApi.md#place_order) | **POST** /store/order | Place an order for a pet +*TestingApi* | [**tests_file_response_get**](docs/TestingApi.md#tests_file_response_get) | **GET** /tests/fileResponse | Returns an image file +*TestingApi* | [**tests_type_testing_get**](docs/TestingApi.md#tests_type_testing_get) | **GET** /tests/typeTesting | Route to test the TypeTesting schema +*UserApi* | [**create_user**](docs/UserApi.md#create_user) | **POST** /user | Create user +*UserApi* | [**create_users_with_array_input**](docs/UserApi.md#create_users_with_array_input) | **POST** /user/createWithArray | Creates list of users with given input array +*UserApi* | [**create_users_with_list_input**](docs/UserApi.md#create_users_with_list_input) | **POST** /user/createWithList | Creates list of users with given input array +*UserApi* | [**delete_user**](docs/UserApi.md#delete_user) | **DELETE** /user/{username} | Delete user +*UserApi* | [**get_user_by_name**](docs/UserApi.md#get_user_by_name) | **GET** /user/{username} | Get user by user name +*UserApi* | [**login_user**](docs/UserApi.md#login_user) | **GET** /user/login | Logs user into the system +*UserApi* | [**logout_user**](docs/UserApi.md#logout_user) | **GET** /user/logout | Logs out current logged in user session +*UserApi* | [**update_user**](docs/UserApi.md#update_user) | **PUT** /user/{username} | Updated user + + +## Documentation For Models + + - [ActionContainer](docs/ActionContainer.md) + - [ApiResponse](docs/ApiResponse.md) + - [Baz](docs/Baz.md) + - [Category](docs/Category.md) + - [OptionalTesting](docs/OptionalTesting.md) + - [Order](docs/Order.md) + - [Pet](docs/Pet.md) + - [PropertyTest](docs/PropertyTest.md) + - [Return](docs/Return.md) + - [Tag](docs/Tag.md) + - [TypeTesting](docs/TypeTesting.md) + - [User](docs/User.md) + + +To get access to the crate's generated documentation, use: + +``` +cargo doc --open +``` + +## Author + + + diff --git a/samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/ActionContainer.md b/samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/ActionContainer.md new file mode 100644 index 0000000000..8490ec5d82 --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/ActionContainer.md @@ -0,0 +1,11 @@ +# ActionContainer + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**action** | [**crate::models::Baz**](Baz.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/ApiResponse.md b/samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/ApiResponse.md new file mode 100644 index 0000000000..b5125ba685 --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/ApiResponse.md @@ -0,0 +1,13 @@ +# ApiResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | Option<**i32**> | | [optional] +**r#type** | Option<**String**> | | [optional] +**message** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/Baz.md b/samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/Baz.md new file mode 100644 index 0000000000..68c84b1b1b --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/Baz.md @@ -0,0 +1,10 @@ +# Baz + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/Category.md b/samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/Category.md new file mode 100644 index 0000000000..1cf67347c0 --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/Category.md @@ -0,0 +1,12 @@ +# Category + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | Option<**i64**> | | [optional] +**name** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/FakeApi.md b/samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/FakeApi.md new file mode 100644 index 0000000000..55bf612aa2 --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/FakeApi.md @@ -0,0 +1,41 @@ +# \FakeApi + +All URIs are relative to *http://petstore.swagger.io/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**test_nullable_required_param**](FakeApi.md#test_nullable_required_param) | **GET** /fake/user/{username} | To test nullable required parameters + + + +## test_nullable_required_param + +> test_nullable_required_param(username, dummy_required_nullable_param, uppercase) +To test nullable required parameters + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**username** | **String** | The name that needs to be fetched. Use user1 for testing. | [required] | +**dummy_required_nullable_param** | Option<**String**> | To test nullable required parameters | [required] | +**uppercase** | Option<**String**> | To test parameter names in upper case | | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/OptionalTesting.md b/samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/OptionalTesting.md new file mode 100644 index 0000000000..029e38eb97 --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/OptionalTesting.md @@ -0,0 +1,14 @@ +# OptionalTesting + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**optional_nonnull** | Option<**String**> | | [optional] +**required_nonnull** | **String** | | +**optional_nullable** | Option<**String**> | | [optional] +**required_nullable** | Option<**String**> | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/Order.md b/samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/Order.md new file mode 100644 index 0000000000..d9a09c3974 --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/Order.md @@ -0,0 +1,16 @@ +# Order + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | Option<**i64**> | | [optional] +**pet_id** | Option<**i64**> | | [optional] +**quantity** | Option<**i32**> | | [optional] +**ship_date** | Option<**String**> | | [optional] +**status** | Option<**String**> | Order Status | [optional] +**complete** | Option<**bool**> | | [optional][default to false] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/Pet.md b/samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/Pet.md new file mode 100644 index 0000000000..27886889d1 --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/Pet.md @@ -0,0 +1,16 @@ +# Pet + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | Option<**i64**> | | [optional] +**category** | Option<[**crate::models::Category**](Category.md)> | | [optional] +**name** | **String** | | +**photo_urls** | **Vec** | | +**tags** | Option<[**Vec**](Tag.md)> | | [optional] +**status** | Option<**String**> | pet status in the store | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/PetApi.md b/samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/PetApi.md new file mode 100644 index 0000000000..5adc933415 --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/PetApi.md @@ -0,0 +1,261 @@ +# \PetApi + +All URIs are relative to *http://petstore.swagger.io/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**add_pet**](PetApi.md#add_pet) | **POST** /pet | Add a new pet to the store +[**delete_pet**](PetApi.md#delete_pet) | **DELETE** /pet/{petId} | Deletes a pet +[**find_pets_by_status**](PetApi.md#find_pets_by_status) | **GET** /pet/findByStatus | Finds Pets by status +[**find_pets_by_tags**](PetApi.md#find_pets_by_tags) | **GET** /pet/findByTags | Finds Pets by tags +[**get_pet_by_id**](PetApi.md#get_pet_by_id) | **GET** /pet/{petId} | Find pet by ID +[**update_pet**](PetApi.md#update_pet) | **PUT** /pet | Update an existing pet +[**update_pet_with_form**](PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data +[**upload_file**](PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image + + + +## add_pet + +> crate::models::Pet add_pet(pet) +Add a new pet to the store + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**pet** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | [required] | + +### Return type + +[**crate::models::Pet**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + +- **Content-Type**: application/json, application/xml +- **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) + + +## delete_pet + +> delete_pet(pet_id, api_key) +Deletes a pet + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**pet_id** | **i64** | Pet id to delete | [required] | +**api_key** | Option<**String**> | | | + +### Return type + + (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## find_pets_by_status + +> Vec find_pets_by_status(status) +Finds Pets by status + +Multiple status values can be provided with comma separated strings + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**status** | [**Vec**](String.md) | Status values that need to be considered for filter | [required] | + +### Return type + +[**Vec**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## find_pets_by_tags + +> Vec find_pets_by_tags(tags) +Finds Pets by tags + +Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**tags** | [**Vec**](String.md) | Tags to filter by | [required] | + +### Return type + +[**Vec**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_pet_by_id + +> crate::models::Pet get_pet_by_id(pet_id) +Find pet by ID + +Returns a single pet + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**pet_id** | **i64** | ID of pet to return | [required] | + +### Return type + +[**crate::models::Pet**](Pet.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## update_pet + +> crate::models::Pet update_pet(pet) +Update an existing pet + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**pet** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | [required] | + +### Return type + +[**crate::models::Pet**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + +- **Content-Type**: application/json, application/xml +- **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## update_pet_with_form + +> update_pet_with_form(pet_id, name, status) +Updates a pet in the store with form data + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**pet_id** | **i64** | ID of pet that needs to be updated | [required] | +**name** | Option<**String**> | Updated name of the pet | | +**status** | Option<**String**> | Updated status of the pet | | + +### Return type + + (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## upload_file + +> crate::models::ApiResponse upload_file(pet_id, additional_metadata, file) +uploads an image + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**pet_id** | **i64** | ID of pet to update | [required] | +**additional_metadata** | Option<**String**> | Additional data to pass to server | | +**file** | Option<**std::path::PathBuf**> | file to upload | | + +### Return type + +[**crate::models::ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + +- **Content-Type**: multipart/form-data +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/PropertyTest.md b/samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/PropertyTest.md new file mode 100644 index 0000000000..3f36c163de --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/PropertyTest.md @@ -0,0 +1,11 @@ +# PropertyTest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uuid** | Option<[**uuid::Uuid**](uuid::Uuid.md)> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/Return.md b/samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/Return.md new file mode 100644 index 0000000000..04710a019d --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/Return.md @@ -0,0 +1,13 @@ +# Return + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**r#match** | Option<**i32**> | | [optional] +**r#async** | Option<**bool**> | | [optional] +**param_super** | Option<**bool**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/StoreApi.md b/samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/StoreApi.md new file mode 100644 index 0000000000..5796357f53 --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/StoreApi.md @@ -0,0 +1,129 @@ +# \StoreApi + +All URIs are relative to *http://petstore.swagger.io/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**delete_order**](StoreApi.md#delete_order) | **DELETE** /store/order/{orderId} | Delete purchase order by ID +[**get_inventory**](StoreApi.md#get_inventory) | **GET** /store/inventory | Returns pet inventories by status +[**get_order_by_id**](StoreApi.md#get_order_by_id) | **GET** /store/order/{orderId} | Find purchase order by ID +[**place_order**](StoreApi.md#place_order) | **POST** /store/order | Place an order for a pet + + + +## delete_order + +> delete_order(order_id) +Delete purchase order by ID + +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**order_id** | **String** | ID of the order that needs to be deleted | [required] | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_inventory + +> ::std::collections::HashMap get_inventory() +Returns pet inventories by status + +Returns a map of status codes to quantities + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +**::std::collections::HashMap** + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_order_by_id + +> crate::models::Order get_order_by_id(order_id) +Find purchase order by ID + +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**order_id** | **i64** | ID of pet that needs to be fetched | [required] | + +### Return type + +[**crate::models::Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## place_order + +> crate::models::Order place_order(order) +Place an order for a pet + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**order** | [**Order**](Order.md) | order placed for purchasing the pet | [required] | + +### Return type + +[**crate::models::Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: 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/rust/reqwest/petstore-async-middleware/docs/Tag.md b/samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/Tag.md new file mode 100644 index 0000000000..7bf71ab0e9 --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/Tag.md @@ -0,0 +1,12 @@ +# Tag + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | Option<**i64**> | | [optional] +**name** | Option<**String**> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/TestingApi.md b/samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/TestingApi.md new file mode 100644 index 0000000000..ca0c06e06a --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/TestingApi.md @@ -0,0 +1,60 @@ +# \TestingApi + +All URIs are relative to *http://petstore.swagger.io/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**tests_file_response_get**](TestingApi.md#tests_file_response_get) | **GET** /tests/fileResponse | Returns an image file +[**tests_type_testing_get**](TestingApi.md#tests_type_testing_get) | **GET** /tests/typeTesting | Route to test the TypeTesting schema + + + +## tests_file_response_get + +> std::path::PathBuf tests_file_response_get() +Returns an image file + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**std::path::PathBuf**](std::path::PathBuf.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: image/jpeg + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## tests_type_testing_get + +> crate::models::TypeTesting tests_type_testing_get() +Route to test the TypeTesting schema + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**crate::models::TypeTesting**](TypeTesting.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/TypeTesting.md b/samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/TypeTesting.md new file mode 100644 index 0000000000..6beca6dbac --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/TypeTesting.md @@ -0,0 +1,17 @@ +# TypeTesting + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**int32** | **i32** | | +**int64** | **i64** | | +**float** | **f32** | | +**double** | **f64** | | +**string** | **String** | | +**boolean** | **bool** | | +**uuid** | [**uuid::Uuid**](uuid::Uuid.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/User.md b/samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/User.md new file mode 100644 index 0000000000..2e6abda42b --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/User.md @@ -0,0 +1,18 @@ +# User + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | Option<**i64**> | | [optional] +**username** | Option<**String**> | | [optional] +**first_name** | Option<**String**> | | [optional] +**last_name** | Option<**String**> | | [optional] +**email** | Option<**String**> | | [optional] +**password** | Option<**String**> | | [optional] +**phone** | Option<**String**> | | [optional] +**user_status** | Option<**i32**> | User Status | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/UserApi.md b/samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/UserApi.md new file mode 100644 index 0000000000..03693014b9 --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async-middleware/docs/UserApi.md @@ -0,0 +1,255 @@ +# \UserApi + +All URIs are relative to *http://petstore.swagger.io/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_user**](UserApi.md#create_user) | **POST** /user | Create user +[**create_users_with_array_input**](UserApi.md#create_users_with_array_input) | **POST** /user/createWithArray | Creates list of users with given input array +[**create_users_with_list_input**](UserApi.md#create_users_with_list_input) | **POST** /user/createWithList | Creates list of users with given input array +[**delete_user**](UserApi.md#delete_user) | **DELETE** /user/{username} | Delete user +[**get_user_by_name**](UserApi.md#get_user_by_name) | **GET** /user/{username} | Get user by user name +[**login_user**](UserApi.md#login_user) | **GET** /user/login | Logs user into the system +[**logout_user**](UserApi.md#logout_user) | **GET** /user/logout | Logs out current logged in user session +[**update_user**](UserApi.md#update_user) | **PUT** /user/{username} | Updated user + + + +## create_user + +> create_user(user) +Create user + +This can only be done by the logged in user. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**user** | [**User**](User.md) | Created user object | [required] | + +### Return type + + (empty response body) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## create_users_with_array_input + +> create_users_with_array_input(user) +Creates list of users with given input array + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**user** | [**Vec**](User.md) | List of user object | [required] | + +### Return type + + (empty response body) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## create_users_with_list_input + +> create_users_with_list_input(user) +Creates list of users with given input array + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**user** | [**Vec**](User.md) | List of user object | [required] | + +### Return type + + (empty response body) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## delete_user + +> delete_user(username) +Delete user + +This can only be done by the logged in user. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**username** | **String** | The name that needs to be deleted | [required] | + +### Return type + + (empty response body) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## get_user_by_name + +> crate::models::User get_user_by_name(username) +Get user by user name + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**username** | **String** | The name that needs to be fetched. Use user1 for testing. | [required] | + +### Return type + +[**crate::models::User**](User.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## login_user + +> String login_user(username, password) +Logs user into the system + + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**username** | **String** | The user name for login | [required] | +**password** | **String** | The password for login in clear text | [required] | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## logout_user + +> logout_user() +Logs out current logged in user session + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + + (empty response body) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +## update_user + +> update_user(username, user) +Updated user + +This can only be done by the logged in user. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**username** | **String** | name that need to be deleted | [required] | +**user** | [**User**](User.md) | Updated user object | [required] | + +### Return type + + (empty response body) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/rust/reqwest/petstore-async-middleware/git_push.sh b/samples/client/petstore/rust/reqwest/petstore-async-middleware/git_push.sh new file mode 100644 index 0000000000..f53a75d4fa --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async-middleware/git_push.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/apis/configuration.rs b/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/apis/configuration.rs new file mode 100644 index 0000000000..5c15632ff7 --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/apis/configuration.rs @@ -0,0 +1,53 @@ +/* + * OpenAPI Petstore + * + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + + +#[derive(Debug, Clone)] +pub struct Configuration { + pub base_path: String, + pub user_agent: Option, + pub client: reqwest_middleware::ClientWithMiddleware, + pub basic_auth: Option, + pub oauth_access_token: Option, + pub bearer_access_token: Option, + pub api_key: Option, + // TODO: take an oauth2 token source, similar to the go one +} + +pub type BasicAuth = (String, Option); + +#[derive(Debug, Clone)] +pub struct ApiKey { + pub prefix: Option, + pub key: String, +} + + +impl Configuration { + pub fn new() -> Configuration { + Configuration::default() + } +} + +impl Default for Configuration { + fn default() -> Self { + Configuration { + base_path: "http://petstore.swagger.io/v2".to_owned(), + user_agent: Some("OpenAPI-Generator/1.0.0/rust".to_owned()), + client: reqwest_middleware::ClientBuilder::new(reqwest::Client::new()).build(), + basic_auth: None, + oauth_access_token: None, + bearer_access_token: None, + api_key: None, + + } + } +} diff --git a/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/apis/fake_api.rs b/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/apis/fake_api.rs new file mode 100644 index 0000000000..d457ee3888 --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/apis/fake_api.rs @@ -0,0 +1,89 @@ +/* + * OpenAPI Petstore + * + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; + +use crate::apis::ResponseContent; +use super::{Error, configuration}; + +/// struct for passing parameters to the method [`test_nullable_required_param`] +#[derive(Clone, Debug, Default)] +pub struct TestNullableRequiredParamParams { + /// The name that needs to be fetched. Use user1 for testing. + pub username: String, + /// To test nullable required parameters + pub dummy_required_nullable_param: Option, + /// To test parameter names in upper case + pub uppercase: Option +} + + +/// struct for typed successes of method [`test_nullable_required_param`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum TestNullableRequiredParamSuccess { + Status200(), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`test_nullable_required_param`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum TestNullableRequiredParamError { + Status400(), + Status404(), + UnknownValue(serde_json::Value), +} + + +/// +pub async fn test_nullable_required_param(configuration: &configuration::Configuration, params: TestNullableRequiredParamParams) -> Result, Error> { + let local_var_configuration = configuration; + + // unbox the parameters + let username = params.username; + let dummy_required_nullable_param = params.dummy_required_nullable_param; + let uppercase = params.uppercase; + + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/fake/user/{username}", local_var_configuration.base_path, username=crate::apis::urlencode(username)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + match dummy_required_nullable_param { + Some(local_var_param_value) => { local_var_req_builder = local_var_req_builder.header("dummy_required_nullable_param", local_var_param_value.to_string()); }, + None => { local_var_req_builder = local_var_req_builder.header("dummy_required_nullable_param", ""); }, + } + if let Some(local_var_param_value) = uppercase { + local_var_req_builder = local_var_req_builder.header("UPPERCASE", local_var_param_value.to_string()); + } + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Ok(local_var_result) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + diff --git a/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/apis/mod.rs b/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/apis/mod.rs new file mode 100644 index 0000000000..80399c6060 --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/apis/mod.rs @@ -0,0 +1,79 @@ +use std::error; +use std::fmt; + +#[derive(Debug, Clone)] +pub struct ResponseContent { + pub status: reqwest::StatusCode, + pub content: String, + pub entity: Option, +} + +#[derive(Debug)] +pub enum Error { + Reqwest(reqwest::Error), + ReqwestMiddleware(reqwest_middleware::Error), + Serde(serde_json::Error), + Io(std::io::Error), + ResponseError(ResponseContent), +} + +impl fmt::Display for Error { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let (module, e) = match self { + Error::Reqwest(e) => ("reqwest", e.to_string()), + Error::ReqwestMiddleware(e) => ("reqwest-middleware", e.to_string()), + Error::Serde(e) => ("serde", e.to_string()), + Error::Io(e) => ("IO", e.to_string()), + Error::ResponseError(e) => ("response", format!("status code {}", e.status)), + }; + write!(f, "error in {}: {}", module, e) + } +} + +impl error::Error for Error { + fn source(&self) -> Option<&(dyn error::Error + 'static)> { + Some(match self { + Error::Reqwest(e) => e, + Error::ReqwestMiddleware(e) => e, + Error::Serde(e) => e, + Error::Io(e) => e, + Error::ResponseError(_) => return None, + }) + } +} + +impl From for Error { + fn from(e: reqwest::Error) -> Self { + Error::Reqwest(e) + } +} + +impl From for Error { + fn from(e: reqwest_middleware::Error) -> Self { + Error::ReqwestMiddleware(e) + } +} + +impl From for Error { + fn from(e: serde_json::Error) -> Self { + Error::Serde(e) + } +} + +impl From for Error { + fn from(e: std::io::Error) -> Self { + Error::Io(e) + } +} + +pub fn urlencode>(s: T) -> String { + ::url::form_urlencoded::byte_serialize(s.as_ref().as_bytes()).collect() +} + +pub mod fake_api; +pub mod pet_api; +pub mod store_api; +pub mod testing_api; +pub mod user_api; + +pub mod configuration; diff --git a/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/apis/pet_api.rs b/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/apis/pet_api.rs new file mode 100644 index 0000000000..977d79edcf --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/apis/pet_api.rs @@ -0,0 +1,544 @@ +/* + * OpenAPI Petstore + * + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; + +use crate::apis::ResponseContent; +use super::{Error, configuration}; + +/// struct for passing parameters to the method [`add_pet`] +#[derive(Clone, Debug, Default)] +pub struct AddPetParams { + /// Pet object that needs to be added to the store + pub pet: crate::models::Pet +} + +/// struct for passing parameters to the method [`delete_pet`] +#[derive(Clone, Debug, Default)] +pub struct DeletePetParams { + /// Pet id to delete + pub pet_id: i64, + pub api_key: Option +} + +/// struct for passing parameters to the method [`find_pets_by_status`] +#[derive(Clone, Debug, Default)] +pub struct FindPetsByStatusParams { + /// Status values that need to be considered for filter + pub status: Vec +} + +/// struct for passing parameters to the method [`find_pets_by_tags`] +#[derive(Clone, Debug, Default)] +pub struct FindPetsByTagsParams { + /// Tags to filter by + pub tags: Vec +} + +/// struct for passing parameters to the method [`get_pet_by_id`] +#[derive(Clone, Debug, Default)] +pub struct GetPetByIdParams { + /// ID of pet to return + pub pet_id: i64 +} + +/// struct for passing parameters to the method [`update_pet`] +#[derive(Clone, Debug, Default)] +pub struct UpdatePetParams { + /// Pet object that needs to be added to the store + pub pet: crate::models::Pet +} + +/// struct for passing parameters to the method [`update_pet_with_form`] +#[derive(Clone, Debug, Default)] +pub struct UpdatePetWithFormParams { + /// ID of pet that needs to be updated + pub pet_id: i64, + /// Updated name of the pet + pub name: Option, + /// Updated status of the pet + pub status: Option +} + +/// struct for passing parameters to the method [`upload_file`] +#[derive(Clone, Debug, Default)] +pub struct UploadFileParams { + /// ID of pet to update + pub pet_id: i64, + /// Additional data to pass to server + pub additional_metadata: Option, + /// file to upload + pub file: Option +} + + +/// struct for typed successes of method [`add_pet`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AddPetSuccess { + Status200(crate::models::Pet), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`delete_pet`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeletePetSuccess { + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`find_pets_by_status`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum FindPetsByStatusSuccess { + Status200(Vec), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`find_pets_by_tags`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum FindPetsByTagsSuccess { + Status200(Vec), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`get_pet_by_id`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetPetByIdSuccess { + Status200(crate::models::Pet), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`update_pet`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdatePetSuccess { + Status200(crate::models::Pet), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`update_pet_with_form`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdatePetWithFormSuccess { + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`upload_file`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UploadFileSuccess { + Status200(crate::models::ApiResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`add_pet`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AddPetError { + Status405(), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`delete_pet`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeletePetError { + Status400(), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`find_pets_by_status`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum FindPetsByStatusError { + Status400(), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`find_pets_by_tags`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum FindPetsByTagsError { + Status400(), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_pet_by_id`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetPetByIdError { + Status400(), + Status404(), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`update_pet`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdatePetError { + Status400(), + Status404(), + Status405(), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`update_pet_with_form`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdatePetWithFormError { + Status405(), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`upload_file`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UploadFileError { + UnknownValue(serde_json::Value), +} + + +/// +pub async fn add_pet(configuration: &configuration::Configuration, params: AddPetParams) -> Result, Error> { + let local_var_configuration = configuration; + + // unbox the parameters + let pet = params.pet; + + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/pet", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&pet); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Ok(local_var_result) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// +pub async fn delete_pet(configuration: &configuration::Configuration, params: DeletePetParams) -> Result, Error> { + let local_var_configuration = configuration; + + // unbox the parameters + let pet_id = params.pet_id; + let api_key = params.api_key; + + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/pet/{petId}", local_var_configuration.base_path, petId=pet_id); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(local_var_param_value) = api_key { + local_var_req_builder = local_var_req_builder.header("api_key", local_var_param_value.to_string()); + } + if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Ok(local_var_result) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Multiple status values can be provided with comma separated strings +pub async fn find_pets_by_status(configuration: &configuration::Configuration, params: FindPetsByStatusParams) -> Result, Error> { + let local_var_configuration = configuration; + + // unbox the parameters + let status = params.status; + + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/pet/findByStatus", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = match "csv" { + "multi" => local_var_req_builder.query(&status.into_iter().map(|p| ("status".to_owned(), p)).collect::>()), + _ => local_var_req_builder.query(&[("status", &status.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]), + }; + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Ok(local_var_result) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. +pub async fn find_pets_by_tags(configuration: &configuration::Configuration, params: FindPetsByTagsParams) -> Result, Error> { + let local_var_configuration = configuration; + + // unbox the parameters + let tags = params.tags; + + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/pet/findByTags", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = match "csv" { + "multi" => local_var_req_builder.query(&tags.into_iter().map(|p| ("tags".to_owned(), p)).collect::>()), + _ => local_var_req_builder.query(&[("tags", &tags.into_iter().map(|p| p.to_string()).collect::>().join(",").to_string())]), + }; + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Ok(local_var_result) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Returns a single pet +pub async fn get_pet_by_id(configuration: &configuration::Configuration, params: GetPetByIdParams) -> Result, Error> { + let local_var_configuration = configuration; + + // unbox the parameters + let pet_id = params.pet_id; + + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/pet/{petId}", local_var_configuration.base_path, petId=pet_id); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("api_key", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Ok(local_var_result) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// +pub async fn update_pet(configuration: &configuration::Configuration, params: UpdatePetParams) -> Result, Error> { + let local_var_configuration = configuration; + + // unbox the parameters + let pet = params.pet; + + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/pet", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + local_var_req_builder = local_var_req_builder.json(&pet); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Ok(local_var_result) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// +pub async fn update_pet_with_form(configuration: &configuration::Configuration, params: UpdatePetWithFormParams) -> Result, Error> { + let local_var_configuration = configuration; + + // unbox the parameters + let pet_id = params.pet_id; + let name = params.name; + let status = params.status; + + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/pet/{petId}", local_var_configuration.base_path, petId=pet_id); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + let mut local_var_form_params = std::collections::HashMap::new(); + if let Some(local_var_param_value) = name { + local_var_form_params.insert("name", local_var_param_value.to_string()); + } + if let Some(local_var_param_value) = status { + local_var_form_params.insert("status", local_var_param_value.to_string()); + } + local_var_req_builder = local_var_req_builder.form(&local_var_form_params); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Ok(local_var_result) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// +pub async fn upload_file(configuration: &configuration::Configuration, params: UploadFileParams) -> Result, Error> { + let local_var_configuration = configuration; + + // unbox the parameters + let pet_id = params.pet_id; + let additional_metadata = params.additional_metadata; + let file = params.file; + + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/pet/{petId}/uploadImage", local_var_configuration.base_path, petId=pet_id); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { + local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + }; + let mut local_var_form = reqwest::multipart::Form::new(); + if let Some(local_var_param_value) = additional_metadata { + local_var_form = local_var_form.text("additionalMetadata", local_var_param_value.to_string()); + } + // TODO: support file upload for 'file' parameter + local_var_req_builder = local_var_req_builder.multipart(local_var_form); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Ok(local_var_result) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + diff --git a/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/apis/store_api.rs b/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/apis/store_api.rs new file mode 100644 index 0000000000..ace7bc24e8 --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/apis/store_api.rs @@ -0,0 +1,247 @@ +/* + * OpenAPI Petstore + * + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; + +use crate::apis::ResponseContent; +use super::{Error, configuration}; + +/// struct for passing parameters to the method [`delete_order`] +#[derive(Clone, Debug, Default)] +pub struct DeleteOrderParams { + /// ID of the order that needs to be deleted + pub order_id: String +} + +/// struct for passing parameters to the method [`get_order_by_id`] +#[derive(Clone, Debug, Default)] +pub struct GetOrderByIdParams { + /// ID of pet that needs to be fetched + pub order_id: i64 +} + +/// struct for passing parameters to the method [`place_order`] +#[derive(Clone, Debug, Default)] +pub struct PlaceOrderParams { + /// order placed for purchasing the pet + pub order: crate::models::Order +} + + +/// struct for typed successes of method [`delete_order`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteOrderSuccess { + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`get_inventory`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetInventorySuccess { + Status200(::std::collections::HashMap), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`get_order_by_id`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetOrderByIdSuccess { + Status200(crate::models::Order), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`place_order`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum PlaceOrderSuccess { + Status200(crate::models::Order), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`delete_order`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteOrderError { + Status400(), + Status404(), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_inventory`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetInventoryError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_order_by_id`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetOrderByIdError { + Status400(), + Status404(), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`place_order`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum PlaceOrderError { + Status400(), + UnknownValue(serde_json::Value), +} + + +/// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors +pub async fn delete_order(configuration: &configuration::Configuration, params: DeleteOrderParams) -> Result, Error> { + let local_var_configuration = configuration; + + // unbox the parameters + let order_id = params.order_id; + + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/store/order/{orderId}", local_var_configuration.base_path, orderId=crate::apis::urlencode(order_id)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Ok(local_var_result) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// Returns a map of status codes to quantities +pub async fn get_inventory(configuration: &configuration::Configuration) -> Result, Error> { + let local_var_configuration = configuration; + + // unbox the parameters + + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/store/inventory", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("api_key", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Ok(local_var_result) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions +pub async fn get_order_by_id(configuration: &configuration::Configuration, params: GetOrderByIdParams) -> Result, Error> { + let local_var_configuration = configuration; + + // unbox the parameters + let order_id = params.order_id; + + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/store/order/{orderId}", local_var_configuration.base_path, orderId=order_id); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Ok(local_var_result) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// +pub async fn place_order(configuration: &configuration::Configuration, params: PlaceOrderParams) -> Result, Error> { + let local_var_configuration = configuration; + + // unbox the parameters + let order = params.order; + + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/store/order", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + local_var_req_builder = local_var_req_builder.json(&order); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Ok(local_var_result) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + diff --git a/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/apis/testing_api.rs b/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/apis/testing_api.rs new file mode 100644 index 0000000000..98f2fa1562 --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/apis/testing_api.rs @@ -0,0 +1,112 @@ +/* + * OpenAPI Petstore + * + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; + +use crate::apis::ResponseContent; +use super::{Error, configuration}; + + +/// struct for typed successes of method [`tests_file_response_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum TestsFileResponseGetSuccess { + Status200(std::path::PathBuf), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`tests_type_testing_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum TestsTypeTestingGetSuccess { + Status200(crate::models::TypeTesting), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`tests_file_response_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum TestsFileResponseGetError { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`tests_type_testing_get`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum TestsTypeTestingGetError { + UnknownValue(serde_json::Value), +} + + +pub async fn tests_file_response_get(configuration: &configuration::Configuration) -> Result, Error> { + let local_var_configuration = configuration; + + // unbox the parameters + + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/tests/fileResponse", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Ok(local_var_result) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +pub async fn tests_type_testing_get(configuration: &configuration::Configuration) -> Result, Error> { + let local_var_configuration = configuration; + + // unbox the parameters + + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/tests/typeTesting", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Ok(local_var_result) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + diff --git a/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/apis/user_api.rs b/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/apis/user_api.rs new file mode 100644 index 0000000000..616fad6738 --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/apis/user_api.rs @@ -0,0 +1,523 @@ +/* + * OpenAPI Petstore + * + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; + +use crate::apis::ResponseContent; +use super::{Error, configuration}; + +/// struct for passing parameters to the method [`create_user`] +#[derive(Clone, Debug, Default)] +pub struct CreateUserParams { + /// Created user object + pub user: crate::models::User +} + +/// struct for passing parameters to the method [`create_users_with_array_input`] +#[derive(Clone, Debug, Default)] +pub struct CreateUsersWithArrayInputParams { + /// List of user object + pub user: Vec +} + +/// struct for passing parameters to the method [`create_users_with_list_input`] +#[derive(Clone, Debug, Default)] +pub struct CreateUsersWithListInputParams { + /// List of user object + pub user: Vec +} + +/// struct for passing parameters to the method [`delete_user`] +#[derive(Clone, Debug, Default)] +pub struct DeleteUserParams { + /// The name that needs to be deleted + pub username: String +} + +/// struct for passing parameters to the method [`get_user_by_name`] +#[derive(Clone, Debug, Default)] +pub struct GetUserByNameParams { + /// The name that needs to be fetched. Use user1 for testing. + pub username: String +} + +/// struct for passing parameters to the method [`login_user`] +#[derive(Clone, Debug, Default)] +pub struct LoginUserParams { + /// The user name for login + pub username: String, + /// The password for login in clear text + pub password: String +} + +/// struct for passing parameters to the method [`update_user`] +#[derive(Clone, Debug, Default)] +pub struct UpdateUserParams { + /// name that need to be deleted + pub username: String, + /// Updated user object + pub user: crate::models::User +} + + +/// struct for typed successes of method [`create_user`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateUserSuccess { + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`create_users_with_array_input`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateUsersWithArrayInputSuccess { + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`create_users_with_list_input`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateUsersWithListInputSuccess { + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`delete_user`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteUserSuccess { + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`get_user_by_name`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetUserByNameSuccess { + Status200(crate::models::User), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`login_user`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum LoginUserSuccess { + Status200(String), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`logout_user`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum LogoutUserSuccess { + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`update_user`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateUserSuccess { + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`create_user`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateUserError { + DefaultResponse(), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`create_users_with_array_input`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateUsersWithArrayInputError { + DefaultResponse(), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`create_users_with_list_input`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateUsersWithListInputError { + DefaultResponse(), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`delete_user`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteUserError { + Status400(), + Status404(), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_user_by_name`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetUserByNameError { + Status400(), + Status404(), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`login_user`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum LoginUserError { + Status400(), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`logout_user`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum LogoutUserError { + DefaultResponse(), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`update_user`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateUserError { + Status400(), + Status404(), + UnknownValue(serde_json::Value), +} + + +/// This can only be done by the logged in user. +pub async fn create_user(configuration: &configuration::Configuration, params: CreateUserParams) -> Result, Error> { + let local_var_configuration = configuration; + + // unbox the parameters + let user = params.user; + + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/user", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("api_key", local_var_value); + }; + local_var_req_builder = local_var_req_builder.json(&user); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Ok(local_var_result) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// +pub async fn create_users_with_array_input(configuration: &configuration::Configuration, params: CreateUsersWithArrayInputParams) -> Result, Error> { + let local_var_configuration = configuration; + + // unbox the parameters + let user = params.user; + + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/user/createWithArray", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("api_key", local_var_value); + }; + local_var_req_builder = local_var_req_builder.json(&user); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Ok(local_var_result) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// +pub async fn create_users_with_list_input(configuration: &configuration::Configuration, params: CreateUsersWithListInputParams) -> Result, Error> { + let local_var_configuration = configuration; + + // unbox the parameters + let user = params.user; + + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/user/createWithList", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("api_key", local_var_value); + }; + local_var_req_builder = local_var_req_builder.json(&user); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Ok(local_var_result) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// This can only be done by the logged in user. +pub async fn delete_user(configuration: &configuration::Configuration, params: DeleteUserParams) -> Result, Error> { + let local_var_configuration = configuration; + + // unbox the parameters + let username = params.username; + + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/user/{username}", local_var_configuration.base_path, username=crate::apis::urlencode(username)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("api_key", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Ok(local_var_result) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// +pub async fn get_user_by_name(configuration: &configuration::Configuration, params: GetUserByNameParams) -> Result, Error> { + let local_var_configuration = configuration; + + // unbox the parameters + let username = params.username; + + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/user/{username}", local_var_configuration.base_path, username=crate::apis::urlencode(username)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Ok(local_var_result) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// +pub async fn login_user(configuration: &configuration::Configuration, params: LoginUserParams) -> Result, Error> { + let local_var_configuration = configuration; + + // unbox the parameters + let username = params.username; + let password = params.password; + + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/user/login", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + local_var_req_builder = local_var_req_builder.query(&[("username", &username.to_string())]); + local_var_req_builder = local_var_req_builder.query(&[("password", &password.to_string())]); + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Ok(local_var_result) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// +pub async fn logout_user(configuration: &configuration::Configuration) -> Result, Error> { + let local_var_configuration = configuration; + + // unbox the parameters + + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/user/logout", local_var_configuration.base_path); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("api_key", local_var_value); + }; + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Ok(local_var_result) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + +/// This can only be done by the logged in user. +pub async fn update_user(configuration: &configuration::Configuration, params: UpdateUserParams) -> Result, Error> { + let local_var_configuration = configuration; + + // unbox the parameters + let username = params.username; + let user = params.user; + + + let local_var_client = &local_var_configuration.client; + + let local_var_uri_str = format!("{}/user/{username}", local_var_configuration.base_path, username=crate::apis::urlencode(username)); + let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); + + if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { + local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); + } + if let Some(ref local_var_apikey) = local_var_configuration.api_key { + let local_var_key = local_var_apikey.key.clone(); + let local_var_value = match local_var_apikey.prefix { + Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), + None => local_var_key, + }; + local_var_req_builder = local_var_req_builder.header("api_key", local_var_value); + }; + local_var_req_builder = local_var_req_builder.json(&user); + + let local_var_req = local_var_req_builder.build()?; + let local_var_resp = local_var_client.execute(local_var_req).await?; + + let local_var_status = local_var_resp.status(); + let local_var_content = local_var_resp.text().await?; + + if !local_var_status.is_client_error() && !local_var_status.is_server_error() { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Ok(local_var_result) + } else { + let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); + let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; + Err(Error::ResponseError(local_var_error)) + } +} + diff --git a/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/lib.rs b/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/lib.rs new file mode 100644 index 0000000000..c1dd666f79 --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/lib.rs @@ -0,0 +1,10 @@ +#[macro_use] +extern crate serde_derive; + +extern crate serde; +extern crate serde_json; +extern crate url; +extern crate reqwest; + +pub mod apis; +pub mod models; diff --git a/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/models/action_container.rs b/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/models/action_container.rs new file mode 100644 index 0000000000..32d925eed3 --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/models/action_container.rs @@ -0,0 +1,28 @@ +/* + * OpenAPI Petstore + * + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct ActionContainer { + #[serde(rename = "action")] + pub action: Box, +} + +impl ActionContainer { + pub fn new(action: crate::models::Baz) -> ActionContainer { + ActionContainer { + action: Box::new(action), + } + } +} + + diff --git a/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/models/api_response.rs b/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/models/api_response.rs new file mode 100644 index 0000000000..3ec5b4ae30 --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/models/api_response.rs @@ -0,0 +1,36 @@ +/* + * OpenAPI Petstore + * + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +/// ApiResponse : Describes the result of uploading an image resource + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct ApiResponse { + #[serde(rename = "code", skip_serializing_if = "Option::is_none")] + pub code: Option, + #[serde(rename = "type", skip_serializing_if = "Option::is_none")] + pub r#type: Option, + #[serde(rename = "message", skip_serializing_if = "Option::is_none")] + pub message: Option, +} + +impl ApiResponse { + /// Describes the result of uploading an image resource + pub fn new() -> ApiResponse { + ApiResponse { + code: None, + r#type: None, + message: None, + } + } +} + + diff --git a/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/models/baz.rs b/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/models/baz.rs new file mode 100644 index 0000000000..94f8c5aa6a --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/models/baz.rs @@ -0,0 +1,43 @@ +/* + * OpenAPI Petstore + * + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +/// Baz : Test handling of empty variants + +/// Test handling of empty variants +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum Baz { + #[serde(rename = "A")] + A, + #[serde(rename = "B")] + B, + #[serde(rename = "")] + Empty, + +} + +impl ToString for Baz { + fn to_string(&self) -> String { + match self { + Self::A => String::from("A"), + Self::B => String::from("B"), + Self::Empty => String::from(""), + } + } +} + +impl Default for Baz { + fn default() -> Baz { + Self::A + } +} + + + + diff --git a/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/models/category.rs b/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/models/category.rs new file mode 100644 index 0000000000..750bdeddd6 --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/models/category.rs @@ -0,0 +1,33 @@ +/* + * OpenAPI Petstore + * + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +/// Category : A category for a pet + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct Category { + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, +} + +impl Category { + /// A category for a pet + pub fn new() -> Category { + Category { + id: None, + name: None, + } + } +} + + diff --git a/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/models/mod.rs b/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/models/mod.rs new file mode 100644 index 0000000000..c528fd499b --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/models/mod.rs @@ -0,0 +1,24 @@ +pub mod action_container; +pub use self::action_container::ActionContainer; +pub mod api_response; +pub use self::api_response::ApiResponse; +pub mod baz; +pub use self::baz::Baz; +pub mod category; +pub use self::category::Category; +pub mod optional_testing; +pub use self::optional_testing::OptionalTesting; +pub mod order; +pub use self::order::Order; +pub mod pet; +pub use self::pet::Pet; +pub mod property_test; +pub use self::property_test::PropertyTest; +pub mod model_return; +pub use self::model_return::Return; +pub mod tag; +pub use self::tag::Tag; +pub mod type_testing; +pub use self::type_testing::TypeTesting; +pub mod user; +pub use self::user::User; diff --git a/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/models/model_return.rs b/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/models/model_return.rs new file mode 100644 index 0000000000..5deb3e5ee1 --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/models/model_return.rs @@ -0,0 +1,36 @@ +/* + * OpenAPI Petstore + * + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +/// Return : Test using keywords + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct Return { + #[serde(rename = "match", skip_serializing_if = "Option::is_none")] + pub r#match: Option, + #[serde(rename = "async", skip_serializing_if = "Option::is_none")] + pub r#async: Option, + #[serde(rename = "super", skip_serializing_if = "Option::is_none")] + pub param_super: Option, +} + +impl Return { + /// Test using keywords + pub fn new() -> Return { + Return { + r#match: None, + r#async: None, + param_super: None, + } + } +} + + diff --git a/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/models/optional_testing.rs b/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/models/optional_testing.rs new file mode 100644 index 0000000000..f966470fbc --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/models/optional_testing.rs @@ -0,0 +1,39 @@ +/* + * OpenAPI Petstore + * + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +/// OptionalTesting : Test handling of optional and nullable fields + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct OptionalTesting { + #[serde(rename = "optional_nonnull", skip_serializing_if = "Option::is_none")] + pub optional_nonnull: Option, + #[serde(rename = "required_nonnull")] + pub required_nonnull: String, + #[serde(rename = "optional_nullable", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub optional_nullable: Option>, + #[serde(rename = "required_nullable", deserialize_with = "Option::deserialize")] + pub required_nullable: Option, +} + +impl OptionalTesting { + /// Test handling of optional and nullable fields + pub fn new(required_nonnull: String, required_nullable: Option) -> OptionalTesting { + OptionalTesting { + optional_nonnull: None, + required_nonnull, + optional_nullable: None, + required_nullable, + } + } +} + + diff --git a/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/models/order.rs b/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/models/order.rs new file mode 100644 index 0000000000..66d211cb57 --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/models/order.rs @@ -0,0 +1,62 @@ +/* + * OpenAPI Petstore + * + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +/// Order : An order for a pets from the pet store + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct Order { + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "petId", skip_serializing_if = "Option::is_none")] + pub pet_id: Option, + #[serde(rename = "quantity", skip_serializing_if = "Option::is_none")] + pub quantity: Option, + #[serde(rename = "shipDate", skip_serializing_if = "Option::is_none")] + pub ship_date: Option, + /// Order Status + #[serde(rename = "status", skip_serializing_if = "Option::is_none")] + pub status: Option, + #[serde(rename = "complete", skip_serializing_if = "Option::is_none")] + pub complete: Option, +} + +impl Order { + /// An order for a pets from the pet store + pub fn new() -> Order { + Order { + id: None, + pet_id: None, + quantity: None, + ship_date: None, + status: None, + complete: None, + } + } +} + +/// Order Status +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum Status { + #[serde(rename = "placed")] + Placed, + #[serde(rename = "approved")] + Approved, + #[serde(rename = "delivered")] + Delivered, +} + +impl Default for Status { + fn default() -> Status { + Self::Placed + } +} + diff --git a/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/models/pet.rs b/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/models/pet.rs new file mode 100644 index 0000000000..af6c8b6ca5 --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/models/pet.rs @@ -0,0 +1,62 @@ +/* + * OpenAPI Petstore + * + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +/// Pet : A pet for sale in the pet store + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct Pet { + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "category", skip_serializing_if = "Option::is_none")] + pub category: Option>, + #[serde(rename = "name")] + pub name: String, + #[serde(rename = "photoUrls")] + pub photo_urls: Vec, + #[serde(rename = "tags", skip_serializing_if = "Option::is_none")] + pub tags: Option>, + /// pet status in the store + #[serde(rename = "status", skip_serializing_if = "Option::is_none")] + pub status: Option, +} + +impl Pet { + /// A pet for sale in the pet store + pub fn new(name: String, photo_urls: Vec) -> Pet { + Pet { + id: None, + category: None, + name, + photo_urls, + tags: None, + status: None, + } + } +} + +/// pet status in the store +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum Status { + #[serde(rename = "available")] + Available, + #[serde(rename = "pending")] + Pending, + #[serde(rename = "sold")] + Sold, +} + +impl Default for Status { + fn default() -> Status { + Self::Available + } +} + diff --git a/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/models/property_test.rs b/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/models/property_test.rs new file mode 100644 index 0000000000..1c3c4f3f3f --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/models/property_test.rs @@ -0,0 +1,30 @@ +/* + * OpenAPI Petstore + * + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +/// PropertyTest : A model to test various formats, e.g. UUID + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct PropertyTest { + #[serde(rename = "uuid", skip_serializing_if = "Option::is_none")] + pub uuid: Option, +} + +impl PropertyTest { + /// A model to test various formats, e.g. UUID + pub fn new() -> PropertyTest { + PropertyTest { + uuid: None, + } + } +} + + diff --git a/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/models/tag.rs b/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/models/tag.rs new file mode 100644 index 0000000000..b581302784 --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/models/tag.rs @@ -0,0 +1,33 @@ +/* + * OpenAPI Petstore + * + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +/// Tag : A tag for a pet + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct Tag { + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "name", skip_serializing_if = "Option::is_none")] + pub name: Option, +} + +impl Tag { + /// A tag for a pet + pub fn new() -> Tag { + Tag { + id: None, + name: None, + } + } +} + + diff --git a/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/models/type_testing.rs b/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/models/type_testing.rs new file mode 100644 index 0000000000..dda67915df --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/models/type_testing.rs @@ -0,0 +1,48 @@ +/* + * OpenAPI Petstore + * + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +/// TypeTesting : Test handling of different field data types + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct TypeTesting { + #[serde(rename = "int32")] + pub int32: i32, + #[serde(rename = "int64")] + pub int64: i64, + #[serde(rename = "float")] + pub float: f32, + #[serde(rename = "double")] + pub double: f64, + #[serde(rename = "string")] + pub string: String, + #[serde(rename = "boolean")] + pub boolean: bool, + #[serde(rename = "uuid")] + pub uuid: uuid::Uuid, +} + +impl TypeTesting { + /// Test handling of different field data types + pub fn new(int32: i32, int64: i64, float: f32, double: f64, string: String, boolean: bool, uuid: uuid::Uuid) -> TypeTesting { + TypeTesting { + int32, + int64, + float, + double, + string, + boolean, + uuid, + } + } +} + + diff --git a/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/models/user.rs b/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/models/user.rs new file mode 100644 index 0000000000..746cb571f4 --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/models/user.rs @@ -0,0 +1,52 @@ +/* + * OpenAPI Petstore + * + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +/// User : A User who is purchasing from the pet store + + + +#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] +pub struct User { + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "username", skip_serializing_if = "Option::is_none")] + pub username: Option, + #[serde(rename = "firstName", skip_serializing_if = "Option::is_none")] + pub first_name: Option, + #[serde(rename = "lastName", skip_serializing_if = "Option::is_none")] + pub last_name: Option, + #[serde(rename = "email", skip_serializing_if = "Option::is_none")] + pub email: Option, + #[serde(rename = "password", skip_serializing_if = "Option::is_none")] + pub password: Option, + #[serde(rename = "phone", skip_serializing_if = "Option::is_none")] + pub phone: Option, + /// User Status + #[serde(rename = "userStatus", skip_serializing_if = "Option::is_none")] + pub user_status: Option, +} + +impl User { + /// A User who is purchasing from the pet store + pub fn new() -> User { + User { + id: None, + username: None, + first_name: None, + last_name: None, + email: None, + password: None, + phone: None, + user_status: None, + } + } +} + + diff --git a/samples/client/petstore/rust/reqwest/petstore-async/src/apis/configuration.rs b/samples/client/petstore/rust/reqwest/petstore-async/src/apis/configuration.rs index 15fd27ae84..ba335d974c 100644 --- a/samples/client/petstore/rust/reqwest/petstore-async/src/apis/configuration.rs +++ b/samples/client/petstore/rust/reqwest/petstore-async/src/apis/configuration.rs @@ -9,8 +9,6 @@ */ -use reqwest; - #[derive(Debug, Clone)] pub struct Configuration { diff --git a/samples/client/petstore/rust/reqwest/petstore-awsv4signature/src/apis/configuration.rs b/samples/client/petstore/rust/reqwest/petstore-awsv4signature/src/apis/configuration.rs index e5cd2e5236..3e10cc7c35 100644 --- a/samples/client/petstore/rust/reqwest/petstore-awsv4signature/src/apis/configuration.rs +++ b/samples/client/petstore/rust/reqwest/petstore-awsv4signature/src/apis/configuration.rs @@ -9,8 +9,6 @@ */ -use reqwest; - use std::time::SystemTime; use aws_sigv4::http_request::{sign, SigningSettings, SigningParams, SignableRequest}; use http; diff --git a/samples/client/petstore/rust/reqwest/petstore/src/apis/configuration.rs b/samples/client/petstore/rust/reqwest/petstore/src/apis/configuration.rs index 15fd27ae84..ba335d974c 100644 --- a/samples/client/petstore/rust/reqwest/petstore/src/apis/configuration.rs +++ b/samples/client/petstore/rust/reqwest/petstore/src/apis/configuration.rs @@ -9,8 +9,6 @@ */ -use reqwest; - #[derive(Debug, Clone)] pub struct Configuration { diff --git a/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Converters/CustomEnumConverter.cs b/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Converters/CustomEnumConverter.cs new file mode 100644 index 0000000000..00b75a3cc7 --- /dev/null +++ b/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Converters/CustomEnumConverter.cs @@ -0,0 +1,42 @@ +using System; +using System.ComponentModel; +using System.Globalization; +using Newtonsoft.Json; + +namespace Org.OpenAPITools.Converters +{ + /// + /// Custom string to enum converter + /// + public class CustomEnumConverter : TypeConverter + { + /// + /// Determine if we can convert a type to an enum + /// + /// + /// + /// + public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) + { + return sourceType == typeof(string) || base.CanConvertFrom(context, sourceType); + } + + /// + /// Convert from a type value to an enum + /// + /// + /// + /// + /// + public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) + { + var s = value as string; + if (string.IsNullOrEmpty(s)) + { + return null; + } + + return JsonConvert.DeserializeObject(@"""" + value.ToString() + @""""); + } + } +} diff --git a/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Models/ApiResponse.cs b/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Models/ApiResponse.cs new file mode 100644 index 0000000000..7573feaf41 --- /dev/null +++ b/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Models/ApiResponse.cs @@ -0,0 +1,147 @@ +/* + * OpenAPI Petstore + * + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +using System; +using System.Linq; +using System.Text; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Org.OpenAPITools.Converters; + +namespace Org.OpenAPITools.Models +{ + /// + /// Describes the result of uploading an image resource + /// + [DataContract] + public partial class ApiResponse : IEquatable + { + /// + /// Gets or Sets Code + /// + [DataMember(Name="code", EmitDefaultValue=true)] + public int Code { get; set; } + + /// + /// Gets or Sets Type + /// + [DataMember(Name="type", EmitDefaultValue=false)] + public string Type { get; set; } + + /// + /// Gets or Sets Message + /// + [DataMember(Name="message", EmitDefaultValue=false)] + public string Message { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ApiResponse {\n"); + sb.Append(" Code: ").Append(Code).Append("\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Message: ").Append(Message).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + if (obj is null) return false; + if (ReferenceEquals(this, obj)) return true; + return obj.GetType() == GetType() && Equals((ApiResponse)obj); + } + + /// + /// Returns true if ApiResponse instances are equal + /// + /// Instance of ApiResponse to be compared + /// Boolean + public bool Equals(ApiResponse other) + { + if (other is null) return false; + if (ReferenceEquals(this, other)) return true; + + return + ( + Code == other.Code || + + Code.Equals(other.Code) + ) && + ( + Type == other.Type || + Type != null && + Type.Equals(other.Type) + ) && + ( + Message == other.Message || + Message != null && + Message.Equals(other.Message) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + var hashCode = 41; + // Suitable nullity checks etc, of course :) + + hashCode = hashCode * 59 + Code.GetHashCode(); + if (Type != null) + hashCode = hashCode * 59 + Type.GetHashCode(); + if (Message != null) + hashCode = hashCode * 59 + Message.GetHashCode(); + return hashCode; + } + } + + #region Operators + #pragma warning disable 1591 + + public static bool operator ==(ApiResponse left, ApiResponse right) + { + return Equals(left, right); + } + + public static bool operator !=(ApiResponse left, ApiResponse right) + { + return !Equals(left, right); + } + + #pragma warning restore 1591 + #endregion Operators + } +} diff --git a/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Models/Category.cs b/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Models/Category.cs new file mode 100644 index 0000000000..0d63dc9d7e --- /dev/null +++ b/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Models/Category.cs @@ -0,0 +1,134 @@ +/* + * OpenAPI Petstore + * + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +using System; +using System.Linq; +using System.Text; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Org.OpenAPITools.Converters; + +namespace Org.OpenAPITools.Models +{ + /// + /// A category for a pet + /// + [DataContract] + public partial class Category : IEquatable + { + /// + /// Gets or Sets Id + /// + [DataMember(Name="id", EmitDefaultValue=true)] + public long Id { get; set; } + + /// + /// Gets or Sets Name + /// + [RegularExpression("^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$")] + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Category {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + if (obj is null) return false; + if (ReferenceEquals(this, obj)) return true; + return obj.GetType() == GetType() && Equals((Category)obj); + } + + /// + /// Returns true if Category instances are equal + /// + /// Instance of Category to be compared + /// Boolean + public bool Equals(Category other) + { + if (other is null) return false; + if (ReferenceEquals(this, other)) return true; + + return + ( + Id == other.Id || + + Id.Equals(other.Id) + ) && + ( + Name == other.Name || + Name != null && + Name.Equals(other.Name) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + var hashCode = 41; + // Suitable nullity checks etc, of course :) + + hashCode = hashCode * 59 + Id.GetHashCode(); + if (Name != null) + hashCode = hashCode * 59 + Name.GetHashCode(); + return hashCode; + } + } + + #region Operators + #pragma warning disable 1591 + + public static bool operator ==(Category left, Category right) + { + return Equals(left, right); + } + + public static bool operator !=(Category left, Category right) + { + return !Equals(left, right); + } + + #pragma warning restore 1591 + #endregion Operators + } +} diff --git a/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Models/Order.cs b/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Models/Order.cs new file mode 100644 index 0000000000..1d97257926 --- /dev/null +++ b/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Models/Order.cs @@ -0,0 +1,219 @@ +/* + * OpenAPI Petstore + * + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +using System; +using System.Linq; +using System.Text; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Org.OpenAPITools.Converters; + +namespace Org.OpenAPITools.Models +{ + /// + /// An order for a pets from the pet store + /// + [DataContract] + public partial class Order : IEquatable + { + /// + /// Gets or Sets Id + /// + [DataMember(Name="id", EmitDefaultValue=true)] + public long Id { get; set; } + + /// + /// Gets or Sets PetId + /// + [DataMember(Name="petId", EmitDefaultValue=true)] + public long PetId { get; set; } + + /// + /// Gets or Sets Quantity + /// + [DataMember(Name="quantity", EmitDefaultValue=true)] + public int Quantity { get; set; } + + /// + /// Gets or Sets ShipDate + /// + [DataMember(Name="shipDate", EmitDefaultValue=false)] + public DateTime ShipDate { get; set; } + + + /// + /// Order Status + /// + /// Order Status + [TypeConverter(typeof(CustomEnumConverter))] + [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + public enum StatusEnum + { + + /// + /// Enum PlacedEnum for placed + /// + [EnumMember(Value = "placed")] + PlacedEnum = 1, + + /// + /// Enum ApprovedEnum for approved + /// + [EnumMember(Value = "approved")] + ApprovedEnum = 2, + + /// + /// Enum DeliveredEnum for delivered + /// + [EnumMember(Value = "delivered")] + DeliveredEnum = 3 + } + + /// + /// Order Status + /// + /// Order Status + [DataMember(Name="status", EmitDefaultValue=true)] + public StatusEnum Status { get; set; } + + /// + /// Gets or Sets Complete + /// + [DataMember(Name="complete", EmitDefaultValue=true)] + public bool Complete { get; set; } = false; + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Order {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" PetId: ").Append(PetId).Append("\n"); + sb.Append(" Quantity: ").Append(Quantity).Append("\n"); + sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" Complete: ").Append(Complete).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + if (obj is null) return false; + if (ReferenceEquals(this, obj)) return true; + return obj.GetType() == GetType() && Equals((Order)obj); + } + + /// + /// Returns true if Order instances are equal + /// + /// Instance of Order to be compared + /// Boolean + public bool Equals(Order other) + { + if (other is null) return false; + if (ReferenceEquals(this, other)) return true; + + return + ( + Id == other.Id || + + Id.Equals(other.Id) + ) && + ( + PetId == other.PetId || + + PetId.Equals(other.PetId) + ) && + ( + Quantity == other.Quantity || + + Quantity.Equals(other.Quantity) + ) && + ( + ShipDate == other.ShipDate || + ShipDate != null && + ShipDate.Equals(other.ShipDate) + ) && + ( + Status == other.Status || + + Status.Equals(other.Status) + ) && + ( + Complete == other.Complete || + + Complete.Equals(other.Complete) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + var hashCode = 41; + // Suitable nullity checks etc, of course :) + + hashCode = hashCode * 59 + Id.GetHashCode(); + + hashCode = hashCode * 59 + PetId.GetHashCode(); + + hashCode = hashCode * 59 + Quantity.GetHashCode(); + if (ShipDate != null) + hashCode = hashCode * 59 + ShipDate.GetHashCode(); + + hashCode = hashCode * 59 + Status.GetHashCode(); + + hashCode = hashCode * 59 + Complete.GetHashCode(); + return hashCode; + } + } + + #region Operators + #pragma warning disable 1591 + + public static bool operator ==(Order left, Order right) + { + return Equals(left, right); + } + + public static bool operator !=(Order left, Order right) + { + return !Equals(left, right); + } + + #pragma warning restore 1591 + #endregion Operators + } +} diff --git a/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Models/Pet.cs b/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Models/Pet.cs new file mode 100644 index 0000000000..762279e4d6 --- /dev/null +++ b/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Models/Pet.cs @@ -0,0 +1,223 @@ +/* + * OpenAPI Petstore + * + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +using System; +using System.Linq; +using System.Text; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Org.OpenAPITools.Converters; + +namespace Org.OpenAPITools.Models +{ + /// + /// A pet for sale in the pet store + /// + [DataContract] + public partial class Pet : IEquatable + { + /// + /// Gets or Sets Id + /// + [DataMember(Name="id", EmitDefaultValue=true)] + public long Id { get; set; } + + /// + /// Gets or Sets Category + /// + [DataMember(Name="category", EmitDefaultValue=false)] + public Category Category { get; set; } + + /// + /// Gets or Sets Name + /// + [Required] + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// Gets or Sets PhotoUrls + /// + [Required] + [DataMember(Name="photoUrls", EmitDefaultValue=false)] + public List PhotoUrls { get; set; } + + /// + /// Gets or Sets Tags + /// + [DataMember(Name="tags", EmitDefaultValue=false)] + public List Tags { get; set; } + + + /// + /// pet status in the store + /// + /// pet status in the store + [TypeConverter(typeof(CustomEnumConverter))] + [JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + public enum StatusEnum + { + + /// + /// Enum AvailableEnum for available + /// + [EnumMember(Value = "available")] + AvailableEnum = 1, + + /// + /// Enum PendingEnum for pending + /// + [EnumMember(Value = "pending")] + PendingEnum = 2, + + /// + /// Enum SoldEnum for sold + /// + [EnumMember(Value = "sold")] + SoldEnum = 3 + } + + /// + /// pet status in the store + /// + /// pet status in the store + [DataMember(Name="status", EmitDefaultValue=true)] + public StatusEnum Status { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Pet {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Category: ").Append(Category).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" PhotoUrls: ").Append(PhotoUrls).Append("\n"); + sb.Append(" Tags: ").Append(Tags).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + if (obj is null) return false; + if (ReferenceEquals(this, obj)) return true; + return obj.GetType() == GetType() && Equals((Pet)obj); + } + + /// + /// Returns true if Pet instances are equal + /// + /// Instance of Pet to be compared + /// Boolean + public bool Equals(Pet other) + { + if (other is null) return false; + if (ReferenceEquals(this, other)) return true; + + return + ( + Id == other.Id || + + Id.Equals(other.Id) + ) && + ( + Category == other.Category || + Category != null && + Category.Equals(other.Category) + ) && + ( + Name == other.Name || + Name != null && + Name.Equals(other.Name) + ) && + ( + PhotoUrls == other.PhotoUrls || + PhotoUrls != null && + other.PhotoUrls != null && + PhotoUrls.SequenceEqual(other.PhotoUrls) + ) && + ( + Tags == other.Tags || + Tags != null && + other.Tags != null && + Tags.SequenceEqual(other.Tags) + ) && + ( + Status == other.Status || + + Status.Equals(other.Status) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + var hashCode = 41; + // Suitable nullity checks etc, of course :) + + hashCode = hashCode * 59 + Id.GetHashCode(); + if (Category != null) + hashCode = hashCode * 59 + Category.GetHashCode(); + if (Name != null) + hashCode = hashCode * 59 + Name.GetHashCode(); + if (PhotoUrls != null) + hashCode = hashCode * 59 + PhotoUrls.GetHashCode(); + if (Tags != null) + hashCode = hashCode * 59 + Tags.GetHashCode(); + + hashCode = hashCode * 59 + Status.GetHashCode(); + return hashCode; + } + } + + #region Operators + #pragma warning disable 1591 + + public static bool operator ==(Pet left, Pet right) + { + return Equals(left, right); + } + + public static bool operator !=(Pet left, Pet right) + { + return !Equals(left, right); + } + + #pragma warning restore 1591 + #endregion Operators + } +} diff --git a/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Models/Tag.cs b/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Models/Tag.cs new file mode 100644 index 0000000000..5153ae0c4b --- /dev/null +++ b/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Models/Tag.cs @@ -0,0 +1,133 @@ +/* + * OpenAPI Petstore + * + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +using System; +using System.Linq; +using System.Text; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Org.OpenAPITools.Converters; + +namespace Org.OpenAPITools.Models +{ + /// + /// A tag for a pet + /// + [DataContract] + public partial class Tag : IEquatable + { + /// + /// Gets or Sets Id + /// + [DataMember(Name="id", EmitDefaultValue=true)] + public long Id { get; set; } + + /// + /// Gets or Sets Name + /// + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Tag {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + if (obj is null) return false; + if (ReferenceEquals(this, obj)) return true; + return obj.GetType() == GetType() && Equals((Tag)obj); + } + + /// + /// Returns true if Tag instances are equal + /// + /// Instance of Tag to be compared + /// Boolean + public bool Equals(Tag other) + { + if (other is null) return false; + if (ReferenceEquals(this, other)) return true; + + return + ( + Id == other.Id || + + Id.Equals(other.Id) + ) && + ( + Name == other.Name || + Name != null && + Name.Equals(other.Name) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + var hashCode = 41; + // Suitable nullity checks etc, of course :) + + hashCode = hashCode * 59 + Id.GetHashCode(); + if (Name != null) + hashCode = hashCode * 59 + Name.GetHashCode(); + return hashCode; + } + } + + #region Operators + #pragma warning disable 1591 + + public static bool operator ==(Tag left, Tag right) + { + return Equals(left, right); + } + + public static bool operator !=(Tag left, Tag right) + { + return !Equals(left, right); + } + + #pragma warning restore 1591 + #endregion Operators + } +} diff --git a/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Models/User.cs b/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Models/User.cs new file mode 100644 index 0000000000..a64c031e61 --- /dev/null +++ b/samples/server/petstore/aspnetcore-6.0-project4Models/src/Org.OpenAPITools/Models/User.cs @@ -0,0 +1,218 @@ +/* + * OpenAPI Petstore + * + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +using System; +using System.Linq; +using System.Text; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Org.OpenAPITools.Converters; + +namespace Org.OpenAPITools.Models +{ + /// + /// A User who is purchasing from the pet store + /// + [DataContract] + public partial class User : IEquatable + { + /// + /// Gets or Sets Id + /// + [DataMember(Name="id", EmitDefaultValue=true)] + public long Id { get; set; } + + /// + /// Gets or Sets Username + /// + [DataMember(Name="username", EmitDefaultValue=false)] + public string Username { get; set; } + + /// + /// Gets or Sets FirstName + /// + [DataMember(Name="firstName", EmitDefaultValue=false)] + public string FirstName { get; set; } + + /// + /// Gets or Sets LastName + /// + [DataMember(Name="lastName", EmitDefaultValue=false)] + public string LastName { get; set; } + + /// + /// Gets or Sets Email + /// + [DataMember(Name="email", EmitDefaultValue=false)] + public string Email { get; set; } + + /// + /// Gets or Sets Password + /// + [DataMember(Name="password", EmitDefaultValue=false)] + public string Password { get; set; } + + /// + /// Gets or Sets Phone + /// + [DataMember(Name="phone", EmitDefaultValue=false)] + public string Phone { get; set; } + + /// + /// User Status + /// + /// User Status + [DataMember(Name="userStatus", EmitDefaultValue=true)] + public int UserStatus { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class User {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Username: ").Append(Username).Append("\n"); + sb.Append(" FirstName: ").Append(FirstName).Append("\n"); + sb.Append(" LastName: ").Append(LastName).Append("\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append(" Password: ").Append(Password).Append("\n"); + sb.Append(" Phone: ").Append(Phone).Append("\n"); + sb.Append(" UserStatus: ").Append(UserStatus).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + if (obj is null) return false; + if (ReferenceEquals(this, obj)) return true; + return obj.GetType() == GetType() && Equals((User)obj); + } + + /// + /// Returns true if User instances are equal + /// + /// Instance of User to be compared + /// Boolean + public bool Equals(User other) + { + if (other is null) return false; + if (ReferenceEquals(this, other)) return true; + + return + ( + Id == other.Id || + + Id.Equals(other.Id) + ) && + ( + Username == other.Username || + Username != null && + Username.Equals(other.Username) + ) && + ( + FirstName == other.FirstName || + FirstName != null && + FirstName.Equals(other.FirstName) + ) && + ( + LastName == other.LastName || + LastName != null && + LastName.Equals(other.LastName) + ) && + ( + Email == other.Email || + Email != null && + Email.Equals(other.Email) + ) && + ( + Password == other.Password || + Password != null && + Password.Equals(other.Password) + ) && + ( + Phone == other.Phone || + Phone != null && + Phone.Equals(other.Phone) + ) && + ( + UserStatus == other.UserStatus || + + UserStatus.Equals(other.UserStatus) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + var hashCode = 41; + // Suitable nullity checks etc, of course :) + + hashCode = hashCode * 59 + Id.GetHashCode(); + if (Username != null) + hashCode = hashCode * 59 + Username.GetHashCode(); + if (FirstName != null) + hashCode = hashCode * 59 + FirstName.GetHashCode(); + if (LastName != null) + hashCode = hashCode * 59 + LastName.GetHashCode(); + if (Email != null) + hashCode = hashCode * 59 + Email.GetHashCode(); + if (Password != null) + hashCode = hashCode * 59 + Password.GetHashCode(); + if (Phone != null) + hashCode = hashCode * 59 + Phone.GetHashCode(); + + hashCode = hashCode * 59 + UserStatus.GetHashCode(); + return hashCode; + } + } + + #region Operators + #pragma warning disable 1591 + + public static bool operator ==(User left, User right) + { + return Equals(left, right); + } + + public static bool operator !=(User left, User right) + { + return !Equals(left, right); + } + + #pragma warning restore 1591 + #endregion Operators + } +} From 188c39dccd912202a025363cbf9ba19bf2716412 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Fri, 11 Nov 2022 11:40:33 -0800 Subject: [PATCH 016/189] Fixes bug where python generates client with low version specs (#13996) --- .../openapitools/codegen/languages/PythonClientCodegen.java | 4 ++-- .../org/openapitools/codegen/python/PythonClientTest.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java index 3508b2775a..de0b5bd79b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java @@ -2759,14 +2759,14 @@ public class PythonClientCodegen extends AbstractPythonCodegen { public void preprocessOpenAPI(OpenAPI openAPI) { String originalSpecVersion; String xOriginalSwaggerVersion = "x-original-swagger-version"; - if (openAPI.getExtensions() != null && !openAPI.getExtensions().isEmpty() && openAPI.getExtensions().containsValue(xOriginalSwaggerVersion)) { + if (openAPI.getExtensions() != null && !openAPI.getExtensions().isEmpty() && openAPI.getExtensions().containsKey(xOriginalSwaggerVersion)) { originalSpecVersion = (String) openAPI.getExtensions().get(xOriginalSwaggerVersion); } else { originalSpecVersion = openAPI.getOpenapi(); } Integer specMajorVersion = Integer.parseInt(originalSpecVersion.substring(0, 1)); if (specMajorVersion < 3) { - throw new RuntimeException("Your spec version of "+originalSpecVersion+" is too low. python-experimental only works with specs with version >= 3.X.X. Please use a tool like Swagger Editor or Swagger Converter to convert your spec to v3"); + throw new RuntimeException("Your spec version of "+originalSpecVersion+" is too low. " + getName() + " only works with specs with version >= 3.X.X. Please use a tool like Swagger Editor or Swagger Converter to convert your spec to v3"); } } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonClientTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonClientTest.java index 6e293eb845..8034a688f2 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonClientTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonClientTest.java @@ -59,8 +59,8 @@ public class PythonClientTest { Assert.assertEquals(exampleValue.trim(), expectedValue.trim()); } - @Test - public void testSpecWithTooLowVersionThrowsException() throws RuntimeException { + @Test(expectedExceptions = RuntimeException.class) + public void testSpecWithTooLowVersionThrowsException() { final OpenAPI openAPI = TestUtils.parseSpec("src/test/resources/2_0/petstore.yaml"); final PythonClientCodegen codegen = new PythonClientCodegen(); codegen.preprocessOpenAPI(openAPI); From 4a5c9ff2d29c883259407a2a83d2126edc09ed0c Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sun, 13 Nov 2022 10:24:29 +0800 Subject: [PATCH 017/189] Add tests for rust reqwest middleware client (#13990) * add tests for rust reqwest middleware client * add github workflow * trigger build * fix rust * trigger build failure * Revert "trigger build failure" This reverts commit 42d8ff42ee04d207d8c2dad4a9714a9c7ad3b1c5. * Update pom.xml Co-authored-by: Nathan Shaaban <86252985+nshaaban-cPacket@users.noreply.github.com> * simplify folder Co-authored-by: Nathan Shaaban <86252985+nshaaban-cPacket@users.noreply.github.com> --- .github/workflows/samples-rust.yaml | 31 ++++++++++++ pom.xml | 2 + .../reqwest/petstore-async-middleware/pom.xml | 47 +++++++++++++++++++ 3 files changed, 80 insertions(+) create mode 100644 .github/workflows/samples-rust.yaml create mode 100644 samples/client/petstore/rust/reqwest/petstore-async-middleware/pom.xml diff --git a/.github/workflows/samples-rust.yaml b/.github/workflows/samples-rust.yaml new file mode 100644 index 0000000000..1d0aa74501 --- /dev/null +++ b/.github/workflows/samples-rust.yaml @@ -0,0 +1,31 @@ +name: Samples Rust + +on: + push: + paths: + - 'samples/client/petstore/rust/**' + - 'samples/server/petstore/rust-server/**' + pull_request: + paths: + - 'samples/client/petstore/rust/**' + - 'samples/server/petstore/rust-server/**' + +jobs: + build: + name: Build Rust + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + sample: + # these folders contain sub-projects of rust clients, servers + - samples/client/petstore/rust/ + - samples/server/petstore/rust-server/ + steps: + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + - name: Build + working-directory: ${{ matrix.sample }} + run: cargo build diff --git a/pom.xml b/pom.xml index 3d7e16cf6d..58ffb5e74b 100644 --- a/pom.xml +++ b/pom.xml @@ -1170,8 +1170,10 @@ samples/client/petstore/c --> samples/client/petstore/rust + samples/client/petstore/rust/hyper/petstore samples/client/petstore/rust/reqwest/petstore samples/client/petstore/rust/reqwest/petstore-async + samples/client/petstore/rust/reqwest/petstore-async-middleware samples/client/petstore/python-legacy samples/client/petstore/python-asyncio diff --git a/samples/client/petstore/rust/reqwest/petstore-async-middleware/pom.xml b/samples/client/petstore/rust/reqwest/petstore-async-middleware/pom.xml new file mode 100644 index 0000000000..f4ba9e854b --- /dev/null +++ b/samples/client/petstore/rust/reqwest/petstore-async-middleware/pom.xml @@ -0,0 +1,47 @@ + + 4.0.0 + org.openapitools + RustReqwestAsyncMiddlewareClientTests + pom + 1.0-SNAPSHOT + Rust Reqwest Async Middleware Petstore Client + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory} + + + + + + org.codehaus.mojo + exec-maven-plugin + 1.2.1 + + + bundle-test + integration-test + + exec + + + cargo + + build + + + + + + + + + From 2e44e78474d34283f25ddae88a4892da57e8901d Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sun, 13 Nov 2022 12:14:21 +0800 Subject: [PATCH 018/189] Update Ruby minimum version to 2.7 (#14002) * update ruby minimum version to 2.7 * test ruby in cirleci --- .../src/main/resources/ruby-client/gemspec.mustache | 2 +- .../src/main/resources/ruby-client/gitlab-ci.mustache | 2 +- .../src/main/resources/ruby-client/travis.mustache | 5 +---- pom.xml | 6 +++--- samples/client/petstore/ruby-autoload/.gitlab-ci.yml | 2 +- samples/client/petstore/ruby-autoload/.travis.yml | 5 +---- samples/client/petstore/ruby-autoload/petstore.gemspec | 2 +- samples/client/petstore/ruby-faraday/.gitlab-ci.yml | 2 +- samples/client/petstore/ruby-faraday/.travis.yml | 5 +---- samples/client/petstore/ruby-faraday/petstore.gemspec | 2 +- samples/client/petstore/ruby/.gitlab-ci.yml | 2 +- samples/client/petstore/ruby/.travis.yml | 5 +---- samples/client/petstore/ruby/petstore.gemspec | 2 +- .../extensions/x-auth-id-alias/ruby-client/.gitlab-ci.yml | 2 +- .../extensions/x-auth-id-alias/ruby-client/.travis.yml | 5 +---- .../x-auth-id-alias/ruby-client/x_auth_id_alias.gemspec | 2 +- .../client/features/dynamic-servers/ruby/.gitlab-ci.yml | 2 +- .../client/features/dynamic-servers/ruby/.travis.yml | 5 +---- .../features/dynamic-servers/ruby/dynamic_servers.gemspec | 2 +- .../generate-alias-as-model/ruby-client/.gitlab-ci.yml | 2 +- .../generate-alias-as-model/ruby-client/.travis.yml | 5 +---- .../generate-alias-as-model/ruby-client/petstore.gemspec | 2 +- 22 files changed, 24 insertions(+), 45 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/ruby-client/gemspec.mustache b/modules/openapi-generator/src/main/resources/ruby-client/gemspec.mustache index 4d5da109fb..64a45113eb 100644 --- a/modules/openapi-generator/src/main/resources/ruby-client/gemspec.mustache +++ b/modules/openapi-generator/src/main/resources/ruby-client/gemspec.mustache @@ -17,7 +17,7 @@ Gem::Specification.new do |s| s.summary = "{{gemSummary}}{{^gemSummary}}{{{appName}}} Ruby Gem{{/gemSummary}}" s.description = "{{gemDescription}}{{^gemDescription}}{{{appDescription}}}{{^appDescription}}{{{appName}}} Ruby Gem{{/appDescription}}{{/gemDescription}}" s.license = "{{{gemLicense}}}{{^gemLicense}}Unlicense{{/gemLicense}}" - s.required_ruby_version = "{{{gemRequiredRubyVersion}}}{{^gemRequiredRubyVersion}}>= 2.4{{/gemRequiredRubyVersion}}" + s.required_ruby_version = "{{{gemRequiredRubyVersion}}}{{^gemRequiredRubyVersion}}>= 2.7{{/gemRequiredRubyVersion}}" {{#isFaraday}} s.add_runtime_dependency 'faraday', '>= 1.0.1', '< 3.0' diff --git a/modules/openapi-generator/src/main/resources/ruby-client/gitlab-ci.mustache b/modules/openapi-generator/src/main/resources/ruby-client/gitlab-ci.mustache index 3d57c5b30c..3a253c45c0 100644 --- a/modules/openapi-generator/src/main/resources/ruby-client/gitlab-ci.mustache +++ b/modules/openapi-generator/src/main/resources/ruby-client/gitlab-ci.mustache @@ -7,7 +7,7 @@ - bundle install -j $(nproc) parallel: matrix: - - RUBY_VERSION: ['2.3', '2.4', '2.5', '2.6', '2.7', '3.0'] + - RUBY_VERSION: ['2.7', '3.0', '3.1'] image: "ruby:$RUBY_VERSION" cache: paths: diff --git a/modules/openapi-generator/src/main/resources/ruby-client/travis.mustache b/modules/openapi-generator/src/main/resources/ruby-client/travis.mustache index 0d1ed3815a..ed7f55c38c 100644 --- a/modules/openapi-generator/src/main/resources/ruby-client/travis.mustache +++ b/modules/openapi-generator/src/main/resources/ruby-client/travis.mustache @@ -1,12 +1,9 @@ language: ruby cache: bundler rvm: - - 2.3 - - 2.4 - - 2.5 - - 2.6 - 2.7 - 3.0 + - 3.1 script: - bundle install --path vendor/bundle - bundle exec rspec diff --git a/pom.xml b/pom.xml index 58ffb5e74b..fec9d30b50 100644 --- a/pom.xml +++ b/pom.xml @@ -1163,9 +1163,6 @@ samples/client/petstore/perl - samples/client/petstore/ruby-faraday - samples/client/petstore/ruby - samples/client/petstore/ruby-autoload @@ -1275,6 +1272,9 @@ samples/openapi3/client/petstore/python samples/openapi3/client/petstore/python-prior + samples/client/petstore/ruby-faraday + samples/client/petstore/ruby + samples/client/petstore/ruby-autoload diff --git a/samples/client/petstore/ruby-autoload/.gitlab-ci.yml b/samples/client/petstore/ruby-autoload/.gitlab-ci.yml index 3d57c5b30c..3a253c45c0 100644 --- a/samples/client/petstore/ruby-autoload/.gitlab-ci.yml +++ b/samples/client/petstore/ruby-autoload/.gitlab-ci.yml @@ -7,7 +7,7 @@ - bundle install -j $(nproc) parallel: matrix: - - RUBY_VERSION: ['2.3', '2.4', '2.5', '2.6', '2.7', '3.0'] + - RUBY_VERSION: ['2.7', '3.0', '3.1'] image: "ruby:$RUBY_VERSION" cache: paths: diff --git a/samples/client/petstore/ruby-autoload/.travis.yml b/samples/client/petstore/ruby-autoload/.travis.yml index 09210fc037..88f8fc7cdf 100644 --- a/samples/client/petstore/ruby-autoload/.travis.yml +++ b/samples/client/petstore/ruby-autoload/.travis.yml @@ -1,12 +1,9 @@ language: ruby cache: bundler rvm: - - 2.3 - - 2.4 - - 2.5 - - 2.6 - 2.7 - 3.0 + - 3.1 script: - bundle install --path vendor/bundle - bundle exec rspec diff --git a/samples/client/petstore/ruby-autoload/petstore.gemspec b/samples/client/petstore/ruby-autoload/petstore.gemspec index 0877b82407..d1e4d319ef 100644 --- a/samples/client/petstore/ruby-autoload/petstore.gemspec +++ b/samples/client/petstore/ruby-autoload/petstore.gemspec @@ -25,7 +25,7 @@ Gem::Specification.new do |s| s.summary = "OpenAPI Petstore Ruby Gem" s.description = "This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\" s.license = "Unlicense" - s.required_ruby_version = ">= 2.4" + s.required_ruby_version = ">= 2.7" s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1' diff --git a/samples/client/petstore/ruby-faraday/.gitlab-ci.yml b/samples/client/petstore/ruby-faraday/.gitlab-ci.yml index 3d57c5b30c..3a253c45c0 100644 --- a/samples/client/petstore/ruby-faraday/.gitlab-ci.yml +++ b/samples/client/petstore/ruby-faraday/.gitlab-ci.yml @@ -7,7 +7,7 @@ - bundle install -j $(nproc) parallel: matrix: - - RUBY_VERSION: ['2.3', '2.4', '2.5', '2.6', '2.7', '3.0'] + - RUBY_VERSION: ['2.7', '3.0', '3.1'] image: "ruby:$RUBY_VERSION" cache: paths: diff --git a/samples/client/petstore/ruby-faraday/.travis.yml b/samples/client/petstore/ruby-faraday/.travis.yml index 09210fc037..88f8fc7cdf 100644 --- a/samples/client/petstore/ruby-faraday/.travis.yml +++ b/samples/client/petstore/ruby-faraday/.travis.yml @@ -1,12 +1,9 @@ language: ruby cache: bundler rvm: - - 2.3 - - 2.4 - - 2.5 - - 2.6 - 2.7 - 3.0 + - 3.1 script: - bundle install --path vendor/bundle - bundle exec rspec diff --git a/samples/client/petstore/ruby-faraday/petstore.gemspec b/samples/client/petstore/ruby-faraday/petstore.gemspec index 49365488bf..33078e3e3b 100644 --- a/samples/client/petstore/ruby-faraday/petstore.gemspec +++ b/samples/client/petstore/ruby-faraday/petstore.gemspec @@ -25,7 +25,7 @@ Gem::Specification.new do |s| s.summary = "OpenAPI Petstore Ruby Gem" s.description = "This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\" s.license = "Unlicense" - s.required_ruby_version = ">= 2.4" + s.required_ruby_version = ">= 2.7" s.add_runtime_dependency 'faraday', '>= 1.0.1', '< 3.0' s.add_runtime_dependency 'faraday-multipart' diff --git a/samples/client/petstore/ruby/.gitlab-ci.yml b/samples/client/petstore/ruby/.gitlab-ci.yml index 3d57c5b30c..3a253c45c0 100644 --- a/samples/client/petstore/ruby/.gitlab-ci.yml +++ b/samples/client/petstore/ruby/.gitlab-ci.yml @@ -7,7 +7,7 @@ - bundle install -j $(nproc) parallel: matrix: - - RUBY_VERSION: ['2.3', '2.4', '2.5', '2.6', '2.7', '3.0'] + - RUBY_VERSION: ['2.7', '3.0', '3.1'] image: "ruby:$RUBY_VERSION" cache: paths: diff --git a/samples/client/petstore/ruby/.travis.yml b/samples/client/petstore/ruby/.travis.yml index 09210fc037..88f8fc7cdf 100644 --- a/samples/client/petstore/ruby/.travis.yml +++ b/samples/client/petstore/ruby/.travis.yml @@ -1,12 +1,9 @@ language: ruby cache: bundler rvm: - - 2.3 - - 2.4 - - 2.5 - - 2.6 - 2.7 - 3.0 + - 3.1 script: - bundle install --path vendor/bundle - bundle exec rspec diff --git a/samples/client/petstore/ruby/petstore.gemspec b/samples/client/petstore/ruby/petstore.gemspec index 0877b82407..d1e4d319ef 100644 --- a/samples/client/petstore/ruby/petstore.gemspec +++ b/samples/client/petstore/ruby/petstore.gemspec @@ -25,7 +25,7 @@ Gem::Specification.new do |s| s.summary = "OpenAPI Petstore Ruby Gem" s.description = "This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\" s.license = "Unlicense" - s.required_ruby_version = ">= 2.4" + s.required_ruby_version = ">= 2.7" s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1' diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/.gitlab-ci.yml b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/.gitlab-ci.yml index 3d57c5b30c..3a253c45c0 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/.gitlab-ci.yml +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/.gitlab-ci.yml @@ -7,7 +7,7 @@ - bundle install -j $(nproc) parallel: matrix: - - RUBY_VERSION: ['2.3', '2.4', '2.5', '2.6', '2.7', '3.0'] + - RUBY_VERSION: ['2.7', '3.0', '3.1'] image: "ruby:$RUBY_VERSION" cache: paths: diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/.travis.yml b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/.travis.yml index 97801c6e8f..3bd3ccb523 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/.travis.yml +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/.travis.yml @@ -1,12 +1,9 @@ language: ruby cache: bundler rvm: - - 2.3 - - 2.4 - - 2.5 - - 2.6 - 2.7 - 3.0 + - 3.1 script: - bundle install --path vendor/bundle - bundle exec rspec diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/x_auth_id_alias.gemspec b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/x_auth_id_alias.gemspec index 5d8bb1f70f..01a0dba6c1 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/x_auth_id_alias.gemspec +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/x_auth_id_alias.gemspec @@ -25,7 +25,7 @@ Gem::Specification.new do |s| s.summary = "OpenAPI Extension x-auth-id-alias Ruby Gem" s.description = "This specification shows how to use x-auth-id-alias extension for API keys." s.license = "Unlicense" - s.required_ruby_version = ">= 2.4" + s.required_ruby_version = ">= 2.7" s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1' diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/.gitlab-ci.yml b/samples/openapi3/client/features/dynamic-servers/ruby/.gitlab-ci.yml index 3d57c5b30c..3a253c45c0 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/.gitlab-ci.yml +++ b/samples/openapi3/client/features/dynamic-servers/ruby/.gitlab-ci.yml @@ -7,7 +7,7 @@ - bundle install -j $(nproc) parallel: matrix: - - RUBY_VERSION: ['2.3', '2.4', '2.5', '2.6', '2.7', '3.0'] + - RUBY_VERSION: ['2.7', '3.0', '3.1'] image: "ruby:$RUBY_VERSION" cache: paths: diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/.travis.yml b/samples/openapi3/client/features/dynamic-servers/ruby/.travis.yml index a3ef1366be..a652409715 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/.travis.yml +++ b/samples/openapi3/client/features/dynamic-servers/ruby/.travis.yml @@ -1,12 +1,9 @@ language: ruby cache: bundler rvm: - - 2.3 - - 2.4 - - 2.5 - - 2.6 - 2.7 - 3.0 + - 3.1 script: - bundle install --path vendor/bundle - bundle exec rspec diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/dynamic_servers.gemspec b/samples/openapi3/client/features/dynamic-servers/ruby/dynamic_servers.gemspec index 532ee498f6..0e00a8d1e9 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/dynamic_servers.gemspec +++ b/samples/openapi3/client/features/dynamic-servers/ruby/dynamic_servers.gemspec @@ -25,7 +25,7 @@ Gem::Specification.new do |s| s.summary = "OpenAPI Extension with dynamic servers Ruby Gem" s.description = "This specification shows how to use dynamic servers." s.license = "Unlicense" - s.required_ruby_version = ">= 2.4" + s.required_ruby_version = ">= 2.7" s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1' diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/.gitlab-ci.yml b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/.gitlab-ci.yml index 3d57c5b30c..3a253c45c0 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/.gitlab-ci.yml +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/.gitlab-ci.yml @@ -7,7 +7,7 @@ - bundle install -j $(nproc) parallel: matrix: - - RUBY_VERSION: ['2.3', '2.4', '2.5', '2.6', '2.7', '3.0'] + - RUBY_VERSION: ['2.7', '3.0', '3.1'] image: "ruby:$RUBY_VERSION" cache: paths: diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/.travis.yml b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/.travis.yml index 09210fc037..88f8fc7cdf 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/.travis.yml +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/.travis.yml @@ -1,12 +1,9 @@ language: ruby cache: bundler rvm: - - 2.3 - - 2.4 - - 2.5 - - 2.6 - 2.7 - 3.0 + - 3.1 script: - bundle install --path vendor/bundle - bundle exec rspec diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/petstore.gemspec b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/petstore.gemspec index 149a50918c..781989f19a 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/petstore.gemspec +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/petstore.gemspec @@ -25,7 +25,7 @@ Gem::Specification.new do |s| s.summary = "OpenAPI Extension generating aliases to maps and arrays as models Ruby Gem" s.description = "This specification shows how to generate aliases to maps and arrays as models." s.license = "Unlicense" - s.required_ruby_version = ">= 2.4" + s.required_ruby_version = ">= 2.7" s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1' From e882421ff313dda54ae3728b79529877898d7ab0 Mon Sep 17 00:00:00 2001 From: Jonas Reichert <75073818+Jonas1893@users.noreply.github.com> Date: Mon, 14 Nov 2022 13:59:25 +0100 Subject: [PATCH 019/189] enhance response with bodyData (#14006) --- .../src/main/resources/swift5/Models.mustache | 8 +++++--- .../AlamofireImplementations.mustache | 14 ++++++------- .../URLSessionImplementations.mustache | 20 +++++++++---------- .../OpenAPIs/AlamofireImplementations.swift | 14 ++++++------- .../Classes/OpenAPIs/Models.swift | 8 +++++--- .../Classes/OpenAPIs/Models.swift | 8 +++++--- .../OpenAPIs/URLSessionImplementations.swift | 20 +++++++++---------- .../Classes/OpenAPIs/Models.swift | 8 +++++--- .../OpenAPIs/URLSessionImplementations.swift | 20 +++++++++---------- .../Classes/OpenAPIs/Models.swift | 8 +++++--- .../OpenAPIs/URLSessionImplementations.swift | 20 +++++++++---------- .../Classes/OpenAPIs/Models.swift | 8 +++++--- .../OpenAPIs/URLSessionImplementations.swift | 20 +++++++++---------- .../Classes/OpenAPIs/Models.swift | 8 +++++--- .../OpenAPIs/URLSessionImplementations.swift | 20 +++++++++---------- .../Classes/OpenAPIs/Models.swift | 8 +++++--- .../OpenAPIs/URLSessionImplementations.swift | 20 +++++++++---------- .../Classes/OpenAPIs/Models.swift | 8 +++++--- .../OpenAPIs/URLSessionImplementations.swift | 20 +++++++++---------- .../Classes/OpenAPIs/Models.swift | 8 +++++--- .../OpenAPIs/URLSessionImplementations.swift | 20 +++++++++---------- .../Classes/OpenAPIs/Models.swift | 8 +++++--- .../OpenAPIs/URLSessionImplementations.swift | 20 +++++++++---------- .../Classes/OpenAPIs/Models.swift | 8 +++++--- .../OpenAPIs/URLSessionImplementations.swift | 20 +++++++++---------- .../Classes/OpenAPIs/Models.swift | 8 +++++--- .../OpenAPIs/URLSessionImplementations.swift | 20 +++++++++---------- .../Classes/OpenAPIs/Models.swift | 8 +++++--- .../OpenAPIs/URLSessionImplementations.swift | 20 +++++++++---------- .../Sources/PetstoreClient/Models.swift | 8 +++++--- .../URLSessionImplementations.swift | 20 +++++++++---------- .../Classes/OpenAPIs/Models.swift | 8 +++++--- .../OpenAPIs/URLSessionImplementations.swift | 20 +++++++++---------- 33 files changed, 244 insertions(+), 212 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/swift5/Models.mustache b/modules/openapi-generator/src/main/resources/swift5/Models.mustache index 776a36f923..abab906fea 100644 --- a/modules/openapi-generator/src/main/resources/swift5/Models.mustache +++ b/modules/openapi-generator/src/main/resources/swift5/Models.mustache @@ -87,14 +87,16 @@ extension NullEncodable: Codable where Wrapped: Codable { {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} let statusCode: Int {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} let header: [String: String] {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} let body: T + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} let bodyData: Data? - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} init(statusCode: Int, header: [String: String], body: T) { + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} init(statusCode: Int, header: [String: String], body: T, bodyData: Data?) { self.statusCode = statusCode self.header = header self.body = body + self.bodyData = bodyData } - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} convenience init(response: HTTPURLResponse, body: T) { + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} convenience init(response: HTTPURLResponse, body: T, bodyData: Data?) { let rawHeader = response.allHeaderFields var header = [String: String]() for (key, value) in rawHeader { @@ -102,7 +104,7 @@ extension NullEncodable: Codable where Wrapped: Codable { header[key] = value } } - self.init(statusCode: response.statusCode, header: header, body: body) + self.init(statusCode: response.statusCode, header: header, body: body, bodyData: bodyData) } } diff --git a/modules/openapi-generator/src/main/resources/swift5/libraries/alamofire/AlamofireImplementations.mustache b/modules/openapi-generator/src/main/resources/swift5/libraries/alamofire/AlamofireImplementations.mustache index a2b5502bcf..36b4e80c06 100644 --- a/modules/openapi-generator/src/main/resources/swift5/libraries/alamofire/AlamofireImplementations.mustache +++ b/modules/openapi-generator/src/main/resources/swift5/libraries/alamofire/AlamofireImplementations.mustache @@ -176,7 +176,7 @@ private var managerStore = SynchronizedDictionary() switch voidResponse.result { case .success: - completion(.success(Response(response: voidResponse.response!, body: () as! T))) + completion(.success(Response(response: voidResponse.response!, body: () as! T, bodyData: voidResponse.data))) case let .failure(error): completion(.failure(ErrorResponse.error(voidResponse.response?.statusCode ?? 500, voidResponse.data, voidResponse.response, error))) } @@ -270,7 +270,7 @@ private var managerStore = SynchronizedDictionary() switch stringResponse.result { case let .success(value): - completion(.success(Response(response: stringResponse.response!, body: value as! T))) + completion(.success(Response(response: stringResponse.response!, body: value as! T, bodyData: stringResponse.data))) case let .failure(error): completion(.failure(ErrorResponse.error(stringResponse.response?.statusCode ?? 500, stringResponse.data, stringResponse.response, error))) } @@ -315,7 +315,7 @@ private var managerStore = SynchronizedDictionary() try fileManager.createDirectory(atPath: directoryPath, withIntermediateDirectories: true, attributes: nil) try data.write(to: filePath, options: .atomic) - completion(.success(Response(response: dataResponse.response!, body: filePath as! T))) + completion(.success(Response(response: dataResponse.response!, body: filePath as! T, bodyData: data))) } catch let requestParserError as DownloadException { completion(.failure(ErrorResponse.error(400, dataResponse.data, dataResponse.response, requestParserError))) @@ -332,7 +332,7 @@ private var managerStore = SynchronizedDictionary() switch voidResponse.result { case .success: - completion(.success(Response(response: voidResponse.response!, body: () as! T))) + completion(.success(Response(response: voidResponse.response!, body: () as! T, bodyData: voidResponse.data))) case let .failure(error): completion(.failure(ErrorResponse.error(voidResponse.response?.statusCode ?? 500, voidResponse.data, voidResponse.response, error))) } @@ -346,7 +346,7 @@ private var managerStore = SynchronizedDictionary() switch dataResponse.result { case .success: - completion(.success(Response(response: dataResponse.response!, body: dataResponse.data as! T))) + completion(.success(Response(response: dataResponse.response!, body: dataResponse.data as! T, bodyData: dataResponse.data))) case let .failure(error): completion(.failure(ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.response, error))) } @@ -370,7 +370,7 @@ private var managerStore = SynchronizedDictionary() guard let data = dataResponse.data, !data.isEmpty else { if T.self is ExpressibleByNilLiteral.Type { - completion(.success(Response(response: httpResponse, body: Optional.none as! T))) + completion(.success(Response(response: httpResponse, body: Optional.none as! T, bodyData: dataResponse.data))) } else { completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, httpResponse, DecodableRequestBuilderError.emptyDataResponse))) } @@ -381,7 +381,7 @@ private var managerStore = SynchronizedDictionary() switch decodeResult { case let .success(decodableObj): - completion(.success(Response(response: httpResponse, body: decodableObj))) + completion(.success(Response(response: httpResponse, body: decodableObj, bodyData: data))) case let .failure(error): completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, httpResponse, error))) } diff --git a/modules/openapi-generator/src/main/resources/swift5/libraries/urlsession/URLSessionImplementations.mustache b/modules/openapi-generator/src/main/resources/swift5/libraries/urlsession/URLSessionImplementations.mustache index 1fc988e327..b544298de3 100644 --- a/modules/openapi-generator/src/main/resources/swift5/libraries/urlsession/URLSessionImplementations.mustache +++ b/modules/openapi-generator/src/main/resources/swift5/libraries/urlsession/URLSessionImplementations.mustache @@ -208,7 +208,7 @@ private var credentialStore = SynchronizedDictionary() switch T.self { case is Void.Type: - completion(.success(Response(response: httpResponse, body: () as! T))) + completion(.success(Response(response: httpResponse, body: () as! T, bodyData: data))) default: fatalError("Unsupported Response Body Type - \(String(describing: T.self))") @@ -303,7 +303,7 @@ private var credentialStore = SynchronizedDictionary() let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? "" - completion(.success(Response(response: httpResponse, body: body as! T))) + completion(.success(Response(response: httpResponse, body: body as! T, bodyData: data))) case is URL.Type: do { @@ -334,7 +334,7 @@ private var credentialStore = SynchronizedDictionary() 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))) + completion(.success(Response(response: httpResponse, body: filePath as! T, bodyData: data))) } catch let requestParserError as DownloadException { completion(.failure(ErrorResponse.error(400, data, response, requestParserError))) @@ -344,30 +344,30 @@ private var credentialStore = SynchronizedDictionary() case is Void.Type: - completion(.success(Response(response: httpResponse, body: () as! T))) + completion(.success(Response(response: httpResponse, body: () as! T, bodyData: data))) case is Data.Type: - completion(.success(Response(response: httpResponse, body: data as! T))) + completion(.success(Response(response: httpResponse, body: data as! T, bodyData: data))) default: - guard let data = data, !data.isEmpty else { + guard let unwrappedData = data, !unwrappedData.isEmpty else { if let E = T.self as? ExpressibleByNilLiteral.Type { - completion(.success(Response(response: httpResponse, body: E.init(nilLiteral: ()) as! T))) + completion(.success(Response(response: httpResponse, body: E.init(nilLiteral: ()) as! T, bodyData: data))) } else { completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, response, DecodableRequestBuilderError.emptyDataResponse))) } return } - let decodeResult = CodableHelper.decode(T.self, from: data) + let decodeResult = CodableHelper.decode(T.self, from: unwrappedData) switch decodeResult { case let .success(decodableObj): - completion(.success(Response(response: httpResponse, body: decodableObj))) + completion(.success(Response(response: httpResponse, body: decodableObj, bodyData: unwrappedData))) case let .failure(error): - completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, response, error))) + completion(.failure(ErrorResponse.error(httpResponse.statusCode, unwrappedData, response, error))) } } } 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 a7d8f89665..3ed8fe080f 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift @@ -176,7 +176,7 @@ open class AlamofireRequestBuilder: RequestBuilder { switch voidResponse.result { case .success: - completion(.success(Response(response: voidResponse.response!, body: () as! T))) + completion(.success(Response(response: voidResponse.response!, body: () as! T, bodyData: voidResponse.data))) case let .failure(error): completion(.failure(ErrorResponse.error(voidResponse.response?.statusCode ?? 500, voidResponse.data, voidResponse.response, error))) } @@ -270,7 +270,7 @@ open class AlamofireDecodableRequestBuilder: AlamofireRequestBuild switch stringResponse.result { case let .success(value): - completion(.success(Response(response: stringResponse.response!, body: value as! T))) + completion(.success(Response(response: stringResponse.response!, body: value as! T, bodyData: stringResponse.data))) case let .failure(error): completion(.failure(ErrorResponse.error(stringResponse.response?.statusCode ?? 500, stringResponse.data, stringResponse.response, error))) } @@ -315,7 +315,7 @@ open class AlamofireDecodableRequestBuilder: AlamofireRequestBuild try fileManager.createDirectory(atPath: directoryPath, withIntermediateDirectories: true, attributes: nil) try data.write(to: filePath, options: .atomic) - completion(.success(Response(response: dataResponse.response!, body: filePath as! T))) + completion(.success(Response(response: dataResponse.response!, body: filePath as! T, bodyData: data))) } catch let requestParserError as DownloadException { completion(.failure(ErrorResponse.error(400, dataResponse.data, dataResponse.response, requestParserError))) @@ -332,7 +332,7 @@ open class AlamofireDecodableRequestBuilder: AlamofireRequestBuild switch voidResponse.result { case .success: - completion(.success(Response(response: voidResponse.response!, body: () as! T))) + completion(.success(Response(response: voidResponse.response!, body: () as! T, bodyData: voidResponse.data))) case let .failure(error): completion(.failure(ErrorResponse.error(voidResponse.response?.statusCode ?? 500, voidResponse.data, voidResponse.response, error))) } @@ -346,7 +346,7 @@ open class AlamofireDecodableRequestBuilder: AlamofireRequestBuild switch dataResponse.result { case .success: - completion(.success(Response(response: dataResponse.response!, body: dataResponse.data as! T))) + completion(.success(Response(response: dataResponse.response!, body: dataResponse.data as! T, bodyData: dataResponse.data))) case let .failure(error): completion(.failure(ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.response, error))) } @@ -370,7 +370,7 @@ open class AlamofireDecodableRequestBuilder: AlamofireRequestBuild guard let data = dataResponse.data, !data.isEmpty else { if T.self is ExpressibleByNilLiteral.Type { - completion(.success(Response(response: httpResponse, body: Optional.none as! T))) + completion(.success(Response(response: httpResponse, body: Optional.none as! T, bodyData: dataResponse.data))) } else { completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, httpResponse, DecodableRequestBuilderError.emptyDataResponse))) } @@ -381,7 +381,7 @@ open class AlamofireDecodableRequestBuilder: AlamofireRequestBuild switch decodeResult { case let .success(decodableObj): - completion(.success(Response(response: httpResponse, body: decodableObj))) + completion(.success(Response(response: httpResponse, body: decodableObj, bodyData: data))) case let .failure(error): completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, httpResponse, error))) } 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 28189fb486..2613cc53b2 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -87,14 +87,16 @@ open class Response { public let statusCode: Int public let header: [String: String] public let body: T + public let bodyData: Data? - public init(statusCode: Int, header: [String: String], body: T) { + public init(statusCode: Int, header: [String: String], body: T, bodyData: Data?) { self.statusCode = statusCode self.header = header self.body = body + self.bodyData = bodyData } - public convenience init(response: HTTPURLResponse, body: T) { + public convenience init(response: HTTPURLResponse, body: T, bodyData: Data?) { let rawHeader = response.allHeaderFields var header = [String: String]() for (key, value) in rawHeader { @@ -102,7 +104,7 @@ open class Response { header[key] = value } } - self.init(statusCode: response.statusCode, header: header, body: body) + self.init(statusCode: response.statusCode, header: header, body: body, bodyData: bodyData) } } diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift index eb916234ab..b49cf8d122 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -86,14 +86,16 @@ open class Response { public let statusCode: Int public let header: [String: String] public let body: T + public let bodyData: Data? - public init(statusCode: Int, header: [String: String], body: T) { + public init(statusCode: Int, header: [String: String], body: T, bodyData: Data?) { self.statusCode = statusCode self.header = header self.body = body + self.bodyData = bodyData } - public convenience init(response: HTTPURLResponse, body: T) { + public convenience init(response: HTTPURLResponse, body: T, bodyData: Data?) { let rawHeader = response.allHeaderFields var header = [String: String]() for (key, value) in rawHeader { @@ -101,7 +103,7 @@ open class Response { header[key] = value } } - self.init(statusCode: response.statusCode, header: header, body: body) + self.init(statusCode: response.statusCode, header: header, body: body, bodyData: bodyData) } } diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index 3c7d97b470..635c69cd6a 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -208,7 +208,7 @@ open class URLSessionRequestBuilder: RequestBuilder { switch T.self { case is Void.Type: - completion(.success(Response(response: httpResponse, body: () as! T))) + completion(.success(Response(response: httpResponse, body: () as! T, bodyData: data))) default: fatalError("Unsupported Response Body Type - \(String(describing: T.self))") @@ -303,7 +303,7 @@ open class URLSessionDecodableRequestBuilder: URLSessionRequestBui let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? "" - completion(.success(Response(response: httpResponse, body: body as! T))) + completion(.success(Response(response: httpResponse, body: body as! T, bodyData: data))) case is URL.Type: do { @@ -334,7 +334,7 @@ open class URLSessionDecodableRequestBuilder: URLSessionRequestBui 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))) + completion(.success(Response(response: httpResponse, body: filePath as! T, bodyData: data))) } catch let requestParserError as DownloadException { completion(.failure(ErrorResponse.error(400, data, response, requestParserError))) @@ -344,30 +344,30 @@ open class URLSessionDecodableRequestBuilder: URLSessionRequestBui case is Void.Type: - completion(.success(Response(response: httpResponse, body: () as! T))) + completion(.success(Response(response: httpResponse, body: () as! T, bodyData: data))) case is Data.Type: - completion(.success(Response(response: httpResponse, body: data as! T))) + completion(.success(Response(response: httpResponse, body: data as! T, bodyData: data))) default: - guard let data = data, !data.isEmpty else { + guard let unwrappedData = data, !unwrappedData.isEmpty else { if let E = T.self as? ExpressibleByNilLiteral.Type { - completion(.success(Response(response: httpResponse, body: E.init(nilLiteral: ()) as! T))) + completion(.success(Response(response: httpResponse, body: E.init(nilLiteral: ()) as! T, bodyData: data))) } else { completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, response, DecodableRequestBuilderError.emptyDataResponse))) } return } - let decodeResult = CodableHelper.decode(T.self, from: data) + let decodeResult = CodableHelper.decode(T.self, from: unwrappedData) switch decodeResult { case let .success(decodableObj): - completion(.success(Response(response: httpResponse, body: decodableObj))) + completion(.success(Response(response: httpResponse, body: decodableObj, bodyData: unwrappedData))) case let .failure(error): - completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, response, error))) + completion(.failure(ErrorResponse.error(httpResponse.statusCode, unwrappedData, response, error))) } } } 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 50cd5bff5f..b73c2b8fde 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -86,14 +86,16 @@ open class Response { public let statusCode: Int public let header: [String: String] public let body: T + public let bodyData: Data? - public init(statusCode: Int, header: [String: String], body: T) { + public init(statusCode: Int, header: [String: String], body: T, bodyData: Data?) { self.statusCode = statusCode self.header = header self.body = body + self.bodyData = bodyData } - public convenience init(response: HTTPURLResponse, body: T) { + public convenience init(response: HTTPURLResponse, body: T, bodyData: Data?) { let rawHeader = response.allHeaderFields var header = [String: String]() for (key, value) in rawHeader { @@ -101,7 +103,7 @@ open class Response { header[key] = value } } - self.init(statusCode: response.statusCode, header: header, body: body) + self.init(statusCode: response.statusCode, header: header, body: body, bodyData: bodyData) } } 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 3c7d97b470..635c69cd6a 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -208,7 +208,7 @@ open class URLSessionRequestBuilder: RequestBuilder { switch T.self { case is Void.Type: - completion(.success(Response(response: httpResponse, body: () as! T))) + completion(.success(Response(response: httpResponse, body: () as! T, bodyData: data))) default: fatalError("Unsupported Response Body Type - \(String(describing: T.self))") @@ -303,7 +303,7 @@ open class URLSessionDecodableRequestBuilder: URLSessionRequestBui let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? "" - completion(.success(Response(response: httpResponse, body: body as! T))) + completion(.success(Response(response: httpResponse, body: body as! T, bodyData: data))) case is URL.Type: do { @@ -334,7 +334,7 @@ open class URLSessionDecodableRequestBuilder: URLSessionRequestBui 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))) + completion(.success(Response(response: httpResponse, body: filePath as! T, bodyData: data))) } catch let requestParserError as DownloadException { completion(.failure(ErrorResponse.error(400, data, response, requestParserError))) @@ -344,30 +344,30 @@ open class URLSessionDecodableRequestBuilder: URLSessionRequestBui case is Void.Type: - completion(.success(Response(response: httpResponse, body: () as! T))) + completion(.success(Response(response: httpResponse, body: () as! T, bodyData: data))) case is Data.Type: - completion(.success(Response(response: httpResponse, body: data as! T))) + completion(.success(Response(response: httpResponse, body: data as! T, bodyData: data))) default: - guard let data = data, !data.isEmpty else { + guard let unwrappedData = data, !unwrappedData.isEmpty else { if let E = T.self as? ExpressibleByNilLiteral.Type { - completion(.success(Response(response: httpResponse, body: E.init(nilLiteral: ()) as! T))) + completion(.success(Response(response: httpResponse, body: E.init(nilLiteral: ()) as! T, bodyData: data))) } else { completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, response, DecodableRequestBuilderError.emptyDataResponse))) } return } - let decodeResult = CodableHelper.decode(T.self, from: data) + let decodeResult = CodableHelper.decode(T.self, from: unwrappedData) switch decodeResult { case let .success(decodableObj): - completion(.success(Response(response: httpResponse, body: decodableObj))) + completion(.success(Response(response: httpResponse, body: decodableObj, bodyData: unwrappedData))) case let .failure(error): - completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, response, error))) + completion(.failure(ErrorResponse.error(httpResponse.statusCode, unwrappedData, response, error))) } } } 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 50cd5bff5f..b73c2b8fde 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -86,14 +86,16 @@ open class Response { public let statusCode: Int public let header: [String: String] public let body: T + public let bodyData: Data? - public init(statusCode: Int, header: [String: String], body: T) { + public init(statusCode: Int, header: [String: String], body: T, bodyData: Data?) { self.statusCode = statusCode self.header = header self.body = body + self.bodyData = bodyData } - public convenience init(response: HTTPURLResponse, body: T) { + public convenience init(response: HTTPURLResponse, body: T, bodyData: Data?) { let rawHeader = response.allHeaderFields var header = [String: String]() for (key, value) in rawHeader { @@ -101,7 +103,7 @@ open class Response { header[key] = value } } - self.init(statusCode: response.statusCode, header: header, body: body) + self.init(statusCode: response.statusCode, header: header, body: body, bodyData: bodyData) } } 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 3c7d97b470..635c69cd6a 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -208,7 +208,7 @@ open class URLSessionRequestBuilder: RequestBuilder { switch T.self { case is Void.Type: - completion(.success(Response(response: httpResponse, body: () as! T))) + completion(.success(Response(response: httpResponse, body: () as! T, bodyData: data))) default: fatalError("Unsupported Response Body Type - \(String(describing: T.self))") @@ -303,7 +303,7 @@ open class URLSessionDecodableRequestBuilder: URLSessionRequestBui let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? "" - completion(.success(Response(response: httpResponse, body: body as! T))) + completion(.success(Response(response: httpResponse, body: body as! T, bodyData: data))) case is URL.Type: do { @@ -334,7 +334,7 @@ open class URLSessionDecodableRequestBuilder: URLSessionRequestBui 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))) + completion(.success(Response(response: httpResponse, body: filePath as! T, bodyData: data))) } catch let requestParserError as DownloadException { completion(.failure(ErrorResponse.error(400, data, response, requestParserError))) @@ -344,30 +344,30 @@ open class URLSessionDecodableRequestBuilder: URLSessionRequestBui case is Void.Type: - completion(.success(Response(response: httpResponse, body: () as! T))) + completion(.success(Response(response: httpResponse, body: () as! T, bodyData: data))) case is Data.Type: - completion(.success(Response(response: httpResponse, body: data as! T))) + completion(.success(Response(response: httpResponse, body: data as! T, bodyData: data))) default: - guard let data = data, !data.isEmpty else { + guard let unwrappedData = data, !unwrappedData.isEmpty else { if let E = T.self as? ExpressibleByNilLiteral.Type { - completion(.success(Response(response: httpResponse, body: E.init(nilLiteral: ()) as! T))) + completion(.success(Response(response: httpResponse, body: E.init(nilLiteral: ()) as! T, bodyData: data))) } else { completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, response, DecodableRequestBuilderError.emptyDataResponse))) } return } - let decodeResult = CodableHelper.decode(T.self, from: data) + let decodeResult = CodableHelper.decode(T.self, from: unwrappedData) switch decodeResult { case let .success(decodableObj): - completion(.success(Response(response: httpResponse, body: decodableObj))) + completion(.success(Response(response: httpResponse, body: decodableObj, bodyData: unwrappedData))) case let .failure(error): - completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, response, error))) + completion(.failure(ErrorResponse.error(httpResponse.statusCode, unwrappedData, response, error))) } } } 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 50cd5bff5f..b73c2b8fde 100644 --- a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -86,14 +86,16 @@ open class Response { public let statusCode: Int public let header: [String: String] public let body: T + public let bodyData: Data? - public init(statusCode: Int, header: [String: String], body: T) { + public init(statusCode: Int, header: [String: String], body: T, bodyData: Data?) { self.statusCode = statusCode self.header = header self.body = body + self.bodyData = bodyData } - public convenience init(response: HTTPURLResponse, body: T) { + public convenience init(response: HTTPURLResponse, body: T, bodyData: Data?) { let rawHeader = response.allHeaderFields var header = [String: String]() for (key, value) in rawHeader { @@ -101,7 +103,7 @@ open class Response { header[key] = value } } - self.init(statusCode: response.statusCode, header: header, body: body) + self.init(statusCode: response.statusCode, header: header, body: body, bodyData: bodyData) } } 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 3c7d97b470..635c69cd6a 100644 --- a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -208,7 +208,7 @@ open class URLSessionRequestBuilder: RequestBuilder { switch T.self { case is Void.Type: - completion(.success(Response(response: httpResponse, body: () as! T))) + completion(.success(Response(response: httpResponse, body: () as! T, bodyData: data))) default: fatalError("Unsupported Response Body Type - \(String(describing: T.self))") @@ -303,7 +303,7 @@ open class URLSessionDecodableRequestBuilder: URLSessionRequestBui let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? "" - completion(.success(Response(response: httpResponse, body: body as! T))) + completion(.success(Response(response: httpResponse, body: body as! T, bodyData: data))) case is URL.Type: do { @@ -334,7 +334,7 @@ open class URLSessionDecodableRequestBuilder: URLSessionRequestBui 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))) + completion(.success(Response(response: httpResponse, body: filePath as! T, bodyData: data))) } catch let requestParserError as DownloadException { completion(.failure(ErrorResponse.error(400, data, response, requestParserError))) @@ -344,30 +344,30 @@ open class URLSessionDecodableRequestBuilder: URLSessionRequestBui case is Void.Type: - completion(.success(Response(response: httpResponse, body: () as! T))) + completion(.success(Response(response: httpResponse, body: () as! T, bodyData: data))) case is Data.Type: - completion(.success(Response(response: httpResponse, body: data as! T))) + completion(.success(Response(response: httpResponse, body: data as! T, bodyData: data))) default: - guard let data = data, !data.isEmpty else { + guard let unwrappedData = data, !unwrappedData.isEmpty else { if let E = T.self as? ExpressibleByNilLiteral.Type { - completion(.success(Response(response: httpResponse, body: E.init(nilLiteral: ()) as! T))) + completion(.success(Response(response: httpResponse, body: E.init(nilLiteral: ()) as! T, bodyData: data))) } else { completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, response, DecodableRequestBuilderError.emptyDataResponse))) } return } - let decodeResult = CodableHelper.decode(T.self, from: data) + let decodeResult = CodableHelper.decode(T.self, from: unwrappedData) switch decodeResult { case let .success(decodableObj): - completion(.success(Response(response: httpResponse, body: decodableObj))) + completion(.success(Response(response: httpResponse, body: decodableObj, bodyData: unwrappedData))) case let .failure(error): - completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, response, error))) + completion(.failure(ErrorResponse.error(httpResponse.statusCode, unwrappedData, response, error))) } } } diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models.swift index 50cd5bff5f..b73c2b8fde 100644 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -86,14 +86,16 @@ open class Response { public let statusCode: Int public let header: [String: String] public let body: T + public let bodyData: Data? - public init(statusCode: Int, header: [String: String], body: T) { + public init(statusCode: Int, header: [String: String], body: T, bodyData: Data?) { self.statusCode = statusCode self.header = header self.body = body + self.bodyData = bodyData } - public convenience init(response: HTTPURLResponse, body: T) { + public convenience init(response: HTTPURLResponse, body: T, bodyData: Data?) { let rawHeader = response.allHeaderFields var header = [String: String]() for (key, value) in rawHeader { @@ -101,7 +103,7 @@ open class Response { header[key] = value } } - self.init(statusCode: response.statusCode, header: header, body: body) + self.init(statusCode: response.statusCode, header: header, body: body, bodyData: bodyData) } } diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index 3c7d97b470..635c69cd6a 100644 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -208,7 +208,7 @@ open class URLSessionRequestBuilder: RequestBuilder { switch T.self { case is Void.Type: - completion(.success(Response(response: httpResponse, body: () as! T))) + completion(.success(Response(response: httpResponse, body: () as! T, bodyData: data))) default: fatalError("Unsupported Response Body Type - \(String(describing: T.self))") @@ -303,7 +303,7 @@ open class URLSessionDecodableRequestBuilder: URLSessionRequestBui let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? "" - completion(.success(Response(response: httpResponse, body: body as! T))) + completion(.success(Response(response: httpResponse, body: body as! T, bodyData: data))) case is URL.Type: do { @@ -334,7 +334,7 @@ open class URLSessionDecodableRequestBuilder: URLSessionRequestBui 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))) + completion(.success(Response(response: httpResponse, body: filePath as! T, bodyData: data))) } catch let requestParserError as DownloadException { completion(.failure(ErrorResponse.error(400, data, response, requestParserError))) @@ -344,30 +344,30 @@ open class URLSessionDecodableRequestBuilder: URLSessionRequestBui case is Void.Type: - completion(.success(Response(response: httpResponse, body: () as! T))) + completion(.success(Response(response: httpResponse, body: () as! T, bodyData: data))) case is Data.Type: - completion(.success(Response(response: httpResponse, body: data as! T))) + completion(.success(Response(response: httpResponse, body: data as! T, bodyData: data))) default: - guard let data = data, !data.isEmpty else { + guard let unwrappedData = data, !unwrappedData.isEmpty else { if let E = T.self as? ExpressibleByNilLiteral.Type { - completion(.success(Response(response: httpResponse, body: E.init(nilLiteral: ()) as! T))) + completion(.success(Response(response: httpResponse, body: E.init(nilLiteral: ()) as! T, bodyData: data))) } else { completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, response, DecodableRequestBuilderError.emptyDataResponse))) } return } - let decodeResult = CodableHelper.decode(T.self, from: data) + let decodeResult = CodableHelper.decode(T.self, from: unwrappedData) switch decodeResult { case let .success(decodableObj): - completion(.success(Response(response: httpResponse, body: decodableObj))) + completion(.success(Response(response: httpResponse, body: decodableObj, bodyData: unwrappedData))) case let .failure(error): - completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, response, error))) + completion(.failure(ErrorResponse.error(httpResponse.statusCode, unwrappedData, response, error))) } } } 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 9e20efc58f..6831ade504 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -86,14 +86,16 @@ internal class Response { internal let statusCode: Int internal let header: [String: String] internal let body: T + internal let bodyData: Data? - internal init(statusCode: Int, header: [String: String], body: T) { + internal init(statusCode: Int, header: [String: String], body: T, bodyData: Data?) { self.statusCode = statusCode self.header = header self.body = body + self.bodyData = bodyData } - internal convenience init(response: HTTPURLResponse, body: T) { + internal convenience init(response: HTTPURLResponse, body: T, bodyData: Data?) { let rawHeader = response.allHeaderFields var header = [String: String]() for (key, value) in rawHeader { @@ -101,7 +103,7 @@ internal class Response { header[key] = value } } - self.init(statusCode: response.statusCode, header: header, body: body) + self.init(statusCode: response.statusCode, header: header, body: body, bodyData: bodyData) } } 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 fd237a105d..e8f1e1ec61 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -208,7 +208,7 @@ internal class URLSessionRequestBuilder: RequestBuilder { switch T.self { case is Void.Type: - completion(.success(Response(response: httpResponse, body: () as! T))) + completion(.success(Response(response: httpResponse, body: () as! T, bodyData: data))) default: fatalError("Unsupported Response Body Type - \(String(describing: T.self))") @@ -303,7 +303,7 @@ internal class URLSessionDecodableRequestBuilder: URLSessionReques let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? "" - completion(.success(Response(response: httpResponse, body: body as! T))) + completion(.success(Response(response: httpResponse, body: body as! T, bodyData: data))) case is URL.Type: do { @@ -334,7 +334,7 @@ internal class URLSessionDecodableRequestBuilder: URLSessionReques 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))) + completion(.success(Response(response: httpResponse, body: filePath as! T, bodyData: data))) } catch let requestParserError as DownloadException { completion(.failure(ErrorResponse.error(400, data, response, requestParserError))) @@ -344,30 +344,30 @@ internal class URLSessionDecodableRequestBuilder: URLSessionReques case is Void.Type: - completion(.success(Response(response: httpResponse, body: () as! T))) + completion(.success(Response(response: httpResponse, body: () as! T, bodyData: data))) case is Data.Type: - completion(.success(Response(response: httpResponse, body: data as! T))) + completion(.success(Response(response: httpResponse, body: data as! T, bodyData: data))) default: - guard let data = data, !data.isEmpty else { + guard let unwrappedData = data, !unwrappedData.isEmpty else { if let E = T.self as? ExpressibleByNilLiteral.Type { - completion(.success(Response(response: httpResponse, body: E.init(nilLiteral: ()) as! T))) + completion(.success(Response(response: httpResponse, body: E.init(nilLiteral: ()) as! T, bodyData: data))) } else { completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, response, DecodableRequestBuilderError.emptyDataResponse))) } return } - let decodeResult = CodableHelper.decode(T.self, from: data) + let decodeResult = CodableHelper.decode(T.self, from: unwrappedData) switch decodeResult { case let .success(decodableObj): - completion(.success(Response(response: httpResponse, body: decodableObj))) + completion(.success(Response(response: httpResponse, body: decodableObj, bodyData: unwrappedData))) case let .failure(error): - completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, response, error))) + completion(.failure(ErrorResponse.error(httpResponse.statusCode, unwrappedData, response, error))) } } } 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 50cd5bff5f..b73c2b8fde 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -86,14 +86,16 @@ open class Response { public let statusCode: Int public let header: [String: String] public let body: T + public let bodyData: Data? - public init(statusCode: Int, header: [String: String], body: T) { + public init(statusCode: Int, header: [String: String], body: T, bodyData: Data?) { self.statusCode = statusCode self.header = header self.body = body + self.bodyData = bodyData } - public convenience init(response: HTTPURLResponse, body: T) { + public convenience init(response: HTTPURLResponse, body: T, bodyData: Data?) { let rawHeader = response.allHeaderFields var header = [String: String]() for (key, value) in rawHeader { @@ -101,7 +103,7 @@ open class Response { header[key] = value } } - self.init(statusCode: response.statusCode, header: header, body: body) + self.init(statusCode: response.statusCode, header: header, body: body, bodyData: bodyData) } } 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 3c7d97b470..635c69cd6a 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -208,7 +208,7 @@ open class URLSessionRequestBuilder: RequestBuilder { switch T.self { case is Void.Type: - completion(.success(Response(response: httpResponse, body: () as! T))) + completion(.success(Response(response: httpResponse, body: () as! T, bodyData: data))) default: fatalError("Unsupported Response Body Type - \(String(describing: T.self))") @@ -303,7 +303,7 @@ open class URLSessionDecodableRequestBuilder: URLSessionRequestBui let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? "" - completion(.success(Response(response: httpResponse, body: body as! T))) + completion(.success(Response(response: httpResponse, body: body as! T, bodyData: data))) case is URL.Type: do { @@ -334,7 +334,7 @@ open class URLSessionDecodableRequestBuilder: URLSessionRequestBui 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))) + completion(.success(Response(response: httpResponse, body: filePath as! T, bodyData: data))) } catch let requestParserError as DownloadException { completion(.failure(ErrorResponse.error(400, data, response, requestParserError))) @@ -344,30 +344,30 @@ open class URLSessionDecodableRequestBuilder: URLSessionRequestBui case is Void.Type: - completion(.success(Response(response: httpResponse, body: () as! T))) + completion(.success(Response(response: httpResponse, body: () as! T, bodyData: data))) case is Data.Type: - completion(.success(Response(response: httpResponse, body: data as! T))) + completion(.success(Response(response: httpResponse, body: data as! T, bodyData: data))) default: - guard let data = data, !data.isEmpty else { + guard let unwrappedData = data, !unwrappedData.isEmpty else { if let E = T.self as? ExpressibleByNilLiteral.Type { - completion(.success(Response(response: httpResponse, body: E.init(nilLiteral: ()) as! T))) + completion(.success(Response(response: httpResponse, body: E.init(nilLiteral: ()) as! T, bodyData: data))) } else { completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, response, DecodableRequestBuilderError.emptyDataResponse))) } return } - let decodeResult = CodableHelper.decode(T.self, from: data) + let decodeResult = CodableHelper.decode(T.self, from: unwrappedData) switch decodeResult { case let .success(decodableObj): - completion(.success(Response(response: httpResponse, body: decodableObj))) + completion(.success(Response(response: httpResponse, body: decodableObj, bodyData: unwrappedData))) case let .failure(error): - completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, response, error))) + completion(.failure(ErrorResponse.error(httpResponse.statusCode, unwrappedData, response, error))) } } } diff --git a/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/Models.swift index 50cd5bff5f..b73c2b8fde 100644 --- a/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -86,14 +86,16 @@ open class Response { public let statusCode: Int public let header: [String: String] public let body: T + public let bodyData: Data? - public init(statusCode: Int, header: [String: String], body: T) { + public init(statusCode: Int, header: [String: String], body: T, bodyData: Data?) { self.statusCode = statusCode self.header = header self.body = body + self.bodyData = bodyData } - public convenience init(response: HTTPURLResponse, body: T) { + public convenience init(response: HTTPURLResponse, body: T, bodyData: Data?) { let rawHeader = response.allHeaderFields var header = [String: String]() for (key, value) in rawHeader { @@ -101,7 +103,7 @@ open class Response { header[key] = value } } - self.init(statusCode: response.statusCode, header: header, body: body) + self.init(statusCode: response.statusCode, header: header, body: body, bodyData: bodyData) } } diff --git a/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index 3c7d97b470..635c69cd6a 100644 --- a/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -208,7 +208,7 @@ open class URLSessionRequestBuilder: RequestBuilder { switch T.self { case is Void.Type: - completion(.success(Response(response: httpResponse, body: () as! T))) + completion(.success(Response(response: httpResponse, body: () as! T, bodyData: data))) default: fatalError("Unsupported Response Body Type - \(String(describing: T.self))") @@ -303,7 +303,7 @@ open class URLSessionDecodableRequestBuilder: URLSessionRequestBui let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? "" - completion(.success(Response(response: httpResponse, body: body as! T))) + completion(.success(Response(response: httpResponse, body: body as! T, bodyData: data))) case is URL.Type: do { @@ -334,7 +334,7 @@ open class URLSessionDecodableRequestBuilder: URLSessionRequestBui 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))) + completion(.success(Response(response: httpResponse, body: filePath as! T, bodyData: data))) } catch let requestParserError as DownloadException { completion(.failure(ErrorResponse.error(400, data, response, requestParserError))) @@ -344,30 +344,30 @@ open class URLSessionDecodableRequestBuilder: URLSessionRequestBui case is Void.Type: - completion(.success(Response(response: httpResponse, body: () as! T))) + completion(.success(Response(response: httpResponse, body: () as! T, bodyData: data))) case is Data.Type: - completion(.success(Response(response: httpResponse, body: data as! T))) + completion(.success(Response(response: httpResponse, body: data as! T, bodyData: data))) default: - guard let data = data, !data.isEmpty else { + guard let unwrappedData = data, !unwrappedData.isEmpty else { if let E = T.self as? ExpressibleByNilLiteral.Type { - completion(.success(Response(response: httpResponse, body: E.init(nilLiteral: ()) as! T))) + completion(.success(Response(response: httpResponse, body: E.init(nilLiteral: ()) as! T, bodyData: data))) } else { completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, response, DecodableRequestBuilderError.emptyDataResponse))) } return } - let decodeResult = CodableHelper.decode(T.self, from: data) + let decodeResult = CodableHelper.decode(T.self, from: unwrappedData) switch decodeResult { case let .success(decodableObj): - completion(.success(Response(response: httpResponse, body: decodableObj))) + completion(.success(Response(response: httpResponse, body: decodableObj, bodyData: unwrappedData))) case let .failure(error): - completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, response, error))) + completion(.failure(ErrorResponse.error(httpResponse.statusCode, unwrappedData, response, error))) } } } 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 50cd5bff5f..b73c2b8fde 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -86,14 +86,16 @@ open class Response { public let statusCode: Int public let header: [String: String] public let body: T + public let bodyData: Data? - public init(statusCode: Int, header: [String: String], body: T) { + public init(statusCode: Int, header: [String: String], body: T, bodyData: Data?) { self.statusCode = statusCode self.header = header self.body = body + self.bodyData = bodyData } - public convenience init(response: HTTPURLResponse, body: T) { + public convenience init(response: HTTPURLResponse, body: T, bodyData: Data?) { let rawHeader = response.allHeaderFields var header = [String: String]() for (key, value) in rawHeader { @@ -101,7 +103,7 @@ open class Response { header[key] = value } } - self.init(statusCode: response.statusCode, header: header, body: body) + self.init(statusCode: response.statusCode, header: header, body: body, bodyData: bodyData) } } 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 3c7d97b470..635c69cd6a 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -208,7 +208,7 @@ open class URLSessionRequestBuilder: RequestBuilder { switch T.self { case is Void.Type: - completion(.success(Response(response: httpResponse, body: () as! T))) + completion(.success(Response(response: httpResponse, body: () as! T, bodyData: data))) default: fatalError("Unsupported Response Body Type - \(String(describing: T.self))") @@ -303,7 +303,7 @@ open class URLSessionDecodableRequestBuilder: URLSessionRequestBui let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? "" - completion(.success(Response(response: httpResponse, body: body as! T))) + completion(.success(Response(response: httpResponse, body: body as! T, bodyData: data))) case is URL.Type: do { @@ -334,7 +334,7 @@ open class URLSessionDecodableRequestBuilder: URLSessionRequestBui 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))) + completion(.success(Response(response: httpResponse, body: filePath as! T, bodyData: data))) } catch let requestParserError as DownloadException { completion(.failure(ErrorResponse.error(400, data, response, requestParserError))) @@ -344,30 +344,30 @@ open class URLSessionDecodableRequestBuilder: URLSessionRequestBui case is Void.Type: - completion(.success(Response(response: httpResponse, body: () as! T))) + completion(.success(Response(response: httpResponse, body: () as! T, bodyData: data))) case is Data.Type: - completion(.success(Response(response: httpResponse, body: data as! T))) + completion(.success(Response(response: httpResponse, body: data as! T, bodyData: data))) default: - guard let data = data, !data.isEmpty else { + guard let unwrappedData = data, !unwrappedData.isEmpty else { if let E = T.self as? ExpressibleByNilLiteral.Type { - completion(.success(Response(response: httpResponse, body: E.init(nilLiteral: ()) as! T))) + completion(.success(Response(response: httpResponse, body: E.init(nilLiteral: ()) as! T, bodyData: data))) } else { completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, response, DecodableRequestBuilderError.emptyDataResponse))) } return } - let decodeResult = CodableHelper.decode(T.self, from: data) + let decodeResult = CodableHelper.decode(T.self, from: unwrappedData) switch decodeResult { case let .success(decodableObj): - completion(.success(Response(response: httpResponse, body: decodableObj))) + completion(.success(Response(response: httpResponse, body: decodableObj, bodyData: unwrappedData))) case let .failure(error): - completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, response, error))) + completion(.failure(ErrorResponse.error(httpResponse.statusCode, unwrappedData, response, error))) } } } 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 50cd5bff5f..b73c2b8fde 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -86,14 +86,16 @@ open class Response { public let statusCode: Int public let header: [String: String] public let body: T + public let bodyData: Data? - public init(statusCode: Int, header: [String: String], body: T) { + public init(statusCode: Int, header: [String: String], body: T, bodyData: Data?) { self.statusCode = statusCode self.header = header self.body = body + self.bodyData = bodyData } - public convenience init(response: HTTPURLResponse, body: T) { + public convenience init(response: HTTPURLResponse, body: T, bodyData: Data?) { let rawHeader = response.allHeaderFields var header = [String: String]() for (key, value) in rawHeader { @@ -101,7 +103,7 @@ open class Response { header[key] = value } } - self.init(statusCode: response.statusCode, header: header, body: body) + self.init(statusCode: response.statusCode, header: header, body: body, bodyData: bodyData) } } 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 3c7d97b470..635c69cd6a 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -208,7 +208,7 @@ open class URLSessionRequestBuilder: RequestBuilder { switch T.self { case is Void.Type: - completion(.success(Response(response: httpResponse, body: () as! T))) + completion(.success(Response(response: httpResponse, body: () as! T, bodyData: data))) default: fatalError("Unsupported Response Body Type - \(String(describing: T.self))") @@ -303,7 +303,7 @@ open class URLSessionDecodableRequestBuilder: URLSessionRequestBui let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? "" - completion(.success(Response(response: httpResponse, body: body as! T))) + completion(.success(Response(response: httpResponse, body: body as! T, bodyData: data))) case is URL.Type: do { @@ -334,7 +334,7 @@ open class URLSessionDecodableRequestBuilder: URLSessionRequestBui 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))) + completion(.success(Response(response: httpResponse, body: filePath as! T, bodyData: data))) } catch let requestParserError as DownloadException { completion(.failure(ErrorResponse.error(400, data, response, requestParserError))) @@ -344,30 +344,30 @@ open class URLSessionDecodableRequestBuilder: URLSessionRequestBui case is Void.Type: - completion(.success(Response(response: httpResponse, body: () as! T))) + completion(.success(Response(response: httpResponse, body: () as! T, bodyData: data))) case is Data.Type: - completion(.success(Response(response: httpResponse, body: data as! T))) + completion(.success(Response(response: httpResponse, body: data as! T, bodyData: data))) default: - guard let data = data, !data.isEmpty else { + guard let unwrappedData = data, !unwrappedData.isEmpty else { if let E = T.self as? ExpressibleByNilLiteral.Type { - completion(.success(Response(response: httpResponse, body: E.init(nilLiteral: ()) as! T))) + completion(.success(Response(response: httpResponse, body: E.init(nilLiteral: ()) as! T, bodyData: data))) } else { completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, response, DecodableRequestBuilderError.emptyDataResponse))) } return } - let decodeResult = CodableHelper.decode(T.self, from: data) + let decodeResult = CodableHelper.decode(T.self, from: unwrappedData) switch decodeResult { case let .success(decodableObj): - completion(.success(Response(response: httpResponse, body: decodableObj))) + completion(.success(Response(response: httpResponse, body: decodableObj, bodyData: unwrappedData))) case let .failure(error): - completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, response, error))) + completion(.failure(ErrorResponse.error(httpResponse.statusCode, unwrappedData, response, error))) } } } 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 50cd5bff5f..b73c2b8fde 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -86,14 +86,16 @@ open class Response { public let statusCode: Int public let header: [String: String] public let body: T + public let bodyData: Data? - public init(statusCode: Int, header: [String: String], body: T) { + public init(statusCode: Int, header: [String: String], body: T, bodyData: Data?) { self.statusCode = statusCode self.header = header self.body = body + self.bodyData = bodyData } - public convenience init(response: HTTPURLResponse, body: T) { + public convenience init(response: HTTPURLResponse, body: T, bodyData: Data?) { let rawHeader = response.allHeaderFields var header = [String: String]() for (key, value) in rawHeader { @@ -101,7 +103,7 @@ open class Response { header[key] = value } } - self.init(statusCode: response.statusCode, header: header, body: body) + self.init(statusCode: response.statusCode, header: header, body: body, bodyData: bodyData) } } 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 3c7d97b470..635c69cd6a 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -208,7 +208,7 @@ open class URLSessionRequestBuilder: RequestBuilder { switch T.self { case is Void.Type: - completion(.success(Response(response: httpResponse, body: () as! T))) + completion(.success(Response(response: httpResponse, body: () as! T, bodyData: data))) default: fatalError("Unsupported Response Body Type - \(String(describing: T.self))") @@ -303,7 +303,7 @@ open class URLSessionDecodableRequestBuilder: URLSessionRequestBui let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? "" - completion(.success(Response(response: httpResponse, body: body as! T))) + completion(.success(Response(response: httpResponse, body: body as! T, bodyData: data))) case is URL.Type: do { @@ -334,7 +334,7 @@ open class URLSessionDecodableRequestBuilder: URLSessionRequestBui 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))) + completion(.success(Response(response: httpResponse, body: filePath as! T, bodyData: data))) } catch let requestParserError as DownloadException { completion(.failure(ErrorResponse.error(400, data, response, requestParserError))) @@ -344,30 +344,30 @@ open class URLSessionDecodableRequestBuilder: URLSessionRequestBui case is Void.Type: - completion(.success(Response(response: httpResponse, body: () as! T))) + completion(.success(Response(response: httpResponse, body: () as! T, bodyData: data))) case is Data.Type: - completion(.success(Response(response: httpResponse, body: data as! T))) + completion(.success(Response(response: httpResponse, body: data as! T, bodyData: data))) default: - guard let data = data, !data.isEmpty else { + guard let unwrappedData = data, !unwrappedData.isEmpty else { if let E = T.self as? ExpressibleByNilLiteral.Type { - completion(.success(Response(response: httpResponse, body: E.init(nilLiteral: ()) as! T))) + completion(.success(Response(response: httpResponse, body: E.init(nilLiteral: ()) as! T, bodyData: data))) } else { completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, response, DecodableRequestBuilderError.emptyDataResponse))) } return } - let decodeResult = CodableHelper.decode(T.self, from: data) + let decodeResult = CodableHelper.decode(T.self, from: unwrappedData) switch decodeResult { case let .success(decodableObj): - completion(.success(Response(response: httpResponse, body: decodableObj))) + completion(.success(Response(response: httpResponse, body: decodableObj, bodyData: unwrappedData))) case let .failure(error): - completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, response, error))) + completion(.failure(ErrorResponse.error(httpResponse.statusCode, unwrappedData, response, error))) } } } 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 50cd5bff5f..b73c2b8fde 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -86,14 +86,16 @@ open class Response { public let statusCode: Int public let header: [String: String] public let body: T + public let bodyData: Data? - public init(statusCode: Int, header: [String: String], body: T) { + public init(statusCode: Int, header: [String: String], body: T, bodyData: Data?) { self.statusCode = statusCode self.header = header self.body = body + self.bodyData = bodyData } - public convenience init(response: HTTPURLResponse, body: T) { + public convenience init(response: HTTPURLResponse, body: T, bodyData: Data?) { let rawHeader = response.allHeaderFields var header = [String: String]() for (key, value) in rawHeader { @@ -101,7 +103,7 @@ open class Response { header[key] = value } } - self.init(statusCode: response.statusCode, header: header, body: body) + self.init(statusCode: response.statusCode, header: header, body: body, bodyData: bodyData) } } 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 3c7d97b470..635c69cd6a 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -208,7 +208,7 @@ open class URLSessionRequestBuilder: RequestBuilder { switch T.self { case is Void.Type: - completion(.success(Response(response: httpResponse, body: () as! T))) + completion(.success(Response(response: httpResponse, body: () as! T, bodyData: data))) default: fatalError("Unsupported Response Body Type - \(String(describing: T.self))") @@ -303,7 +303,7 @@ open class URLSessionDecodableRequestBuilder: URLSessionRequestBui let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? "" - completion(.success(Response(response: httpResponse, body: body as! T))) + completion(.success(Response(response: httpResponse, body: body as! T, bodyData: data))) case is URL.Type: do { @@ -334,7 +334,7 @@ open class URLSessionDecodableRequestBuilder: URLSessionRequestBui 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))) + completion(.success(Response(response: httpResponse, body: filePath as! T, bodyData: data))) } catch let requestParserError as DownloadException { completion(.failure(ErrorResponse.error(400, data, response, requestParserError))) @@ -344,30 +344,30 @@ open class URLSessionDecodableRequestBuilder: URLSessionRequestBui case is Void.Type: - completion(.success(Response(response: httpResponse, body: () as! T))) + completion(.success(Response(response: httpResponse, body: () as! T, bodyData: data))) case is Data.Type: - completion(.success(Response(response: httpResponse, body: data as! T))) + completion(.success(Response(response: httpResponse, body: data as! T, bodyData: data))) default: - guard let data = data, !data.isEmpty else { + guard let unwrappedData = data, !unwrappedData.isEmpty else { if let E = T.self as? ExpressibleByNilLiteral.Type { - completion(.success(Response(response: httpResponse, body: E.init(nilLiteral: ()) as! T))) + completion(.success(Response(response: httpResponse, body: E.init(nilLiteral: ()) as! T, bodyData: data))) } else { completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, response, DecodableRequestBuilderError.emptyDataResponse))) } return } - let decodeResult = CodableHelper.decode(T.self, from: data) + let decodeResult = CodableHelper.decode(T.self, from: unwrappedData) switch decodeResult { case let .success(decodableObj): - completion(.success(Response(response: httpResponse, body: decodableObj))) + completion(.success(Response(response: httpResponse, body: decodableObj, bodyData: unwrappedData))) case let .failure(error): - completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, response, error))) + completion(.failure(ErrorResponse.error(httpResponse.statusCode, unwrappedData, response, error))) } } } diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models.swift index 50cd5bff5f..b73c2b8fde 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models.swift @@ -86,14 +86,16 @@ open class Response { public let statusCode: Int public let header: [String: String] public let body: T + public let bodyData: Data? - public init(statusCode: Int, header: [String: String], body: T) { + public init(statusCode: Int, header: [String: String], body: T, bodyData: Data?) { self.statusCode = statusCode self.header = header self.body = body + self.bodyData = bodyData } - public convenience init(response: HTTPURLResponse, body: T) { + public convenience init(response: HTTPURLResponse, body: T, bodyData: Data?) { let rawHeader = response.allHeaderFields var header = [String: String]() for (key, value) in rawHeader { @@ -101,7 +103,7 @@ open class Response { header[key] = value } } - self.init(statusCode: response.statusCode, header: header, body: body) + self.init(statusCode: response.statusCode, header: header, body: body, bodyData: bodyData) } } diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/URLSessionImplementations.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/URLSessionImplementations.swift index 3c7d97b470..635c69cd6a 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/URLSessionImplementations.swift @@ -208,7 +208,7 @@ open class URLSessionRequestBuilder: RequestBuilder { switch T.self { case is Void.Type: - completion(.success(Response(response: httpResponse, body: () as! T))) + completion(.success(Response(response: httpResponse, body: () as! T, bodyData: data))) default: fatalError("Unsupported Response Body Type - \(String(describing: T.self))") @@ -303,7 +303,7 @@ open class URLSessionDecodableRequestBuilder: URLSessionRequestBui let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? "" - completion(.success(Response(response: httpResponse, body: body as! T))) + completion(.success(Response(response: httpResponse, body: body as! T, bodyData: data))) case is URL.Type: do { @@ -334,7 +334,7 @@ open class URLSessionDecodableRequestBuilder: URLSessionRequestBui 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))) + completion(.success(Response(response: httpResponse, body: filePath as! T, bodyData: data))) } catch let requestParserError as DownloadException { completion(.failure(ErrorResponse.error(400, data, response, requestParserError))) @@ -344,30 +344,30 @@ open class URLSessionDecodableRequestBuilder: URLSessionRequestBui case is Void.Type: - completion(.success(Response(response: httpResponse, body: () as! T))) + completion(.success(Response(response: httpResponse, body: () as! T, bodyData: data))) case is Data.Type: - completion(.success(Response(response: httpResponse, body: data as! T))) + completion(.success(Response(response: httpResponse, body: data as! T, bodyData: data))) default: - guard let data = data, !data.isEmpty else { + guard let unwrappedData = data, !unwrappedData.isEmpty else { if let E = T.self as? ExpressibleByNilLiteral.Type { - completion(.success(Response(response: httpResponse, body: E.init(nilLiteral: ()) as! T))) + completion(.success(Response(response: httpResponse, body: E.init(nilLiteral: ()) as! T, bodyData: data))) } else { completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, response, DecodableRequestBuilderError.emptyDataResponse))) } return } - let decodeResult = CodableHelper.decode(T.self, from: data) + let decodeResult = CodableHelper.decode(T.self, from: unwrappedData) switch decodeResult { case let .success(decodableObj): - completion(.success(Response(response: httpResponse, body: decodableObj))) + completion(.success(Response(response: httpResponse, body: decodableObj, bodyData: unwrappedData))) case let .failure(error): - completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, response, error))) + completion(.failure(ErrorResponse.error(httpResponse.statusCode, unwrappedData, response, error))) } } } diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models.swift index 50cd5bff5f..b73c2b8fde 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -86,14 +86,16 @@ open class Response { public let statusCode: Int public let header: [String: String] public let body: T + public let bodyData: Data? - public init(statusCode: Int, header: [String: String], body: T) { + public init(statusCode: Int, header: [String: String], body: T, bodyData: Data?) { self.statusCode = statusCode self.header = header self.body = body + self.bodyData = bodyData } - public convenience init(response: HTTPURLResponse, body: T) { + public convenience init(response: HTTPURLResponse, body: T, bodyData: Data?) { let rawHeader = response.allHeaderFields var header = [String: String]() for (key, value) in rawHeader { @@ -101,7 +103,7 @@ open class Response { header[key] = value } } - self.init(statusCode: response.statusCode, header: header, body: body) + self.init(statusCode: response.statusCode, header: header, body: body, bodyData: bodyData) } } diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index 3c7d97b470..635c69cd6a 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -208,7 +208,7 @@ open class URLSessionRequestBuilder: RequestBuilder { switch T.self { case is Void.Type: - completion(.success(Response(response: httpResponse, body: () as! T))) + completion(.success(Response(response: httpResponse, body: () as! T, bodyData: data))) default: fatalError("Unsupported Response Body Type - \(String(describing: T.self))") @@ -303,7 +303,7 @@ open class URLSessionDecodableRequestBuilder: URLSessionRequestBui let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? "" - completion(.success(Response(response: httpResponse, body: body as! T))) + completion(.success(Response(response: httpResponse, body: body as! T, bodyData: data))) case is URL.Type: do { @@ -334,7 +334,7 @@ open class URLSessionDecodableRequestBuilder: URLSessionRequestBui 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))) + completion(.success(Response(response: httpResponse, body: filePath as! T, bodyData: data))) } catch let requestParserError as DownloadException { completion(.failure(ErrorResponse.error(400, data, response, requestParserError))) @@ -344,30 +344,30 @@ open class URLSessionDecodableRequestBuilder: URLSessionRequestBui case is Void.Type: - completion(.success(Response(response: httpResponse, body: () as! T))) + completion(.success(Response(response: httpResponse, body: () as! T, bodyData: data))) case is Data.Type: - completion(.success(Response(response: httpResponse, body: data as! T))) + completion(.success(Response(response: httpResponse, body: data as! T, bodyData: data))) default: - guard let data = data, !data.isEmpty else { + guard let unwrappedData = data, !unwrappedData.isEmpty else { if let E = T.self as? ExpressibleByNilLiteral.Type { - completion(.success(Response(response: httpResponse, body: E.init(nilLiteral: ()) as! T))) + completion(.success(Response(response: httpResponse, body: E.init(nilLiteral: ()) as! T, bodyData: data))) } else { completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, response, DecodableRequestBuilderError.emptyDataResponse))) } return } - let decodeResult = CodableHelper.decode(T.self, from: data) + let decodeResult = CodableHelper.decode(T.self, from: unwrappedData) switch decodeResult { case let .success(decodableObj): - completion(.success(Response(response: httpResponse, body: decodableObj))) + completion(.success(Response(response: httpResponse, body: decodableObj, bodyData: unwrappedData))) case let .failure(error): - completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, response, error))) + completion(.failure(ErrorResponse.error(httpResponse.statusCode, unwrappedData, response, error))) } } } From 42264aadd75bb4944005e31189d4a9aaf3aec17c Mon Sep 17 00:00:00 2001 From: Larry O'Leary Date: Mon, 14 Nov 2022 16:28:36 -0600 Subject: [PATCH 020/189] Fix invalid Python import for qualified package name (#14015) * Add unittest for toModelImport * Use `packageName` insetad of `packagePath()` --- .../codegen/languages/PythonClientCodegen.java | 2 +- .../openapitools/codegen/python/PythonClientTest.java | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java index de0b5bd79b..965bbd3535 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java @@ -889,7 +889,7 @@ public class PythonClientCodegen extends AbstractPythonCodegen { @Override public String toModelImport(String name) { // name looks like Cat - return "from " + packagePath() + "." + modelPackage() + "." + toModelFilename(name) + " import " + toModelName(name); + return "from " + packageName + "." + modelPackage() + "." + toModelFilename(name) + " import " + toModelName(name); } @Override diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonClientTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonClientTest.java index 8034a688f2..698aaf89db 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonClientTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonClientTest.java @@ -224,4 +224,13 @@ public class PythonClientTest { Assert.assertEquals(enumVars.get(0).get("name"), "DIGIT_THREE_67B9C"); Assert.assertEquals(enumVars.get(1).get("name"), "FFA5A4"); } + + @Test(description = "format imports of models using a package containing dots") + public void testImportWithQualifiedPackageName() throws Exception { + final PythonClientCodegen codegen = new PythonClientCodegen(); + codegen.setPackageName("openapi.client"); + + String importValue = codegen.toModelImport("model_name"); + Assert.assertEquals(importValue, "from openapi.client.model.model_name import ModelName"); + } } \ No newline at end of file From 77226981b665feac73422f55bc6f9c8fbd59088e Mon Sep 17 00:00:00 2001 From: Nick Malfroy-Camine Date: Tue, 15 Nov 2022 12:07:19 -0500 Subject: [PATCH 021/189] Make sure ts-ignore is ignoring right line (#14011) * Make sure ts-ignore is ignoring right line * generated samples --- .../src/main/resources/typescript-axios/baseApi.mustache | 2 +- .../with-separate-models-and-api-inheritance/base.ts | 2 +- .../petstore/typescript-axios/builds/composed-schemas/base.ts | 2 +- samples/client/petstore/typescript-axios/builds/default/base.ts | 2 +- .../client/petstore/typescript-axios/builds/es6-target/base.ts | 2 +- .../petstore/typescript-axios/builds/test-petstore/base.ts | 2 +- .../typescript-axios/builds/with-complex-headers/base.ts | 2 +- .../base.ts | 2 +- .../petstore/typescript-axios/builds/with-interfaces/base.ts | 2 +- .../petstore/typescript-axios/builds/with-node-imports/base.ts | 2 +- .../builds/with-npm-version-and-separate-models-and-api/base.ts | 2 +- .../petstore/typescript-axios/builds/with-npm-version/base.ts | 2 +- .../builds/with-single-request-parameters/base.ts | 2 +- .../petstore/typescript-axios/builds/with-string-enums/base.ts | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/typescript-axios/baseApi.mustache b/modules/openapi-generator/src/main/resources/typescript-axios/baseApi.mustache index 6f3ee1bddd..1daf5146b6 100755 --- a/modules/openapi-generator/src/main/resources/typescript-axios/baseApi.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-axios/baseApi.mustache @@ -3,9 +3,9 @@ {{>licenseInfo}} import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; // Some imports not used depending on template conditions // @ts-ignore +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; export const BASE_PATH = "{{{basePath}}}".replace(/\/+$/, ""); diff --git a/samples/client/others/typescript-axios/with-separate-models-and-api-inheritance/base.ts b/samples/client/others/typescript-axios/with-separate-models-and-api-inheritance/base.ts index 3c3717e605..6c505d0bfb 100644 --- a/samples/client/others/typescript-axios/with-separate-models-and-api-inheritance/base.ts +++ b/samples/client/others/typescript-axios/with-separate-models-and-api-inheritance/base.ts @@ -14,9 +14,9 @@ import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; // Some imports not used depending on template conditions // @ts-ignore +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; export const BASE_PATH = "http://localhost".replace(/\/+$/, ""); diff --git a/samples/client/petstore/typescript-axios/builds/composed-schemas/base.ts b/samples/client/petstore/typescript-axios/builds/composed-schemas/base.ts index 7a04aaa189..f9785646f5 100644 --- a/samples/client/petstore/typescript-axios/builds/composed-schemas/base.ts +++ b/samples/client/petstore/typescript-axios/builds/composed-schemas/base.ts @@ -14,9 +14,9 @@ import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; // Some imports not used depending on template conditions // @ts-ignore +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; export const BASE_PATH = "http://api.example.xyz/v1".replace(/\/+$/, ""); diff --git a/samples/client/petstore/typescript-axios/builds/default/base.ts b/samples/client/petstore/typescript-axios/builds/default/base.ts index c279e56310..fb2bbd0eef 100644 --- a/samples/client/petstore/typescript-axios/builds/default/base.ts +++ b/samples/client/petstore/typescript-axios/builds/default/base.ts @@ -14,9 +14,9 @@ import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; // Some imports not used depending on template conditions // @ts-ignore +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, ""); diff --git a/samples/client/petstore/typescript-axios/builds/es6-target/base.ts b/samples/client/petstore/typescript-axios/builds/es6-target/base.ts index c279e56310..fb2bbd0eef 100644 --- a/samples/client/petstore/typescript-axios/builds/es6-target/base.ts +++ b/samples/client/petstore/typescript-axios/builds/es6-target/base.ts @@ -14,9 +14,9 @@ import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; // Some imports not used depending on template conditions // @ts-ignore +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, ""); diff --git a/samples/client/petstore/typescript-axios/builds/test-petstore/base.ts b/samples/client/petstore/typescript-axios/builds/test-petstore/base.ts index 694f781cdc..df5d57f7a0 100644 --- a/samples/client/petstore/typescript-axios/builds/test-petstore/base.ts +++ b/samples/client/petstore/typescript-axios/builds/test-petstore/base.ts @@ -14,9 +14,9 @@ import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; // Some imports not used depending on template conditions // @ts-ignore +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; export const BASE_PATH = "http://petstore.swagger.io:80/v2".replace(/\/+$/, ""); diff --git a/samples/client/petstore/typescript-axios/builds/with-complex-headers/base.ts b/samples/client/petstore/typescript-axios/builds/with-complex-headers/base.ts index c279e56310..fb2bbd0eef 100644 --- a/samples/client/petstore/typescript-axios/builds/with-complex-headers/base.ts +++ b/samples/client/petstore/typescript-axios/builds/with-complex-headers/base.ts @@ -14,9 +14,9 @@ import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; // Some imports not used depending on template conditions // @ts-ignore +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, ""); diff --git a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/base.ts b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/base.ts index 694f781cdc..df5d57f7a0 100644 --- a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/base.ts +++ b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/base.ts @@ -14,9 +14,9 @@ import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; // Some imports not used depending on template conditions // @ts-ignore +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; export const BASE_PATH = "http://petstore.swagger.io:80/v2".replace(/\/+$/, ""); diff --git a/samples/client/petstore/typescript-axios/builds/with-interfaces/base.ts b/samples/client/petstore/typescript-axios/builds/with-interfaces/base.ts index c279e56310..fb2bbd0eef 100644 --- a/samples/client/petstore/typescript-axios/builds/with-interfaces/base.ts +++ b/samples/client/petstore/typescript-axios/builds/with-interfaces/base.ts @@ -14,9 +14,9 @@ import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; // Some imports not used depending on template conditions // @ts-ignore +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, ""); diff --git a/samples/client/petstore/typescript-axios/builds/with-node-imports/base.ts b/samples/client/petstore/typescript-axios/builds/with-node-imports/base.ts index c279e56310..fb2bbd0eef 100644 --- a/samples/client/petstore/typescript-axios/builds/with-node-imports/base.ts +++ b/samples/client/petstore/typescript-axios/builds/with-node-imports/base.ts @@ -14,9 +14,9 @@ import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; // Some imports not used depending on template conditions // @ts-ignore +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, ""); diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/base.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/base.ts index c279e56310..fb2bbd0eef 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/base.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/base.ts @@ -14,9 +14,9 @@ import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; // Some imports not used depending on template conditions // @ts-ignore +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, ""); diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version/base.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version/base.ts index c279e56310..fb2bbd0eef 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version/base.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version/base.ts @@ -14,9 +14,9 @@ import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; // Some imports not used depending on template conditions // @ts-ignore +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, ""); diff --git a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/base.ts b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/base.ts index c279e56310..fb2bbd0eef 100644 --- a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/base.ts +++ b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/base.ts @@ -14,9 +14,9 @@ import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; // Some imports not used depending on template conditions // @ts-ignore +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, ""); diff --git a/samples/client/petstore/typescript-axios/builds/with-string-enums/base.ts b/samples/client/petstore/typescript-axios/builds/with-string-enums/base.ts index c279e56310..fb2bbd0eef 100644 --- a/samples/client/petstore/typescript-axios/builds/with-string-enums/base.ts +++ b/samples/client/petstore/typescript-axios/builds/with-string-enums/base.ts @@ -14,9 +14,9 @@ import type { Configuration } from './configuration'; -import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; // Some imports not used depending on template conditions // @ts-ignore +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, ""); From 92ecee8c27bd583cc3bdd597f0ed0a919026394d Mon Sep 17 00:00:00 2001 From: Jeremy Audet Date: Tue, 15 Nov 2022 20:40:28 -0500 Subject: [PATCH 022/189] Don't cast list to tuple in python-prior binding (#14014) * Add test for python-prior type conversion error In the spirit of test driven development, this test intentionally fails. A following commit will fix the code to comply with the test. See: https://github.com/OpenAPITools/openapi-generator/issues/14012 * Don't cast list to tuple in python-prior binding Tweak the python-prior API bindings, so that they no longer cast lists to tuples when making a POST request with a multipart/form-data content-type. This fixes an interaction with `urllib3.request_encode_body`, whose `fields` parameter expects tuples, not lists. cc @spacether See: https://urllib3.readthedocs.io/en/stable/reference/urllib3.request.html Fix: https://github.com/OpenAPITools/openapi-generator/issues/14012 --- .../python-prior/api_client.mustache | 4 +- .../python-prior/petstore_api/api_client.py | 4 +- .../petstore_api/api_client.py | 4 +- .../x_auth_id_alias/api_client.py | 4 +- .../python-prior/petstore_api/api_client.py | 4 +- .../tests_manual/test_fake_api.py | 45 +++++++++++++++++++ 6 files changed, 60 insertions(+), 5 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/python-prior/api_client.mustache b/modules/openapi-generator/src/main/resources/python-prior/api_client.mustache index f11b14d6d4..410fa822c6 100644 --- a/modules/openapi-generator/src/main/resources/python-prior/api_client.mustache +++ b/modules/openapi-generator/src/main/resources/python-prior/api_client.mustache @@ -298,8 +298,10 @@ class ApiClient(object): return obj.isoformat() elif isinstance(obj, ModelSimple): return cls.sanitize_for_serialization(obj.value) - elif isinstance(obj, (list, tuple)): + elif isinstance(obj, list): return [cls.sanitize_for_serialization(item) for item in obj] + elif isinstance(obj, tuple): + return tuple(cls.sanitize_for_serialization(item) for item in obj) if isinstance(obj, dict): return {key: cls.sanitize_for_serialization(val) for key, val in obj.items()} raise ApiValueError( diff --git a/samples/client/petstore/python-prior/petstore_api/api_client.py b/samples/client/petstore/python-prior/petstore_api/api_client.py index be6a892491..3c9e7a5f68 100644 --- a/samples/client/petstore/python-prior/petstore_api/api_client.py +++ b/samples/client/petstore/python-prior/petstore_api/api_client.py @@ -286,8 +286,10 @@ class ApiClient(object): return obj.isoformat() elif isinstance(obj, ModelSimple): return cls.sanitize_for_serialization(obj.value) - elif isinstance(obj, (list, tuple)): + elif isinstance(obj, list): return [cls.sanitize_for_serialization(item) for item in obj] + elif isinstance(obj, tuple): + return tuple(cls.sanitize_for_serialization(item) for item in obj) if isinstance(obj, dict): return {key: cls.sanitize_for_serialization(val) for key, val in obj.items()} raise ApiValueError( diff --git a/samples/client/petstore/python-prior_disallowAdditionalPropertiesIfNotPresent/petstore_api/api_client.py b/samples/client/petstore/python-prior_disallowAdditionalPropertiesIfNotPresent/petstore_api/api_client.py index be6a892491..3c9e7a5f68 100644 --- a/samples/client/petstore/python-prior_disallowAdditionalPropertiesIfNotPresent/petstore_api/api_client.py +++ b/samples/client/petstore/python-prior_disallowAdditionalPropertiesIfNotPresent/petstore_api/api_client.py @@ -286,8 +286,10 @@ class ApiClient(object): return obj.isoformat() elif isinstance(obj, ModelSimple): return cls.sanitize_for_serialization(obj.value) - elif isinstance(obj, (list, tuple)): + elif isinstance(obj, list): return [cls.sanitize_for_serialization(item) for item in obj] + elif isinstance(obj, tuple): + return tuple(cls.sanitize_for_serialization(item) for item in obj) if isinstance(obj, dict): return {key: cls.sanitize_for_serialization(val) for key, val in obj.items()} raise ApiValueError( diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/python-prior/x_auth_id_alias/api_client.py b/samples/openapi3/client/extensions/x-auth-id-alias/python-prior/x_auth_id_alias/api_client.py index e6c0b2e060..2a0b446252 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/python-prior/x_auth_id_alias/api_client.py +++ b/samples/openapi3/client/extensions/x-auth-id-alias/python-prior/x_auth_id_alias/api_client.py @@ -286,8 +286,10 @@ class ApiClient(object): return obj.isoformat() elif isinstance(obj, ModelSimple): return cls.sanitize_for_serialization(obj.value) - elif isinstance(obj, (list, tuple)): + elif isinstance(obj, list): return [cls.sanitize_for_serialization(item) for item in obj] + elif isinstance(obj, tuple): + return tuple(cls.sanitize_for_serialization(item) for item in obj) if isinstance(obj, dict): return {key: cls.sanitize_for_serialization(val) for key, val in obj.items()} raise ApiValueError( diff --git a/samples/openapi3/client/petstore/python-prior/petstore_api/api_client.py b/samples/openapi3/client/petstore/python-prior/petstore_api/api_client.py index c14f1d0f1b..ad9920c602 100644 --- a/samples/openapi3/client/petstore/python-prior/petstore_api/api_client.py +++ b/samples/openapi3/client/petstore/python-prior/petstore_api/api_client.py @@ -286,8 +286,10 @@ class ApiClient(object): return obj.isoformat() elif isinstance(obj, ModelSimple): return cls.sanitize_for_serialization(obj.value) - elif isinstance(obj, (list, tuple)): + elif isinstance(obj, list): return [cls.sanitize_for_serialization(item) for item in obj] + elif isinstance(obj, tuple): + return tuple(cls.sanitize_for_serialization(item) for item in obj) if isinstance(obj, dict): return {key: cls.sanitize_for_serialization(val) for key, val in obj.items()} raise ApiValueError( diff --git a/samples/openapi3/client/petstore/python-prior/tests_manual/test_fake_api.py b/samples/openapi3/client/petstore/python-prior/tests_manual/test_fake_api.py index 12e391238e..36a515d49c 100644 --- a/samples/openapi3/client/petstore/python-prior/tests_manual/test_fake_api.py +++ b/samples/openapi3/client/petstore/python-prior/tests_manual/test_fake_api.py @@ -14,8 +14,11 @@ from collections import namedtuple import os import json import unittest +from pathlib import Path from unittest.mock import patch +from urllib3.request import RequestMethods + import petstore_api from petstore_api.api.fake_api import FakeApi # noqa: E501 from petstore_api.rest import RESTClientObject, RESTResponse @@ -490,6 +493,48 @@ class TestFakeApi(unittest.TestCase): finally: file.close() + def test_upload_with_mime_type(self): + """Upload a file, while setting a MIME type for that file. + + Verify that: + + * ``post_params`` may contain a three-tuple in the form ``(file_name, file_handle, + file_mime_type)`` + * This three-tuple is passed to urllib3 as a tuple, without being converted to a list. + + See: + + * https://github.com/OpenAPITools/openapi-generator/issues/14012 + * https://urllib3.readthedocs.io/en/stable/reference/urllib3.request.html + """ + file_path = Path(__file__, "..", "..", "testfiles", "1px_pic1.png").resolve() + file_mime_type = "image/png" + with patch.object(RequestMethods, 'request') as request: + with open(file_path, mode="rb") as file_handle: + request.return_value.status = 200 + resp = self.api.api_client.call_api( + resource_path="/fake/uploadFile", + method="POST", + header_params={"Content-Type": "multipart/form-data"}, + post_params={"file": (file_path.name, file_handle, file_mime_type)}, + ) + + # a single multipart/form-data POST call was made, with a single form field + request.assert_called_once() + fields = request.call_args.kwargs['fields'] + self.assertEqual(len(fields), 1, fields) + field = fields[0] + + # it is in the form (form_field_name, (filename, filedata, mimetype)) + self.assertEqual(field[0], "file") + self.assertEqual(field[1][0], file_path.name) + with open(file_path, mode="rb") as file_handle: + self.assertEqual(field[1][1], file_handle.read()) + self.assertEqual(field[1][2], file_mime_type) + + # the form field value wasn't cast to a list + self.assertIsInstance(fields[0][1], tuple) + def test_download_attachment(self): """Ensures that file deserialization works""" From 5e50ff47b01295796e7215d979842a5408782818 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20=C3=81vila?= <88654688+juanavilactn@users.noreply.github.com> Date: Thu, 17 Nov 2022 14:55:45 +0100 Subject: [PATCH 023/189] [JAVA][RETROFIT2] Include java.util.Set in fullJavaUtil imports (#14048) * Include java.util.Set in fullJavaUtil imports * Update java-retrofit2 samples --- .../src/main/resources/Java/libraries/retrofit2/api.mustache | 1 + .../main/java/org/openapitools/client/api/AnotherFakeApi.java | 1 + .../src/main/java/org/openapitools/client/api/FakeApi.java | 1 + .../org/openapitools/client/api/FakeClassnameTags123Api.java | 1 + .../src/main/java/org/openapitools/client/api/PetApi.java | 1 + .../src/main/java/org/openapitools/client/api/StoreApi.java | 1 + .../src/main/java/org/openapitools/client/api/UserApi.java | 1 + .../main/java/org/openapitools/client/api/AnotherFakeApi.java | 1 + .../src/main/java/org/openapitools/client/api/FakeApi.java | 1 + .../org/openapitools/client/api/FakeClassnameTags123Api.java | 1 + .../src/main/java/org/openapitools/client/api/PetApi.java | 1 + .../src/main/java/org/openapitools/client/api/StoreApi.java | 1 + .../src/main/java/org/openapitools/client/api/UserApi.java | 1 + .../main/java/org/openapitools/client/api/AnotherFakeApi.java | 1 + .../src/main/java/org/openapitools/client/api/FakeApi.java | 1 + .../org/openapitools/client/api/FakeClassnameTags123Api.java | 1 + .../src/main/java/org/openapitools/client/api/PetApi.java | 1 + .../src/main/java/org/openapitools/client/api/StoreApi.java | 1 + .../src/main/java/org/openapitools/client/api/UserApi.java | 1 + 19 files changed, 19 insertions(+) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/api.mustache index 82c3fe068c..75418b07c1 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/retrofit2/api.mustache @@ -33,6 +33,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Set; {{/fullJavaUtil}} {{#operations}} diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index 944e3de5ce..ebfb008e72 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -15,6 +15,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Set; public interface AnotherFakeApi { /** diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/api/FakeApi.java index 033d6d3b73..e00e4eb681 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/api/FakeApi.java @@ -23,6 +23,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Set; public interface FakeApi { /** diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index 50c015a503..849a8e5a8e 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -15,6 +15,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Set; public interface FakeClassnameTags123Api { /** diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/api/PetApi.java index 72876069be..b77df3eb64 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/api/PetApi.java @@ -18,6 +18,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Set; public interface PetApi { /** diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/api/StoreApi.java index 3a71697751..cc41f2c78b 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/api/StoreApi.java @@ -15,6 +15,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Set; public interface StoreApi { /** diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/api/UserApi.java index 02f041e675..d0618bbdf6 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/api/UserApi.java @@ -16,6 +16,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Set; public interface UserApi { /** diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index 1299cf84b2..3c2273b377 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -16,6 +16,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Set; public interface AnotherFakeApi { /** diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/api/FakeApi.java index c6c66d3764..6347d08144 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/api/FakeApi.java @@ -24,6 +24,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Set; public interface FakeApi { /** diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index 503798776d..5b14d084bb 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -16,6 +16,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Set; public interface FakeClassnameTags123Api { /** diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/api/PetApi.java index ab57b951c2..d4de52bf6a 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/api/PetApi.java @@ -19,6 +19,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Set; public interface PetApi { /** diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/api/StoreApi.java index c865bfbe53..d49ab1a200 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/api/StoreApi.java @@ -16,6 +16,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Set; public interface StoreApi { /** diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/api/UserApi.java index 6bbb058dc1..ed1141d537 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/api/UserApi.java @@ -17,6 +17,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Set; public interface UserApi { /** diff --git a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index 3fb4359eb9..52a0987156 100644 --- a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -16,6 +16,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Set; public interface AnotherFakeApi { /** diff --git a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/api/FakeApi.java index 2d388c9b7f..0cabd81624 100644 --- a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/api/FakeApi.java @@ -24,6 +24,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Set; public interface FakeApi { /** diff --git a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index 9a95837b21..22e1b05613 100644 --- a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -16,6 +16,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Set; public interface FakeClassnameTags123Api { /** diff --git a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/api/PetApi.java index 348e524baf..8f97dc331e 100644 --- a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/api/PetApi.java @@ -19,6 +19,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Set; public interface PetApi { /** diff --git a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/api/StoreApi.java index 2002a8e309..2439a4bcb5 100644 --- a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/api/StoreApi.java @@ -16,6 +16,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Set; public interface StoreApi { /** diff --git a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/api/UserApi.java index e396214837..920589a609 100644 --- a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/api/UserApi.java @@ -17,6 +17,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Set; public interface UserApi { /** From e25f8c5d6129e575a2ff886416ce32ac8c0bcb00 Mon Sep 17 00:00:00 2001 From: Alexei Bratuhin Date: Thu, 17 Nov 2022 16:22:52 +0100 Subject: [PATCH 024/189] Add support for @GZIP in jaxrs-spec Quarkus templates (#13983) * adjust templates for @GZIP * add test * remove debug output --- .../languages/JavaJAXRSSpecServerCodegen.java | 12 ++++++ .../spec/libraries/quarkus/api.mustache | 39 +++++++++++++++++++ .../libraries/quarkus/apiInterface.mustache | 23 +++++++++++ .../spec/libraries/quarkus/apiMethod.mustache | 26 +++++++++++++ .../quarkus/application.properties.mustache | 7 +++- .../jaxrs/JavaJAXRSSpecServerCodegenTest.java | 35 +++++++++++++++-- 6 files changed, 138 insertions(+), 4 deletions(-) create mode 100644 modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/api.mustache create mode 100644 modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/apiInterface.mustache create mode 100644 modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/apiMethod.mustache diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJAXRSSpecServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJAXRSSpecServerCodegen.java index d996d7f83d..54f68e7aaa 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJAXRSSpecServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJAXRSSpecServerCodegen.java @@ -25,6 +25,8 @@ import org.openapitools.codegen.meta.features.DocumentationFeature; import java.io.File; import java.util.Map; +import static org.openapitools.codegen.languages.features.GzipFeatures.USE_GZIP_FEATURE; + public class JavaJAXRSSpecServerCodegen extends AbstractJavaJAXRSServerCodegen { public static final String INTERFACE_ONLY = "interfaceOnly"; @@ -45,6 +47,8 @@ public class JavaJAXRSSpecServerCodegen extends AbstractJavaJAXRSServerCodegen { private boolean generatePom = true; private boolean generateBuilders = false; private boolean useSwaggerAnnotations = true; + + protected boolean useGzipFeature = false; private boolean useJackson = false; private String openApiSpecFileLocation = "src/main/openapi/openapi.yaml"; @@ -155,6 +159,7 @@ public class JavaJAXRSSpecServerCodegen extends AbstractJavaJAXRSServerCodegen { } else if(OPEN_LIBERTY_LIBRARY.equals(library)) { openApiSpecFileLocation = "src/main/webapp/META-INF/openapi.yaml"; } + additionalProperties.put(OPEN_API_SPEC_FILE_LOCATION, openApiSpecFileLocation); useJackson = convertPropertyToBoolean(JACKSON); @@ -228,6 +233,13 @@ public class JavaJAXRSSpecServerCodegen extends AbstractJavaJAXRSServerCodegen { } else if(KUMULUZEE_LIBRARY.equals(library)) { supportingFiles.add(new SupportingFile("config.yaml.mustache", "src/main/resources", "config.yaml")); } + + if (additionalProperties.containsKey(USE_GZIP_FEATURE)) { + useGzipFeature = Boolean.parseBoolean(additionalProperties.get(USE_GZIP_FEATURE).toString()); + if (!useGzipFeature) { + additionalProperties.remove(USE_GZIP_FEATURE); + } + } } @Override diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/api.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/api.mustache new file mode 100644 index 0000000000..e0fbaaed63 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/api.mustache @@ -0,0 +1,39 @@ +package {{package}}; + +{{#imports}}import {{import}}; +{{/imports}} + +import javax.ws.rs.*; +import javax.ws.rs.core.Response; + +{{#useGzipFeature}} +import org.jboss.resteasy.annotations.GZIP; +{{/useGzipFeature}} + +{{#useSwaggerAnnotations}} +import io.swagger.annotations.*; +{{/useSwaggerAnnotations}} +{{#supportAsync}} +import java.util.concurrent.CompletionStage; +import java.util.concurrent.CompletableFuture; +{{/supportAsync}} + +import java.io.InputStream; +import java.util.Map; +import java.util.List; +{{#useBeanValidation}}import javax.validation.constraints.*; +import javax.validation.Valid;{{/useBeanValidation}} + +@Path("{{commonPath}}"){{#useSwaggerAnnotations}} +@Api(description = "the {{{baseName}}} API"){{/useSwaggerAnnotations}}{{#hasConsumes}} +@Consumes({ {{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}} }){{/hasConsumes}}{{#hasProduces}} +@Produces({ {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} }){{/hasProduces}} +{{>generatedAnnotation}} +public {{#interfaceOnly}}interface{{/interfaceOnly}}{{^interfaceOnly}}class{{/interfaceOnly}} {{classname}} { +{{#operations}} +{{#operation}} + +{{#interfaceOnly}}{{>apiInterface}}{{/interfaceOnly}}{{^interfaceOnly}}{{>apiMethod}}{{/interfaceOnly}} +{{/operation}} +} +{{/operations}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/apiInterface.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/apiInterface.mustache new file mode 100644 index 0000000000..0d492c1d4c --- /dev/null +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/apiInterface.mustache @@ -0,0 +1,23 @@ + {{#useGzipFeature}} + @GZIP + {{/useGzipFeature}} + @{{httpMethod}}{{#subresourceOperation}} + @Path("{{{path}}}"){{/subresourceOperation}}{{#hasConsumes}} + @Consumes({ {{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}} }){{/hasConsumes}}{{#hasProduces}} + @Produces({ {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} }){{/hasProduces}}{{#useSwaggerAnnotations}} + @ApiOperation(value = "{{{summary}}}", notes = "{{{notes}}}"{{#hasAuthMethods}}, authorizations = { + {{#authMethods}}{{#isOAuth}}@Authorization(value = "{{name}}", scopes = { + {{#scopes}}@AuthorizationScope(scope = "{{scope}}", description = "{{description}}"){{^-last}}, + {{/-last}}{{/scopes}} }){{^-last}},{{/-last}}{{/isOAuth}} + {{^isOAuth}}@Authorization(value = "{{name}}"){{^-last}},{{/-last}} + {{/isOAuth}}{{/authMethods}} }{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}"{{^-last}}, {{/-last}}{{/vendorExtensions.x-tags}} }) + {{#implicitHeadersParams.0}} + @io.swagger.annotations.ApiImplicitParams({ + {{#implicitHeadersParams}} + @io.swagger.annotations.ApiImplicitParam(name = "{{{baseName}}}", value = "{{{description}}}", {{#required}}required = true,{{/required}} dataType = "{{{dataType}}}", paramType = "header"){{^-last}},{{/-last}} + {{/implicitHeadersParams}} + }) + {{/implicitHeadersParams.0}} + @ApiResponses(value = { {{#responses}} + @ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{baseType}}}.class{{#returnContainer}}, responseContainer = "{{{.}}}"{{/returnContainer}}){{^-last}},{{/-last}}{{/responses}} }){{/useSwaggerAnnotations}} + {{#supportAsync}}{{>returnAsyncTypeInterface}}{{/supportAsync}}{{^supportAsync}}{{#returnResponse}}Response{{/returnResponse}}{{^returnResponse}}{{>returnTypeInterface}}{{/returnResponse}}{{/supportAsync}} {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{^-last}},{{/-last}}{{/allParams}}); \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/apiMethod.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/apiMethod.mustache new file mode 100644 index 0000000000..15d5b8a52e --- /dev/null +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/apiMethod.mustache @@ -0,0 +1,26 @@ + {{#useGzipFeature}} + @GZIP + {{/useGzipFeature}} + @{{httpMethod}}{{#subresourceOperation}} + @Path("{{{path}}}"){{/subresourceOperation}}{{#hasConsumes}} + @Consumes({ {{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}} }){{/hasConsumes}}{{#hasProduces}} + @Produces({ {{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}} }){{/hasProduces}}{{#useSwaggerAnnotations}} + @ApiOperation(value = "{{{summary}}}", notes = "{{{notes}}}", response = {{{returnBaseType}}}.class{{#returnContainer}}, responseContainer = "{{{.}}}"{{/returnContainer}}{{#hasAuthMethods}}, authorizations = { + {{#authMethods}}{{#isOAuth}}@Authorization(value = "{{name}}", scopes = { + {{#scopes}}@AuthorizationScope(scope = "{{scope}}", description = "{{description}}"){{^-last}}, + {{/-last}}{{/scopes}} }){{^-last}},{{/-last}}{{/isOAuth}} + {{^isOAuth}}@Authorization(value = "{{name}}"){{^-last}},{{/-last}} + {{/isOAuth}}{{/authMethods}} }{{/hasAuthMethods}}, tags={ {{#vendorExtensions.x-tags}}"{{tag}}"{{^-last}}, {{/-last}}{{/vendorExtensions.x-tags}} }) + {{#implicitHeadersParams.0}} + @io.swagger.annotations.ApiImplicitParams({ + {{#implicitHeadersParams}} + @io.swagger.annotations.ApiImplicitParam(name = "{{{baseName}}}", value = "{{{description}}}", {{#required}}required = true,{{/required}} dataType = "{{{dataType}}}", paramType = "header"){{^-last}},{{/-last}} + {{/implicitHeadersParams}} + }) + {{/implicitHeadersParams.0}} + @ApiResponses(value = { {{#responses}} + @ApiResponse(code = {{{code}}}, message = "{{{message}}}", response = {{{baseType}}}.class{{#containerType}}, responseContainer = "{{{.}}}"{{/containerType}}){{^-last}},{{/-last}}{{/responses}} + }){{/useSwaggerAnnotations}} + public {{#supportAsync}}CompletionStage<{{/supportAsync}}Response{{#supportAsync}}>{{/supportAsync}} {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>cookieParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{^-last}},{{/-last}}{{/allParams}}) { + return {{#supportAsync}}CompletableFuture.supplyAsync(() -> {{/supportAsync}}Response.ok().entity("magic!").build(){{#supportAsync}}){{/supportAsync}}; + } \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/application.properties.mustache b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/application.properties.mustache index 959a92cb4b..54d251726e 100644 --- a/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/application.properties.mustache +++ b/modules/openapi-generator/src/main/resources/JavaJaxRS/spec/libraries/quarkus/application.properties.mustache @@ -1,4 +1,9 @@ # Configuration file # key = value -mp.openapi.scan.disable=true \ No newline at end of file +mp.openapi.scan.disable=true + +{{#useGzipFeature}} +quarkus.resteasy.gzip.enabled=true +quarkus.resteasy.gzip.max-input=10M +{{/useGzipFeature}} \ No newline at end of file diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJAXRSSpecServerCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJAXRSSpecServerCodegenTest.java index 7f5937ee7c..48af9282fd 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJAXRSSpecServerCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJAXRSSpecServerCodegenTest.java @@ -30,9 +30,8 @@ import java.util.stream.Collectors; import static org.openapitools.codegen.TestUtils.assertFileContains; import static org.openapitools.codegen.TestUtils.validateJavaSourceFiles; import static org.openapitools.codegen.languages.AbstractJavaJAXRSServerCodegen.USE_TAGS; -import static org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen.INTERFACE_ONLY; -import static org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen.RETURN_RESPONSE; -import static org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen.SUPPORT_ASYNC; +import static org.openapitools.codegen.languages.JavaJAXRSSpecServerCodegen.*; +import static org.openapitools.codegen.languages.features.GzipFeatures.USE_GZIP_FEATURE; import static org.testng.Assert.assertTrue; import com.google.common.collect.ImmutableMap; @@ -725,4 +724,34 @@ public class JavaJAXRSSpecServerCodegenTest extends JavaJaxrsBaseTest { "\nprivate @Valid List arrayThatIsNotNull = new ArrayList<>();\n"); } + + @Test + public void generateApiForQuarkusWithGzipFeature() throws Exception { + final File output = Files.createTempDirectory("test").toFile(); + output.deleteOnExit(); + + final OpenAPI openAPI = new OpenAPIParser() + .readLocation("src/test/resources/3_0/ping.yaml", null, new ParseOptions()).getOpenAPI(); + + codegen.setOutputDir(output.getAbsolutePath()); + codegen.setLibrary(QUARKUS_LIBRARY); + codegen.additionalProperties().put(USE_GZIP_FEATURE, true); + + final ClientOptInput input = new ClientOptInput() + .openAPI(openAPI) + .config(codegen); //Using JavaJAXRSSpecServerCodegen + + final DefaultGenerator generator = new DefaultGenerator(); + final List files = generator.opts(input).generate(); //When generating files + + //Then the java files are compilable + validateJavaSourceFiles(files); + + //And the generated class contains CompletionStage + TestUtils.ensureContainsFile(files, output, "src/gen/java/org/openapitools/api/PingApi.java"); + assertFileContains(output.toPath().resolve("src/gen/java/org/openapitools/api/PingApi.java"), + "\nimport org.jboss.resteasy.annotations.GZIP\n", + "@GZIP\n" + ); + } } From 40e04df0966e344d1c2a1ebb901c85d47e5707bb Mon Sep 17 00:00:00 2001 From: Oleh Kurpiak Date: Thu, 17 Nov 2022 17:27:59 +0200 Subject: [PATCH 025/189] [Java][Native] handle empty response body (#13993) --- .../Java/libraries/native/api.mustache | 11 ++++--- .../client/api/AnotherFakeApi.java | 6 ++-- .../org/openapitools/client/api/FakeApi.java | 30 ++++++++++++------- .../client/api/FakeClassnameTags123Api.java | 6 ++-- .../org/openapitools/client/api/PetApi.java | 30 ++++++++++++------- .../org/openapitools/client/api/StoreApi.java | 18 +++++++---- .../org/openapitools/client/api/UserApi.java | 12 +++++--- .../client/api/AnotherFakeApi.java | 3 +- .../org/openapitools/client/api/FakeApi.java | 15 ++++++---- .../client/api/FakeClassnameTags123Api.java | 3 +- .../org/openapitools/client/api/PetApi.java | 15 ++++++---- .../org/openapitools/client/api/StoreApi.java | 9 ++++-- .../org/openapitools/client/api/UserApi.java | 6 ++-- 13 files changed, 109 insertions(+), 55 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/native/api.mustache index 0255e20c1f..4d30cbe57b 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/native/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/native/api.mustache @@ -185,8 +185,9 @@ public class {{classname}} { } {{#returnType}} try { + String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference<{{{returnType}}}>() {}) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference<{{{returnType}}}>() {}) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -236,10 +237,11 @@ public class {{classname}} { if (localVarResponse.statusCode()/ 100 != 2) { throw getApiException("{{operationId}}", localVarResponse); } - return new ApiResponse<{{{returnType}}}{{^returnType}}Void{{/returnType}}>( + {{#returnType}}InputStream responseBody = localVarResponse.body(); + {{/returnType}}return new ApiResponse<{{{returnType}}}{{^returnType}}Void{{/returnType}}>( localVarResponse.statusCode(), localVarResponse.headers().map(), - {{#returnType}}memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference<{{{returnType}}}>() {}) // closes the InputStream{{/returnType}} + {{#returnType}}responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference<{{{returnType}}}>() {}) // closes the InputStream{{/returnType}} {{^returnType}}null{{/returnType}} ); } finally { @@ -273,11 +275,12 @@ public class {{classname}} { } {{#returnType}} try { + String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( new ApiResponse<{{{returnType}}}>( localVarResponse.statusCode(), localVarResponse.headers().map(), - memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference<{{{returnType}}}>() {})) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference<{{{returnType}}}>() {})) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index f90b4a8b8d..729e87bdcb 100644 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -92,8 +92,9 @@ public class AnotherFakeApi { return CompletableFuture.failedFuture(getApiException("call123testSpecialTags", localVarResponse)); } try { + String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -125,11 +126,12 @@ public class AnotherFakeApi { return CompletableFuture.failedFuture(getApiException("call123testSpecialTags", localVarResponse)); } try { + String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {})) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {})) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/FakeApi.java index a298ba02b7..80be8d99f2 100644 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/FakeApi.java @@ -183,8 +183,9 @@ public class FakeApi { return CompletableFuture.failedFuture(getApiException("fakeOuterBooleanSerialize", localVarResponse)); } try { + String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -216,11 +217,12 @@ public class FakeApi { return CompletableFuture.failedFuture(getApiException("fakeOuterBooleanSerialize", localVarResponse)); } try { + String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {})) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {})) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -275,8 +277,9 @@ public class FakeApi { return CompletableFuture.failedFuture(getApiException("fakeOuterCompositeSerialize", localVarResponse)); } try { + String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -308,11 +311,12 @@ public class FakeApi { return CompletableFuture.failedFuture(getApiException("fakeOuterCompositeSerialize", localVarResponse)); } try { + String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {})) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {})) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -367,8 +371,9 @@ public class FakeApi { return CompletableFuture.failedFuture(getApiException("fakeOuterNumberSerialize", localVarResponse)); } try { + String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -400,11 +405,12 @@ public class FakeApi { return CompletableFuture.failedFuture(getApiException("fakeOuterNumberSerialize", localVarResponse)); } try { + String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {})) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {})) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -459,8 +465,9 @@ public class FakeApi { return CompletableFuture.failedFuture(getApiException("fakeOuterStringSerialize", localVarResponse)); } try { + String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -492,11 +499,12 @@ public class FakeApi { return CompletableFuture.failedFuture(getApiException("fakeOuterStringSerialize", localVarResponse)); } try { + String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {})) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {})) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -727,8 +735,9 @@ public class FakeApi { return CompletableFuture.failedFuture(getApiException("testClientModel", localVarResponse)); } try { + String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -760,11 +769,12 @@ public class FakeApi { return CompletableFuture.failedFuture(getApiException("testClientModel", localVarResponse)); } try { + String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {})) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {})) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index d95460c377..d70a04ac72 100644 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -92,8 +92,9 @@ public class FakeClassnameTags123Api { return CompletableFuture.failedFuture(getApiException("testClassname", localVarResponse)); } try { + String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -125,11 +126,12 @@ public class FakeClassnameTags123Api { return CompletableFuture.failedFuture(getApiException("testClassname", localVarResponse)); } try { + String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {})) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {})) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/PetApi.java index 8c25d40efd..7a473d5882 100644 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/PetApi.java @@ -261,8 +261,9 @@ public class PetApi { return CompletableFuture.failedFuture(getApiException("findPetsByStatus", localVarResponse)); } try { + String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference>() {}) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -294,11 +295,12 @@ public class PetApi { return CompletableFuture.failedFuture(getApiException("findPetsByStatus", localVarResponse)); } try { + String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), - memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference>() {})) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference>() {})) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -362,8 +364,9 @@ public class PetApi { return CompletableFuture.failedFuture(getApiException("findPetsByTags", localVarResponse)); } try { + String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference>() {}) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -397,11 +400,12 @@ public class PetApi { return CompletableFuture.failedFuture(getApiException("findPetsByTags", localVarResponse)); } try { + String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), - memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference>() {})) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference>() {})) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -463,8 +467,9 @@ public class PetApi { return CompletableFuture.failedFuture(getApiException("getPetById", localVarResponse)); } try { + String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -496,11 +501,12 @@ public class PetApi { return CompletableFuture.failedFuture(getApiException("getPetById", localVarResponse)); } try { + String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {})) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {})) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -721,8 +727,9 @@ public class PetApi { return CompletableFuture.failedFuture(getApiException("uploadFile", localVarResponse)); } try { + String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -756,11 +763,12 @@ public class PetApi { return CompletableFuture.failedFuture(getApiException("uploadFile", localVarResponse)); } try { + String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {})) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {})) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -816,8 +824,9 @@ public class PetApi { return CompletableFuture.failedFuture(getApiException("uploadFileWithRequiredFile", localVarResponse)); } try { + String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -851,11 +860,12 @@ public class PetApi { return CompletableFuture.failedFuture(getApiException("uploadFileWithRequiredFile", localVarResponse)); } try { + String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {})) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {})) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/StoreApi.java index 8a4ab19b20..73fbf0c1bd 100644 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/StoreApi.java @@ -169,8 +169,9 @@ public class StoreApi { return CompletableFuture.failedFuture(getApiException("getInventory", localVarResponse)); } try { + String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference>() {}) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -201,11 +202,12 @@ public class StoreApi { return CompletableFuture.failedFuture(getApiException("getInventory", localVarResponse)); } try { + String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), - memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference>() {})) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference>() {})) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -254,8 +256,9 @@ public class StoreApi { return CompletableFuture.failedFuture(getApiException("getOrderById", localVarResponse)); } try { + String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -287,11 +290,12 @@ public class StoreApi { return CompletableFuture.failedFuture(getApiException("getOrderById", localVarResponse)); } try { + String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {})) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {})) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -345,8 +349,9 @@ public class StoreApi { return CompletableFuture.failedFuture(getApiException("placeOrder", localVarResponse)); } try { + String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -378,11 +383,12 @@ public class StoreApi { return CompletableFuture.failedFuture(getApiException("placeOrder", localVarResponse)); } try { + String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {})) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {})) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/UserApi.java index 00baaa16c9..57fb6bf7a8 100644 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/UserApi.java @@ -420,8 +420,9 @@ public class UserApi { return CompletableFuture.failedFuture(getApiException("getUserByName", localVarResponse)); } try { + String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -453,11 +454,12 @@ public class UserApi { return CompletableFuture.failedFuture(getApiException("getUserByName", localVarResponse)); } try { + String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {})) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {})) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -512,8 +514,9 @@ public class UserApi { return CompletableFuture.failedFuture(getApiException("loginUser", localVarResponse)); } try { + String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( - memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); @@ -546,11 +549,12 @@ public class UserApi { return CompletableFuture.failedFuture(getApiException("loginUser", localVarResponse)); } try { + String responseBody = localVarResponse.body(); return CompletableFuture.completedFuture( new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {})) + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {})) ); } catch (IOException e) { return CompletableFuture.failedFuture(new ApiException(e)); diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index 89012de66a..c647634e91 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -106,10 +106,11 @@ public class AnotherFakeApi { if (localVarResponse.statusCode()/ 100 != 2) { throw getApiException("call123testSpecialTags", localVarResponse); } + InputStream responseBody = localVarResponse.body(); return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) // closes the InputStream ); } finally { diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/FakeApi.java index 99907ea48c..382ae5e0c5 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/FakeApi.java @@ -195,10 +195,11 @@ public class FakeApi { if (localVarResponse.statusCode()/ 100 != 2) { throw getApiException("fakeOuterBooleanSerialize", localVarResponse); } + InputStream responseBody = localVarResponse.body(); return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) // closes the InputStream ); } finally { @@ -269,10 +270,11 @@ public class FakeApi { if (localVarResponse.statusCode()/ 100 != 2) { throw getApiException("fakeOuterCompositeSerialize", localVarResponse); } + InputStream responseBody = localVarResponse.body(); return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) // closes the InputStream ); } finally { @@ -343,10 +345,11 @@ public class FakeApi { if (localVarResponse.statusCode()/ 100 != 2) { throw getApiException("fakeOuterNumberSerialize", localVarResponse); } + InputStream responseBody = localVarResponse.body(); return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) // closes the InputStream ); } finally { @@ -417,10 +420,11 @@ public class FakeApi { if (localVarResponse.statusCode()/ 100 != 2) { throw getApiException("fakeOuterStringSerialize", localVarResponse); } + InputStream responseBody = localVarResponse.body(); return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) // closes the InputStream ); } finally { @@ -663,10 +667,11 @@ public class FakeApi { if (localVarResponse.statusCode()/ 100 != 2) { throw getApiException("testClientModel", localVarResponse); } + InputStream responseBody = localVarResponse.body(); return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) // closes the InputStream ); } finally { diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index 771eac351e..97a6e1fd2b 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -106,10 +106,11 @@ public class FakeClassnameTags123Api { if (localVarResponse.statusCode()/ 100 != 2) { throw getApiException("testClassname", localVarResponse); } + InputStream responseBody = localVarResponse.body(); return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) // closes the InputStream ); } finally { diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/PetApi.java index e9a450449a..eb825b7555 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/PetApi.java @@ -271,10 +271,11 @@ public class PetApi { if (localVarResponse.statusCode()/ 100 != 2) { throw getApiException("findPetsByStatus", localVarResponse); } + InputStream responseBody = localVarResponse.body(); return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), - memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference>() {}) // closes the InputStream + responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}) // closes the InputStream ); } finally { @@ -356,10 +357,11 @@ public class PetApi { if (localVarResponse.statusCode()/ 100 != 2) { throw getApiException("findPetsByTags", localVarResponse); } + InputStream responseBody = localVarResponse.body(); return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), - memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference>() {}) // closes the InputStream + responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}) // closes the InputStream ); } finally { @@ -437,10 +439,11 @@ public class PetApi { if (localVarResponse.statusCode()/ 100 != 2) { throw getApiException("getPetById", localVarResponse); } + InputStream responseBody = localVarResponse.body(); return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) // closes the InputStream ); } finally { @@ -675,10 +678,11 @@ public class PetApi { if (localVarResponse.statusCode()/ 100 != 2) { throw getApiException("uploadFile", localVarResponse); } + InputStream responseBody = localVarResponse.body(); return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) // closes the InputStream ); } finally { @@ -752,10 +756,11 @@ public class PetApi { if (localVarResponse.statusCode()/ 100 != 2) { throw getApiException("uploadFileWithRequiredFile", localVarResponse); } + InputStream responseBody = localVarResponse.body(); return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) // closes the InputStream ); } finally { diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/StoreApi.java index 75fca36444..c813f3c22e 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/StoreApi.java @@ -180,10 +180,11 @@ public class StoreApi { if (localVarResponse.statusCode()/ 100 != 2) { throw getApiException("getInventory", localVarResponse); } + InputStream responseBody = localVarResponse.body(); return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), - memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference>() {}) // closes the InputStream + responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}) // closes the InputStream ); } finally { @@ -248,10 +249,11 @@ public class StoreApi { if (localVarResponse.statusCode()/ 100 != 2) { throw getApiException("getOrderById", localVarResponse); } + InputStream responseBody = localVarResponse.body(); return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) // closes the InputStream ); } finally { @@ -321,10 +323,11 @@ public class StoreApi { if (localVarResponse.statusCode()/ 100 != 2) { throw getApiException("placeOrder", localVarResponse); } + InputStream responseBody = localVarResponse.body(); return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) // closes the InputStream ); } finally { diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/UserApi.java index c260c74f1e..7617c7c60f 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/UserApi.java @@ -426,10 +426,11 @@ public class UserApi { if (localVarResponse.statusCode()/ 100 != 2) { throw getApiException("getUserByName", localVarResponse); } + InputStream responseBody = localVarResponse.body(); return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) // closes the InputStream ); } finally { @@ -501,10 +502,11 @@ public class UserApi { if (localVarResponse.statusCode()/ 100 != 2) { throw getApiException("loginUser", localVarResponse); } + InputStream responseBody = localVarResponse.body(); return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) // closes the InputStream ); } finally { From 74441fde9f7031aa971d1ee8cd7262957b1ba089 Mon Sep 17 00:00:00 2001 From: devhl-labs Date: Thu, 17 Nov 2022 11:50:29 -0500 Subject: [PATCH 026/189] [csharp-netcore] Removed net5, added net7 (#14003) * removed net5, added net7 * bumped github action dotnet version --- .github/workflows/samples-dotnet.yaml | 2 +- ...nAPIClient-generichost-netcore5.0-nrt.yaml | 2 +- ...-OpenAPIClient-generichost-netcore5.0.yaml | 2 +- .../csharp-netcore-OpenAPIClient-net50.yaml | 2 +- docs/generators/csharp-netcore.md | 2 +- .../languages/CSharpNetCoreClientCodegen.java | 11 ++-- .../README.md | 4 +- .../Org.OpenAPITools.Test.csproj | 2 +- .../Org.OpenAPITools/Org.OpenAPITools.csproj | 2 +- .../README.md | 4 +- .../Org.OpenAPITools.Test.csproj | 2 +- .../Org.OpenAPITools/Org.OpenAPITools.csproj | 2 +- .../OpenAPIClient-net5.0/docs/FakeApi.md | 56 ++++++++-------- .../OpenAPIClient-net5.0/docs/PetApi.md | 32 +++++----- .../Org.OpenAPITools.Test.csproj | 3 +- .../src/Org.OpenAPITools/Api/FakeApi.cs | 64 +++++++++---------- .../src/Org.OpenAPITools/Api/PetApi.cs | 64 +++++++++---------- .../Org.OpenAPITools/Org.OpenAPITools.csproj | 3 +- 18 files changed, 130 insertions(+), 129 deletions(-) diff --git a/.github/workflows/samples-dotnet.yaml b/.github/workflows/samples-dotnet.yaml index 56a8ec2d4d..328a3527c8 100644 --- a/.github/workflows/samples-dotnet.yaml +++ b/.github/workflows/samples-dotnet.yaml @@ -29,7 +29,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-dotnet@v3.0.3 with: - dotnet-version: '6.0.x' + dotnet-version: '7.0.x' - name: Build working-directory: ${{ matrix.sample }} run: dotnet build Org.OpenAPITools.sln diff --git a/bin/configs/csharp-netcore-OpenAPIClient-generichost-netcore5.0-nrt.yaml b/bin/configs/csharp-netcore-OpenAPIClient-generichost-netcore5.0-nrt.yaml index d234b5399f..ae882e5771 100644 --- a/bin/configs/csharp-netcore-OpenAPIClient-generichost-netcore5.0-nrt.yaml +++ b/bin/configs/csharp-netcore-OpenAPIClient-generichost-netcore5.0-nrt.yaml @@ -8,5 +8,5 @@ additionalProperties: packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}' useCompareNetObjects: true disallowAdditionalPropertiesIfNotPresent: false - targetFramework: net6.0 + targetFramework: net7.0 nullableReferenceTypes: true diff --git a/bin/configs/csharp-netcore-OpenAPIClient-generichost-netcore5.0.yaml b/bin/configs/csharp-netcore-OpenAPIClient-generichost-netcore5.0.yaml index 1b07cd23c2..4e36214bc5 100644 --- a/bin/configs/csharp-netcore-OpenAPIClient-generichost-netcore5.0.yaml +++ b/bin/configs/csharp-netcore-OpenAPIClient-generichost-netcore5.0.yaml @@ -8,5 +8,5 @@ additionalProperties: packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}' useCompareNetObjects: true disallowAdditionalPropertiesIfNotPresent: false - targetFramework: net6.0 + targetFramework: net7.0 nullableReferenceTypes: false diff --git a/bin/configs/csharp-netcore-OpenAPIClient-net50.yaml b/bin/configs/csharp-netcore-OpenAPIClient-net50.yaml index 9036f89e02..a4fec62e03 100644 --- a/bin/configs/csharp-netcore-OpenAPIClient-net50.yaml +++ b/bin/configs/csharp-netcore-OpenAPIClient-net50.yaml @@ -8,4 +8,4 @@ additionalProperties: useCompareNetObjects: true disallowAdditionalPropertiesIfNotPresent: false useOneOfDiscriminatorLookup: true - targetFramework: net5.0 + targetFramework: net7.0 diff --git a/docs/generators/csharp-netcore.md b/docs/generators/csharp-netcore.md index 481ffa3fee..8f929b158e 100644 --- a/docs/generators/csharp-netcore.md +++ b/docs/generators/csharp-netcore.md @@ -42,7 +42,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |releaseNote|Release note, default to 'Minor update'.| |Minor update| |returnICollection|Return ICollection<T> instead of the concrete type.| |false| |sourceFolder|source folder for generated code| |src| -|targetFramework|The target .NET framework version. To target multiple frameworks, use `;` as the separator, e.g. `netstandard2.1;netcoreapp3.1`|
**netstandard1.3**
.NET Standard 1.3 compatible
**netstandard1.4**
.NET Standard 1.4 compatible
**netstandard1.5**
.NET Standard 1.5 compatible
**netstandard1.6**
.NET Standard 1.6 compatible
**netstandard2.0**
.NET Standard 2.0 compatible
**netstandard2.1**
.NET Standard 2.1 compatible
**netcoreapp3.1**
.NET Core 3.1 compatible
**net47**
.NET Framework 4.7 compatible
**net48**
.NET Framework 4.8 compatible
**net5.0**
.NET 5.0 compatible
**net6.0**
.NET 6.0 compatible
|netstandard2.0| +|targetFramework|The target .NET framework version. To target multiple frameworks, use `;` as the separator, e.g. `netstandard2.1;netcoreapp3.1`|
**netstandard1.3**
.NET Standard 1.3 compatible
**netstandard1.4**
.NET Standard 1.4 compatible
**netstandard1.5**
.NET Standard 1.5 compatible
**netstandard1.6**
.NET Standard 1.6 compatible
**netstandard2.0**
.NET Standard 2.0 compatible
**netstandard2.1**
.NET Standard 2.1 compatible
**netcoreapp3.1**
.NET Core 3.1 compatible (End of Support 13 Dec 2022)
**net47**
.NET Framework 4.7 compatible
**net48**
.NET Framework 4.8 compatible
**net6.0**
.NET 6.0 compatible
**net7.0**
.NET 7.0 compatible
|netstandard2.0| |useCollection|Deserialize array types to Collection<T> instead of List<T>.| |false| |useDateTimeOffset|Use DateTimeOffset to model date-time properties| |false| |useOneOfDiscriminatorLookup|Use the discriminator's mapping in oneOf to speed up the model lookup. IMPORTANT: Validation (e.g. one and only one match in oneOf's schemas) will be skipped.| |false| diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreClientCodegen.java index 7f11cbbfdb..76075c0986 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreClientCodegen.java @@ -79,8 +79,8 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen { FrameworkStrategy.NETCOREAPP_3_1, FrameworkStrategy.NETFRAMEWORK_4_7, FrameworkStrategy.NETFRAMEWORK_4_8, - FrameworkStrategy.NET_5_0, - FrameworkStrategy.NET_6_0 + FrameworkStrategy.NET_6_0, + FrameworkStrategy.NET_7_0 ); private static FrameworkStrategy defaultFramework = FrameworkStrategy.NETSTANDARD_2_0; protected final Map frameworks; @@ -731,7 +731,6 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen { if (!additionalProperties.containsKey(CodegenConstants.NULLABLE_REFERENCE_TYPES) && !strategies.stream().anyMatch(s -> s.equals(FrameworkStrategy.NETCOREAPP_3_1) || - s.equals(FrameworkStrategy.NET_5_0) || s.equals(FrameworkStrategy.NETFRAMEWORK_4_8) || s.equals(FrameworkStrategy.NETFRAMEWORK_4_7))) { // starting in .net 6.0, NRT is enabled by default. If not specified, lets enable NRT to match the framework's default @@ -1243,16 +1242,16 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen { }; static FrameworkStrategy NETSTANDARD_2_1 = new FrameworkStrategy("netstandard2.1", ".NET Standard 2.1 compatible", "netcoreapp3.1") { }; - static FrameworkStrategy NETCOREAPP_3_1 = new FrameworkStrategy("netcoreapp3.1", ".NET Core 3.1 compatible", "netcoreapp3.1", Boolean.FALSE) { + static FrameworkStrategy NETCOREAPP_3_1 = new FrameworkStrategy("netcoreapp3.1", ".NET Core 3.1 compatible (End of Support 13 Dec 2022)", "netcoreapp3.1", Boolean.FALSE) { }; static FrameworkStrategy NETFRAMEWORK_4_7 = new FrameworkStrategy("net47", ".NET Framework 4.7 compatible", "net47", Boolean.FALSE) { }; static FrameworkStrategy NETFRAMEWORK_4_8 = new FrameworkStrategy("net48", ".NET Framework 4.8 compatible", "net48", Boolean.FALSE) { }; - static FrameworkStrategy NET_5_0 = new FrameworkStrategy("net5.0", ".NET 5.0 compatible", "net5.0", Boolean.FALSE) { - }; static FrameworkStrategy NET_6_0 = new FrameworkStrategy("net6.0", ".NET 6.0 compatible", "net6.0", Boolean.FALSE) { }; + static FrameworkStrategy NET_7_0 = new FrameworkStrategy("net7.0", ".NET 7.0 compatible", "net7.0", Boolean.FALSE) { + }; protected String name; protected String description; protected String testTargetFramework; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/README.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/README.md index b2a159fd0a..de89d86a36 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/README.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/README.md @@ -6,7 +6,7 @@ ```ps1 $properties = @( 'apiName=Api', - 'targetFramework=net6.0', + 'targetFramework=net7.0', 'validatable=true', 'nullableReferenceTypes=true', 'hideGenerationTimestamp=true', @@ -250,7 +250,7 @@ Authentication schemes defined for the API: - returnICollection: false - sortParamsByRequiredFlag: - sourceFolder: src -- targetFramework: net6.0 +- targetFramework: net7.0 - useCollection: false - useDateTimeOffset: false - useOneOfDiscriminatorLookup: false diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj index 141777c62a..0a1564bcf5 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj @@ -3,7 +3,7 @@ Org.OpenAPITools.Test Org.OpenAPITools.Test - net6.0 + net7.0 false enable diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Org.OpenAPITools.csproj index 63301d3295..88fc199939 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Org.OpenAPITools.csproj +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Org.OpenAPITools.csproj @@ -2,7 +2,7 @@ true - net6.0 + net7.0 Org.OpenAPITools Org.OpenAPITools Library diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/README.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/README.md index 6c332bb5d1..8a401855f4 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/README.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/README.md @@ -6,7 +6,7 @@ ```ps1 $properties = @( 'apiName=Api', - 'targetFramework=net6.0', + 'targetFramework=net7.0', 'validatable=true', 'nullableReferenceTypes=false', 'hideGenerationTimestamp=true', @@ -250,7 +250,7 @@ Authentication schemes defined for the API: - returnICollection: false - sortParamsByRequiredFlag: - sourceFolder: src -- targetFramework: net6.0 +- targetFramework: net7.0 - useCollection: false - useDateTimeOffset: false - useOneOfDiscriminatorLookup: false diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj index d5b9ccb183..8d17c12883 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj @@ -3,7 +3,7 @@ Org.OpenAPITools.Test Org.OpenAPITools.Test - net6.0 + net7.0 false diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Org.OpenAPITools.csproj index 20de1a9f24..5fce68767c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Org.OpenAPITools.csproj +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Org.OpenAPITools.csproj @@ -2,7 +2,7 @@ true - net6.0 + net7.0 Org.OpenAPITools Org.OpenAPITools Library diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/FakeApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/FakeApi.md index 212d1d35c4..2651845104 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/FakeApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/FakeApi.md @@ -195,7 +195,7 @@ No authorization required # **FakeOuterCompositeSerialize** -> OuterComposite FakeOuterCompositeSerialize (OuterComposite outerComposite = null) +> OuterComposite FakeOuterCompositeSerialize (OuterComposite? outerComposite = null) @@ -218,7 +218,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var outerComposite = new OuterComposite(); // OuterComposite | Input composite as post body (optional) + var outerComposite = new OuterComposite?(); // OuterComposite? | Input composite as post body (optional) try { @@ -259,7 +259,7 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **outerComposite** | [**OuterComposite**](OuterComposite.md) | Input composite as post body | [optional] | +| **outerComposite** | [**OuterComposite?**](OuterComposite?.md) | Input composite as post body | [optional] | ### Return type @@ -373,7 +373,7 @@ No authorization required # **FakeOuterStringSerialize** -> string FakeOuterStringSerialize (string body = null) +> string FakeOuterStringSerialize (string? body = null) @@ -396,7 +396,7 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var body = "body_example"; // string | Input string as post body (optional) + var body = "body_example"; // string? | Input string as post body (optional) try { @@ -437,7 +437,7 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **body** | **string** | Input string as post body | [optional] | +| **body** | **string?** | Input string as post body | [optional] | ### Return type @@ -807,7 +807,7 @@ No authorization required # **TestEndpointParameters** -> void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null) +> void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string? _string = null, System.IO.Stream? binary = null, DateTime? date = null, DateTime? dateTime = null, string? password = null, string? callback = null) Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -842,12 +842,12 @@ namespace Example var int32 = 56; // int? | None (optional) var int64 = 789L; // long? | None (optional) var _float = 3.4F; // float? | None (optional) - var _string = "_string_example"; // string | None (optional) - var binary = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | None (optional) + var _string = "_string_example"; // string? | None (optional) + var binary = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream? | None (optional) var date = DateTime.Parse("2013-10-20"); // DateTime? | None (optional) var dateTime = DateTime.Parse(""2010-02-01T10:20:10.111110+01:00""); // DateTime? | None (optional) (default to "2010-02-01T10:20:10.111110+01:00") - var password = "password_example"; // string | None (optional) - var callback = "callback_example"; // string | None (optional) + var password = "password_example"; // string? | None (optional) + var callback = "callback_example"; // string? | None (optional) try { @@ -894,12 +894,12 @@ catch (ApiException e) | **int32** | **int?** | None | [optional] | | **int64** | **long?** | None | [optional] | | **_float** | **float?** | None | [optional] | -| **_string** | **string** | None | [optional] | -| **binary** | **System.IO.Stream****System.IO.Stream** | None | [optional] | +| **_string** | **string?** | None | [optional] | +| **binary** | **System.IO.Stream?****System.IO.Stream?** | None | [optional] | | **date** | **DateTime?** | None | [optional] | | **dateTime** | **DateTime?** | None | [optional] [default to "2010-02-01T10:20:10.111110+01:00"] | -| **password** | **string** | None | [optional] | -| **callback** | **string** | None | [optional] | +| **password** | **string?** | None | [optional] | +| **callback** | **string?** | None | [optional] | ### Return type @@ -925,7 +925,7 @@ void (empty response body) # **TestEnumParameters** -> void TestEnumParameters (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) +> void TestEnumParameters (List? enumHeaderStringArray = null, string? enumHeaderString = null, List? enumQueryStringArray = null, string? enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List? enumFormStringArray = null, string? enumFormString = null) To test enum parameters @@ -948,14 +948,14 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var enumHeaderStringArray = new List(); // List | Header parameter enum test (string array) (optional) - var enumHeaderString = "_abc"; // string | Header parameter enum test (string) (optional) (default to -efg) - var enumQueryStringArray = new List(); // List | Query parameter enum test (string array) (optional) - var enumQueryString = "_abc"; // string | Query parameter enum test (string) (optional) (default to -efg) + var enumHeaderStringArray = new List?(); // List? | Header parameter enum test (string array) (optional) + var enumHeaderString = "_abc"; // string? | Header parameter enum test (string) (optional) (default to -efg) + var enumQueryStringArray = new List?(); // List? | Query parameter enum test (string array) (optional) + var enumQueryString = "_abc"; // string? | Query parameter enum test (string) (optional) (default to -efg) var enumQueryInteger = 1; // int? | Query parameter enum test (double) (optional) var enumQueryDouble = 1.1D; // double? | Query parameter enum test (double) (optional) - var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) - var enumFormString = "_abc"; // string | Form parameter enum test (string) (optional) (default to -efg) + var enumFormStringArray = new List?(); // List? | Form parameter enum test (string array) (optional) (default to $) + var enumFormString = "_abc"; // string? | Form parameter enum test (string) (optional) (default to -efg) try { @@ -994,14 +994,14 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **enumHeaderStringArray** | [**List<string>**](string.md) | Header parameter enum test (string array) | [optional] | -| **enumHeaderString** | **string** | Header parameter enum test (string) | [optional] [default to -efg] | -| **enumQueryStringArray** | [**List<string>**](string.md) | Query parameter enum test (string array) | [optional] | -| **enumQueryString** | **string** | Query parameter enum test (string) | [optional] [default to -efg] | +| **enumHeaderStringArray** | [**List<string>?**](string.md) | Header parameter enum test (string array) | [optional] | +| **enumHeaderString** | **string?** | Header parameter enum test (string) | [optional] [default to -efg] | +| **enumQueryStringArray** | [**List<string>?**](string.md) | Query parameter enum test (string array) | [optional] | +| **enumQueryString** | **string?** | Query parameter enum test (string) | [optional] [default to -efg] | | **enumQueryInteger** | **int?** | Query parameter enum test (double) | [optional] | | **enumQueryDouble** | **double?** | Query parameter enum test (double) | [optional] | -| **enumFormStringArray** | [**List<string>**](string.md) | Form parameter enum test (string array) | [optional] [default to $] | -| **enumFormString** | **string** | Form parameter enum test (string) | [optional] [default to -efg] | +| **enumFormStringArray** | [**List<string>?**](string.md) | Form parameter enum test (string array) | [optional] [default to $] | +| **enumFormString** | **string?** | Form parameter enum test (string) | [optional] [default to -efg] | ### Return type diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/PetApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/PetApi.md index 1c51cb3d77..ddb355ff10 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/PetApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/PetApi.md @@ -104,7 +104,7 @@ void (empty response body) # **DeletePet** -> void DeletePet (long petId, string apiKey = null) +> void DeletePet (long petId, string? apiKey = null) Deletes a pet @@ -129,7 +129,7 @@ namespace Example var apiInstance = new PetApi(config); var petId = 789L; // long | Pet id to delete - var apiKey = "apiKey_example"; // string | (optional) + var apiKey = "apiKey_example"; // string? | (optional) try { @@ -169,7 +169,7 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| | **petId** | **long** | Pet id to delete | | -| **apiKey** | **string** | | [optional] | +| **apiKey** | **string?** | | [optional] | ### Return type @@ -572,7 +572,7 @@ void (empty response body) # **UpdatePetWithForm** -> void UpdatePetWithForm (long petId, string name = null, string status = null) +> void UpdatePetWithForm (long petId, string? name = null, string? status = null) Updates a pet in the store with form data @@ -597,8 +597,8 @@ namespace Example var apiInstance = new PetApi(config); var petId = 789L; // long | ID of pet that needs to be updated - var name = "name_example"; // string | Updated name of the pet (optional) - var status = "status_example"; // string | Updated status of the pet (optional) + var name = "name_example"; // string? | Updated name of the pet (optional) + var status = "status_example"; // string? | Updated status of the pet (optional) try { @@ -638,8 +638,8 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| | **petId** | **long** | ID of pet that needs to be updated | | -| **name** | **string** | Updated name of the pet | [optional] | -| **status** | **string** | Updated status of the pet | [optional] | +| **name** | **string?** | Updated name of the pet | [optional] | +| **status** | **string?** | Updated status of the pet | [optional] | ### Return type @@ -664,7 +664,7 @@ void (empty response body) # **UploadFile** -> ApiResponse UploadFile (long petId, string additionalMetadata = null, System.IO.Stream file = null) +> ApiResponse UploadFile (long petId, string? additionalMetadata = null, System.IO.Stream? file = null) uploads an image @@ -689,8 +689,8 @@ namespace Example var apiInstance = new PetApi(config); var petId = 789L; // long | ID of pet to update - var additionalMetadata = "additionalMetadata_example"; // string | Additional data to pass to server (optional) - var file = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | file to upload (optional) + var additionalMetadata = "additionalMetadata_example"; // string? | Additional data to pass to server (optional) + var file = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream? | file to upload (optional) try { @@ -734,8 +734,8 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| | **petId** | **long** | ID of pet to update | | -| **additionalMetadata** | **string** | Additional data to pass to server | [optional] | -| **file** | **System.IO.Stream****System.IO.Stream** | file to upload | [optional] | +| **additionalMetadata** | **string?** | Additional data to pass to server | [optional] | +| **file** | **System.IO.Stream?****System.IO.Stream?** | file to upload | [optional] | ### Return type @@ -760,7 +760,7 @@ catch (ApiException e) # **UploadFileWithRequiredFile** -> ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, string additionalMetadata = null) +> ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, string? additionalMetadata = null) uploads an image (required) @@ -786,7 +786,7 @@ namespace Example var apiInstance = new PetApi(config); var petId = 789L; // long | ID of pet to update var requiredFile = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | file to upload - var additionalMetadata = "additionalMetadata_example"; // string | Additional data to pass to server (optional) + var additionalMetadata = "additionalMetadata_example"; // string? | Additional data to pass to server (optional) try { @@ -831,7 +831,7 @@ catch (ApiException e) |------|------|-------------|-------| | **petId** | **long** | ID of pet to update | | | **requiredFile** | **System.IO.Stream****System.IO.Stream** | file to upload | | -| **additionalMetadata** | **string** | Additional data to pass to server | [optional] | +| **additionalMetadata** | **string?** | Additional data to pass to server | [optional] | ### Return type diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj index 2a44951991..f92a456428 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj @@ -3,8 +3,9 @@ Org.OpenAPITools.Test Org.OpenAPITools.Test - net5.0 + net7.0 false + annotations diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/FakeApi.cs index 5991b7f0b7..e0829629cc 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/FakeApi.cs @@ -78,7 +78,7 @@ namespace Org.OpenAPITools.Api /// Input composite as post body (optional) /// Index associated with the operation. /// OuterComposite - OuterComposite FakeOuterCompositeSerialize(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0); + OuterComposite FakeOuterCompositeSerialize(OuterComposite? outerComposite = default(OuterComposite?), int operationIndex = 0); /// /// @@ -90,7 +90,7 @@ namespace Org.OpenAPITools.Api /// Input composite as post body (optional) /// Index associated with the operation. /// ApiResponse of OuterComposite - ApiResponse FakeOuterCompositeSerializeWithHttpInfo(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0); + ApiResponse FakeOuterCompositeSerializeWithHttpInfo(OuterComposite? outerComposite = default(OuterComposite?), int operationIndex = 0); /// /// /// @@ -124,7 +124,7 @@ namespace Org.OpenAPITools.Api /// Input string as post body (optional) /// Index associated with the operation. /// string - string FakeOuterStringSerialize(string body = default(string), int operationIndex = 0); + string FakeOuterStringSerialize(string? body = default(string?), int operationIndex = 0); /// /// @@ -136,7 +136,7 @@ namespace Org.OpenAPITools.Api /// Input string as post body (optional) /// Index associated with the operation. /// ApiResponse of string - ApiResponse FakeOuterStringSerializeWithHttpInfo(string body = default(string), int operationIndex = 0); + ApiResponse FakeOuterStringSerializeWithHttpInfo(string? body = default(string?), int operationIndex = 0); /// /// Array of Enums /// @@ -246,7 +246,7 @@ namespace Org.OpenAPITools.Api /// None (optional) /// Index associated with the operation. /// - void TestEndpointParameters(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0); + void TestEndpointParameters(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string? _string = default(string?), System.IO.Stream? binary = default(System.IO.Stream?), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string? password = default(string?), string? callback = default(string?), int operationIndex = 0); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -271,7 +271,7 @@ namespace Org.OpenAPITools.Api /// None (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestEndpointParametersWithHttpInfo(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0); + ApiResponse TestEndpointParametersWithHttpInfo(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string? _string = default(string?), System.IO.Stream? binary = default(System.IO.Stream?), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string? password = default(string?), string? callback = default(string?), int operationIndex = 0); /// /// To test enum parameters /// @@ -289,7 +289,7 @@ namespace Org.OpenAPITools.Api /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// - void TestEnumParameters(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0); + void TestEnumParameters(List? enumHeaderStringArray = default(List?), string? enumHeaderString = default(string?), List? enumQueryStringArray = default(List?), string? enumQueryString = default(string?), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List? enumFormStringArray = default(List?), string? enumFormString = default(string?), int operationIndex = 0); /// /// To test enum parameters @@ -308,7 +308,7 @@ namespace Org.OpenAPITools.Api /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse TestEnumParametersWithHttpInfo(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0); + ApiResponse TestEnumParametersWithHttpInfo(List? enumHeaderStringArray = default(List?), string? enumHeaderString = default(string?), List? enumQueryStringArray = default(List?), string? enumQueryString = default(string?), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List? enumFormStringArray = default(List?), string? enumFormString = default(string?), int operationIndex = 0); /// /// Fake endpoint to test group parameters (optional) /// @@ -483,7 +483,7 @@ namespace Org.OpenAPITools.Api /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of OuterComposite - System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync(OuterComposite? outerComposite = default(OuterComposite?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -496,7 +496,7 @@ namespace Org.OpenAPITools.Api /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (OuterComposite) - System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync(OuterComposite? outerComposite = default(OuterComposite?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// /// @@ -533,7 +533,7 @@ namespace Org.OpenAPITools.Api /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - System.Threading.Tasks.Task FakeOuterStringSerializeAsync(string body = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task FakeOuterStringSerializeAsync(string? body = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// @@ -546,7 +546,7 @@ namespace Org.OpenAPITools.Api /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync(string body = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync(string? body = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Array of Enums /// @@ -671,7 +671,7 @@ namespace Org.OpenAPITools.Api /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestEndpointParametersAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestEndpointParametersAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string? _string = default(string?), System.IO.Stream? binary = default(System.IO.Stream?), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string? password = default(string?), string? callback = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -697,7 +697,7 @@ namespace Org.OpenAPITools.Api /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string? _string = default(string?), System.IO.Stream? binary = default(System.IO.Stream?), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string? password = default(string?), string? callback = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// To test enum parameters /// @@ -716,7 +716,7 @@ namespace Org.OpenAPITools.Api /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task TestEnumParametersAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TestEnumParametersAsync(List? enumHeaderStringArray = default(List?), string? enumHeaderString = default(string?), List? enumQueryStringArray = default(List?), string? enumQueryString = default(string?), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List? enumFormStringArray = default(List?), string? enumFormString = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// To test enum parameters @@ -736,7 +736,7 @@ namespace Org.OpenAPITools.Api /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync(List? enumHeaderStringArray = default(List?), string? enumHeaderString = default(string?), List? enumQueryStringArray = default(List?), string? enumQueryString = default(string?), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List? enumFormStringArray = default(List?), string? enumFormString = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Fake endpoint to test group parameters (optional) /// @@ -1244,7 +1244,7 @@ namespace Org.OpenAPITools.Api /// Input composite as post body (optional) /// Index associated with the operation. /// OuterComposite - public OuterComposite FakeOuterCompositeSerialize(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0) + public OuterComposite FakeOuterCompositeSerialize(OuterComposite? outerComposite = default(OuterComposite?), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterCompositeSerializeWithHttpInfo(outerComposite); return localVarResponse.Data; @@ -1257,7 +1257,7 @@ namespace Org.OpenAPITools.Api /// Input composite as post body (optional) /// Index associated with the operation. /// ApiResponse of OuterComposite - public Org.OpenAPITools.Client.ApiResponse FakeOuterCompositeSerializeWithHttpInfo(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse FakeOuterCompositeSerializeWithHttpInfo(OuterComposite? outerComposite = default(OuterComposite?), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1310,7 +1310,7 @@ namespace Org.OpenAPITools.Api /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of OuterComposite - public async System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync(OuterComposite? outerComposite = default(OuterComposite?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterCompositeSerializeWithHttpInfoAsync(outerComposite, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1324,7 +1324,7 @@ namespace Org.OpenAPITools.Api /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (OuterComposite) - public async System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync(OuterComposite outerComposite = default(OuterComposite), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync(OuterComposite? outerComposite = default(OuterComposite?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1512,7 +1512,7 @@ namespace Org.OpenAPITools.Api /// Input string as post body (optional) /// Index associated with the operation. /// string - public string FakeOuterStringSerialize(string body = default(string), int operationIndex = 0) + public string FakeOuterStringSerialize(string? body = default(string?), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = FakeOuterStringSerializeWithHttpInfo(body); return localVarResponse.Data; @@ -1525,7 +1525,7 @@ namespace Org.OpenAPITools.Api /// Input string as post body (optional) /// Index associated with the operation. /// ApiResponse of string - public Org.OpenAPITools.Client.ApiResponse FakeOuterStringSerializeWithHttpInfo(string body = default(string), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse FakeOuterStringSerializeWithHttpInfo(string? body = default(string?), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1578,7 +1578,7 @@ namespace Org.OpenAPITools.Api /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of string - public async System.Threading.Tasks.Task FakeOuterStringSerializeAsync(string body = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task FakeOuterStringSerializeAsync(string? body = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await FakeOuterStringSerializeWithHttpInfoAsync(body, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -1592,7 +1592,7 @@ namespace Org.OpenAPITools.Api /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (string) - public async System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync(string body = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync(string? body = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2233,7 +2233,7 @@ namespace Org.OpenAPITools.Api /// None (optional) /// Index associated with the operation. /// - public void TestEndpointParameters(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0) + public void TestEndpointParameters(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string? _string = default(string?), System.IO.Stream? binary = default(System.IO.Stream?), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string? password = default(string?), string? callback = default(string?), int operationIndex = 0) { TestEndpointParametersWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); } @@ -2258,7 +2258,7 @@ namespace Org.OpenAPITools.Api /// None (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestEndpointParametersWithHttpInfo(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse TestEndpointParametersWithHttpInfo(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string? _string = default(string?), System.IO.Stream? binary = default(System.IO.Stream?), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string? password = default(string?), string? callback = default(string?), int operationIndex = 0) { // verify the required parameter 'patternWithoutDelimiter' is set if (patternWithoutDelimiter == null) @@ -2384,7 +2384,7 @@ namespace Org.OpenAPITools.Api /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestEndpointParametersAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestEndpointParametersAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string? _string = default(string?), System.IO.Stream? binary = default(System.IO.Stream?), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string? password = default(string?), string? callback = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await TestEndpointParametersWithHttpInfoAsync(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback, operationIndex, cancellationToken).ConfigureAwait(false); } @@ -2410,7 +2410,7 @@ namespace Org.OpenAPITools.Api /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string? _string = default(string?), System.IO.Stream? binary = default(System.IO.Stream?), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string? password = default(string?), string? callback = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'patternWithoutDelimiter' is set if (patternWithoutDelimiter == null) @@ -2531,7 +2531,7 @@ namespace Org.OpenAPITools.Api /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// - public void TestEnumParameters(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0) + public void TestEnumParameters(List? enumHeaderStringArray = default(List?), string? enumHeaderString = default(string?), List? enumQueryStringArray = default(List?), string? enumQueryString = default(string?), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List? enumFormStringArray = default(List?), string? enumFormString = default(string?), int operationIndex = 0) { TestEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); } @@ -2550,7 +2550,7 @@ namespace Org.OpenAPITools.Api /// Form parameter enum test (string) (optional, default to -efg) /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse TestEnumParametersWithHttpInfo(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse TestEnumParametersWithHttpInfo(List? enumHeaderStringArray = default(List?), string? enumHeaderString = default(string?), List? enumQueryStringArray = default(List?), string? enumQueryString = default(string?), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List? enumFormStringArray = default(List?), string? enumFormString = default(string?), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2640,7 +2640,7 @@ namespace Org.OpenAPITools.Api /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task TestEnumParametersAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TestEnumParametersAsync(List? enumHeaderStringArray = default(List?), string? enumHeaderString = default(string?), List? enumQueryStringArray = default(List?), string? enumQueryString = default(string?), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List? enumFormStringArray = default(List?), string? enumFormString = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await TestEnumParametersWithHttpInfoAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, operationIndex, cancellationToken).ConfigureAwait(false); } @@ -2660,7 +2660,7 @@ namespace Org.OpenAPITools.Api /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync(List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync(List? enumHeaderStringArray = default(List?), string? enumHeaderString = default(string?), List? enumQueryStringArray = default(List?), string? enumQueryString = default(string?), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List? enumFormStringArray = default(List?), string? enumFormString = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/PetApi.cs index e8439eb125..74e6a8eef7 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/PetApi.cs @@ -55,7 +55,7 @@ namespace Org.OpenAPITools.Api /// (optional) /// Index associated with the operation. /// - void DeletePet(long petId, string apiKey = default(string), int operationIndex = 0); + void DeletePet(long petId, string? apiKey = default(string?), int operationIndex = 0); /// /// Deletes a pet @@ -68,7 +68,7 @@ namespace Org.OpenAPITools.Api /// (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse DeletePetWithHttpInfo(long petId, string apiKey = default(string), int operationIndex = 0); + ApiResponse DeletePetWithHttpInfo(long petId, string? apiKey = default(string?), int operationIndex = 0); /// /// Finds Pets by status /// @@ -169,7 +169,7 @@ namespace Org.OpenAPITools.Api /// Updated status of the pet (optional) /// Index associated with the operation. /// - void UpdatePetWithForm(long petId, string name = default(string), string status = default(string), int operationIndex = 0); + void UpdatePetWithForm(long petId, string? name = default(string?), string? status = default(string?), int operationIndex = 0); /// /// Updates a pet in the store with form data @@ -183,7 +183,7 @@ namespace Org.OpenAPITools.Api /// Updated status of the pet (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - ApiResponse UpdatePetWithFormWithHttpInfo(long petId, string name = default(string), string status = default(string), int operationIndex = 0); + ApiResponse UpdatePetWithFormWithHttpInfo(long petId, string? name = default(string?), string? status = default(string?), int operationIndex = 0); /// /// uploads an image /// @@ -193,7 +193,7 @@ namespace Org.OpenAPITools.Api /// file to upload (optional) /// Index associated with the operation. /// ApiResponse - ApiResponse UploadFile(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0); + ApiResponse UploadFile(long petId, string? additionalMetadata = default(string?), System.IO.Stream? file = default(System.IO.Stream?), int operationIndex = 0); /// /// uploads an image @@ -207,7 +207,7 @@ namespace Org.OpenAPITools.Api /// file to upload (optional) /// Index associated with the operation. /// ApiResponse of ApiResponse - ApiResponse UploadFileWithHttpInfo(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0); + ApiResponse UploadFileWithHttpInfo(long petId, string? additionalMetadata = default(string?), System.IO.Stream? file = default(System.IO.Stream?), int operationIndex = 0); /// /// uploads an image (required) /// @@ -217,7 +217,7 @@ namespace Org.OpenAPITools.Api /// Additional data to pass to server (optional) /// Index associated with the operation. /// ApiResponse - ApiResponse UploadFileWithRequiredFile(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0); + ApiResponse UploadFileWithRequiredFile(long petId, System.IO.Stream requiredFile, string? additionalMetadata = default(string?), int operationIndex = 0); /// /// uploads an image (required) @@ -231,7 +231,7 @@ namespace Org.OpenAPITools.Api /// Additional data to pass to server (optional) /// Index associated with the operation. /// ApiResponse of ApiResponse - ApiResponse UploadFileWithRequiredFileWithHttpInfo(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0); + ApiResponse UploadFileWithRequiredFileWithHttpInfo(long petId, System.IO.Stream requiredFile, string? additionalMetadata = default(string?), int operationIndex = 0); #endregion Synchronous Operations } @@ -278,7 +278,7 @@ namespace Org.OpenAPITools.Api /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task DeletePetAsync(long petId, string apiKey = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task DeletePetAsync(long petId, string? apiKey = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Deletes a pet @@ -292,7 +292,7 @@ namespace Org.OpenAPITools.Api /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, string apiKey = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, string? apiKey = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Finds Pets by status /// @@ -408,7 +408,7 @@ namespace Org.OpenAPITools.Api /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, string name = default(string), string status = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, string? name = default(string?), string? status = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Updates a pet in the store with form data @@ -423,7 +423,7 @@ namespace Org.OpenAPITools.Api /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, string name = default(string), string status = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, string? name = default(string?), string? status = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// uploads an image /// @@ -437,7 +437,7 @@ namespace Org.OpenAPITools.Api /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task UploadFileAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UploadFileAsync(long petId, string? additionalMetadata = default(string?), System.IO.Stream? file = default(System.IO.Stream?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// uploads an image @@ -452,7 +452,7 @@ namespace Org.OpenAPITools.Api /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) - System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, string? additionalMetadata = default(string?), System.IO.Stream? file = default(System.IO.Stream?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// uploads an image (required) /// @@ -466,7 +466,7 @@ namespace Org.OpenAPITools.Api /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - System.Threading.Tasks.Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, string? additionalMetadata = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// uploads an image (required) @@ -481,7 +481,7 @@ namespace Org.OpenAPITools.Api /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) - System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, string? additionalMetadata = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); #endregion Asynchronous Operations } @@ -818,7 +818,7 @@ namespace Org.OpenAPITools.Api /// (optional) /// Index associated with the operation. /// - public void DeletePet(long petId, string apiKey = default(string), int operationIndex = 0) + public void DeletePet(long petId, string? apiKey = default(string?), int operationIndex = 0) { DeletePetWithHttpInfo(petId, apiKey); } @@ -831,7 +831,7 @@ namespace Org.OpenAPITools.Api /// (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse DeletePetWithHttpInfo(long petId, string apiKey = default(string), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse DeletePetWithHttpInfo(long petId, string? apiKey = default(string?), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -903,7 +903,7 @@ namespace Org.OpenAPITools.Api /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task DeletePetAsync(long petId, string apiKey = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task DeletePetAsync(long petId, string? apiKey = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await DeletePetWithHttpInfoAsync(petId, apiKey, operationIndex, cancellationToken).ConfigureAwait(false); } @@ -917,7 +917,7 @@ namespace Org.OpenAPITools.Api /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, string apiKey = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync(long petId, string? apiKey = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1767,7 +1767,7 @@ namespace Org.OpenAPITools.Api /// Updated status of the pet (optional) /// Index associated with the operation. /// - public void UpdatePetWithForm(long petId, string name = default(string), string status = default(string), int operationIndex = 0) + public void UpdatePetWithForm(long petId, string? name = default(string?), string? status = default(string?), int operationIndex = 0) { UpdatePetWithFormWithHttpInfo(petId, name, status); } @@ -1781,7 +1781,7 @@ namespace Org.OpenAPITools.Api /// Updated status of the pet (optional) /// Index associated with the operation. /// ApiResponse of Object(void) - public Org.OpenAPITools.Client.ApiResponse UpdatePetWithFormWithHttpInfo(long petId, string name = default(string), string status = default(string), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse UpdatePetWithFormWithHttpInfo(long petId, string? name = default(string?), string? status = default(string?), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1859,7 +1859,7 @@ namespace Org.OpenAPITools.Api /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of void - public async System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, string name = default(string), string status = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UpdatePetWithFormAsync(long petId, string? name = default(string?), string? status = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { await UpdatePetWithFormWithHttpInfoAsync(petId, name, status, operationIndex, cancellationToken).ConfigureAwait(false); } @@ -1874,7 +1874,7 @@ namespace Org.OpenAPITools.Api /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, string name = default(string), string status = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync(long petId, string? name = default(string?), string? status = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -1953,7 +1953,7 @@ namespace Org.OpenAPITools.Api /// file to upload (optional) /// Index associated with the operation. /// ApiResponse - public ApiResponse UploadFile(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0) + public ApiResponse UploadFile(long petId, string? additionalMetadata = default(string?), System.IO.Stream? file = default(System.IO.Stream?), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = UploadFileWithHttpInfo(petId, additionalMetadata, file); return localVarResponse.Data; @@ -1968,7 +1968,7 @@ namespace Org.OpenAPITools.Api /// file to upload (optional) /// Index associated with the operation. /// ApiResponse of ApiResponse - public Org.OpenAPITools.Client.ApiResponse UploadFileWithHttpInfo(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse UploadFileWithHttpInfo(long petId, string? additionalMetadata = default(string?), System.IO.Stream? file = default(System.IO.Stream?), int operationIndex = 0) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2047,7 +2047,7 @@ namespace Org.OpenAPITools.Api /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task UploadFileAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UploadFileAsync(long petId, string? additionalMetadata = default(string?), System.IO.Stream? file = default(System.IO.Stream?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await UploadFileWithHttpInfoAsync(petId, additionalMetadata, file, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -2063,7 +2063,7 @@ namespace Org.OpenAPITools.Api /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) - public async System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync(long petId, string? additionalMetadata = default(string?), System.IO.Stream? file = default(System.IO.Stream?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); @@ -2143,7 +2143,7 @@ namespace Org.OpenAPITools.Api /// Additional data to pass to server (optional) /// Index associated with the operation. /// ApiResponse - public ApiResponse UploadFileWithRequiredFile(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0) + public ApiResponse UploadFileWithRequiredFile(long petId, System.IO.Stream requiredFile, string? additionalMetadata = default(string?), int operationIndex = 0) { Org.OpenAPITools.Client.ApiResponse localVarResponse = UploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata); return localVarResponse.Data; @@ -2158,7 +2158,7 @@ namespace Org.OpenAPITools.Api /// Additional data to pass to server (optional) /// Index associated with the operation. /// ApiResponse of ApiResponse - public Org.OpenAPITools.Client.ApiResponse UploadFileWithRequiredFileWithHttpInfo(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0) + public Org.OpenAPITools.Client.ApiResponse UploadFileWithRequiredFileWithHttpInfo(long petId, System.IO.Stream requiredFile, string? additionalMetadata = default(string?), int operationIndex = 0) { // verify the required parameter 'requiredFile' is set if (requiredFile == null) @@ -2241,7 +2241,7 @@ namespace Org.OpenAPITools.Api /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse - public async System.Threading.Tasks.Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, string? additionalMetadata = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Org.OpenAPITools.Client.ApiResponse localVarResponse = await UploadFileWithRequiredFileWithHttpInfoAsync(petId, requiredFile, additionalMetadata, operationIndex, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; @@ -2257,7 +2257,7 @@ namespace Org.OpenAPITools.Api /// Index associated with the operation. /// Cancellation Token to cancel the request. /// Task of ApiResponse (ApiResponse) - public async System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, string? additionalMetadata = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // verify the required parameter 'requiredFile' is set if (requiredFile == null) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Org.OpenAPITools.csproj index eb0213a59a..4af4b5da6f 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Org.OpenAPITools.csproj +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Org.OpenAPITools.csproj @@ -2,7 +2,7 @@ false - net5.0 + net7.0 Org.OpenAPITools Org.OpenAPITools Library @@ -17,6 +17,7 @@ https://github.com/GIT_USER_ID/GIT_REPO_ID.git git Minor update + annotations From 1f7824c0830f7caf68ba8b1ed91f2fdf5096a878 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Fri, 18 Nov 2022 01:07:39 +0800 Subject: [PATCH 027/189] use Visual Studio 2022 in appveyor --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index c5483fe836..de56c2ed63 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,5 +1,5 @@ version: '{branch}-{build}' -image: Visual Studio 2019 +image: Visual Studio 2022 hosts: petstore.swagger.io: 127.0.0.1 install: From 1748d03fb98d089d8ae5195451b31659d76400f4 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Fri, 18 Nov 2022 15:04:26 -0800 Subject: [PATCH 028/189] [python] Issue 13997 fix pass in model instances to new (#14067) * Template update * Adds test file * Samples regenerated * Adds missing # --- .../main/resources/python/schemas.handlebars | 45 ++++++++++++------- .../python/unit_test_api/schemas.py | 45 ++++++++++++------- .../python/dynamic_servers/schemas.py | 45 ++++++++++++------- .../petstore/python/petstore_api/schemas.py | 45 ++++++++++++------- .../petstore/python/tests_manual/test_pet.py | 37 +++++++++++++++ 5 files changed, 153 insertions(+), 64 deletions(-) create mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_pet.py diff --git a/modules/openapi-generator/src/main/resources/python/schemas.handlebars b/modules/openapi-generator/src/main/resources/python/schemas.handlebars index 22999b1306..f06267b404 100644 --- a/modules/openapi-generator/src/main/resources/python/schemas.handlebars +++ b/modules/openapi-generator/src/main/resources/python/schemas.handlebars @@ -141,6 +141,19 @@ class ValidationMetadata(frozendict.frozendict): return self.get('validated_path_to_schemas') +def add_deeper_validated_schemas(validation_metadata: ValidationMetadata, path_to_schemas: dict): + # this is called if validation_ran_earlier and current and deeper locations need to be added + current_path_to_item = validation_metadata.path_to_item + other_path_to_schemas = {} + for path_to_item, schemas in validation_metadata.validated_path_to_schemas.items(): + if len(path_to_item) < len(current_path_to_item): + continue + path_begins_with_current_path = path_to_item[:len(current_path_to_item)] == current_path_to_item + if path_begins_with_current_path: + other_path_to_schemas[path_to_item] = schemas + update(path_to_schemas, other_path_to_schemas) + + class Singleton: """ Enums and singletons are the same @@ -385,9 +398,9 @@ class Schema: because value is of the correct type, and validation was run earlier when the instance was created """ _path_to_schemas = {} - if validation_metadata.validated_path_to_schemas: - update(_path_to_schemas, validation_metadata.validated_path_to_schemas) - if not validation_metadata.validation_ran_earlier(cls): + if validation_metadata.validation_ran_earlier(cls): + add_deeper_validated_schemas(validation_metadata, _path_to_schemas) + else: other_path_to_schemas = cls._validate_oapg(arg, validation_metadata=validation_metadata) update(_path_to_schemas, other_path_to_schemas) # loop through it make a new class for each entry @@ -1325,6 +1338,7 @@ class ListBase(ValidatorBase): validated_path_to_schemas=validation_metadata.validated_path_to_schemas ) if item_validation_metadata.validation_ran_earlier(item_cls): + add_deeper_validated_schemas(item_validation_metadata, path_to_schemas) continue other_path_to_schemas = item_cls._validate_oapg( value, validation_metadata=item_validation_metadata) @@ -1588,6 +1602,7 @@ class DictBase(Discriminable, ValidatorBase): validated_path_to_schemas=validation_metadata.validated_path_to_schemas ) if arg_validation_metadata.validation_ran_earlier(schema): + add_deeper_validated_schemas(arg_validation_metadata, path_to_schemas) continue other_path_to_schemas = schema._validate_oapg(value, validation_metadata=arg_validation_metadata) update(path_to_schemas, other_path_to_schemas) @@ -1676,6 +1691,7 @@ class DictBase(Discriminable, ValidatorBase): validated_path_to_schemas=validation_metadata.validated_path_to_schemas ) if updated_vm.validation_ran_earlier(discriminated_cls): + add_deeper_validated_schemas(updated_vm, _path_to_schemas) return _path_to_schemas other_path_to_schemas = discriminated_cls._validate_oapg(arg, validation_metadata=updated_vm) update(_path_to_schemas, other_path_to_schemas) @@ -1774,18 +1790,11 @@ def cast_to_allowed_types( if isinstance(arg, Schema): # store the already run validations schema_classes = set() - source_schema_was_unset = len(arg.__class__.__bases__) == 2 and UnsetAnyTypeSchema in arg.__class__.__bases__ - if not source_schema_was_unset: - """ - Do not include UnsetAnyTypeSchema and its base class because - it did not exist in the original spec schema definition - It was added to ensure that all instances are of type Schema and the allowed base types - """ - for cls in arg.__class__.__bases__: - if cls is Singleton: - # Skip Singleton - continue - schema_classes.add(cls) + for cls in arg.__class__.__bases__: + if cls is Singleton: + # Skip Singleton + continue + schema_classes.add(cls) validated_path_to_schemas[path_to_item] = schema_classes type_error = ApiTypeError(f"Invalid type. Required value type is str and passed type was {type(arg)} at {path_to_item}") @@ -1838,6 +1847,7 @@ class ComposedBase(Discriminable): path_to_schemas = defaultdict(set) for allof_cls in cls.MetaOapg.all_of(): if validation_metadata.validation_ran_earlier(allof_cls): + add_deeper_validated_schemas(validation_metadata, path_to_schemas) continue other_path_to_schemas = allof_cls._validate_oapg(arg, validation_metadata=validation_metadata) update(path_to_schemas, other_path_to_schemas) @@ -1858,6 +1868,7 @@ class ComposedBase(Discriminable): continue if validation_metadata.validation_ran_earlier(oneof_cls): oneof_classes.append(oneof_cls) + add_deeper_validated_schemas(validation_metadata, path_to_schemas) continue try: path_to_schemas = oneof_cls._validate_oapg(arg, validation_metadata=validation_metadata) @@ -1915,6 +1926,7 @@ class ComposedBase(Discriminable): for anyof_cls in cls.MetaOapg.any_of(): if validation_metadata.validation_ran_earlier(anyof_cls): anyof_classes.append(anyof_cls) + add_deeper_validated_schemas(validation_metadata, path_to_schemas) continue try: @@ -2044,6 +2056,7 @@ class ComposedBase(Discriminable): if discriminated_cls is not None and not updated_vm.validation_ran_earlier(discriminated_cls): # TODO use an exception from this package here + add_deeper_validated_schemas(updated_vm, path_to_schemas) assert discriminated_cls in path_to_schemas[updated_vm.path_to_item] return path_to_schemas @@ -2492,4 +2505,4 @@ LOG_CACHE_USAGE = False def log_cache_usage(cache_fn): if LOG_CACHE_USAGE: - print(cache_fn.__name__, cache_fn.cache_info()) + print(cache_fn.__name__, cache_fn.cache_info()) \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/schemas.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/schemas.py index d6c0284ab1..ce7d7eaf82 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/schemas.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/schemas.py @@ -148,6 +148,19 @@ class ValidationMetadata(frozendict.frozendict): return self.get('validated_path_to_schemas') +def add_deeper_validated_schemas(validation_metadata: ValidationMetadata, path_to_schemas: dict): + # this is called if validation_ran_earlier and current and deeper locations need to be added + current_path_to_item = validation_metadata.path_to_item + other_path_to_schemas = {} + for path_to_item, schemas in validation_metadata.validated_path_to_schemas.items(): + if len(path_to_item) < len(current_path_to_item): + continue + path_begins_with_current_path = path_to_item[:len(current_path_to_item)] == current_path_to_item + if path_begins_with_current_path: + other_path_to_schemas[path_to_item] = schemas + update(path_to_schemas, other_path_to_schemas) + + class Singleton: """ Enums and singletons are the same @@ -392,9 +405,9 @@ class Schema: because value is of the correct type, and validation was run earlier when the instance was created """ _path_to_schemas = {} - if validation_metadata.validated_path_to_schemas: - update(_path_to_schemas, validation_metadata.validated_path_to_schemas) - if not validation_metadata.validation_ran_earlier(cls): + if validation_metadata.validation_ran_earlier(cls): + add_deeper_validated_schemas(validation_metadata, _path_to_schemas) + else: other_path_to_schemas = cls._validate_oapg(arg, validation_metadata=validation_metadata) update(_path_to_schemas, other_path_to_schemas) # loop through it make a new class for each entry @@ -1332,6 +1345,7 @@ class ListBase(ValidatorBase): validated_path_to_schemas=validation_metadata.validated_path_to_schemas ) if item_validation_metadata.validation_ran_earlier(item_cls): + add_deeper_validated_schemas(item_validation_metadata, path_to_schemas) continue other_path_to_schemas = item_cls._validate_oapg( value, validation_metadata=item_validation_metadata) @@ -1595,6 +1609,7 @@ class DictBase(Discriminable, ValidatorBase): validated_path_to_schemas=validation_metadata.validated_path_to_schemas ) if arg_validation_metadata.validation_ran_earlier(schema): + add_deeper_validated_schemas(arg_validation_metadata, path_to_schemas) continue other_path_to_schemas = schema._validate_oapg(value, validation_metadata=arg_validation_metadata) update(path_to_schemas, other_path_to_schemas) @@ -1683,6 +1698,7 @@ class DictBase(Discriminable, ValidatorBase): validated_path_to_schemas=validation_metadata.validated_path_to_schemas ) if updated_vm.validation_ran_earlier(discriminated_cls): + add_deeper_validated_schemas(updated_vm, _path_to_schemas) return _path_to_schemas other_path_to_schemas = discriminated_cls._validate_oapg(arg, validation_metadata=updated_vm) update(_path_to_schemas, other_path_to_schemas) @@ -1781,18 +1797,11 @@ def cast_to_allowed_types( if isinstance(arg, Schema): # store the already run validations schema_classes = set() - source_schema_was_unset = len(arg.__class__.__bases__) == 2 and UnsetAnyTypeSchema in arg.__class__.__bases__ - if not source_schema_was_unset: - """ - Do not include UnsetAnyTypeSchema and its base class because - it did not exist in the original spec schema definition - It was added to ensure that all instances are of type Schema and the allowed base types - """ - for cls in arg.__class__.__bases__: - if cls is Singleton: - # Skip Singleton - continue - schema_classes.add(cls) + for cls in arg.__class__.__bases__: + if cls is Singleton: + # Skip Singleton + continue + schema_classes.add(cls) validated_path_to_schemas[path_to_item] = schema_classes type_error = ApiTypeError(f"Invalid type. Required value type is str and passed type was {type(arg)} at {path_to_item}") @@ -1845,6 +1854,7 @@ class ComposedBase(Discriminable): path_to_schemas = defaultdict(set) for allof_cls in cls.MetaOapg.all_of(): if validation_metadata.validation_ran_earlier(allof_cls): + add_deeper_validated_schemas(validation_metadata, path_to_schemas) continue other_path_to_schemas = allof_cls._validate_oapg(arg, validation_metadata=validation_metadata) update(path_to_schemas, other_path_to_schemas) @@ -1865,6 +1875,7 @@ class ComposedBase(Discriminable): continue if validation_metadata.validation_ran_earlier(oneof_cls): oneof_classes.append(oneof_cls) + add_deeper_validated_schemas(validation_metadata, path_to_schemas) continue try: path_to_schemas = oneof_cls._validate_oapg(arg, validation_metadata=validation_metadata) @@ -1898,6 +1909,7 @@ class ComposedBase(Discriminable): for anyof_cls in cls.MetaOapg.any_of(): if validation_metadata.validation_ran_earlier(anyof_cls): anyof_classes.append(anyof_cls) + add_deeper_validated_schemas(validation_metadata, path_to_schemas) continue try: @@ -2011,6 +2023,7 @@ class ComposedBase(Discriminable): if discriminated_cls is not None and not updated_vm.validation_ran_earlier(discriminated_cls): # TODO use an exception from this package here + add_deeper_validated_schemas(updated_vm, path_to_schemas) assert discriminated_cls in path_to_schemas[updated_vm.path_to_item] return path_to_schemas @@ -2459,4 +2472,4 @@ LOG_CACHE_USAGE = False def log_cache_usage(cache_fn): if LOG_CACHE_USAGE: - print(cache_fn.__name__, cache_fn.cache_info()) + print(cache_fn.__name__, cache_fn.cache_info()) \ No newline at end of file diff --git a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/schemas.py b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/schemas.py index 49f42952e2..966644f4d9 100644 --- a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/schemas.py +++ b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/schemas.py @@ -148,6 +148,19 @@ class ValidationMetadata(frozendict.frozendict): return self.get('validated_path_to_schemas') +def add_deeper_validated_schemas(validation_metadata: ValidationMetadata, path_to_schemas: dict): + # this is called if validation_ran_earlier and current and deeper locations need to be added + current_path_to_item = validation_metadata.path_to_item + other_path_to_schemas = {} + for path_to_item, schemas in validation_metadata.validated_path_to_schemas.items(): + if len(path_to_item) < len(current_path_to_item): + continue + path_begins_with_current_path = path_to_item[:len(current_path_to_item)] == current_path_to_item + if path_begins_with_current_path: + other_path_to_schemas[path_to_item] = schemas + update(path_to_schemas, other_path_to_schemas) + + class Singleton: """ Enums and singletons are the same @@ -392,9 +405,9 @@ class Schema: because value is of the correct type, and validation was run earlier when the instance was created """ _path_to_schemas = {} - if validation_metadata.validated_path_to_schemas: - update(_path_to_schemas, validation_metadata.validated_path_to_schemas) - if not validation_metadata.validation_ran_earlier(cls): + if validation_metadata.validation_ran_earlier(cls): + add_deeper_validated_schemas(validation_metadata, _path_to_schemas) + else: other_path_to_schemas = cls._validate_oapg(arg, validation_metadata=validation_metadata) update(_path_to_schemas, other_path_to_schemas) # loop through it make a new class for each entry @@ -1332,6 +1345,7 @@ class ListBase(ValidatorBase): validated_path_to_schemas=validation_metadata.validated_path_to_schemas ) if item_validation_metadata.validation_ran_earlier(item_cls): + add_deeper_validated_schemas(item_validation_metadata, path_to_schemas) continue other_path_to_schemas = item_cls._validate_oapg( value, validation_metadata=item_validation_metadata) @@ -1595,6 +1609,7 @@ class DictBase(Discriminable, ValidatorBase): validated_path_to_schemas=validation_metadata.validated_path_to_schemas ) if arg_validation_metadata.validation_ran_earlier(schema): + add_deeper_validated_schemas(arg_validation_metadata, path_to_schemas) continue other_path_to_schemas = schema._validate_oapg(value, validation_metadata=arg_validation_metadata) update(path_to_schemas, other_path_to_schemas) @@ -1683,6 +1698,7 @@ class DictBase(Discriminable, ValidatorBase): validated_path_to_schemas=validation_metadata.validated_path_to_schemas ) if updated_vm.validation_ran_earlier(discriminated_cls): + add_deeper_validated_schemas(updated_vm, _path_to_schemas) return _path_to_schemas other_path_to_schemas = discriminated_cls._validate_oapg(arg, validation_metadata=updated_vm) update(_path_to_schemas, other_path_to_schemas) @@ -1781,18 +1797,11 @@ def cast_to_allowed_types( if isinstance(arg, Schema): # store the already run validations schema_classes = set() - source_schema_was_unset = len(arg.__class__.__bases__) == 2 and UnsetAnyTypeSchema in arg.__class__.__bases__ - if not source_schema_was_unset: - """ - Do not include UnsetAnyTypeSchema and its base class because - it did not exist in the original spec schema definition - It was added to ensure that all instances are of type Schema and the allowed base types - """ - for cls in arg.__class__.__bases__: - if cls is Singleton: - # Skip Singleton - continue - schema_classes.add(cls) + for cls in arg.__class__.__bases__: + if cls is Singleton: + # Skip Singleton + continue + schema_classes.add(cls) validated_path_to_schemas[path_to_item] = schema_classes type_error = ApiTypeError(f"Invalid type. Required value type is str and passed type was {type(arg)} at {path_to_item}") @@ -1845,6 +1854,7 @@ class ComposedBase(Discriminable): path_to_schemas = defaultdict(set) for allof_cls in cls.MetaOapg.all_of(): if validation_metadata.validation_ran_earlier(allof_cls): + add_deeper_validated_schemas(validation_metadata, path_to_schemas) continue other_path_to_schemas = allof_cls._validate_oapg(arg, validation_metadata=validation_metadata) update(path_to_schemas, other_path_to_schemas) @@ -1865,6 +1875,7 @@ class ComposedBase(Discriminable): continue if validation_metadata.validation_ran_earlier(oneof_cls): oneof_classes.append(oneof_cls) + add_deeper_validated_schemas(validation_metadata, path_to_schemas) continue try: path_to_schemas = oneof_cls._validate_oapg(arg, validation_metadata=validation_metadata) @@ -1898,6 +1909,7 @@ class ComposedBase(Discriminable): for anyof_cls in cls.MetaOapg.any_of(): if validation_metadata.validation_ran_earlier(anyof_cls): anyof_classes.append(anyof_cls) + add_deeper_validated_schemas(validation_metadata, path_to_schemas) continue try: @@ -2011,6 +2023,7 @@ class ComposedBase(Discriminable): if discriminated_cls is not None and not updated_vm.validation_ran_earlier(discriminated_cls): # TODO use an exception from this package here + add_deeper_validated_schemas(updated_vm, path_to_schemas) assert discriminated_cls in path_to_schemas[updated_vm.path_to_item] return path_to_schemas @@ -2459,4 +2472,4 @@ LOG_CACHE_USAGE = False def log_cache_usage(cache_fn): if LOG_CACHE_USAGE: - print(cache_fn.__name__, cache_fn.cache_info()) + print(cache_fn.__name__, cache_fn.cache_info()) \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/petstore_api/schemas.py b/samples/openapi3/client/petstore/python/petstore_api/schemas.py index e2c6c665dd..b96bc1f1fd 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/schemas.py +++ b/samples/openapi3/client/petstore/python/petstore_api/schemas.py @@ -148,6 +148,19 @@ class ValidationMetadata(frozendict.frozendict): return self.get('validated_path_to_schemas') +def add_deeper_validated_schemas(validation_metadata: ValidationMetadata, path_to_schemas: dict): + # this is called if validation_ran_earlier and current and deeper locations need to be added + current_path_to_item = validation_metadata.path_to_item + other_path_to_schemas = {} + for path_to_item, schemas in validation_metadata.validated_path_to_schemas.items(): + if len(path_to_item) < len(current_path_to_item): + continue + path_begins_with_current_path = path_to_item[:len(current_path_to_item)] == current_path_to_item + if path_begins_with_current_path: + other_path_to_schemas[path_to_item] = schemas + update(path_to_schemas, other_path_to_schemas) + + class Singleton: """ Enums and singletons are the same @@ -392,9 +405,9 @@ class Schema: because value is of the correct type, and validation was run earlier when the instance was created """ _path_to_schemas = {} - if validation_metadata.validated_path_to_schemas: - update(_path_to_schemas, validation_metadata.validated_path_to_schemas) - if not validation_metadata.validation_ran_earlier(cls): + if validation_metadata.validation_ran_earlier(cls): + add_deeper_validated_schemas(validation_metadata, _path_to_schemas) + else: other_path_to_schemas = cls._validate_oapg(arg, validation_metadata=validation_metadata) update(_path_to_schemas, other_path_to_schemas) # loop through it make a new class for each entry @@ -1332,6 +1345,7 @@ class ListBase(ValidatorBase): validated_path_to_schemas=validation_metadata.validated_path_to_schemas ) if item_validation_metadata.validation_ran_earlier(item_cls): + add_deeper_validated_schemas(item_validation_metadata, path_to_schemas) continue other_path_to_schemas = item_cls._validate_oapg( value, validation_metadata=item_validation_metadata) @@ -1595,6 +1609,7 @@ class DictBase(Discriminable, ValidatorBase): validated_path_to_schemas=validation_metadata.validated_path_to_schemas ) if arg_validation_metadata.validation_ran_earlier(schema): + add_deeper_validated_schemas(arg_validation_metadata, path_to_schemas) continue other_path_to_schemas = schema._validate_oapg(value, validation_metadata=arg_validation_metadata) update(path_to_schemas, other_path_to_schemas) @@ -1683,6 +1698,7 @@ class DictBase(Discriminable, ValidatorBase): validated_path_to_schemas=validation_metadata.validated_path_to_schemas ) if updated_vm.validation_ran_earlier(discriminated_cls): + add_deeper_validated_schemas(updated_vm, _path_to_schemas) return _path_to_schemas other_path_to_schemas = discriminated_cls._validate_oapg(arg, validation_metadata=updated_vm) update(_path_to_schemas, other_path_to_schemas) @@ -1781,18 +1797,11 @@ def cast_to_allowed_types( if isinstance(arg, Schema): # store the already run validations schema_classes = set() - source_schema_was_unset = len(arg.__class__.__bases__) == 2 and UnsetAnyTypeSchema in arg.__class__.__bases__ - if not source_schema_was_unset: - """ - Do not include UnsetAnyTypeSchema and its base class because - it did not exist in the original spec schema definition - It was added to ensure that all instances are of type Schema and the allowed base types - """ - for cls in arg.__class__.__bases__: - if cls is Singleton: - # Skip Singleton - continue - schema_classes.add(cls) + for cls in arg.__class__.__bases__: + if cls is Singleton: + # Skip Singleton + continue + schema_classes.add(cls) validated_path_to_schemas[path_to_item] = schema_classes type_error = ApiTypeError(f"Invalid type. Required value type is str and passed type was {type(arg)} at {path_to_item}") @@ -1845,6 +1854,7 @@ class ComposedBase(Discriminable): path_to_schemas = defaultdict(set) for allof_cls in cls.MetaOapg.all_of(): if validation_metadata.validation_ran_earlier(allof_cls): + add_deeper_validated_schemas(validation_metadata, path_to_schemas) continue other_path_to_schemas = allof_cls._validate_oapg(arg, validation_metadata=validation_metadata) update(path_to_schemas, other_path_to_schemas) @@ -1865,6 +1875,7 @@ class ComposedBase(Discriminable): continue if validation_metadata.validation_ran_earlier(oneof_cls): oneof_classes.append(oneof_cls) + add_deeper_validated_schemas(validation_metadata, path_to_schemas) continue try: path_to_schemas = oneof_cls._validate_oapg(arg, validation_metadata=validation_metadata) @@ -1898,6 +1909,7 @@ class ComposedBase(Discriminable): for anyof_cls in cls.MetaOapg.any_of(): if validation_metadata.validation_ran_earlier(anyof_cls): anyof_classes.append(anyof_cls) + add_deeper_validated_schemas(validation_metadata, path_to_schemas) continue try: @@ -2011,6 +2023,7 @@ class ComposedBase(Discriminable): if discriminated_cls is not None and not updated_vm.validation_ran_earlier(discriminated_cls): # TODO use an exception from this package here + add_deeper_validated_schemas(updated_vm, path_to_schemas) assert discriminated_cls in path_to_schemas[updated_vm.path_to_item] return path_to_schemas @@ -2459,4 +2472,4 @@ LOG_CACHE_USAGE = False def log_cache_usage(cache_fn): if LOG_CACHE_USAGE: - print(cache_fn.__name__, cache_fn.cache_info()) + print(cache_fn.__name__, cache_fn.cache_info()) \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_pet.py b/samples/openapi3/client/petstore/python/tests_manual/test_pet.py new file mode 100644 index 0000000000..be64bfa6e3 --- /dev/null +++ b/samples/openapi3/client/petstore/python/tests_manual/test_pet.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + OpenAPI Petstore + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 + The version of the OpenAPI document: 1.0.0 + Generated by: https://openapi-generator.tech +""" + +import decimal +import unittest + +from petstore_api.model import pet +from petstore_api.model import category + + +class TesttPet(unittest.TestCase): + """ParentPet unit test stubs""" + + def testPet(self): + cat = category.Category(name='hi', addprop={'a': 1}) + inst = pet.Pet(photoUrls=[], name='Katsu', category=cat) + self.assertEqual( + inst, + { + 'photoUrls': (), + 'name': 'Katsu', + 'category': { + 'name': 'hi', + 'addprop': {'a': decimal.Decimal('1')} + } + } + ) + + +if __name__ == '__main__': + unittest.main() \ No newline at end of file From 9039c83bc46e5efa42b92f16ed4bed31d27442c1 Mon Sep 17 00:00:00 2001 From: Jeremy Audet Date: Sat, 19 Nov 2022 10:46:42 -0500 Subject: [PATCH 029/189] Migrate python-prior/tests_manual/ to pathlib (#14043) This change has no functional impact. In my view, `pathlib` has a more pleasant API than `os.path`. Incidentally, this slightly reduces line count. cc @spacether --- .../tests_manual/test_api_validation.py | 1 - .../tests_manual/test_deserialization.py | 3 +-- .../tests_manual/test_fake_api.py | 19 +++++---------- .../tests_manual/test_http_signature.py | 24 +++++++++---------- 4 files changed, 18 insertions(+), 29 deletions(-) diff --git a/samples/openapi3/client/petstore/python-prior/tests_manual/test_api_validation.py b/samples/openapi3/client/petstore/python-prior/tests_manual/test_api_validation.py index c04427530e..906c271ae9 100644 --- a/samples/openapi3/client/petstore/python-prior/tests_manual/test_api_validation.py +++ b/samples/openapi3/client/petstore/python-prior/tests_manual/test_api_validation.py @@ -9,7 +9,6 @@ $ cd OpenAPIetstore-python $ nosetests -v """ -import os import time import atexit import datetime diff --git a/samples/openapi3/client/petstore/python-prior/tests_manual/test_deserialization.py b/samples/openapi3/client/petstore/python-prior/tests_manual/test_deserialization.py index 1d8ab1b424..99320920f4 100644 --- a/samples/openapi3/client/petstore/python-prior/tests_manual/test_deserialization.py +++ b/samples/openapi3/client/petstore/python-prior/tests_manual/test_deserialization.py @@ -10,7 +10,6 @@ $ nosetests -v """ from collections import namedtuple import json -import os import time import unittest import datetime @@ -324,4 +323,4 @@ class DeserializationTests(unittest.TestCase): number = self.deserialize(response, (number_with_validations.NumberWithValidations,), True) self.assertTrue(isinstance(number, number_with_validations.NumberWithValidations)) - self.assertTrue(number.value == number_val) \ No newline at end of file + self.assertTrue(number.value == number_val) diff --git a/samples/openapi3/client/petstore/python-prior/tests_manual/test_fake_api.py b/samples/openapi3/client/petstore/python-prior/tests_manual/test_fake_api.py index 36a515d49c..fe674cff4c 100644 --- a/samples/openapi3/client/petstore/python-prior/tests_manual/test_fake_api.py +++ b/samples/openapi3/client/petstore/python-prior/tests_manual/test_fake_api.py @@ -11,7 +11,6 @@ import sys from collections import namedtuple -import os import json import unittest from pathlib import Path @@ -381,9 +380,7 @@ class TestFakeApi(unittest.TestCase): def test_upload_file(self): # uploads a file - test_file_dir = os.path.realpath( - os.path.join(os.path.dirname(__file__), "..", "testfiles")) - file_path1 = os.path.join(test_file_dir, "1px_pic1.png") + file_path1 = Path(__file__, "..", "..", "testfiles", "1px_pic1.png").resolve() headers = {} def get_headers(): @@ -439,10 +436,8 @@ class TestFakeApi(unittest.TestCase): self.api.upload_file(file=file) def test_upload_files(self): - test_file_dir = os.path.realpath( - os.path.join(os.path.dirname(__file__), "..", "testfiles")) - file_path1 = os.path.join(test_file_dir, "1px_pic1.png") - file_path2 = os.path.join(test_file_dir, "1px_pic2.png") + file_path1 = Path(__file__, "..", "..", "testfiles", "1px_pic1.png").resolve() + file_path2 = Path(__file__, "..", "..", "testfiles", "1px_pic2.png").resolve() headers = {} def get_headers(): @@ -579,12 +574,10 @@ class TestFakeApi(unittest.TestCase): self.assertEqual(file_object.read(), file_data.encode('utf-8')) finally: file_object.close() - os.unlink(file_object.name) + Path(file_object.name).unlink() def test_upload_download_file(self): - test_file_dir = os.path.realpath( - os.path.join(os.path.dirname(__file__), "..", "testfiles")) - file_path1 = os.path.join(test_file_dir, "1px_pic1.png") + file_path1 = Path(__file__, "..", "..", "testfiles", "1px_pic1.png").resolve() with open(file_path1, "rb") as f: expected_file_data = f.read() @@ -623,7 +616,7 @@ class TestFakeApi(unittest.TestCase): finally: file1.close() downloaded_file.close() - os.unlink(downloaded_file.name) + Path(downloaded_file.name).unlink() def test_test_body_with_file_schema(self): """Test case for test_body_with_file_schema diff --git a/samples/openapi3/client/petstore/python-prior/tests_manual/test_http_signature.py b/samples/openapi3/client/petstore/python-prior/tests_manual/test_http_signature.py index f299162c24..771560948d 100644 --- a/samples/openapi3/client/petstore/python-prior/tests_manual/test_http_signature.py +++ b/samples/openapi3/client/petstore/python-prior/tests_manual/test_http_signature.py @@ -19,6 +19,7 @@ import os import re import shutil import unittest +from pathlib import Path from urllib.parse import urlencode, urlparse from Crypto.Hash import SHA256, SHA512 @@ -205,7 +206,7 @@ class PetApiTests(unittest.TestCase): cls.ec_p521_key_path, ] for file_path in file_paths: - os.unlink(file_path) + Path(file_path).unlink() @classmethod def setUpModels(cls): @@ -226,22 +227,19 @@ class PetApiTests(unittest.TestCase): @classmethod def setUpFiles(cls): - cls.test_file_dir = os.path.join( - os.path.dirname(__file__), "..", "testfiles") - cls.test_file_dir = os.path.realpath(cls.test_file_dir) - if not os.path.exists(cls.test_file_dir): - os.mkdir(cls.test_file_dir) + cls.test_file_dir = Path(__file__, "..", "..", "testfiles").resolve() + cls.test_file_dir.mkdir(exist_ok=True) - cls.private_key_passphrase = 'test-passphrase' - cls.rsa_key_path = os.path.join(cls.test_file_dir, 'rsa.pem') - cls.rsa4096_key_path = os.path.join(cls.test_file_dir, 'rsa4096.pem') - cls.ec_p521_key_path = os.path.join(cls.test_file_dir, 'ecP521.pem') + cls.private_key_passphrase = "test-passphrase" + cls.rsa_key_path = cls.test_file_dir / "rsa.pem" + cls.rsa4096_key_path = cls.test_file_dir / "rsa4096.pem" + cls.ec_p521_key_path = cls.test_file_dir / "ecP521.pem" - if not os.path.exists(cls.rsa_key_path): + if not cls.rsa_key_path.exists(): with open(cls.rsa_key_path, 'w') as f: f.write(RSA_TEST_PRIVATE_KEY) - if not os.path.exists(cls.rsa4096_key_path): + if not cls.rsa4096_key_path.exists(): key = RSA.generate(4096) private_key = key.export_key( passphrase=cls.private_key_passphrase, @@ -250,7 +248,7 @@ class PetApiTests(unittest.TestCase): with open(cls.rsa4096_key_path, "wb") as f: f.write(private_key) - if not os.path.exists(cls.ec_p521_key_path): + if not cls.ec_p521_key_path.exists(): key = ECC.generate(curve='P-521') private_key = key.export_key( format='PEM', From 8e98bff9343960f53e4dd5ab273bd5304eecffb1 Mon Sep 17 00:00:00 2001 From: devhl-labs Date: Sat, 19 Nov 2022 23:28:29 -0500 Subject: [PATCH 030/189] mitigated a bug (#13786) --- .../languages/AbstractCSharpCodegen.java | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java index 610322f0cf..33a13db335 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java @@ -468,12 +468,15 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co @Override public Map postProcessAllModels(Map objs) { final Map processed = super.postProcessAllModels(objs); + + // TODO: move the logic of these three methods into patchProperty so all CodegenProperty instances get the same treatment postProcessEnumRefs(processed); updateValueTypeProperty(processed); updateNullableTypeProperty(processed); for (Map.Entry entry : objs.entrySet()) { CodegenModel model = ModelUtils.getModelByName(entry.getKey(), objs); + removeCircularReferencesInComposedSchemas(model); // https://github.com/OpenAPITools/openapi-generator/issues/12324 // TODO: why do these collections contain different instances? @@ -534,6 +537,31 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co } } + /** Mitigates https://github.com/OpenAPITools/openapi-generator/issues/13709 */ + private void removeCircularReferencesInComposedSchemas(CodegenModel cm) { + cm.anyOf.removeIf(anyOf -> anyOf.equals(cm.classname)); + cm.oneOf.removeIf(oneOf -> oneOf.equals(cm.classname)); + cm.allOf.removeIf(allOf -> allOf.equals(cm.classname)); + + CodegenComposedSchemas composedSchemas = cm.getComposedSchemas(); + if (composedSchemas != null){ + List anyOf = composedSchemas.getAnyOf(); + if (anyOf != null) { + anyOf.removeIf(p -> p.dataType.equals(cm.classname)); + } + + List oneOf = composedSchemas.getOneOf(); + if (oneOf != null){ + oneOf.removeIf(p -> p.dataType.equals(cm.classname)); + } + + List allOf = composedSchemas.getAllOf(); + if (allOf != null){ + allOf.removeIf(p -> p.dataType.equals(cm.classname)); + } + } + } + @Override protected List> buildEnumVars(List values, String dataType) { List> enumVars = super.buildEnumVars(values, dataType); From 95b566a3a9eca70c5e7b6d48ed6bd769ff3a1669 Mon Sep 17 00:00:00 2001 From: Oleh Kurpiak Date: Sun, 20 Nov 2022 06:44:47 +0200 Subject: [PATCH 031/189] [Java] fix additional annotations for oneOf interfaces (#13958) --- docs/generators/groovy.md | 1 + docs/generators/java-camel.md | 1 + docs/generators/java-helidon-client.md | 1 + docs/generators/java-helidon-server.md | 1 + docs/generators/java-inflector.md | 1 + docs/generators/java-micronaut-client.md | 1 + docs/generators/java-micronaut-server.md | 1 + docs/generators/java-msf4j.md | 1 + docs/generators/java-pkmst.md | 1 + docs/generators/java-play-framework.md | 1 + docs/generators/java-undertow-server.md | 1 + docs/generators/java-vertx-web.md | 1 + docs/generators/java-vertx.md | 1 + docs/generators/java.md | 1 + docs/generators/jaxrs-cxf-cdi.md | 1 + docs/generators/jaxrs-cxf-client.md | 1 + docs/generators/jaxrs-cxf-extended.md | 1 + docs/generators/jaxrs-cxf.md | 1 + docs/generators/jaxrs-jersey.md | 1 + docs/generators/jaxrs-resteasy-eap.md | 1 + docs/generators/jaxrs-resteasy.md | 1 + docs/generators/jaxrs-spec.md | 1 + docs/generators/spring.md | 1 + .../languages/AbstractJavaCodegen.java | 27 +++++- .../additionalOneOfTypeAnnotations.mustache | 2 + .../resources/Java/oneof_interface.mustache | 2 +- .../additionalOneOfTypeAnnotations.mustache | 2 + .../JavaSpring/oneof_interface.mustache | 2 +- .../additionalOneOfTypeAnnotations.mustache | 2 + .../libraries/mp/oneof_interface.mustache | 2 +- .../additionalOneOfTypeAnnotations.mustache | 2 + .../libraries/se/oneof_interface.mustache | 2 +- .../common/model/oneof_interface.mustache | 4 +- .../java/assertions/JavaFileAssert.java | 26 ++++++ .../java/spring/SpringCodegenTest.java | 40 +++++++++ .../src/test/resources/bugs/issue_13917.yaml | 87 +++++++++++++++++++ 36 files changed, 215 insertions(+), 8 deletions(-) create mode 100644 modules/openapi-generator/src/main/resources/Java/additionalOneOfTypeAnnotations.mustache create mode 100644 modules/openapi-generator/src/main/resources/JavaSpring/additionalOneOfTypeAnnotations.mustache create mode 100644 modules/openapi-generator/src/main/resources/java-helidon/client/libraries/mp/additionalOneOfTypeAnnotations.mustache create mode 100644 modules/openapi-generator/src/main/resources/java-helidon/client/libraries/se/additionalOneOfTypeAnnotations.mustache create mode 100644 modules/openapi-generator/src/test/resources/bugs/issue_13917.yaml diff --git a/docs/generators/groovy.md b/docs/generators/groovy.md index e60f802f17..e028fb0a8d 100644 --- a/docs/generators/groovy.md +++ b/docs/generators/groovy.md @@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ------ | ----------- | ------ | ------- | |additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null| |additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| +|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |org.openapitools.api| |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-groovy| diff --git a/docs/generators/java-camel.md b/docs/generators/java-camel.md index c3cac83c15..daf59d3169 100644 --- a/docs/generators/java-camel.md +++ b/docs/generators/java-camel.md @@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ------ | ----------- | ------ | ------- | |additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null| |additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| +|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |annotationLibrary|Select the complementary documentation annotation library.|
**none**
Do not annotate Model and Api with complementary annotations.
**swagger1**
Annotate Model and Api using the Swagger Annotations 1.x library.
**swagger2**
Annotate Model and Api using the Swagger Annotations 2.x library.
|swagger2| |apiFirst|Generate the API from the OAI spec at server compile time (API first approach)| |false| diff --git a/docs/generators/java-helidon-client.md b/docs/generators/java-helidon-client.md index a2c57ac695..809503a3cf 100644 --- a/docs/generators/java-helidon-client.md +++ b/docs/generators/java-helidon-client.md @@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ------ | ----------- | ------ | ------- | |additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null| |additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| +|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |org.openapitools.client.api| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| diff --git a/docs/generators/java-helidon-server.md b/docs/generators/java-helidon-server.md index b96f173075..4a216c0e81 100644 --- a/docs/generators/java-helidon-server.md +++ b/docs/generators/java-helidon-server.md @@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ------ | ----------- | ------ | ------- | |additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null| |additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| +|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |org.openapitools.server.api| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| diff --git a/docs/generators/java-inflector.md b/docs/generators/java-inflector.md index 8dfd8797cd..67a83702c8 100644 --- a/docs/generators/java-inflector.md +++ b/docs/generators/java-inflector.md @@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ------ | ----------- | ------ | ------- | |additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null| |additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| +|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |org.openapitools.controllers| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| diff --git a/docs/generators/java-micronaut-client.md b/docs/generators/java-micronaut-client.md index b0368d3ef5..bf0e245cae 100644 --- a/docs/generators/java-micronaut-client.md +++ b/docs/generators/java-micronaut-client.md @@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ------ | ----------- | ------ | ------- | |additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null| |additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| +|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |org.openapitools.api| |applicationName|Micronaut application name (Defaults to the artifactId value)| |openapi-micronaut-client| diff --git a/docs/generators/java-micronaut-server.md b/docs/generators/java-micronaut-server.md index 85422ca8bb..d0ccd44dbb 100644 --- a/docs/generators/java-micronaut-server.md +++ b/docs/generators/java-micronaut-server.md @@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ------ | ----------- | ------ | ------- | |additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null| |additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| +|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |applicationName|Micronaut application name (Defaults to the artifactId value)| |openapi-micronaut| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| diff --git a/docs/generators/java-msf4j.md b/docs/generators/java-msf4j.md index 15ab35ba4e..c270a4d730 100644 --- a/docs/generators/java-msf4j.md +++ b/docs/generators/java-msf4j.md @@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ------ | ----------- | ------ | ------- | |additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null| |additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| +|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |org.openapitools.api| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| diff --git a/docs/generators/java-pkmst.md b/docs/generators/java-pkmst.md index efb3e265c2..9cb8ea5de8 100644 --- a/docs/generators/java-pkmst.md +++ b/docs/generators/java-pkmst.md @@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ------ | ----------- | ------ | ------- | |additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null| |additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| +|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |com.prokarma.pkmst.controller| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| diff --git a/docs/generators/java-play-framework.md b/docs/generators/java-play-framework.md index 65ae38fc1a..e9dd7e0a5e 100644 --- a/docs/generators/java-play-framework.md +++ b/docs/generators/java-play-framework.md @@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ------ | ----------- | ------ | ------- | |additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null| |additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| +|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |controllers| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| diff --git a/docs/generators/java-undertow-server.md b/docs/generators/java-undertow-server.md index 019efb9117..302c87ee3a 100644 --- a/docs/generators/java-undertow-server.md +++ b/docs/generators/java-undertow-server.md @@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ------ | ----------- | ------ | ------- | |additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null| |additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| +|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |null| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| diff --git a/docs/generators/java-vertx-web.md b/docs/generators/java-vertx-web.md index 3a721083c2..1a8cd03de9 100644 --- a/docs/generators/java-vertx-web.md +++ b/docs/generators/java-vertx-web.md @@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ------ | ----------- | ------ | ------- | |additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null| |additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| +|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |org.openapitools.vertxweb.server.api| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| diff --git a/docs/generators/java-vertx.md b/docs/generators/java-vertx.md index d5e12fe3f3..b32f93066c 100644 --- a/docs/generators/java-vertx.md +++ b/docs/generators/java-vertx.md @@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ------ | ----------- | ------ | ------- | |additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null| |additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| +|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |org.openapitools.server.api.verticle| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| diff --git a/docs/generators/java.md b/docs/generators/java.md index 750e9c9944..63e46d8ed3 100644 --- a/docs/generators/java.md +++ b/docs/generators/java.md @@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ------ | ----------- | ------ | ------- | |additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null| |additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| +|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |annotationLibrary|Select the complementary documentation annotation library.|
**none**
Do not annotate Model and Api with complementary annotations.
**swagger1**
Annotate Model and Api using the Swagger Annotations 1.x library.
|none| |apiPackage|package for generated api classes| |org.openapitools.client.api| diff --git a/docs/generators/jaxrs-cxf-cdi.md b/docs/generators/jaxrs-cxf-cdi.md index 6cd328248a..2cff133eba 100644 --- a/docs/generators/jaxrs-cxf-cdi.md +++ b/docs/generators/jaxrs-cxf-cdi.md @@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ------ | ----------- | ------ | ------- | |additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null| |additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| +|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |org.openapitools.api| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| diff --git a/docs/generators/jaxrs-cxf-client.md b/docs/generators/jaxrs-cxf-client.md index 72cb6f71bc..6d11b06109 100644 --- a/docs/generators/jaxrs-cxf-client.md +++ b/docs/generators/jaxrs-cxf-client.md @@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ------ | ----------- | ------ | ------- | |additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null| |additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| +|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |org.openapitools.api| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| diff --git a/docs/generators/jaxrs-cxf-extended.md b/docs/generators/jaxrs-cxf-extended.md index e1778d3101..8ec8348a5a 100644 --- a/docs/generators/jaxrs-cxf-extended.md +++ b/docs/generators/jaxrs-cxf-extended.md @@ -21,6 +21,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |addConsumesProducesJson|Add @Consumes/@Produces Json to API interface| |false| |additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null| |additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| +|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |org.openapitools.api| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| diff --git a/docs/generators/jaxrs-cxf.md b/docs/generators/jaxrs-cxf.md index e54504b1ca..6135b64fa8 100644 --- a/docs/generators/jaxrs-cxf.md +++ b/docs/generators/jaxrs-cxf.md @@ -21,6 +21,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |addConsumesProducesJson|Add @Consumes/@Produces Json to API interface| |false| |additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null| |additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| +|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |org.openapitools.api| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| diff --git a/docs/generators/jaxrs-jersey.md b/docs/generators/jaxrs-jersey.md index 73bf0d8f6b..653373ccb5 100644 --- a/docs/generators/jaxrs-jersey.md +++ b/docs/generators/jaxrs-jersey.md @@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ------ | ----------- | ------ | ------- | |additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null| |additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| +|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |org.openapitools.api| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| diff --git a/docs/generators/jaxrs-resteasy-eap.md b/docs/generators/jaxrs-resteasy-eap.md index 726c44cd45..8667af28b1 100644 --- a/docs/generators/jaxrs-resteasy-eap.md +++ b/docs/generators/jaxrs-resteasy-eap.md @@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ------ | ----------- | ------ | ------- | |additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null| |additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| +|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |org.openapitools.api| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| diff --git a/docs/generators/jaxrs-resteasy.md b/docs/generators/jaxrs-resteasy.md index aa92d499db..a24cbf60f4 100644 --- a/docs/generators/jaxrs-resteasy.md +++ b/docs/generators/jaxrs-resteasy.md @@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ------ | ----------- | ------ | ------- | |additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null| |additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| +|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |org.openapitools.api| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| diff --git a/docs/generators/jaxrs-spec.md b/docs/generators/jaxrs-spec.md index 84aea15c97..3922bf97d0 100644 --- a/docs/generators/jaxrs-spec.md +++ b/docs/generators/jaxrs-spec.md @@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ------ | ----------- | ------ | ------- | |additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null| |additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| +|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |apiPackage|package for generated api classes| |org.openapitools.api| |artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| diff --git a/docs/generators/spring.md b/docs/generators/spring.md index 9d28e7915e..e6e72361eb 100644 --- a/docs/generators/spring.md +++ b/docs/generators/spring.md @@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ------ | ----------- | ------ | ------- | |additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null| |additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| +|additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |annotationLibrary|Select the complementary documentation annotation library.|
**none**
Do not annotate Model and Api with complementary annotations.
**swagger1**
Annotate Model and Api using the Swagger Annotations 1.x library.
**swagger2**
Annotate Model and Api using the Swagger Annotations 2.x library.
|swagger2| |apiFirst|Generate the API from the OAI spec at server compile time (API first approach)| |false| 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 572575e088..a5c578041d 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 @@ -75,6 +75,7 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code public static final String BOOLEAN_GETTER_PREFIX = "booleanGetterPrefix"; public static final String IGNORE_ANYOF_IN_ENUM = "ignoreAnyOfInEnum"; public static final String ADDITIONAL_MODEL_TYPE_ANNOTATIONS = "additionalModelTypeAnnotations"; + public static final String ADDITIONAL_ONE_OF_TYPE_ANNOTATIONS = "additionalOneOfTypeAnnotations"; public static final String ADDITIONAL_ENUM_TYPE_ANNOTATIONS = "additionalEnumTypeAnnotations"; public static final String DISCRIMINATOR_CASE_SENSITIVE = "discriminatorCaseSensitive"; public static final String OPENAPI_NULLABLE = "openApiNullable"; @@ -126,6 +127,7 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code protected String parentVersion = ""; protected boolean parentOverridden = false; protected List additionalModelTypeAnnotations = new LinkedList<>(); + protected List additionalOneOfTypeAnnotations = new LinkedList<>(); protected List additionalEnumTypeAnnotations = new LinkedList<>(); protected boolean openApiNullable = true; protected String outputTestFolder = ""; @@ -265,6 +267,7 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code cliOptions.add(CliOption.newBoolean(IGNORE_ANYOF_IN_ENUM, "Ignore anyOf keyword in enum", ignoreAnyOfInEnum)); cliOptions.add(CliOption.newString(ADDITIONAL_ENUM_TYPE_ANNOTATIONS, "Additional annotations for enum type(class level annotations)")); cliOptions.add(CliOption.newString(ADDITIONAL_MODEL_TYPE_ANNOTATIONS, "Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)")); + cliOptions.add(CliOption.newString(ADDITIONAL_ONE_OF_TYPE_ANNOTATIONS, "Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)")); cliOptions.add(CliOption.newBoolean(OPENAPI_NULLABLE, "Enable OpenAPI Jackson Nullable library", this.openApiNullable)); cliOptions.add(CliOption.newBoolean(IMPLICIT_HEADERS, "Skip header parameters in the generated API methods using @ApiImplicitParams annotation.", implicitHeaders)); cliOptions.add(CliOption.newString(IMPLICIT_HEADERS_REGEX, "Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true")); @@ -373,6 +376,11 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code this.setAdditionalModelTypeAnnotations(Arrays.asList(additionalAnnotationsList.trim().split("\\s*(;|\\r?\\n)\\s*"))); } + if (additionalProperties.containsKey(ADDITIONAL_ONE_OF_TYPE_ANNOTATIONS)) { + String additionalAnnotationsList = additionalProperties.get(ADDITIONAL_ONE_OF_TYPE_ANNOTATIONS).toString(); + this.setAdditionalOneOfTypeAnnotations(Arrays.asList(additionalAnnotationsList.trim().split("\\s*(;|\\r?\\n)\\s*"))); + } + if (additionalProperties.containsKey(ADDITIONAL_ENUM_TYPE_ANNOTATIONS)) { String additionalAnnotationsList = additionalProperties.get(ADDITIONAL_ENUM_TYPE_ANNOTATIONS).toString(); @@ -671,14 +679,21 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code if (!additionalModelTypeAnnotations.isEmpty()) { for (String modelName : objs.keySet()) { - Map models = (Map) objs.get(modelName); + Map models = objs.get(modelName); models.put(ADDITIONAL_MODEL_TYPE_ANNOTATIONS, additionalModelTypeAnnotations); } } + if (!additionalOneOfTypeAnnotations.isEmpty()) { + for (String modelName : objs.keySet()) { + Map models = objs.get(modelName); + models.put(ADDITIONAL_ONE_OF_TYPE_ANNOTATIONS, additionalOneOfTypeAnnotations); + } + } + if (!additionalEnumTypeAnnotations.isEmpty()) { for (String modelName : objs.keySet()) { - Map models = (Map) objs.get(modelName); + Map models = objs.get(modelName); models.put(ADDITIONAL_ENUM_TYPE_ANNOTATIONS, additionalEnumTypeAnnotations); } } @@ -2075,6 +2090,14 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code this.additionalModelTypeAnnotations = additionalModelTypeAnnotations; } + public List getAdditionalOneOfTypeAnnotations() { + return additionalOneOfTypeAnnotations; + } + + public void setAdditionalOneOfTypeAnnotations(final List additionalOneOfTypeAnnotations) { + this.additionalOneOfTypeAnnotations = additionalOneOfTypeAnnotations; + } + public void setAdditionalEnumTypeAnnotations(final List additionalEnumTypeAnnotations) { this.additionalEnumTypeAnnotations = additionalEnumTypeAnnotations; } diff --git a/modules/openapi-generator/src/main/resources/Java/additionalOneOfTypeAnnotations.mustache b/modules/openapi-generator/src/main/resources/Java/additionalOneOfTypeAnnotations.mustache new file mode 100644 index 0000000000..283f8f91e7 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/Java/additionalOneOfTypeAnnotations.mustache @@ -0,0 +1,2 @@ +{{#additionalOneOfTypeAnnotations}}{{{.}}} +{{/additionalOneOfTypeAnnotations}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/Java/oneof_interface.mustache b/modules/openapi-generator/src/main/resources/Java/oneof_interface.mustache index 02deb483d5..d672772746 100644 --- a/modules/openapi-generator/src/main/resources/Java/oneof_interface.mustache +++ b/modules/openapi-generator/src/main/resources/Java/oneof_interface.mustache @@ -1,4 +1,4 @@ -{{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{>typeInfoAnnotation}}{{>xmlAnnotation}} +{{>additionalOneOfTypeAnnotations}}{{>generatedAnnotation}}{{>typeInfoAnnotation}}{{>xmlAnnotation}} public interface {{classname}} {{#vendorExtensions.x-implements}}{{#-first}}extends {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-implements}} { {{#discriminator}} public {{propertyType}} {{propertyGetter}}(); diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/additionalOneOfTypeAnnotations.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/additionalOneOfTypeAnnotations.mustache new file mode 100644 index 0000000000..283f8f91e7 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/JavaSpring/additionalOneOfTypeAnnotations.mustache @@ -0,0 +1,2 @@ +{{#additionalOneOfTypeAnnotations}}{{{.}}} +{{/additionalOneOfTypeAnnotations}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/oneof_interface.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/oneof_interface.mustache index 7ec79444bb..679fe3d883 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/oneof_interface.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/oneof_interface.mustache @@ -1,4 +1,4 @@ -{{>additionalModelTypeAnnotations}} +{{>additionalOneOfTypeAnnotations}} {{#withXml}} {{>xmlAnnotation}} {{/withXml}} diff --git a/modules/openapi-generator/src/main/resources/java-helidon/client/libraries/mp/additionalOneOfTypeAnnotations.mustache b/modules/openapi-generator/src/main/resources/java-helidon/client/libraries/mp/additionalOneOfTypeAnnotations.mustache new file mode 100644 index 0000000000..283f8f91e7 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/java-helidon/client/libraries/mp/additionalOneOfTypeAnnotations.mustache @@ -0,0 +1,2 @@ +{{#additionalOneOfTypeAnnotations}}{{{.}}} +{{/additionalOneOfTypeAnnotations}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/java-helidon/client/libraries/mp/oneof_interface.mustache b/modules/openapi-generator/src/main/resources/java-helidon/client/libraries/mp/oneof_interface.mustache index 02deb483d5..d672772746 100644 --- a/modules/openapi-generator/src/main/resources/java-helidon/client/libraries/mp/oneof_interface.mustache +++ b/modules/openapi-generator/src/main/resources/java-helidon/client/libraries/mp/oneof_interface.mustache @@ -1,4 +1,4 @@ -{{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{>typeInfoAnnotation}}{{>xmlAnnotation}} +{{>additionalOneOfTypeAnnotations}}{{>generatedAnnotation}}{{>typeInfoAnnotation}}{{>xmlAnnotation}} public interface {{classname}} {{#vendorExtensions.x-implements}}{{#-first}}extends {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-implements}} { {{#discriminator}} public {{propertyType}} {{propertyGetter}}(); diff --git a/modules/openapi-generator/src/main/resources/java-helidon/client/libraries/se/additionalOneOfTypeAnnotations.mustache b/modules/openapi-generator/src/main/resources/java-helidon/client/libraries/se/additionalOneOfTypeAnnotations.mustache new file mode 100644 index 0000000000..283f8f91e7 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/java-helidon/client/libraries/se/additionalOneOfTypeAnnotations.mustache @@ -0,0 +1,2 @@ +{{#additionalOneOfTypeAnnotations}}{{{.}}} +{{/additionalOneOfTypeAnnotations}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/java-helidon/client/libraries/se/oneof_interface.mustache b/modules/openapi-generator/src/main/resources/java-helidon/client/libraries/se/oneof_interface.mustache index 02deb483d5..d672772746 100644 --- a/modules/openapi-generator/src/main/resources/java-helidon/client/libraries/se/oneof_interface.mustache +++ b/modules/openapi-generator/src/main/resources/java-helidon/client/libraries/se/oneof_interface.mustache @@ -1,4 +1,4 @@ -{{>additionalModelTypeAnnotations}}{{>generatedAnnotation}}{{>typeInfoAnnotation}}{{>xmlAnnotation}} +{{>additionalOneOfTypeAnnotations}}{{>generatedAnnotation}}{{>typeInfoAnnotation}}{{>xmlAnnotation}} public interface {{classname}} {{#vendorExtensions.x-implements}}{{#-first}}extends {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-implements}} { {{#discriminator}} public {{propertyType}} {{propertyGetter}}(); diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/common/model/oneof_interface.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/common/model/oneof_interface.mustache index 33c3d6530f..fbf0a8340c 100644 --- a/modules/openapi-generator/src/main/resources/java-micronaut/common/model/oneof_interface.mustache +++ b/modules/openapi-generator/src/main/resources/java-micronaut/common/model/oneof_interface.mustache @@ -1,6 +1,6 @@ -{{#additionalModelTypeAnnotations}} +{{#additionalOneOfTypeAnnotations}} {{{.}}} -{{/additionalModelTypeAnnotations}} +{{/additionalOneOfTypeAnnotations}} {{>common/generatedAnnotation}}{{>common/model/typeInfoAnnotation}}{{>common/model/xmlAnnotation}} public interface {{classname}} {{#vendorExtensions.x-implements}}{{#-first}}extends {{{.}}}{{/-first}}{{^-first}}, {{{.}}}{{/-first}}{{/vendorExtensions.x-implements}} { {{#discriminator}} diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/assertions/JavaFileAssert.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/assertions/JavaFileAssert.java index e0621b3166..7111d38922 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/assertions/JavaFileAssert.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/assertions/JavaFileAssert.java @@ -8,6 +8,7 @@ import java.util.List; import java.util.Optional; import java.util.stream.Collectors; +import com.github.javaparser.ast.body.ClassOrInterfaceDeclaration; import com.github.javaparser.ast.body.ConstructorDeclaration; import org.assertj.core.api.AbstractAssert; import org.assertj.core.api.Assertions; @@ -18,6 +19,7 @@ import com.github.javaparser.ast.CompilationUnit; import com.github.javaparser.ast.body.FieldDeclaration; import com.github.javaparser.ast.body.MethodDeclaration; import com.github.javaparser.ast.nodeTypes.NodeWithName; +import com.github.javaparser.ast.nodeTypes.modifiers.NodeWithAbstractModifier; @CanIgnoreReturnValue public class JavaFileAssert extends AbstractAssert { @@ -46,6 +48,30 @@ public class JavaFileAssert extends AbstractAssert methods = paramTypes.length == 0 ? actual.getType(0).getMethodsByName(methodName) diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java index d97a3c6ab4..e7c9b733cd 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java @@ -1618,6 +1618,46 @@ public class SpringCodegenTest { .bodyContainsLines("return Arrays.equals(this.picture, testObject.picture);"); } + @Test + public void shouldHandleSeparatelyInterfaceAndModelAdditionalAnnotations() throws IOException { + File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); + output.deleteOnExit(); + + OpenAPI openAPI = new OpenAPIParser() + .readLocation("src/test/resources/bugs/issue_13917.yaml", null, new ParseOptions()).getOpenAPI(); + SpringCodegen codegen = new SpringCodegen(); + codegen.setLibrary(SPRING_BOOT); + codegen.setOutputDir(output.getAbsolutePath()); + codegen.additionalProperties().put(SpringCodegen.INTERFACE_ONLY, "true"); + codegen.additionalProperties().put(SpringCodegen.USE_BEANVALIDATION, "true"); + codegen.additionalProperties().put(SpringCodegen.PERFORM_BEANVALIDATION, "true"); + codegen.additionalProperties().put(CodegenConstants.MODEL_PACKAGE, "xyz.model"); + codegen.additionalProperties().put(CodegenConstants.API_PACKAGE, "xyz.controller"); + codegen.additionalProperties().put(AbstractJavaCodegen.ADDITIONAL_MODEL_TYPE_ANNOTATIONS, "@marker.Class1;@marker.Class2;@marker.Common"); + codegen.additionalProperties().put(AbstractJavaCodegen.ADDITIONAL_ONE_OF_TYPE_ANNOTATIONS, "@marker.Interface1;@marker.Common"); + + ClientOptInput input = new ClientOptInput() + .openAPI(openAPI) + .config(codegen); + + DefaultGenerator generator = new DefaultGenerator(); + Map files = generator.opts(input).generate().stream() + .collect(Collectors.toMap(File::getName, Function.identity())); + + JavaFileAssert.assertThat(files.get("PatchRequestInner.java")) + .isInterface() + .assertTypeAnnotations() + .containsWithName("marker.Interface1") + .containsWithName("marker.Common"); + + JavaFileAssert.assertThat(files.get("JSONPatchRequestRemove.java")) + .isNormalClass() + .assertTypeAnnotations() + .containsWithName("marker.Class1") + .containsWithName("marker.Class2") + .containsWithName("marker.Common"); + } + @Test public void contractWithoutEnumDoesNotContainsEnumConverter() throws IOException { Map output = generateFromContract("src/test/resources/3_0/generic.yaml", SPRING_BOOT); diff --git a/modules/openapi-generator/src/test/resources/bugs/issue_13917.yaml b/modules/openapi-generator/src/test/resources/bugs/issue_13917.yaml new file mode 100644 index 0000000000..85e84252fc --- /dev/null +++ b/modules/openapi-generator/src/test/resources/bugs/issue_13917.yaml @@ -0,0 +1,87 @@ +openapi: 3.0.3 +info: + description: xxx + version: 0.0.1 + title: x + x-audience: company-internal + +paths: + + /users/{id}: + patch: + description: Returns an organization + operationId: GetOrganization + parameters: + - in: path + name: id + required: true + schema: + #minLength: 36 + type: string + format: uuid + style: simple + requestBody: + content: + application/json-patch+json: + schema: + $ref: '#/components/schemas/PatchRequest' + responses: + '200': + description: Successful response. + + + +components: + schemas: + PatchRequest: + type: array + items: + oneOf: + - $ref: '#/components/schemas/JSONPatchRequestAddReplaceTest' + - $ref: '#/components/schemas/JSONPatchRequestRemove' + - $ref: '#/components/schemas/JSONPatchRequestMoveCopy' + JSONPatchRequestAddReplaceTest: + type: object + additionalProperties: false + required: + - value + - op + - path + properties: + path: + description: A JSON Pointer path. + type: string + value: + description: The value to add, replace or test. + JSONPatchRequestRemove: + type: object + additionalProperties: false + required: + - op + - path + properties: + path: + description: A JSON Pointer path. + type: string + op: + description: The operation to perform. + type: string + enum: + - remove + JSONPatchRequestMoveCopy: + type: object + additionalProperties: false + required: + - from + - op + - path + properties: + path: + description: A JSON Pointer path. + type: string + op: + description: The operation to perform. + type: string + enum: + - move + - copy \ No newline at end of file From 4487042f0d4ef1f4686950f0c1ddac6fe6d44f98 Mon Sep 17 00:00:00 2001 From: Vittorio Parrella <93098480+parvit@users.noreply.github.com> Date: Sun, 20 Nov 2022 02:09:33 -0500 Subject: [PATCH 032/189] Issue 11401 - report correctly the parameters with the deep object specification (#13909) * issue #11401 - Go client generator doesn't support deepObject in query * samples generation * fix generation * fix generation * generated samples # Conflicts: # samples/client/petstore/go/go-petstore/model_200_response.go # samples/client/petstore/go/go-petstore/model_additional_properties_any_type.go # samples/client/petstore/go/go-petstore/model_client.go * Fixed unit tests * revert to http connection for tests * fix model_simple generation * Fix parameter encoding issue * simplified routine * fix test url * adapted for latest master, necessary generation * samples generation * sync with new master, regenerate samples * added api client test --- .../src/main/resources/go/api.mustache | 22 +- .../src/main/resources/go/client.mustache | 119 +++++++++-- .../main/resources/go/model_simple.mustache | 47 +++-- .../src/main/resources/go/utils.mustache | 4 + ...odels-for-testing-with-http-signature.yaml | 25 ++- .../petstore/go/go-petstore/api_fake.go | 72 +++---- .../client/petstore/go/go-petstore/api_pet.go | 24 +-- .../petstore/go/go-petstore/api_store.go | 4 +- .../petstore/go/go-petstore/api_user.go | 10 +- .../client/petstore/go/go-petstore/client.go | 119 +++++++++-- .../go/go-petstore/model_200_response.go | 13 +- .../model_additional_properties_any_type.go | 13 +- .../model_additional_properties_array.go | 13 +- .../model_additional_properties_boolean.go | 13 +- .../model_additional_properties_class.go | 13 +- .../model_additional_properties_integer.go | 13 +- .../model_additional_properties_number.go | 13 +- .../model_additional_properties_object.go | 13 +- .../model_additional_properties_string.go | 13 +- .../petstore/go/go-petstore/model_animal.go | 17 +- .../go/go-petstore/model_api_response.go | 13 +- .../model_array_of_array_of_number_only.go | 13 +- .../go-petstore/model_array_of_number_only.go | 13 +- .../go/go-petstore/model_array_test_.go | 13 +- .../petstore/go/go-petstore/model_big_cat.go | 17 +- .../go/go-petstore/model_big_cat_all_of.go | 13 +- .../go/go-petstore/model_capitalization.go | 13 +- .../petstore/go/go-petstore/model_cat.go | 17 +- .../go/go-petstore/model_cat_all_of.go | 13 +- .../petstore/go/go-petstore/model_category.go | 17 +- .../go/go-petstore/model_class_model.go | 13 +- .../petstore/go/go-petstore/model_client.go | 13 +- .../petstore/go/go-petstore/model_dog.go | 17 +- .../go/go-petstore/model_dog_all_of.go | 13 +- .../go/go-petstore/model_enum_arrays.go | 13 +- .../go/go-petstore/model_enum_test_.go | 17 +- .../petstore/go/go-petstore/model_file.go | 13 +- .../model_file_schema_test_class.go | 13 +- .../go/go-petstore/model_format_test_.go | 29 +-- .../go-petstore/model_has_only_read_only.go | 13 +- .../petstore/go/go-petstore/model_list.go | 13 +- .../go/go-petstore/model_map_test_.go | 13 +- ...perties_and_additional_properties_class.go | 13 +- .../petstore/go/go-petstore/model_name.go | 17 +- .../go/go-petstore/model_number_only.go | 13 +- .../petstore/go/go-petstore/model_order.go | 13 +- .../go/go-petstore/model_outer_composite.go | 13 +- .../petstore/go/go-petstore/model_pet.go | 21 +- .../go/go-petstore/model_read_only_first.go | 13 +- .../petstore/go/go-petstore/model_return.go | 13 +- .../go-petstore/model_special_model_name.go | 13 +- .../petstore/go/go-petstore/model_tag.go | 13 +- .../go-petstore/model_type_holder_default.go | 31 +-- .../go-petstore/model_type_holder_example.go | 35 ++- .../petstore/go/go-petstore/model_user.go | 13 +- .../petstore/go/go-petstore/model_xml_item.go | 13 +- .../client/petstore/go/go-petstore/utils.go | 4 + samples/client/petstore/go/pet_api_test.go | 2 +- samples/client/petstore/go/store_api_test.go | 2 +- .../x-auth-id-alias/go-experimental/client.go | 119 +++++++++-- .../x-auth-id-alias/go-experimental/utils.go | 4 + .../client/petstore/go/fake_api_test.go | 52 +++++ .../client/petstore/go/go-petstore/README.md | 1 + .../petstore/go/go-petstore/api/openapi.yaml | 25 ++- .../petstore/go/go-petstore/api_fake.go | 199 ++++++++++++++---- .../client/petstore/go/go-petstore/api_pet.go | 24 +-- .../petstore/go/go-petstore/api_store.go | 4 +- .../petstore/go/go-petstore/api_user.go | 10 +- .../client/petstore/go/go-petstore/client.go | 119 +++++++++-- .../petstore/go/go-petstore/docs/FakeApi.md | 67 +++++- .../go/go-petstore/model_200_response.go | 13 +- .../model__foo_get_default_response.go | 13 +- .../go-petstore/model__special_model_name_.go | 13 +- .../model_additional_properties_class.go | 13 +- .../petstore/go/go-petstore/model_animal.go | 17 +- .../go/go-petstore/model_api_response.go | 13 +- .../petstore/go/go-petstore/model_apple.go | 13 +- .../go/go-petstore/model_apple_req.go | 17 +- .../model_array_of_array_of_number_only.go | 13 +- .../go-petstore/model_array_of_number_only.go | 13 +- .../go/go-petstore/model_array_test_.go | 13 +- .../petstore/go/go-petstore/model_banana.go | 13 +- .../go/go-petstore/model_banana_req.go | 17 +- .../go/go-petstore/model_capitalization.go | 13 +- .../petstore/go/go-petstore/model_cat.go | 17 +- .../go/go-petstore/model_cat_all_of.go | 13 +- .../petstore/go/go-petstore/model_category.go | 17 +- .../go/go-petstore/model_class_model.go | 13 +- .../petstore/go/go-petstore/model_client.go | 13 +- .../petstore/go/go-petstore/model_dog.go | 17 +- .../go/go-petstore/model_dog_all_of.go | 13 +- .../model_duplicated_prop_child.go | 17 +- .../model_duplicated_prop_child_all_of.go | 13 +- .../model_duplicated_prop_parent.go | 17 +- .../go/go-petstore/model_enum_arrays.go | 13 +- .../go/go-petstore/model_enum_test_.go | 17 +- .../petstore/go/go-petstore/model_file.go | 13 +- .../model_file_schema_test_class.go | 13 +- .../petstore/go/go-petstore/model_foo.go | 13 +- .../go/go-petstore/model_format_test_.go | 29 +-- .../go-petstore/model_has_only_read_only.go | 13 +- .../go-petstore/model_health_check_result.go | 13 +- .../petstore/go/go-petstore/model_list.go | 13 +- .../go/go-petstore/model_map_of_file_test_.go | 13 +- .../go/go-petstore/model_map_test_.go | 13 +- ...perties_and_additional_properties_class.go | 13 +- .../petstore/go/go-petstore/model_name.go | 17 +- .../go/go-petstore/model_nullable_all_of.go | 13 +- .../model_nullable_all_of_child.go | 13 +- .../go/go-petstore/model_nullable_class.go | 13 +- .../go/go-petstore/model_number_only.go | 13 +- .../model_one_of_primitive_type_child.go | 13 +- .../petstore/go/go-petstore/model_order.go | 13 +- .../go/go-petstore/model_outer_composite.go | 13 +- .../petstore/go/go-petstore/model_pet.go | 21 +- .../go/go-petstore/model_read_only_first.go | 13 +- .../model_read_only_with_default.go | 13 +- .../petstore/go/go-petstore/model_return.go | 13 +- .../petstore/go/go-petstore/model_tag.go | 13 +- .../petstore/go/go-petstore/model_user.go | 13 +- .../petstore/go/go-petstore/model_whale.go | 17 +- .../petstore/go/go-petstore/model_zebra.go | 17 +- .../client/petstore/go/go-petstore/utils.go | 4 + .../client/petstore/go/pet_api_test.go | 20 ++ 124 files changed, 2099 insertions(+), 441 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/go/api.mustache b/modules/openapi-generator/src/main/resources/go/api.mustache index 44fbbcf4f9..c7840ffe56 100644 --- a/modules/openapi-generator/src/main/resources/go/api.mustache +++ b/modules/openapi-generator/src/main/resources/go/api.mustache @@ -124,7 +124,7 @@ func (a *{{{classname}}}Service) {{nickname}}Execute(r {{#structPrefix}}{{&class } localVarPath := localBasePath + "{{{path}}}"{{#pathParams}} - localVarPath = strings.Replace(localVarPath, "{"+"{{baseName}}"+"}", url.PathEscape(parameterToString(r.{{paramName}}, "{{collectionFormat}}")), -1){{/pathParams}} + localVarPath = strings.Replace(localVarPath, "{"+"{{baseName}}"+"}", url.PathEscape(parameterValueToString(r.{{paramName}}, "{{paramName}}")), -1){{/pathParams}} localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -189,15 +189,15 @@ func (a *{{{classname}}}Service) {{nickname}}Execute(r {{#structPrefix}}{{&class if reflect.TypeOf(t).Kind() == reflect.Slice { s := reflect.ValueOf(t) for i := 0; i < s.Len(); i++ { - localVarQueryParams.Add("{{baseName}}", parameterToString(s.Index(i), "{{collectionFormat}}")) + parameterAddToQuery(localVarQueryParams, "{{baseName}}", s.Index(i), "{{collectionFormat}}") } } else { - localVarQueryParams.Add("{{baseName}}", parameterToString(t, "{{collectionFormat}}")) + parameterAddToQuery(localVarQueryParams, "{{baseName}}", t, "{{collectionFormat}}") } } {{/isCollectionFormatMulti}} {{^isCollectionFormatMulti}} - localVarQueryParams.Add("{{baseName}}", parameterToString(*r.{{paramName}}, "{{collectionFormat}}")) + parameterAddToQuery(localVarQueryParams, "{{baseName}}", r.{{paramName}}, "{{collectionFormat}}") {{/isCollectionFormatMulti}} {{/required}} {{^required}} @@ -207,14 +207,14 @@ func (a *{{{classname}}}Service) {{nickname}}Execute(r {{#structPrefix}}{{&class if reflect.TypeOf(t).Kind() == reflect.Slice { s := reflect.ValueOf(t) for i := 0; i < s.Len(); i++ { - localVarQueryParams.Add("{{baseName}}", parameterToString(s.Index(i), "{{collectionFormat}}")) + parameterAddToQuery(localVarQueryParams, "{{baseName}}", s.Index(i), "{{collectionFormat}}") } } else { - localVarQueryParams.Add("{{baseName}}", parameterToString(t, "{{collectionFormat}}")) + parameterAddToQuery(localVarQueryParams, "{{baseName}}", t, "{{collectionFormat}}") } {{/isCollectionFormatMulti}} {{^isCollectionFormatMulti}} - localVarQueryParams.Add("{{baseName}}", parameterToString(*r.{{paramName}}, "{{collectionFormat}}")) + parameterAddToQuery(localVarQueryParams, "{{baseName}}", r.{{paramName}}, "{{collectionFormat}}") {{/isCollectionFormatMulti}} } {{/required}} @@ -242,11 +242,11 @@ func (a *{{{classname}}}Service) {{nickname}}Execute(r {{#structPrefix}}{{&class } {{#headerParams}} {{#required}} - localVarHeaderParams["{{baseName}}"] = parameterToString(*r.{{paramName}}, "{{collectionFormat}}") + parameterAddToQuery(localVarQueryParams, "{{baseName}}", r.{{paramName}}, "{{collectionFormat}}") {{/required}} {{^required}} if r.{{paramName}} != nil { - localVarHeaderParams["{{baseName}}"] = parameterToString(*r.{{paramName}}, "{{collectionFormat}}") + parameterAddToQuery(localVarQueryParams, "{{baseName}}", r.{{paramName}}, "{{collectionFormat}}") } {{/required}} {{/headerParams}} @@ -277,7 +277,7 @@ func (a *{{{classname}}}Service) {{nickname}}Execute(r {{#structPrefix}}{{&class {{/isFile}} {{^isFile}} {{#required}} - localVarFormParams.Add("{{baseName}}", parameterToString(*r.{{paramName}}, "{{collectionFormat}}")) + parameterAddToQuery(localVarFormParams, "{{baseName}}", r.{{paramName}}, "{{collectionFormat}}") {{/required}} {{^required}} {{#isModel}} @@ -291,7 +291,7 @@ func (a *{{{classname}}}Service) {{nickname}}Execute(r {{#structPrefix}}{{&class {{/isModel}} {{^isModel}} if r.{{paramName}} != nil { - localVarFormParams.Add("{{baseName}}", parameterToString(*r.{{paramName}}, "{{collectionFormat}}")) + parameterAddToQuery(localVarFormParams, "{{baseName}}", r.{{paramName}}, "{{collectionFormat}}") } {{/isModel}} {{/required}} diff --git a/modules/openapi-generator/src/main/resources/go/client.mustache b/modules/openapi-generator/src/main/resources/go/client.mustache index dd5ea6ce22..616772c889 100644 --- a/modules/openapi-generator/src/main/resources/go/client.mustache +++ b/modules/openapi-generator/src/main/resources/go/client.mustache @@ -34,6 +34,8 @@ import ( var ( jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) + queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) + queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" ) ) // APIClient manages communication with the {{appName}} API v{{version}} @@ -132,28 +134,101 @@ func typeCheckParameter(obj interface{}, expected string, name string) error { return nil } -// parameterToString convert interface{} parameters to string, using a delimiter if format is provided. -func parameterToString(obj interface{}, collectionFormat string) string { - var delimiter string +func parameterValueToString( obj interface{}, key string ) string { + if reflect.TypeOf(obj).Kind() != reflect.Ptr { + return fmt.Sprintf("%v", obj) + } + var param,ok = obj.(MappedNullable) + if !ok { + return "" + } + dataMap,err := param.ToMap() + if err != nil { + return "" + } + return fmt.Sprintf("%v", dataMap[key]) +} - switch collectionFormat { - case "pipes": - delimiter = "|" - case "ssv": - delimiter = " " - case "tsv": - delimiter = "\t" - case "csv": - delimiter = "," - } +// parameterAddToQuery adds the provided object to the url query supporting deep object syntax +func parameterAddToQuery(queryParams interface{}, keyPrefix string, obj interface{}, collectionType string) { + var v = reflect.ValueOf(obj) + var value = "" + if v == reflect.ValueOf(nil) { + value = "null" + } else { + switch v.Kind() { + case reflect.Invalid: + value = "invalid" - if reflect.TypeOf(obj).Kind() == reflect.Slice { - return strings.Trim(strings.Replace(fmt.Sprint(obj), " ", delimiter, -1), "[]") - } else if t, ok := obj.(time.Time); ok { - return t.Format(time.RFC3339) - } + case reflect.Struct: + if t,ok := obj.(MappedNullable); ok { + dataMap,err := t.ToMap() + if err != nil { + return + } + parameterAddToQuery(queryParams, keyPrefix, dataMap, collectionType) + return + } + if t, ok := obj.(time.Time); ok { + parameterAddToQuery(queryParams, keyPrefix, t.Format(time.RFC3339), collectionType) + return + } + value = v.Type().String() + " value" + case reflect.Slice: + var indValue = reflect.ValueOf(obj) + if indValue == reflect.ValueOf(nil) { + return + } + var lenIndValue = indValue.Len() + for i:=0;i= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiTestQueryDeepObjectRequest struct { + ctx context.Context + ApiService FakeApi + testPet *Pet + inputOptions *Category +} + +func (r ApiTestQueryDeepObjectRequest) TestPet(testPet Pet) ApiTestQueryDeepObjectRequest { + r.testPet = &testPet + return r +} + +func (r ApiTestQueryDeepObjectRequest) InputOptions(inputOptions Category) ApiTestQueryDeepObjectRequest { + r.inputOptions = &inputOptions + return r +} + +func (r ApiTestQueryDeepObjectRequest) Execute() (*http.Response, error) { + return r.ApiService.TestQueryDeepObjectExecute(r) +} + +/* +TestQueryDeepObject Method for TestQueryDeepObject + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTestQueryDeepObjectRequest +*/ +func (a *FakeApiService) TestQueryDeepObject(ctx context.Context) ApiTestQueryDeepObjectRequest { + return ApiTestQueryDeepObjectRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +func (a *FakeApiService) TestQueryDeepObjectExecute(r ApiTestQueryDeepObjectRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeApiService.TestQueryDeepObject") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/fake/deep_object_test" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.testPet != nil { + parameterAddToQuery(localVarQueryParams, "test_pet", r.testPet, "") + } + if r.inputOptions != nil { + parameterAddToQuery(localVarQueryParams, "inputOptions", r.inputOptions, "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return nil, err @@ -1978,24 +2093,24 @@ func (a *FakeApiService) TestQueryParameterCollectionFormatExecute(r ApiTestQuer if reflect.TypeOf(t).Kind() == reflect.Slice { s := reflect.ValueOf(t) for i := 0; i < s.Len(); i++ { - localVarQueryParams.Add("pipe", parameterToString(s.Index(i), "multi")) + parameterAddToQuery(localVarQueryParams, "pipe", s.Index(i), "multi") } } else { - localVarQueryParams.Add("pipe", parameterToString(t, "multi")) + parameterAddToQuery(localVarQueryParams, "pipe", t, "multi") } } - localVarQueryParams.Add("ioutil", parameterToString(*r.ioutil, "csv")) - localVarQueryParams.Add("http", parameterToString(*r.http, "ssv")) - localVarQueryParams.Add("url", parameterToString(*r.url, "csv")) + parameterAddToQuery(localVarQueryParams, "ioutil", r.ioutil, "csv") + parameterAddToQuery(localVarQueryParams, "http", r.http, "ssv") + parameterAddToQuery(localVarQueryParams, "url", r.url, "csv") { t := *r.context if reflect.TypeOf(t).Kind() == reflect.Slice { s := reflect.ValueOf(t) for i := 0; i < s.Len(); i++ { - localVarQueryParams.Add("context", parameterToString(s.Index(i), "multi")) + parameterAddToQuery(localVarQueryParams, "context", s.Index(i), "multi") } } else { - localVarQueryParams.Add("context", parameterToString(t, "multi")) + parameterAddToQuery(localVarQueryParams, "context", t, "multi") } } // to determine the Content-Type header @@ -2111,10 +2226,10 @@ func (a *FakeApiService) TestUniqueItemsHeaderAndQueryParameterCollectionFormatE if reflect.TypeOf(t).Kind() == reflect.Slice { s := reflect.ValueOf(t) for i := 0; i < s.Len(); i++ { - localVarQueryParams.Add("queryUnique", parameterToString(s.Index(i), "multi")) + parameterAddToQuery(localVarQueryParams, "queryUnique", s.Index(i), "multi") } } else { - localVarQueryParams.Add("queryUnique", parameterToString(t, "multi")) + parameterAddToQuery(localVarQueryParams, "queryUnique", t, "multi") } } // to determine the Content-Type header @@ -2134,7 +2249,7 @@ func (a *FakeApiService) TestUniqueItemsHeaderAndQueryParameterCollectionFormatE if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - localVarHeaderParams["headerUnique"] = parameterToString(*r.headerUnique, "csv") + parameterAddToQuery(localVarQueryParams, "headerUnique", r.headerUnique, "csv") req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err diff --git a/samples/openapi3/client/petstore/go/go-petstore/api_pet.go b/samples/openapi3/client/petstore/go/go-petstore/api_pet.go index 1d50da9d7b..3d780fd172 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/api_pet.go +++ b/samples/openapi3/client/petstore/go/go-petstore/api_pet.go @@ -304,7 +304,7 @@ func (a *PetApiService) DeletePetExecute(r ApiDeletePetRequest) (*http.Response, } localVarPath := localBasePath + "/pet/{petId}" - localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", url.PathEscape(parameterToString(r.petId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", url.PathEscape(parameterValueToString(r.petId, "petId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -328,7 +328,7 @@ func (a *PetApiService) DeletePetExecute(r ApiDeletePetRequest) (*http.Response, localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } if r.apiKey != nil { - localVarHeaderParams["api_key"] = parameterToString(*r.apiKey, "") + parameterAddToQuery(localVarQueryParams, "api_key", r.apiKey, "") } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { @@ -414,7 +414,7 @@ func (a *PetApiService) FindPetsByStatusExecute(r ApiFindPetsByStatusRequest) ([ return localVarReturnValue, nil, reportError("status is required and must be specified") } - localVarQueryParams.Add("status", parameterToString(*r.status, "csv")) + parameterAddToQuery(localVarQueryParams, "status", r.status, "csv") // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -527,7 +527,7 @@ func (a *PetApiService) FindPetsByTagsExecute(r ApiFindPetsByTagsRequest) ([]Pet return localVarReturnValue, nil, reportError("tags is required and must be specified") } - localVarQueryParams.Add("tags", parameterToString(*r.tags, "csv")) + parameterAddToQuery(localVarQueryParams, "tags", r.tags, "csv") // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -625,7 +625,7 @@ func (a *PetApiService) GetPetByIdExecute(r ApiGetPetByIdRequest) (*Pet, *http.R } localVarPath := localBasePath + "/pet/{petId}" - localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", url.PathEscape(parameterToString(r.petId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", url.PathEscape(parameterValueToString(r.petId, "petId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -854,7 +854,7 @@ func (a *PetApiService) UpdatePetWithFormExecute(r ApiUpdatePetWithFormRequest) } localVarPath := localBasePath + "/pet/{petId}" - localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", url.PathEscape(parameterToString(r.petId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", url.PathEscape(parameterValueToString(r.petId, "petId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -878,10 +878,10 @@ func (a *PetApiService) UpdatePetWithFormExecute(r ApiUpdatePetWithFormRequest) localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } if r.name != nil { - localVarFormParams.Add("name", parameterToString(*r.name, "")) + parameterAddToQuery(localVarFormParams, "name", r.name, "") } if r.status != nil { - localVarFormParams.Add("status", parameterToString(*r.status, "")) + parameterAddToQuery(localVarFormParams, "status", r.status, "") } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { @@ -968,7 +968,7 @@ func (a *PetApiService) UploadFileExecute(r ApiUploadFileRequest) (*ApiResponse, } localVarPath := localBasePath + "/pet/{petId}/uploadImage" - localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", url.PathEscape(parameterToString(r.petId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", url.PathEscape(parameterValueToString(r.petId, "petId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -992,7 +992,7 @@ func (a *PetApiService) UploadFileExecute(r ApiUploadFileRequest) (*ApiResponse, localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } if r.additionalMetadata != nil { - localVarFormParams.Add("additionalMetadata", parameterToString(*r.additionalMetadata, "")) + parameterAddToQuery(localVarFormParams, "additionalMetadata", r.additionalMetadata, "") } var fileLocalVarFormFileName string var fileLocalVarFileName string @@ -1105,7 +1105,7 @@ func (a *PetApiService) UploadFileWithRequiredFileExecute(r ApiUploadFileWithReq } localVarPath := localBasePath + "/fake/{petId}/uploadImageWithRequiredFile" - localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", url.PathEscape(parameterToString(r.petId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", url.PathEscape(parameterValueToString(r.petId, "petId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1132,7 +1132,7 @@ func (a *PetApiService) UploadFileWithRequiredFileExecute(r ApiUploadFileWithReq localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } if r.additionalMetadata != nil { - localVarFormParams.Add("additionalMetadata", parameterToString(*r.additionalMetadata, "")) + parameterAddToQuery(localVarFormParams, "additionalMetadata", r.additionalMetadata, "") } var requiredFileLocalVarFormFileName string var requiredFileLocalVarFileName string diff --git a/samples/openapi3/client/petstore/go/go-petstore/api_store.go b/samples/openapi3/client/petstore/go/go-petstore/api_store.go index 87abefe636..030c089402 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/api_store.go +++ b/samples/openapi3/client/petstore/go/go-petstore/api_store.go @@ -124,7 +124,7 @@ func (a *StoreApiService) DeleteOrderExecute(r ApiDeleteOrderRequest) (*http.Res } localVarPath := localBasePath + "/store/order/{order_id}" - localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", url.PathEscape(parameterToString(r.orderId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", url.PathEscape(parameterValueToString(r.orderId, "orderId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -331,7 +331,7 @@ func (a *StoreApiService) GetOrderByIdExecute(r ApiGetOrderByIdRequest) (*Order, } localVarPath := localBasePath + "/store/order/{order_id}" - localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", url.PathEscape(parameterToString(r.orderId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", url.PathEscape(parameterValueToString(r.orderId, "orderId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} diff --git a/samples/openapi3/client/petstore/go/go-petstore/api_user.go b/samples/openapi3/client/petstore/go/go-petstore/api_user.go index 0ac28a9dee..c4bb61f81f 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/api_user.go +++ b/samples/openapi3/client/petstore/go/go-petstore/api_user.go @@ -476,7 +476,7 @@ func (a *UserApiService) DeleteUserExecute(r ApiDeleteUserRequest) (*http.Respon } localVarPath := localBasePath + "/user/{username}" - localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", url.PathEscape(parameterToString(r.username, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", url.PathEscape(parameterValueToString(r.username, "username")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -570,7 +570,7 @@ func (a *UserApiService) GetUserByNameExecute(r ApiGetUserByNameRequest) (*User, } localVarPath := localBasePath + "/user/{username}" - localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", url.PathEscape(parameterToString(r.username, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", url.PathEscape(parameterValueToString(r.username, "username")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -695,8 +695,8 @@ func (a *UserApiService) LoginUserExecute(r ApiLoginUserRequest) (string, *http. return localVarReturnValue, nil, reportError("password is required and must be specified") } - localVarQueryParams.Add("username", parameterToString(*r.username, "")) - localVarQueryParams.Add("password", parameterToString(*r.password, "")) + parameterAddToQuery(localVarQueryParams, "username", r.username, "") + parameterAddToQuery(localVarQueryParams, "password", r.password, "") // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -887,7 +887,7 @@ func (a *UserApiService) UpdateUserExecute(r ApiUpdateUserRequest) (*http.Respon } localVarPath := localBasePath + "/user/{username}" - localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", url.PathEscape(parameterToString(r.username, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", url.PathEscape(parameterValueToString(r.username, "username")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} diff --git a/samples/openapi3/client/petstore/go/go-petstore/client.go b/samples/openapi3/client/petstore/go/go-petstore/client.go index 0bb67d159c..fa1714c97f 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/client.go +++ b/samples/openapi3/client/petstore/go/go-petstore/client.go @@ -39,6 +39,8 @@ import ( var ( jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) + queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) + queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" ) ) // APIClient manages communication with the OpenAPI Petstore API v1.0.0 @@ -143,28 +145,101 @@ func typeCheckParameter(obj interface{}, expected string, name string) error { return nil } -// parameterToString convert interface{} parameters to string, using a delimiter if format is provided. -func parameterToString(obj interface{}, collectionFormat string) string { - var delimiter string +func parameterValueToString( obj interface{}, key string ) string { + if reflect.TypeOf(obj).Kind() != reflect.Ptr { + return fmt.Sprintf("%v", obj) + } + var param,ok = obj.(MappedNullable) + if !ok { + return "" + } + dataMap,err := param.ToMap() + if err != nil { + return "" + } + return fmt.Sprintf("%v", dataMap[key]) +} - switch collectionFormat { - case "pipes": - delimiter = "|" - case "ssv": - delimiter = " " - case "tsv": - delimiter = "\t" - case "csv": - delimiter = "," - } +// parameterAddToQuery adds the provided object to the url query supporting deep object syntax +func parameterAddToQuery(queryParams interface{}, keyPrefix string, obj interface{}, collectionType string) { + var v = reflect.ValueOf(obj) + var value = "" + if v == reflect.ValueOf(nil) { + value = "null" + } else { + switch v.Kind() { + case reflect.Invalid: + value = "invalid" - if reflect.TypeOf(obj).Kind() == reflect.Slice { - return strings.Trim(strings.Replace(fmt.Sprint(obj), " ", delimiter, -1), "[]") - } else if t, ok := obj.(time.Time); ok { - return t.Format(time.RFC3339) - } + case reflect.Struct: + if t,ok := obj.(MappedNullable); ok { + dataMap,err := t.ToMap() + if err != nil { + return + } + parameterAddToQuery(queryParams, keyPrefix, dataMap, collectionType) + return + } + if t, ok := obj.(time.Time); ok { + parameterAddToQuery(queryParams, keyPrefix, t.Format(time.RFC3339), collectionType) + return + } + value = v.Type().String() + " value" + case reflect.Slice: + var indValue = reflect.ValueOf(obj) + if indValue == reflect.ValueOf(nil) { + return + } + var lenIndValue = indValue.Len() + for i:=0;i TestQueryDeepObject(ctx).TestPet(testPet).InputOptions(inputOptions).Execute() + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "./openapi" +) + +func main() { + testPet := map[string][]openapiclient.Pet{"key": map[string]interface{}{ ... }} // Pet | (optional) + inputOptions := map[string][]openapiclient.Category{"key": map[string]interface{}{ ... }} // Category | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FakeApi.TestQueryDeepObject(context.Background()).TestPet(testPet).InputOptions(inputOptions).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestQueryDeepObject``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTestQueryDeepObjectRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **testPet** | [**Pet**](Pet.md) | | + **inputOptions** | [**Category**](Category.md) | | + +### Return type + + (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + ## TestQueryParameterCollectionFormat > TestQueryParameterCollectionFormat(ctx).Pipe(pipe).Ioutil(ioutil).Http(http).Url(url).Context(context).Execute() diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_200_response.go b/samples/openapi3/client/petstore/go/go-petstore/model_200_response.go index ed63ac8c99..46b818ed79 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_200_response.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_200_response.go @@ -14,6 +14,9 @@ import ( "encoding/json" ) +// checks if the Model200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Model200Response{} + // Model200Response Model for testing model name starting with number type Model200Response struct { Name *int32 `json:"name,omitempty"` @@ -105,6 +108,14 @@ func (o *Model200Response) SetClass(v string) { } func (o Model200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Model200Response) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Name) { toSerialize["name"] = o.Name @@ -117,7 +128,7 @@ func (o Model200Response) MarshalJSON() ([]byte, error) { toSerialize[key] = value } - return json.Marshal(toSerialize) + return toSerialize, nil } func (o *Model200Response) UnmarshalJSON(bytes []byte) (err error) { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model__foo_get_default_response.go b/samples/openapi3/client/petstore/go/go-petstore/model__foo_get_default_response.go index 433706818b..07626faeb0 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model__foo_get_default_response.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model__foo_get_default_response.go @@ -14,6 +14,9 @@ import ( "encoding/json" ) +// checks if the FooGetDefaultResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FooGetDefaultResponse{} + // FooGetDefaultResponse struct for FooGetDefaultResponse type FooGetDefaultResponse struct { String *Foo `json:"string,omitempty"` @@ -72,6 +75,14 @@ func (o *FooGetDefaultResponse) SetString(v Foo) { } func (o FooGetDefaultResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FooGetDefaultResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.String) { toSerialize["string"] = o.String @@ -81,7 +92,7 @@ func (o FooGetDefaultResponse) MarshalJSON() ([]byte, error) { toSerialize[key] = value } - return json.Marshal(toSerialize) + return toSerialize, nil } func (o *FooGetDefaultResponse) UnmarshalJSON(bytes []byte) (err error) { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model__special_model_name_.go b/samples/openapi3/client/petstore/go/go-petstore/model__special_model_name_.go index a1f792ad6e..eebad43309 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model__special_model_name_.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model__special_model_name_.go @@ -14,6 +14,9 @@ import ( "encoding/json" ) +// checks if the SpecialModelName type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SpecialModelName{} + // SpecialModelName struct for SpecialModelName type SpecialModelName struct { SpecialPropertyName *int64 `json:"$special[property.name],omitempty"` @@ -72,6 +75,14 @@ func (o *SpecialModelName) SetSpecialPropertyName(v int64) { } func (o SpecialModelName) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SpecialModelName) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.SpecialPropertyName) { toSerialize["$special[property.name]"] = o.SpecialPropertyName @@ -81,7 +92,7 @@ func (o SpecialModelName) MarshalJSON() ([]byte, error) { toSerialize[key] = value } - return json.Marshal(toSerialize) + return toSerialize, nil } func (o *SpecialModelName) UnmarshalJSON(bytes []byte) (err error) { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_additional_properties_class.go b/samples/openapi3/client/petstore/go/go-petstore/model_additional_properties_class.go index 639a5a16b1..b2580f17a8 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_additional_properties_class.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_additional_properties_class.go @@ -14,6 +14,9 @@ import ( "encoding/json" ) +// checks if the AdditionalPropertiesClass type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AdditionalPropertiesClass{} + // AdditionalPropertiesClass struct for AdditionalPropertiesClass type AdditionalPropertiesClass struct { MapProperty *map[string]string `json:"map_property,omitempty"` @@ -105,6 +108,14 @@ func (o *AdditionalPropertiesClass) SetMapOfMapProperty(v map[string]map[string] } func (o AdditionalPropertiesClass) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AdditionalPropertiesClass) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.MapProperty) { toSerialize["map_property"] = o.MapProperty @@ -117,7 +128,7 @@ func (o AdditionalPropertiesClass) MarshalJSON() ([]byte, error) { toSerialize[key] = value } - return json.Marshal(toSerialize) + return toSerialize, nil } func (o *AdditionalPropertiesClass) UnmarshalJSON(bytes []byte) (err error) { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_animal.go b/samples/openapi3/client/petstore/go/go-petstore/model_animal.go index 20913dc1d7..a550cb4223 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_animal.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_animal.go @@ -14,6 +14,9 @@ import ( "encoding/json" ) +// checks if the Animal type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Animal{} + // Animal struct for Animal type Animal struct { ClassName string `json:"className"` @@ -102,10 +105,16 @@ func (o *Animal) SetColor(v string) { } func (o Animal) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["className"] = o.ClassName + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err } + return json.Marshal(toSerialize) +} + +func (o Animal) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["className"] = o.ClassName if !isNil(o.Color) { toSerialize["color"] = o.Color } @@ -114,7 +123,7 @@ func (o Animal) MarshalJSON() ([]byte, error) { toSerialize[key] = value } - return json.Marshal(toSerialize) + return toSerialize, nil } func (o *Animal) UnmarshalJSON(bytes []byte) (err error) { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_api_response.go b/samples/openapi3/client/petstore/go/go-petstore/model_api_response.go index 01cd35ae94..363721d3f0 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_api_response.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_api_response.go @@ -14,6 +14,9 @@ import ( "encoding/json" ) +// checks if the ApiResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ApiResponse{} + // ApiResponse struct for ApiResponse type ApiResponse struct { Code *int32 `json:"code,omitempty"` @@ -138,6 +141,14 @@ func (o *ApiResponse) SetMessage(v string) { } func (o ApiResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ApiResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Code) { toSerialize["code"] = o.Code @@ -153,7 +164,7 @@ func (o ApiResponse) MarshalJSON() ([]byte, error) { toSerialize[key] = value } - return json.Marshal(toSerialize) + return toSerialize, nil } func (o *ApiResponse) UnmarshalJSON(bytes []byte) (err error) { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_apple.go b/samples/openapi3/client/petstore/go/go-petstore/model_apple.go index c51835b85c..4e5bbfea74 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_apple.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_apple.go @@ -14,6 +14,9 @@ import ( "encoding/json" ) +// checks if the Apple type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Apple{} + // Apple struct for Apple type Apple struct { Cultivar *string `json:"cultivar,omitempty"` @@ -72,6 +75,14 @@ func (o *Apple) SetCultivar(v string) { } func (o Apple) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Apple) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Cultivar) { toSerialize["cultivar"] = o.Cultivar @@ -81,7 +92,7 @@ func (o Apple) MarshalJSON() ([]byte, error) { toSerialize[key] = value } - return json.Marshal(toSerialize) + return toSerialize, nil } func (o *Apple) UnmarshalJSON(bytes []byte) (err error) { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_apple_req.go b/samples/openapi3/client/petstore/go/go-petstore/model_apple_req.go index e49e229308..0ceff9a111 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_apple_req.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_apple_req.go @@ -14,6 +14,9 @@ import ( "encoding/json" ) +// checks if the AppleReq type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AppleReq{} + // AppleReq struct for AppleReq type AppleReq struct { Cultivar string `json:"cultivar"` @@ -98,10 +101,16 @@ func (o *AppleReq) SetMealy(v bool) { } func (o AppleReq) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["cultivar"] = o.Cultivar + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err } + return json.Marshal(toSerialize) +} + +func (o AppleReq) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["cultivar"] = o.Cultivar if !isNil(o.Mealy) { toSerialize["mealy"] = o.Mealy } @@ -110,7 +119,7 @@ func (o AppleReq) MarshalJSON() ([]byte, error) { toSerialize[key] = value } - return json.Marshal(toSerialize) + return toSerialize, nil } func (o *AppleReq) UnmarshalJSON(bytes []byte) (err error) { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_array_of_array_of_number_only.go b/samples/openapi3/client/petstore/go/go-petstore/model_array_of_array_of_number_only.go index 8e009522d2..4356c9e219 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_array_of_array_of_number_only.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_array_of_array_of_number_only.go @@ -14,6 +14,9 @@ import ( "encoding/json" ) +// checks if the ArrayOfArrayOfNumberOnly type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ArrayOfArrayOfNumberOnly{} + // ArrayOfArrayOfNumberOnly struct for ArrayOfArrayOfNumberOnly type ArrayOfArrayOfNumberOnly struct { ArrayArrayNumber [][]float32 `json:"ArrayArrayNumber,omitempty"` @@ -72,6 +75,14 @@ func (o *ArrayOfArrayOfNumberOnly) SetArrayArrayNumber(v [][]float32) { } func (o ArrayOfArrayOfNumberOnly) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ArrayOfArrayOfNumberOnly) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.ArrayArrayNumber) { toSerialize["ArrayArrayNumber"] = o.ArrayArrayNumber @@ -81,7 +92,7 @@ func (o ArrayOfArrayOfNumberOnly) MarshalJSON() ([]byte, error) { toSerialize[key] = value } - return json.Marshal(toSerialize) + return toSerialize, nil } func (o *ArrayOfArrayOfNumberOnly) UnmarshalJSON(bytes []byte) (err error) { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_array_of_number_only.go b/samples/openapi3/client/petstore/go/go-petstore/model_array_of_number_only.go index 91d631d471..ce3d568ab5 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_array_of_number_only.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_array_of_number_only.go @@ -14,6 +14,9 @@ import ( "encoding/json" ) +// checks if the ArrayOfNumberOnly type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ArrayOfNumberOnly{} + // ArrayOfNumberOnly struct for ArrayOfNumberOnly type ArrayOfNumberOnly struct { ArrayNumber []float32 `json:"ArrayNumber,omitempty"` @@ -72,6 +75,14 @@ func (o *ArrayOfNumberOnly) SetArrayNumber(v []float32) { } func (o ArrayOfNumberOnly) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ArrayOfNumberOnly) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.ArrayNumber) { toSerialize["ArrayNumber"] = o.ArrayNumber @@ -81,7 +92,7 @@ func (o ArrayOfNumberOnly) MarshalJSON() ([]byte, error) { toSerialize[key] = value } - return json.Marshal(toSerialize) + return toSerialize, nil } func (o *ArrayOfNumberOnly) UnmarshalJSON(bytes []byte) (err error) { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_array_test_.go b/samples/openapi3/client/petstore/go/go-petstore/model_array_test_.go index a90f27b0b4..76d4ea444c 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_array_test_.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_array_test_.go @@ -14,6 +14,9 @@ import ( "encoding/json" ) +// checks if the ArrayTest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ArrayTest{} + // ArrayTest struct for ArrayTest type ArrayTest struct { ArrayOfString []string `json:"array_of_string,omitempty"` @@ -138,6 +141,14 @@ func (o *ArrayTest) SetArrayArrayOfModel(v [][]ReadOnlyFirst) { } func (o ArrayTest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ArrayTest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.ArrayOfString) { toSerialize["array_of_string"] = o.ArrayOfString @@ -153,7 +164,7 @@ func (o ArrayTest) MarshalJSON() ([]byte, error) { toSerialize[key] = value } - return json.Marshal(toSerialize) + return toSerialize, nil } func (o *ArrayTest) UnmarshalJSON(bytes []byte) (err error) { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_banana.go b/samples/openapi3/client/petstore/go/go-petstore/model_banana.go index 71a7c89275..0a60a46712 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_banana.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_banana.go @@ -14,6 +14,9 @@ import ( "encoding/json" ) +// checks if the Banana type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Banana{} + // Banana struct for Banana type Banana struct { LengthCm *float32 `json:"lengthCm,omitempty"` @@ -72,6 +75,14 @@ func (o *Banana) SetLengthCm(v float32) { } func (o Banana) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Banana) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.LengthCm) { toSerialize["lengthCm"] = o.LengthCm @@ -81,7 +92,7 @@ func (o Banana) MarshalJSON() ([]byte, error) { toSerialize[key] = value } - return json.Marshal(toSerialize) + return toSerialize, nil } func (o *Banana) UnmarshalJSON(bytes []byte) (err error) { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_banana_req.go b/samples/openapi3/client/petstore/go/go-petstore/model_banana_req.go index 92b660dd30..79948f5f7f 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_banana_req.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_banana_req.go @@ -14,6 +14,9 @@ import ( "encoding/json" ) +// checks if the BananaReq type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BananaReq{} + // BananaReq struct for BananaReq type BananaReq struct { LengthCm float32 `json:"lengthCm"` @@ -98,10 +101,16 @@ func (o *BananaReq) SetSweet(v bool) { } func (o BananaReq) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["lengthCm"] = o.LengthCm + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err } + return json.Marshal(toSerialize) +} + +func (o BananaReq) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["lengthCm"] = o.LengthCm if !isNil(o.Sweet) { toSerialize["sweet"] = o.Sweet } @@ -110,7 +119,7 @@ func (o BananaReq) MarshalJSON() ([]byte, error) { toSerialize[key] = value } - return json.Marshal(toSerialize) + return toSerialize, nil } func (o *BananaReq) UnmarshalJSON(bytes []byte) (err error) { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_capitalization.go b/samples/openapi3/client/petstore/go/go-petstore/model_capitalization.go index 575bf95b16..7cbea641aa 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_capitalization.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_capitalization.go @@ -14,6 +14,9 @@ import ( "encoding/json" ) +// checks if the Capitalization type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Capitalization{} + // Capitalization struct for Capitalization type Capitalization struct { SmallCamel *string `json:"smallCamel,omitempty"` @@ -238,6 +241,14 @@ func (o *Capitalization) SetATT_NAME(v string) { } func (o Capitalization) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Capitalization) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.SmallCamel) { toSerialize["smallCamel"] = o.SmallCamel @@ -262,7 +273,7 @@ func (o Capitalization) MarshalJSON() ([]byte, error) { toSerialize[key] = value } - return json.Marshal(toSerialize) + return toSerialize, nil } func (o *Capitalization) UnmarshalJSON(bytes []byte) (err error) { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_cat.go b/samples/openapi3/client/petstore/go/go-petstore/model_cat.go index 17d259a5b5..45cbe81b14 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_cat.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_cat.go @@ -16,6 +16,9 @@ import ( "strings" ) +// checks if the Cat type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Cat{} + // Cat struct for Cat type Cat struct { Animal @@ -78,14 +81,22 @@ func (o *Cat) SetDeclawed(v bool) { } func (o Cat) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Cat) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} serializedAnimal, errAnimal := json.Marshal(o.Animal) if errAnimal != nil { - return []byte{}, errAnimal + return map[string]interface{}{}, errAnimal } errAnimal = json.Unmarshal([]byte(serializedAnimal), &toSerialize) if errAnimal != nil { - return []byte{}, errAnimal + return map[string]interface{}{}, errAnimal } if !isNil(o.Declawed) { toSerialize["declawed"] = o.Declawed @@ -95,7 +106,7 @@ func (o Cat) MarshalJSON() ([]byte, error) { toSerialize[key] = value } - return json.Marshal(toSerialize) + return toSerialize, nil } func (o *Cat) UnmarshalJSON(bytes []byte) (err error) { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_cat_all_of.go b/samples/openapi3/client/petstore/go/go-petstore/model_cat_all_of.go index 8c14cd39c7..b4d614021b 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_cat_all_of.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_cat_all_of.go @@ -14,6 +14,9 @@ import ( "encoding/json" ) +// checks if the CatAllOf type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CatAllOf{} + // CatAllOf struct for CatAllOf type CatAllOf struct { Declawed *bool `json:"declawed,omitempty"` @@ -72,6 +75,14 @@ func (o *CatAllOf) SetDeclawed(v bool) { } func (o CatAllOf) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CatAllOf) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Declawed) { toSerialize["declawed"] = o.Declawed @@ -81,7 +92,7 @@ func (o CatAllOf) MarshalJSON() ([]byte, error) { toSerialize[key] = value } - return json.Marshal(toSerialize) + return toSerialize, nil } func (o *CatAllOf) UnmarshalJSON(bytes []byte) (err error) { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_category.go b/samples/openapi3/client/petstore/go/go-petstore/model_category.go index 5900a618b9..edc9173985 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_category.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_category.go @@ -14,6 +14,9 @@ import ( "encoding/json" ) +// checks if the Category type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Category{} + // Category struct for Category type Category struct { Id *int64 `json:"id,omitempty"` @@ -100,19 +103,25 @@ func (o *Category) SetName(v string) { } func (o Category) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Category) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Id) { toSerialize["id"] = o.Id } - if true { - toSerialize["name"] = o.Name - } + toSerialize["name"] = o.Name for key, value := range o.AdditionalProperties { toSerialize[key] = value } - return json.Marshal(toSerialize) + return toSerialize, nil } func (o *Category) UnmarshalJSON(bytes []byte) (err error) { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_class_model.go b/samples/openapi3/client/petstore/go/go-petstore/model_class_model.go index 6df4c3bf54..c9e9015127 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_class_model.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_class_model.go @@ -14,6 +14,9 @@ import ( "encoding/json" ) +// checks if the ClassModel type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ClassModel{} + // ClassModel Model for testing model with \"_class\" property type ClassModel struct { Class *string `json:"_class,omitempty"` @@ -72,6 +75,14 @@ func (o *ClassModel) SetClass(v string) { } func (o ClassModel) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ClassModel) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Class) { toSerialize["_class"] = o.Class @@ -81,7 +92,7 @@ func (o ClassModel) MarshalJSON() ([]byte, error) { toSerialize[key] = value } - return json.Marshal(toSerialize) + return toSerialize, nil } func (o *ClassModel) UnmarshalJSON(bytes []byte) (err error) { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_client.go b/samples/openapi3/client/petstore/go/go-petstore/model_client.go index e1fd5c611e..e50f1f84cf 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_client.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_client.go @@ -14,6 +14,9 @@ import ( "encoding/json" ) +// checks if the Client type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Client{} + // Client struct for Client type Client struct { Client *string `json:"client,omitempty"` @@ -72,6 +75,14 @@ func (o *Client) SetClient(v string) { } func (o Client) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Client) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Client) { toSerialize["client"] = o.Client @@ -81,7 +92,7 @@ func (o Client) MarshalJSON() ([]byte, error) { toSerialize[key] = value } - return json.Marshal(toSerialize) + return toSerialize, nil } func (o *Client) UnmarshalJSON(bytes []byte) (err error) { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_dog.go b/samples/openapi3/client/petstore/go/go-petstore/model_dog.go index db57aeb67f..ac8ab0e792 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_dog.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_dog.go @@ -16,6 +16,9 @@ import ( "strings" ) +// checks if the Dog type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Dog{} + // Dog struct for Dog type Dog struct { Animal @@ -78,14 +81,22 @@ func (o *Dog) SetBreed(v string) { } func (o Dog) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Dog) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} serializedAnimal, errAnimal := json.Marshal(o.Animal) if errAnimal != nil { - return []byte{}, errAnimal + return map[string]interface{}{}, errAnimal } errAnimal = json.Unmarshal([]byte(serializedAnimal), &toSerialize) if errAnimal != nil { - return []byte{}, errAnimal + return map[string]interface{}{}, errAnimal } if !isNil(o.Breed) { toSerialize["breed"] = o.Breed @@ -95,7 +106,7 @@ func (o Dog) MarshalJSON() ([]byte, error) { toSerialize[key] = value } - return json.Marshal(toSerialize) + return toSerialize, nil } func (o *Dog) UnmarshalJSON(bytes []byte) (err error) { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_dog_all_of.go b/samples/openapi3/client/petstore/go/go-petstore/model_dog_all_of.go index 75d154134f..75b73bf939 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_dog_all_of.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_dog_all_of.go @@ -14,6 +14,9 @@ import ( "encoding/json" ) +// checks if the DogAllOf type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DogAllOf{} + // DogAllOf struct for DogAllOf type DogAllOf struct { Breed *string `json:"breed,omitempty"` @@ -72,6 +75,14 @@ func (o *DogAllOf) SetBreed(v string) { } func (o DogAllOf) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DogAllOf) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Breed) { toSerialize["breed"] = o.Breed @@ -81,7 +92,7 @@ func (o DogAllOf) MarshalJSON() ([]byte, error) { toSerialize[key] = value } - return json.Marshal(toSerialize) + return toSerialize, nil } func (o *DogAllOf) UnmarshalJSON(bytes []byte) (err error) { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_duplicated_prop_child.go b/samples/openapi3/client/petstore/go/go-petstore/model_duplicated_prop_child.go index b6cb68e2dc..277f565a5d 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_duplicated_prop_child.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_duplicated_prop_child.go @@ -16,6 +16,9 @@ import ( "strings" ) +// checks if the DuplicatedPropChild type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DuplicatedPropChild{} + // DuplicatedPropChild struct for DuplicatedPropChild type DuplicatedPropChild struct { DuplicatedPropParent @@ -76,14 +79,22 @@ func (o *DuplicatedPropChild) SetDupProp(v string) { } func (o DuplicatedPropChild) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DuplicatedPropChild) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} serializedDuplicatedPropParent, errDuplicatedPropParent := json.Marshal(o.DuplicatedPropParent) if errDuplicatedPropParent != nil { - return []byte{}, errDuplicatedPropParent + return map[string]interface{}{}, errDuplicatedPropParent } errDuplicatedPropParent = json.Unmarshal([]byte(serializedDuplicatedPropParent), &toSerialize) if errDuplicatedPropParent != nil { - return []byte{}, errDuplicatedPropParent + return map[string]interface{}{}, errDuplicatedPropParent } if !isNil(o.DupProp) { toSerialize["dup-prop"] = o.DupProp @@ -93,7 +104,7 @@ func (o DuplicatedPropChild) MarshalJSON() ([]byte, error) { toSerialize[key] = value } - return json.Marshal(toSerialize) + return toSerialize, nil } func (o *DuplicatedPropChild) UnmarshalJSON(bytes []byte) (err error) { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_duplicated_prop_child_all_of.go b/samples/openapi3/client/petstore/go/go-petstore/model_duplicated_prop_child_all_of.go index 9daabcd981..c907167df1 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_duplicated_prop_child_all_of.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_duplicated_prop_child_all_of.go @@ -14,6 +14,9 @@ import ( "encoding/json" ) +// checks if the DuplicatedPropChildAllOf type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DuplicatedPropChildAllOf{} + // DuplicatedPropChildAllOf struct for DuplicatedPropChildAllOf type DuplicatedPropChildAllOf struct { // A discriminator value @@ -73,6 +76,14 @@ func (o *DuplicatedPropChildAllOf) SetDupProp(v string) { } func (o DuplicatedPropChildAllOf) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DuplicatedPropChildAllOf) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.DupProp) { toSerialize["dup-prop"] = o.DupProp @@ -82,7 +93,7 @@ func (o DuplicatedPropChildAllOf) MarshalJSON() ([]byte, error) { toSerialize[key] = value } - return json.Marshal(toSerialize) + return toSerialize, nil } func (o *DuplicatedPropChildAllOf) UnmarshalJSON(bytes []byte) (err error) { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_duplicated_prop_parent.go b/samples/openapi3/client/petstore/go/go-petstore/model_duplicated_prop_parent.go index 59f7f32eb7..1c8ed0909f 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_duplicated_prop_parent.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_duplicated_prop_parent.go @@ -14,6 +14,9 @@ import ( "encoding/json" ) +// checks if the DuplicatedPropParent type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DuplicatedPropParent{} + // DuplicatedPropParent parent model with duplicated property type DuplicatedPropParent struct { // A discriminator value @@ -66,16 +69,22 @@ func (o *DuplicatedPropParent) SetDupProp(v string) { } func (o DuplicatedPropParent) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["dup-prop"] = o.DupProp + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err } + return json.Marshal(toSerialize) +} + +func (o DuplicatedPropParent) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["dup-prop"] = o.DupProp for key, value := range o.AdditionalProperties { toSerialize[key] = value } - return json.Marshal(toSerialize) + return toSerialize, nil } func (o *DuplicatedPropParent) UnmarshalJSON(bytes []byte) (err error) { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_enum_arrays.go b/samples/openapi3/client/petstore/go/go-petstore/model_enum_arrays.go index 14dc856c7d..abbae9a9a2 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_enum_arrays.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_enum_arrays.go @@ -14,6 +14,9 @@ import ( "encoding/json" ) +// checks if the EnumArrays type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EnumArrays{} + // EnumArrays struct for EnumArrays type EnumArrays struct { JustSymbol *string `json:"just_symbol,omitempty"` @@ -105,6 +108,14 @@ func (o *EnumArrays) SetArrayEnum(v []string) { } func (o EnumArrays) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EnumArrays) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.JustSymbol) { toSerialize["just_symbol"] = o.JustSymbol @@ -117,7 +128,7 @@ func (o EnumArrays) MarshalJSON() ([]byte, error) { toSerialize[key] = value } - return json.Marshal(toSerialize) + return toSerialize, nil } func (o *EnumArrays) UnmarshalJSON(bytes []byte) (err error) { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_enum_test_.go b/samples/openapi3/client/petstore/go/go-petstore/model_enum_test_.go index fb07b82d2f..42941367b3 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_enum_test_.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_enum_test_.go @@ -14,6 +14,9 @@ import ( "encoding/json" ) +// checks if the EnumTest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &EnumTest{} + // EnumTest struct for EnumTest type EnumTest struct { EnumString *string `json:"enum_string,omitempty"` @@ -314,13 +317,19 @@ func (o *EnumTest) SetOuterEnumIntegerDefaultValue(v OuterEnumIntegerDefaultValu } func (o EnumTest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o EnumTest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.EnumString) { toSerialize["enum_string"] = o.EnumString } - if true { - toSerialize["enum_string_required"] = o.EnumStringRequired - } + toSerialize["enum_string_required"] = o.EnumStringRequired if !isNil(o.EnumInteger) { toSerialize["enum_integer"] = o.EnumInteger } @@ -344,7 +353,7 @@ func (o EnumTest) MarshalJSON() ([]byte, error) { toSerialize[key] = value } - return json.Marshal(toSerialize) + return toSerialize, nil } func (o *EnumTest) UnmarshalJSON(bytes []byte) (err error) { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_file.go b/samples/openapi3/client/petstore/go/go-petstore/model_file.go index 4d0f66a4a7..5d838b657a 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_file.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_file.go @@ -14,6 +14,9 @@ import ( "encoding/json" ) +// checks if the File type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &File{} + // File Must be named `File` for test. type File struct { // Test capitalization @@ -73,6 +76,14 @@ func (o *File) SetSourceURI(v string) { } func (o File) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o File) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.SourceURI) { toSerialize["sourceURI"] = o.SourceURI @@ -82,7 +93,7 @@ func (o File) MarshalJSON() ([]byte, error) { toSerialize[key] = value } - return json.Marshal(toSerialize) + return toSerialize, nil } func (o *File) UnmarshalJSON(bytes []byte) (err error) { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_file_schema_test_class.go b/samples/openapi3/client/petstore/go/go-petstore/model_file_schema_test_class.go index 67a8ff9b2e..6d587918ea 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_file_schema_test_class.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_file_schema_test_class.go @@ -14,6 +14,9 @@ import ( "encoding/json" ) +// checks if the FileSchemaTestClass type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FileSchemaTestClass{} + // FileSchemaTestClass struct for FileSchemaTestClass type FileSchemaTestClass struct { File *File `json:"file,omitempty"` @@ -105,6 +108,14 @@ func (o *FileSchemaTestClass) SetFiles(v []File) { } func (o FileSchemaTestClass) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FileSchemaTestClass) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.File) { toSerialize["file"] = o.File @@ -117,7 +128,7 @@ func (o FileSchemaTestClass) MarshalJSON() ([]byte, error) { toSerialize[key] = value } - return json.Marshal(toSerialize) + return toSerialize, nil } func (o *FileSchemaTestClass) UnmarshalJSON(bytes []byte) (err error) { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_foo.go b/samples/openapi3/client/petstore/go/go-petstore/model_foo.go index b4665327a6..a529b9b86c 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_foo.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_foo.go @@ -14,6 +14,9 @@ import ( "encoding/json" ) +// checks if the Foo type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Foo{} + // Foo struct for Foo type Foo struct { Bar *string `json:"bar,omitempty"` @@ -76,6 +79,14 @@ func (o *Foo) SetBar(v string) { } func (o Foo) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Foo) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Bar) { toSerialize["bar"] = o.Bar @@ -85,7 +96,7 @@ func (o Foo) MarshalJSON() ([]byte, error) { toSerialize[key] = value } - return json.Marshal(toSerialize) + return toSerialize, nil } func (o *Foo) UnmarshalJSON(bytes []byte) (err error) { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_format_test_.go b/samples/openapi3/client/petstore/go/go-petstore/model_format_test_.go index 3bbcbca749..fe95d07ffa 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_format_test_.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_format_test_.go @@ -16,6 +16,9 @@ import ( "time" ) +// checks if the FormatTest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FormatTest{} + // FormatTest struct for FormatTest type FormatTest struct { Integer *int32 `json:"integer,omitempty"` @@ -510,6 +513,14 @@ func (o *FormatTest) SetPatternWithDigitsAndDelimiter(v string) { } func (o FormatTest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FormatTest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Integer) { toSerialize["integer"] = o.Integer @@ -520,9 +531,7 @@ func (o FormatTest) MarshalJSON() ([]byte, error) { if !isNil(o.Int64) { toSerialize["int64"] = o.Int64 } - if true { - toSerialize["number"] = o.Number - } + toSerialize["number"] = o.Number if !isNil(o.Float) { toSerialize["float"] = o.Float } @@ -532,24 +541,18 @@ func (o FormatTest) MarshalJSON() ([]byte, error) { if !isNil(o.String) { toSerialize["string"] = o.String } - if true { - toSerialize["byte"] = o.Byte - } + toSerialize["byte"] = o.Byte if !isNil(o.Binary) { toSerialize["binary"] = o.Binary } - if true { - toSerialize["date"] = o.Date - } + toSerialize["date"] = o.Date if !isNil(o.DateTime) { toSerialize["dateTime"] = o.DateTime } if !isNil(o.Uuid) { toSerialize["uuid"] = o.Uuid } - if true { - toSerialize["password"] = o.Password - } + toSerialize["password"] = o.Password if !isNil(o.PatternWithDigits) { toSerialize["pattern_with_digits"] = o.PatternWithDigits } @@ -561,7 +564,7 @@ func (o FormatTest) MarshalJSON() ([]byte, error) { toSerialize[key] = value } - return json.Marshal(toSerialize) + return toSerialize, nil } func (o *FormatTest) UnmarshalJSON(bytes []byte) (err error) { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_has_only_read_only.go b/samples/openapi3/client/petstore/go/go-petstore/model_has_only_read_only.go index 1472cc9005..37446bd9cc 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_has_only_read_only.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_has_only_read_only.go @@ -14,6 +14,9 @@ import ( "encoding/json" ) +// checks if the HasOnlyReadOnly type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HasOnlyReadOnly{} + // HasOnlyReadOnly struct for HasOnlyReadOnly type HasOnlyReadOnly struct { Bar *string `json:"bar,omitempty"` @@ -105,6 +108,14 @@ func (o *HasOnlyReadOnly) SetFoo(v string) { } func (o HasOnlyReadOnly) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HasOnlyReadOnly) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Bar) { toSerialize["bar"] = o.Bar @@ -117,7 +128,7 @@ func (o HasOnlyReadOnly) MarshalJSON() ([]byte, error) { toSerialize[key] = value } - return json.Marshal(toSerialize) + return toSerialize, nil } func (o *HasOnlyReadOnly) UnmarshalJSON(bytes []byte) (err error) { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_health_check_result.go b/samples/openapi3/client/petstore/go/go-petstore/model_health_check_result.go index c38d5f97d4..4338603ff8 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_health_check_result.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_health_check_result.go @@ -14,6 +14,9 @@ import ( "encoding/json" ) +// checks if the HealthCheckResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HealthCheckResult{} + // HealthCheckResult Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. type HealthCheckResult struct { NullableMessage NullableString `json:"NullableMessage,omitempty"` @@ -82,6 +85,14 @@ func (o *HealthCheckResult) UnsetNullableMessage() { } func (o HealthCheckResult) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HealthCheckResult) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.NullableMessage.IsSet() { toSerialize["NullableMessage"] = o.NullableMessage.Get() @@ -91,7 +102,7 @@ func (o HealthCheckResult) MarshalJSON() ([]byte, error) { toSerialize[key] = value } - return json.Marshal(toSerialize) + return toSerialize, nil } func (o *HealthCheckResult) UnmarshalJSON(bytes []byte) (err error) { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_list.go b/samples/openapi3/client/petstore/go/go-petstore/model_list.go index c5c9ecb2ef..0be0312e32 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_list.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_list.go @@ -14,6 +14,9 @@ import ( "encoding/json" ) +// checks if the List type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &List{} + // List struct for List type List struct { Var123List *string `json:"123-list,omitempty"` @@ -72,6 +75,14 @@ func (o *List) SetVar123List(v string) { } func (o List) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o List) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Var123List) { toSerialize["123-list"] = o.Var123List @@ -81,7 +92,7 @@ func (o List) MarshalJSON() ([]byte, error) { toSerialize[key] = value } - return json.Marshal(toSerialize) + return toSerialize, nil } func (o *List) UnmarshalJSON(bytes []byte) (err error) { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_map_of_file_test_.go b/samples/openapi3/client/petstore/go/go-petstore/model_map_of_file_test_.go index fab6400f33..a96502e084 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_map_of_file_test_.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_map_of_file_test_.go @@ -15,6 +15,9 @@ import ( "os" ) +// checks if the MapOfFileTest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MapOfFileTest{} + // MapOfFileTest test map of file in a property type MapOfFileTest struct { // a property to test map of file @@ -74,6 +77,14 @@ func (o *MapOfFileTest) SetPropTest(v map[string]*os.File) { } func (o MapOfFileTest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MapOfFileTest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.PropTest) { toSerialize["prop_test"] = o.PropTest @@ -83,7 +94,7 @@ func (o MapOfFileTest) MarshalJSON() ([]byte, error) { toSerialize[key] = value } - return json.Marshal(toSerialize) + return toSerialize, nil } func (o *MapOfFileTest) UnmarshalJSON(bytes []byte) (err error) { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_map_test_.go b/samples/openapi3/client/petstore/go/go-petstore/model_map_test_.go index 6d983de731..2f8a6f6371 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_map_test_.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_map_test_.go @@ -14,6 +14,9 @@ import ( "encoding/json" ) +// checks if the MapTest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MapTest{} + // MapTest struct for MapTest type MapTest struct { MapMapOfString *map[string]map[string]string `json:"map_map_of_string,omitempty"` @@ -171,6 +174,14 @@ func (o *MapTest) SetIndirectMap(v map[string]bool) { } func (o MapTest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MapTest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.MapMapOfString) { toSerialize["map_map_of_string"] = o.MapMapOfString @@ -189,7 +200,7 @@ func (o MapTest) MarshalJSON() ([]byte, error) { toSerialize[key] = value } - return json.Marshal(toSerialize) + return toSerialize, nil } func (o *MapTest) UnmarshalJSON(bytes []byte) (err error) { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_mixed_properties_and_additional_properties_class.go b/samples/openapi3/client/petstore/go/go-petstore/model_mixed_properties_and_additional_properties_class.go index 932ba1768a..5034ef2bc9 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_mixed_properties_and_additional_properties_class.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_mixed_properties_and_additional_properties_class.go @@ -15,6 +15,9 @@ import ( "time" ) +// checks if the MixedPropertiesAndAdditionalPropertiesClass type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MixedPropertiesAndAdditionalPropertiesClass{} + // MixedPropertiesAndAdditionalPropertiesClass struct for MixedPropertiesAndAdditionalPropertiesClass type MixedPropertiesAndAdditionalPropertiesClass struct { Uuid *string `json:"uuid,omitempty"` @@ -139,6 +142,14 @@ func (o *MixedPropertiesAndAdditionalPropertiesClass) SetMap(v map[string]Animal } func (o MixedPropertiesAndAdditionalPropertiesClass) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MixedPropertiesAndAdditionalPropertiesClass) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Uuid) { toSerialize["uuid"] = o.Uuid @@ -154,7 +165,7 @@ func (o MixedPropertiesAndAdditionalPropertiesClass) MarshalJSON() ([]byte, erro toSerialize[key] = value } - return json.Marshal(toSerialize) + return toSerialize, nil } func (o *MixedPropertiesAndAdditionalPropertiesClass) UnmarshalJSON(bytes []byte) (err error) { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_name.go b/samples/openapi3/client/petstore/go/go-petstore/model_name.go index 167e669b2f..22012a7d2c 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_name.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_name.go @@ -14,6 +14,9 @@ import ( "encoding/json" ) +// checks if the Name type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Name{} + // Name Model for testing model name same as property name type Name struct { Name int32 `json:"name"` @@ -164,10 +167,16 @@ func (o *Name) SetVar123Number(v int32) { } func (o Name) MarshalJSON() ([]byte, error) { - toSerialize := map[string]interface{}{} - if true { - toSerialize["name"] = o.Name + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err } + return json.Marshal(toSerialize) +} + +func (o Name) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name if !isNil(o.SnakeCase) { toSerialize["snake_case"] = o.SnakeCase } @@ -182,7 +191,7 @@ func (o Name) MarshalJSON() ([]byte, error) { toSerialize[key] = value } - return json.Marshal(toSerialize) + return toSerialize, nil } func (o *Name) UnmarshalJSON(bytes []byte) (err error) { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_nullable_all_of.go b/samples/openapi3/client/petstore/go/go-petstore/model_nullable_all_of.go index 47f8019b44..b773106a35 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_nullable_all_of.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_nullable_all_of.go @@ -14,6 +14,9 @@ import ( "encoding/json" ) +// checks if the NullableAllOf type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NullableAllOf{} + // NullableAllOf struct for NullableAllOf type NullableAllOf struct { Child NullableNullableAllOfChild `json:"child,omitempty"` @@ -82,6 +85,14 @@ func (o *NullableAllOf) UnsetChild() { } func (o NullableAllOf) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NullableAllOf) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.Child.IsSet() { toSerialize["child"] = o.Child.Get() @@ -91,7 +102,7 @@ func (o NullableAllOf) MarshalJSON() ([]byte, error) { toSerialize[key] = value } - return json.Marshal(toSerialize) + return toSerialize, nil } func (o *NullableAllOf) UnmarshalJSON(bytes []byte) (err error) { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_nullable_all_of_child.go b/samples/openapi3/client/petstore/go/go-petstore/model_nullable_all_of_child.go index 31fa0dc399..777c1cba47 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_nullable_all_of_child.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_nullable_all_of_child.go @@ -14,6 +14,9 @@ import ( "encoding/json" ) +// checks if the NullableAllOfChild type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NullableAllOfChild{} + // NullableAllOfChild struct for NullableAllOfChild type NullableAllOfChild struct { Name *string `json:"name,omitempty"` @@ -72,6 +75,14 @@ func (o *NullableAllOfChild) SetName(v string) { } func (o NullableAllOfChild) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NullableAllOfChild) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Name) { toSerialize["name"] = o.Name @@ -81,7 +92,7 @@ func (o NullableAllOfChild) MarshalJSON() ([]byte, error) { toSerialize[key] = value } - return json.Marshal(toSerialize) + return toSerialize, nil } func (o *NullableAllOfChild) UnmarshalJSON(bytes []byte) (err error) { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_nullable_class.go b/samples/openapi3/client/petstore/go/go-petstore/model_nullable_class.go index 9eceb1aab4..3f55258256 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_nullable_class.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_nullable_class.go @@ -15,6 +15,9 @@ import ( "time" ) +// checks if the NullableClass type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NullableClass{} + // NullableClass struct for NullableClass type NullableClass struct { IntegerProp NullableInt32 `json:"integer_prop,omitempty"` @@ -501,6 +504,14 @@ func (o *NullableClass) SetObjectItemsNullable(v map[string]map[string]interface } func (o NullableClass) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NullableClass) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if o.IntegerProp.IsSet() { toSerialize["integer_prop"] = o.IntegerProp.Get() @@ -538,7 +549,7 @@ func (o NullableClass) MarshalJSON() ([]byte, error) { if !isNil(o.ObjectItemsNullable) { toSerialize["object_items_nullable"] = o.ObjectItemsNullable } - return json.Marshal(toSerialize) + return toSerialize, nil } type NullableNullableClass struct { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_number_only.go b/samples/openapi3/client/petstore/go/go-petstore/model_number_only.go index 355f03eca4..7b98f85d8b 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_number_only.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_number_only.go @@ -14,6 +14,9 @@ import ( "encoding/json" ) +// checks if the NumberOnly type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NumberOnly{} + // NumberOnly struct for NumberOnly type NumberOnly struct { JustNumber *float32 `json:"JustNumber,omitempty"` @@ -72,6 +75,14 @@ func (o *NumberOnly) SetJustNumber(v float32) { } func (o NumberOnly) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NumberOnly) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.JustNumber) { toSerialize["JustNumber"] = o.JustNumber @@ -81,7 +92,7 @@ func (o NumberOnly) MarshalJSON() ([]byte, error) { toSerialize[key] = value } - return json.Marshal(toSerialize) + return toSerialize, nil } func (o *NumberOnly) UnmarshalJSON(bytes []byte) (err error) { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_one_of_primitive_type_child.go b/samples/openapi3/client/petstore/go/go-petstore/model_one_of_primitive_type_child.go index 75da3eaeb4..f52fa72517 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_one_of_primitive_type_child.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_one_of_primitive_type_child.go @@ -14,6 +14,9 @@ import ( "encoding/json" ) +// checks if the OneOfPrimitiveTypeChild type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OneOfPrimitiveTypeChild{} + // OneOfPrimitiveTypeChild struct for OneOfPrimitiveTypeChild type OneOfPrimitiveTypeChild struct { Name *string `json:"name,omitempty"` @@ -72,6 +75,14 @@ func (o *OneOfPrimitiveTypeChild) SetName(v string) { } func (o OneOfPrimitiveTypeChild) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OneOfPrimitiveTypeChild) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Name) { toSerialize["name"] = o.Name @@ -81,7 +92,7 @@ func (o OneOfPrimitiveTypeChild) MarshalJSON() ([]byte, error) { toSerialize[key] = value } - return json.Marshal(toSerialize) + return toSerialize, nil } func (o *OneOfPrimitiveTypeChild) UnmarshalJSON(bytes []byte) (err error) { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_order.go b/samples/openapi3/client/petstore/go/go-petstore/model_order.go index ab12f8725f..45af84e407 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_order.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_order.go @@ -15,6 +15,9 @@ import ( "time" ) +// checks if the Order type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Order{} + // Order struct for Order type Order struct { Id *int64 `json:"id,omitempty"` @@ -243,6 +246,14 @@ func (o *Order) SetComplete(v bool) { } func (o Order) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Order) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Id) { toSerialize["id"] = o.Id @@ -267,7 +278,7 @@ func (o Order) MarshalJSON() ([]byte, error) { toSerialize[key] = value } - return json.Marshal(toSerialize) + return toSerialize, nil } func (o *Order) UnmarshalJSON(bytes []byte) (err error) { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_outer_composite.go b/samples/openapi3/client/petstore/go/go-petstore/model_outer_composite.go index 1e84b4df2f..210cacc271 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_outer_composite.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_outer_composite.go @@ -14,6 +14,9 @@ import ( "encoding/json" ) +// checks if the OuterComposite type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OuterComposite{} + // OuterComposite struct for OuterComposite type OuterComposite struct { MyNumber *float32 `json:"my_number,omitempty"` @@ -138,6 +141,14 @@ func (o *OuterComposite) SetMyBoolean(v bool) { } func (o OuterComposite) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OuterComposite) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.MyNumber) { toSerialize["my_number"] = o.MyNumber @@ -153,7 +164,7 @@ func (o OuterComposite) MarshalJSON() ([]byte, error) { toSerialize[key] = value } - return json.Marshal(toSerialize) + return toSerialize, nil } func (o *OuterComposite) UnmarshalJSON(bytes []byte) (err error) { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_pet.go b/samples/openapi3/client/petstore/go/go-petstore/model_pet.go index 3171045e49..008200fcb5 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_pet.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_pet.go @@ -14,6 +14,9 @@ import ( "encoding/json" ) +// checks if the Pet type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Pet{} + // Pet struct for Pet type Pet struct { Id *int64 `json:"id,omitempty"` @@ -228,6 +231,14 @@ func (o *Pet) SetStatus(v string) { } func (o Pet) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Pet) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Id) { toSerialize["id"] = o.Id @@ -235,12 +246,8 @@ func (o Pet) MarshalJSON() ([]byte, error) { if !isNil(o.Category) { toSerialize["category"] = o.Category } - if true { - toSerialize["name"] = o.Name - } - if true { - toSerialize["photoUrls"] = o.PhotoUrls - } + toSerialize["name"] = o.Name + toSerialize["photoUrls"] = o.PhotoUrls if !isNil(o.Tags) { toSerialize["tags"] = o.Tags } @@ -252,7 +259,7 @@ func (o Pet) MarshalJSON() ([]byte, error) { toSerialize[key] = value } - return json.Marshal(toSerialize) + return toSerialize, nil } func (o *Pet) UnmarshalJSON(bytes []byte) (err error) { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_read_only_first.go b/samples/openapi3/client/petstore/go/go-petstore/model_read_only_first.go index 535f09e68d..56546056ec 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_read_only_first.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_read_only_first.go @@ -14,6 +14,9 @@ import ( "encoding/json" ) +// checks if the ReadOnlyFirst type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ReadOnlyFirst{} + // ReadOnlyFirst struct for ReadOnlyFirst type ReadOnlyFirst struct { Bar *string `json:"bar,omitempty"` @@ -105,6 +108,14 @@ func (o *ReadOnlyFirst) SetBaz(v string) { } func (o ReadOnlyFirst) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ReadOnlyFirst) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Bar) { toSerialize["bar"] = o.Bar @@ -117,7 +128,7 @@ func (o ReadOnlyFirst) MarshalJSON() ([]byte, error) { toSerialize[key] = value } - return json.Marshal(toSerialize) + return toSerialize, nil } func (o *ReadOnlyFirst) UnmarshalJSON(bytes []byte) (err error) { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_read_only_with_default.go b/samples/openapi3/client/petstore/go/go-petstore/model_read_only_with_default.go index 66e40d4277..3c754c02a1 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_read_only_with_default.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_read_only_with_default.go @@ -14,6 +14,9 @@ import ( "encoding/json" ) +// checks if the ReadOnlyWithDefault type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ReadOnlyWithDefault{} + // ReadOnlyWithDefault struct for ReadOnlyWithDefault type ReadOnlyWithDefault struct { Prop1 *string `json:"prop1,omitempty"` @@ -282,6 +285,14 @@ func (o *ReadOnlyWithDefault) SetIntProp2(v float32) { } func (o ReadOnlyWithDefault) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ReadOnlyWithDefault) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Prop1) { toSerialize["prop1"] = o.Prop1 @@ -309,7 +320,7 @@ func (o ReadOnlyWithDefault) MarshalJSON() ([]byte, error) { toSerialize[key] = value } - return json.Marshal(toSerialize) + return toSerialize, nil } func (o *ReadOnlyWithDefault) UnmarshalJSON(bytes []byte) (err error) { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_return.go b/samples/openapi3/client/petstore/go/go-petstore/model_return.go index dd4ef54966..77cda0af9e 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_return.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_return.go @@ -14,6 +14,9 @@ import ( "encoding/json" ) +// checks if the Return type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Return{} + // Return Model for testing reserved words type Return struct { Return *int32 `json:"return,omitempty"` @@ -72,6 +75,14 @@ func (o *Return) SetReturn(v int32) { } func (o Return) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Return) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Return) { toSerialize["return"] = o.Return @@ -81,7 +92,7 @@ func (o Return) MarshalJSON() ([]byte, error) { toSerialize[key] = value } - return json.Marshal(toSerialize) + return toSerialize, nil } func (o *Return) UnmarshalJSON(bytes []byte) (err error) { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_tag.go b/samples/openapi3/client/petstore/go/go-petstore/model_tag.go index f6a0cf69f8..57fe919892 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_tag.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_tag.go @@ -14,6 +14,9 @@ import ( "encoding/json" ) +// checks if the Tag type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Tag{} + // Tag struct for Tag type Tag struct { Id *int64 `json:"id,omitempty"` @@ -105,6 +108,14 @@ func (o *Tag) SetName(v string) { } func (o Tag) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Tag) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Id) { toSerialize["id"] = o.Id @@ -117,7 +128,7 @@ func (o Tag) MarshalJSON() ([]byte, error) { toSerialize[key] = value } - return json.Marshal(toSerialize) + return toSerialize, nil } func (o *Tag) UnmarshalJSON(bytes []byte) (err error) { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_user.go b/samples/openapi3/client/petstore/go/go-petstore/model_user.go index be7e900532..389420e8e5 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_user.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_user.go @@ -14,6 +14,9 @@ import ( "encoding/json" ) +// checks if the User type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &User{} + // User struct for User type User struct { Id *int64 `json:"id,omitempty"` @@ -443,6 +446,14 @@ func (o *User) SetArbitraryNullableTypeValue(v interface{}) { } func (o User) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o User) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Id) { toSerialize["id"] = o.Id @@ -485,7 +496,7 @@ func (o User) MarshalJSON() ([]byte, error) { toSerialize[key] = value } - return json.Marshal(toSerialize) + return toSerialize, nil } func (o *User) UnmarshalJSON(bytes []byte) (err error) { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_whale.go b/samples/openapi3/client/petstore/go/go-petstore/model_whale.go index 8da3060406..f90923f104 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_whale.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_whale.go @@ -14,6 +14,9 @@ import ( "encoding/json" ) +// checks if the Whale type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Whale{} + // Whale struct for Whale type Whale struct { HasBaleen *bool `json:"hasBaleen,omitempty"` @@ -131,6 +134,14 @@ func (o *Whale) SetClassName(v string) { } func (o Whale) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Whale) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.HasBaleen) { toSerialize["hasBaleen"] = o.HasBaleen @@ -138,15 +149,13 @@ func (o Whale) MarshalJSON() ([]byte, error) { if !isNil(o.HasTeeth) { toSerialize["hasTeeth"] = o.HasTeeth } - if true { - toSerialize["className"] = o.ClassName - } + toSerialize["className"] = o.ClassName for key, value := range o.AdditionalProperties { toSerialize[key] = value } - return json.Marshal(toSerialize) + return toSerialize, nil } func (o *Whale) UnmarshalJSON(bytes []byte) (err error) { diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_zebra.go b/samples/openapi3/client/petstore/go/go-petstore/model_zebra.go index 70a1ee363c..76106e1eb5 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_zebra.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_zebra.go @@ -14,6 +14,9 @@ import ( "encoding/json" ) +// checks if the Zebra type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Zebra{} + // Zebra struct for Zebra type Zebra struct { Type *string `json:"type,omitempty"` @@ -98,19 +101,25 @@ func (o *Zebra) SetClassName(v string) { } func (o Zebra) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Zebra) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !isNil(o.Type) { toSerialize["type"] = o.Type } - if true { - toSerialize["className"] = o.ClassName - } + toSerialize["className"] = o.ClassName for key, value := range o.AdditionalProperties { toSerialize[key] = value } - return json.Marshal(toSerialize) + return toSerialize, nil } func (o *Zebra) UnmarshalJSON(bytes []byte) (err error) { diff --git a/samples/openapi3/client/petstore/go/go-petstore/utils.go b/samples/openapi3/client/petstore/go/go-petstore/utils.go index f55144e1b4..9e3eb715da 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/utils.go +++ b/samples/openapi3/client/petstore/go/go-petstore/utils.go @@ -341,3 +341,7 @@ func isNil(i interface{}) bool { } return false } + +type MappedNullable interface { + ToMap() (map[string]interface{}, error) +} diff --git a/samples/openapi3/client/petstore/go/pet_api_test.go b/samples/openapi3/client/petstore/go/pet_api_test.go index f92873d5d1..49896698b6 100644 --- a/samples/openapi3/client/petstore/go/pet_api_test.go +++ b/samples/openapi3/client/petstore/go/pet_api_test.go @@ -184,6 +184,26 @@ func TestDeletePet(t *testing.T) { } } +// test deep object query parameter and verify via tcpdump +func TestDeepObjectQuery(t *testing.T) { + newPet := sw.Pet{ + Id: sw.PtrInt64(12830), Name: "gopher", + PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), + Tags: []sw.Tag{{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}, + } + + newCategory := sw.Category{Id: sw.PtrInt64(12830), Name: "cat"} + configuration := sw.NewConfiguration() + apiClient := sw.NewAPIClient(configuration) + r, err := apiClient.FakeApi.TestQueryDeepObject(context.Background()).TestPet(newPet).InputOptions(newCategory).Execute() + if err != nil { + // for sure this will fail as the endpoint is fake + } + if r.StatusCode != 200 { + t.Log(r) + } +} + /* // Test we can concurrently create, retrieve, update, and delete. func TestConcurrency(t *testing.T) { From 2a7b3cd4b9438941ed0ec13420cd956be1d5e9d4 Mon Sep 17 00:00:00 2001 From: Martin Delille Date: Sun, 20 Nov 2022 09:10:55 +0100 Subject: [PATCH 033/189] [cpp-qt-client] Fix warnings (#14056) * Fix warnings * Update samplE --- .../main/resources/cpp-qt-client/oauth.cpp.mustache | 12 ++++++------ samples/client/petstore/cpp-qt/client/PFXOauth.cpp | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/cpp-qt-client/oauth.cpp.mustache b/modules/openapi-generator/src/main/resources/cpp-qt-client/oauth.cpp.mustache index 1573bc654e..65d6609c0d 100644 --- a/modules/openapi-generator/src/main/resources/cpp-qt-client/oauth.cpp.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-qt-client/oauth.cpp.mustache @@ -55,8 +55,8 @@ void OauthCode::link(){ void OauthCode::unlink() { - disconnect(this,0,0,0); - disconnect(&m_server,0,0,0); + disconnect(this, nullptr, nullptr, nullptr); + disconnect(&m_server, nullptr, nullptr, nullptr); } void OauthCode::setVariables(QString authUrl, QString tokenUrl, QString scope, QString state, QString redirectUri, QString clientId, QString clientSecret, QString accessType){ @@ -121,8 +121,8 @@ void OauthImplicit::link() void OauthImplicit::unlink() { - disconnect(this,0,0,0); - disconnect(&m_server,0,0,0); + disconnect(this, nullptr, nullptr, nullptr); + disconnect(&m_server, nullptr, nullptr, nullptr); m_linked = false; } @@ -165,7 +165,7 @@ void OauthCredentials::link() void OauthCredentials::unlink() { - disconnect(this,0,0,0); + disconnect(this, nullptr, nullptr, nullptr); } void OauthCredentials::setVariables(QString tokenUrl, QString scope, QString clientId, QString clientSecret){ @@ -208,7 +208,7 @@ void OauthPassword::link() void OauthPassword::unlink() { - disconnect(this,0,0,0); + disconnect(this, nullptr, nullptr, nullptr); } void OauthPassword::setVariables(QString tokenUrl, QString scope, QString clientId, QString clientSecret, QString username, QString password){ diff --git a/samples/client/petstore/cpp-qt/client/PFXOauth.cpp b/samples/client/petstore/cpp-qt/client/PFXOauth.cpp index 7354a96f6f..2c349ea5fc 100644 --- a/samples/client/petstore/cpp-qt/client/PFXOauth.cpp +++ b/samples/client/petstore/cpp-qt/client/PFXOauth.cpp @@ -53,8 +53,8 @@ void OauthCode::link(){ void OauthCode::unlink() { - disconnect(this,0,0,0); - disconnect(&m_server,0,0,0); + disconnect(this, nullptr, nullptr, nullptr); + disconnect(&m_server, nullptr, nullptr, nullptr); } void OauthCode::setVariables(QString authUrl, QString tokenUrl, QString scope, QString state, QString redirectUri, QString clientId, QString clientSecret, QString accessType){ @@ -119,8 +119,8 @@ void OauthImplicit::link() void OauthImplicit::unlink() { - disconnect(this,0,0,0); - disconnect(&m_server,0,0,0); + disconnect(this, nullptr, nullptr, nullptr); + disconnect(&m_server, nullptr, nullptr, nullptr); m_linked = false; } @@ -163,7 +163,7 @@ void OauthCredentials::link() void OauthCredentials::unlink() { - disconnect(this,0,0,0); + disconnect(this, nullptr, nullptr, nullptr); } void OauthCredentials::setVariables(QString tokenUrl, QString scope, QString clientId, QString clientSecret){ @@ -206,7 +206,7 @@ void OauthPassword::link() void OauthPassword::unlink() { - disconnect(this,0,0,0); + disconnect(this, nullptr, nullptr, nullptr); } void OauthPassword::setVariables(QString tokenUrl, QString scope, QString clientId, QString clientSecret, QString username, QString password){ From 67067b1b3ce9601ec4c3467972e3835254057059 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sun, 20 Nov 2022 16:13:32 +0800 Subject: [PATCH 034/189] comment out csharp tests --- appveyor.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index de56c2ed63..2caeb5c400 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -61,12 +61,12 @@ build_script: - dotnet build samples\client\petstore\csharp-netcore\OpenAPIClient-net5.0\Org.OpenAPITools.sln # build C# API client (.net 5.0 with ConditionalSerialization) - dotnet build samples\client\petstore\csharp-netcore\OpenAPIClient-ConditionalSerialization\Org.OpenAPITools.sln - # build C# API client - - nuget restore samples\client\petstore\csharp\OpenAPIClient\Org.OpenAPITools.sln - - msbuild samples\client\petstore\csharp\OpenAPIClient\Org.OpenAPITools.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" - # build C# API client (with PropertyChanged) - - nuget restore samples\client\petstore\csharp\OpenAPIClientWithPropertyChanged\Org.OpenAPITools.sln - - msbuild samples\client\petstore\csharp\OpenAPIClientWithPropertyChanged\Org.OpenAPITools.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" + ## build C# API client + #- nuget restore samples\client\petstore\csharp\OpenAPIClient\Org.OpenAPITools.sln + #- msbuild samples\client\petstore\csharp\OpenAPIClient\Org.OpenAPITools.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" + ## build C# API client (with PropertyChanged) + #- nuget restore samples\client\petstore\csharp\OpenAPIClientWithPropertyChanged\Org.OpenAPITools.sln + #- msbuild samples\client\petstore\csharp\OpenAPIClientWithPropertyChanged\Org.OpenAPITools.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" # build C# .net standard 1.3+ API client #- nuget restore samples\client\petstore\csharp\OpenAPIClientNetStandard\Org.OpenAPITools.sln #- msbuild samples\client\petstore\csharp\OpenAPIClientNetStandard\Org.OpenAPITools.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" @@ -92,10 +92,10 @@ test_script: - dotnet test samples\client\petstore\csharp-netcore\OpenAPIClient-net5.0\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj # test C# API Client using conditional-serialization - dotnet test samples\client\petstore\csharp-netcore\OpenAPIClient-ConditionalSerialization\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj - # test c# API client - - nunit3-console samples\client\petstore\csharp\OpenAPIClient\src\Org.OpenAPITools.Test\bin\Debug\Org.OpenAPITools.Test.dll --result=myresults.xml;format=AppVeyor - # test c# API client (with PropertyChanged) - - nunit3-console samples\client\petstore\csharp\OpenAPIClientWithPropertyChanged\src\Org.OpenAPITools.Test\bin\Debug\Org.OpenAPITools.Test.dll --result=myresults.xml;format=AppVeyor + ## test c# API client + #- nunit3-console samples\client\petstore\csharp\OpenAPIClient\src\Org.OpenAPITools.Test\bin\Debug\Org.OpenAPITools.Test.dll --result=myresults.xml;format=AppVeyor + ## test c# API client (with PropertyChanged) + #- nunit3-console samples\client\petstore\csharp\OpenAPIClientWithPropertyChanged\src\Org.OpenAPITools.Test\bin\Debug\Org.OpenAPITools.Test.dll --result=myresults.xml;format=AppVeyor ### TODO: Execute all generators via powershell or other # generate all petstore clients From 903ff0ba47b7ecae6f27fa61e86e33a72b68d8e0 Mon Sep 17 00:00:00 2001 From: Ian Cubbon Date: Sun, 20 Nov 2022 07:35:21 -0700 Subject: [PATCH 035/189] Trim any space when we format the error message sent back to the client. (#14066) A trailing whitespace gets included if the error is not a RFC7807 model. --- modules/openapi-generator/src/main/resources/go/client.mustache | 2 +- samples/client/petstore/go/go-petstore/client.go | 2 +- .../client/extensions/x-auth-id-alias/go-experimental/client.go | 2 +- samples/openapi3/client/petstore/go/go-petstore/client.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/go/client.mustache b/modules/openapi-generator/src/main/resources/go/client.mustache index 616772c889..06d61f8866 100644 --- a/modules/openapi-generator/src/main/resources/go/client.mustache +++ b/modules/openapi-generator/src/main/resources/go/client.mustache @@ -712,5 +712,5 @@ func formatErrorMessage(status string, v interface{}) string { } // status title (detail) - return fmt.Sprintf("%s %s", status, str) + return strings.TrimSpace(fmt.Sprintf("%s %s", status, str)) } diff --git a/samples/client/petstore/go/go-petstore/client.go b/samples/client/petstore/go/go-petstore/client.go index 68b58dc81f..4cca066940 100644 --- a/samples/client/petstore/go/go-petstore/client.go +++ b/samples/client/petstore/go/go-petstore/client.go @@ -672,5 +672,5 @@ func formatErrorMessage(status string, v interface{}) string { } // status title (detail) - return fmt.Sprintf("%s %s", status, str) + return strings.TrimSpace(fmt.Sprintf("%s %s", status, str)) } diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/client.go b/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/client.go index 3a48f96983..b641ac83f2 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/client.go +++ b/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/client.go @@ -657,5 +657,5 @@ func formatErrorMessage(status string, v interface{}) string { } // status title (detail) - return fmt.Sprintf("%s %s", status, str) + return strings.TrimSpace(fmt.Sprintf("%s %s", status, str)) } diff --git a/samples/openapi3/client/petstore/go/go-petstore/client.go b/samples/openapi3/client/petstore/go/go-petstore/client.go index fa1714c97f..0c80456c12 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/client.go +++ b/samples/openapi3/client/petstore/go/go-petstore/client.go @@ -685,5 +685,5 @@ func formatErrorMessage(status string, v interface{}) string { } // status title (detail) - return fmt.Sprintf("%s %s", status, str) + return strings.TrimSpace(fmt.Sprintf("%s %s", status, str)) } From a96777b6f4d10b40323b16193e1088ef77f5f30e Mon Sep 17 00:00:00 2001 From: Mustansir Soni <72849573+MustansirS@users.noreply.github.com> Date: Mon, 21 Nov 2022 15:18:36 +0900 Subject: [PATCH 036/189] [#13998][Bug][PHP] Move isNullable section to the top of the setter function in templates (#14005) * Move isNullable section to the top * Manage extra lines --- .../main/resources/php/model_generic.mustache | 120 +++++++++-------- .../lib/Model/AdditionalPropertiesClass.php | 4 - .../lib/Model/AllOfWithSingleRef.php | 4 - .../OpenAPIClient-php/lib/Model/Animal.php | 4 - .../lib/Model/ApiResponse.php | 6 - .../lib/Model/ArrayOfArrayOfNumberOnly.php | 2 - .../lib/Model/ArrayOfNumberOnly.php | 2 - .../OpenAPIClient-php/lib/Model/ArrayTest.php | 18 +-- .../lib/Model/Capitalization.php | 12 -- .../php/OpenAPIClient-php/lib/Model/Cat.php | 2 - .../OpenAPIClient-php/lib/Model/CatAllOf.php | 2 - .../OpenAPIClient-php/lib/Model/Category.php | 4 - .../lib/Model/ClassModel.php | 2 - .../OpenAPIClient-php/lib/Model/Client.php | 2 - .../lib/Model/DeprecatedObject.php | 2 - .../php/OpenAPIClient-php/lib/Model/Dog.php | 2 - .../OpenAPIClient-php/lib/Model/DogAllOf.php | 2 - .../lib/Model/EnumArrays.php | 20 ++- .../OpenAPIClient-php/lib/Model/EnumTest.php | 46 +++---- .../php/OpenAPIClient-php/lib/Model/File.php | 2 - .../lib/Model/FileSchemaTestClass.php | 4 - .../php/OpenAPIClient-php/lib/Model/Foo.php | 2 - .../lib/Model/FooGetDefaultResponse.php | 2 - .../lib/Model/FormatTest.php | 124 +++++++----------- .../lib/Model/HasOnlyReadOnly.php | 4 - .../lib/Model/HealthCheckResult.php | 2 - .../OpenAPIClient-php/lib/Model/MapTest.php | 16 +-- ...PropertiesAndAdditionalPropertiesClass.php | 6 - .../lib/Model/Model200Response.php | 4 - .../OpenAPIClient-php/lib/Model/ModelList.php | 2 - .../lib/Model/ModelReturn.php | 2 - .../php/OpenAPIClient-php/lib/Model/Name.php | 8 -- .../lib/Model/NullableClass.php | 24 ---- .../lib/Model/NumberOnly.php | 2 - .../lib/Model/ObjectWithDeprecatedFields.php | 8 -- .../php/OpenAPIClient-php/lib/Model/Order.php | 20 +-- .../lib/Model/OuterComposite.php | 6 - .../lib/Model/OuterObjectWithEnumProperty.php | 2 - .../php/OpenAPIClient-php/lib/Model/Pet.php | 22 +--- .../lib/Model/ReadOnlyFirst.php | 4 - .../lib/Model/SpecialModelName.php | 2 - .../php/OpenAPIClient-php/lib/Model/Tag.php | 4 - .../php/OpenAPIClient-php/lib/Model/User.php | 16 --- 43 files changed, 147 insertions(+), 397 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/php/model_generic.mustache b/modules/openapi-generator/src/main/resources/php/model_generic.mustache index 97bb1d9320..b4eb47f5fb 100644 --- a/modules/openapi-generator/src/main/resources/php/model_generic.mustache +++ b/modules/openapi-generator/src/main/resources/php/model_generic.mustache @@ -387,66 +387,6 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}}{{/parentSchema}}{{^par */ public function {{setter}}(${{name}}) { - {{#isEnum}} - $allowedValues = $this->{{getter}}AllowableValues(); - {{^isContainer}} - if ({{^required}}!is_null(${{name}}) && {{/required}}!in_array(${{{name}}}, $allowedValues, true)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value '%s' for '{{name}}', must be one of '%s'", - ${{{name}}}, - implode("', '", $allowedValues) - ) - ); - } - {{/isContainer}} - {{#isContainer}} - if ({{^required}}!is_null(${{name}}) && {{/required}}array_diff(${{{name}}}, $allowedValues)) { - throw new \InvalidArgumentException( - sprintf( - "Invalid value for '{{name}}', must be one of '%s'", - implode("', '", $allowedValues) - ) - ); - } - {{/isContainer}} - {{/isEnum}} - {{#hasValidation}} - {{#maxLength}} - if ({{^required}}!is_null(${{name}}) && {{/required}}(mb_strlen(${{name}}) > {{maxLength}})) { - throw new \InvalidArgumentException('invalid length for ${{name}} when calling {{classname}}.{{operationId}}, must be smaller than or equal to {{maxLength}}.'); - }{{/maxLength}} - {{#minLength}} - if ({{^required}}!is_null(${{name}}) && {{/required}}(mb_strlen(${{name}}) < {{minLength}})) { - throw new \InvalidArgumentException('invalid length for ${{name}} when calling {{classname}}.{{operationId}}, must be bigger than or equal to {{minLength}}.'); - } - {{/minLength}} - {{#maximum}} - if ({{^required}}!is_null(${{name}}) && {{/required}}(${{name}} >{{#exclusiveMaximum}}={{/exclusiveMaximum}} {{maximum}})) { - throw new \InvalidArgumentException('invalid value for ${{name}} when calling {{classname}}.{{operationId}}, must be smaller than {{^exclusiveMaximum}}or equal to {{/exclusiveMaximum}}{{maximum}}.'); - } - {{/maximum}} - {{#minimum}} - if ({{^required}}!is_null(${{name}}) && {{/required}}(${{name}} <{{#exclusiveMinimum}}={{/exclusiveMinimum}} {{minimum}})) { - throw new \InvalidArgumentException('invalid value for ${{name}} when calling {{classname}}.{{operationId}}, must be bigger than {{^exclusiveMinimum}}or equal to {{/exclusiveMinimum}}{{minimum}}.'); - } - {{/minimum}} - {{#pattern}} - if ({{^required}}!is_null(${{name}}) && {{/required}}(!preg_match("{{{pattern}}}", ${{name}}))) { - throw new \InvalidArgumentException("invalid value for \${{name}} when calling {{classname}}.{{operationId}}, must conform to the pattern {{{pattern}}}."); - } - {{/pattern}} - {{#maxItems}} - if ({{^required}}!is_null(${{name}}) && {{/required}}(count(${{name}}) > {{maxItems}})) { - throw new \InvalidArgumentException('invalid value for ${{name}} when calling {{classname}}.{{operationId}}, number of items must be less than or equal to {{maxItems}}.'); - }{{/maxItems}} - {{#minItems}} - if ({{^required}}!is_null(${{name}}) && {{/required}}(count(${{name}}) < {{minItems}})) { - throw new \InvalidArgumentException('invalid length for ${{name}} when calling {{classname}}.{{operationId}}, number of items must be greater than or equal to {{minItems}}.'); - } - {{/minItems}} - {{/hasValidation}} - {{#isNullable}} if (is_null(${{name}})) { array_push($this->openAPINullablesSetToNull, '{{name}}'); @@ -464,7 +404,65 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}}{{/parentSchema}}{{^par throw new \InvalidArgumentException('non-nullable {{name}} cannot be null'); } {{/isNullable}} - + {{#isEnum}} + $allowedValues = $this->{{getter}}AllowableValues(); + {{^isContainer}} + if ({{#isNullable}}!is_null(${{name}}) && {{/isNullable}}!in_array(${{{name}}}, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for '{{name}}', must be one of '%s'", + ${{{name}}}, + implode("', '", $allowedValues) + ) + ); + } + {{/isContainer}} + {{#isContainer}} + if ({{#isNullable}}!is_null(${{name}}) && {{/isNullable}}array_diff(${{{name}}}, $allowedValues)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for '{{name}}', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + {{/isContainer}} + {{/isEnum}} + {{#hasValidation}} + {{#maxLength}} + if ({{#isNullable}}!is_null(${{name}}) && {{/isNullable}}(mb_strlen(${{name}}) > {{maxLength}})) { + throw new \InvalidArgumentException('invalid length for ${{name}} when calling {{classname}}.{{operationId}}, must be smaller than or equal to {{maxLength}}.'); + }{{/maxLength}} + {{#minLength}} + if ({{#isNullable}}!is_null(${{name}}) && {{/isNullable}}(mb_strlen(${{name}}) < {{minLength}})) { + throw new \InvalidArgumentException('invalid length for ${{name}} when calling {{classname}}.{{operationId}}, must be bigger than or equal to {{minLength}}.'); + } + {{/minLength}} + {{#maximum}} + if ({{#isNullable}}!is_null(${{name}}) && {{/isNullable}}(${{name}} >{{#exclusiveMaximum}}={{/exclusiveMaximum}} {{maximum}})) { + throw new \InvalidArgumentException('invalid value for ${{name}} when calling {{classname}}.{{operationId}}, must be smaller than {{^exclusiveMaximum}}or equal to {{/exclusiveMaximum}}{{maximum}}.'); + } + {{/maximum}} + {{#minimum}} + if ({{#isNullable}}!is_null(${{name}}) && {{/isNullable}}(${{name}} <{{#exclusiveMinimum}}={{/exclusiveMinimum}} {{minimum}})) { + throw new \InvalidArgumentException('invalid value for ${{name}} when calling {{classname}}.{{operationId}}, must be bigger than {{^exclusiveMinimum}}or equal to {{/exclusiveMinimum}}{{minimum}}.'); + } + {{/minimum}} + {{#pattern}} + if ({{#isNullable}}!is_null(${{name}}) && {{/isNullable}}(!preg_match("{{{pattern}}}", ${{name}}))) { + throw new \InvalidArgumentException("invalid value for \${{name}} when calling {{classname}}.{{operationId}}, must conform to the pattern {{{pattern}}}."); + } + {{/pattern}} + {{#maxItems}} + if ({{#isNullable}}!is_null(${{name}}) && {{/isNullable}}(count(${{name}}) > {{maxItems}})) { + throw new \InvalidArgumentException('invalid value for ${{name}} when calling {{classname}}.{{operationId}}, number of items must be less than or equal to {{maxItems}}.'); + }{{/maxItems}} + {{#minItems}} + if ({{#isNullable}}!is_null(${{name}}) && {{/isNullable}}(count(${{name}}) < {{minItems}})) { + throw new \InvalidArgumentException('invalid length for ${{name}} when calling {{classname}}.{{operationId}}, number of items must be greater than or equal to {{minItems}}.'); + } + {{/minItems}} + {{/hasValidation}} $this->container['{{name}}'] = ${{name}}; return $this; diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php index 6095d6c06e..c7723b96be 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php @@ -315,11 +315,9 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess, \JsonSer */ public function setMapProperty($map_property) { - if (is_null($map_property)) { throw new \InvalidArgumentException('non-nullable map_property cannot be null'); } - $this->container['map_property'] = $map_property; return $this; @@ -344,11 +342,9 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess, \JsonSer */ public function setMapOfMapProperty($map_of_map_property) { - if (is_null($map_of_map_property)) { throw new \InvalidArgumentException('non-nullable map_of_map_property cannot be null'); } - $this->container['map_of_map_property'] = $map_of_map_property; return $this; diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AllOfWithSingleRef.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AllOfWithSingleRef.php index cafe95c642..4dc30029ec 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AllOfWithSingleRef.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AllOfWithSingleRef.php @@ -315,11 +315,9 @@ class AllOfWithSingleRef implements ModelInterface, ArrayAccess, \JsonSerializab */ public function setUsername($username) { - if (is_null($username)) { throw new \InvalidArgumentException('non-nullable username cannot be null'); } - $this->container['username'] = $username; return $this; @@ -344,11 +342,9 @@ class AllOfWithSingleRef implements ModelInterface, ArrayAccess, \JsonSerializab */ public function setSingleRefType($single_ref_type) { - if (is_null($single_ref_type)) { throw new \InvalidArgumentException('non-nullable single_ref_type cannot be null'); } - $this->container['single_ref_type'] = $single_ref_type; return $this; diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php index e05f0eed07..54933034d8 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php @@ -321,11 +321,9 @@ class Animal implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setClassName($class_name) { - if (is_null($class_name)) { throw new \InvalidArgumentException('non-nullable class_name cannot be null'); } - $this->container['class_name'] = $class_name; return $this; @@ -350,11 +348,9 @@ class Animal implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setColor($color) { - if (is_null($color)) { throw new \InvalidArgumentException('non-nullable color cannot be null'); } - $this->container['color'] = $color; return $this; diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php index c6e4de696f..35ebf67a80 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php @@ -322,11 +322,9 @@ class ApiResponse implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setCode($code) { - if (is_null($code)) { throw new \InvalidArgumentException('non-nullable code cannot be null'); } - $this->container['code'] = $code; return $this; @@ -351,11 +349,9 @@ class ApiResponse implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setType($type) { - if (is_null($type)) { throw new \InvalidArgumentException('non-nullable type cannot be null'); } - $this->container['type'] = $type; return $this; @@ -380,11 +376,9 @@ class ApiResponse implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setMessage($message) { - if (is_null($message)) { throw new \InvalidArgumentException('non-nullable message cannot be null'); } - $this->container['message'] = $message; return $this; diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php index 599b6ee88f..4536a27bdc 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php @@ -308,11 +308,9 @@ class ArrayOfArrayOfNumberOnly implements ModelInterface, ArrayAccess, \JsonSeri */ public function setArrayArrayNumber($array_array_number) { - if (is_null($array_array_number)) { throw new \InvalidArgumentException('non-nullable array_array_number cannot be null'); } - $this->container['array_array_number'] = $array_array_number; return $this; diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php index 0b48cda7de..68e1e72ded 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php @@ -308,11 +308,9 @@ class ArrayOfNumberOnly implements ModelInterface, ArrayAccess, \JsonSerializabl */ public function setArrayNumber($array_number) { - if (is_null($array_number)) { throw new \InvalidArgumentException('non-nullable array_number cannot be null'); } - $this->container['array_number'] = $array_number; return $this; diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php index 43548ef9e1..be146a5f14 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php @@ -330,18 +330,16 @@ class ArrayTest implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setArrayOfString($array_of_string) { - - if (!is_null($array_of_string) && (count($array_of_string) > 3)) { - throw new \InvalidArgumentException('invalid value for $array_of_string when calling ArrayTest., number of items must be less than or equal to 3.'); - } - if (!is_null($array_of_string) && (count($array_of_string) < 0)) { - throw new \InvalidArgumentException('invalid length for $array_of_string when calling ArrayTest., number of items must be greater than or equal to 0.'); - } - if (is_null($array_of_string)) { throw new \InvalidArgumentException('non-nullable array_of_string cannot be null'); } + if ((count($array_of_string) > 3)) { + throw new \InvalidArgumentException('invalid value for $array_of_string when calling ArrayTest., number of items must be less than or equal to 3.'); + } + if ((count($array_of_string) < 0)) { + throw new \InvalidArgumentException('invalid length for $array_of_string when calling ArrayTest., number of items must be greater than or equal to 0.'); + } $this->container['array_of_string'] = $array_of_string; return $this; @@ -366,11 +364,9 @@ class ArrayTest implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setArrayArrayOfInteger($array_array_of_integer) { - if (is_null($array_array_of_integer)) { throw new \InvalidArgumentException('non-nullable array_array_of_integer cannot be null'); } - $this->container['array_array_of_integer'] = $array_array_of_integer; return $this; @@ -395,11 +391,9 @@ class ArrayTest implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setArrayArrayOfModel($array_array_of_model) { - if (is_null($array_array_of_model)) { throw new \InvalidArgumentException('non-nullable array_array_of_model cannot be null'); } - $this->container['array_array_of_model'] = $array_array_of_model; return $this; diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php index d00d79f3b9..7ccb2b1462 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php @@ -343,11 +343,9 @@ class Capitalization implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setSmallCamel($small_camel) { - if (is_null($small_camel)) { throw new \InvalidArgumentException('non-nullable small_camel cannot be null'); } - $this->container['small_camel'] = $small_camel; return $this; @@ -372,11 +370,9 @@ class Capitalization implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setCapitalCamel($capital_camel) { - if (is_null($capital_camel)) { throw new \InvalidArgumentException('non-nullable capital_camel cannot be null'); } - $this->container['capital_camel'] = $capital_camel; return $this; @@ -401,11 +397,9 @@ class Capitalization implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setSmallSnake($small_snake) { - if (is_null($small_snake)) { throw new \InvalidArgumentException('non-nullable small_snake cannot be null'); } - $this->container['small_snake'] = $small_snake; return $this; @@ -430,11 +424,9 @@ class Capitalization implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setCapitalSnake($capital_snake) { - if (is_null($capital_snake)) { throw new \InvalidArgumentException('non-nullable capital_snake cannot be null'); } - $this->container['capital_snake'] = $capital_snake; return $this; @@ -459,11 +451,9 @@ class Capitalization implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setScaEthFlowPoints($sca_eth_flow_points) { - if (is_null($sca_eth_flow_points)) { throw new \InvalidArgumentException('non-nullable sca_eth_flow_points cannot be null'); } - $this->container['sca_eth_flow_points'] = $sca_eth_flow_points; return $this; @@ -488,11 +478,9 @@ class Capitalization implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setAttName($att_name) { - if (is_null($att_name)) { throw new \InvalidArgumentException('non-nullable att_name cannot be null'); } - $this->container['att_name'] = $att_name; return $this; diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php index a3d285433e..ada330fdec 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php @@ -302,11 +302,9 @@ class Cat extends Animal */ public function setDeclawed($declawed) { - if (is_null($declawed)) { throw new \InvalidArgumentException('non-nullable declawed cannot be null'); } - $this->container['declawed'] = $declawed; return $this; diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/CatAllOf.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/CatAllOf.php index e592863ff2..63a3ada7b7 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/CatAllOf.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/CatAllOf.php @@ -308,11 +308,9 @@ class CatAllOf implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setDeclawed($declawed) { - if (is_null($declawed)) { throw new \InvalidArgumentException('non-nullable declawed cannot be null'); } - $this->container['declawed'] = $declawed; return $this; diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php index e949bd0e8c..a1c61187c2 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php @@ -318,11 +318,9 @@ class Category implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setId($id) { - if (is_null($id)) { throw new \InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['id'] = $id; return $this; @@ -347,11 +345,9 @@ class Category implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setName($name) { - if (is_null($name)) { throw new \InvalidArgumentException('non-nullable name cannot be null'); } - $this->container['name'] = $name; return $this; diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php index 9afa4408ba..b1569c319b 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php @@ -309,11 +309,9 @@ class ClassModel implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setClass($_class) { - if (is_null($_class)) { throw new \InvalidArgumentException('non-nullable _class cannot be null'); } - $this->container['_class'] = $_class; return $this; diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php index 1ad15d389e..aca8c8ac46 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php @@ -308,11 +308,9 @@ class Client implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setClient($client) { - if (is_null($client)) { throw new \InvalidArgumentException('non-nullable client cannot be null'); } - $this->container['client'] = $client; return $this; diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/DeprecatedObject.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/DeprecatedObject.php index 89f357fa31..a6236d1ed7 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/DeprecatedObject.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/DeprecatedObject.php @@ -308,11 +308,9 @@ class DeprecatedObject implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setName($name) { - if (is_null($name)) { throw new \InvalidArgumentException('non-nullable name cannot be null'); } - $this->container['name'] = $name; return $this; diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php index 9a6f314555..4dca9f5051 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php @@ -302,11 +302,9 @@ class Dog extends Animal */ public function setBreed($breed) { - if (is_null($breed)) { throw new \InvalidArgumentException('non-nullable breed cannot be null'); } - $this->container['breed'] = $breed; return $this; diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/DogAllOf.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/DogAllOf.php index 381f28c52f..10016b86d3 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/DogAllOf.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/DogAllOf.php @@ -308,11 +308,9 @@ class DogAllOf implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setBreed($breed) { - if (is_null($breed)) { throw new \InvalidArgumentException('non-nullable breed cannot be null'); } - $this->container['breed'] = $breed; return $this; diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php index a4dce3cd46..b460781dc7 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php @@ -354,8 +354,11 @@ class EnumArrays implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setJustSymbol($just_symbol) { + if (is_null($just_symbol)) { + throw new \InvalidArgumentException('non-nullable just_symbol cannot be null'); + } $allowedValues = $this->getJustSymbolAllowableValues(); - if (!is_null($just_symbol) && !in_array($just_symbol, $allowedValues, true)) { + if (!in_array($just_symbol, $allowedValues, true)) { throw new \InvalidArgumentException( sprintf( "Invalid value '%s' for 'just_symbol', must be one of '%s'", @@ -364,11 +367,6 @@ class EnumArrays implements ModelInterface, ArrayAccess, \JsonSerializable ) ); } - - if (is_null($just_symbol)) { - throw new \InvalidArgumentException('non-nullable just_symbol cannot be null'); - } - $this->container['just_symbol'] = $just_symbol; return $this; @@ -393,8 +391,11 @@ class EnumArrays implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setArrayEnum($array_enum) { + if (is_null($array_enum)) { + throw new \InvalidArgumentException('non-nullable array_enum cannot be null'); + } $allowedValues = $this->getArrayEnumAllowableValues(); - if (!is_null($array_enum) && array_diff($array_enum, $allowedValues)) { + if (array_diff($array_enum, $allowedValues)) { throw new \InvalidArgumentException( sprintf( "Invalid value for 'array_enum', must be one of '%s'", @@ -402,11 +403,6 @@ class EnumArrays implements ModelInterface, ArrayAccess, \JsonSerializable ) ); } - - if (is_null($array_enum)) { - throw new \InvalidArgumentException('non-nullable array_enum cannot be null'); - } - $this->container['array_enum'] = $array_enum; return $this; diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php index 48f2761d0b..732ede5483 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php @@ -460,8 +460,11 @@ class EnumTest implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setEnumString($enum_string) { + if (is_null($enum_string)) { + throw new \InvalidArgumentException('non-nullable enum_string cannot be null'); + } $allowedValues = $this->getEnumStringAllowableValues(); - if (!is_null($enum_string) && !in_array($enum_string, $allowedValues, true)) { + if (!in_array($enum_string, $allowedValues, true)) { throw new \InvalidArgumentException( sprintf( "Invalid value '%s' for 'enum_string', must be one of '%s'", @@ -470,11 +473,6 @@ class EnumTest implements ModelInterface, ArrayAccess, \JsonSerializable ) ); } - - if (is_null($enum_string)) { - throw new \InvalidArgumentException('non-nullable enum_string cannot be null'); - } - $this->container['enum_string'] = $enum_string; return $this; @@ -499,6 +497,9 @@ class EnumTest implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setEnumStringRequired($enum_string_required) { + if (is_null($enum_string_required)) { + throw new \InvalidArgumentException('non-nullable enum_string_required cannot be null'); + } $allowedValues = $this->getEnumStringRequiredAllowableValues(); if (!in_array($enum_string_required, $allowedValues, true)) { throw new \InvalidArgumentException( @@ -509,11 +510,6 @@ class EnumTest implements ModelInterface, ArrayAccess, \JsonSerializable ) ); } - - if (is_null($enum_string_required)) { - throw new \InvalidArgumentException('non-nullable enum_string_required cannot be null'); - } - $this->container['enum_string_required'] = $enum_string_required; return $this; @@ -538,8 +534,11 @@ class EnumTest implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setEnumInteger($enum_integer) { + if (is_null($enum_integer)) { + throw new \InvalidArgumentException('non-nullable enum_integer cannot be null'); + } $allowedValues = $this->getEnumIntegerAllowableValues(); - if (!is_null($enum_integer) && !in_array($enum_integer, $allowedValues, true)) { + if (!in_array($enum_integer, $allowedValues, true)) { throw new \InvalidArgumentException( sprintf( "Invalid value '%s' for 'enum_integer', must be one of '%s'", @@ -548,11 +547,6 @@ class EnumTest implements ModelInterface, ArrayAccess, \JsonSerializable ) ); } - - if (is_null($enum_integer)) { - throw new \InvalidArgumentException('non-nullable enum_integer cannot be null'); - } - $this->container['enum_integer'] = $enum_integer; return $this; @@ -577,8 +571,11 @@ class EnumTest implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setEnumNumber($enum_number) { + if (is_null($enum_number)) { + throw new \InvalidArgumentException('non-nullable enum_number cannot be null'); + } $allowedValues = $this->getEnumNumberAllowableValues(); - if (!is_null($enum_number) && !in_array($enum_number, $allowedValues, true)) { + if (!in_array($enum_number, $allowedValues, true)) { throw new \InvalidArgumentException( sprintf( "Invalid value '%s' for 'enum_number', must be one of '%s'", @@ -587,11 +584,6 @@ class EnumTest implements ModelInterface, ArrayAccess, \JsonSerializable ) ); } - - if (is_null($enum_number)) { - throw new \InvalidArgumentException('non-nullable enum_number cannot be null'); - } - $this->container['enum_number'] = $enum_number; return $this; @@ -616,7 +608,6 @@ class EnumTest implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setOuterEnum($outer_enum) { - if (is_null($outer_enum)) { array_push($this->openAPINullablesSetToNull, 'outer_enum'); } else { @@ -627,7 +618,6 @@ class EnumTest implements ModelInterface, ArrayAccess, \JsonSerializable $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['outer_enum'] = $outer_enum; return $this; @@ -652,11 +642,9 @@ class EnumTest implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setOuterEnumInteger($outer_enum_integer) { - if (is_null($outer_enum_integer)) { throw new \InvalidArgumentException('non-nullable outer_enum_integer cannot be null'); } - $this->container['outer_enum_integer'] = $outer_enum_integer; return $this; @@ -681,11 +669,9 @@ class EnumTest implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setOuterEnumDefaultValue($outer_enum_default_value) { - if (is_null($outer_enum_default_value)) { throw new \InvalidArgumentException('non-nullable outer_enum_default_value cannot be null'); } - $this->container['outer_enum_default_value'] = $outer_enum_default_value; return $this; @@ -710,11 +696,9 @@ class EnumTest implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setOuterEnumIntegerDefaultValue($outer_enum_integer_default_value) { - if (is_null($outer_enum_integer_default_value)) { throw new \InvalidArgumentException('non-nullable outer_enum_integer_default_value cannot be null'); } - $this->container['outer_enum_integer_default_value'] = $outer_enum_integer_default_value; return $this; diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/File.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/File.php index cddd9e67e5..5261e068f9 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/File.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/File.php @@ -309,11 +309,9 @@ class File implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setSourceUri($source_uri) { - if (is_null($source_uri)) { throw new \InvalidArgumentException('non-nullable source_uri cannot be null'); } - $this->container['source_uri'] = $source_uri; return $this; diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FileSchemaTestClass.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FileSchemaTestClass.php index 8e95875e10..d8220a4c89 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FileSchemaTestClass.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FileSchemaTestClass.php @@ -315,11 +315,9 @@ class FileSchemaTestClass implements ModelInterface, ArrayAccess, \JsonSerializa */ public function setFile($file) { - if (is_null($file)) { throw new \InvalidArgumentException('non-nullable file cannot be null'); } - $this->container['file'] = $file; return $this; @@ -344,11 +342,9 @@ class FileSchemaTestClass implements ModelInterface, ArrayAccess, \JsonSerializa */ public function setFiles($files) { - if (is_null($files)) { throw new \InvalidArgumentException('non-nullable files cannot be null'); } - $this->container['files'] = $files; return $this; diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Foo.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Foo.php index 3b72445bae..407e15edb3 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Foo.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Foo.php @@ -308,11 +308,9 @@ class Foo implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setBar($bar) { - if (is_null($bar)) { throw new \InvalidArgumentException('non-nullable bar cannot be null'); } - $this->container['bar'] = $bar; return $this; diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FooGetDefaultResponse.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FooGetDefaultResponse.php index 0bf9ecabb2..fed1ba7e47 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FooGetDefaultResponse.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FooGetDefaultResponse.php @@ -308,11 +308,9 @@ class FooGetDefaultResponse implements ModelInterface, ArrayAccess, \JsonSeriali */ public function setString($string) { - if (is_null($string)) { throw new \InvalidArgumentException('non-nullable string cannot be null'); } - $this->container['string'] = $string; return $this; diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php index 5d663a560a..3a1232107c 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php @@ -485,19 +485,17 @@ class FormatTest implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setInteger($integer) { - - if (!is_null($integer) && ($integer > 100)) { - throw new \InvalidArgumentException('invalid value for $integer when calling FormatTest., must be smaller than or equal to 100.'); - } - if (!is_null($integer) && ($integer < 10)) { - throw new \InvalidArgumentException('invalid value for $integer when calling FormatTest., must be bigger than or equal to 10.'); - } - - if (is_null($integer)) { throw new \InvalidArgumentException('non-nullable integer cannot be null'); } + if (($integer > 100)) { + throw new \InvalidArgumentException('invalid value for $integer when calling FormatTest., must be smaller than or equal to 100.'); + } + if (($integer < 10)) { + throw new \InvalidArgumentException('invalid value for $integer when calling FormatTest., must be bigger than or equal to 10.'); + } + $this->container['integer'] = $integer; return $this; @@ -522,19 +520,17 @@ class FormatTest implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setInt32($int32) { - - if (!is_null($int32) && ($int32 > 200)) { - throw new \InvalidArgumentException('invalid value for $int32 when calling FormatTest., must be smaller than or equal to 200.'); - } - if (!is_null($int32) && ($int32 < 20)) { - throw new \InvalidArgumentException('invalid value for $int32 when calling FormatTest., must be bigger than or equal to 20.'); - } - - if (is_null($int32)) { throw new \InvalidArgumentException('non-nullable int32 cannot be null'); } + if (($int32 > 200)) { + throw new \InvalidArgumentException('invalid value for $int32 when calling FormatTest., must be smaller than or equal to 200.'); + } + if (($int32 < 20)) { + throw new \InvalidArgumentException('invalid value for $int32 when calling FormatTest., must be bigger than or equal to 20.'); + } + $this->container['int32'] = $int32; return $this; @@ -559,11 +555,9 @@ class FormatTest implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setInt64($int64) { - if (is_null($int64)) { throw new \InvalidArgumentException('non-nullable int64 cannot be null'); } - $this->container['int64'] = $int64; return $this; @@ -588,6 +582,9 @@ class FormatTest implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setNumber($number) { + if (is_null($number)) { + throw new \InvalidArgumentException('non-nullable number cannot be null'); + } if (($number > 543.2)) { throw new \InvalidArgumentException('invalid value for $number when calling FormatTest., must be smaller than or equal to 543.2.'); @@ -596,11 +593,6 @@ class FormatTest implements ModelInterface, ArrayAccess, \JsonSerializable throw new \InvalidArgumentException('invalid value for $number when calling FormatTest., must be bigger than or equal to 32.1.'); } - - if (is_null($number)) { - throw new \InvalidArgumentException('non-nullable number cannot be null'); - } - $this->container['number'] = $number; return $this; @@ -625,19 +617,17 @@ class FormatTest implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setFloat($float) { - - if (!is_null($float) && ($float > 987.6)) { - throw new \InvalidArgumentException('invalid value for $float when calling FormatTest., must be smaller than or equal to 987.6.'); - } - if (!is_null($float) && ($float < 54.3)) { - throw new \InvalidArgumentException('invalid value for $float when calling FormatTest., must be bigger than or equal to 54.3.'); - } - - if (is_null($float)) { throw new \InvalidArgumentException('non-nullable float cannot be null'); } + if (($float > 987.6)) { + throw new \InvalidArgumentException('invalid value for $float when calling FormatTest., must be smaller than or equal to 987.6.'); + } + if (($float < 54.3)) { + throw new \InvalidArgumentException('invalid value for $float when calling FormatTest., must be bigger than or equal to 54.3.'); + } + $this->container['float'] = $float; return $this; @@ -662,19 +652,17 @@ class FormatTest implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setDouble($double) { - - if (!is_null($double) && ($double > 123.4)) { - throw new \InvalidArgumentException('invalid value for $double when calling FormatTest., must be smaller than or equal to 123.4.'); - } - if (!is_null($double) && ($double < 67.8)) { - throw new \InvalidArgumentException('invalid value for $double when calling FormatTest., must be bigger than or equal to 67.8.'); - } - - if (is_null($double)) { throw new \InvalidArgumentException('non-nullable double cannot be null'); } + if (($double > 123.4)) { + throw new \InvalidArgumentException('invalid value for $double when calling FormatTest., must be smaller than or equal to 123.4.'); + } + if (($double < 67.8)) { + throw new \InvalidArgumentException('invalid value for $double when calling FormatTest., must be bigger than or equal to 67.8.'); + } + $this->container['double'] = $double; return $this; @@ -699,11 +687,9 @@ class FormatTest implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setDecimal($decimal) { - if (is_null($decimal)) { throw new \InvalidArgumentException('non-nullable decimal cannot be null'); } - $this->container['decimal'] = $decimal; return $this; @@ -728,16 +714,14 @@ class FormatTest implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setString($string) { - - if (!is_null($string) && (!preg_match("/[a-z]/i", $string))) { - throw new \InvalidArgumentException("invalid value for \$string when calling FormatTest., must conform to the pattern /[a-z]/i."); - } - - if (is_null($string)) { throw new \InvalidArgumentException('non-nullable string cannot be null'); } + if ((!preg_match("/[a-z]/i", $string))) { + throw new \InvalidArgumentException("invalid value for \$string when calling FormatTest., must conform to the pattern /[a-z]/i."); + } + $this->container['string'] = $string; return $this; @@ -762,11 +746,9 @@ class FormatTest implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setByte($byte) { - if (is_null($byte)) { throw new \InvalidArgumentException('non-nullable byte cannot be null'); } - $this->container['byte'] = $byte; return $this; @@ -791,11 +773,9 @@ class FormatTest implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setBinary($binary) { - if (is_null($binary)) { throw new \InvalidArgumentException('non-nullable binary cannot be null'); } - $this->container['binary'] = $binary; return $this; @@ -820,11 +800,9 @@ class FormatTest implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setDate($date) { - if (is_null($date)) { throw new \InvalidArgumentException('non-nullable date cannot be null'); } - $this->container['date'] = $date; return $this; @@ -849,11 +827,9 @@ class FormatTest implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setDateTime($date_time) { - if (is_null($date_time)) { throw new \InvalidArgumentException('non-nullable date_time cannot be null'); } - $this->container['date_time'] = $date_time; return $this; @@ -878,11 +854,9 @@ class FormatTest implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setUuid($uuid) { - if (is_null($uuid)) { throw new \InvalidArgumentException('non-nullable uuid cannot be null'); } - $this->container['uuid'] = $uuid; return $this; @@ -907,6 +881,9 @@ class FormatTest implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setPassword($password) { + if (is_null($password)) { + throw new \InvalidArgumentException('non-nullable password cannot be null'); + } if ((mb_strlen($password) > 64)) { throw new \InvalidArgumentException('invalid length for $password when calling FormatTest., must be smaller than or equal to 64.'); } @@ -914,11 +891,6 @@ class FormatTest implements ModelInterface, ArrayAccess, \JsonSerializable throw new \InvalidArgumentException('invalid length for $password when calling FormatTest., must be bigger than or equal to 10.'); } - - if (is_null($password)) { - throw new \InvalidArgumentException('non-nullable password cannot be null'); - } - $this->container['password'] = $password; return $this; @@ -943,16 +915,14 @@ class FormatTest implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setPatternWithDigits($pattern_with_digits) { - - if (!is_null($pattern_with_digits) && (!preg_match("/^\\d{10}$/", $pattern_with_digits))) { - throw new \InvalidArgumentException("invalid value for \$pattern_with_digits when calling FormatTest., must conform to the pattern /^\\d{10}$/."); - } - - if (is_null($pattern_with_digits)) { throw new \InvalidArgumentException('non-nullable pattern_with_digits cannot be null'); } + if ((!preg_match("/^\\d{10}$/", $pattern_with_digits))) { + throw new \InvalidArgumentException("invalid value for \$pattern_with_digits when calling FormatTest., must conform to the pattern /^\\d{10}$/."); + } + $this->container['pattern_with_digits'] = $pattern_with_digits; return $this; @@ -977,16 +947,14 @@ class FormatTest implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setPatternWithDigitsAndDelimiter($pattern_with_digits_and_delimiter) { - - if (!is_null($pattern_with_digits_and_delimiter) && (!preg_match("/^image_\\d{1,3}$/i", $pattern_with_digits_and_delimiter))) { - throw new \InvalidArgumentException("invalid value for \$pattern_with_digits_and_delimiter when calling FormatTest., must conform to the pattern /^image_\\d{1,3}$/i."); - } - - if (is_null($pattern_with_digits_and_delimiter)) { throw new \InvalidArgumentException('non-nullable pattern_with_digits_and_delimiter cannot be null'); } + if ((!preg_match("/^image_\\d{1,3}$/i", $pattern_with_digits_and_delimiter))) { + throw new \InvalidArgumentException("invalid value for \$pattern_with_digits_and_delimiter when calling FormatTest., must conform to the pattern /^image_\\d{1,3}$/i."); + } + $this->container['pattern_with_digits_and_delimiter'] = $pattern_with_digits_and_delimiter; return $this; diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php index 6c1ebb236c..4e5d9667a1 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php @@ -315,11 +315,9 @@ class HasOnlyReadOnly implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setBar($bar) { - if (is_null($bar)) { throw new \InvalidArgumentException('non-nullable bar cannot be null'); } - $this->container['bar'] = $bar; return $this; @@ -344,11 +342,9 @@ class HasOnlyReadOnly implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setFoo($foo) { - if (is_null($foo)) { throw new \InvalidArgumentException('non-nullable foo cannot be null'); } - $this->container['foo'] = $foo; return $this; diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HealthCheckResult.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HealthCheckResult.php index ceb2e3dc96..ab66586a7d 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HealthCheckResult.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HealthCheckResult.php @@ -309,7 +309,6 @@ class HealthCheckResult implements ModelInterface, ArrayAccess, \JsonSerializabl */ public function setNullableMessage($nullable_message) { - if (is_null($nullable_message)) { array_push($this->openAPINullablesSetToNull, 'nullable_message'); } else { @@ -320,7 +319,6 @@ class HealthCheckResult implements ModelInterface, ArrayAccess, \JsonSerializabl $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['nullable_message'] = $nullable_message; return $this; diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php index 77ef369970..d342581b3d 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php @@ -344,11 +344,9 @@ class MapTest implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setMapMapOfString($map_map_of_string) { - if (is_null($map_map_of_string)) { throw new \InvalidArgumentException('non-nullable map_map_of_string cannot be null'); } - $this->container['map_map_of_string'] = $map_map_of_string; return $this; @@ -373,8 +371,11 @@ class MapTest implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setMapOfEnumString($map_of_enum_string) { + if (is_null($map_of_enum_string)) { + throw new \InvalidArgumentException('non-nullable map_of_enum_string cannot be null'); + } $allowedValues = $this->getMapOfEnumStringAllowableValues(); - if (!is_null($map_of_enum_string) && array_diff($map_of_enum_string, $allowedValues)) { + if (array_diff($map_of_enum_string, $allowedValues)) { throw new \InvalidArgumentException( sprintf( "Invalid value for 'map_of_enum_string', must be one of '%s'", @@ -382,11 +383,6 @@ class MapTest implements ModelInterface, ArrayAccess, \JsonSerializable ) ); } - - if (is_null($map_of_enum_string)) { - throw new \InvalidArgumentException('non-nullable map_of_enum_string cannot be null'); - } - $this->container['map_of_enum_string'] = $map_of_enum_string; return $this; @@ -411,11 +407,9 @@ class MapTest implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setDirectMap($direct_map) { - if (is_null($direct_map)) { throw new \InvalidArgumentException('non-nullable direct_map cannot be null'); } - $this->container['direct_map'] = $direct_map; return $this; @@ -440,11 +434,9 @@ class MapTest implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setIndirectMap($indirect_map) { - if (is_null($indirect_map)) { throw new \InvalidArgumentException('non-nullable indirect_map cannot be null'); } - $this->container['indirect_map'] = $indirect_map; return $this; diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php index 64c477b8e8..949822112e 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php @@ -322,11 +322,9 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, Arr */ public function setUuid($uuid) { - if (is_null($uuid)) { throw new \InvalidArgumentException('non-nullable uuid cannot be null'); } - $this->container['uuid'] = $uuid; return $this; @@ -351,11 +349,9 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, Arr */ public function setDateTime($date_time) { - if (is_null($date_time)) { throw new \InvalidArgumentException('non-nullable date_time cannot be null'); } - $this->container['date_time'] = $date_time; return $this; @@ -380,11 +376,9 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, Arr */ public function setMap($map) { - if (is_null($map)) { throw new \InvalidArgumentException('non-nullable map cannot be null'); } - $this->container['map'] = $map; return $this; diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php index 3a748b33e5..39fa7f6676 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php @@ -316,11 +316,9 @@ class Model200Response implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setName($name) { - if (is_null($name)) { throw new \InvalidArgumentException('non-nullable name cannot be null'); } - $this->container['name'] = $name; return $this; @@ -345,11 +343,9 @@ class Model200Response implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setClass($class) { - if (is_null($class)) { throw new \InvalidArgumentException('non-nullable class cannot be null'); } - $this->container['class'] = $class; return $this; diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php index b19a6627a4..54e8d8248e 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php @@ -308,11 +308,9 @@ class ModelList implements ModelInterface, ArrayAccess, \JsonSerializable */ public function set123List($_123_list) { - if (is_null($_123_list)) { throw new \InvalidArgumentException('non-nullable _123_list cannot be null'); } - $this->container['_123_list'] = $_123_list; return $this; diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php index a6daf5654e..4a8c14cce7 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php @@ -309,11 +309,9 @@ class ModelReturn implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setReturn($return) { - if (is_null($return)) { throw new \InvalidArgumentException('non-nullable return cannot be null'); } - $this->container['return'] = $return; return $this; diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php index 7884a02677..d73ef90293 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php @@ -333,11 +333,9 @@ class Name implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setName($name) { - if (is_null($name)) { throw new \InvalidArgumentException('non-nullable name cannot be null'); } - $this->container['name'] = $name; return $this; @@ -362,11 +360,9 @@ class Name implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setSnakeCase($snake_case) { - if (is_null($snake_case)) { throw new \InvalidArgumentException('non-nullable snake_case cannot be null'); } - $this->container['snake_case'] = $snake_case; return $this; @@ -391,11 +387,9 @@ class Name implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setProperty($property) { - if (is_null($property)) { throw new \InvalidArgumentException('non-nullable property cannot be null'); } - $this->container['property'] = $property; return $this; @@ -420,11 +414,9 @@ class Name implements ModelInterface, ArrayAccess, \JsonSerializable */ public function set123Number($_123_number) { - if (is_null($_123_number)) { throw new \InvalidArgumentException('non-nullable _123_number cannot be null'); } - $this->container['_123_number'] = $_123_number; return $this; diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NullableClass.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NullableClass.php index 1e581fd54d..c0c279f436 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NullableClass.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NullableClass.php @@ -385,7 +385,6 @@ class NullableClass implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setIntegerProp($integer_prop) { - if (is_null($integer_prop)) { array_push($this->openAPINullablesSetToNull, 'integer_prop'); } else { @@ -396,7 +395,6 @@ class NullableClass implements ModelInterface, ArrayAccess, \JsonSerializable $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['integer_prop'] = $integer_prop; return $this; @@ -421,7 +419,6 @@ class NullableClass implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setNumberProp($number_prop) { - if (is_null($number_prop)) { array_push($this->openAPINullablesSetToNull, 'number_prop'); } else { @@ -432,7 +429,6 @@ class NullableClass implements ModelInterface, ArrayAccess, \JsonSerializable $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['number_prop'] = $number_prop; return $this; @@ -457,7 +453,6 @@ class NullableClass implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setBooleanProp($boolean_prop) { - if (is_null($boolean_prop)) { array_push($this->openAPINullablesSetToNull, 'boolean_prop'); } else { @@ -468,7 +463,6 @@ class NullableClass implements ModelInterface, ArrayAccess, \JsonSerializable $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['boolean_prop'] = $boolean_prop; return $this; @@ -493,7 +487,6 @@ class NullableClass implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setStringProp($string_prop) { - if (is_null($string_prop)) { array_push($this->openAPINullablesSetToNull, 'string_prop'); } else { @@ -504,7 +497,6 @@ class NullableClass implements ModelInterface, ArrayAccess, \JsonSerializable $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['string_prop'] = $string_prop; return $this; @@ -529,7 +521,6 @@ class NullableClass implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setDateProp($date_prop) { - if (is_null($date_prop)) { array_push($this->openAPINullablesSetToNull, 'date_prop'); } else { @@ -540,7 +531,6 @@ class NullableClass implements ModelInterface, ArrayAccess, \JsonSerializable $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['date_prop'] = $date_prop; return $this; @@ -565,7 +555,6 @@ class NullableClass implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setDatetimeProp($datetime_prop) { - if (is_null($datetime_prop)) { array_push($this->openAPINullablesSetToNull, 'datetime_prop'); } else { @@ -576,7 +565,6 @@ class NullableClass implements ModelInterface, ArrayAccess, \JsonSerializable $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['datetime_prop'] = $datetime_prop; return $this; @@ -601,7 +589,6 @@ class NullableClass implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setArrayNullableProp($array_nullable_prop) { - if (is_null($array_nullable_prop)) { array_push($this->openAPINullablesSetToNull, 'array_nullable_prop'); } else { @@ -612,7 +599,6 @@ class NullableClass implements ModelInterface, ArrayAccess, \JsonSerializable $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['array_nullable_prop'] = $array_nullable_prop; return $this; @@ -637,7 +623,6 @@ class NullableClass implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setArrayAndItemsNullableProp($array_and_items_nullable_prop) { - if (is_null($array_and_items_nullable_prop)) { array_push($this->openAPINullablesSetToNull, 'array_and_items_nullable_prop'); } else { @@ -648,7 +633,6 @@ class NullableClass implements ModelInterface, ArrayAccess, \JsonSerializable $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['array_and_items_nullable_prop'] = $array_and_items_nullable_prop; return $this; @@ -673,11 +657,9 @@ class NullableClass implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setArrayItemsNullable($array_items_nullable) { - if (is_null($array_items_nullable)) { throw new \InvalidArgumentException('non-nullable array_items_nullable cannot be null'); } - $this->container['array_items_nullable'] = $array_items_nullable; return $this; @@ -702,7 +684,6 @@ class NullableClass implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setObjectNullableProp($object_nullable_prop) { - if (is_null($object_nullable_prop)) { array_push($this->openAPINullablesSetToNull, 'object_nullable_prop'); } else { @@ -713,7 +694,6 @@ class NullableClass implements ModelInterface, ArrayAccess, \JsonSerializable $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['object_nullable_prop'] = $object_nullable_prop; return $this; @@ -738,7 +718,6 @@ class NullableClass implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setObjectAndItemsNullableProp($object_and_items_nullable_prop) { - if (is_null($object_and_items_nullable_prop)) { array_push($this->openAPINullablesSetToNull, 'object_and_items_nullable_prop'); } else { @@ -749,7 +728,6 @@ class NullableClass implements ModelInterface, ArrayAccess, \JsonSerializable $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - $this->container['object_and_items_nullable_prop'] = $object_and_items_nullable_prop; return $this; @@ -774,11 +752,9 @@ class NullableClass implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setObjectItemsNullable($object_items_nullable) { - if (is_null($object_items_nullable)) { throw new \InvalidArgumentException('non-nullable object_items_nullable cannot be null'); } - $this->container['object_items_nullable'] = $object_items_nullable; return $this; diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php index 58170b216d..ccf2473be2 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php @@ -308,11 +308,9 @@ class NumberOnly implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setJustNumber($just_number) { - if (is_null($just_number)) { throw new \InvalidArgumentException('non-nullable just_number cannot be null'); } - $this->container['just_number'] = $just_number; return $this; diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ObjectWithDeprecatedFields.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ObjectWithDeprecatedFields.php index 33804e4992..978dd38bd5 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ObjectWithDeprecatedFields.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ObjectWithDeprecatedFields.php @@ -329,11 +329,9 @@ class ObjectWithDeprecatedFields implements ModelInterface, ArrayAccess, \JsonSe */ public function setUuid($uuid) { - if (is_null($uuid)) { throw new \InvalidArgumentException('non-nullable uuid cannot be null'); } - $this->container['uuid'] = $uuid; return $this; @@ -360,11 +358,9 @@ class ObjectWithDeprecatedFields implements ModelInterface, ArrayAccess, \JsonSe */ public function setId($id) { - if (is_null($id)) { throw new \InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['id'] = $id; return $this; @@ -391,11 +387,9 @@ class ObjectWithDeprecatedFields implements ModelInterface, ArrayAccess, \JsonSe */ public function setDeprecatedRef($deprecated_ref) { - if (is_null($deprecated_ref)) { throw new \InvalidArgumentException('non-nullable deprecated_ref cannot be null'); } - $this->container['deprecated_ref'] = $deprecated_ref; return $this; @@ -422,11 +416,9 @@ class ObjectWithDeprecatedFields implements ModelInterface, ArrayAccess, \JsonSe */ public function setBars($bars) { - if (is_null($bars)) { throw new \InvalidArgumentException('non-nullable bars cannot be null'); } - $this->container['bars'] = $bars; return $this; diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php index 0f4b29e1dc..f4f93fa088 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php @@ -369,11 +369,9 @@ class Order implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setId($id) { - if (is_null($id)) { throw new \InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['id'] = $id; return $this; @@ -398,11 +396,9 @@ class Order implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setPetId($pet_id) { - if (is_null($pet_id)) { throw new \InvalidArgumentException('non-nullable pet_id cannot be null'); } - $this->container['pet_id'] = $pet_id; return $this; @@ -427,11 +423,9 @@ class Order implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setQuantity($quantity) { - if (is_null($quantity)) { throw new \InvalidArgumentException('non-nullable quantity cannot be null'); } - $this->container['quantity'] = $quantity; return $this; @@ -456,11 +450,9 @@ class Order implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setShipDate($ship_date) { - if (is_null($ship_date)) { throw new \InvalidArgumentException('non-nullable ship_date cannot be null'); } - $this->container['ship_date'] = $ship_date; return $this; @@ -485,8 +477,11 @@ class Order implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setStatus($status) { + if (is_null($status)) { + throw new \InvalidArgumentException('non-nullable status cannot be null'); + } $allowedValues = $this->getStatusAllowableValues(); - if (!is_null($status) && !in_array($status, $allowedValues, true)) { + if (!in_array($status, $allowedValues, true)) { throw new \InvalidArgumentException( sprintf( "Invalid value '%s' for 'status', must be one of '%s'", @@ -495,11 +490,6 @@ class Order implements ModelInterface, ArrayAccess, \JsonSerializable ) ); } - - if (is_null($status)) { - throw new \InvalidArgumentException('non-nullable status cannot be null'); - } - $this->container['status'] = $status; return $this; @@ -524,11 +514,9 @@ class Order implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setComplete($complete) { - if (is_null($complete)) { throw new \InvalidArgumentException('non-nullable complete cannot be null'); } - $this->container['complete'] = $complete; return $this; diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php index 3c9d0db77b..12914baca5 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php @@ -322,11 +322,9 @@ class OuterComposite implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setMyNumber($my_number) { - if (is_null($my_number)) { throw new \InvalidArgumentException('non-nullable my_number cannot be null'); } - $this->container['my_number'] = $my_number; return $this; @@ -351,11 +349,9 @@ class OuterComposite implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setMyString($my_string) { - if (is_null($my_string)) { throw new \InvalidArgumentException('non-nullable my_string cannot be null'); } - $this->container['my_string'] = $my_string; return $this; @@ -380,11 +376,9 @@ class OuterComposite implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setMyBoolean($my_boolean) { - if (is_null($my_boolean)) { throw new \InvalidArgumentException('non-nullable my_boolean cannot be null'); } - $this->container['my_boolean'] = $my_boolean; return $this; diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterObjectWithEnumProperty.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterObjectWithEnumProperty.php index 6c6f6bf419..536394ab96 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterObjectWithEnumProperty.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterObjectWithEnumProperty.php @@ -311,11 +311,9 @@ class OuterObjectWithEnumProperty implements ModelInterface, ArrayAccess, \JsonS */ public function setValue($value) { - if (is_null($value)) { throw new \InvalidArgumentException('non-nullable value cannot be null'); } - $this->container['value'] = $value; return $this; diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php index fb159c67d1..98a5fd4d35 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php @@ -375,11 +375,9 @@ class Pet implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setId($id) { - if (is_null($id)) { throw new \InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['id'] = $id; return $this; @@ -404,11 +402,9 @@ class Pet implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setCategory($category) { - if (is_null($category)) { throw new \InvalidArgumentException('non-nullable category cannot be null'); } - $this->container['category'] = $category; return $this; @@ -433,11 +429,9 @@ class Pet implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setName($name) { - if (is_null($name)) { throw new \InvalidArgumentException('non-nullable name cannot be null'); } - $this->container['name'] = $name; return $this; @@ -462,13 +456,11 @@ class Pet implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setPhotoUrls($photo_urls) { - - - if (is_null($photo_urls)) { throw new \InvalidArgumentException('non-nullable photo_urls cannot be null'); } + $this->container['photo_urls'] = $photo_urls; return $this; @@ -493,11 +485,9 @@ class Pet implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setTags($tags) { - if (is_null($tags)) { throw new \InvalidArgumentException('non-nullable tags cannot be null'); } - $this->container['tags'] = $tags; return $this; @@ -522,8 +512,11 @@ class Pet implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setStatus($status) { + if (is_null($status)) { + throw new \InvalidArgumentException('non-nullable status cannot be null'); + } $allowedValues = $this->getStatusAllowableValues(); - if (!is_null($status) && !in_array($status, $allowedValues, true)) { + if (!in_array($status, $allowedValues, true)) { throw new \InvalidArgumentException( sprintf( "Invalid value '%s' for 'status', must be one of '%s'", @@ -532,11 +525,6 @@ class Pet implements ModelInterface, ArrayAccess, \JsonSerializable ) ); } - - if (is_null($status)) { - throw new \InvalidArgumentException('non-nullable status cannot be null'); - } - $this->container['status'] = $status; return $this; diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php index b1ff1440f8..d19e25f94e 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php @@ -315,11 +315,9 @@ class ReadOnlyFirst implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setBar($bar) { - if (is_null($bar)) { throw new \InvalidArgumentException('non-nullable bar cannot be null'); } - $this->container['bar'] = $bar; return $this; @@ -344,11 +342,9 @@ class ReadOnlyFirst implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setBaz($baz) { - if (is_null($baz)) { throw new \InvalidArgumentException('non-nullable baz cannot be null'); } - $this->container['baz'] = $baz; return $this; diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php index 62926ebe50..bedd77e578 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php @@ -308,11 +308,9 @@ class SpecialModelName implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setSpecialPropertyName($special_property_name) { - if (is_null($special_property_name)) { throw new \InvalidArgumentException('non-nullable special_property_name cannot be null'); } - $this->container['special_property_name'] = $special_property_name; return $this; diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php index 677b235ef6..02735328a1 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php @@ -315,11 +315,9 @@ class Tag implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setId($id) { - if (is_null($id)) { throw new \InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['id'] = $id; return $this; @@ -344,11 +342,9 @@ class Tag implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setName($name) { - if (is_null($name)) { throw new \InvalidArgumentException('non-nullable name cannot be null'); } - $this->container['name'] = $name; return $this; diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/User.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/User.php index e057867304..77555f1c02 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/User.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/User.php @@ -357,11 +357,9 @@ class User implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setId($id) { - if (is_null($id)) { throw new \InvalidArgumentException('non-nullable id cannot be null'); } - $this->container['id'] = $id; return $this; @@ -386,11 +384,9 @@ class User implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setUsername($username) { - if (is_null($username)) { throw new \InvalidArgumentException('non-nullable username cannot be null'); } - $this->container['username'] = $username; return $this; @@ -415,11 +411,9 @@ class User implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setFirstName($first_name) { - if (is_null($first_name)) { throw new \InvalidArgumentException('non-nullable first_name cannot be null'); } - $this->container['first_name'] = $first_name; return $this; @@ -444,11 +438,9 @@ class User implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setLastName($last_name) { - if (is_null($last_name)) { throw new \InvalidArgumentException('non-nullable last_name cannot be null'); } - $this->container['last_name'] = $last_name; return $this; @@ -473,11 +465,9 @@ class User implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setEmail($email) { - if (is_null($email)) { throw new \InvalidArgumentException('non-nullable email cannot be null'); } - $this->container['email'] = $email; return $this; @@ -502,11 +492,9 @@ class User implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setPassword($password) { - if (is_null($password)) { throw new \InvalidArgumentException('non-nullable password cannot be null'); } - $this->container['password'] = $password; return $this; @@ -531,11 +519,9 @@ class User implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setPhone($phone) { - if (is_null($phone)) { throw new \InvalidArgumentException('non-nullable phone cannot be null'); } - $this->container['phone'] = $phone; return $this; @@ -560,11 +546,9 @@ class User implements ModelInterface, ArrayAccess, \JsonSerializable */ public function setUserStatus($user_status) { - if (is_null($user_status)) { throw new \InvalidArgumentException('non-nullable user_status cannot be null'); } - $this->container['user_status'] = $user_status; return $this; From 871eda27314e074898b2a86527bcbc954ad12634 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Tue, 22 Nov 2022 12:35:26 -0500 Subject: [PATCH 037/189] [python] exposes deserialized bodies for non-2XX responses (#14095) * Template update and sample update * Samples regenerated * Adds verification test * Template update * Samples regen, fixes exception instantiation --- .../main/resources/python/endpoint.handlebars | 6 ++- .../resources/python/exceptions.handlebars | 35 ++++++++----- ...odels-for-testing-with-http-signature.yaml | 4 ++ .../python/unit_test_api/exceptions.py | 35 ++++++++----- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../python/dynamic_servers/exceptions.py | 35 ++++++++----- .../dynamic_servers/paths/custom/get.py | 6 ++- .../dynamic_servers/paths/custom/get.pyi | 6 ++- .../dynamic_servers/paths/default/get.py | 6 ++- .../dynamic_servers/paths/default/get.pyi | 6 ++- .../petstore/python/docs/apis/tags/FakeApi.md | 10 +++- .../python/petstore_api/exceptions.py | 35 ++++++++----- .../paths/another_fake_dummy/patch.py | 6 ++- .../paths/another_fake_dummy/patch.pyi | 6 ++- .../python/petstore_api/paths/fake/delete.py | 6 ++- .../python/petstore_api/paths/fake/delete.pyi | 6 ++- .../python/petstore_api/paths/fake/get.py | 38 +++++++++++++- .../python/petstore_api/paths/fake/get.pyi | 38 +++++++++++++- .../python/petstore_api/paths/fake/patch.py | 6 ++- .../python/petstore_api/paths/fake/patch.pyi | 6 ++- .../python/petstore_api/paths/fake/post.py | 6 ++- .../python/petstore_api/paths/fake/post.pyi | 6 ++- .../get.py | 6 ++- .../get.pyi | 6 ++- .../paths/fake_body_with_file_schema/put.py | 6 ++- .../paths/fake_body_with_file_schema/put.pyi | 6 ++- .../paths/fake_body_with_query_params/put.py | 6 ++- .../paths/fake_body_with_query_params/put.pyi | 6 ++- .../paths/fake_case_sensitive_params/put.py | 6 ++- .../paths/fake_case_sensitive_params/put.pyi | 6 ++- .../paths/fake_classname_test/patch.py | 6 ++- .../paths/fake_classname_test/patch.pyi | 6 ++- .../paths/fake_delete_coffee_id/delete.py | 6 ++- .../paths/fake_delete_coffee_id/delete.pyi | 6 ++- .../petstore_api/paths/fake_health/get.py | 6 ++- .../petstore_api/paths/fake_health/get.pyi | 6 ++- .../fake_inline_additional_properties/post.py | 6 ++- .../post.pyi | 6 ++- .../paths/fake_inline_composition_/post.py | 6 ++- .../paths/fake_inline_composition_/post.pyi | 6 ++- .../paths/fake_json_form_data/get.py | 6 ++- .../paths/fake_json_form_data/get.pyi | 6 ++- .../paths/fake_json_patch/patch.py | 6 ++- .../paths/fake_json_patch/patch.pyi | 6 ++- .../paths/fake_json_with_charset/post.py | 6 ++- .../paths/fake_json_with_charset/post.pyi | 6 ++- .../paths/fake_obj_in_query/get.py | 6 ++- .../paths/fake_obj_in_query/get.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../get.py | 6 ++- .../get.pyi | 6 ++- .../paths/fake_ref_obj_in_query/get.py | 6 ++- .../paths/fake_ref_obj_in_query/get.pyi | 6 ++- .../paths/fake_refs_array_of_enums/post.py | 6 ++- .../paths/fake_refs_array_of_enums/post.pyi | 6 ++- .../paths/fake_refs_arraymodel/post.py | 6 ++- .../paths/fake_refs_arraymodel/post.pyi | 6 ++- .../paths/fake_refs_boolean/post.py | 6 ++- .../paths/fake_refs_boolean/post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../petstore_api/paths/fake_refs_enum/post.py | 6 ++- .../paths/fake_refs_enum/post.pyi | 6 ++- .../paths/fake_refs_mammal/post.py | 6 ++- .../paths/fake_refs_mammal/post.pyi | 6 ++- .../paths/fake_refs_number/post.py | 6 ++- .../paths/fake_refs_number/post.pyi | 6 ++- .../post.py | 6 ++- .../post.pyi | 6 ++- .../paths/fake_refs_string/post.py | 6 ++- .../paths/fake_refs_string/post.pyi | 6 ++- .../paths/fake_response_without_schema/get.py | 6 ++- .../fake_response_without_schema/get.pyi | 6 ++- .../paths/fake_test_query_parameters/put.py | 6 ++- .../paths/fake_test_query_parameters/put.pyi | 6 ++- .../paths/fake_upload_download_file/post.py | 6 ++- .../paths/fake_upload_download_file/post.pyi | 6 ++- .../paths/fake_upload_file/post.py | 6 ++- .../paths/fake_upload_file/post.pyi | 6 ++- .../paths/fake_upload_files/post.py | 6 ++- .../paths/fake_upload_files/post.pyi | 6 ++- .../python/petstore_api/paths/foo/get.py | 6 ++- .../python/petstore_api/paths/foo/get.pyi | 6 ++- .../python/petstore_api/paths/pet/post.py | 6 ++- .../python/petstore_api/paths/pet/post.pyi | 6 ++- .../python/petstore_api/paths/pet/put.py | 6 ++- .../python/petstore_api/paths/pet/put.pyi | 6 ++- .../paths/pet_find_by_status/get.py | 6 ++- .../paths/pet_find_by_status/get.pyi | 6 ++- .../paths/pet_find_by_tags/get.py | 6 ++- .../paths/pet_find_by_tags/get.pyi | 6 ++- .../petstore_api/paths/pet_pet_id/delete.py | 6 ++- .../petstore_api/paths/pet_pet_id/delete.pyi | 6 ++- .../petstore_api/paths/pet_pet_id/get.py | 6 ++- .../petstore_api/paths/pet_pet_id/get.pyi | 6 ++- .../petstore_api/paths/pet_pet_id/post.py | 6 ++- .../petstore_api/paths/pet_pet_id/post.pyi | 6 ++- .../paths/pet_pet_id_upload_image/post.py | 6 ++- .../paths/pet_pet_id_upload_image/post.pyi | 6 ++- .../petstore_api/paths/store_inventory/get.py | 6 ++- .../paths/store_inventory/get.pyi | 6 ++- .../petstore_api/paths/store_order/post.py | 6 ++- .../petstore_api/paths/store_order/post.pyi | 6 ++- .../paths/store_order_order_id/delete.py | 6 ++- .../paths/store_order_order_id/delete.pyi | 6 ++- .../paths/store_order_order_id/get.py | 6 ++- .../paths/store_order_order_id/get.pyi | 6 ++- .../python/petstore_api/paths/user/post.py | 6 ++- .../python/petstore_api/paths/user/post.pyi | 6 ++- .../paths/user_create_with_array/post.py | 6 ++- .../paths/user_create_with_array/post.pyi | 6 ++- .../paths/user_create_with_list/post.py | 6 ++- .../paths/user_create_with_list/post.pyi | 6 ++- .../petstore_api/paths/user_login/get.py | 6 ++- .../petstore_api/paths/user_login/get.pyi | 6 ++- .../petstore_api/paths/user_logout/get.py | 6 ++- .../petstore_api/paths/user_logout/get.pyi | 6 ++- .../paths/user_username/delete.py | 6 ++- .../paths/user_username/delete.pyi | 6 ++- .../petstore_api/paths/user_username/get.py | 6 ++- .../petstore_api/paths/user_username/get.pyi | 6 ++- .../petstore_api/paths/user_username/put.py | 6 ++- .../petstore_api/paths/user_username/put.pyi | 6 ++- .../petstore/python/tests_manual/__init__.py | 6 ++- .../test_paths/test_fake/test_get.py | 50 ++++++++++++++++--- 475 files changed, 2550 insertions(+), 526 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/python/endpoint.handlebars b/modules/openapi-generator/src/main/resources/python/endpoint.handlebars index 8190bd78e3..ef06ac56f4 100644 --- a/modules/openapi-generator/src/main/resources/python/endpoint.handlebars +++ b/modules/openapi-generator/src/main/resources/python/endpoint.handlebars @@ -393,7 +393,11 @@ class BaseApi(api_client.Api): {{/if}} if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/modules/openapi-generator/src/main/resources/python/exceptions.handlebars b/modules/openapi-generator/src/main/resources/python/exceptions.handlebars index fa5f753478..68306577b3 100644 --- a/modules/openapi-generator/src/main/resources/python/exceptions.handlebars +++ b/modules/openapi-generator/src/main/resources/python/exceptions.handlebars @@ -1,6 +1,10 @@ # coding: utf-8 {{>partial_header}} +import dataclasses +import typing + +from urllib3._collections import HTTPHeaderDict class OpenApiException(Exception): @@ -90,19 +94,26 @@ class ApiKeyError(OpenApiException, KeyError): super(ApiKeyError, self).__init__(full_msg) -class ApiException(OpenApiException): +T = typing.TypeVar("T") - def __init__(self, status=None, reason=None, api_response: '{{packageName}}.api_client.ApiResponse' = None): - if api_response: - self.status = api_response.response.status - self.reason = api_response.response.reason - self.body = api_response.response.data - self.headers = api_response.response.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None + +@dataclasses.dataclass +class ApiException(OpenApiException, typing.Generic[T]): + status: int + reason: str + api_response: typing.Optional[T] = None + + @property + def body(self) -> typing.Union[str, bytes, None]: + if not self.api_response: + return None + return self.api_response.response.data + + @property + def headers(self) -> typing.Optional[HTTPHeaderDict]: + if not self.api_response: + return None + return self.api_response.response.getheaders() def __str__(self): """Custom error messages for exception""" diff --git a/modules/openapi-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml b/modules/openapi-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml index eb23278db4..07241d9cba 100644 --- a/modules/openapi-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml @@ -655,6 +655,10 @@ paths: description: Success '404': description: Not found + content: + application/json: + schema: + type: object requestBody: content: application/x-www-form-urlencoded: diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/exceptions.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/exceptions.py index 54a51c36ab..983bba8a4c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/exceptions.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/exceptions.py @@ -8,6 +8,10 @@ The version of the OpenAPI document: 0.0.1 Generated by: https://openapi-generator.tech """ +import dataclasses +import typing + +from urllib3._collections import HTTPHeaderDict class OpenApiException(Exception): @@ -97,19 +101,26 @@ class ApiKeyError(OpenApiException, KeyError): super(ApiKeyError, self).__init__(full_msg) -class ApiException(OpenApiException): +T = typing.TypeVar("T") - def __init__(self, status=None, reason=None, api_response: 'unit_test_api.api_client.ApiResponse' = None): - if api_response: - self.status = api_response.response.status - self.reason = api_response.response.reason - self.body = api_response.response.data - self.headers = api_response.response.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None + +@dataclasses.dataclass +class ApiException(OpenApiException, typing.Generic[T]): + status: int + reason: str + api_response: typing.Optional[T] = None + + @property + def body(self) -> typing.Union[str, bytes, None]: + if not self.api_response: + return None + return self.api_response.response.data + + @property + def headers(self) -> typing.Optional[HTTPHeaderDict]: + if not self.api_response: + return None + return self.api_response.response.getheaders() def __str__(self): """Custom error messages for exception""" diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post.py index 51f747166d..5f10a127c2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post.pyi index fb323cc1c8..3ec2f37fae 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post.py index 7be02743e6..00eeab1616 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post.pyi index 8155ff2963..27163ff769 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post.py index f561016356..7a793a714d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post.pyi index 6ba0464fbd..73568bd9c0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post.py index 0e3ae3974b..adc08b4f7f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post.pyi index fea43428f8..8fdd9d8902 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post.py index 053e2d964a..1f658c4553 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post.pyi index e62508b3e2..f2a7c77527 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_request_body/post.py index 89a3a94019..172bf60189 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_request_body/post.pyi index 4deddd781e..c81e5055ca 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post.py index 5bc90d06c4..61eb3a05e5 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post.pyi index f334d8eeb4..4f7e092ea7 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post.py index 0af6bbed3e..9cba8c53f9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post.pyi index b973fab5af..bccddbd496 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post.py index 0598041551..0cb60b25a7 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post.pyi index 19358a62ae..029ae069ae 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post.py index 3d2e11c346..60858c1b0b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post.pyi index 9094994b1f..2c1db93937 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post.py index 427873e471..1acd473d64 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post.pyi index fa64bb7f00..207e2b4c3c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post.py index c47e5a9411..5f4822f1fb 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post.pyi index 3f4116de0f..4d5a90744e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post.py index bc529f7e11..992598d12d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post.pyi index 8b1ea8f8ca..b5537f04bc 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_request_body/post.py index 8e99ee7a3c..22da84f83b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_request_body/post.pyi index 69a0a26d93..98e7a30aa9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post.py index 217369cd91..99ee2f6a39 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post.pyi index bc85fc6cd1..f13723f0bd 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post.py index f08f875b41..a4f42f2250 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post.pyi index fdd3f85a03..e2f21e63ee 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post.py index 7511003b1d..e2842e964d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post.pyi index 672a3a3a6a..bf141c0602 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post.py index db22058d0f..876c36a9cb 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post.py @@ -153,7 +153,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post.pyi index b30d7be40c..ef34a83351 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post.pyi @@ -148,7 +148,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_int_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_int_request_body/post.py index 5d69029a34..583d35bfff 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_int_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_int_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_int_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_int_request_body/post.pyi index 599b4979b6..5667901957 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_int_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_int_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_number_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_number_request_body/post.py index 8e84300e73..c48e51d55a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_number_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_number_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_number_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_number_request_body/post.pyi index 2965ae1919..27e71d6dd4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_number_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_number_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_small_number_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_small_number_request_body/post.py index 668ee59186..dd8a655b0c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_small_number_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_small_number_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_small_number_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_small_number_request_body/post.pyi index adc387a8ea..95e7065dc6 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_small_number_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_small_number_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_date_time_format_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_date_time_format_request_body/post.py index 9b0a98cd78..6298f25e74 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_date_time_format_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_date_time_format_request_body/post.py @@ -176,7 +176,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_date_time_format_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_date_time_format_request_body/post.pyi index dcbd13ab8d..be17f98e07 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_date_time_format_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_date_time_format_request_body/post.pyi @@ -171,7 +171,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_email_format_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_email_format_request_body/post.py index 856d421c6d..32b0322543 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_email_format_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_email_format_request_body/post.py @@ -175,7 +175,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_email_format_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_email_format_request_body/post.pyi index 3946a3bf74..a82ce392e6 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_email_format_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_email_format_request_body/post.pyi @@ -170,7 +170,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post.py index 1d6fde1b75..c87c81e2a4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post.pyi index fc3b37cec2..af8dd7481e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post.py index e54e98dc38..ac32cbc554 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post.pyi index 5dfa978e1f..072bbbbf16 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post.py index abf4252d66..2c83747d7a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post.pyi index ae3cd9c56a..ac4b2d2140 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.py index f13496bc39..fd7cb2b5a7 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.pyi index d2a2fb5b1a..1762519a55 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.py index cdda0d34c5..47c7ab1356 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.pyi index ede86715a9..c6dd660b93 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post.py index dc053602f5..48ade2c132 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post.pyi index 082bb8a018..79d1caa283 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_forbidden_property_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_forbidden_property_request_body/post.py index e1e4462162..91cd9f9852 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_forbidden_property_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_forbidden_property_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_forbidden_property_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_forbidden_property_request_body/post.pyi index 688fcb76f9..43721a059a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_forbidden_property_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_forbidden_property_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_hostname_format_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_hostname_format_request_body/post.py index ef7ce36a48..a02bb9f8b2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_hostname_format_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_hostname_format_request_body/post.py @@ -175,7 +175,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_hostname_format_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_hostname_format_request_body/post.pyi index e07113312d..036aa7a6ad 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_hostname_format_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_hostname_format_request_body/post.pyi @@ -170,7 +170,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post.py index 746839d1cd..74e7fe12eb 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post.py @@ -153,7 +153,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post.pyi index a2d00a4f70..4b50872d23 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post.pyi @@ -148,7 +148,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post.py index a437389877..50b11235a1 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post.pyi index 15c6c30122..7384965014 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post.py index 27ac856881..e448ed1f30 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post.pyi index 00c9f71b02..fc08868773 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv4_format_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv4_format_request_body/post.py index 8941531c90..76be0693c2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv4_format_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv4_format_request_body/post.py @@ -175,7 +175,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv4_format_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv4_format_request_body/post.pyi index 3ceee11abd..29353388c4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv4_format_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv4_format_request_body/post.pyi @@ -170,7 +170,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv6_format_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv6_format_request_body/post.py index 6abd8b3052..d914c92afb 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv6_format_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv6_format_request_body/post.py @@ -175,7 +175,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv6_format_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv6_format_request_body/post.pyi index e871858fd6..73a32e266d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv6_format_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv6_format_request_body/post.pyi @@ -170,7 +170,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post.py index 080abd4531..20b2e21fac 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post.py @@ -175,7 +175,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post.pyi index 72cade7049..7469997aeb 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post.pyi @@ -170,7 +170,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_request_body/post.py index 982f83c735..e5314b9f5b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_request_body/post.pyi index a0723cca70..221f546283 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post.py index fcf0f9c4e2..e82db4f3a8 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post.pyi index 4e5c945af5..c7a3d545fe 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post.py index 08f984ff02..30149f7f35 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post.pyi index a42d2f09c2..4545e992e7 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post.py index d9f0c7ca46..5312eaeead 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post.pyi index b2e42052a3..11014b7559 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post.py index 8df9e45dde..db06be2cee 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post.pyi index 544af50745..63dcf2d5e0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post.py index 67fd2d8ab4..c82334418b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post.pyi index 5119d69b5e..96f125f032 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_request_body/post.py index b1e1c0d227..5d83fb0c68 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_request_body/post.pyi index 0e7fa1996f..4ea64ba9ef 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post.py index 78129065be..99ce543ccd 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post.pyi index c8539721b2..b256a9dbcd 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minitems_validation_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minitems_validation_request_body/post.py index e6282c3f44..e27d10abbc 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minitems_validation_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minitems_validation_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minitems_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minitems_validation_request_body/post.pyi index d755c0d755..9d7d5454f1 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minitems_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minitems_validation_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minlength_validation_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minlength_validation_request_body/post.py index 192b4f1d15..e7fb74b29b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minlength_validation_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minlength_validation_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minlength_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minlength_validation_request_body/post.pyi index 7436c84bb2..cc3eec0671 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minlength_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minlength_validation_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post.py index e616271212..bfa4fac8ea 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post.pyi index 2d4602b4aa..e28e5f4e53 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post.py index 04886b3f9f..9cbc5724df 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post.pyi index ba2e00fa21..ee247b34f9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.py index ddfa4e71d8..11756e5296 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.pyi index b660117c48..92880350b1 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_items_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_items_request_body/post.py index 2072cebde7..e92ec5f89e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_items_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_items_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_items_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_items_request_body/post.pyi index f46fe5841f..ab1ec318a3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_items_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_items_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.py index eeeb6bfee2..3bda141593 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.pyi index fa49ae4894..4fa8b0a428 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post.py index 4b9d4f471a..719decbae1 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post.py @@ -224,7 +224,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post.pyi index e5412ed2f8..dd9a4054ab 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post.pyi @@ -219,7 +219,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_request_body/post.py index 2427ff532b..e7e0e62030 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_request_body/post.py @@ -175,7 +175,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_request_body/post.pyi index 0f838b6761..c1aba246f6 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_request_body/post.pyi @@ -170,7 +170,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post.py index d4b9e53a03..0c7f440c70 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post.pyi index 7445caa5a5..cbf4486797 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.py index c94d8b66af..56b091985c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.py @@ -153,7 +153,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.pyi index 6adc097d24..4da5c4f700 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.pyi @@ -148,7 +148,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post.py index 1ca4120948..1423f64211 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post.py @@ -153,7 +153,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post.pyi index f4f08b5ead..ff7cb65e90 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post.pyi @@ -148,7 +148,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post.py index 6b2af7b5d7..41241c760d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post.pyi index 0a0ecb89fe..95a3ee8230 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post.py index 9458ed3bdb..911273486b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post.py @@ -153,7 +153,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post.pyi index 26a3aa0e9d..a044e862a3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post.pyi @@ -148,7 +148,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post.py index 1e9c85a757..fe4d050911 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post.pyi index 5c61455e78..75c8162380 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_request_body/post.py index bc372832e5..43ccc24930 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_request_body/post.pyi index 78a9a83c94..a97c6e2446 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post.py index 8d00db16b5..e544c6ff49 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post.pyi index 0d4fe45599..a746f7a0d7 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post.py index de00a1e19e..fdbf4b2785 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post.pyi index 2d41910403..d8fc0e2bd0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post.py index e32e6df399..96b14ac5e3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post.pyi index b75ad8f9a9..f8aa54fb07 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post.py index c5120a7acd..6169458755 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post.pyi index 1848470356..d189f268f1 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_validation_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_validation_request_body/post.py index 422b433e46..458054ebee 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_validation_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_validation_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_validation_request_body/post.pyi index d812670966..c39cf9f1a7 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_validation_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post.py index bcc74a2ae9..425ee3cfe0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post.pyi index 1bab1c15f1..7b0d38f7f9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post.py index a176ec4b34..e1358eb351 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post.pyi index ff3985bce8..af7fa38352 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post.py index baae0992b5..2b5b2534ea 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post.pyi index ae66e236ba..e4ec8205ea 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post.py index 32d5d6cba9..490d3d5ca2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post.pyi index 6eddfe043b..7a25423624 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post.py index c61b0c0346..ded6d11068 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post.pyi index 61d129a8cd..862064722c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_items_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_items_request_body/post.py index 3cf5261cef..309a4968e0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_items_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_items_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_items_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_items_request_body/post.pyi index b41e000b84..0acd78196a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_items_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_items_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_not_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_not_request_body/post.py index a2e1e6435a..7b03f7e62f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_not_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_not_request_body/post.py @@ -180,7 +180,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_not_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_not_request_body/post.pyi index 48bf3c1d40..58ea2df248 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_not_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_not_request_body/post.pyi @@ -175,7 +175,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post.py index f1dc48460c..ded54b035d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post.pyi index e3ca8f0a1b..7d6b25b5ce 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_property_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_property_request_body/post.py index bc58c723b4..609b675449 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_property_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_property_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_property_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_property_request_body/post.pyi index 105713baa0..ef76cd1640 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_property_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_property_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_default_validation_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_default_validation_request_body/post.py index b290ef0c3c..81fcb2360b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_default_validation_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_default_validation_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_default_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_default_validation_request_body/post.pyi index 78d8bb0262..1547a9ddbc 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_default_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_default_validation_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_validation_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_validation_request_body/post.py index 31366c3fd8..d63ce6b708 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_validation_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_validation_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_validation_request_body/post.pyi index a0149cd11b..56c39dd895 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_validation_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post.py index 828d01bed2..805ab2b80b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post.pyi index 6490beb525..1f2a9c1946 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post.py index cdbb400dcd..834a8baa08 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post.py @@ -183,7 +183,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post.pyi index e71b565a2b..57aef4b171 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post.pyi @@ -178,7 +178,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post.py index 48ce45ab21..5354e4de1b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post.pyi index b0ba5e5753..effcdc02f2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post.py index 6db3472e65..3b4e644749 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post.py @@ -153,7 +153,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post.pyi index 241d59964c..111d13eadd 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post.pyi @@ -148,7 +148,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post.py index baaf238e68..2f172ee7ea 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post.pyi index 50cbe14533..3c829415e7 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post.py index 2d9e8e8482..84e9b315a2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post.pyi index f1cb3b3ce3..8207e18ee6 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post.py index 75738c8906..b8c23088f9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post.pyi index 471f7aa06b..e07c97b8ad 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_format_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_format_request_body/post.py index 6e73966d5f..cb462b9db7 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_format_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_format_request_body/post.py @@ -175,7 +175,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_format_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_format_request_body/post.pyi index 154e8dbae2..73a3c7ebb3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_format_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_format_request_body/post.pyi @@ -170,7 +170,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post.py index 1458ad9578..c0dc0dbb2a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post.py @@ -175,7 +175,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post.pyi index 28a8d97602..64a2a746e0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post.pyi @@ -170,7 +170,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_template_format_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_template_format_request_body/post.py index 4861fea6f1..faa0919acc 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_template_format_request_body/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_template_format_request_body/post.py @@ -175,7 +175,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_template_format_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_template_format_request_body/post.pyi index 44f6c896b7..c45b03a050 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_template_format_request_body/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_template_format_request_body/post.pyi @@ -170,7 +170,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post.py index 69c763dcab..70aa9f6853 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post.pyi index 2a5e71e5e0..0105fff843 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post.py index 0ef020fde5..5b26f694e8 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post.pyi index 328985f0ee..4401eaf87f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post.py index 39b07dfedb..3bf75bed91 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post.pyi index 02d5712192..4089f55a73 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post.py index 08339309f7..5be612e8e0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post.pyi index 11163b1c9e..bc87bead41 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post.py index 8d431a1610..635afda0db 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post.pyi index a5da83b565..3795a3b74b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post.py index f6c037767d..94a447e495 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post.pyi index 07ec804e20..1dc3c32a9c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post.py index 77f0a396a2..5c4604d196 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post.pyi index 9a539d7789..a139676791 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post.py index 419a5d97d3..1f0985f895 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post.pyi index 2e942812df..77da52c350 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post.py index 84a474e909..da75e06fbb 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post.pyi index 6b727ad4f8..746593975d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post.py index ef1b3dbf40..48101abd1e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post.pyi index ced149513a..908b9e379d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post.py index 4abb4c3a69..bf48f1ab29 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post.pyi index 19ed64f5a3..8c19a4c802 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post.py index b59cf91ebb..ab51977650 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post.pyi index 5df855bcae..19aa76ce14 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post.py index 4b50280b15..ce0cb06e73 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post.pyi index 3403a98626..3587d554fa 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post.py index 0da1f065b4..a9550fa4ef 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post.pyi index 8dfc9079cb..01a0cc7ab6 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post.py index 9eed10462f..1dee133da9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post.pyi index b4114d66b9..e5da7323ab 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post.py index 041597c884..8bc44fe093 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post.pyi index 449cf2d063..d21ca9bc8d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post.py index 3f8cbfe27e..139e56b4a5 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post.pyi index 6a63997778..8747581c8a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post.py index 030b06a8e4..8925a2f124 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post.py @@ -125,7 +125,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post.pyi index 8dd6262f62..a18f80d294 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post.pyi @@ -120,7 +120,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post.py index 7062ed0200..6db4c98f07 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post.pyi index 9a7bbae936..86ce25c36b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post.py index f6af5664d4..74a44f78f2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post.pyi index 974ac449f0..262254f8ea 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post.py index b76bb8fbb9..07beaaff03 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post.pyi index ae36ecd550..885313a334 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post.py index babbaf5e02..548965b138 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post.py @@ -148,7 +148,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post.pyi index 28b79bc2c0..865b451de2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post.pyi @@ -143,7 +143,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post.py index 9c30fddb2f..ee286e283b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post.py @@ -147,7 +147,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post.pyi index 2ded27d082..5c95b25743 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post.pyi @@ -142,7 +142,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post.py index fcaf9122bb..1f6ca70ec9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post.pyi index b6dd3e2415..606fa10bf1 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post.py index cf06ad29be..c19285a5e6 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post.pyi index 3e102004f8..84b4d6043b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post.py index 77cceb12c8..017e502139 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post.pyi index 87ba64d457..7c3a996d64 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.py index 7b99febc2d..b3b63b493d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.pyi index 6456036913..01289282a0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.py index bf9c1ba2b1..b70e8aa05e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.pyi index 89feb1f1b6..ad1aa82192 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.py index 189a0b705d..c8e117992e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.pyi index 4a050af844..7eec1429ac 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post.py index e2b09aead3..5a8d448e35 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post.pyi index 1b146acdf4..b6001e78d2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post.py index 4ce939e768..43a5c9f81a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post.py @@ -147,7 +147,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post.pyi index 18254b405c..1fe8282ca0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post.pyi @@ -142,7 +142,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.py index 1ed8a0920d..3b2afaaedf 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.py @@ -125,7 +125,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.pyi index b00b5c5ec8..87225adca5 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.pyi @@ -120,7 +120,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post.py index 6fe5816765..1d4c909341 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post.pyi index d9e3618aad..a35b8e6627 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post.py index 39b0069e77..578b5d1f05 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post.pyi index c568b3e130..b177c7f62b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post.py index c86d37eecf..30d1288b47 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post.py @@ -147,7 +147,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post.pyi index 5a44c28175..0876cdbf06 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post.pyi @@ -142,7 +142,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post.py index 7bd78b3120..48b02e2d7f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post.py @@ -147,7 +147,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post.pyi index b89bfe9a05..c1f2332964 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post.pyi @@ -142,7 +142,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.py index 8c458cdef9..cbe7a00b23 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.py @@ -147,7 +147,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.pyi index 1172d0b668..6a636be3f3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.pyi @@ -142,7 +142,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post.py index 51dcc488a8..b7afe03472 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post.pyi index 38c1592d8b..c4661e8ea0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post.py index b17d7e4eb7..621037fbb6 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post.pyi index 39239b266b..925fb61c8e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post.py index 131755c371..e8e3ac4607 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post.pyi index 4b23232203..b4f0f78c74 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post.py index 12c48c612b..eba71da226 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post.pyi index 67a49cfb35..ca09d8bde8 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post.py index fe39361d42..2cc7df09dd 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post.pyi index 816491bd56..7813699de1 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post.py index 61ec66dfc0..72f32e2074 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post.pyi index acad9a85a9..f24ddb8e32 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post.py index e6df6196f6..f290947d7e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post.pyi index 482781d579..82b2ad07cf 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post.py index e929dbcee3..ca57d31936 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post.pyi index 850526fae3..9c9006b70e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post.py index df08580e42..3d50fd67c3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post.pyi index 73f9114442..78ae9660dd 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post.py index df932cb5f1..7f54aa35a8 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post.pyi index 8779b7b9b1..5686f4bc8f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post.py index fa20a29c54..7cae7fac74 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post.pyi index 62b2572fd5..a8a5fed8e2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post.py index 373e7db540..36122b5c78 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post.pyi index 99c4c8f724..a7e9a3b1b6 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.py index 94d61d9b79..8cb87ce5d8 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.pyi index 96c083c4b9..a1774aa088 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post.py index 3bfe474ceb..e1b615ef07 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post.pyi index 2869480c1d..22c26ae93d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.py index 00dba053a1..a489b9f4ff 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.pyi index 014f023fa6..da59ed9b9d 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.py index 9b45623d2d..3f43f74ce9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.py @@ -196,7 +196,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.pyi index b97cc8d5f7..0e570fd957 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.pyi @@ -191,7 +191,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post.py index 1b87bc301b..6a3c5ee94c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post.py @@ -147,7 +147,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post.pyi index 820f6bcd9a..dbe29a8e4b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post.pyi @@ -142,7 +142,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.py index 51c0a38e32..cabfa961dc 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.pyi index fd0d333919..97eb1a5852 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.py index c1e7d374a2..db6c821109 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.py @@ -125,7 +125,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.pyi index f8ec2c324d..c2210cb8d2 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.pyi @@ -120,7 +120,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.py index 361775d9d4..d0da0ee8b6 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.py @@ -125,7 +125,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.pyi index 3c6fcf2bdb..565ddc34da 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.pyi @@ -120,7 +120,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post.py index 4769ba021d..da2f684007 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post.pyi index ba65195314..3da213a42b 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post.py index 4064404903..7a6f898ee4 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post.py @@ -125,7 +125,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post.pyi index a536bf84d0..8d95e32fcc 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post.pyi @@ -120,7 +120,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post.py index ab4917e7cb..ba686b0553 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post.pyi index 13fc378b54..fb610e2501 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post.py index a109b7c7af..1e8d017506 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post.pyi index 63bc2cb122..b0b3436cf5 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post.py index 1dfca4c393..01364c47ba 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post.pyi index 086dd1a6e3..88cefca69e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post.py index d91a02eeb7..cd618b49b3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post.pyi index db4e55b94f..083ceeaa18 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post.py index 18af4cfe7b..c6d4287282 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post.pyi index f90b79612c..07c8ce0bca 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post.py index bef8879c1d..9d866d09c6 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post.pyi index c1cc91c88c..ddf370ce1c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post.py index f267935d14..b57bb80d05 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post.pyi index 589121a113..1cf08e265c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post.py index 8bf1bdca88..ec8ead7977 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post.pyi index a2f57446fd..8ba842de24 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post.py index 7bd5d81fe1..0bc30e9f40 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post.pyi index e6c1333f5c..ae3b5d35ea 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post.py index e7d5c5eca6..3977e5c7a6 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post.pyi index 0bb91ff44c..47b877c726 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/post.py index cd8bf5b507..44daed19b5 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/post.pyi index 211f9ff8d2..d1c63f5d24 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post.py index c28733f77b..251abc4156 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post.pyi index 2fbc6af0e1..8cd1b4fc06 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/post.py index 77c23bc9fa..86efdb6255 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/post.pyi index eab5a6d5a4..2dab7883e3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post.py index 5fbe6ef713..02d7ded667 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post.py @@ -152,7 +152,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post.pyi index 1c106d1722..4583198739 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post.pyi @@ -147,7 +147,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post.py index 2ed178a49d..8e41ae0ac3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post.pyi index 53f4662986..17d53c1870 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/post.py index ed51fd0f79..0bd6aa8eee 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/post.pyi index 974eb70c89..8c5ad98006 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post.py index 2c1e9db646..2f004f5dd0 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post.pyi index 977571b091..c1bef2edb9 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post.py index d30d66adfd..f93165b324 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post.pyi index 17454c7031..3ca538228c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post.py index c951da515a..5d0c96f7a3 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post.pyi index 3c36cc22f5..007808a372 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.py index 694a648e37..f85c67a631 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.pyi index 033c7350ce..1325cdbe85 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post.py index 98f4890519..65e29f541c 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post.pyi index e8cbae9b39..4b580ac35f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post.py index 690aca6f91..a5453c2339 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post.py @@ -125,7 +125,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post.pyi index 54bc07baa9..739044826e 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post.pyi @@ -120,7 +120,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post.py index f84c021f89..b526e4e77a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post.pyi index 12593d9a33..15ccfbb042 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post.py index 6c00ce1445..172961d6b1 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post.pyi index c38e6e9c33..c96643d338 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post.py index b8c53f797b..2fd7618958 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post.pyi index 5d7a775beb..85f01ffb12 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post.py index f139d4ae86..cd654cf4f6 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post.py @@ -147,7 +147,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post.pyi index 57ca87cbd7..23e328ef8a 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post.pyi @@ -142,7 +142,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.py index 58dd04bdba..e42b15bd71 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.py @@ -147,7 +147,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.pyi index d3b186e351..636bf07c55 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.pyi @@ -142,7 +142,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post.py index e9fe65c627..7fe2ce2c2f 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post.py @@ -147,7 +147,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post.pyi index 669f2b49d7..1e4b98b155 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post.pyi +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post.pyi @@ -142,7 +142,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/exceptions.py b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/exceptions.py index e6fc3856fc..0c3bd2fd8a 100644 --- a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/exceptions.py +++ b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/exceptions.py @@ -8,6 +8,10 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech """ +import dataclasses +import typing + +from urllib3._collections import HTTPHeaderDict class OpenApiException(Exception): @@ -97,19 +101,26 @@ class ApiKeyError(OpenApiException, KeyError): super(ApiKeyError, self).__init__(full_msg) -class ApiException(OpenApiException): +T = typing.TypeVar("T") - def __init__(self, status=None, reason=None, api_response: 'dynamic_servers.api_client.ApiResponse' = None): - if api_response: - self.status = api_response.response.status - self.reason = api_response.response.reason - self.body = api_response.response.data - self.headers = api_response.response.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None + +@dataclasses.dataclass +class ApiException(OpenApiException, typing.Generic[T]): + status: int + reason: str + api_response: typing.Optional[T] = None + + @property + def body(self) -> typing.Union[str, bytes, None]: + if not self.api_response: + return None + return self.api_response.response.data + + @property + def headers(self) -> typing.Optional[HTTPHeaderDict]: + if not self.api_response: + return None + return self.api_response.response.getheaders() def __str__(self): """Custom error messages for exception""" diff --git a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/custom/get.py b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/custom/get.py index 50aed72b00..2527c6a7a7 100644 --- a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/custom/get.py +++ b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/custom/get.py @@ -183,7 +183,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/custom/get.pyi b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/custom/get.pyi index 4f9da96c6c..0e83c3bb01 100644 --- a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/custom/get.pyi +++ b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/custom/get.pyi @@ -128,7 +128,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/default/get.py b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/default/get.py index 07a1cc5e22..77d418754a 100644 --- a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/default/get.py +++ b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/default/get.py @@ -126,7 +126,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/default/get.pyi b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/default/get.pyi index 193aadbce2..8096393ca9 100644 --- a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/default/get.pyi +++ b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/default/get.pyi @@ -121,7 +121,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/docs/apis/tags/FakeApi.md b/samples/openapi3/client/petstore/python/docs/apis/tags/FakeApi.md index a3d797cec2..1c4a29fc21 100644 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/FakeApi.md +++ b/samples/openapi3/client/petstore/python/docs/apis/tags/FakeApi.md @@ -1097,6 +1097,7 @@ body | typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, Unset] | query_params | RequestQueryParams | | header_params | RequestHeaderParams | | content_type | str | optional, default is 'application/x-www-form-urlencoded' | Selects the schema and serialization of the request body +accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned @@ -1221,9 +1222,16 @@ headers | Unset | headers were not defined | Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | +body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | headers | Unset | headers were not defined | +# SchemaFor404ResponseBodyApplicationJson + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | | + ### Authorization No authorization required diff --git a/samples/openapi3/client/petstore/python/petstore_api/exceptions.py b/samples/openapi3/client/petstore/python/petstore_api/exceptions.py index ed422fd2d0..3bfb822838 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/exceptions.py +++ b/samples/openapi3/client/petstore/python/petstore_api/exceptions.py @@ -8,6 +8,10 @@ The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech """ +import dataclasses +import typing + +from urllib3._collections import HTTPHeaderDict class OpenApiException(Exception): @@ -97,19 +101,26 @@ class ApiKeyError(OpenApiException, KeyError): super(ApiKeyError, self).__init__(full_msg) -class ApiException(OpenApiException): +T = typing.TypeVar("T") - def __init__(self, status=None, reason=None, api_response: 'petstore_api.api_client.ApiResponse' = None): - if api_response: - self.status = api_response.response.status - self.reason = api_response.response.reason - self.body = api_response.response.data - self.headers = api_response.response.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None + +@dataclasses.dataclass +class ApiException(OpenApiException, typing.Generic[T]): + status: int + reason: str + api_response: typing.Optional[T] = None + + @property + def body(self) -> typing.Union[str, bytes, None]: + if not self.api_response: + return None + return self.api_response.response.data + + @property + def headers(self) -> typing.Optional[HTTPHeaderDict]: + if not self.api_response: + return None + return self.api_response.response.getheaders() def __str__(self): """Custom error messages for exception""" diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch.py b/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch.py index 35b18c4fde..344845d8e6 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch.py @@ -174,7 +174,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch.pyi index 5c7dfa4851..e8fddde768 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch.pyi @@ -169,7 +169,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete.py index 9803516eec..33d2c33e14 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete.py @@ -233,7 +233,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete.pyi index 1bb21445f6..c86c4fed8e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete.pyi @@ -225,7 +225,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get.py index 25044c6b7d..968217f3d2 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get.py @@ -433,22 +433,32 @@ class ApiResponseFor200(api_client.ApiResponse): _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, ) +SchemaFor404ResponseBodyApplicationJson = schemas.DictSchema @dataclass class ApiResponseFor404(api_client.ApiResponse): response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset _response_for_404 = api_client.OpenApiResponse( response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, ) _status_code_to_response = { '200': _response_for_200, '404': _response_for_404, } +_all_accept_content_types = ( + 'application/json', +) class BaseApi(api_client.Api): @@ -459,6 +469,7 @@ class BaseApi(api_client.Api): body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -473,6 +484,7 @@ class BaseApi(api_client.Api): body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -489,6 +501,7 @@ class BaseApi(api_client.Api): body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -500,6 +513,7 @@ class BaseApi(api_client.Api): body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -514,6 +528,7 @@ class BaseApi(api_client.Api): body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -555,6 +570,9 @@ class BaseApi(api_client.Api): serialized_data = parameter.serialize(parameter_data) _headers.extend(serialized_data) # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) _fields = None _body = None @@ -585,7 +603,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response @@ -600,6 +622,7 @@ class EnumParameters(BaseApi): body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -614,6 +637,7 @@ class EnumParameters(BaseApi): body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -630,6 +654,7 @@ class EnumParameters(BaseApi): body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -641,6 +666,7 @@ class EnumParameters(BaseApi): body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -655,6 +681,7 @@ class EnumParameters(BaseApi): body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -664,6 +691,7 @@ class EnumParameters(BaseApi): query_params=query_params, header_params=header_params, content_type=content_type, + accept_content_types=accept_content_types, stream=stream, timeout=timeout, skip_deserialization=skip_deserialization @@ -680,6 +708,7 @@ class ApiForget(BaseApi): body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -694,6 +723,7 @@ class ApiForget(BaseApi): body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -710,6 +740,7 @@ class ApiForget(BaseApi): body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -721,6 +752,7 @@ class ApiForget(BaseApi): body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -735,6 +767,7 @@ class ApiForget(BaseApi): body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -744,6 +777,7 @@ class ApiForget(BaseApi): query_params=query_params, header_params=header_params, content_type=content_type, + accept_content_types=accept_content_types, stream=stream, timeout=timeout, skip_deserialization=skip_deserialization diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get.pyi index 5b24afaf78..b2241774a9 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get.pyi @@ -370,17 +370,27 @@ class ApiResponseFor200(api_client.ApiResponse): _response_for_200 = api_client.OpenApiResponse( response_cls=ApiResponseFor200, ) +SchemaFor404ResponseBodyApplicationJson = schemas.DictSchema @dataclass class ApiResponseFor404(api_client.ApiResponse): response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset + body: typing.Union[ + SchemaFor404ResponseBodyApplicationJson, + ] headers: schemas.Unset = schemas.unset _response_for_404 = api_client.OpenApiResponse( response_cls=ApiResponseFor404, + content={ + 'application/json': api_client.MediaType( + schema=SchemaFor404ResponseBodyApplicationJson), + }, +) +_all_accept_content_types = ( + 'application/json', ) @@ -392,6 +402,7 @@ class BaseApi(api_client.Api): body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -406,6 +417,7 @@ class BaseApi(api_client.Api): body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -422,6 +434,7 @@ class BaseApi(api_client.Api): body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -433,6 +446,7 @@ class BaseApi(api_client.Api): body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -447,6 +461,7 @@ class BaseApi(api_client.Api): body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -488,6 +503,9 @@ class BaseApi(api_client.Api): serialized_data = parameter.serialize(parameter_data) _headers.extend(serialized_data) # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) _fields = None _body = None @@ -518,7 +536,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response @@ -533,6 +555,7 @@ class EnumParameters(BaseApi): body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -547,6 +570,7 @@ class EnumParameters(BaseApi): body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -563,6 +587,7 @@ class EnumParameters(BaseApi): body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -574,6 +599,7 @@ class EnumParameters(BaseApi): body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -588,6 +614,7 @@ class EnumParameters(BaseApi): body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -597,6 +624,7 @@ class EnumParameters(BaseApi): query_params=query_params, header_params=header_params, content_type=content_type, + accept_content_types=accept_content_types, stream=stream, timeout=timeout, skip_deserialization=skip_deserialization @@ -613,6 +641,7 @@ class ApiForget(BaseApi): body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -627,6 +656,7 @@ class ApiForget(BaseApi): body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: typing_extensions.Literal[False] = ..., @@ -643,6 +673,7 @@ class ApiForget(BaseApi): body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, ) -> api_client.ApiResponseWithoutDeserialization: ... @@ -654,6 +685,7 @@ class ApiForget(BaseApi): body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = ..., @@ -668,6 +700,7 @@ class ApiForget(BaseApi): body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, query_params: RequestQueryParams = frozendict.frozendict(), header_params: RequestHeaderParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, skip_deserialization: bool = False, @@ -677,6 +710,7 @@ class ApiForget(BaseApi): query_params=query_params, header_params=header_params, content_type=content_type, + accept_content_types=accept_content_types, stream=stream, timeout=timeout, skip_deserialization=skip_deserialization diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch.py index 5a5927a2b0..21b28d9a46 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch.py @@ -174,7 +174,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch.pyi index 1cd6c45377..93f842e888 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch.pyi @@ -169,7 +169,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post.py index 33297e12cf..6f5d487b91 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post.py @@ -436,7 +436,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post.pyi index 0ef264888a..3795898d9d 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post.pyi @@ -387,7 +387,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get.py index c76f1c5798..8ea9735c6f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get.py @@ -171,7 +171,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get.pyi index 13981bf475..7422eeaa76 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get.pyi @@ -166,7 +166,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put.py index 481882c97f..bd4bef9f23 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put.py @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put.pyi index 7785729eb2..4ceb43cdc3 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put.py index 03d8d0b48f..6e0bb85629 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put.py @@ -201,7 +201,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put.pyi index 6e34838b84..95d12b2a43 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put.pyi @@ -196,7 +196,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put.py index 766073175b..9bf9cf6480 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put.py @@ -169,7 +169,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put.pyi index c5cab83989..edcd028d8b 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put.pyi @@ -164,7 +164,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch.py index 72a085dbaf..6a8ea9a94e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch.py @@ -178,7 +178,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch.pyi index 055301928b..63a2d59889 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch.pyi @@ -170,7 +170,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete.py index 4d74087f3b..b51db4af2b 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete.py @@ -168,7 +168,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete.pyi index a63211d2c0..c283abc29a 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete.pyi @@ -162,7 +162,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/get.py index 448891337f..2875b270fa 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/get.py @@ -128,7 +128,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/get.pyi index 5782ac9c7e..bf79bef82c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/get.pyi @@ -123,7 +123,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post.py index 7b915f0346..eacced100b 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post.py @@ -182,7 +182,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post.pyi index a435623079..8cd14929f0 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post.pyi @@ -177,7 +177,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post.py index 400a670686..91df2c90f1 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post.py @@ -656,7 +656,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post.pyi index 4544446690..1492f6b64a 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post.pyi @@ -633,7 +633,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get.py index 61e22a57e8..3ccf0eac8e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get.py @@ -217,7 +217,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get.pyi index 11810c7d70..c9db50fba6 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get.pyi @@ -212,7 +212,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch.py index d55867cd11..a6644e4413 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch.py @@ -153,7 +153,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch.pyi index 3322e593cc..0199f31ca6 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch.pyi @@ -148,7 +148,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post.py index 7e075373a3..5e82e1fb63 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post.py @@ -169,7 +169,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post.pyi index 5246ee555a..8a83a49e9d 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post.pyi @@ -164,7 +164,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get.py index 39f303918e..37ece8a5a7 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get.py @@ -198,7 +198,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get.pyi index 3ac48d9e1c..9eeca38c68 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get.pyi @@ -193,7 +193,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post.py index 4f12ff8fad..b4b0263ae1 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post.py @@ -458,7 +458,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post.pyi index b24853ab38..2cce3169e5 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post.pyi @@ -453,7 +453,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post.py index c330be841a..a532d0121a 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post.py @@ -284,7 +284,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post.pyi index 593beed150..2ce97ae9dd 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post.pyi @@ -276,7 +276,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/get.py index c829e40dd2..13d27a1f35 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/get.py @@ -171,7 +171,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/get.pyi index ccf449dcfd..9ae7ba171b 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/get.pyi @@ -166,7 +166,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get.py index 6a5556eb38..64987f350b 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get.py @@ -151,7 +151,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get.pyi index 70a37a3ac1..abdca20c72 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get.pyi @@ -146,7 +146,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post.py index f8ec75ce3e..2894d829eb 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post.py @@ -171,7 +171,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post.pyi index ac0fb2920f..24206b9a2e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post.pyi @@ -166,7 +166,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post.py index cebbb40e5f..e42a1889d5 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post.py @@ -170,7 +170,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post.pyi index ed802fd8c6..a2b06a441a 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post.pyi @@ -165,7 +165,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post.py index 6eee57e2c6..2baae62355 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post.py @@ -168,7 +168,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post.pyi index 7a975a27bc..0050c5cb87 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post.pyi @@ -163,7 +163,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post.py index 84acaf1702..6bd2dd9456 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post.py @@ -170,7 +170,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post.pyi index 30d5f91dba..0aa5907b06 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post.pyi @@ -165,7 +165,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post.py index 4b953d0500..6cc35c1482 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post.py @@ -170,7 +170,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post.pyi index ea4b1fe2ff..221b4d0b63 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post.pyi @@ -165,7 +165,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post.py index dfeb527472..e7e13243f9 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post.py @@ -173,7 +173,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post.pyi index 24137e6fa5..6ea8a6d19a 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post.pyi @@ -168,7 +168,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post.py index ab8e5088e5..ec018264aa 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post.py @@ -170,7 +170,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post.pyi index 8fb5defd56..c61052f767 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post.pyi @@ -165,7 +165,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post.py index 9df4ea7f15..cbea351125 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post.py @@ -170,7 +170,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post.pyi index 7ad3021226..68fd4a90f6 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post.pyi @@ -165,7 +165,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post.py index 6e12c6a77c..14757e3972 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post.py @@ -168,7 +168,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post.pyi index 0e7d1fb36c..789db0c1a2 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post.pyi @@ -163,7 +163,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get.py index f62d1360ba..c488bce612 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get.py @@ -127,7 +127,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get.pyi index ecb63bdc8e..008429c2b5 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get.pyi @@ -122,7 +122,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_parameters/put.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_parameters/put.py index 1b14889b7c..aac0cf9059 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_parameters/put.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_parameters/put.py @@ -308,7 +308,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_parameters/put.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_parameters/put.pyi index c8ceaccc78..088f67d331 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_parameters/put.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_parameters/put.pyi @@ -303,7 +303,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post.py index 9686e6ede5..174a4b2e91 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post.py @@ -172,7 +172,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post.pyi index a6086fbd0d..1759d975a6 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post.pyi @@ -167,7 +167,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post.py index 4e063e9ce4..3c286bcf95 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post.py @@ -235,7 +235,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post.pyi index 53c99c04e8..ede3be6b8a 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post.pyi @@ -230,7 +230,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post.py index 680e3ab74e..3f1e0405e5 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post.py @@ -242,7 +242,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post.pyi index 47f188f923..985e5f7be2 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post.pyi @@ -237,7 +237,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get.py index 043cf915fc..1e47032f22 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get.py @@ -183,7 +183,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get.pyi index 734621db67..4cdef98868 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get.pyi @@ -178,7 +178,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post.py index eab76eab72..8e267ad649 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post.py @@ -208,7 +208,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post.pyi index 844a49f709..b42118a94c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post.pyi @@ -188,7 +188,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put.py index 455320b56c..59a92186bf 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put.py @@ -211,7 +211,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put.pyi index 925cf09510..fbea6f42af 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put.pyi @@ -190,7 +190,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get.py index 698c3d1816..c88c43fdb2 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get.py @@ -292,7 +292,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get.pyi index b3c24534ec..b155bb61f7 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get.pyi @@ -274,7 +274,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get.py index 1f153d03c7..dcc3db50dc 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get.py @@ -267,7 +267,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get.pyi index 7f84406d6a..e383b27407 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get.pyi @@ -257,7 +257,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete.py index 3651dff1d3..4f1fc57d6b 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete.py @@ -191,7 +191,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete.pyi index eb9bc416c0..bae37d55ea 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete.pyi @@ -183,7 +183,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get.py index 9dc1735114..f7816a024e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get.py @@ -207,7 +207,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get.pyi index 5ae107f324..fedba6a061 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get.pyi @@ -197,7 +197,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post.py index 4e1e7a7136..4e13d8387e 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post.py @@ -252,7 +252,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post.pyi index e95c257148..5cbb4082d2 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post.pyi @@ -244,7 +244,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post.py index 375b2cf16e..967a3f1cfc 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post.py @@ -279,7 +279,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post.pyi index b9131a0485..c6e9baa0d0 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post.pyi @@ -271,7 +271,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get.py index 7cf9163c1e..6d9149b1d9 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get.py @@ -158,7 +158,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get.pyi index 8e2e7f1eb4..ec2b0fd149 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get.pyi @@ -150,7 +150,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post.py index a92da10efb..d0b0ddb240 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post.py @@ -192,7 +192,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post.pyi index 20ad57939b..14f03216c3 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post.pyi @@ -186,7 +186,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete.py b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete.py index 2e2edd945d..945e984557 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete.py @@ -158,7 +158,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete.pyi index 6eefe3953d..12d3d0a1e2 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete.pyi @@ -152,7 +152,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get.py index 8c52441cf1..72396c7aac 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get.py @@ -213,7 +213,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get.pyi index a4e2735912..9a9a783a7b 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get.pyi @@ -201,7 +201,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user/post.py index 08cfcc902c..185849c735 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user/post.py @@ -160,7 +160,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/user/post.pyi index df85a246c2..d0bae91020 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user/post.pyi @@ -155,7 +155,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post.py index 186cc7195f..ac14f66aff 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post.py @@ -185,7 +185,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post.pyi index 8a66592df7..0b6b0a59f7 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post.pyi @@ -180,7 +180,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post.py index 9647b9ca3e..948b69eb70 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post.py @@ -185,7 +185,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post.pyi index 3bdc5950ba..56449661bd 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post.pyi @@ -180,7 +180,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get.py index 0d963a9eb2..6f7e561cef 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get.py @@ -222,7 +222,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get.pyi index 3fb920a0c0..a3fcbd6103 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get.pyi @@ -206,7 +206,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_logout/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_logout/get.py index 0814ac97f9..b323541d77 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_logout/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_logout/get.py @@ -109,7 +109,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_logout/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/user_logout/get.pyi index 302df64884..caf593877a 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_logout/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_logout/get.pyi @@ -104,7 +104,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete.py index 769252ca8d..8b3f7928cc 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete.py @@ -162,7 +162,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete.pyi index 3240953717..757358c2c3 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete.pyi @@ -156,7 +156,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get.py index 9ee437ce79..866197ce32 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get.py @@ -203,7 +203,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get.pyi index 63e188e6ce..237f838059 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get.pyi @@ -196,7 +196,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put.py index 5a5445aff9..ceecd6565f 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put.py +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put.py @@ -207,7 +207,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put.pyi index 864e5bfac3..b4bc40a4a1 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put.pyi +++ b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put.pyi @@ -201,7 +201,11 @@ class BaseApi(api_client.Api): api_response = api_client.ApiResponseWithoutDeserialization(response=response) if not 200 <= response.status <= 299: - raise exceptions.ApiException(api_response=api_response) + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) return api_response diff --git a/samples/openapi3/client/petstore/python/tests_manual/__init__.py b/samples/openapi3/client/petstore/python/tests_manual/__init__.py index 6aabd3fc7f..2d3b295fb8 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/__init__.py +++ b/samples/openapi3/client/petstore/python/tests_manual/__init__.py @@ -91,7 +91,8 @@ class ApiTestMixin(unittest.TestCase): status: int = 200, content_type: str = json_content_type, headers: typing.Optional[typing.Dict[str, str]] = None, - preload_content: bool = True + preload_content: bool = True, + reason: typing.Optional[str] = None ) -> urllib3.HTTPResponse: if headers is None: headers = {} @@ -100,7 +101,8 @@ class ApiTestMixin(unittest.TestCase): body, headers=headers, status=status, - preload_content=preload_content + preload_content=preload_content, + reason=reason ) @staticmethod diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_paths/test_fake/test_get.py b/samples/openapi3/client/petstore/python/tests_manual/test_paths/test_fake/test_get.py index 042fe206c4..b7ee545c30 100644 --- a/samples/openapi3/client/petstore/python/tests_manual/test_paths/test_fake/test_get.py +++ b/samples/openapi3/client/petstore/python/tests_manual/test_paths/test_fake/test_get.py @@ -27,20 +27,20 @@ class TestFake(ApiTestMixin, unittest.TestCase): header_name='enum_header_string', header_value='_abc' ) - api = get.ApiForget(api_client=used_api_client) @patch.object(urllib3.PoolManager, 'request') def test_passed_in_header_overrides_default(self, mock_request): mock_request.return_value = self.response(b'') - api_response = self.api.get(header_params={'enum_header_string': '-efg'}) + api = get.ApiForget(api_client=self.used_api_client) + api_response = api.get(header_params={'enum_header_string': '-efg'}) self.assert_pool_manager_request_called_with( mock_request, f'http://petstore.swagger.io:80/v2/fake', body=None, method='GET', content_type=None, - accept_content_type=None, + accept_content_type='application/json', headers={'enum_header_string': '-efg'} ) @@ -53,14 +53,15 @@ class TestFake(ApiTestMixin, unittest.TestCase): def test_default_header_used_when_no_header_params_input(self, mock_request): mock_request.return_value = self.response(b'') - api_response = self.api.get() + api = get.ApiForget(api_client=self.used_api_client) + api_response = api.get() self.assert_pool_manager_request_called_with( mock_request, f'http://petstore.swagger.io:80/v2/fake', body=None, method='GET', content_type=None, - accept_content_type=None, + accept_content_type='application/json', headers={'enum_header_string': '_abc'} ) @@ -69,5 +70,42 @@ class TestFake(ApiTestMixin, unittest.TestCase): assert isinstance(api_response.headers, schemas.Unset) assert api_response.response.status == 200 + @patch.object(urllib3.PoolManager, 'request') + def test_response_exception_info(self, mock_request): + error_dict = { + 'msg': 'record not found' + } + response_body_bytes = self.json_bytes(error_dict) + mock_request.return_value = self.response(response_body_bytes, status=404, reason='404') + + api = get.ApiForget() + with self.assertRaises(petstore_api.ApiException) as cm: + api_response = api.get() + + exc: petstore_api.ApiException[get.ApiResponseFor404] = cm.exception + expected_status = 404 + expected_reason = '404' + self.assertEqual(exc.status, expected_status) + self.assertEqual(exc.reason, expected_reason) + self.assertEqual(exc.body, response_body_bytes) + expected_headers = {'content-type': 'application/json'} + self.assertEqual(exc.headers, expected_headers) + self.assertEqual(exc.api_response.response.status, expected_status) + self.assertEqual(exc.api_response.response.reason, expected_reason) + self.assertEqual(exc.api_response.response.data, response_body_bytes) + self.assertEqual(exc.api_response.response.headers, expected_headers) + self.assertTrue(isinstance(exc.api_response.body, schemas.DictSchema)) + self.assertEqual(exc.api_response.body, error_dict) + + self.assert_pool_manager_request_called_with( + mock_request, + f'http://petstore.swagger.io:80/v2/fake', + body=None, + method='GET', + content_type=None, + accept_content_type='application/json', + ) + + if __name__ == '__main__': - unittest.main() + unittest.main() \ No newline at end of file From 906ec5dfa37d05f41f2ec79dc7f5dba6223252eb Mon Sep 17 00:00:00 2001 From: Sorin Florea <30589784+sorin-florea@users.noreply.github.com> Date: Wed, 23 Nov 2022 04:15:59 +0100 Subject: [PATCH 038/189] Cleanup outputDir before openApiGenerate (#13659) * Cleanup outputdir before openApiGenerate * Add cleanupOutput property to GenerateTask --- .../gradle/plugin/OpenApiGeneratorPlugin.kt | 1 + .../OpenApiGeneratorGenerateExtension.kt | 9 ++ .../gradle/plugin/tasks/GenerateTask.kt | 14 +++ .../src/test/kotlin/GenerateTaskDslTest.kt | 87 ++++++++++++++++++- 4 files changed, 110 insertions(+), 1 deletion(-) diff --git a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/OpenApiGeneratorPlugin.kt b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/OpenApiGeneratorPlugin.kt index 19c9a7c4b9..4975fe2166 100644 --- a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/OpenApiGeneratorPlugin.kt +++ b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/OpenApiGeneratorPlugin.kt @@ -146,6 +146,7 @@ class OpenApiGeneratorPlugin : Plugin { skipValidateSpec.set(generate.skipValidateSpec) generateAliasAsModel.set(generate.generateAliasAsModel) engine.set(generate.engine) + cleanupOutput.set(generate.cleanupOutput) } } } diff --git a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorGenerateExtension.kt b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorGenerateExtension.kt index 6e88fa7964..4d9cff5414 100644 --- a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorGenerateExtension.kt +++ b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/extensions/OpenApiGeneratorGenerateExtension.kt @@ -17,6 +17,8 @@ package org.openapitools.generator.gradle.plugin.extensions import org.gradle.api.Project +import org.gradle.api.tasks.Input +import org.gradle.api.tasks.Optional import org.gradle.kotlin.dsl.listProperty import org.gradle.kotlin.dsl.mapProperty import org.gradle.kotlin.dsl.property @@ -341,6 +343,12 @@ open class OpenApiGeneratorGenerateExtension(project: Project) { */ val engine = project.objects.property() + /** + * Defines whether the output dir should be cleaned up before generating the output. + * + */ + val cleanupOutput = project.objects.property() + init { applyDefaults() } @@ -362,5 +370,6 @@ open class OpenApiGeneratorGenerateExtension(project: Project) { enablePostProcessFile.set(false) skipValidateSpec.set(false) generateAliasAsModel.set(false) + cleanupOutput.set(false) } } diff --git a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt index 38c128a4b8..9c0c721ee2 100644 --- a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt +++ b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt @@ -490,6 +490,14 @@ open class GenerateTask : DefaultTask() { @Input val engine = project.objects.property() + /** + * Defines whether the output dir should be cleaned up before generating the output. + * + */ + @Optional + @Input + val cleanupOutput = project.objects.property() + private fun Property.ifNotEmpty(block: Property.(T) -> Unit) { if (isPresent) { val item: T? = get() @@ -512,6 +520,12 @@ open class GenerateTask : DefaultTask() { @Suppress("unused") @TaskAction fun doWork() { + cleanupOutput.ifNotEmpty { cleanup -> + if (cleanup) { + project.delete(outputDir) + } + } + val configurator: CodegenConfigurator = if (configFile.isPresent) { CodegenConfigurator.fromFile(configFile.get()) } else createDefaultCodegenConfigurator() diff --git a/modules/openapi-generator-gradle-plugin/src/test/kotlin/GenerateTaskDslTest.kt b/modules/openapi-generator-gradle-plugin/src/test/kotlin/GenerateTaskDslTest.kt index 660f0845bd..e1c1e1f198 100644 --- a/modules/openapi-generator-gradle-plugin/src/test/kotlin/GenerateTaskDslTest.kt +++ b/modules/openapi-generator-gradle-plugin/src/test/kotlin/GenerateTaskDslTest.kt @@ -128,6 +128,91 @@ class GenerateTaskDslTest : TestBase() { "Expected a successful run, but found ${result.task(":openApiGenerate")?.outcome}") } + @Test + fun `openApiGenerate should not cleanup outputDir by default`() { + // Arrange + val projectFiles = mapOf( + "spec.yaml" to javaClass.classLoader.getResourceAsStream("specs/petstore-v3.0.yaml") + ) + withProject(defaultBuildGradle, projectFiles) + + val oldFile = File(temp, "build/kotlin/should-be-removed") + oldFile.mkdirs() + oldFile.createNewFile() + + // Act + val result = GradleRunner.create() + .withProjectDir(temp) + .withArguments("openApiGenerate") + .withPluginClasspath() + .build() + + // Assert + assertTrue( + result.output.contains("Successfully generated code to"), + "User friendly generate notice is missing." + ) + + assertTrue(oldFile.exists(), "Old files should have been removed") + + assertEquals( + TaskOutcome.SUCCESS, result.task(":openApiGenerate")?.outcome, + "Expected a successful run, but found ${result.task(":openApiGenerate")?.outcome}" + ) + } + + @Test + fun `openApiGenerate should cleanup outputDir`() { + // Arrange + val projectFiles = mapOf( + "spec.yaml" to javaClass.classLoader.getResourceAsStream("specs/petstore-v3.0.yaml") + ) + withProject( + """ + plugins { + id 'org.openapi.generator' + } + openApiGenerate { + generatorName = "kotlin" + inputSpec = file("spec.yaml").absolutePath + outputDir = file("build/kotlin").absolutePath + apiPackage = "org.openapitools.example.api" + invokerPackage = "org.openapitools.example.invoker" + modelPackage = "org.openapitools.example.model" + configOptions = [ + dateLibrary: "java8" + ] + cleanupOutput = true + } + """.trimIndent(), + projectFiles + ) + + val oldFile = File(temp, "build/kotlin/should-be-removed") + oldFile.mkdirs() + oldFile.createNewFile() + + // Act + val result = GradleRunner.create() + .withProjectDir(temp) + .withArguments("openApiGenerate") + .withPluginClasspath() + .build() + + // Assert + assertTrue( + result.output.contains("Successfully generated code to"), + "User friendly generate notice is missing." + ) + + assertFalse(oldFile.exists(), "Old files should have been removed") + + assertEquals( + TaskOutcome.SUCCESS, result.task(":openApiGenerate")?.outcome, + "Expected a successful run, but found ${result.task(":openApiGenerate")?.outcome}" + ) + } + @Test fun `should apply prefix & suffix config parameters`() { // Arrange @@ -373,4 +458,4 @@ class GenerateTaskDslTest : TestBase() { assertEquals(TaskOutcome.FAILED, result.task(":openApiGenerate")?.outcome, "Expected a failed run, but found ${result.task(":openApiGenerate")?.outcome}") } -} \ No newline at end of file +} From d74cefba832671a646f4c615c441a3a2f4f78674 Mon Sep 17 00:00:00 2001 From: Sorin Florea <30589784+sorin-florea@users.noreply.github.com> Date: Wed, 23 Nov 2022 07:35:01 +0100 Subject: [PATCH 039/189] [JAVA][APACHE] Fix apache http client query parameters (#14020) * Fix apache http client query parameters * Update samples --- .../libraries/apache-httpclient/api.mustache | 23 ++++- .../ApacheHttpClientCodegenTest.java | 94 +++++++++++++++++++ .../client/api/AnotherFakeApi.java | 1 - .../org/openapitools/client/api/FakeApi.java | 14 --- .../client/api/FakeClassnameTags123Api.java | 1 - .../org/openapitools/client/api/PetApi.java | 9 -- .../org/openapitools/client/api/StoreApi.java | 4 - .../org/openapitools/client/api/UserApi.java | 8 -- 8 files changed, 116 insertions(+), 38 deletions(-) create mode 100644 modules/openapi-generator/src/test/java/org/openapitools/codegen/java/apachehttpclient/ApacheHttpClientCodegenTest.java diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/api.mustache index 44122a1e06..5e6ec0b0b2 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/api.mustache @@ -83,9 +83,30 @@ public class {{classname}} { {{javaUtilPrefix}}Map localVarFormParams = new {{javaUtilPrefix}}HashMap(); {{#queryParams}} + {{#isDeepObject}} {{#collectionFormat}}localVarCollectionQueryParams.addAll(apiClient.parameterToPairs("{{{collectionFormat}}}", {{/collectionFormat}}{{^collectionFormat}}localVarQueryParams.addAll(apiClient.parameterToPair({{/collectionFormat}}"{{baseName}}", {{paramName}})); + {{/isDeepObject}} + {{^isDeepObject}} + {{#isExplode}} + {{#hasVars}} + {{#vars}} + {{#isArray}} + localVarQueryParams.addAll(apiClient.parameterToPair("multi", "{{baseName}}", {{paramName}}.{{getter}}())); + {{/isArray}} + {{^isArray}} + localVarQueryParams.addAll(apiClient.parameterToPair("{{baseName}}", {{paramName}}.{{getter}}())); + {{/isArray}} + {{/vars}} + {{/hasVars}} + {{^hasVars}} + {{#collectionFormat}}localVarCollectionQueryParams.addAll(apiClient.parameterToPairs("{{{collectionFormat}}}", {{/collectionFormat}}{{^collectionFormat}}localVarQueryParams.addAll(apiClient.parameterToPair({{/collectionFormat}}"{{baseName}}", {{paramName}})); + {{/hasVars}} + {{/isExplode}} + {{^isExplode}} + {{#collectionFormat}}localVarCollectionQueryParams.addAll(apiClient.parameterToPairs("{{{collectionFormat}}}", {{/collectionFormat}}{{^collectionFormat}}localVarQueryParams.addAll(apiClient.parameterToPair({{/collectionFormat}}"{{baseName}}", {{paramName}})); + {{/isExplode}} + {{/isDeepObject}} {{/queryParams}} - {{#headerParams}}if ({{paramName}} != null) localVarHeaderParams.put("{{baseName}}", apiClient.parameterToString({{paramName}})); {{/headerParams}} diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/apachehttpclient/ApacheHttpClientCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/apachehttpclient/ApacheHttpClientCodegenTest.java new file mode 100644 index 0000000000..8ec55391db --- /dev/null +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/apachehttpclient/ApacheHttpClientCodegenTest.java @@ -0,0 +1,94 @@ +/* + * Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * Copyright 2018 SmartBear Software + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.codegen.java.apachehttpclient; + +import org.openapitools.codegen.ClientOptInput; +import org.openapitools.codegen.CodegenConstants; +import org.openapitools.codegen.DefaultGenerator; +import org.openapitools.codegen.TestUtils; +import org.openapitools.codegen.config.CodegenConfigurator; +import org.openapitools.codegen.languages.JavaClientCodegen; +import org.testng.Assert; +import org.testng.annotations.Test; + +import java.io.File; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import static org.openapitools.codegen.TestUtils.validateJavaSourceFiles; + +public class ApacheHttpClientCodegenTest { + + @Test + public void testApacheHttpClientExplodedQueryParamObject() throws IOException { + Map properties = new HashMap<>(); + properties.put(CodegenConstants.API_PACKAGE, "xyz.abcdef.api"); + + File output = Files.createTempDirectory("test").toFile(); + output.deleteOnExit(); + + final CodegenConfigurator configurator = new CodegenConfigurator() + .setGeneratorName("java") + .setLibrary(JavaClientCodegen.APACHE) + .setAdditionalProperties(properties) + .setInputSpec("src/test/resources/3_0/issue4808.yaml") + .setOutputDir(output.getAbsolutePath().replace("\\", "/")); + + final ClientOptInput clientOptInput = configurator.toClientOptInput(); + DefaultGenerator generator = new DefaultGenerator(); + List files = generator.opts(clientOptInput).generate(); + + Assert.assertEquals(files.size(), 41); + validateJavaSourceFiles(files); + + TestUtils.assertFileContains(Paths.get(output + "/src/main/java/xyz/abcdef/api/DefaultApi.java"), + "localVarQueryParams.addAll(apiClient.parameterToPair(\"since\", queryObject.getSince()));", + "localVarQueryParams.addAll(apiClient.parameterToPair(\"sinceBuild\", queryObject.getSinceBuild()));", + "localVarQueryParams.addAll(apiClient.parameterToPair(\"maxBuilds\", queryObject.getMaxBuilds()));", + "localVarQueryParams.addAll(apiClient.parameterToPair(\"maxWaitSecs\", queryObject.getMaxWaitSecs()));" + ); + } + + @Test + public void testApacheHttpClientExplodedQueryParamWithArrayProperty() throws IOException { + Map properties = new HashMap<>(); + properties.put(CodegenConstants.API_PACKAGE, "xyz.abcdef.api"); + + File output = Files.createTempDirectory("test").toFile(); + output.deleteOnExit(); + + final CodegenConfigurator configurator = new CodegenConfigurator() + .setGeneratorName("java") + .setLibrary(JavaClientCodegen.APACHE) + .setAdditionalProperties(properties) + .setInputSpec("src/test/resources/3_0/exploded-query-param-array.yaml") + .setOutputDir(output.getAbsolutePath().replace("\\", "/")); + + final ClientOptInput clientOptInput = configurator.toClientOptInput(); + DefaultGenerator generator = new DefaultGenerator(); + generator.opts(clientOptInput).generate(); + + TestUtils.assertFileContains(Paths.get(output + "/src/main/java/xyz/abcdef/api/DefaultApi.java"), + "localVarQueryParams.addAll(apiClient.parameterToPair(\"multi\", \"values\", queryObject.getValues()))" + ); + } +} diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index ff037abf4a..8077d1f92d 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -73,7 +73,6 @@ public class AnotherFakeApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/FakeApi.java index 746ca46f61..9b1ca28923 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/FakeApi.java @@ -80,7 +80,6 @@ public class FakeApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - @@ -131,7 +130,6 @@ public class FakeApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - @@ -183,7 +181,6 @@ public class FakeApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - @@ -235,7 +232,6 @@ public class FakeApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - @@ -287,7 +283,6 @@ public class FakeApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - @@ -343,7 +338,6 @@ public class FakeApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - @@ -405,7 +399,6 @@ public class FakeApi { Map localVarFormParams = new HashMap(); localVarQueryParams.addAll(apiClient.parameterToPair("query", query)); - @@ -461,7 +454,6 @@ public class FakeApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - @@ -545,7 +537,6 @@ public class FakeApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (integer != null) @@ -634,7 +625,6 @@ if (paramCallback != null) localVarQueryParams.addAll(apiClient.parameterToPair("enum_query_string", enumQueryString)); localVarQueryParams.addAll(apiClient.parameterToPair("enum_query_integer", enumQueryInteger)); localVarQueryParams.addAll(apiClient.parameterToPair("enum_query_double", enumQueryDouble)); - if (enumHeaderStringArray != null) localVarHeaderParams.put("enum_header_string_array", apiClient.parameterToString(enumHeaderStringArray)); if (enumHeaderString != null) @@ -716,7 +706,6 @@ if (enumFormString != null) localVarQueryParams.addAll(apiClient.parameterToPair("required_int64_group", requiredInt64Group)); localVarQueryParams.addAll(apiClient.parameterToPair("string_group", stringGroup)); localVarQueryParams.addAll(apiClient.parameterToPair("int64_group", int64Group)); - if (requiredBooleanGroup != null) localVarHeaderParams.put("required_boolean_group", apiClient.parameterToString(requiredBooleanGroup)); if (booleanGroup != null) @@ -775,7 +764,6 @@ if (booleanGroup != null) Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - @@ -836,7 +824,6 @@ if (booleanGroup != null) Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (param != null) @@ -924,7 +911,6 @@ if (param2 != null) localVarCollectionQueryParams.addAll(apiClient.parameterToPairs("ssv", "http", http)); localVarCollectionQueryParams.addAll(apiClient.parameterToPairs("csv", "url", url)); localVarCollectionQueryParams.addAll(apiClient.parameterToPairs("multi", "context", context)); - diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index 26c7960f5c..3514033324 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -73,7 +73,6 @@ public class FakeClassnameTags123Api { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/PetApi.java index d0df79262e..e905e02927 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/PetApi.java @@ -75,7 +75,6 @@ public class PetApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - @@ -132,7 +131,6 @@ public class PetApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (apiKey != null) localVarHeaderParams.put("api_key", apiClient.parameterToString(apiKey)); @@ -191,7 +189,6 @@ public class PetApi { Map localVarFormParams = new HashMap(); localVarCollectionQueryParams.addAll(apiClient.parameterToPairs("csv", "status", status)); - @@ -251,7 +248,6 @@ public class PetApi { Map localVarFormParams = new HashMap(); localVarCollectionQueryParams.addAll(apiClient.parameterToPairs("csv", "tags", tags)); - @@ -309,7 +305,6 @@ public class PetApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - @@ -365,7 +360,6 @@ public class PetApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - @@ -423,7 +417,6 @@ public class PetApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (name != null) @@ -486,7 +479,6 @@ if (status != null) Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (additionalMetadata != null) @@ -555,7 +547,6 @@ if (_file != null) Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (additionalMetadata != null) diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/StoreApi.java index 29b92b46e2..2ea892fb8d 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/StoreApi.java @@ -73,7 +73,6 @@ public class StoreApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - @@ -123,7 +122,6 @@ public class StoreApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - @@ -181,7 +179,6 @@ public class StoreApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - @@ -238,7 +235,6 @@ public class StoreApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/UserApi.java index 93653ea582..421e960411 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/UserApi.java @@ -73,7 +73,6 @@ public class UserApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - @@ -128,7 +127,6 @@ public class UserApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - @@ -183,7 +181,6 @@ public class UserApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - @@ -239,7 +236,6 @@ public class UserApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - @@ -296,7 +292,6 @@ public class UserApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - @@ -361,7 +356,6 @@ public class UserApi { localVarQueryParams.addAll(apiClient.parameterToPair("username", username)); localVarQueryParams.addAll(apiClient.parameterToPair("password", password)); - @@ -411,7 +405,6 @@ public class UserApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - @@ -473,7 +466,6 @@ public class UserApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - From 743d2cde7f472826ab931dd2f5473ff82d0a6c60 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Wed, 23 Nov 2022 20:31:13 +0800 Subject: [PATCH 040/189] Minor improvements to Gradle plugin (#14097) * minor improvements to gradle plugin, test * update gradle plugin doc * fix out --- modules/openapi-generator-gradle-plugin/README.adoc | 5 +++++ .../generator/gradle/plugin/tasks/GenerateTask.kt | 3 +++ .../src/test/kotlin/GenerateTaskDslTest.kt | 4 ++-- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/modules/openapi-generator-gradle-plugin/README.adoc b/modules/openapi-generator-gradle-plugin/README.adoc index f9cb667959..3ffc65de9e 100644 --- a/modules/openapi-generator-gradle-plugin/README.adoc +++ b/modules/openapi-generator-gradle-plugin/README.adoc @@ -378,6 +378,11 @@ apply plugin: 'org.openapi.generator' |String |mustache |Templating engine: "mustache" (default) or "handlebars" (beta) + +|cleanupOutput +|Boolean +|false +|Defines whether the output directory should be cleaned up before generating the output. |=== [NOTE] diff --git a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt index 9c0c721ee2..f3ef513a2f 100644 --- a/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt +++ b/modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt @@ -523,6 +523,9 @@ open class GenerateTask : DefaultTask() { cleanupOutput.ifNotEmpty { cleanup -> if (cleanup) { project.delete(outputDir) + val out = services.get(StyledTextOutputFactory::class.java).create("openapi") + out.withStyle(StyledTextOutput.Style.Success) + out.println("Cleaned up output directory ${outputDir.get()} before code generation (cleanupOutput set to true).") } } diff --git a/modules/openapi-generator-gradle-plugin/src/test/kotlin/GenerateTaskDslTest.kt b/modules/openapi-generator-gradle-plugin/src/test/kotlin/GenerateTaskDslTest.kt index e1c1e1f198..d819025e2c 100644 --- a/modules/openapi-generator-gradle-plugin/src/test/kotlin/GenerateTaskDslTest.kt +++ b/modules/openapi-generator-gradle-plugin/src/test/kotlin/GenerateTaskDslTest.kt @@ -136,7 +136,7 @@ class GenerateTaskDslTest : TestBase() { ) withProject(defaultBuildGradle, projectFiles) - val oldFile = File(temp, "build/kotlin/should-be-removed") + val oldFile = File(temp, "build/kotlin/should-not-be-removed") oldFile.mkdirs() oldFile.createNewFile() @@ -153,7 +153,7 @@ class GenerateTaskDslTest : TestBase() { "User friendly generate notice is missing." ) - assertTrue(oldFile.exists(), "Old files should have been removed") + assertTrue(oldFile.exists(), "Old files should NOT have been removed") assertEquals( TaskOutcome.SUCCESS, result.task(":openApiGenerate")?.outcome, From 09c070a27e78ef350b7762afc3c17aa35407a167 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Wed, 23 Nov 2022 20:32:01 +0800 Subject: [PATCH 041/189] update test, suppress warnings in java apache client (#14098) --- .../libraries/apache-httpclient/ApiClient.mustache | 10 +++++++++- .../apachehttpclient/ApacheHttpClientCodegenTest.java | 1 - .../main/java/org/openapitools/client/ApiClient.java | 10 +++++++++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/ApiClient.mustache index 7e4d2181f5..5aeb9da6b8 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/ApiClient.mustache @@ -782,8 +782,16 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { } /** - * Deserialize response content + * Deserialize response body to Java object according to the Content-Type. + * + * @param Type + * @param response Response + * @param valueType Return type + * @return Deserialized object + * @throws ApiException API exception + * @throws IOException IO exception */ + @SuppressWarnings("unchecked") public T deserialize(HttpResponse response, TypeReference valueType) throws ApiException, IOException { if (valueType == null) { return null; diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/apachehttpclient/ApacheHttpClientCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/apachehttpclient/ApacheHttpClientCodegenTest.java index 8ec55391db..8315833d46 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/apachehttpclient/ApacheHttpClientCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/apachehttpclient/ApacheHttpClientCodegenTest.java @@ -1,6 +1,5 @@ /* * Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech) - * Copyright 2018 SmartBear Software * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/ApiClient.java index 43308167ad..273adaad06 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/ApiClient.java @@ -737,8 +737,16 @@ public class ApiClient extends JavaTimeFormatter { } /** - * Deserialize response content + * Deserialize response body to Java object according to the Content-Type. + * + * @param Type + * @param response Response + * @param valueType Return type + * @return Deserialized object + * @throws ApiException API exception + * @throws IOException IO exception */ + @SuppressWarnings("unchecked") public T deserialize(HttpResponse response, TypeReference valueType) throws ApiException, IOException { if (valueType == null) { return null; From dc1b2ed9e0fb275995c3020b4fd312f182595981 Mon Sep 17 00:00:00 2001 From: Charles Treatman Date: Wed, 23 Nov 2022 07:05:26 -0600 Subject: [PATCH 042/189] [Go] Fix generated client tests when there is no response body (#14081) * [WIP] Isolated test case for Go api_test generator * Fix tests for API endpoints without a return type * Add the rest of the generated test fix --- .../src/main/resources/go/api_test.mustache | 4 ++- .../codegen/go/GoClientCodegenTest.java | 25 +++++++++++++++++++ .../go/petstore-with-no-response-body.yaml | 22 ++++++++++++++++ 3 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 modules/openapi-generator/src/test/resources/3_0/go/petstore-with-no-response-body.yaml diff --git a/modules/openapi-generator/src/main/resources/go/api_test.mustache b/modules/openapi-generator/src/main/resources/go/api_test.mustache index 87a1f6c844..79caa6213e 100644 --- a/modules/openapi-generator/src/main/resources/go/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/go/api_test.mustache @@ -39,10 +39,12 @@ func Test_{{packageName}}_{{classname}}Service(t *testing.T) { var {{paramName}} {{{dataType}}} {{/pathParams}} - resp, httpRes, err := apiClient.{{classname}}.{{operationId}}(context.Background(){{#pathParams}}, {{paramName}}{{/pathParams}}).Execute() + {{#returnType}}resp, {{/returnType}}httpRes, err := apiClient.{{classname}}.{{operationId}}(context.Background(){{#pathParams}}, {{paramName}}{{/pathParams}}).Execute() require.Nil(t, err) + {{#returnType}} require.NotNil(t, resp) + {{/returnType}} assert.Equal(t, 200, httpRes.StatusCode) }) diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/go/GoClientCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/go/GoClientCodegenTest.java index 55706dc106..7969d716f4 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/go/GoClientCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/go/GoClientCodegenTest.java @@ -261,4 +261,29 @@ public class GoClientCodegenTest { TestUtils.assertFileContains(Paths.get(output + "/api_pet.go"), "newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v)"); } + + @Test + public void verifyApiTestWithNullResponse() throws IOException { + File output = Files.createTempDirectory("test").toFile(); + output.deleteOnExit(); + + final CodegenConfigurator configurator = new CodegenConfigurator() + .setGeneratorName("go") + .setGitUserId("OpenAPITools") + .setGitRepoId("openapi-generator") + .setInputSpec("src/test/resources/3_0/go/petstore-with-no-response-body.yaml") + .setOutputDir(output.getAbsolutePath().replace("\\", "/")); + + DefaultGenerator generator = new DefaultGenerator(); + List files = generator.opts(configurator.toClientOptInput()).generate(); + files.forEach(File::deleteOnExit); + + TestUtils.assertFileExists(Paths.get(output + "/test/api_pet_test.go")); + TestUtils.assertFileNotContains(Paths.get(output + "/test/api_pet_test.go"), + "require.NotNil(t, resp)"); + TestUtils.assertFileNotContains(Paths.get(output + "/test/api_pet_test.go"), + "resp, httpRes, err := apiClient.PetApi.PetDelete(context.Background()).Execute()"); + TestUtils.assertFileContains(Paths.get(output + "/test/api_pet_test.go"), + "httpRes, err := apiClient.PetApi.PetDelete(context.Background()).Execute()"); + } } diff --git a/modules/openapi-generator/src/test/resources/3_0/go/petstore-with-no-response-body.yaml b/modules/openapi-generator/src/test/resources/3_0/go/petstore-with-no-response-body.yaml new file mode 100644 index 0000000000..e40a5e3a34 --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/go/petstore-with-no-response-body.yaml @@ -0,0 +1,22 @@ +openapi: 3.0.0 +info: + description: >- + This spec is mainly for testing Petstore server and contains fake endpoints, + models. Please do not use this for any other purpose. Special characters: " + \ + version: 1.0.0 + title: OpenAPI Petstore + license: + name: Apache-2.0 + url: 'https://www.apache.org/licenses/LICENSE-2.0.html' +tags: + - name: pet + description: Everything about your Pets +paths: + /pet: + delete: + tags: + - pet + responses: + '204': + description: OK \ No newline at end of file From 3eb90a69e637bd7bf00bcc76aec72716f5ea2b54 Mon Sep 17 00:00:00 2001 From: Justin Black Date: Wed, 23 Nov 2022 09:52:11 -0500 Subject: [PATCH 043/189] Adds fix and tests (#14102) --- .../openapitools/codegen/DefaultCodegen.java | 25 +++++++++++------- .../languages/PythonClientCodegen.java | 19 +++++--------- .../codegen/DefaultCodegenTest.java | 18 ++++++------- .../codegen/python/PythonClientTest.java | 26 +++++++++++++++++++ 4 files changed, 57 insertions(+), 31 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index e6f0dd8d22..81f2e83b83 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java @@ -3033,17 +3033,17 @@ public class DefaultCodegen implements CodegenConfig { if (schema.getAdditionalProperties() == null) { if (!disallowAdditionalPropertiesIfNotPresent) { isAdditionalPropertiesTrue = true; - addPropProp = fromProperty("", new Schema(), false); + addPropProp = fromProperty(getAdditionalPropertiesName(), new Schema(), false); additionalPropertiesIsAnyType = true; } } else if (schema.getAdditionalProperties() instanceof Boolean) { if (Boolean.TRUE.equals(schema.getAdditionalProperties())) { isAdditionalPropertiesTrue = true; - addPropProp = fromProperty("", new Schema(), false); + addPropProp = fromProperty(getAdditionalPropertiesName(), new Schema(), false); additionalPropertiesIsAnyType = true; } } else { - addPropProp = fromProperty("", (Schema) schema.getAdditionalProperties(), false); + addPropProp = fromProperty(getAdditionalPropertiesName(), (Schema) schema.getAdditionalProperties(), false); if (ModelUtils.isAnyType((Schema) schema.getAdditionalProperties())) { additionalPropertiesIsAnyType = true; } @@ -3853,13 +3853,7 @@ public class DefaultCodegen implements CodegenConfig { } // handle inner property - String itemName = null; - if (p.getExtensions() != null && p.getExtensions().get("x-item-name") != null) { - itemName = p.getExtensions().get("x-item-name").toString(); - } - if (itemName == null) { - itemName = property.name; - } + String itemName = getItemsName(p, name); ArraySchema arraySchema = (ArraySchema) p; Schema innerSchema = unaliasSchema(getSchemaItems(arraySchema)); CodegenProperty cp = fromProperty(itemName, innerSchema, false); @@ -7355,6 +7349,17 @@ public class DefaultCodegen implements CodegenConfig { addRequiredVarsMap(schema, property); } + protected String getItemsName(Schema containingSchema, String containingSchemaName) { + // fromProperty use case + if (containingSchema.getExtensions() != null && containingSchema.getExtensions().get("x-item-name") != null) { + return containingSchema.getExtensions().get("x-item-name").toString(); + } + return toVarName(containingSchemaName); + } + + protected String getAdditionalPropertiesName() { + return "additional_properties"; + } private void addJsonSchemaForBodyRequestInCaseItsNotPresent(CodegenParameter codegenParameter, RequestBody body) { if (codegenParameter.jsonSchema == null) codegenParameter.jsonSchema = Json.pretty(body); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java index 965bbd3535..3eecc392a8 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java @@ -29,6 +29,7 @@ import io.swagger.v3.oas.models.tags.Tag; import org.apache.commons.io.FileUtils; import org.openapitools.codegen.api.TemplatePathLocator; +import org.openapitools.codegen.config.GlobalSettings; import org.openapitools.codegen.ignore.CodegenIgnoreProcessor; import org.openapitools.codegen.model.ModelMap; import org.openapitools.codegen.model.ModelsMap; @@ -239,6 +240,7 @@ public class PythonClientCodegen extends AbstractPythonCodegen { // When the 'additionalProperties' keyword is not present in a OAS schema, allow // undeclared properties. This is compliant with the JSON schema specification. this.setDisallowAdditionalPropertiesIfNotPresent(false); + GlobalSettings.setProperty("x-disallow-additional-properties-if-not-present", "false"); // this may set datatype right for additional properties instantiationTypes.put("map", "dict"); @@ -1063,19 +1065,9 @@ public class PythonClientCodegen extends AbstractPythonCodegen { if (cp.isPrimitiveType && unaliasedSchema.get$ref() != null) { cp.complexType = cp.dataType; } - setAdditionalPropsAndItemsVarNames(cp); return cp; } - private void setAdditionalPropsAndItemsVarNames(IJsonSchemaValidationProperties item) { - if (item.getAdditionalProperties() != null) { - item.getAdditionalProperties().setBaseName("additional_properties"); - } - if (item.getItems() != null) { - item.getItems().setBaseName("items"); - } - } - /** * checks if the data should be classified as "string" in enum * e.g. double in C# needs to be double-quoted (e.g. "2.8") by treating it as a string @@ -1089,6 +1081,10 @@ public class PythonClientCodegen extends AbstractPythonCodegen { return "str".equals(dataType); } + protected String getItemsName(Schema containingSchema, String containingSchemaName) { + return "items"; + } + /** * Update codegen property's enum by adding "enumVars" (with name and value) * @@ -1510,7 +1506,6 @@ public class PythonClientCodegen extends AbstractPythonCodegen { cm.setHasMultipleTypes(true); } Boolean isNotPythonModelSimpleModel = (ModelUtils.isComposedSchema(sc) || ModelUtils.isObjectSchema(sc) || ModelUtils.isMapSchema(sc)); - setAdditionalPropsAndItemsVarNames(cm); if (isNotPythonModelSimpleModel) { return cm; } @@ -2272,7 +2267,7 @@ public class PythonClientCodegen extends AbstractPythonCodegen { if (addPropsSchema == null) { return; } - CodegenProperty addPropProp = fromProperty("", addPropsSchema, false, false); + CodegenProperty addPropProp = fromProperty(getAdditionalPropertiesName(), addPropsSchema, false, false); property.setAdditionalProperties(addPropProp); } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java index 6df19a1311..05ca4fc602 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java @@ -2592,7 +2592,7 @@ public class DefaultCodegenTest { String modelName; Schema sc; CodegenModel cm; - CodegenProperty anyTypeSchema = codegen.fromProperty("", new Schema()); + CodegenProperty anyTypeSchema = codegen.fromProperty("additional_properties", new Schema()); modelName = "AdditionalPropertiesUnset"; sc = openAPI.getComponents().getSchemas().get(modelName); @@ -2615,7 +2615,7 @@ public class DefaultCodegenTest { modelName = "AdditionalPropertiesSchema"; sc = openAPI.getComponents().getSchemas().get(modelName); cm = codegen.fromModel(modelName, sc); - CodegenProperty stringCp = codegen.fromProperty("", new Schema().type("string")); + CodegenProperty stringCp = codegen.fromProperty("additional_properties", new Schema().type("string")); assertEquals(cm.getAdditionalProperties(), stringCp); assertFalse(cm.getAdditionalPropertiesIsAnyType()); } @@ -2630,8 +2630,8 @@ public class DefaultCodegenTest { String modelName; Schema sc; CodegenModel cm; - CodegenProperty anyTypeSchema = codegen.fromProperty("", new Schema()); - CodegenProperty stringCp = codegen.fromProperty("", new Schema().type("string")); + CodegenProperty anyTypeSchema = codegen.fromProperty("additional_properties", new Schema()); + CodegenProperty stringCp = codegen.fromProperty("additional_properties", new Schema().type("string")); CodegenProperty mapWithAddPropsUnset; CodegenProperty mapWithAddPropsTrue; CodegenProperty mapWithAddPropsFalse; @@ -2691,8 +2691,8 @@ public class DefaultCodegenTest { Operation operation; CodegenOperation co; - CodegenProperty anyTypeSchema = codegen.fromProperty("", new Schema()); - CodegenProperty stringCp = codegen.fromProperty("", new Schema().type("string")); + CodegenProperty anyTypeSchema = codegen.fromProperty("additional_properties", new Schema()); + CodegenProperty stringCp = codegen.fromProperty("additional_properties", new Schema().type("string")); CodegenParameter mapWithAddPropsUnset; CodegenParameter mapWithAddPropsTrue; CodegenParameter mapWithAddPropsFalse; @@ -2752,8 +2752,8 @@ public class DefaultCodegenTest { Operation operation; CodegenOperation co; - CodegenProperty anyTypeSchema = codegen.fromProperty("", new Schema()); - CodegenProperty stringCp = codegen.fromProperty("", new Schema().type("string")); + CodegenProperty anyTypeSchema = codegen.fromProperty("additional_properties", new Schema()); + CodegenProperty stringCp = codegen.fromProperty("additional_properties", new Schema().type("string")); CodegenResponse mapWithAddPropsUnset; CodegenResponse mapWithAddPropsTrue; CodegenResponse mapWithAddPropsFalse; @@ -2808,7 +2808,7 @@ public class DefaultCodegenTest { final DefaultCodegen codegen = new DefaultCodegen(); codegen.setOpenAPI(openAPI); - CodegenProperty anyTypeSchema = codegen.fromProperty("", new Schema()); + CodegenProperty anyTypeSchema = codegen.fromProperty("additional_properties", new Schema()); Schema sc; CodegenModel cm; diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonClientTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonClientTest.java index 698aaf89db..8a4cbe73d3 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonClientTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonClientTest.java @@ -233,4 +233,30 @@ public class PythonClientTest { String importValue = codegen.toModelImport("model_name"); Assert.assertEquals(importValue, "from openapi.client.model.model_name import ModelName"); } + + @Test + public void testIdenticalSchemasHaveDifferentBasenames() { + final PythonClientCodegen codegen = new PythonClientCodegen(); + + Schema objSchema = new Schema(); + objSchema.setType("object"); + Schema addProp = new Schema(); + addProp.setType("object"); + objSchema.setAdditionalProperties(addProp); + + Schema arraySchema = new ArraySchema(); + Schema items = new Schema(); + items.setType("object"); + arraySchema.setItems(items); + + CodegenProperty objSchemaProp = codegen.fromProperty("objSchemaProp", objSchema, false, false); + CodegenProperty arraySchemaProp = codegen.fromProperty("arraySchemaProp", arraySchema, false, false); + Assert.assertEquals(objSchemaProp.getAdditionalProperties().baseName, "additional_properties"); + Assert.assertEquals(arraySchemaProp.getItems().baseName, "items"); + + CodegenModel objSchemaModel = codegen.fromModel("objSchemaModel", objSchema); + CodegenModel arraySchemaModel = codegen.fromModel("arraySchemaModel", arraySchema); + Assert.assertEquals(objSchemaModel.getAdditionalProperties().baseName, "additional_properties"); + Assert.assertEquals(arraySchemaModel.getItems().baseName, "items"); + } } \ No newline at end of file From 6bb6f1b28a5ac985f9c6bc9da6c0b12fe1001630 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Bustamante=20Morales?= <113986592+joselobm@users.noreply.github.com> Date: Wed, 23 Nov 2022 17:48:16 +0100 Subject: [PATCH 044/189] Upgrade typescript-axios from 0.26.1 to 0.27.2 (#14093) --- .../src/main/resources/typescript-axios/package.mustache | 2 +- .../petstore/typescript-axios/builds/es6-target/package.json | 2 +- .../with-npm-version-and-separate-models-and-api/package.json | 2 +- .../typescript-axios/builds/with-npm-version/package.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/typescript-axios/package.mustache b/modules/openapi-generator/src/main/resources/typescript-axios/package.mustache index 1232bced6c..4ba75b22a0 100644 --- a/modules/openapi-generator/src/main/resources/typescript-axios/package.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-axios/package.mustache @@ -26,7 +26,7 @@ "prepare": "npm run build" }, "dependencies": { - "axios": "^0.26.1" + "axios": "^0.27.2" }, "devDependencies": { "@types/node": "^12.11.5", diff --git a/samples/client/petstore/typescript-axios/builds/es6-target/package.json b/samples/client/petstore/typescript-axios/builds/es6-target/package.json index 97126b0ed2..dc2da01a43 100644 --- a/samples/client/petstore/typescript-axios/builds/es6-target/package.json +++ b/samples/client/petstore/typescript-axios/builds/es6-target/package.json @@ -24,7 +24,7 @@ "prepare": "npm run build" }, "dependencies": { - "axios": "^0.26.1" + "axios": "^0.27.2" }, "devDependencies": { "@types/node": "^12.11.5", diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/package.json b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/package.json index d64b81bc9c..8569103e4e 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/package.json +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/package.json @@ -22,7 +22,7 @@ "prepare": "npm run build" }, "dependencies": { - "axios": "^0.26.1" + "axios": "^0.27.2" }, "devDependencies": { "@types/node": "^12.11.5", diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version/package.json b/samples/client/petstore/typescript-axios/builds/with-npm-version/package.json index d64b81bc9c..8569103e4e 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version/package.json +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version/package.json @@ -22,7 +22,7 @@ "prepare": "npm run build" }, "dependencies": { - "axios": "^0.26.1" + "axios": "^0.27.2" }, "devDependencies": { "@types/node": "^12.11.5", From 980062f2bb437bcfe7f25c6385ffcd2699dfdae6 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Thu, 24 Nov 2022 21:48:09 +0800 Subject: [PATCH 045/189] Improve Java native, apache-httpclient with better spec (#14109) * improve java native, apache client with better spec * fix java native async tests * regenerate java native tests --- bin/configs/java-apache-httpclient.yaml | 2 +- bin/configs/java-native-async.yaml | 2 +- bin/configs/java-native.yaml | 2 +- .../libraries/apache-httpclient/pom.mustache | 10 + .../.openapi-generator/FILES | 50 +- .../petstore/java/apache-httpclient/README.md | 46 +- .../java/apache-httpclient/api/openapi.yaml | 1061 ++++++++--------- .../docs/AdditionalPropertiesClass.md | 13 +- .../docs/AllOfWithSingleRef.md | 14 + .../apache-httpclient/docs/AnotherFakeApi.md | 8 +- .../java/apache-httpclient/docs/DefaultApi.md | 69 ++ .../docs/DeprecatedObject.md | 13 + .../java/apache-httpclient/docs/EnumTest.md | 3 + .../java/apache-httpclient/docs/FakeApi.md | 307 ++++- .../docs/FakeClassnameTags123Api.md | 8 +- .../java/apache-httpclient/docs/Foo.md | 13 + .../docs/FooGetDefaultResponse.md | 13 + .../java/apache-httpclient/docs/FormatTest.md | 4 +- .../docs/HealthCheckResult.md | 14 + .../apache-httpclient/docs/NullableClass.md | 24 + .../docs/ObjectWithDeprecatedFields.md | 16 + .../docs/OuterEnumDefaultValue.md | 15 + .../docs/OuterEnumInteger.md | 15 + .../docs/OuterEnumIntegerDefaultValue.md | 15 + .../docs/OuterObjectWithEnumProperty.md | 13 + .../java/apache-httpclient/docs/PetApi.md | 35 +- .../apache-httpclient/docs/SingleRefType.md | 13 + .../java/apache-httpclient/docs/StoreApi.md | 12 +- .../java/apache-httpclient/docs/UserApi.md | 50 +- .../petstore/java/apache-httpclient/pom.xml | 6 + .../org/openapitools/client/ApiClient.java | 65 +- .../client/api/AnotherFakeApi.java | 12 +- .../openapitools/client/api/DefaultApi.java | 101 ++ .../org/openapitools/client/api/FakeApi.java | 281 ++++- .../client/api/FakeClassnameTags123Api.java | 12 +- .../org/openapitools/client/api/PetApi.java | 24 +- .../org/openapitools/client/api/StoreApi.java | 14 +- .../org/openapitools/client/api/UserApi.java | 56 +- .../model/AdditionalPropertiesClass.java | 416 +------ .../client/model/AllOfWithSingleRef.java | 137 +++ .../org/openapitools/client/model/Animal.java | 2 - .../org/openapitools/client/model/Cat.java | 4 - .../client/model/DeprecatedObject.java | 106 ++ .../openapitools/client/model/EnumTest.java | 140 ++- .../org/openapitools/client/model/Foo.java | 104 ++ .../client/model/FooGetDefaultResponse.java | 106 ++ .../openapitools/client/model/FormatTest.java | 96 +- .../client/model/HealthCheckResult.java | 127 ++ .../client/model/NullableClass.java | 625 ++++++++++ .../model/ObjectWithDeprecatedFields.java | 218 ++++ .../openapitools/client/model/OuterEnum.java | 2 +- .../client/model/OuterEnumDefaultValue.java | 61 + .../client/model/OuterEnumInteger.java | 61 + .../model/OuterEnumIntegerDefaultValue.java | 61 + .../model/OuterObjectWithEnumProperty.java | 105 ++ .../client/model/SingleRefType.java | 59 + .../client/model/SpecialModelName.java | 6 +- .../client/api/DefaultApiTest.java | 47 + .../openapitools/client/api/FakeApiTest.java | 94 +- .../client/model/AllOfWithSingleRefTest.java} | 29 +- .../client/model/DeprecatedObjectTest.java} | 14 +- .../model/FooGetDefaultResponseTest.java} | 21 +- .../openapitools/client/model/FooTest.java} | 18 +- .../client/model/HealthCheckResultTest.java | 52 + .../client/model/NullableClassTest.java | 147 +++ .../ObjectWithDeprecatedFieldsTest.java} | 45 +- .../model/OuterEnumDefaultValueTest.java | 33 + .../OuterEnumIntegerDefaultValueTest.java | 33 + .../client/model/OuterEnumIntegerTest.java | 33 + .../OuterObjectWithEnumPropertyTest.java} | 21 +- .../client/model/SingleRefTypeTest.java | 33 + .../native-async/.openapi-generator/FILES | 50 +- .../petstore/java/native-async/README.md | 54 +- .../java/native-async/api/openapi.yaml | 1061 ++++++++--------- .../docs/AdditionalPropertiesClass.md | 13 +- .../native-async/docs/AllOfWithSingleRef.md | 14 + .../java/native-async/docs/AnotherFakeApi.md | 16 +- .../java/native-async/docs/DefaultApi.md | 141 +++ .../native-async/docs/DeprecatedObject.md | 13 + .../java/native-async/docs/EnumTest.md | 3 + .../java/native-async/docs/FakeApi.md | 655 ++++++++-- .../docs/FakeClassnameTags123Api.md | 16 +- .../petstore/java/native-async/docs/Foo.md | 13 + .../docs/FooGetDefaultResponse.md | 13 + .../java/native-async/docs/FormatTest.md | 4 +- .../native-async/docs/HealthCheckResult.md | 14 + .../java/native-async/docs/NullableClass.md | 24 + .../docs/ObjectWithDeprecatedFields.md | 16 + .../docs/OuterEnumDefaultValue.md | 15 + .../native-async/docs/OuterEnumInteger.md | 15 + .../docs/OuterEnumIntegerDefaultValue.md | 15 + .../docs/OuterObjectWithEnumProperty.md | 13 + .../petstore/java/native-async/docs/PetApi.md | 70 +- .../java/native-async/docs/SingleRefType.md | 13 + .../java/native-async/docs/StoreApi.md | 24 +- .../java/native-async/docs/UserApi.md | 100 +- .../client/api/AnotherFakeApi.java | 22 +- .../openapitools/client/api/DefaultApi.java | 164 +++ .../org/openapitools/client/api/FakeApi.java | 493 ++++++-- .../client/api/FakeClassnameTags123Api.java | 22 +- .../org/openapitools/client/api/PetApi.java | 44 +- .../org/openapitools/client/api/StoreApi.java | 22 +- .../org/openapitools/client/api/UserApi.java | 88 +- .../model/AdditionalPropertiesClass.java | 407 +------ .../client/model/AllOfWithSingleRef.java | 140 +++ .../org/openapitools/client/model/Animal.java | 3 - .../org/openapitools/client/model/Cat.java | 5 - .../client/model/DeprecatedObject.java | 110 ++ .../openapitools/client/model/EnumTest.java | 137 ++- .../org/openapitools/client/model/Foo.java | 108 ++ .../client/model/FooGetDefaultResponse.java | 109 ++ .../openapitools/client/model/FormatTest.java | 94 +- .../client/model/HealthCheckResult.java | 131 ++ .../client/model/NullableClass.java | 666 +++++++++++ .../model/ObjectWithDeprecatedFields.java | 219 ++++ .../openapitools/client/model/OuterEnum.java | 2 +- .../client/model/OuterEnumDefaultValue.java | 63 + .../client/model/OuterEnumInteger.java | 63 + .../model/OuterEnumIntegerDefaultValue.java | 63 + .../model/OuterObjectWithEnumProperty.java | 109 ++ .../client/model/SingleRefType.java | 61 + .../client/model/SpecialModelName.java | 6 +- .../client/api/AnotherFakeApiTest.java | 5 +- .../client/api/DefaultApiTest.java | 54 + .../openapitools/client/api/FakeApiTest.java | 101 +- .../api/FakeClassnameTags123ApiTest.java | 5 +- .../openapitools/client/api/PetApiTest.java | 13 +- .../openapitools/client/api/StoreApiTest.java | 5 +- .../openapitools/client/api/UserApiTest.java | 18 +- .../model/AdditionalPropertiesClassTest.java | 86 +- .../model/AdditionalPropertiesNumberTest.java | 51 - .../client/model/AllOfWithSingleRefTest.java | 57 + .../openapitools/client/model/AnimalTest.java | 1 - .../openapitools/client/model/BigCatTest.java | 76 -- .../openapitools/client/model/CatTest.java | 1 - ...ectTest.java => DeprecatedObjectTest.java} | 14 +- .../client/model/EnumTestTest.java | 31 + .../model/FooGetDefaultResponseTest.java | 49 + .../{BigCatAllOfTest.java => FooTest.java} | 18 +- .../client/model/FormatTestTest.java | 22 +- .../client/model/HealthCheckResultTest.java | 52 + .../client/model/NullableClassTest.java | 147 +++ ...va => ObjectWithDeprecatedFieldsTest.java} | 45 +- .../model/OuterEnumDefaultValueTest.java | 33 + .../OuterEnumIntegerDefaultValueTest.java | 33 + .../client/model/OuterEnumIntegerTest.java | 33 + ...a => OuterObjectWithEnumPropertyTest.java} | 22 +- .../client/model/SingleRefTypeTest.java | 33 + .../client/model/TypeHolderExampleTest.java | 91 -- .../client/model/XmlItemTest.java | 275 ----- .../java/native/.openapi-generator/FILES | 50 +- samples/client/petstore/java/native/README.md | 54 +- .../petstore/java/native/api/openapi.yaml | 1061 ++++++++--------- .../native/docs/AdditionalPropertiesClass.md | 13 +- .../java/native/docs/AllOfWithSingleRef.md | 14 + .../java/native/docs/AnotherFakeApi.md | 16 +- .../petstore/java/native/docs/DefaultApi.md | 132 ++ .../java/native/docs/DeprecatedObject.md | 13 + .../petstore/java/native/docs/EnumTest.md | 3 + .../petstore/java/native/docs/FakeApi.md | 626 ++++++++-- .../native/docs/FakeClassnameTags123Api.md | 16 +- .../client/petstore/java/native/docs/Foo.md | 13 + .../java/native/docs/FooGetDefaultResponse.md | 13 + .../petstore/java/native/docs/FormatTest.md | 4 +- .../java/native/docs/HealthCheckResult.md | 14 + .../java/native/docs/NullableClass.md | 24 + .../native/docs/ObjectWithDeprecatedFields.md | 16 + .../java/native/docs/OuterEnumDefaultValue.md | 15 + .../java/native/docs/OuterEnumInteger.md | 15 + .../docs/OuterEnumIntegerDefaultValue.md | 15 + .../docs/OuterObjectWithEnumProperty.md | 13 + .../petstore/java/native/docs/PetApi.md | 70 +- .../java/native/docs/SingleRefType.md | 13 + .../petstore/java/native/docs/StoreApi.md | 24 +- .../petstore/java/native/docs/UserApi.md | 100 +- .../client/api/AnotherFakeApi.java | 22 +- .../openapitools/client/api/DefaultApi.java | 144 +++ .../org/openapitools/client/api/FakeApi.java | 443 +++++-- .../client/api/FakeClassnameTags123Api.java | 22 +- .../org/openapitools/client/api/PetApi.java | 44 +- .../org/openapitools/client/api/StoreApi.java | 22 +- .../org/openapitools/client/api/UserApi.java | 88 +- .../model/AdditionalPropertiesClass.java | 407 +------ .../client/model/AllOfWithSingleRef.java | 140 +++ .../org/openapitools/client/model/Animal.java | 3 - .../org/openapitools/client/model/Cat.java | 5 - .../client/model/DeprecatedObject.java | 110 ++ .../openapitools/client/model/EnumTest.java | 137 ++- .../org/openapitools/client/model/Foo.java | 108 ++ .../client/model/FooGetDefaultResponse.java | 109 ++ .../openapitools/client/model/FormatTest.java | 94 +- .../client/model/HealthCheckResult.java | 131 ++ .../client/model/NullableClass.java | 666 +++++++++++ .../model/ObjectWithDeprecatedFields.java | 219 ++++ .../openapitools/client/model/OuterEnum.java | 2 +- .../client/model/OuterEnumDefaultValue.java | 63 + .../client/model/OuterEnumInteger.java | 63 + .../model/OuterEnumIntegerDefaultValue.java | 63 + .../model/OuterObjectWithEnumProperty.java | 109 ++ .../client/model/SingleRefType.java | 61 + .../client/model/SpecialModelName.java | 6 +- .../client/api/AnotherFakeApiTest.java | 5 +- .../client/api/DefaultApiTest.java | 53 + .../openapitools/client/api/FakeApiTest.java | 101 +- .../api/FakeClassnameTags123ApiTest.java | 5 +- .../openapitools/client/api/PetApiTest.java | 13 +- .../openapitools/client/api/StoreApiTest.java | 5 +- .../openapitools/client/api/UserApiTest.java | 18 +- .../AdditionalPropertiesAnyTypeTest.java | 50 - .../model/AdditionalPropertiesArrayTest.java | 51 - .../AdditionalPropertiesBooleanTest.java | 50 - .../model/AdditionalPropertiesClassTest.java | 86 +- .../AdditionalPropertiesIntegerTest.java | 50 - .../model/AdditionalPropertiesNumberTest.java | 51 - .../client/model/AllOfWithSingleRefTest.java | 57 + .../openapitools/client/model/AnimalTest.java | 1 - .../openapitools/client/model/CatTest.java | 1 - ...ingTest.java => DeprecatedObjectTest.java} | 14 +- .../client/model/EnumTestTest.java | 31 + .../model/FooGetDefaultResponseTest.java | 49 + .../openapitools/client/model/FooTest.java | 48 + .../client/model/FormatTestTest.java | 22 +- .../client/model/HealthCheckResultTest.java | 52 + .../client/model/NullableClassTest.java | 147 +++ ...va => ObjectWithDeprecatedFieldsTest.java} | 44 +- .../model/OuterEnumDefaultValueTest.java | 33 + .../OuterEnumIntegerDefaultValueTest.java | 33 + .../client/model/OuterEnumIntegerTest.java | 33 + .../OuterObjectWithEnumPropertyTest.java} | 21 +- .../client/model/SingleRefTypeTest.java | 33 + .../client/model/TypeHolderExampleTest.java | 91 -- .../client/model/XmlItemTest.java | 275 ----- 232 files changed, 14186 insertions(+), 5559 deletions(-) create mode 100644 samples/client/petstore/java/apache-httpclient/docs/AllOfWithSingleRef.md create mode 100644 samples/client/petstore/java/apache-httpclient/docs/DefaultApi.md create mode 100644 samples/client/petstore/java/apache-httpclient/docs/DeprecatedObject.md create mode 100644 samples/client/petstore/java/apache-httpclient/docs/Foo.md create mode 100644 samples/client/petstore/java/apache-httpclient/docs/FooGetDefaultResponse.md create mode 100644 samples/client/petstore/java/apache-httpclient/docs/HealthCheckResult.md create mode 100644 samples/client/petstore/java/apache-httpclient/docs/NullableClass.md create mode 100644 samples/client/petstore/java/apache-httpclient/docs/ObjectWithDeprecatedFields.md create mode 100644 samples/client/petstore/java/apache-httpclient/docs/OuterEnumDefaultValue.md create mode 100644 samples/client/petstore/java/apache-httpclient/docs/OuterEnumInteger.md create mode 100644 samples/client/petstore/java/apache-httpclient/docs/OuterEnumIntegerDefaultValue.md create mode 100644 samples/client/petstore/java/apache-httpclient/docs/OuterObjectWithEnumProperty.md create mode 100644 samples/client/petstore/java/apache-httpclient/docs/SingleRefType.md create mode 100644 samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/DefaultApi.java create mode 100644 samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java create mode 100644 samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/DeprecatedObject.java create mode 100644 samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Foo.java create mode 100644 samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java create mode 100644 samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/HealthCheckResult.java create mode 100644 samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/NullableClass.java create mode 100644 samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java create mode 100644 samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java create mode 100644 samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/OuterEnumInteger.java create mode 100644 samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java create mode 100644 samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java create mode 100644 samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/SingleRefType.java create mode 100644 samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/api/DefaultApiTest.java rename samples/client/petstore/java/{native-async/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java => apache-httpclient/src/test/java/org/openapitools/client/model/AllOfWithSingleRefTest.java} (60%) rename samples/client/petstore/java/{native-async/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java => apache-httpclient/src/test/java/org/openapitools/client/model/DeprecatedObjectTest.java} (71%) rename samples/client/petstore/java/{native/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java => apache-httpclient/src/test/java/org/openapitools/client/model/FooGetDefaultResponseTest.java} (65%) rename samples/client/petstore/java/{native/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java => apache-httpclient/src/test/java/org/openapitools/client/model/FooTest.java} (73%) create mode 100644 samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/HealthCheckResultTest.java create mode 100644 samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/NullableClassTest.java rename samples/client/petstore/java/{native/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java => apache-httpclient/src/test/java/org/openapitools/client/model/ObjectWithDeprecatedFieldsTest.java} (55%) create mode 100644 samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/OuterEnumDefaultValueTest.java create mode 100644 samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/OuterEnumIntegerDefaultValueTest.java create mode 100644 samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/OuterEnumIntegerTest.java rename samples/client/petstore/java/{native-async/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java => apache-httpclient/src/test/java/org/openapitools/client/model/OuterObjectWithEnumPropertyTest.java} (64%) create mode 100644 samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/SingleRefTypeTest.java create mode 100644 samples/client/petstore/java/native-async/docs/AllOfWithSingleRef.md create mode 100644 samples/client/petstore/java/native-async/docs/DefaultApi.md create mode 100644 samples/client/petstore/java/native-async/docs/DeprecatedObject.md create mode 100644 samples/client/petstore/java/native-async/docs/Foo.md create mode 100644 samples/client/petstore/java/native-async/docs/FooGetDefaultResponse.md create mode 100644 samples/client/petstore/java/native-async/docs/HealthCheckResult.md create mode 100644 samples/client/petstore/java/native-async/docs/NullableClass.md create mode 100644 samples/client/petstore/java/native-async/docs/ObjectWithDeprecatedFields.md create mode 100644 samples/client/petstore/java/native-async/docs/OuterEnumDefaultValue.md create mode 100644 samples/client/petstore/java/native-async/docs/OuterEnumInteger.md create mode 100644 samples/client/petstore/java/native-async/docs/OuterEnumIntegerDefaultValue.md create mode 100644 samples/client/petstore/java/native-async/docs/OuterObjectWithEnumProperty.md create mode 100644 samples/client/petstore/java/native-async/docs/SingleRefType.md create mode 100644 samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/DefaultApi.java create mode 100644 samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java create mode 100644 samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/DeprecatedObject.java create mode 100644 samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/Foo.java create mode 100644 samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java create mode 100644 samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/HealthCheckResult.java create mode 100644 samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/NullableClass.java create mode 100644 samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java create mode 100644 samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java create mode 100644 samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/OuterEnumInteger.java create mode 100644 samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java create mode 100644 samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java create mode 100644 samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/SingleRefType.java create mode 100644 samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/api/DefaultApiTest.java delete mode 100644 samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java create mode 100644 samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/AllOfWithSingleRefTest.java delete mode 100644 samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/BigCatTest.java rename samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/{AdditionalPropertiesObjectTest.java => DeprecatedObjectTest.java} (71%) create mode 100644 samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/FooGetDefaultResponseTest.java rename samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/{BigCatAllOfTest.java => FooTest.java} (73%) create mode 100644 samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/HealthCheckResultTest.java create mode 100644 samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/NullableClassTest.java rename samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/{TypeHolderDefaultTest.java => ObjectWithDeprecatedFieldsTest.java} (55%) create mode 100644 samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/OuterEnumDefaultValueTest.java create mode 100644 samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/OuterEnumIntegerDefaultValueTest.java create mode 100644 samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/OuterEnumIntegerTest.java rename samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/{AdditionalPropertiesArrayTest.java => OuterObjectWithEnumPropertyTest.java} (64%) create mode 100644 samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/SingleRefTypeTest.java delete mode 100644 samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java delete mode 100644 samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/XmlItemTest.java create mode 100644 samples/client/petstore/java/native/docs/AllOfWithSingleRef.md create mode 100644 samples/client/petstore/java/native/docs/DefaultApi.md create mode 100644 samples/client/petstore/java/native/docs/DeprecatedObject.md create mode 100644 samples/client/petstore/java/native/docs/Foo.md create mode 100644 samples/client/petstore/java/native/docs/FooGetDefaultResponse.md create mode 100644 samples/client/petstore/java/native/docs/HealthCheckResult.md create mode 100644 samples/client/petstore/java/native/docs/NullableClass.md create mode 100644 samples/client/petstore/java/native/docs/ObjectWithDeprecatedFields.md create mode 100644 samples/client/petstore/java/native/docs/OuterEnumDefaultValue.md create mode 100644 samples/client/petstore/java/native/docs/OuterEnumInteger.md create mode 100644 samples/client/petstore/java/native/docs/OuterEnumIntegerDefaultValue.md create mode 100644 samples/client/petstore/java/native/docs/OuterObjectWithEnumProperty.md create mode 100644 samples/client/petstore/java/native/docs/SingleRefType.md create mode 100644 samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/DefaultApi.java create mode 100644 samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java create mode 100644 samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/DeprecatedObject.java create mode 100644 samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Foo.java create mode 100644 samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java create mode 100644 samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/HealthCheckResult.java create mode 100644 samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/NullableClass.java create mode 100644 samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java create mode 100644 samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java create mode 100644 samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/OuterEnumInteger.java create mode 100644 samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java create mode 100644 samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java create mode 100644 samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/SingleRefType.java create mode 100644 samples/client/petstore/java/native/src/test/java/org/openapitools/client/api/DefaultApiTest.java delete mode 100644 samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java delete mode 100644 samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java delete mode 100644 samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java delete mode 100644 samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java delete mode 100644 samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java create mode 100644 samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/AllOfWithSingleRefTest.java rename samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/{AdditionalPropertiesStringTest.java => DeprecatedObjectTest.java} (71%) create mode 100644 samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/FooGetDefaultResponseTest.java create mode 100644 samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/FooTest.java create mode 100644 samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/HealthCheckResultTest.java create mode 100644 samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/NullableClassTest.java rename samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/{BigCatTest.java => ObjectWithDeprecatedFieldsTest.java} (53%) create mode 100644 samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/OuterEnumDefaultValueTest.java create mode 100644 samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/OuterEnumIntegerDefaultValueTest.java create mode 100644 samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/OuterEnumIntegerTest.java rename samples/client/petstore/java/{native-async/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java => native/src/test/java/org/openapitools/client/model/OuterObjectWithEnumPropertyTest.java} (64%) create mode 100644 samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/SingleRefTypeTest.java delete mode 100644 samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java delete mode 100644 samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/XmlItemTest.java diff --git a/bin/configs/java-apache-httpclient.yaml b/bin/configs/java-apache-httpclient.yaml index 5696973f86..d08233fecd 100644 --- a/bin/configs/java-apache-httpclient.yaml +++ b/bin/configs/java-apache-httpclient.yaml @@ -1,7 +1,7 @@ generatorName: java outputDir: samples/client/petstore/java/apache-httpclient library: apache-httpclient -inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml templateDir: modules/openapi-generator/src/main/resources/Java additionalProperties: artifactId: petstore-apache-httpclient diff --git a/bin/configs/java-native-async.yaml b/bin/configs/java-native-async.yaml index eb95d524a2..25fc601fb8 100644 --- a/bin/configs/java-native-async.yaml +++ b/bin/configs/java-native-async.yaml @@ -1,7 +1,7 @@ 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 +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml templateDir: modules/openapi-generator/src/main/resources/Java additionalProperties: artifactId: petstore-native diff --git a/bin/configs/java-native.yaml b/bin/configs/java-native.yaml index 1425976525..0ec877a86f 100644 --- a/bin/configs/java-native.yaml +++ b/bin/configs/java-native.yaml @@ -1,7 +1,7 @@ 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 +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml templateDir: modules/openapi-generator/src/main/resources/Java additionalProperties: artifactId: petstore-native diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/pom.mustache index 6fcea8fe9f..343f4334bd 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/pom.mustache @@ -311,6 +311,13 @@ provided {{/parcelableModel}} + {{#openApiNullable}} + + org.openapitools + jackson-databind-nullable + ${jackson-databind-nullable-version} + + {{/openApiNullable}} jakarta.annotation jakarta.annotation-api @@ -331,6 +338,9 @@ 4.5.13 2.13.4 2.13.4.2 +{{#openApiNullable}} + 0.2.4 +{{/openApiNullable}} 1.3.5 {{#useBeanValidation}} 2.0.2 diff --git a/samples/client/petstore/java/apache-httpclient/.openapi-generator/FILES b/samples/client/petstore/java/apache-httpclient/.openapi-generator/FILES index 18764e6e50..46568169f6 100644 --- a/samples/client/petstore/java/apache-httpclient/.openapi-generator/FILES +++ b/samples/client/petstore/java/apache-httpclient/.openapi-generator/FILES @@ -5,27 +5,21 @@ README.md api/openapi.yaml build.gradle build.sbt -docs/AdditionalPropertiesAnyType.md -docs/AdditionalPropertiesArray.md -docs/AdditionalPropertiesBoolean.md docs/AdditionalPropertiesClass.md -docs/AdditionalPropertiesInteger.md -docs/AdditionalPropertiesNumber.md -docs/AdditionalPropertiesObject.md -docs/AdditionalPropertiesString.md +docs/AllOfWithSingleRef.md docs/Animal.md docs/AnotherFakeApi.md docs/ArrayOfArrayOfNumberOnly.md docs/ArrayOfNumberOnly.md docs/ArrayTest.md -docs/BigCat.md -docs/BigCatAllOf.md docs/Capitalization.md docs/Cat.md docs/CatAllOf.md docs/Category.md docs/ClassModel.md docs/Client.md +docs/DefaultApi.md +docs/DeprecatedObject.md docs/Dog.md docs/DogAllOf.md docs/EnumArrays.md @@ -34,8 +28,11 @@ docs/EnumTest.md docs/FakeApi.md docs/FakeClassnameTags123Api.md docs/FileSchemaTestClass.md +docs/Foo.md +docs/FooGetDefaultResponse.md docs/FormatTest.md docs/HasOnlyReadOnly.md +docs/HealthCheckResult.md docs/MapTest.md docs/MixedPropertiesAndAdditionalPropertiesClass.md docs/Model200Response.md @@ -44,21 +41,25 @@ docs/ModelFile.md docs/ModelList.md docs/ModelReturn.md docs/Name.md +docs/NullableClass.md docs/NumberOnly.md +docs/ObjectWithDeprecatedFields.md docs/Order.md docs/OuterComposite.md docs/OuterEnum.md +docs/OuterEnumDefaultValue.md +docs/OuterEnumInteger.md +docs/OuterEnumIntegerDefaultValue.md +docs/OuterObjectWithEnumProperty.md docs/Pet.md docs/PetApi.md docs/ReadOnlyFirst.md +docs/SingleRefType.md docs/SpecialModelName.md docs/StoreApi.md docs/Tag.md -docs/TypeHolderDefault.md -docs/TypeHolderExample.md docs/User.md docs/UserApi.md -docs/XmlItem.md git_push.sh gradle.properties gradle/wrapper/gradle-wrapper.jar @@ -78,6 +79,7 @@ src/main/java/org/openapitools/client/ServerConfiguration.java src/main/java/org/openapitools/client/ServerVariable.java src/main/java/org/openapitools/client/StringUtil.java src/main/java/org/openapitools/client/api/AnotherFakeApi.java +src/main/java/org/openapitools/client/api/DefaultApi.java src/main/java/org/openapitools/client/api/FakeApi.java src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java src/main/java/org/openapitools/client/api/PetApi.java @@ -89,34 +91,30 @@ src/main/java/org/openapitools/client/auth/HttpBasicAuth.java src/main/java/org/openapitools/client/auth/HttpBearerAuth.java src/main/java/org/openapitools/client/auth/OAuth.java src/main/java/org/openapitools/client/auth/OAuthFlow.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java +src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java src/main/java/org/openapitools/client/model/Animal.java src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayTest.java -src/main/java/org/openapitools/client/model/BigCat.java -src/main/java/org/openapitools/client/model/BigCatAllOf.java src/main/java/org/openapitools/client/model/Capitalization.java src/main/java/org/openapitools/client/model/Cat.java src/main/java/org/openapitools/client/model/CatAllOf.java src/main/java/org/openapitools/client/model/Category.java src/main/java/org/openapitools/client/model/ClassModel.java src/main/java/org/openapitools/client/model/Client.java +src/main/java/org/openapitools/client/model/DeprecatedObject.java src/main/java/org/openapitools/client/model/Dog.java src/main/java/org/openapitools/client/model/DogAllOf.java src/main/java/org/openapitools/client/model/EnumArrays.java src/main/java/org/openapitools/client/model/EnumClass.java src/main/java/org/openapitools/client/model/EnumTest.java src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +src/main/java/org/openapitools/client/model/Foo.java +src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java src/main/java/org/openapitools/client/model/FormatTest.java src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +src/main/java/org/openapitools/client/model/HealthCheckResult.java src/main/java/org/openapitools/client/model/MapTest.java src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java src/main/java/org/openapitools/client/model/Model200Response.java @@ -125,15 +123,19 @@ src/main/java/org/openapitools/client/model/ModelFile.java src/main/java/org/openapitools/client/model/ModelList.java src/main/java/org/openapitools/client/model/ModelReturn.java src/main/java/org/openapitools/client/model/Name.java +src/main/java/org/openapitools/client/model/NullableClass.java src/main/java/org/openapitools/client/model/NumberOnly.java +src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java src/main/java/org/openapitools/client/model/Order.java src/main/java/org/openapitools/client/model/OuterComposite.java src/main/java/org/openapitools/client/model/OuterEnum.java +src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java +src/main/java/org/openapitools/client/model/OuterEnumInteger.java +src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java +src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java src/main/java/org/openapitools/client/model/Pet.java src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +src/main/java/org/openapitools/client/model/SingleRefType.java src/main/java/org/openapitools/client/model/SpecialModelName.java src/main/java/org/openapitools/client/model/Tag.java -src/main/java/org/openapitools/client/model/TypeHolderDefault.java -src/main/java/org/openapitools/client/model/TypeHolderExample.java src/main/java/org/openapitools/client/model/User.java -src/main/java/org/openapitools/client/model/XmlItem.java diff --git a/samples/client/petstore/java/apache-httpclient/README.md b/samples/client/petstore/java/apache-httpclient/README.md index ca5ccc9a78..cc099907a8 100644 --- a/samples/client/petstore/java/apache-httpclient/README.md +++ b/samples/client/petstore/java/apache-httpclient/README.md @@ -84,9 +84,9 @@ public class AnotherFakeApiExample { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); - Client body = new Client(); // Client | client model + Client client = new Client(); // Client | client model try { - Client result = apiInstance.call123testSpecialTags(body); + Client result = apiInstance.call123testSpecialTags(client); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); @@ -107,15 +107,19 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- *AnotherFakeApi* | [**call123testSpecialTags**](docs/AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags -*FakeApi* | [**createXmlItem**](docs/FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem +*DefaultApi* | [**fooGet**](docs/DefaultApi.md#fooGet) | **GET** /foo | +*FakeApi* | [**fakeHealthGet**](docs/FakeApi.md#fakeHealthGet) | **GET** /fake/health | Health check endpoint +*FakeApi* | [**fakeHttpSignatureTest**](docs/FakeApi.md#fakeHttpSignatureTest) | **GET** /fake/http-signature-test | test http signature authentication *FakeApi* | [**fakeOuterBooleanSerialize**](docs/FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | *FakeApi* | [**fakeOuterCompositeSerialize**](docs/FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | *FakeApi* | [**fakeOuterNumberSerialize**](docs/FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | *FakeApi* | [**fakeOuterStringSerialize**](docs/FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | +*FakeApi* | [**fakePropertyEnumIntegerSerialize**](docs/FakeApi.md#fakePropertyEnumIntegerSerialize) | **POST** /fake/property/enum-int | +*FakeApi* | [**testBodyWithBinary**](docs/FakeApi.md#testBodyWithBinary) | **PUT** /fake/body-with-binary | *FakeApi* | [**testBodyWithFileSchema**](docs/FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | *FakeApi* | [**testBodyWithQueryParams**](docs/FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | *FakeApi* | [**testClientModel**](docs/FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model -*FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *FakeApi* | [**testEnumParameters**](docs/FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters *FakeApi* | [**testGroupParameters**](docs/FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) *FakeApi* | [**testInlineAdditionalProperties**](docs/FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties @@ -147,34 +151,30 @@ Class | Method | HTTP request | Description ## Documentation for Models - - [AdditionalPropertiesAnyType](docs/AdditionalPropertiesAnyType.md) - - [AdditionalPropertiesArray](docs/AdditionalPropertiesArray.md) - - [AdditionalPropertiesBoolean](docs/AdditionalPropertiesBoolean.md) - [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) - - [AdditionalPropertiesInteger](docs/AdditionalPropertiesInteger.md) - - [AdditionalPropertiesNumber](docs/AdditionalPropertiesNumber.md) - - [AdditionalPropertiesObject](docs/AdditionalPropertiesObject.md) - - [AdditionalPropertiesString](docs/AdditionalPropertiesString.md) + - [AllOfWithSingleRef](docs/AllOfWithSingleRef.md) - [Animal](docs/Animal.md) - [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) - [ArrayTest](docs/ArrayTest.md) - - [BigCat](docs/BigCat.md) - - [BigCatAllOf](docs/BigCatAllOf.md) - [Capitalization](docs/Capitalization.md) - [Cat](docs/Cat.md) - [CatAllOf](docs/CatAllOf.md) - [Category](docs/Category.md) - [ClassModel](docs/ClassModel.md) - [Client](docs/Client.md) + - [DeprecatedObject](docs/DeprecatedObject.md) - [Dog](docs/Dog.md) - [DogAllOf](docs/DogAllOf.md) - [EnumArrays](docs/EnumArrays.md) - [EnumClass](docs/EnumClass.md) - [EnumTest](docs/EnumTest.md) - [FileSchemaTestClass](docs/FileSchemaTestClass.md) + - [Foo](docs/Foo.md) + - [FooGetDefaultResponse](docs/FooGetDefaultResponse.md) - [FormatTest](docs/FormatTest.md) - [HasOnlyReadOnly](docs/HasOnlyReadOnly.md) + - [HealthCheckResult](docs/HealthCheckResult.md) - [MapTest](docs/MapTest.md) - [MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md) - [Model200Response](docs/Model200Response.md) @@ -183,18 +183,22 @@ Class | Method | HTTP request | Description - [ModelList](docs/ModelList.md) - [ModelReturn](docs/ModelReturn.md) - [Name](docs/Name.md) + - [NullableClass](docs/NullableClass.md) - [NumberOnly](docs/NumberOnly.md) + - [ObjectWithDeprecatedFields](docs/ObjectWithDeprecatedFields.md) - [Order](docs/Order.md) - [OuterComposite](docs/OuterComposite.md) - [OuterEnum](docs/OuterEnum.md) + - [OuterEnumDefaultValue](docs/OuterEnumDefaultValue.md) + - [OuterEnumInteger](docs/OuterEnumInteger.md) + - [OuterEnumIntegerDefaultValue](docs/OuterEnumIntegerDefaultValue.md) + - [OuterObjectWithEnumProperty](docs/OuterObjectWithEnumProperty.md) - [Pet](docs/Pet.md) - [ReadOnlyFirst](docs/ReadOnlyFirst.md) + - [SingleRefType](docs/SingleRefType.md) - [SpecialModelName](docs/SpecialModelName.md) - [Tag](docs/Tag.md) - - [TypeHolderDefault](docs/TypeHolderDefault.md) - - [TypeHolderExample](docs/TypeHolderExample.md) - [User](docs/User.md) - - [XmlItem](docs/XmlItem.md) ## Documentation for Authorization @@ -214,9 +218,19 @@ Authentication schemes defined for the API: - **API key parameter name**: api_key_query - **Location**: URL query string +### bearer_test + + +- **Type**: HTTP basic authentication + ### http_basic_test +- **Type**: HTTP basic authentication + +### http_signature_test + + - **Type**: HTTP basic authentication ### petstore_auth diff --git a/samples/client/petstore/java/apache-httpclient/api/openapi.yaml b/samples/client/petstore/java/apache-httpclient/api/openapi.yaml index e7e17402f6..f9cbedf1e4 100644 --- a/samples/client/petstore/java/apache-httpclient/api/openapi.yaml +++ b/samples/client/petstore/java/apache-httpclient/api/openapi.yaml @@ -1,4 +1,4 @@ -openapi: 3.0.1 +openapi: 3.0.0 info: description: "This spec is mainly for testing Petstore server and contains fake\ \ endpoints, models. Please do not use this for any other purpose. Special characters:\ @@ -9,7 +9,30 @@ info: title: OpenAPI Petstore version: 1.0.0 servers: -- url: http://petstore.swagger.io:80/v2 +- description: petstore server + url: "http://{server}.swagger.io:{port}/v2" + variables: + server: + default: petstore + enum: + - petstore + - qa-petstore + - dev-petstore + port: + default: "80" + enum: + - "80" + - "8080" +- description: The local server + url: "https://localhost:8080/{version}" + variables: + version: + default: v2 + enum: + - v1 + - v2 +- description: The local server without variables + url: https://127.0.0.1/no_varaible tags: - description: Everything about your Pets name: pet @@ -18,25 +41,26 @@ tags: - description: Operations about user name: user paths: + /foo: + get: + responses: + default: + content: + application/json: + schema: + $ref: '#/components/schemas/_foo_get_default_response' + description: response + x-accepts: application/json /pet: post: + description: "" operationId: addPet requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Pet' - application/xml: - schema: - $ref: '#/components/schemas/Pet' - description: Pet object that needs to be added to the store - required: true + $ref: '#/components/requestBodies/Pet' responses: "200": - content: {} - description: successful operation + description: Successful operation "405": - content: {} description: Invalid input security: - petstore_auth: @@ -45,33 +69,21 @@ paths: summary: Add a new pet to the store tags: - pet - x-codegen-request-body-name: body x-content-type: application/json x-accepts: application/json put: + description: "" operationId: updatePet requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Pet' - application/xml: - schema: - $ref: '#/components/schemas/Pet' - description: Pet object that needs to be added to the store - required: true + $ref: '#/components/requestBodies/Pet' responses: "200": - content: {} - description: successful operation + description: Successful operation "400": - content: {} description: Invalid ID supplied "404": - content: {} description: Pet not found "405": - content: {} description: Validation exception security: - petstore_auth: @@ -80,15 +92,34 @@ paths: summary: Update an existing pet tags: - pet - x-codegen-request-body-name: body + x-webclient-blocking: true x-content-type: application/json x-accepts: application/json + servers: + - url: http://petstore.swagger.io/v2 + - url: http://path-server-test.petstore.local/v2 + - description: test server with variables + url: "http://{server}.swagger.io:{port}/v2" + variables: + server: + default: petstore + description: target server + enum: + - petstore + - qa-petstore + - dev-petstore + port: + default: "80" + enum: + - "80" + - "8080" /pet/findByStatus: get: description: Multiple status values can be provided with comma separated strings operationId: findPetsByStatus parameters: - - description: Status values that need to be considered for filter + - deprecated: true + description: Status values that need to be considered for filter explode: false in: query name: status @@ -118,7 +149,6 @@ paths: type: array description: successful operation "400": - content: {} description: Invalid status value security: - petstore_auth: @@ -127,6 +157,7 @@ paths: summary: Finds Pets by status tags: - pet + x-webclient-blocking: true x-accepts: application/json /pet/findByTags: get: @@ -163,7 +194,6 @@ paths: uniqueItems: true description: successful operation "400": - content: {} description: Invalid tag value security: - petstore_auth: @@ -172,28 +202,33 @@ paths: summary: Finds Pets by tags tags: - pet + x-webclient-blocking: true x-accepts: application/json /pet/{petId}: delete: + description: "" operationId: deletePet parameters: - - in: header + - explode: false + in: header name: api_key + required: false schema: type: string + style: simple - description: Pet id to delete + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple responses: "200": - content: {} - description: successful operation + description: Successful operation "400": - content: {} description: Invalid pet value security: - petstore_auth: @@ -208,12 +243,14 @@ paths: operationId: getPetById parameters: - description: ID of pet to return + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple responses: "200": content: @@ -225,35 +262,38 @@ paths: $ref: '#/components/schemas/Pet' description: successful operation "400": - content: {} description: Invalid ID supplied "404": - content: {} description: Pet not found security: - api_key: [] summary: Find pet by ID tags: - pet + x-webclient-blocking: true x-accepts: application/json post: + description: "" operationId: updatePetWithForm parameters: - description: ID of pet that needs to be updated + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple requestBody: content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/updatePetWithForm_request' responses: + "200": + description: Successful operation "405": - content: {} description: Invalid input security: - petstore_auth: @@ -266,15 +306,18 @@ paths: x-accepts: application/json /pet/{petId}/uploadImage: post: + description: "" operationId: uploadFile parameters: - description: ID of pet to update + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple requestBody: content: multipart/form-data: @@ -318,10 +361,11 @@ paths: x-accepts: application/json /store/order: post: + description: "" operationId: placeOrder requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/Order' description: order placed for purchasing the pet @@ -337,13 +381,11 @@ paths: $ref: '#/components/schemas/Order' description: successful operation "400": - content: {} description: Invalid Order summary: Place an order for a pet tags: - store - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: application/json /store/order/{order_id}: delete: @@ -352,17 +394,17 @@ paths: operationId: deleteOrder parameters: - description: ID of the order that needs to be deleted + explode: false in: path name: order_id required: true schema: type: string + style: simple responses: "400": - content: {} description: Invalid ID supplied "404": - content: {} description: Order not found summary: Delete purchase order by ID tags: @@ -374,6 +416,7 @@ paths: operationId: getOrderById parameters: - description: ID of pet that needs to be fetched + explode: false in: path name: order_id required: true @@ -382,6 +425,7 @@ paths: maximum: 5 minimum: 1 type: integer + style: simple responses: "200": content: @@ -393,10 +437,8 @@ paths: $ref: '#/components/schemas/Order' description: successful operation "400": - content: {} description: Invalid ID supplied "404": - content: {} description: Order not found summary: Find purchase order by ID tags: @@ -408,81 +450,68 @@ paths: operationId: createUser requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/User' description: Created user object required: true responses: default: - content: {} description: successful operation summary: Create user tags: - user - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: application/json /user/createWithArray: post: + description: "" operationId: createUsersWithArrayInput requestBody: - content: - '*/*': - schema: - items: - $ref: '#/components/schemas/User' - type: array - description: List of user object - required: true + $ref: '#/components/requestBodies/UserArray' responses: default: - content: {} description: successful operation summary: Creates list of users with given input array tags: - user - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: application/json /user/createWithList: post: + description: "" operationId: createUsersWithListInput requestBody: - content: - '*/*': - schema: - items: - $ref: '#/components/schemas/User' - type: array - description: List of user object - required: true + $ref: '#/components/requestBodies/UserArray' responses: default: - content: {} description: successful operation summary: Creates list of users with given input array tags: - user - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: application/json /user/login: get: + description: "" operationId: loginUser parameters: - description: The user name for login + explode: true in: query name: username required: true schema: type: string + style: form - description: The password for login in clear text + explode: true in: query name: password required: true schema: type: string + style: form responses: "200": content: @@ -496,16 +525,19 @@ paths: headers: X-Rate-Limit: description: calls per hour allowed by the user + explode: false schema: format: int32 type: integer + style: simple X-Expires-After: description: date in UTC when token expires + explode: false schema: format: date-time type: string + style: simple "400": - content: {} description: Invalid username/password supplied summary: Logs user into the system tags: @@ -513,10 +545,10 @@ paths: x-accepts: application/json /user/logout: get: + description: "" operationId: logoutUser responses: default: - content: {} description: successful operation summary: Logs out current logged in user session tags: @@ -528,31 +560,34 @@ paths: operationId: deleteUser parameters: - description: The name that needs to be deleted + explode: false in: path name: username required: true schema: type: string + style: simple responses: "400": - content: {} description: Invalid username supplied "404": - content: {} description: User not found summary: Delete user tags: - user x-accepts: application/json get: + description: "" operationId: getUserByName parameters: - description: The name that needs to be fetched. Use user1 for testing. + explode: false in: path name: username required: true schema: type: string + style: simple responses: "200": content: @@ -564,10 +599,8 @@ paths: $ref: '#/components/schemas/User' description: successful operation "400": - content: {} description: Invalid username supplied "404": - content: {} description: User not found summary: Get user by user name tags: @@ -578,42 +611,36 @@ paths: operationId: updateUser parameters: - description: name that need to be deleted + explode: false in: path name: username required: true schema: type: string + style: simple requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/User' description: Updated user object required: true responses: "400": - content: {} description: Invalid user supplied "404": - content: {} description: User not found summary: Updated user tags: - user - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: application/json /fake_classname_test: patch: description: To test class name in snake case operationId: testClassname requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - description: client model - required: true + $ref: '#/components/requestBodies/Client' responses: "200": content: @@ -626,7 +653,6 @@ paths: summary: To test class name in snake case tags: - fake_classname_tags 123#$%^ - x-codegen-request-body-name: body x-content-type: application/json x-accepts: application/json /fake: @@ -635,44 +661,60 @@ paths: operationId: testGroupParameters parameters: - description: Required String in group parameters + explode: true in: query name: required_string_group required: true schema: type: integer + style: form - description: Required Boolean in group parameters + explode: false in: header name: required_boolean_group required: true schema: type: boolean + style: simple - description: Required Integer in group parameters + explode: true in: query name: required_int64_group required: true schema: format: int64 type: integer + style: form - description: String in group parameters + explode: true in: query name: string_group + required: false schema: type: integer + style: form - description: Boolean in group parameters + explode: false in: header name: boolean_group + required: false schema: type: boolean + style: simple - description: Integer in group parameters + explode: true in: query name: int64_group + required: false schema: format: int64 type: integer + style: form responses: "400": - content: {} description: Something wrong + security: + - bearer_test: [] summary: Fake endpoint to test group parameters (optional) tags: - fake @@ -686,6 +728,7 @@ paths: explode: false in: header name: enum_header_string_array + required: false schema: items: default: $ @@ -696,8 +739,10 @@ paths: type: array style: simple - description: Header parameter enum test (string) + explode: false in: header name: enum_header_string + required: false schema: default: -efg enum: @@ -705,10 +750,12 @@ paths: - -efg - (xyz) type: string + style: simple - description: Query parameter enum test (string array) - explode: false + explode: true in: query name: enum_query_string_array + required: false schema: items: default: $ @@ -719,8 +766,10 @@ paths: type: array style: form - description: Query parameter enum test (string) + explode: true in: query name: enum_query_string + required: false schema: default: -efg enum: @@ -728,24 +777,40 @@ paths: - -efg - (xyz) type: string + style: form - description: Query parameter enum test (double) + explode: true in: query name: enum_query_integer + required: false schema: enum: - 1 - -2 format: int32 type: integer + style: form - description: Query parameter enum test (double) + explode: true in: query name: enum_query_double + required: false schema: enum: - 1.1 - -1.2 format: double type: number + style: form + - explode: true + in: query + name: enum_query_model_array + required: false + schema: + items: + $ref: '#/components/schemas/EnumClass' + type: array + style: form requestBody: content: application/x-www-form-urlencoded: @@ -753,10 +818,8 @@ paths: $ref: '#/components/schemas/testEnumParameters_request' responses: "400": - content: {} description: Invalid request "404": - content: {} description: Not found summary: To test enum parameters tags: @@ -767,12 +830,7 @@ paths: description: To test "client" model operationId: testClientModel requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - description: client model - required: true + $ref: '#/components/requestBodies/Client' responses: "200": content: @@ -783,36 +841,32 @@ paths: summary: To test "client" model tags: - fake - x-codegen-request-body-name: body x-content-type: application/json x-accepts: application/json post: - description: |- + description: | Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 operationId: testEndpointParameters requestBody: content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/testEndpointParameters_request' - required: true responses: "400": - content: {} description: Invalid username supplied "404": - content: {} description: User not found security: - http_basic_test: [] - summary: |- + summary: | Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 tags: - fake x-content-type: application/x-www-form-urlencoded @@ -823,11 +877,10 @@ paths: operationId: fakeOuterNumberSerialize requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/OuterNumber' description: Input number as post body - required: false responses: "200": content: @@ -837,8 +890,29 @@ paths: description: Output number tags: - fake - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json + x-accepts: '*/*' + /fake/property/enum-int: + post: + description: Test serialization of enum (int) properties with examples + operationId: fakePropertyEnumIntegerSerialize + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OuterObjectWithEnumProperty' + description: Input enum (int) as post body + required: true + responses: + "200": + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterObjectWithEnumProperty' + description: Output enum (int) + tags: + - fake + x-content-type: application/json x-accepts: '*/*' /fake/outer/string: post: @@ -846,11 +920,10 @@ paths: operationId: fakeOuterStringSerialize requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/OuterString' description: Input string as post body - required: false responses: "200": content: @@ -860,8 +933,7 @@ paths: description: Output string tags: - fake - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: '*/*' /fake/outer/boolean: post: @@ -869,11 +941,10 @@ paths: operationId: fakeOuterBooleanSerialize requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/OuterBoolean' description: Input boolean as post body - required: false responses: "200": content: @@ -883,8 +954,7 @@ paths: description: Output boolean tags: - fake - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: '*/*' /fake/outer/composite: post: @@ -892,11 +962,10 @@ paths: operationId: fakeOuterCompositeSerialize requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/OuterComposite' description: Input composite as post body - required: false responses: "200": content: @@ -906,21 +975,19 @@ paths: description: Output composite tags: - fake - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: '*/*' /fake/jsonFormData: get: + description: "" operationId: testJsonFormData requestBody: content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/testJsonFormData_request' - required: true responses: "200": - content: {} description: successful operation summary: test json serialization of form data tags: @@ -929,6 +996,7 @@ paths: x-accepts: application/json /fake/inline-additionalProperties: post: + description: "" operationId: testInlineAdditionalProperties requestBody: content: @@ -941,23 +1009,23 @@ paths: required: true responses: "200": - content: {} description: successful operation summary: test inline additionalProperties tags: - fake - x-codegen-request-body-name: param x-content-type: application/json x-accepts: application/json /fake/body-with-query-params: put: operationId: testBodyWithQueryParams parameters: - - in: query + - explode: true + in: query name: query required: true schema: type: string + style: form requestBody: content: application/json: @@ -966,60 +1034,17 @@ paths: required: true responses: "200": - content: {} description: Success tags: - fake - x-codegen-request-body-name: body x-content-type: application/json x-accepts: application/json - /fake/create_xml_item: - post: - description: this route creates an XmlItem - operationId: createXmlItem - requestBody: - content: - application/xml: - schema: - $ref: '#/components/schemas/XmlItem' - application/xml; charset=utf-8: - schema: - $ref: '#/components/schemas/XmlItem' - application/xml; charset=utf-16: - schema: - $ref: '#/components/schemas/XmlItem' - text/xml: - schema: - $ref: '#/components/schemas/XmlItem' - text/xml; charset=utf-8: - schema: - $ref: '#/components/schemas/XmlItem' - text/xml; charset=utf-16: - schema: - $ref: '#/components/schemas/XmlItem' - description: XmlItem Body - required: true - responses: - "200": - content: {} - description: successful operation - summary: creates an XmlItem - tags: - - fake - x-codegen-request-body-name: XmlItem - x-content-type: application/xml - x-accepts: application/json /another-fake/dummy: patch: description: To test special tags and operation ID starting with number operationId: 123_test_@#$%_special_tags requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - description: client model - required: true + $ref: '#/components/requestBodies/Client' responses: "200": content: @@ -1030,12 +1055,11 @@ paths: summary: To test special tags tags: - $another-fake? - x-codegen-request-body-name: body x-content-type: application/json x-accepts: application/json /fake/body-with-file-schema: put: - description: "For this test, the body for this request much reference a schema\ + description: "For this test, the body for this request must reference a schema\ \ named `File`." operationId: testBodyWithFileSchema requestBody: @@ -1046,13 +1070,31 @@ paths: required: true responses: "200": - content: {} description: Success tags: - fake - x-codegen-request-body-name: body x-content-type: application/json x-accepts: application/json + /fake/body-with-binary: + put: + description: "For this test, the body has to be a binary file." + operationId: testBodyWithBinary + requestBody: + content: + image/png: + schema: + format: binary + nullable: true + type: string + description: image to upload + required: true + responses: + "200": + description: Success + tags: + - fake + x-content-type: image/png + x-accepts: application/json /fake/test-query-parameters: put: description: To test the collection format in query parameters @@ -1066,15 +1108,18 @@ paths: items: type: string type: array - style: form - - in: query + style: pipeDelimited + - explode: false + in: query name: ioutil required: true schema: items: type: string type: array - - in: query + style: form + - explode: false + in: query name: http required: true schema: @@ -1100,30 +1145,49 @@ paths: type: string type: array style: form + - explode: true + in: query + name: language + required: false + schema: + additionalProperties: + format: string + type: string + type: object + style: form + - allowEmptyValue: true + explode: true + in: query + name: allowEmpty + required: true + schema: + type: string + style: form responses: "200": - content: {} description: Success tags: - fake x-accepts: application/json /fake/{petId}/uploadImageWithRequiredFile: post: + description: "" operationId: uploadFileWithRequiredFile parameters: - description: ID of pet to update + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple requestBody: content: multipart/form-data: schema: $ref: '#/components/schemas/uploadFileWithRequiredFile_request' - required: true responses: "200": content: @@ -1140,8 +1204,91 @@ paths: - pet x-content-type: multipart/form-data x-accepts: application/json + /fake/health: + get: + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/HealthCheckResult' + description: The instance started successfully + summary: Health check endpoint + tags: + - fake + x-accepts: application/json + /fake/http-signature-test: + get: + operationId: fake-http-signature-test + parameters: + - description: query parameter + explode: true + in: query + name: query_1 + required: false + schema: + type: string + style: form + - description: header parameter + explode: false + in: header + name: header_1 + required: false + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/Pet' + responses: + "200": + description: The instance started successfully + security: + - http_signature_test: [] + summary: test http signature authentication + tags: + - fake + x-content-type: application/json + x-accepts: application/json components: + requestBodies: + UserArray: + content: + application/json: + schema: + items: + $ref: '#/components/schemas/User' + type: array + description: List of user object + required: true + Client: + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + description: client model + required: true + Pet: + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store + required: true schemas: + Foo: + example: + bar: bar + properties: + bar: + default: bar + type: string + type: object + Bar: + default: bar + type: string Order: example: petId: 6 @@ -1307,21 +1454,12 @@ components: message: type: string type: object - $special[model.name]: - properties: - $special[property.name]: - format: int64 - type: integer - type: object - xml: - name: "$special[model.name]" Return: description: Model for testing reserved words properties: return: format: int32 type: integer - type: object xml: name: Return Name: @@ -1341,7 +1479,6 @@ components: type: integer required: - name - type: object xml: name: Name "200_response": @@ -1352,7 +1489,6 @@ components: type: integer class: type: string - type: object xml: name: Name ClassModel: @@ -1360,7 +1496,6 @@ components: properties: _class: type: string - type: object Dog: allOf: - $ref: '#/components/schemas/Animal' @@ -1369,10 +1504,6 @@ components: allOf: - $ref: '#/components/schemas/Animal' - $ref: '#/components/schemas/Cat_allOf' - BigCat: - allOf: - - $ref: '#/components/schemas/Cat' - - $ref: '#/components/schemas/BigCat_allOf' Animal: discriminator: propertyName: className @@ -1417,12 +1548,14 @@ components: maximum: 123.4 minimum: 67.8 type: number + decimal: + format: number + type: string string: pattern: "/[a-z]/i" type: string byte: format: byte - pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$" type: string binary: format: binary @@ -1442,8 +1575,14 @@ components: maxLength: 64 minLength: 10 type: string - BigDecimal: - format: number + pattern_with_digits: + description: A string that is a 10 digit number. Can have leading zeros. + pattern: "^\\d{10}$" + type: string + pattern_with_digits_and_delimiter: + description: A string starting with 'image_' (case insensitive) and one + to three digits following i.e. Image_01. + pattern: "/^image_\\d{1,3}$/i" type: string required: - byte @@ -1486,117 +1625,27 @@ components: type: number outerEnum: $ref: '#/components/schemas/OuterEnum' + outerEnumInteger: + $ref: '#/components/schemas/OuterEnumInteger' + outerEnumDefaultValue: + $ref: '#/components/schemas/OuterEnumDefaultValue' + outerEnumIntegerDefaultValue: + $ref: '#/components/schemas/OuterEnumIntegerDefaultValue' required: - enum_string_required type: object AdditionalPropertiesClass: properties: - map_string: + map_property: additionalProperties: type: string type: object - map_number: - additionalProperties: - type: number - type: object - map_integer: - additionalProperties: - type: integer - type: object - map_boolean: - additionalProperties: - type: boolean - type: object - map_array_integer: - additionalProperties: - items: - type: integer - type: array - type: object - map_array_anytype: - additionalProperties: - items: - properties: {} - type: object - type: array - type: object - map_map_string: + map_of_map_property: additionalProperties: additionalProperties: type: string type: object type: object - map_map_anytype: - additionalProperties: - additionalProperties: - properties: {} - type: object - type: object - type: object - anytype_1: - properties: {} - type: object - anytype_2: - type: object - anytype_3: - properties: {} - type: object - type: object - AdditionalPropertiesString: - additionalProperties: - type: string - properties: - name: - type: string - type: object - AdditionalPropertiesInteger: - additionalProperties: - type: integer - properties: - name: - type: string - type: object - AdditionalPropertiesNumber: - additionalProperties: - type: number - properties: - name: - type: string - type: object - AdditionalPropertiesBoolean: - additionalProperties: - type: boolean - properties: - name: - type: string - type: object - AdditionalPropertiesArray: - additionalProperties: - items: - properties: {} - type: object - type: array - properties: - name: - type: string - type: object - AdditionalPropertiesObject: - additionalProperties: - additionalProperties: - properties: {} - type: object - type: object - properties: - name: - type: string - type: object - AdditionalPropertiesAnyType: - additionalProperties: - properties: {} - type: object - properties: - name: - type: string type: object MixedPropertiesAndAdditionalPropertiesClass: properties: @@ -1686,6 +1735,8 @@ components: array_of_string: items: type: string + maxItems: 3 + minItems: 0 type: array array_array_of_integer: items: @@ -1742,7 +1793,29 @@ components: - placed - approved - delivered + nullable: true type: string + OuterEnumInteger: + enum: + - 0 + - 1 + - 2 + example: 2 + type: integer + OuterEnumDefaultValue: + default: placed + enum: + - placed + - approved + - delivered + type: string + OuterEnumIntegerDefaultValue: + default: 0 + enum: + - 0 + - 1 + - 2 + type: integer OuterComposite: example: my_string: my_string @@ -1792,243 +1865,133 @@ components: description: Test capitalization type: string type: object - TypeHolderDefault: + _special_model.name_: properties: - string_item: - default: what - type: string - number_item: - type: number - integer_item: + $special[property.name]: + format: int64 type: integer - bool_item: - default: true - type: boolean - array_item: - items: - type: integer - type: array - required: - - array_item - - bool_item - - integer_item - - number_item - - string_item - type: object - TypeHolderExample: - properties: - string_item: - example: what - type: string - number_item: - example: 1.234 - type: number - float_item: - example: 1.234 - format: float - type: number - integer_item: - example: -2 - type: integer - bool_item: - example: true - type: boolean - array_item: - example: - - 0 - - 1 - - 2 - - 3 - items: - type: integer - type: array - required: - - array_item - - bool_item - - float_item - - integer_item - - number_item - - string_item - type: object - XmlItem: - properties: - attribute_string: - example: string - type: string - xml: - attribute: true - attribute_number: - example: 1.234 - type: number - xml: - attribute: true - attribute_integer: - example: -2 - type: integer - xml: - attribute: true - attribute_boolean: - example: true - type: boolean - xml: - attribute: true - wrapped_array: - items: - type: integer - type: array - xml: - wrapped: true - name_string: - example: string - type: string - xml: - name: xml_name_string - name_number: - example: 1.234 - type: number - xml: - name: xml_name_number - name_integer: - example: -2 - type: integer - xml: - name: xml_name_integer - name_boolean: - example: true - type: boolean - xml: - name: xml_name_boolean - name_array: - items: - type: integer - xml: - name: xml_name_array_item - type: array - name_wrapped_array: - items: - type: integer - xml: - name: xml_name_wrapped_array_item - type: array - xml: - name: xml_name_wrapped_array - wrapped: true - prefix_string: - example: string - type: string - xml: - prefix: ab - prefix_number: - example: 1.234 - type: number - xml: - prefix: cd - prefix_integer: - example: -2 - type: integer - xml: - prefix: ef - prefix_boolean: - example: true - type: boolean - xml: - prefix: gh - prefix_array: - items: - type: integer - xml: - prefix: ij - type: array - prefix_wrapped_array: - items: - type: integer - xml: - prefix: mn - type: array - xml: - prefix: kl - wrapped: true - namespace_string: - example: string - type: string - xml: - namespace: http://a.com/schema - namespace_number: - example: 1.234 - type: number - xml: - namespace: http://b.com/schema - namespace_integer: - example: -2 - type: integer - xml: - namespace: http://c.com/schema - namespace_boolean: - example: true - type: boolean - xml: - namespace: http://d.com/schema - namespace_array: - items: - type: integer - xml: - namespace: http://e.com/schema - type: array - namespace_wrapped_array: - items: - type: integer - xml: - namespace: http://g.com/schema - type: array - xml: - namespace: http://f.com/schema - wrapped: true - prefix_ns_string: - example: string - type: string - xml: - namespace: http://a.com/schema - prefix: a - prefix_ns_number: - example: 1.234 - type: number - xml: - namespace: http://b.com/schema - prefix: b - prefix_ns_integer: - example: -2 - type: integer - xml: - namespace: http://c.com/schema - prefix: c - prefix_ns_boolean: - example: true - type: boolean - xml: - namespace: http://d.com/schema - prefix: d - prefix_ns_array: - items: - type: integer - xml: - namespace: http://e.com/schema - prefix: e - type: array - prefix_ns_wrapped_array: - items: - type: integer - xml: - namespace: http://g.com/schema - prefix: g - type: array - xml: - namespace: http://f.com/schema - prefix: f - wrapped: true - type: object xml: - namespace: http://a.com/schema - prefix: pre + name: "$special[model.name]" + HealthCheckResult: + description: Just a string to inform instance is up and running. Make it nullable + in hope to get it as pointer in generated model. + example: + NullableMessage: NullableMessage + properties: + NullableMessage: + nullable: true + type: string + type: object + NullableClass: + additionalProperties: + nullable: true + type: object + properties: + integer_prop: + nullable: true + type: integer + number_prop: + nullable: true + type: number + boolean_prop: + nullable: true + type: boolean + string_prop: + nullable: true + type: string + date_prop: + format: date + nullable: true + type: string + datetime_prop: + format: date-time + nullable: true + type: string + array_nullable_prop: + items: + type: object + nullable: true + type: array + array_and_items_nullable_prop: + items: + nullable: true + type: object + nullable: true + type: array + array_items_nullable: + items: + nullable: true + type: object + type: array + object_nullable_prop: + additionalProperties: + type: object + nullable: true + type: object + object_and_items_nullable_prop: + additionalProperties: + nullable: true + type: object + nullable: true + type: object + object_items_nullable: + additionalProperties: + nullable: true + type: object + type: object + type: object + OuterObjectWithEnumProperty: + example: + value: 2 + properties: + value: + $ref: '#/components/schemas/OuterEnumInteger' + required: + - value + type: object + DeprecatedObject: + deprecated: true + properties: + name: + type: string + type: object + ObjectWithDeprecatedFields: + properties: + uuid: + type: string + id: + deprecated: true + type: number + deprecatedRef: + $ref: '#/components/schemas/DeprecatedObject' + bars: + deprecated: true + items: + $ref: '#/components/schemas/Bar' + type: array + type: object + AllOfWithSingleRef: + properties: + username: + type: string + SingleRefType: + allOf: + - $ref: '#/components/schemas/SingleRefType' + type: object + SingleRefType: + enum: + - admin + - user + title: SingleRefType + type: string + _foo_get_default_response: + example: + string: + bar: bar + properties: + string: + $ref: '#/components/schemas/Foo' + type: object updatePetWithForm_request: properties: name: @@ -2072,7 +2035,6 @@ components: properties: integer: description: None - format: int32 maximum: 100 minimum: 10 type: integer @@ -2177,17 +2139,6 @@ components: type: boolean type: object example: null - BigCat_allOf: - properties: - kind: - enum: - - lions - - tigers - - leopards - - jaguars - type: string - type: object - example: null securitySchemes: petstore_auth: flows: @@ -2208,5 +2159,11 @@ components: http_basic_test: scheme: basic type: http -x-original-swagger-version: "2.0" + bearer_test: + bearerFormat: JWT + scheme: bearer + type: http + http_signature_test: + scheme: signature + type: http diff --git a/samples/client/petstore/java/apache-httpclient/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/apache-httpclient/docs/AdditionalPropertiesClass.md index 79402f75c6..fe69a56eeb 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/apache-httpclient/docs/AdditionalPropertiesClass.md @@ -7,17 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**mapString** | **Map<String, String>** | | [optional] | -|**mapNumber** | **Map<String, BigDecimal>** | | [optional] | -|**mapInteger** | **Map<String, Integer>** | | [optional] | -|**mapBoolean** | **Map<String, Boolean>** | | [optional] | -|**mapArrayInteger** | **Map<String, List<Integer>>** | | [optional] | -|**mapArrayAnytype** | **Map<String, List<Object>>** | | [optional] | -|**mapMapString** | **Map<String, Map<String, String>>** | | [optional] | -|**mapMapAnytype** | **Map<String, Map<String, Object>>** | | [optional] | -|**anytype1** | **Object** | | [optional] | -|**anytype2** | **Object** | | [optional] | -|**anytype3** | **Object** | | [optional] | +|**mapProperty** | **Map<String, String>** | | [optional] | +|**mapOfMapProperty** | **Map<String, Map<String, String>>** | | [optional] | diff --git a/samples/client/petstore/java/apache-httpclient/docs/AllOfWithSingleRef.md b/samples/client/petstore/java/apache-httpclient/docs/AllOfWithSingleRef.md new file mode 100644 index 0000000000..0a9e61bc68 --- /dev/null +++ b/samples/client/petstore/java/apache-httpclient/docs/AllOfWithSingleRef.md @@ -0,0 +1,14 @@ + + +# AllOfWithSingleRef + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**username** | **String** | | [optional] | +|**singleRefType** | [**SingleRefType**](SingleRefType.md) | | [optional] | + + + diff --git a/samples/client/petstore/java/apache-httpclient/docs/AnotherFakeApi.md b/samples/client/petstore/java/apache-httpclient/docs/AnotherFakeApi.md index f1ca8fe00b..73c966d2d5 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/apache-httpclient/docs/AnotherFakeApi.md @@ -10,7 +10,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* ## call123testSpecialTags -> Client call123testSpecialTags(body) +> Client call123testSpecialTags(client) To test special tags @@ -32,9 +32,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); - Client body = new Client(); // Client | client model + Client client = new Client(); // Client | client model try { - Client result = apiInstance.call123testSpecialTags(body); + Client result = apiInstance.call123testSpecialTags(client); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); @@ -52,7 +52,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**Client**](Client.md)| client model | | +| **client** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/apache-httpclient/docs/DefaultApi.md b/samples/client/petstore/java/apache-httpclient/docs/DefaultApi.md new file mode 100644 index 0000000000..2c56e1f90e --- /dev/null +++ b/samples/client/petstore/java/apache-httpclient/docs/DefaultApi.md @@ -0,0 +1,69 @@ +# DefaultApi + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**fooGet**](DefaultApi.md#fooGet) | **GET** /foo | | + + + +## fooGet + +> FooGetDefaultResponse fooGet() + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + try { + FooGetDefaultResponse result = apiInstance.fooGet(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#fooGet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**FooGetDefaultResponse**](FooGetDefaultResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | response | - | + diff --git a/samples/client/petstore/java/apache-httpclient/docs/DeprecatedObject.md b/samples/client/petstore/java/apache-httpclient/docs/DeprecatedObject.md new file mode 100644 index 0000000000..48de1d6244 --- /dev/null +++ b/samples/client/petstore/java/apache-httpclient/docs/DeprecatedObject.md @@ -0,0 +1,13 @@ + + +# DeprecatedObject + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java/apache-httpclient/docs/EnumTest.md b/samples/client/petstore/java/apache-httpclient/docs/EnumTest.md index bf2def484c..380a2aef0b 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/EnumTest.md +++ b/samples/client/petstore/java/apache-httpclient/docs/EnumTest.md @@ -12,6 +12,9 @@ |**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] | |**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] | |**outerEnum** | **OuterEnum** | | [optional] | +|**outerEnumInteger** | **OuterEnumInteger** | | [optional] | +|**outerEnumDefaultValue** | **OuterEnumDefaultValue** | | [optional] | +|**outerEnumIntegerDefaultValue** | **OuterEnumIntegerDefaultValue** | | [optional] | diff --git a/samples/client/petstore/java/apache-httpclient/docs/FakeApi.md b/samples/client/petstore/java/apache-httpclient/docs/FakeApi.md index 627366e41d..853a8de537 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/FakeApi.md +++ b/samples/client/petstore/java/apache-httpclient/docs/FakeApi.md @@ -4,15 +4,18 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**createXmlItem**](FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem | +| [**fakeHealthGet**](FakeApi.md#fakeHealthGet) | **GET** /fake/health | Health check endpoint | +| [**fakeHttpSignatureTest**](FakeApi.md#fakeHttpSignatureTest) | **GET** /fake/http-signature-test | test http signature authentication | | [**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | | | [**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | | | [**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | | | [**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | | +| [**fakePropertyEnumIntegerSerialize**](FakeApi.md#fakePropertyEnumIntegerSerialize) | **POST** /fake/property/enum-int | | +| [**testBodyWithBinary**](FakeApi.md#testBodyWithBinary) | **PUT** /fake/body-with-binary | | | [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | | | [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | | | [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model | -| [**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 | +| [**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 | | [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters | | [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) | | [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties | @@ -21,13 +24,11 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* -## createXmlItem +## fakeHealthGet -> createXmlItem(xmlItem) +> HealthCheckResult fakeHealthGet() -creates an XmlItem - -this route creates an XmlItem +Health check endpoint ### Example @@ -45,11 +46,75 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body try { - apiInstance.createXmlItem(xmlItem); + HealthCheckResult result = apiInstance.fakeHealthGet(); + System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling FakeApi#createXmlItem"); + System.err.println("Exception when calling FakeApi#fakeHealthGet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**HealthCheckResult**](HealthCheckResult.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | The instance started successfully | - | + + +## fakeHttpSignatureTest + +> fakeHttpSignatureTest(pet, query1, header1) + +test http signature authentication + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + + FakeApi apiInstance = new FakeApi(defaultClient); + Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store + String query1 = "query1_example"; // String | query parameter + String header1 = "header1_example"; // String | header parameter + try { + apiInstance.fakeHttpSignatureTest(pet, query1, header1); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeHttpSignatureTest"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -64,7 +129,9 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | | +| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | +| **query1** | **String**| query parameter | [optional] | +| **header1** | **String**| header parameter | [optional] | ### Return type @@ -72,18 +139,18 @@ null (empty response body) ### Authorization -No authorization required +[http_signature_test](../README.md#http_signature_test) ### HTTP request headers -- **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16 +- **Content-Type**: application/json, application/xml - **Accept**: Not defined ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | successful operation | - | +| **200** | The instance started successfully | - | ## fakeOuterBooleanSerialize @@ -142,7 +209,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: */* @@ -154,7 +221,7 @@ No authorization required ## fakeOuterCompositeSerialize -> OuterComposite fakeOuterCompositeSerialize(body) +> OuterComposite fakeOuterCompositeSerialize(outerComposite) @@ -176,9 +243,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body + OuterComposite outerComposite = new OuterComposite(); // OuterComposite | Input composite as post body try { - OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body); + OuterComposite result = apiInstance.fakeOuterCompositeSerialize(outerComposite); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize"); @@ -196,7 +263,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] | +| **outerComposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] | ### Return type @@ -208,7 +275,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: */* @@ -274,7 +341,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: */* @@ -340,7 +407,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: */* @@ -350,13 +417,13 @@ No authorization required | **200** | Output string | - | -## testBodyWithFileSchema +## fakePropertyEnumIntegerSerialize -> testBodyWithFileSchema(body) +> OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty) -For this test, the body for this request much reference a schema named `File`. +Test serialization of enum (int) properties with examples ### Example @@ -374,9 +441,140 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass | + OuterObjectWithEnumProperty outerObjectWithEnumProperty = new OuterObjectWithEnumProperty(); // OuterObjectWithEnumProperty | Input enum (int) as post body try { - apiInstance.testBodyWithFileSchema(body); + OuterObjectWithEnumProperty result = apiInstance.fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakePropertyEnumIntegerSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **outerObjectWithEnumProperty** | [**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md)| Input enum (int) as post body | | + +### Return type + +[**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: */* + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output enum (int) | - | + + +## testBodyWithBinary + +> testBodyWithBinary(body) + + + +For this test, the body has to be a binary file. + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + FakeApi apiInstance = new FakeApi(defaultClient); + File body = new File("/path/to/file"); // File | image to upload + try { + apiInstance.testBodyWithBinary(body); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testBodyWithBinary"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **File**| image to upload | | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: image/png +- **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + + +## testBodyWithFileSchema + +> testBodyWithFileSchema(fileSchemaTestClass) + + + +For this test, the body for this request must reference a schema named `File`. + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + FakeApi apiInstance = new FakeApi(defaultClient); + FileSchemaTestClass fileSchemaTestClass = new FileSchemaTestClass(); // FileSchemaTestClass | + try { + apiInstance.testBodyWithFileSchema(fileSchemaTestClass); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testBodyWithFileSchema"); System.err.println("Status code: " + e.getCode()); @@ -393,7 +591,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | | +| **fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | | ### Return type @@ -417,7 +615,7 @@ No authorization required ## testBodyWithQueryParams -> testBodyWithQueryParams(query, body) +> testBodyWithQueryParams(query, user) @@ -438,9 +636,9 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); String query = "query_example"; // String | - User body = new User(); // User | + User user = new User(); // User | try { - apiInstance.testBodyWithQueryParams(query, body); + apiInstance.testBodyWithQueryParams(query, user); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testBodyWithQueryParams"); System.err.println("Status code: " + e.getCode()); @@ -458,7 +656,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **query** | **String**| | | -| **body** | [**User**](User.md)| | | +| **user** | [**User**](User.md)| | | ### Return type @@ -482,7 +680,7 @@ No authorization required ## testClientModel -> Client testClientModel(body) +> Client testClientModel(client) To test \"client\" model @@ -504,9 +702,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - Client body = new Client(); // Client | client model + Client client = new Client(); // Client | client model try { - Client result = apiInstance.testClientModel(body); + Client result = apiInstance.testClientModel(client); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testClientModel"); @@ -524,7 +722,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**Client**](Client.md)| client model | | +| **client** | [**Client**](Client.md)| client model | | ### Return type @@ -550,9 +748,9 @@ No authorization required > testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback) -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ### Example @@ -646,7 +844,7 @@ null (empty response body) ## testEnumParameters -> testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString) +> testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString) To test enum parameters @@ -674,10 +872,11 @@ public class Example { String enumQueryString = "_abc"; // String | Query parameter enum test (string) Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) + List enumQueryModelArray = Arrays.asList(-efg); // List | List enumFormStringArray = Arrays.asList("$"); // List | Form parameter enum test (string array) String enumFormString = "_abc"; // String | Form parameter enum test (string) try { - apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testEnumParameters"); System.err.println("Status code: " + e.getCode()); @@ -700,6 +899,7 @@ public class Example { | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | +| **enumQueryModelArray** | [**List<EnumClass>**](EnumClass.md)| | [optional] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | | **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | @@ -739,6 +939,7 @@ Fake endpoint to test group parameters (optional) import org.openapitools.client.ApiClient; import org.openapitools.client.ApiException; import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; import org.openapitools.client.models.*; import org.openapitools.client.api.FakeApi; @@ -746,6 +947,10 @@ public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure HTTP bearer authorization: bearer_test + HttpBearerAuth bearer_test = (HttpBearerAuth) defaultClient.getAuthentication("bearer_test"); + bearer_test.setBearerToken("BEARER TOKEN"); FakeApi apiInstance = new FakeApi(defaultClient); Integer requiredStringGroup = 56; // Integer | Required String in group parameters @@ -785,7 +990,7 @@ null (empty response body) ### Authorization -No authorization required +[bearer_test](../README.md#bearer_test) ### HTTP request headers @@ -801,10 +1006,12 @@ No authorization required ## testInlineAdditionalProperties -> testInlineAdditionalProperties(param) +> testInlineAdditionalProperties(requestBody) test inline additionalProperties + + ### Example ```java @@ -821,9 +1028,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - Map param = new HashMap(); // Map | request body + Map requestBody = new HashMap(); // Map | request body try { - apiInstance.testInlineAdditionalProperties(param); + apiInstance.testInlineAdditionalProperties(requestBody); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties"); System.err.println("Status code: " + e.getCode()); @@ -840,7 +1047,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **param** | [**Map<String, String>**](String.md)| request body | | +| **requestBody** | [**Map<String, String>**](String.md)| request body | | ### Return type @@ -868,6 +1075,8 @@ No authorization required test json serialization of form data + + ### Example ```java @@ -929,7 +1138,7 @@ No authorization required ## testQueryParameterCollectionFormat -> testQueryParameterCollectionFormat(pipe, ioutil, http, url, context) +> testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language) @@ -956,8 +1165,10 @@ public class Example { List http = Arrays.asList(); // List | List url = Arrays.asList(); // List | List context = Arrays.asList(); // List | + String allowEmpty = "allowEmpty_example"; // String | + Map language = new HashMap(); // Map | try { - apiInstance.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context); + apiInstance.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testQueryParameterCollectionFormat"); System.err.println("Status code: " + e.getCode()); @@ -979,6 +1190,8 @@ public class Example { | **http** | [**List<String>**](String.md)| | | | **url** | [**List<String>**](String.md)| | | | **context** | [**List<String>**](String.md)| | | +| **allowEmpty** | **String**| | | +| **language** | [**Map<String, String>**](String.md)| | [optional] | ### Return type diff --git a/samples/client/petstore/java/apache-httpclient/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/apache-httpclient/docs/FakeClassnameTags123Api.md index 10d5ea30aa..e4ff70ed90 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/apache-httpclient/docs/FakeClassnameTags123Api.md @@ -10,7 +10,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* ## testClassname -> Client testClassname(body) +> Client testClassname(client) To test class name in snake case @@ -39,9 +39,9 @@ public class Example { //api_key_query.setApiKeyPrefix("Token"); FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(defaultClient); - Client body = new Client(); // Client | client model + Client client = new Client(); // Client | client model try { - Client result = apiInstance.testClassname(body); + Client result = apiInstance.testClassname(client); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FakeClassnameTags123Api#testClassname"); @@ -59,7 +59,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**Client**](Client.md)| client model | | +| **client** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/apache-httpclient/docs/Foo.md b/samples/client/petstore/java/apache-httpclient/docs/Foo.md new file mode 100644 index 0000000000..6b3f055652 --- /dev/null +++ b/samples/client/petstore/java/apache-httpclient/docs/Foo.md @@ -0,0 +1,13 @@ + + +# Foo + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bar** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java/apache-httpclient/docs/FooGetDefaultResponse.md b/samples/client/petstore/java/apache-httpclient/docs/FooGetDefaultResponse.md new file mode 100644 index 0000000000..ff3d7a3a56 --- /dev/null +++ b/samples/client/petstore/java/apache-httpclient/docs/FooGetDefaultResponse.md @@ -0,0 +1,13 @@ + + +# FooGetDefaultResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**string** | [**Foo**](Foo.md) | | [optional] | + + + diff --git a/samples/client/petstore/java/apache-httpclient/docs/FormatTest.md b/samples/client/petstore/java/apache-httpclient/docs/FormatTest.md index 9c68c3080e..01b8c777ae 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/FormatTest.md +++ b/samples/client/petstore/java/apache-httpclient/docs/FormatTest.md @@ -13,6 +13,7 @@ |**number** | **BigDecimal** | | | |**_float** | **Float** | | [optional] | |**_double** | **Double** | | [optional] | +|**decimal** | **BigDecimal** | | [optional] | |**string** | **String** | | [optional] | |**_byte** | **byte[]** | | | |**binary** | **File** | | [optional] | @@ -20,7 +21,8 @@ |**dateTime** | **OffsetDateTime** | | [optional] | |**uuid** | **UUID** | | [optional] | |**password** | **String** | | | -|**bigDecimal** | **BigDecimal** | | [optional] | +|**patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] | +|**patternWithDigitsAndDelimiter** | **String** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [optional] | diff --git a/samples/client/petstore/java/apache-httpclient/docs/HealthCheckResult.md b/samples/client/petstore/java/apache-httpclient/docs/HealthCheckResult.md new file mode 100644 index 0000000000..4885e6f1ca --- /dev/null +++ b/samples/client/petstore/java/apache-httpclient/docs/HealthCheckResult.md @@ -0,0 +1,14 @@ + + +# HealthCheckResult + +Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**nullableMessage** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java/apache-httpclient/docs/NullableClass.md b/samples/client/petstore/java/apache-httpclient/docs/NullableClass.md new file mode 100644 index 0000000000..fa98c5c6d9 --- /dev/null +++ b/samples/client/petstore/java/apache-httpclient/docs/NullableClass.md @@ -0,0 +1,24 @@ + + +# NullableClass + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**integerProp** | **Integer** | | [optional] | +|**numberProp** | **BigDecimal** | | [optional] | +|**booleanProp** | **Boolean** | | [optional] | +|**stringProp** | **String** | | [optional] | +|**dateProp** | **LocalDate** | | [optional] | +|**datetimeProp** | **OffsetDateTime** | | [optional] | +|**arrayNullableProp** | **List<Object>** | | [optional] | +|**arrayAndItemsNullableProp** | **List<Object>** | | [optional] | +|**arrayItemsNullable** | **List<Object>** | | [optional] | +|**objectNullableProp** | **Map<String, Object>** | | [optional] | +|**objectAndItemsNullableProp** | **Map<String, Object>** | | [optional] | +|**objectItemsNullable** | **Map<String, Object>** | | [optional] | + + + diff --git a/samples/client/petstore/java/apache-httpclient/docs/ObjectWithDeprecatedFields.md b/samples/client/petstore/java/apache-httpclient/docs/ObjectWithDeprecatedFields.md new file mode 100644 index 0000000000..f1cf571f4c --- /dev/null +++ b/samples/client/petstore/java/apache-httpclient/docs/ObjectWithDeprecatedFields.md @@ -0,0 +1,16 @@ + + +# ObjectWithDeprecatedFields + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**uuid** | **String** | | [optional] | +|**id** | **BigDecimal** | | [optional] | +|**deprecatedRef** | [**DeprecatedObject**](DeprecatedObject.md) | | [optional] | +|**bars** | **List<String>** | | [optional] | + + + diff --git a/samples/client/petstore/java/apache-httpclient/docs/OuterEnumDefaultValue.md b/samples/client/petstore/java/apache-httpclient/docs/OuterEnumDefaultValue.md new file mode 100644 index 0000000000..cbc7f4ba54 --- /dev/null +++ b/samples/client/petstore/java/apache-httpclient/docs/OuterEnumDefaultValue.md @@ -0,0 +1,15 @@ + + +# OuterEnumDefaultValue + +## Enum + + +* `PLACED` (value: `"placed"`) + +* `APPROVED` (value: `"approved"`) + +* `DELIVERED` (value: `"delivered"`) + + + diff --git a/samples/client/petstore/java/apache-httpclient/docs/OuterEnumInteger.md b/samples/client/petstore/java/apache-httpclient/docs/OuterEnumInteger.md new file mode 100644 index 0000000000..f71dea30ad --- /dev/null +++ b/samples/client/petstore/java/apache-httpclient/docs/OuterEnumInteger.md @@ -0,0 +1,15 @@ + + +# OuterEnumInteger + +## Enum + + +* `NUMBER_0` (value: `0`) + +* `NUMBER_1` (value: `1`) + +* `NUMBER_2` (value: `2`) + + + diff --git a/samples/client/petstore/java/apache-httpclient/docs/OuterEnumIntegerDefaultValue.md b/samples/client/petstore/java/apache-httpclient/docs/OuterEnumIntegerDefaultValue.md new file mode 100644 index 0000000000..99e6389f42 --- /dev/null +++ b/samples/client/petstore/java/apache-httpclient/docs/OuterEnumIntegerDefaultValue.md @@ -0,0 +1,15 @@ + + +# OuterEnumIntegerDefaultValue + +## Enum + + +* `NUMBER_0` (value: `0`) + +* `NUMBER_1` (value: `1`) + +* `NUMBER_2` (value: `2`) + + + diff --git a/samples/client/petstore/java/apache-httpclient/docs/OuterObjectWithEnumProperty.md b/samples/client/petstore/java/apache-httpclient/docs/OuterObjectWithEnumProperty.md new file mode 100644 index 0000000000..0fafaaa271 --- /dev/null +++ b/samples/client/petstore/java/apache-httpclient/docs/OuterObjectWithEnumProperty.md @@ -0,0 +1,13 @@ + + +# OuterObjectWithEnumProperty + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**value** | **OuterEnumInteger** | | | + + + diff --git a/samples/client/petstore/java/apache-httpclient/docs/PetApi.md b/samples/client/petstore/java/apache-httpclient/docs/PetApi.md index 1e79e30ef6..e2515d9bb9 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/PetApi.md +++ b/samples/client/petstore/java/apache-httpclient/docs/PetApi.md @@ -18,10 +18,12 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* ## addPet -> addPet(body) +> addPet(pet) Add a new pet to the store + + ### Example ```java @@ -43,9 +45,9 @@ public class Example { petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); PetApi apiInstance = new PetApi(defaultClient); - Pet body = new Pet(); // Pet | Pet object that needs to be added to the store + Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store try { - apiInstance.addPet(body); + apiInstance.addPet(pet); } catch (ApiException e) { System.err.println("Exception when calling PetApi#addPet"); System.err.println("Status code: " + e.getCode()); @@ -62,7 +64,7 @@ public class Example { | 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 @@ -81,7 +83,7 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | successful operation | - | +| **200** | Successful operation | - | | **405** | Invalid input | - | @@ -91,6 +93,8 @@ null (empty response body) Deletes a pet + + ### Example ```java @@ -152,7 +156,7 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | successful operation | - | +| **200** | Successful operation | - | | **400** | Invalid pet value | - | @@ -377,10 +381,12 @@ public class Example { ## updatePet -> updatePet(body) +> updatePet(pet) Update an existing pet + + ### Example ```java @@ -402,9 +408,9 @@ public class Example { petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); PetApi apiInstance = new PetApi(defaultClient); - Pet body = new Pet(); // Pet | Pet object that needs to be added to the store + Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store try { - apiInstance.updatePet(body); + apiInstance.updatePet(pet); } catch (ApiException e) { System.err.println("Exception when calling PetApi#updatePet"); System.err.println("Status code: " + e.getCode()); @@ -421,7 +427,7 @@ public class Example { | 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 @@ -440,7 +446,7 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | successful operation | - | +| **200** | Successful operation | - | | **400** | Invalid ID supplied | - | | **404** | Pet not found | - | | **405** | Validation exception | - | @@ -452,6 +458,8 @@ null (empty response body) Updates a pet in the store with form data + + ### Example ```java @@ -515,6 +523,7 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| +| **200** | Successful operation | - | | **405** | Invalid input | - | @@ -524,6 +533,8 @@ null (empty response body) uploads an image + + ### Example ```java @@ -597,6 +608,8 @@ public class Example { uploads an image (required) + + ### Example ```java diff --git a/samples/client/petstore/java/apache-httpclient/docs/SingleRefType.md b/samples/client/petstore/java/apache-httpclient/docs/SingleRefType.md new file mode 100644 index 0000000000..cc269bb871 --- /dev/null +++ b/samples/client/petstore/java/apache-httpclient/docs/SingleRefType.md @@ -0,0 +1,13 @@ + + +# SingleRefType + +## Enum + + +* `ADMIN` (value: `"admin"`) + +* `USER` (value: `"user"`) + + + diff --git a/samples/client/petstore/java/apache-httpclient/docs/StoreApi.md b/samples/client/petstore/java/apache-httpclient/docs/StoreApi.md index b64e208a83..ce91137cc6 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/StoreApi.md +++ b/samples/client/petstore/java/apache-httpclient/docs/StoreApi.md @@ -216,10 +216,12 @@ No authorization required ## placeOrder -> Order placeOrder(body) +> Order placeOrder(order) Place an order for a pet + + ### Example ```java @@ -236,9 +238,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); StoreApi apiInstance = new StoreApi(defaultClient); - Order body = new Order(); // Order | order placed for purchasing the pet + Order order = new Order(); // Order | order placed for purchasing the pet try { - Order result = apiInstance.placeOrder(body); + Order result = apiInstance.placeOrder(order); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling StoreApi#placeOrder"); @@ -256,7 +258,7 @@ public class Example { | 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 @@ -268,7 +270,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: application/xml, application/json diff --git a/samples/client/petstore/java/apache-httpclient/docs/UserApi.md b/samples/client/petstore/java/apache-httpclient/docs/UserApi.md index dfdb4a7c0e..305fd6e66d 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/UserApi.md +++ b/samples/client/petstore/java/apache-httpclient/docs/UserApi.md @@ -17,7 +17,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* ## createUser -> createUser(body) +> createUser(user) Create user @@ -39,9 +39,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); UserApi apiInstance = new UserApi(defaultClient); - User body = new User(); // User | Created user object + User user = new User(); // User | Created user object try { - apiInstance.createUser(body); + apiInstance.createUser(user); } catch (ApiException e) { System.err.println("Exception when calling UserApi#createUser"); System.err.println("Status code: " + e.getCode()); @@ -58,7 +58,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**User**](User.md)| Created user object | | +| **user** | [**User**](User.md)| Created user object | | ### Return type @@ -70,7 +70,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: Not defined @@ -82,10 +82,12 @@ No authorization required ## createUsersWithArrayInput -> createUsersWithArrayInput(body) +> createUsersWithArrayInput(user) Creates list of users with given input array + + ### Example ```java @@ -102,9 +104,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); UserApi apiInstance = new UserApi(defaultClient); - List body = Arrays.asList(); // List | List of user object + List user = Arrays.asList(); // List | List of user object try { - apiInstance.createUsersWithArrayInput(body); + apiInstance.createUsersWithArrayInput(user); } catch (ApiException e) { System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); System.err.println("Status code: " + e.getCode()); @@ -121,7 +123,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**List<User>**](User.md)| List of user object | | +| **user** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -133,7 +135,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: Not defined @@ -145,10 +147,12 @@ No authorization required ## createUsersWithListInput -> createUsersWithListInput(body) +> createUsersWithListInput(user) Creates list of users with given input array + + ### Example ```java @@ -165,9 +169,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); UserApi apiInstance = new UserApi(defaultClient); - List body = Arrays.asList(); // List | List of user object + List user = Arrays.asList(); // List | List of user object try { - apiInstance.createUsersWithListInput(body); + apiInstance.createUsersWithListInput(user); } catch (ApiException e) { System.err.println("Exception when calling UserApi#createUsersWithListInput"); System.err.println("Status code: " + e.getCode()); @@ -184,7 +188,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**List<User>**](User.md)| List of user object | | +| **user** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -196,7 +200,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: Not defined @@ -278,6 +282,8 @@ No authorization required Get user by user name + + ### Example ```java @@ -344,6 +350,8 @@ No authorization required Logs user into the system + + ### Example ```java @@ -411,6 +419,8 @@ No authorization required Logs out current logged in user session + + ### Example ```java @@ -466,7 +476,7 @@ No authorization required ## updateUser -> updateUser(username, body) +> updateUser(username, user) Updated user @@ -489,9 +499,9 @@ public class Example { UserApi apiInstance = new UserApi(defaultClient); String username = "username_example"; // String | name that need to be deleted - User body = new User(); // User | Updated user object + User user = new User(); // User | Updated user object try { - apiInstance.updateUser(username, body); + apiInstance.updateUser(username, user); } catch (ApiException e) { System.err.println("Exception when calling UserApi#updateUser"); System.err.println("Status code: " + e.getCode()); @@ -509,7 +519,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **username** | **String**| name that need to be deleted | | -| **body** | [**User**](User.md)| Updated user object | | +| **user** | [**User**](User.md)| Updated user object | | ### Return type @@ -521,7 +531,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: Not defined diff --git a/samples/client/petstore/java/apache-httpclient/pom.xml b/samples/client/petstore/java/apache-httpclient/pom.xml index e910ece400..847bb322c5 100644 --- a/samples/client/petstore/java/apache-httpclient/pom.xml +++ b/samples/client/petstore/java/apache-httpclient/pom.xml @@ -254,6 +254,11 @@ jackson-datatype-jsr310 ${jackson-version} + + org.openapitools + jackson-databind-nullable + ${jackson-databind-nullable-version} + jakarta.annotation jakarta.annotation-api @@ -274,6 +279,7 @@ 4.5.13 2.13.4 2.13.4.2 + 0.2.4 1.3.5 1.0.0 4.13.2 diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/ApiClient.java index 273adaad06..e0bb95d2f0 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/ApiClient.java @@ -76,6 +76,7 @@ import java.text.DateFormat; import org.openapitools.client.auth.Authentication; import org.openapitools.client.auth.HttpBasicAuth; +import org.openapitools.client.auth.HttpBearerAuth; import org.openapitools.client.auth.ApiKeyAuth; import org.openapitools.client.auth.OAuth; @@ -86,8 +87,51 @@ public class ApiClient extends JavaTimeFormatter { private String basePath = "http://petstore.swagger.io:80/v2"; protected List servers = new ArrayList(Arrays.asList( new ServerConfiguration( - "http://petstore.swagger.io:80/v2", - "No description provided", + "http://{server}.swagger.io:{port}/v2", + "petstore server", + new HashMap() {{ + put("server", new ServerVariable( + "No description provided", + "petstore", + new HashSet( + Arrays.asList( + "petstore", + "qa-petstore", + "dev-petstore" + ) + ) + )); + put("port", new ServerVariable( + "No description provided", + "80", + new HashSet( + Arrays.asList( + "80", + "8080" + ) + ) + )); + }} + ), + new ServerConfiguration( + "https://localhost:8080/{version}", + "The local server", + new HashMap() {{ + put("version", new ServerVariable( + "No description provided", + "v2", + new HashSet( + Arrays.asList( + "v1", + "v2" + ) + ) + )); + }} + ), + new ServerConfiguration( + "https://127.0.0.1/no_varaible", + "The local server without variables", new HashMap() ) )); @@ -130,7 +174,9 @@ public class ApiClient extends JavaTimeFormatter { authentications = new HashMap(); authentications.put("api_key", new ApiKeyAuth("header", "api_key")); authentications.put("api_key_query", new ApiKeyAuth("query", "api_key_query")); + authentications.put("bearer_test", new HttpBearerAuth("bearer")); authentications.put("http_basic_test", new HttpBasicAuth()); + authentications.put("http_signature_test", new HttpBearerAuth("signature")); authentications.put("petstore_auth", new OAuth()); // Prevent the authentications from being modified. authentications = Collections.unmodifiableMap(authentications); @@ -272,6 +318,21 @@ public class ApiClient extends JavaTimeFormatter { return tempFolderPath; } + /** + * Helper method to set access token for the first Bearer authentication. + * @param bearerToken Bearer token + * @return API client + */ + public ApiClient setBearerToken(String bearerToken) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBearerAuth) { + ((HttpBearerAuth) auth).setBearerToken(bearerToken); + return this; + } + } + throw new RuntimeException("No Bearer authentication configured!"); + } + /** * Helper method to set username for the first HTTP basic authentication. diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index 8077d1f92d..6de6aa2b26 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -51,16 +51,16 @@ public class AnotherFakeApi { /** * To test special tags * To test special tags and operation ID starting with number - * @param body client model (required) + * @param client client model (required) * @return Client * @throws ApiException if fails to make API call */ - public Client call123testSpecialTags(Client body) throws ApiException { - Object localVarPostBody = body; + public Client call123testSpecialTags(Client client) throws ApiException { + Object localVarPostBody = client; - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling call123testSpecialTags"); + // verify the required parameter 'client' is set + if (client == null) { + throw new ApiException(400, "Missing the required parameter 'client' when calling call123testSpecialTags"); } // create path and map variables diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/DefaultApi.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/DefaultApi.java new file mode 100644 index 0000000000..8be4621cbe --- /dev/null +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/DefaultApi.java @@ -0,0 +1,101 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package org.openapitools.client.api; + +import com.fasterxml.jackson.core.type.TypeReference; + +import org.openapitools.client.ApiException; +import org.openapitools.client.ApiClient; +import org.openapitools.client.Configuration; +import org.openapitools.client.model.*; +import org.openapitools.client.Pair; + +import org.openapitools.client.model.FooGetDefaultResponse; + + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DefaultApi { + private ApiClient apiClient; + + public DefaultApi() { + this(Configuration.getDefaultApiClient()); + } + + public DefaultApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * + * + * @return FooGetDefaultResponse + * @throws ApiException if fails to make API call + */ + public FooGetDefaultResponse fooGet() throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/foo"; + + // query params + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + TypeReference localVarReturnType = new TypeReference() {}; + return apiClient.invokeAPI( + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + localVarReturnType + ); + } +} diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/FakeApi.java index 9b1ca28923..33385400a5 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/FakeApi.java @@ -22,13 +22,16 @@ import org.openapitools.client.Pair; import java.math.BigDecimal; import org.openapitools.client.model.Client; +import org.openapitools.client.model.EnumClass; import java.io.File; import org.openapitools.client.model.FileSchemaTestClass; +import org.openapitools.client.model.HealthCheckResult; import java.time.LocalDate; import java.time.OffsetDateTime; import org.openapitools.client.model.OuterComposite; +import org.openapitools.client.model.OuterObjectWithEnumProperty; +import org.openapitools.client.model.Pet; import org.openapitools.client.model.User; -import org.openapitools.client.model.XmlItem; import java.util.ArrayList; @@ -57,21 +60,16 @@ public class FakeApi { } /** - * creates an XmlItem - * this route creates an XmlItem - * @param xmlItem XmlItem Body (required) + * Health check endpoint + * + * @return HealthCheckResult * @throws ApiException if fails to make API call */ - public void createXmlItem(XmlItem xmlItem) throws ApiException { - Object localVarPostBody = xmlItem; - - // verify the required parameter 'xmlItem' is set - if (xmlItem == null) { - throw new ApiException(400, "Missing the required parameter 'xmlItem' when calling createXmlItem"); - } + public HealthCheckResult fakeHealthGet() throws ApiException { + Object localVarPostBody = null; // create path and map variables - String localVarPath = "/fake/create_xml_item"; + String localVarPath = "/fake/health"; // query params List localVarQueryParams = new ArrayList(); @@ -84,20 +82,80 @@ public class FakeApi { final String[] localVarAccepts = { - + "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { - "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" + }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { }; + TypeReference localVarReturnType = new TypeReference() {}; + return apiClient.invokeAPI( + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + localVarReturnType + ); + } + /** + * test http signature authentication + * + * @param pet Pet object that needs to be added to the store (required) + * @param query1 query parameter (optional) + * @param header1 header parameter (optional) + * @throws ApiException if fails to make API call + */ + public void fakeHttpSignatureTest(Pet pet, String query1, String header1) throws ApiException { + Object localVarPostBody = pet; + + // verify the required parameter 'pet' is set + if (pet == null) { + throw new ApiException(400, "Missing the required parameter 'pet' when calling fakeHttpSignatureTest"); + } + + // create path and map variables + String localVarPath = "/fake/http-signature-test"; + + // query params + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPair("query_1", query1)); + if (header1 != null) + localVarHeaderParams.put("header_1", apiClient.parameterToString(header1)); + + + + final String[] localVarAccepts = { + + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json", "application/xml" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "http_signature_test" }; + apiClient.invokeAPI( localVarPath, - "POST", + "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, @@ -139,7 +197,7 @@ public class FakeApi { final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); @@ -164,12 +222,12 @@ public class FakeApi { /** * * Test serialization of object with outer number type - * @param body Input composite as post body (optional) + * @param outerComposite Input composite as post body (optional) * @return OuterComposite * @throws ApiException if fails to make API call */ - public OuterComposite fakeOuterCompositeSerialize(OuterComposite body) throws ApiException { - Object localVarPostBody = body; + public OuterComposite fakeOuterCompositeSerialize(OuterComposite outerComposite) throws ApiException { + Object localVarPostBody = outerComposite; // create path and map variables String localVarPath = "/fake/outer/composite"; @@ -190,7 +248,7 @@ public class FakeApi { final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); @@ -241,7 +299,7 @@ public class FakeApi { final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); @@ -292,7 +350,7 @@ public class FakeApi { final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); @@ -316,16 +374,126 @@ public class FakeApi { } /** * - * For this test, the body for this request much reference a schema named `File`. - * @param body (required) + * Test serialization of enum (int) properties with examples + * @param outerObjectWithEnumProperty Input enum (int) as post body (required) + * @return OuterObjectWithEnumProperty * @throws ApiException if fails to make API call */ - public void testBodyWithFileSchema(FileSchemaTestClass body) throws ApiException { + public OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(OuterObjectWithEnumProperty outerObjectWithEnumProperty) throws ApiException { + Object localVarPostBody = outerObjectWithEnumProperty; + + // verify the required parameter 'outerObjectWithEnumProperty' is set + if (outerObjectWithEnumProperty == null) { + throw new ApiException(400, "Missing the required parameter 'outerObjectWithEnumProperty' when calling fakePropertyEnumIntegerSerialize"); + } + + // create path and map variables + String localVarPath = "/fake/property/enum-int"; + + // query params + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + final String[] localVarAccepts = { + "*/*" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + TypeReference localVarReturnType = new TypeReference() {}; + return apiClient.invokeAPI( + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + localVarReturnType + ); + } + /** + * + * For this test, the body has to be a binary file. + * @param body image to upload (required) + * @throws ApiException if fails to make API call + */ + public void testBodyWithBinary(File body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling testBodyWithFileSchema"); + throw new ApiException(400, "Missing the required parameter 'body' when calling testBodyWithBinary"); + } + + // create path and map variables + String localVarPath = "/fake/body-with-binary"; + + // query params + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + final String[] localVarAccepts = { + + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "image/png" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + apiClient.invokeAPI( + localVarPath, + "PUT", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + null + ); + } + /** + * + * For this test, the body for this request must reference a schema named `File`. + * @param fileSchemaTestClass (required) + * @throws ApiException if fails to make API call + */ + public void testBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass) throws ApiException { + Object localVarPostBody = fileSchemaTestClass; + + // verify the required parameter 'fileSchemaTestClass' is set + if (fileSchemaTestClass == null) { + throw new ApiException(400, "Missing the required parameter 'fileSchemaTestClass' when calling testBodyWithFileSchema"); } // create path and map variables @@ -372,20 +540,20 @@ public class FakeApi { * * * @param query (required) - * @param body (required) + * @param user (required) * @throws ApiException if fails to make API call */ - public void testBodyWithQueryParams(String query, User body) throws ApiException { - Object localVarPostBody = body; + public void testBodyWithQueryParams(String query, User user) throws ApiException { + Object localVarPostBody = user; // verify the required parameter 'query' is set if (query == null) { throw new ApiException(400, "Missing the required parameter 'query' when calling testBodyWithQueryParams"); } - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling testBodyWithQueryParams"); + // verify the required parameter 'user' is set + if (user == null) { + throw new ApiException(400, "Missing the required parameter 'user' when calling testBodyWithQueryParams"); } // create path and map variables @@ -432,16 +600,16 @@ public class FakeApi { /** * To test \"client\" model * To test \"client\" model - * @param body client model (required) + * @param client client model (required) * @return Client * @throws ApiException if fails to make API call */ - public Client testClientModel(Client body) throws ApiException { - Object localVarPostBody = body; + public Client testClientModel(Client client) throws ApiException { + Object localVarPostBody = client; - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling testClientModel"); + // verify the required parameter 'client' is set + if (client == null) { + throw new ApiException(400, "Missing the required parameter 'client' when calling testClientModel"); } // create path and map variables @@ -486,8 +654,8 @@ public class 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 假端點 偽のエンドポイント 가짜 엔드 포인트 * @param number None (required) * @param _double None (required) * @param patternWithoutDelimiter None (required) @@ -604,11 +772,12 @@ if (paramCallback != null) * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) + * @param enumQueryModelArray (optional * @param enumFormStringArray Form parameter enum test (string array) (optional * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @throws ApiException if fails to make API call */ - public void testEnumParameters(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString) throws ApiException { + public void testEnumParameters(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumQueryModelArray, List enumFormStringArray, String enumFormString) throws ApiException { Object localVarPostBody = null; // create path and map variables @@ -621,10 +790,11 @@ if (paramCallback != null) Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarCollectionQueryParams.addAll(apiClient.parameterToPairs("csv", "enum_query_string_array", enumQueryStringArray)); + localVarCollectionQueryParams.addAll(apiClient.parameterToPairs("multi", "enum_query_string_array", enumQueryStringArray)); localVarQueryParams.addAll(apiClient.parameterToPair("enum_query_string", enumQueryString)); localVarQueryParams.addAll(apiClient.parameterToPair("enum_query_integer", enumQueryInteger)); localVarQueryParams.addAll(apiClient.parameterToPair("enum_query_double", enumQueryDouble)); + localVarCollectionQueryParams.addAll(apiClient.parameterToPairs("multi", "enum_query_model_array", enumQueryModelArray)); if (enumHeaderStringArray != null) localVarHeaderParams.put("enum_header_string_array", apiClient.parameterToString(enumHeaderStringArray)); if (enumHeaderString != null) @@ -723,7 +893,7 @@ if (booleanGroup != null) }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - String[] localVarAuthNames = new String[] { }; + String[] localVarAuthNames = new String[] { "bearer_test" }; apiClient.invokeAPI( localVarPath, @@ -743,15 +913,15 @@ if (booleanGroup != null) /** * test inline additionalProperties * - * @param param request body (required) + * @param requestBody request body (required) * @throws ApiException if fails to make API call */ - public void testInlineAdditionalProperties(Map param) throws ApiException { - Object localVarPostBody = param; + public void testInlineAdditionalProperties(Map requestBody) throws ApiException { + Object localVarPostBody = requestBody; - // verify the required parameter 'param' is set - if (param == null) { - throw new ApiException(400, "Missing the required parameter 'param' when calling testInlineAdditionalProperties"); + // verify the required parameter 'requestBody' is set + if (requestBody == null) { + throw new ApiException(400, "Missing the required parameter 'requestBody' when calling testInlineAdditionalProperties"); } // create path and map variables @@ -866,9 +1036,11 @@ if (param2 != null) * @param http (required) * @param url (required) * @param context (required) + * @param allowEmpty (required) + * @param language (optional * @throws ApiException if fails to make API call */ - public void testQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context) throws ApiException { + public void testQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, String allowEmpty, Map language) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'pipe' is set @@ -896,6 +1068,11 @@ if (param2 != null) throw new ApiException(400, "Missing the required parameter 'context' when calling testQueryParameterCollectionFormat"); } + // verify the required parameter 'allowEmpty' is set + if (allowEmpty == null) { + throw new ApiException(400, "Missing the required parameter 'allowEmpty' when calling testQueryParameterCollectionFormat"); + } + // create path and map variables String localVarPath = "/fake/test-query-parameters"; @@ -906,11 +1083,13 @@ if (param2 != null) Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarCollectionQueryParams.addAll(apiClient.parameterToPairs("csv", "pipe", pipe)); + localVarCollectionQueryParams.addAll(apiClient.parameterToPairs("pipes", "pipe", pipe)); localVarCollectionQueryParams.addAll(apiClient.parameterToPairs("csv", "ioutil", ioutil)); localVarCollectionQueryParams.addAll(apiClient.parameterToPairs("ssv", "http", http)); localVarCollectionQueryParams.addAll(apiClient.parameterToPairs("csv", "url", url)); localVarCollectionQueryParams.addAll(apiClient.parameterToPairs("multi", "context", context)); + localVarQueryParams.addAll(apiClient.parameterToPair("language", language)); + localVarQueryParams.addAll(apiClient.parameterToPair("allowEmpty", allowEmpty)); diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index 3514033324..71f98b2710 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -51,16 +51,16 @@ public class FakeClassnameTags123Api { /** * To test class name in snake case * To test class name in snake case - * @param body client model (required) + * @param client client model (required) * @return Client * @throws ApiException if fails to make API call */ - public Client testClassname(Client body) throws ApiException { - Object localVarPostBody = body; + public Client testClassname(Client client) throws ApiException { + Object localVarPostBody = client; - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling testClassname"); + // verify the required parameter 'client' is set + if (client == null) { + throw new ApiException(400, "Missing the required parameter 'client' when calling testClassname"); } // create path and map variables diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/PetApi.java index e905e02927..29dcfdff0f 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/PetApi.java @@ -54,15 +54,15 @@ public class PetApi { /** * Add a new pet to the store * - * @param body Pet object that needs to be added to the store (required) + * @param pet Pet object that needs to be added to the store (required) * @throws ApiException if fails to make API call */ - public void addPet(Pet body) throws ApiException { - Object localVarPostBody = body; + public void addPet(Pet pet) throws ApiException { + Object localVarPostBody = pet; - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling addPet"); + // verify the required parameter 'pet' is set + if (pet == null) { + throw new ApiException(400, "Missing the required parameter 'pet' when calling addPet"); } // create path and map variables @@ -339,15 +339,15 @@ public class PetApi { /** * Update an existing pet * - * @param body Pet object that needs to be added to the store (required) + * @param pet Pet object that needs to be added to the store (required) * @throws ApiException if fails to make API call */ - public void updatePet(Pet body) throws ApiException { - Object localVarPostBody = body; + public void updatePet(Pet pet) throws ApiException { + Object localVarPostBody = pet; - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling updatePet"); + // verify the required parameter 'pet' is set + if (pet == null) { + throw new ApiException(400, "Missing the required parameter 'pet' when calling updatePet"); } // create path and map variables diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/StoreApi.java index 2ea892fb8d..585e28f299 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/StoreApi.java @@ -213,16 +213,16 @@ public class StoreApi { /** * Place an order for a pet * - * @param body order placed for purchasing the pet (required) + * @param order order placed for purchasing the pet (required) * @return Order * @throws ApiException if fails to make API call */ - public Order placeOrder(Order body) throws ApiException { - Object localVarPostBody = body; + public Order placeOrder(Order order) throws ApiException { + Object localVarPostBody = order; - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling placeOrder"); + // verify the required parameter 'order' is set + if (order == null) { + throw new ApiException(400, "Missing the required parameter 'order' when calling placeOrder"); } // create path and map variables @@ -244,7 +244,7 @@ public class StoreApi { final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/UserApi.java index 421e960411..7dfe70d71a 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/api/UserApi.java @@ -52,15 +52,15 @@ public class UserApi { /** * Create user * This can only be done by the logged in user. - * @param body Created user object (required) + * @param user Created user object (required) * @throws ApiException if fails to make API call */ - public void createUser(User body) throws ApiException { - Object localVarPostBody = body; + public void createUser(User user) throws ApiException { + Object localVarPostBody = user; - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling createUser"); + // verify the required parameter 'user' is set + if (user == null) { + throw new ApiException(400, "Missing the required parameter 'user' when calling createUser"); } // create path and map variables @@ -82,7 +82,7 @@ public class UserApi { final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); @@ -106,15 +106,15 @@ public class UserApi { /** * Creates list of users with given input array * - * @param body List of user object (required) + * @param user List of user object (required) * @throws ApiException if fails to make API call */ - public void createUsersWithArrayInput(List body) throws ApiException { - Object localVarPostBody = body; + public void createUsersWithArrayInput(List user) throws ApiException { + Object localVarPostBody = user; - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling createUsersWithArrayInput"); + // verify the required parameter 'user' is set + if (user == null) { + throw new ApiException(400, "Missing the required parameter 'user' when calling createUsersWithArrayInput"); } // create path and map variables @@ -136,7 +136,7 @@ public class UserApi { final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); @@ -160,15 +160,15 @@ public class UserApi { /** * Creates list of users with given input array * - * @param body List of user object (required) + * @param user List of user object (required) * @throws ApiException if fails to make API call */ - public void createUsersWithListInput(List body) throws ApiException { - Object localVarPostBody = body; + public void createUsersWithListInput(List user) throws ApiException { + Object localVarPostBody = user; - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling createUsersWithListInput"); + // verify the required parameter 'user' is set + if (user == null) { + throw new ApiException(400, "Missing the required parameter 'user' when calling createUsersWithListInput"); } // create path and map variables @@ -190,7 +190,7 @@ public class UserApi { final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); @@ -439,20 +439,20 @@ public class UserApi { * Updated user * This can only be done by the logged in user. * @param username name that need to be deleted (required) - * @param body Updated user object (required) + * @param user Updated user object (required) * @throws ApiException if fails to make API call */ - public void updateUser(String username, User body) throws ApiException { - Object localVarPostBody = body; + public void updateUser(String username, User user) throws ApiException { + Object localVarPostBody = user; // verify the required parameter 'username' is set if (username == null) { throw new ApiException(400, "Missing the required parameter 'username' when calling updateUser"); } - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling updateUser"); + // verify the required parameter 'user' is set + if (user == null) { + throw new ApiException(400, "Missing the required parameter 'user' when calling updateUser"); } // create path and map variables @@ -475,7 +475,7 @@ public class UserApi { final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index 3ff2f8823c..2bfa18f61d 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -20,9 +20,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import java.math.BigDecimal; import java.util.HashMap; -import java.util.List; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -31,403 +29,85 @@ import com.fasterxml.jackson.annotation.JsonTypeName; * AdditionalPropertiesClass */ @JsonPropertyOrder({ - AdditionalPropertiesClass.JSON_PROPERTY_MAP_STRING, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_NUMBER, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_INTEGER, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_BOOLEAN, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_INTEGER, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_ANYTYPE, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_STRING, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_ANYTYPE, - AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE1, - AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE2, - AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE3 + AdditionalPropertiesClass.JSON_PROPERTY_MAP_PROPERTY, + AdditionalPropertiesClass.JSON_PROPERTY_MAP_OF_MAP_PROPERTY }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class AdditionalPropertiesClass { - public static final String JSON_PROPERTY_MAP_STRING = "map_string"; - private Map mapString = null; + public static final String JSON_PROPERTY_MAP_PROPERTY = "map_property"; + private Map mapProperty = null; - public static final String JSON_PROPERTY_MAP_NUMBER = "map_number"; - private Map mapNumber = null; - - public static final String JSON_PROPERTY_MAP_INTEGER = "map_integer"; - private Map mapInteger = null; - - public static final String JSON_PROPERTY_MAP_BOOLEAN = "map_boolean"; - private Map mapBoolean = null; - - public static final String JSON_PROPERTY_MAP_ARRAY_INTEGER = "map_array_integer"; - private Map> mapArrayInteger = null; - - public static final String JSON_PROPERTY_MAP_ARRAY_ANYTYPE = "map_array_anytype"; - private Map> mapArrayAnytype = null; - - public static final String JSON_PROPERTY_MAP_MAP_STRING = "map_map_string"; - private Map> mapMapString = null; - - public static final String JSON_PROPERTY_MAP_MAP_ANYTYPE = "map_map_anytype"; - private Map> mapMapAnytype = null; - - public static final String JSON_PROPERTY_ANYTYPE1 = "anytype_1"; - private Object anytype1; - - public static final String JSON_PROPERTY_ANYTYPE2 = "anytype_2"; - private Object anytype2; - - public static final String JSON_PROPERTY_ANYTYPE3 = "anytype_3"; - private Object anytype3; + public static final String JSON_PROPERTY_MAP_OF_MAP_PROPERTY = "map_of_map_property"; + private Map> mapOfMapProperty = null; public AdditionalPropertiesClass() { } - public AdditionalPropertiesClass mapString(Map mapString) { + public AdditionalPropertiesClass mapProperty(Map mapProperty) { - this.mapString = mapString; + this.mapProperty = mapProperty; return this; } - public AdditionalPropertiesClass putMapStringItem(String key, String mapStringItem) { - if (this.mapString == null) { - this.mapString = new HashMap<>(); + public AdditionalPropertiesClass putMapPropertyItem(String key, String mapPropertyItem) { + if (this.mapProperty == null) { + this.mapProperty = new HashMap<>(); } - this.mapString.put(key, mapStringItem); + this.mapProperty.put(key, mapPropertyItem); return this; } /** - * Get mapString - * @return mapString + * Get mapProperty + * @return mapProperty **/ @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP_STRING) + @JsonProperty(JSON_PROPERTY_MAP_PROPERTY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getMapString() { - return mapString; + public Map getMapProperty() { + return mapProperty; } - @JsonProperty(JSON_PROPERTY_MAP_STRING) + @JsonProperty(JSON_PROPERTY_MAP_PROPERTY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapString(Map mapString) { - this.mapString = mapString; + public void setMapProperty(Map mapProperty) { + this.mapProperty = mapProperty; } - public AdditionalPropertiesClass mapNumber(Map mapNumber) { + public AdditionalPropertiesClass mapOfMapProperty(Map> mapOfMapProperty) { - this.mapNumber = mapNumber; + this.mapOfMapProperty = mapOfMapProperty; return this; } - public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumberItem) { - if (this.mapNumber == null) { - this.mapNumber = new HashMap<>(); + public AdditionalPropertiesClass putMapOfMapPropertyItem(String key, Map mapOfMapPropertyItem) { + if (this.mapOfMapProperty == null) { + this.mapOfMapProperty = new HashMap<>(); } - this.mapNumber.put(key, mapNumberItem); + this.mapOfMapProperty.put(key, mapOfMapPropertyItem); return this; } /** - * Get mapNumber - * @return mapNumber + * Get mapOfMapProperty + * @return mapOfMapProperty **/ @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP_NUMBER) + @JsonProperty(JSON_PROPERTY_MAP_OF_MAP_PROPERTY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getMapNumber() { - return mapNumber; + public Map> getMapOfMapProperty() { + return mapOfMapProperty; } - @JsonProperty(JSON_PROPERTY_MAP_NUMBER) + @JsonProperty(JSON_PROPERTY_MAP_OF_MAP_PROPERTY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapNumber(Map mapNumber) { - this.mapNumber = mapNumber; - } - - - public AdditionalPropertiesClass mapInteger(Map mapInteger) { - - this.mapInteger = mapInteger; - return this; - } - - public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntegerItem) { - if (this.mapInteger == null) { - this.mapInteger = new HashMap<>(); - } - this.mapInteger.put(key, mapIntegerItem); - return this; - } - - /** - * Get mapInteger - * @return mapInteger - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map getMapInteger() { - return mapInteger; - } - - - @JsonProperty(JSON_PROPERTY_MAP_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapInteger(Map mapInteger) { - this.mapInteger = mapInteger; - } - - - public AdditionalPropertiesClass mapBoolean(Map mapBoolean) { - - this.mapBoolean = mapBoolean; - return this; - } - - public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBooleanItem) { - if (this.mapBoolean == null) { - this.mapBoolean = new HashMap<>(); - } - this.mapBoolean.put(key, mapBooleanItem); - return this; - } - - /** - * Get mapBoolean - * @return mapBoolean - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP_BOOLEAN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map getMapBoolean() { - return mapBoolean; - } - - - @JsonProperty(JSON_PROPERTY_MAP_BOOLEAN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapBoolean(Map mapBoolean) { - this.mapBoolean = mapBoolean; - } - - - public AdditionalPropertiesClass mapArrayInteger(Map> mapArrayInteger) { - - this.mapArrayInteger = mapArrayInteger; - return this; - } - - public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List mapArrayIntegerItem) { - if (this.mapArrayInteger == null) { - this.mapArrayInteger = new HashMap<>(); - } - this.mapArrayInteger.put(key, mapArrayIntegerItem); - return this; - } - - /** - * Get mapArrayInteger - * @return mapArrayInteger - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP_ARRAY_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map> getMapArrayInteger() { - return mapArrayInteger; - } - - - @JsonProperty(JSON_PROPERTY_MAP_ARRAY_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapArrayInteger(Map> mapArrayInteger) { - this.mapArrayInteger = mapArrayInteger; - } - - - public AdditionalPropertiesClass mapArrayAnytype(Map> mapArrayAnytype) { - - this.mapArrayAnytype = mapArrayAnytype; - return this; - } - - public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List mapArrayAnytypeItem) { - if (this.mapArrayAnytype == null) { - this.mapArrayAnytype = new HashMap<>(); - } - this.mapArrayAnytype.put(key, mapArrayAnytypeItem); - return this; - } - - /** - * Get mapArrayAnytype - * @return mapArrayAnytype - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP_ARRAY_ANYTYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map> getMapArrayAnytype() { - return mapArrayAnytype; - } - - - @JsonProperty(JSON_PROPERTY_MAP_ARRAY_ANYTYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapArrayAnytype(Map> mapArrayAnytype) { - this.mapArrayAnytype = mapArrayAnytype; - } - - - public AdditionalPropertiesClass mapMapString(Map> mapMapString) { - - this.mapMapString = mapMapString; - return this; - } - - public AdditionalPropertiesClass putMapMapStringItem(String key, Map mapMapStringItem) { - if (this.mapMapString == null) { - this.mapMapString = new HashMap<>(); - } - this.mapMapString.put(key, mapMapStringItem); - return this; - } - - /** - * Get mapMapString - * @return mapMapString - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP_MAP_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map> getMapMapString() { - return mapMapString; - } - - - @JsonProperty(JSON_PROPERTY_MAP_MAP_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapMapString(Map> mapMapString) { - this.mapMapString = mapMapString; - } - - - public AdditionalPropertiesClass mapMapAnytype(Map> mapMapAnytype) { - - this.mapMapAnytype = mapMapAnytype; - return this; - } - - public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map mapMapAnytypeItem) { - if (this.mapMapAnytype == null) { - this.mapMapAnytype = new HashMap<>(); - } - this.mapMapAnytype.put(key, mapMapAnytypeItem); - return this; - } - - /** - * Get mapMapAnytype - * @return mapMapAnytype - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP_MAP_ANYTYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map> getMapMapAnytype() { - return mapMapAnytype; - } - - - @JsonProperty(JSON_PROPERTY_MAP_MAP_ANYTYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapMapAnytype(Map> mapMapAnytype) { - this.mapMapAnytype = mapMapAnytype; - } - - - public AdditionalPropertiesClass anytype1(Object anytype1) { - - this.anytype1 = anytype1; - return this; - } - - /** - * Get anytype1 - * @return anytype1 - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ANYTYPE1) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Object getAnytype1() { - return anytype1; - } - - - @JsonProperty(JSON_PROPERTY_ANYTYPE1) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAnytype1(Object anytype1) { - this.anytype1 = anytype1; - } - - - public AdditionalPropertiesClass anytype2(Object anytype2) { - - this.anytype2 = anytype2; - return this; - } - - /** - * Get anytype2 - * @return anytype2 - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ANYTYPE2) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Object getAnytype2() { - return anytype2; - } - - - @JsonProperty(JSON_PROPERTY_ANYTYPE2) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAnytype2(Object anytype2) { - this.anytype2 = anytype2; - } - - - public AdditionalPropertiesClass anytype3(Object anytype3) { - - this.anytype3 = anytype3; - return this; - } - - /** - * Get anytype3 - * @return anytype3 - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ANYTYPE3) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Object getAnytype3() { - return anytype3; - } - - - @JsonProperty(JSON_PROPERTY_ANYTYPE3) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAnytype3(Object anytype3) { - this.anytype3 = anytype3; + public void setMapOfMapProperty(Map> mapOfMapProperty) { + this.mapOfMapProperty = mapOfMapProperty; } @@ -440,39 +120,21 @@ public class AdditionalPropertiesClass { return false; } AdditionalPropertiesClass additionalPropertiesClass = (AdditionalPropertiesClass) o; - return Objects.equals(this.mapString, additionalPropertiesClass.mapString) && - Objects.equals(this.mapNumber, additionalPropertiesClass.mapNumber) && - Objects.equals(this.mapInteger, additionalPropertiesClass.mapInteger) && - Objects.equals(this.mapBoolean, additionalPropertiesClass.mapBoolean) && - Objects.equals(this.mapArrayInteger, additionalPropertiesClass.mapArrayInteger) && - Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && - Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && - Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && - Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && - Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && - Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); + return Objects.equals(this.mapProperty, additionalPropertiesClass.mapProperty) && + Objects.equals(this.mapOfMapProperty, additionalPropertiesClass.mapOfMapProperty); } @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); + return Objects.hash(mapProperty, mapOfMapProperty); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AdditionalPropertiesClass {\n"); - sb.append(" mapString: ").append(toIndentedString(mapString)).append("\n"); - sb.append(" mapNumber: ").append(toIndentedString(mapNumber)).append("\n"); - sb.append(" mapInteger: ").append(toIndentedString(mapInteger)).append("\n"); - sb.append(" mapBoolean: ").append(toIndentedString(mapBoolean)).append("\n"); - sb.append(" mapArrayInteger: ").append(toIndentedString(mapArrayInteger)).append("\n"); - sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); - sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); - sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); - sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); - sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); - sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); + sb.append(" mapProperty: ").append(toIndentedString(mapProperty)).append("\n"); + sb.append(" mapOfMapProperty: ").append(toIndentedString(mapOfMapProperty)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java new file mode 100644 index 0000000000..400ef6f1d4 --- /dev/null +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java @@ -0,0 +1,137 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.client.model.SingleRefType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * AllOfWithSingleRef + */ +@JsonPropertyOrder({ + AllOfWithSingleRef.JSON_PROPERTY_USERNAME, + AllOfWithSingleRef.JSON_PROPERTY_SINGLE_REF_TYPE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AllOfWithSingleRef { + public static final String JSON_PROPERTY_USERNAME = "username"; + private String username; + + public static final String JSON_PROPERTY_SINGLE_REF_TYPE = "SingleRefType"; + private SingleRefType singleRefType; + + public AllOfWithSingleRef() { + } + + public AllOfWithSingleRef username(String username) { + + this.username = username; + return this; + } + + /** + * Get username + * @return username + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USERNAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getUsername() { + return username; + } + + + @JsonProperty(JSON_PROPERTY_USERNAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUsername(String username) { + this.username = username; + } + + + public AllOfWithSingleRef singleRefType(SingleRefType singleRefType) { + + this.singleRefType = singleRefType; + return this; + } + + /** + * Get singleRefType + * @return singleRefType + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SINGLE_REF_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public SingleRefType getSingleRefType() { + return singleRefType; + } + + + @JsonProperty(JSON_PROPERTY_SINGLE_REF_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSingleRefType(SingleRefType singleRefType) { + this.singleRefType = singleRefType; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AllOfWithSingleRef allOfWithSingleRef = (AllOfWithSingleRef) o; + return Objects.equals(this.username, allOfWithSingleRef.username) && + Objects.equals(this.singleRefType, allOfWithSingleRef.singleRefType); + } + + @Override + public int hashCode() { + return Objects.hash(username, singleRefType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AllOfWithSingleRef {\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" singleRefType: ").append(toIndentedString(singleRefType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Animal.java index 6c603bf62c..31932c6e68 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Animal.java @@ -23,7 +23,6 @@ import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import org.openapitools.client.model.BigCat; import org.openapitools.client.model.Cat; import org.openapitools.client.model.Dog; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -43,7 +42,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName; ) @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ - @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Cat.java index 97ffcf45b2..e14f5458ac 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Cat.java @@ -24,7 +24,6 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.client.model.Animal; -import org.openapitools.client.model.BigCat; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -40,9 +39,6 @@ import com.fasterxml.jackson.annotation.JsonTypeName; allowSetters = true // allows the className to be set during deserialization ) @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) -@JsonSubTypes({ - @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), -}) public class Cat extends Animal { public static final String JSON_PROPERTY_DECLAWED = "declawed"; diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/DeprecatedObject.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/DeprecatedObject.java new file mode 100644 index 0000000000..837b1f13e7 --- /dev/null +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/DeprecatedObject.java @@ -0,0 +1,106 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * DeprecatedObject + * @deprecated + */ +@Deprecated +@JsonPropertyOrder({ + DeprecatedObject.JSON_PROPERTY_NAME +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DeprecatedObject { + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public DeprecatedObject() { + } + + public DeprecatedObject name(String name) { + + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(String name) { + this.name = name; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeprecatedObject deprecatedObject = (DeprecatedObject) o; + return Objects.equals(this.name, deprecatedObject.name); + } + + @Override + public int hashCode() { + return Objects.hash(name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeprecatedObject {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/EnumTest.java index 7ef8de6dfc..17fd4e0854 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/EnumTest.java @@ -21,6 +21,13 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.client.model.OuterEnum; +import org.openapitools.client.model.OuterEnumDefaultValue; +import org.openapitools.client.model.OuterEnumInteger; +import org.openapitools.client.model.OuterEnumIntegerDefaultValue; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -32,7 +39,10 @@ import com.fasterxml.jackson.annotation.JsonTypeName; EnumTest.JSON_PROPERTY_ENUM_STRING_REQUIRED, EnumTest.JSON_PROPERTY_ENUM_INTEGER, EnumTest.JSON_PROPERTY_ENUM_NUMBER, - EnumTest.JSON_PROPERTY_OUTER_ENUM + EnumTest.JSON_PROPERTY_OUTER_ENUM, + EnumTest.JSON_PROPERTY_OUTER_ENUM_INTEGER, + EnumTest.JSON_PROPERTY_OUTER_ENUM_DEFAULT_VALUE, + EnumTest.JSON_PROPERTY_OUTER_ENUM_INTEGER_DEFAULT_VALUE }) @JsonTypeName("Enum_Test") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") @@ -194,7 +204,16 @@ public class EnumTest { private EnumNumberEnum enumNumber; public static final String JSON_PROPERTY_OUTER_ENUM = "outerEnum"; - private OuterEnum outerEnum; + private JsonNullable outerEnum = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_OUTER_ENUM_INTEGER = "outerEnumInteger"; + private OuterEnumInteger outerEnumInteger; + + public static final String JSON_PROPERTY_OUTER_ENUM_DEFAULT_VALUE = "outerEnumDefaultValue"; + private OuterEnumDefaultValue outerEnumDefaultValue = OuterEnumDefaultValue.PLACED; + + public static final String JSON_PROPERTY_OUTER_ENUM_INTEGER_DEFAULT_VALUE = "outerEnumIntegerDefaultValue"; + private OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue = OuterEnumIntegerDefaultValue.NUMBER_0; public EnumTest() { } @@ -304,8 +323,8 @@ public class EnumTest { public EnumTest outerEnum(OuterEnum outerEnum) { + this.outerEnum = JsonNullable.of(outerEnum); - this.outerEnum = outerEnum; return this; } @@ -314,18 +333,104 @@ public class EnumTest { * @return outerEnum **/ @javax.annotation.Nullable + @JsonIgnore + + public OuterEnum getOuterEnum() { + return outerEnum.orElse(null); + } + @JsonProperty(JSON_PROPERTY_OUTER_ENUM) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OuterEnum getOuterEnum() { + public JsonNullable getOuterEnum_JsonNullable() { return outerEnum; } + + @JsonProperty(JSON_PROPERTY_OUTER_ENUM) + public void setOuterEnum_JsonNullable(JsonNullable outerEnum) { + this.outerEnum = outerEnum; + } + + public void setOuterEnum(OuterEnum outerEnum) { + this.outerEnum = JsonNullable.of(outerEnum); + } - @JsonProperty(JSON_PROPERTY_OUTER_ENUM) + public EnumTest outerEnumInteger(OuterEnumInteger outerEnumInteger) { + + this.outerEnumInteger = outerEnumInteger; + return this; + } + + /** + * Get outerEnumInteger + * @return outerEnumInteger + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OUTER_ENUM_INTEGER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOuterEnum(OuterEnum outerEnum) { - this.outerEnum = outerEnum; + + public OuterEnumInteger getOuterEnumInteger() { + return outerEnumInteger; + } + + + @JsonProperty(JSON_PROPERTY_OUTER_ENUM_INTEGER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOuterEnumInteger(OuterEnumInteger outerEnumInteger) { + this.outerEnumInteger = outerEnumInteger; + } + + + public EnumTest outerEnumDefaultValue(OuterEnumDefaultValue outerEnumDefaultValue) { + + this.outerEnumDefaultValue = outerEnumDefaultValue; + return this; + } + + /** + * Get outerEnumDefaultValue + * @return outerEnumDefaultValue + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OUTER_ENUM_DEFAULT_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OuterEnumDefaultValue getOuterEnumDefaultValue() { + return outerEnumDefaultValue; + } + + + @JsonProperty(JSON_PROPERTY_OUTER_ENUM_DEFAULT_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOuterEnumDefaultValue(OuterEnumDefaultValue outerEnumDefaultValue) { + this.outerEnumDefaultValue = outerEnumDefaultValue; + } + + + public EnumTest outerEnumIntegerDefaultValue(OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue) { + + this.outerEnumIntegerDefaultValue = outerEnumIntegerDefaultValue; + return this; + } + + /** + * Get outerEnumIntegerDefaultValue + * @return outerEnumIntegerDefaultValue + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OUTER_ENUM_INTEGER_DEFAULT_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OuterEnumIntegerDefaultValue getOuterEnumIntegerDefaultValue() { + return outerEnumIntegerDefaultValue; + } + + + @JsonProperty(JSON_PROPERTY_OUTER_ENUM_INTEGER_DEFAULT_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOuterEnumIntegerDefaultValue(OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue) { + this.outerEnumIntegerDefaultValue = outerEnumIntegerDefaultValue; } @@ -342,12 +447,26 @@ public class EnumTest { Objects.equals(this.enumStringRequired, enumTest.enumStringRequired) && Objects.equals(this.enumInteger, enumTest.enumInteger) && Objects.equals(this.enumNumber, enumTest.enumNumber) && - Objects.equals(this.outerEnum, enumTest.outerEnum); + equalsNullable(this.outerEnum, enumTest.outerEnum) && + Objects.equals(this.outerEnumInteger, enumTest.outerEnumInteger) && + Objects.equals(this.outerEnumDefaultValue, enumTest.outerEnumDefaultValue) && + Objects.equals(this.outerEnumIntegerDefaultValue, enumTest.outerEnumIntegerDefaultValue); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); } @Override public int hashCode() { - return Objects.hash(enumString, enumStringRequired, enumInteger, enumNumber, outerEnum); + return Objects.hash(enumString, enumStringRequired, enumInteger, enumNumber, hashCodeNullable(outerEnum), outerEnumInteger, outerEnumDefaultValue, outerEnumIntegerDefaultValue); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; } @Override @@ -359,6 +478,9 @@ public class EnumTest { sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); sb.append(" enumNumber: ").append(toIndentedString(enumNumber)).append("\n"); sb.append(" outerEnum: ").append(toIndentedString(outerEnum)).append("\n"); + sb.append(" outerEnumInteger: ").append(toIndentedString(outerEnumInteger)).append("\n"); + sb.append(" outerEnumDefaultValue: ").append(toIndentedString(outerEnumDefaultValue)).append("\n"); + sb.append(" outerEnumIntegerDefaultValue: ").append(toIndentedString(outerEnumIntegerDefaultValue)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Foo.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Foo.java new file mode 100644 index 0000000000..08d43f2d0b --- /dev/null +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/Foo.java @@ -0,0 +1,104 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Foo + */ +@JsonPropertyOrder({ + Foo.JSON_PROPERTY_BAR +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Foo { + public static final String JSON_PROPERTY_BAR = "bar"; + private String bar = "bar"; + + public Foo() { + } + + public Foo bar(String bar) { + + this.bar = bar; + return this; + } + + /** + * Get bar + * @return bar + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getBar() { + return bar; + } + + + @JsonProperty(JSON_PROPERTY_BAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBar(String bar) { + this.bar = bar; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Foo foo = (Foo) o; + return Objects.equals(this.bar, foo.bar); + } + + @Override + public int hashCode() { + return Objects.hash(bar); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Foo {\n"); + sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java new file mode 100644 index 0000000000..64290b3fa0 --- /dev/null +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java @@ -0,0 +1,106 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.client.model.Foo; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * FooGetDefaultResponse + */ +@JsonPropertyOrder({ + FooGetDefaultResponse.JSON_PROPERTY_STRING +}) +@JsonTypeName("_foo_get_default_response") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class FooGetDefaultResponse { + public static final String JSON_PROPERTY_STRING = "string"; + private Foo string; + + public FooGetDefaultResponse() { + } + + public FooGetDefaultResponse string(Foo string) { + + this.string = string; + return this; + } + + /** + * Get string + * @return string + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Foo getString() { + return string; + } + + + @JsonProperty(JSON_PROPERTY_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setString(Foo string) { + this.string = string; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FooGetDefaultResponse fooGetDefaultResponse = (FooGetDefaultResponse) o; + return Objects.equals(this.string, fooGetDefaultResponse.string); + } + + @Override + public int hashCode() { + return Objects.hash(string); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FooGetDefaultResponse {\n"); + sb.append(" string: ").append(toIndentedString(string)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/FormatTest.java index ed2ed56560..0be153739c 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/FormatTest.java @@ -38,6 +38,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName; FormatTest.JSON_PROPERTY_NUMBER, FormatTest.JSON_PROPERTY_FLOAT, FormatTest.JSON_PROPERTY_DOUBLE, + FormatTest.JSON_PROPERTY_DECIMAL, FormatTest.JSON_PROPERTY_STRING, FormatTest.JSON_PROPERTY_BYTE, FormatTest.JSON_PROPERTY_BINARY, @@ -45,7 +46,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName; FormatTest.JSON_PROPERTY_DATE_TIME, FormatTest.JSON_PROPERTY_UUID, FormatTest.JSON_PROPERTY_PASSWORD, - FormatTest.JSON_PROPERTY_BIG_DECIMAL + FormatTest.JSON_PROPERTY_PATTERN_WITH_DIGITS, + FormatTest.JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER }) @JsonTypeName("format_test") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") @@ -68,6 +70,9 @@ public class FormatTest { public static final String JSON_PROPERTY_DOUBLE = "double"; private Double _double; + public static final String JSON_PROPERTY_DECIMAL = "decimal"; + private BigDecimal decimal; + public static final String JSON_PROPERTY_STRING = "string"; private String string; @@ -89,8 +94,11 @@ public class FormatTest { public static final String JSON_PROPERTY_PASSWORD = "password"; private String password; - public static final String JSON_PROPERTY_BIG_DECIMAL = "BigDecimal"; - private BigDecimal bigDecimal; + public static final String JSON_PROPERTY_PATTERN_WITH_DIGITS = "pattern_with_digits"; + private String patternWithDigits; + + public static final String JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER = "pattern_with_digits_and_delimiter"; + private String patternWithDigitsAndDelimiter; public FormatTest() { } @@ -261,6 +269,32 @@ public class FormatTest { } + public FormatTest decimal(BigDecimal decimal) { + + this.decimal = decimal; + return this; + } + + /** + * Get decimal + * @return decimal + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DECIMAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BigDecimal getDecimal() { + return decimal; + } + + + @JsonProperty(JSON_PROPERTY_DECIMAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDecimal(BigDecimal decimal) { + this.decimal = decimal; + } + + public FormatTest string(String string) { this.string = string; @@ -443,29 +477,55 @@ public class FormatTest { } - public FormatTest bigDecimal(BigDecimal bigDecimal) { + public FormatTest patternWithDigits(String patternWithDigits) { - this.bigDecimal = bigDecimal; + this.patternWithDigits = patternWithDigits; return this; } /** - * Get bigDecimal - * @return bigDecimal + * A string that is a 10 digit number. Can have leading zeros. + * @return patternWithDigits **/ @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BIG_DECIMAL) + @JsonProperty(JSON_PROPERTY_PATTERN_WITH_DIGITS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public BigDecimal getBigDecimal() { - return bigDecimal; + public String getPatternWithDigits() { + return patternWithDigits; } - @JsonProperty(JSON_PROPERTY_BIG_DECIMAL) + @JsonProperty(JSON_PROPERTY_PATTERN_WITH_DIGITS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBigDecimal(BigDecimal bigDecimal) { - this.bigDecimal = bigDecimal; + public void setPatternWithDigits(String patternWithDigits) { + this.patternWithDigits = patternWithDigits; + } + + + public FormatTest patternWithDigitsAndDelimiter(String patternWithDigitsAndDelimiter) { + + this.patternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; + return this; + } + + /** + * A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. + * @return patternWithDigitsAndDelimiter + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPatternWithDigitsAndDelimiter() { + return patternWithDigitsAndDelimiter; + } + + + @JsonProperty(JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPatternWithDigitsAndDelimiter(String patternWithDigitsAndDelimiter) { + this.patternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; } @@ -484,6 +544,7 @@ public class FormatTest { Objects.equals(this.number, formatTest.number) && Objects.equals(this._float, formatTest._float) && Objects.equals(this._double, formatTest._double) && + Objects.equals(this.decimal, formatTest.decimal) && Objects.equals(this.string, formatTest.string) && Arrays.equals(this._byte, formatTest._byte) && Objects.equals(this.binary, formatTest.binary) && @@ -491,12 +552,13 @@ public class FormatTest { Objects.equals(this.dateTime, formatTest.dateTime) && Objects.equals(this.uuid, formatTest.uuid) && Objects.equals(this.password, formatTest.password) && - Objects.equals(this.bigDecimal, formatTest.bigDecimal); + Objects.equals(this.patternWithDigits, formatTest.patternWithDigits) && + Objects.equals(this.patternWithDigitsAndDelimiter, formatTest.patternWithDigitsAndDelimiter); } @Override public int hashCode() { - return Objects.hash(integer, int32, int64, number, _float, _double, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, bigDecimal); + return Objects.hash(integer, int32, int64, number, _float, _double, decimal, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, patternWithDigits, patternWithDigitsAndDelimiter); } @Override @@ -509,6 +571,7 @@ public class FormatTest { sb.append(" number: ").append(toIndentedString(number)).append("\n"); sb.append(" _float: ").append(toIndentedString(_float)).append("\n"); sb.append(" _double: ").append(toIndentedString(_double)).append("\n"); + sb.append(" decimal: ").append(toIndentedString(decimal)).append("\n"); sb.append(" string: ").append(toIndentedString(string)).append("\n"); sb.append(" _byte: ").append(toIndentedString(_byte)).append("\n"); sb.append(" binary: ").append(toIndentedString(binary)).append("\n"); @@ -516,7 +579,8 @@ 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(" patternWithDigits: ").append(toIndentedString(patternWithDigits)).append("\n"); + sb.append(" patternWithDigitsAndDelimiter: ").append(toIndentedString(patternWithDigitsAndDelimiter)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/HealthCheckResult.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/HealthCheckResult.java new file mode 100644 index 0000000000..db52cbac66 --- /dev/null +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/HealthCheckResult.java @@ -0,0 +1,127 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. + */ +@JsonPropertyOrder({ + HealthCheckResult.JSON_PROPERTY_NULLABLE_MESSAGE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class HealthCheckResult { + public static final String JSON_PROPERTY_NULLABLE_MESSAGE = "NullableMessage"; + private JsonNullable nullableMessage = JsonNullable.undefined(); + + public HealthCheckResult() { + } + + public HealthCheckResult nullableMessage(String nullableMessage) { + this.nullableMessage = JsonNullable.of(nullableMessage); + + return this; + } + + /** + * Get nullableMessage + * @return nullableMessage + **/ + @javax.annotation.Nullable + @JsonIgnore + + public String getNullableMessage() { + return nullableMessage.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NULLABLE_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNullableMessage_JsonNullable() { + return nullableMessage; + } + + @JsonProperty(JSON_PROPERTY_NULLABLE_MESSAGE) + public void setNullableMessage_JsonNullable(JsonNullable nullableMessage) { + this.nullableMessage = nullableMessage; + } + + public void setNullableMessage(String nullableMessage) { + this.nullableMessage = JsonNullable.of(nullableMessage); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + HealthCheckResult healthCheckResult = (HealthCheckResult) o; + return equalsNullable(this.nullableMessage, healthCheckResult.nullableMessage); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(nullableMessage)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class HealthCheckResult {\n"); + sb.append(" nullableMessage: ").append(toIndentedString(nullableMessage)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/NullableClass.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/NullableClass.java new file mode 100644 index 0000000000..34722a9209 --- /dev/null +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/NullableClass.java @@ -0,0 +1,625 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * NullableClass + */ +@JsonPropertyOrder({ + NullableClass.JSON_PROPERTY_INTEGER_PROP, + NullableClass.JSON_PROPERTY_NUMBER_PROP, + NullableClass.JSON_PROPERTY_BOOLEAN_PROP, + NullableClass.JSON_PROPERTY_STRING_PROP, + NullableClass.JSON_PROPERTY_DATE_PROP, + NullableClass.JSON_PROPERTY_DATETIME_PROP, + NullableClass.JSON_PROPERTY_ARRAY_NULLABLE_PROP, + NullableClass.JSON_PROPERTY_ARRAY_AND_ITEMS_NULLABLE_PROP, + NullableClass.JSON_PROPERTY_ARRAY_ITEMS_NULLABLE, + NullableClass.JSON_PROPERTY_OBJECT_NULLABLE_PROP, + NullableClass.JSON_PROPERTY_OBJECT_AND_ITEMS_NULLABLE_PROP, + NullableClass.JSON_PROPERTY_OBJECT_ITEMS_NULLABLE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class NullableClass extends HashMap { + public static final String JSON_PROPERTY_INTEGER_PROP = "integer_prop"; + private JsonNullable integerProp = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_NUMBER_PROP = "number_prop"; + private JsonNullable numberProp = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_BOOLEAN_PROP = "boolean_prop"; + private JsonNullable booleanProp = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_STRING_PROP = "string_prop"; + private JsonNullable stringProp = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DATE_PROP = "date_prop"; + private JsonNullable dateProp = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DATETIME_PROP = "datetime_prop"; + private JsonNullable datetimeProp = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ARRAY_NULLABLE_PROP = "array_nullable_prop"; + private JsonNullable> arrayNullableProp = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_ARRAY_AND_ITEMS_NULLABLE_PROP = "array_and_items_nullable_prop"; + private JsonNullable> arrayAndItemsNullableProp = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_ARRAY_ITEMS_NULLABLE = "array_items_nullable"; + private List arrayItemsNullable = null; + + public static final String JSON_PROPERTY_OBJECT_NULLABLE_PROP = "object_nullable_prop"; + private JsonNullable> objectNullableProp = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_OBJECT_AND_ITEMS_NULLABLE_PROP = "object_and_items_nullable_prop"; + private JsonNullable> objectAndItemsNullableProp = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_OBJECT_ITEMS_NULLABLE = "object_items_nullable"; + private Map objectItemsNullable = null; + + public NullableClass() { + + } + + public NullableClass integerProp(Integer integerProp) { + this.integerProp = JsonNullable.of(integerProp); + + return this; + } + + /** + * Get integerProp + * @return integerProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public Integer getIntegerProp() { + return integerProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_INTEGER_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getIntegerProp_JsonNullable() { + return integerProp; + } + + @JsonProperty(JSON_PROPERTY_INTEGER_PROP) + public void setIntegerProp_JsonNullable(JsonNullable integerProp) { + this.integerProp = integerProp; + } + + public void setIntegerProp(Integer integerProp) { + this.integerProp = JsonNullable.of(integerProp); + } + + + public NullableClass numberProp(BigDecimal numberProp) { + this.numberProp = JsonNullable.of(numberProp); + + return this; + } + + /** + * Get numberProp + * @return numberProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public BigDecimal getNumberProp() { + return numberProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NUMBER_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNumberProp_JsonNullable() { + return numberProp; + } + + @JsonProperty(JSON_PROPERTY_NUMBER_PROP) + public void setNumberProp_JsonNullable(JsonNullable numberProp) { + this.numberProp = numberProp; + } + + public void setNumberProp(BigDecimal numberProp) { + this.numberProp = JsonNullable.of(numberProp); + } + + + public NullableClass booleanProp(Boolean booleanProp) { + this.booleanProp = JsonNullable.of(booleanProp); + + return this; + } + + /** + * Get booleanProp + * @return booleanProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public Boolean getBooleanProp() { + return booleanProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_BOOLEAN_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getBooleanProp_JsonNullable() { + return booleanProp; + } + + @JsonProperty(JSON_PROPERTY_BOOLEAN_PROP) + public void setBooleanProp_JsonNullable(JsonNullable booleanProp) { + this.booleanProp = booleanProp; + } + + public void setBooleanProp(Boolean booleanProp) { + this.booleanProp = JsonNullable.of(booleanProp); + } + + + public NullableClass stringProp(String stringProp) { + this.stringProp = JsonNullable.of(stringProp); + + return this; + } + + /** + * Get stringProp + * @return stringProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public String getStringProp() { + return stringProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_STRING_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getStringProp_JsonNullable() { + return stringProp; + } + + @JsonProperty(JSON_PROPERTY_STRING_PROP) + public void setStringProp_JsonNullable(JsonNullable stringProp) { + this.stringProp = stringProp; + } + + public void setStringProp(String stringProp) { + this.stringProp = JsonNullable.of(stringProp); + } + + + public NullableClass dateProp(LocalDate dateProp) { + this.dateProp = JsonNullable.of(dateProp); + + return this; + } + + /** + * Get dateProp + * @return dateProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public LocalDate getDateProp() { + return dateProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DATE_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDateProp_JsonNullable() { + return dateProp; + } + + @JsonProperty(JSON_PROPERTY_DATE_PROP) + public void setDateProp_JsonNullable(JsonNullable dateProp) { + this.dateProp = dateProp; + } + + public void setDateProp(LocalDate dateProp) { + this.dateProp = JsonNullable.of(dateProp); + } + + + public NullableClass datetimeProp(OffsetDateTime datetimeProp) { + this.datetimeProp = JsonNullable.of(datetimeProp); + + return this; + } + + /** + * Get datetimeProp + * @return datetimeProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public OffsetDateTime getDatetimeProp() { + return datetimeProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DATETIME_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDatetimeProp_JsonNullable() { + return datetimeProp; + } + + @JsonProperty(JSON_PROPERTY_DATETIME_PROP) + public void setDatetimeProp_JsonNullable(JsonNullable datetimeProp) { + this.datetimeProp = datetimeProp; + } + + public void setDatetimeProp(OffsetDateTime datetimeProp) { + this.datetimeProp = JsonNullable.of(datetimeProp); + } + + + public NullableClass arrayNullableProp(List arrayNullableProp) { + this.arrayNullableProp = JsonNullable.>of(arrayNullableProp); + + return this; + } + + public NullableClass addArrayNullablePropItem(Object arrayNullablePropItem) { + if (this.arrayNullableProp == null || !this.arrayNullableProp.isPresent()) { + this.arrayNullableProp = JsonNullable.>of(new ArrayList<>()); + } + try { + this.arrayNullableProp.get().add(arrayNullablePropItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get arrayNullableProp + * @return arrayNullableProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public List getArrayNullableProp() { + return arrayNullableProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ARRAY_NULLABLE_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getArrayNullableProp_JsonNullable() { + return arrayNullableProp; + } + + @JsonProperty(JSON_PROPERTY_ARRAY_NULLABLE_PROP) + public void setArrayNullableProp_JsonNullable(JsonNullable> arrayNullableProp) { + this.arrayNullableProp = arrayNullableProp; + } + + public void setArrayNullableProp(List arrayNullableProp) { + this.arrayNullableProp = JsonNullable.>of(arrayNullableProp); + } + + + public NullableClass arrayAndItemsNullableProp(List arrayAndItemsNullableProp) { + this.arrayAndItemsNullableProp = JsonNullable.>of(arrayAndItemsNullableProp); + + return this; + } + + public NullableClass addArrayAndItemsNullablePropItem(Object arrayAndItemsNullablePropItem) { + if (this.arrayAndItemsNullableProp == null || !this.arrayAndItemsNullableProp.isPresent()) { + this.arrayAndItemsNullableProp = JsonNullable.>of(new ArrayList<>()); + } + try { + this.arrayAndItemsNullableProp.get().add(arrayAndItemsNullablePropItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get arrayAndItemsNullableProp + * @return arrayAndItemsNullableProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public List getArrayAndItemsNullableProp() { + return arrayAndItemsNullableProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ARRAY_AND_ITEMS_NULLABLE_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getArrayAndItemsNullableProp_JsonNullable() { + return arrayAndItemsNullableProp; + } + + @JsonProperty(JSON_PROPERTY_ARRAY_AND_ITEMS_NULLABLE_PROP) + public void setArrayAndItemsNullableProp_JsonNullable(JsonNullable> arrayAndItemsNullableProp) { + this.arrayAndItemsNullableProp = arrayAndItemsNullableProp; + } + + public void setArrayAndItemsNullableProp(List arrayAndItemsNullableProp) { + this.arrayAndItemsNullableProp = JsonNullable.>of(arrayAndItemsNullableProp); + } + + + public NullableClass arrayItemsNullable(List arrayItemsNullable) { + + this.arrayItemsNullable = arrayItemsNullable; + return this; + } + + public NullableClass addArrayItemsNullableItem(Object arrayItemsNullableItem) { + if (this.arrayItemsNullable == null) { + this.arrayItemsNullable = new ArrayList<>(); + } + this.arrayItemsNullable.add(arrayItemsNullableItem); + return this; + } + + /** + * Get arrayItemsNullable + * @return arrayItemsNullable + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ARRAY_ITEMS_NULLABLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getArrayItemsNullable() { + return arrayItemsNullable; + } + + + @JsonProperty(JSON_PROPERTY_ARRAY_ITEMS_NULLABLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setArrayItemsNullable(List arrayItemsNullable) { + this.arrayItemsNullable = arrayItemsNullable; + } + + + public NullableClass objectNullableProp(Map objectNullableProp) { + this.objectNullableProp = JsonNullable.>of(objectNullableProp); + + return this; + } + + public NullableClass putObjectNullablePropItem(String key, Object objectNullablePropItem) { + if (this.objectNullableProp == null || !this.objectNullableProp.isPresent()) { + this.objectNullableProp = JsonNullable.>of(new HashMap<>()); + } + try { + this.objectNullableProp.get().put(key, objectNullablePropItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get objectNullableProp + * @return objectNullableProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public Map getObjectNullableProp() { + return objectNullableProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_OBJECT_NULLABLE_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getObjectNullableProp_JsonNullable() { + return objectNullableProp; + } + + @JsonProperty(JSON_PROPERTY_OBJECT_NULLABLE_PROP) + public void setObjectNullableProp_JsonNullable(JsonNullable> objectNullableProp) { + this.objectNullableProp = objectNullableProp; + } + + public void setObjectNullableProp(Map objectNullableProp) { + this.objectNullableProp = JsonNullable.>of(objectNullableProp); + } + + + public NullableClass objectAndItemsNullableProp(Map objectAndItemsNullableProp) { + this.objectAndItemsNullableProp = JsonNullable.>of(objectAndItemsNullableProp); + + return this; + } + + public NullableClass putObjectAndItemsNullablePropItem(String key, Object objectAndItemsNullablePropItem) { + if (this.objectAndItemsNullableProp == null || !this.objectAndItemsNullableProp.isPresent()) { + this.objectAndItemsNullableProp = JsonNullable.>of(new HashMap<>()); + } + try { + this.objectAndItemsNullableProp.get().put(key, objectAndItemsNullablePropItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get objectAndItemsNullableProp + * @return objectAndItemsNullableProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public Map getObjectAndItemsNullableProp() { + return objectAndItemsNullableProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_OBJECT_AND_ITEMS_NULLABLE_PROP) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getObjectAndItemsNullableProp_JsonNullable() { + return objectAndItemsNullableProp; + } + + @JsonProperty(JSON_PROPERTY_OBJECT_AND_ITEMS_NULLABLE_PROP) + public void setObjectAndItemsNullableProp_JsonNullable(JsonNullable> objectAndItemsNullableProp) { + this.objectAndItemsNullableProp = objectAndItemsNullableProp; + } + + public void setObjectAndItemsNullableProp(Map objectAndItemsNullableProp) { + this.objectAndItemsNullableProp = JsonNullable.>of(objectAndItemsNullableProp); + } + + + public NullableClass objectItemsNullable(Map objectItemsNullable) { + + this.objectItemsNullable = objectItemsNullable; + return this; + } + + public NullableClass putObjectItemsNullableItem(String key, Object objectItemsNullableItem) { + if (this.objectItemsNullable == null) { + this.objectItemsNullable = new HashMap<>(); + } + this.objectItemsNullable.put(key, objectItemsNullableItem); + return this; + } + + /** + * Get objectItemsNullable + * @return objectItemsNullable + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OBJECT_ITEMS_NULLABLE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + + public Map getObjectItemsNullable() { + return objectItemsNullable; + } + + + @JsonProperty(JSON_PROPERTY_OBJECT_ITEMS_NULLABLE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setObjectItemsNullable(Map objectItemsNullable) { + this.objectItemsNullable = objectItemsNullable; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NullableClass nullableClass = (NullableClass) o; + return equalsNullable(this.integerProp, nullableClass.integerProp) && + equalsNullable(this.numberProp, nullableClass.numberProp) && + equalsNullable(this.booleanProp, nullableClass.booleanProp) && + equalsNullable(this.stringProp, nullableClass.stringProp) && + equalsNullable(this.dateProp, nullableClass.dateProp) && + equalsNullable(this.datetimeProp, nullableClass.datetimeProp) && + equalsNullable(this.arrayNullableProp, nullableClass.arrayNullableProp) && + equalsNullable(this.arrayAndItemsNullableProp, nullableClass.arrayAndItemsNullableProp) && + Objects.equals(this.arrayItemsNullable, nullableClass.arrayItemsNullable) && + equalsNullable(this.objectNullableProp, nullableClass.objectNullableProp) && + equalsNullable(this.objectAndItemsNullableProp, nullableClass.objectAndItemsNullableProp) && + Objects.equals(this.objectItemsNullable, nullableClass.objectItemsNullable) && + super.equals(o); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(integerProp), hashCodeNullable(numberProp), hashCodeNullable(booleanProp), hashCodeNullable(stringProp), hashCodeNullable(dateProp), hashCodeNullable(datetimeProp), hashCodeNullable(arrayNullableProp), hashCodeNullable(arrayAndItemsNullableProp), arrayItemsNullable, hashCodeNullable(objectNullableProp), hashCodeNullable(objectAndItemsNullableProp), objectItemsNullable, super.hashCode()); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NullableClass {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" integerProp: ").append(toIndentedString(integerProp)).append("\n"); + sb.append(" numberProp: ").append(toIndentedString(numberProp)).append("\n"); + sb.append(" booleanProp: ").append(toIndentedString(booleanProp)).append("\n"); + sb.append(" stringProp: ").append(toIndentedString(stringProp)).append("\n"); + sb.append(" dateProp: ").append(toIndentedString(dateProp)).append("\n"); + sb.append(" datetimeProp: ").append(toIndentedString(datetimeProp)).append("\n"); + sb.append(" arrayNullableProp: ").append(toIndentedString(arrayNullableProp)).append("\n"); + sb.append(" arrayAndItemsNullableProp: ").append(toIndentedString(arrayAndItemsNullableProp)).append("\n"); + sb.append(" arrayItemsNullable: ").append(toIndentedString(arrayItemsNullable)).append("\n"); + sb.append(" objectNullableProp: ").append(toIndentedString(objectNullableProp)).append("\n"); + sb.append(" objectAndItemsNullableProp: ").append(toIndentedString(objectAndItemsNullableProp)).append("\n"); + sb.append(" objectItemsNullable: ").append(toIndentedString(objectItemsNullable)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java new file mode 100644 index 0000000000..7f3f584ade --- /dev/null +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java @@ -0,0 +1,218 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.client.model.DeprecatedObject; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * ObjectWithDeprecatedFields + */ +@JsonPropertyOrder({ + ObjectWithDeprecatedFields.JSON_PROPERTY_UUID, + ObjectWithDeprecatedFields.JSON_PROPERTY_ID, + ObjectWithDeprecatedFields.JSON_PROPERTY_DEPRECATED_REF, + ObjectWithDeprecatedFields.JSON_PROPERTY_BARS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ObjectWithDeprecatedFields { + public static final String JSON_PROPERTY_UUID = "uuid"; + private String uuid; + + public static final String JSON_PROPERTY_ID = "id"; + private BigDecimal id; + + public static final String JSON_PROPERTY_DEPRECATED_REF = "deprecatedRef"; + private DeprecatedObject deprecatedRef; + + public static final String JSON_PROPERTY_BARS = "bars"; + private List bars = null; + + public ObjectWithDeprecatedFields() { + } + + public ObjectWithDeprecatedFields uuid(String uuid) { + + this.uuid = uuid; + return this; + } + + /** + * Get uuid + * @return uuid + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UUID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getUuid() { + return uuid; + } + + + @JsonProperty(JSON_PROPERTY_UUID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUuid(String uuid) { + this.uuid = uuid; + } + + + public ObjectWithDeprecatedFields id(BigDecimal id) { + + this.id = id; + return this; + } + + /** + * Get id + * @return id + * @deprecated + **/ + @Deprecated + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BigDecimal getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(BigDecimal id) { + this.id = id; + } + + + public ObjectWithDeprecatedFields deprecatedRef(DeprecatedObject deprecatedRef) { + + this.deprecatedRef = deprecatedRef; + return this; + } + + /** + * Get deprecatedRef + * @return deprecatedRef + * @deprecated + **/ + @Deprecated + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DEPRECATED_REF) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public DeprecatedObject getDeprecatedRef() { + return deprecatedRef; + } + + + @JsonProperty(JSON_PROPERTY_DEPRECATED_REF) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDeprecatedRef(DeprecatedObject deprecatedRef) { + this.deprecatedRef = deprecatedRef; + } + + + public ObjectWithDeprecatedFields bars(List bars) { + + this.bars = bars; + return this; + } + + public ObjectWithDeprecatedFields addBarsItem(String barsItem) { + if (this.bars == null) { + this.bars = new ArrayList<>(); + } + this.bars.add(barsItem); + return this; + } + + /** + * Get bars + * @return bars + * @deprecated + **/ + @Deprecated + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BARS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getBars() { + return bars; + } + + + @JsonProperty(JSON_PROPERTY_BARS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBars(List bars) { + this.bars = bars; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ObjectWithDeprecatedFields objectWithDeprecatedFields = (ObjectWithDeprecatedFields) o; + return Objects.equals(this.uuid, objectWithDeprecatedFields.uuid) && + Objects.equals(this.id, objectWithDeprecatedFields.id) && + Objects.equals(this.deprecatedRef, objectWithDeprecatedFields.deprecatedRef) && + Objects.equals(this.bars, objectWithDeprecatedFields.bars); + } + + @Override + public int hashCode() { + return Objects.hash(uuid, id, deprecatedRef, bars); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ObjectWithDeprecatedFields {\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" deprecatedRef: ").append(toIndentedString(deprecatedRef)).append("\n"); + sb.append(" bars: ").append(toIndentedString(bars)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/OuterEnum.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/OuterEnum.java index d2924eb9c2..4cd955b63d 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/OuterEnum.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/OuterEnum.java @@ -55,7 +55,7 @@ public enum OuterEnum { return b; } } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); + return null; } } diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java new file mode 100644 index 0000000000..73077cc8c3 --- /dev/null +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java @@ -0,0 +1,61 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets OuterEnumDefaultValue + */ +public enum OuterEnumDefaultValue { + + PLACED("placed"), + + APPROVED("approved"), + + DELIVERED("delivered"); + + private String value; + + OuterEnumDefaultValue(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OuterEnumDefaultValue fromValue(String value) { + for (OuterEnumDefaultValue b : OuterEnumDefaultValue.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/OuterEnumInteger.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/OuterEnumInteger.java new file mode 100644 index 0000000000..e6c2e38c2e --- /dev/null +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/OuterEnumInteger.java @@ -0,0 +1,61 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets OuterEnumInteger + */ +public enum OuterEnumInteger { + + NUMBER_0(0), + + NUMBER_1(1), + + NUMBER_2(2); + + private Integer value; + + OuterEnumInteger(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OuterEnumInteger fromValue(Integer value) { + for (OuterEnumInteger b : OuterEnumInteger.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java new file mode 100644 index 0000000000..ef61373b18 --- /dev/null +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java @@ -0,0 +1,61 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets OuterEnumIntegerDefaultValue + */ +public enum OuterEnumIntegerDefaultValue { + + NUMBER_0(0), + + NUMBER_1(1), + + NUMBER_2(2); + + private Integer value; + + OuterEnumIntegerDefaultValue(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OuterEnumIntegerDefaultValue fromValue(Integer value) { + for (OuterEnumIntegerDefaultValue b : OuterEnumIntegerDefaultValue.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java new file mode 100644 index 0000000000..d45896c683 --- /dev/null +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java @@ -0,0 +1,105 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.client.model.OuterEnumInteger; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * OuterObjectWithEnumProperty + */ +@JsonPropertyOrder({ + OuterObjectWithEnumProperty.JSON_PROPERTY_VALUE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class OuterObjectWithEnumProperty { + public static final String JSON_PROPERTY_VALUE = "value"; + private OuterEnumInteger value; + + public OuterObjectWithEnumProperty() { + } + + public OuterObjectWithEnumProperty value(OuterEnumInteger value) { + + this.value = value; + return this; + } + + /** + * Get value + * @return value + **/ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OuterEnumInteger getValue() { + return value; + } + + + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setValue(OuterEnumInteger value) { + this.value = value; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OuterObjectWithEnumProperty outerObjectWithEnumProperty = (OuterObjectWithEnumProperty) o; + return Objects.equals(this.value, outerObjectWithEnumProperty.value); + } + + @Override + public int hashCode() { + return Objects.hash(value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OuterObjectWithEnumProperty {\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/SingleRefType.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/SingleRefType.java new file mode 100644 index 0000000000..f992245475 --- /dev/null +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/SingleRefType.java @@ -0,0 +1,59 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets SingleRefType + */ +public enum SingleRefType { + + ADMIN("admin"), + + USER("user"); + + private String value; + + SingleRefType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SingleRefType fromValue(String value) { + for (SingleRefType b : SingleRefType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/SpecialModelName.java index 0de3b216df..e4ab9de6df 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -29,7 +29,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName; @JsonPropertyOrder({ SpecialModelName.JSON_PROPERTY_$_SPECIAL_PROPERTY_NAME }) -@JsonTypeName("$special[model.name]") +@JsonTypeName("_special_model.name_") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class SpecialModelName { public static final String JSON_PROPERTY_$_SPECIAL_PROPERTY_NAME = "$special[property.name]"; @@ -72,8 +72,8 @@ public class SpecialModelName { if (o == null || getClass() != o.getClass()) { return false; } - SpecialModelName $specialModelName = (SpecialModelName) o; - return Objects.equals(this.$specialPropertyName, $specialModelName.$specialPropertyName); + SpecialModelName specialModelName = (SpecialModelName) o; + return Objects.equals(this.$specialPropertyName, specialModelName.$specialPropertyName); } @Override diff --git a/samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/api/DefaultApiTest.java b/samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/api/DefaultApiTest.java new file mode 100644 index 0000000000..32943c2bb9 --- /dev/null +++ b/samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/api/DefaultApiTest.java @@ -0,0 +1,47 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.api; + +import org.openapitools.client.ApiException; +import org.openapitools.client.model.FooGetDefaultResponse; +import org.junit.Test; +import org.junit.Ignore; +import org.junit.Assert; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for DefaultApi + */ +@Ignore +public class DefaultApiTest { + + private final DefaultApi api = new DefaultApi(); + + /** + * @throws ApiException + * if the Api call fails + */ + @Test + public void fooGetTest() throws ApiException { + FooGetDefaultResponse response = api.fooGet(); + + // TODO: test validations + } +} diff --git a/samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/api/FakeApiTest.java b/samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/api/FakeApiTest.java index 2ee81439d0..5bdb09bab4 100644 --- a/samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/api/FakeApiTest.java +++ b/samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/api/FakeApiTest.java @@ -16,17 +16,22 @@ package org.openapitools.client.api; import org.openapitools.client.ApiException; import java.math.BigDecimal; import org.openapitools.client.model.Client; +import org.openapitools.client.model.EnumClass; import java.io.File; import org.openapitools.client.model.FileSchemaTestClass; +import org.openapitools.client.model.HealthCheckResult; import java.time.LocalDate; import java.time.OffsetDateTime; import org.openapitools.client.model.OuterComposite; +import org.openapitools.client.model.OuterObjectWithEnumProperty; +import org.openapitools.client.model.Pet; import org.openapitools.client.model.User; -import org.openapitools.client.model.XmlItem; import org.junit.Test; import org.junit.Ignore; import org.junit.Assert; +import java.time.LocalDate; +import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -41,17 +46,29 @@ public class FakeApiTest { private final FakeApi api = new FakeApi(); /** - * creates an XmlItem - * - * this route creates an XmlItem + * Health check endpoint * * @throws ApiException * if the Api call fails */ @Test - public void createXmlItemTest() throws ApiException { - XmlItem xmlItem = null; - api.createXmlItem(xmlItem); + public void fakeHealthGetTest() throws ApiException { + HealthCheckResult response = api.fakeHealthGet(); + + // TODO: test validations + } + /** + * test http signature authentication + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void fakeHttpSignatureTestTest() throws ApiException { + Pet pet = null; + String query1 = null; + String header1 = null; + api.fakeHttpSignatureTest(pet, query1, header1); // TODO: test validations } @@ -76,8 +93,8 @@ public class FakeApiTest { */ @Test public void fakeOuterCompositeSerializeTest() throws ApiException { - OuterComposite body = null; - OuterComposite response = api.fakeOuterCompositeSerialize(body); + OuterComposite outerComposite = null; + OuterComposite response = api.fakeOuterCompositeSerialize(outerComposite); // TODO: test validations } @@ -108,15 +125,41 @@ public class FakeApiTest { // TODO: test validations } /** - * For this test, the body for this request much reference a schema named `File`. + * Test serialization of enum (int) properties with examples + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void fakePropertyEnumIntegerSerializeTest() throws ApiException { + OuterObjectWithEnumProperty outerObjectWithEnumProperty = null; + OuterObjectWithEnumProperty response = api.fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty); + + // TODO: test validations + } + /** + * For this test, the body has to be a binary file. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testBodyWithBinaryTest() throws ApiException { + File body = null; + api.testBodyWithBinary(body); + + // TODO: test validations + } + /** + * For this test, the body for this request must reference a schema named `File`. * * @throws ApiException * if the Api call fails */ @Test public void testBodyWithFileSchemaTest() throws ApiException { - FileSchemaTestClass body = null; - api.testBodyWithFileSchema(body); + FileSchemaTestClass fileSchemaTestClass = null; + api.testBodyWithFileSchema(fileSchemaTestClass); // TODO: test validations } @@ -127,8 +170,8 @@ public class FakeApiTest { @Test public void testBodyWithQueryParamsTest() throws ApiException { String query = null; - User body = null; - api.testBodyWithQueryParams(query, body); + User user = null; + api.testBodyWithQueryParams(query, user); // TODO: test validations } @@ -142,15 +185,15 @@ public class FakeApiTest { */ @Test public void testClientModelTest() throws ApiException { - Client body = null; - Client response = api.testClientModel(body); + Client client = null; + Client response = api.testClientModel(client); // TODO: test validations } /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * * @throws ApiException * if the Api call fails @@ -191,9 +234,10 @@ public class FakeApiTest { String enumQueryString = null; Integer enumQueryInteger = null; Double enumQueryDouble = null; + List enumQueryModelArray = null; List enumFormStringArray = null; String enumFormString = null; - api.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + api.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString); // TODO: test validations } @@ -220,19 +264,23 @@ public class FakeApiTest { /** * test inline additionalProperties * + * + * * @throws ApiException * if the Api call fails */ @Test public void testInlineAdditionalPropertiesTest() throws ApiException { - Map param = null; - api.testInlineAdditionalProperties(param); + Map requestBody = null; + api.testInlineAdditionalProperties(requestBody); // TODO: test validations } /** * test json serialization of form data * + * + * * @throws ApiException * if the Api call fails */ @@ -257,7 +305,9 @@ public class FakeApiTest { List http = null; List url = null; List context = null; - api.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context); + String allowEmpty = null; + Map language = null; + api.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language); // TODO: test validations } diff --git a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java b/samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/AllOfWithSingleRefTest.java similarity index 60% rename from samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java rename to samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/AllOfWithSingleRefTest.java index 58b7521c6a..1acef2d396 100644 --- a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java +++ b/samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/AllOfWithSingleRefTest.java @@ -18,33 +18,40 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import java.util.HashMap; -import java.util.Map; +import org.openapitools.client.model.SingleRefType; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; /** - * Model tests for AdditionalPropertiesInteger + * Model tests for AllOfWithSingleRef */ -public class AdditionalPropertiesIntegerTest { - private final AdditionalPropertiesInteger model = new AdditionalPropertiesInteger(); +public class AllOfWithSingleRefTest { + private final AllOfWithSingleRef model = new AllOfWithSingleRef(); /** - * Model tests for AdditionalPropertiesInteger + * Model tests for AllOfWithSingleRef */ @Test - public void testAdditionalPropertiesInteger() { - // TODO: test AdditionalPropertiesInteger + public void testAllOfWithSingleRef() { + // TODO: test AllOfWithSingleRef } /** - * Test the property 'name' + * Test the property 'username' */ @Test - public void nameTest() { - // TODO: test name + public void usernameTest() { + // TODO: test username + } + + /** + * Test the property 'singleRefType' + */ + @Test + public void singleRefTypeTest() { + // TODO: test singleRefType } } diff --git a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java b/samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/DeprecatedObjectTest.java similarity index 71% rename from samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java rename to samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/DeprecatedObjectTest.java index f7662d6c46..a61e43f63a 100644 --- a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java +++ b/samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/DeprecatedObjectTest.java @@ -18,25 +18,23 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import java.util.HashMap; -import java.util.Map; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; /** - * Model tests for AdditionalPropertiesString + * Model tests for DeprecatedObject */ -public class AdditionalPropertiesStringTest { - private final AdditionalPropertiesString model = new AdditionalPropertiesString(); +public class DeprecatedObjectTest { + private final DeprecatedObject model = new DeprecatedObject(); /** - * Model tests for AdditionalPropertiesString + * Model tests for DeprecatedObject */ @Test - public void testAdditionalPropertiesString() { - // TODO: test AdditionalPropertiesString + public void testDeprecatedObject() { + // TODO: test DeprecatedObject } /** diff --git a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java b/samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/FooGetDefaultResponseTest.java similarity index 65% rename from samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java rename to samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/FooGetDefaultResponseTest.java index bcbb9c54b2..5830df74c8 100644 --- a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java +++ b/samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/FooGetDefaultResponseTest.java @@ -18,33 +18,32 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import java.util.HashMap; -import java.util.Map; +import org.openapitools.client.model.Foo; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; /** - * Model tests for AdditionalPropertiesObject + * Model tests for FooGetDefaultResponse */ -public class AdditionalPropertiesObjectTest { - private final AdditionalPropertiesObject model = new AdditionalPropertiesObject(); +public class FooGetDefaultResponseTest { + private final FooGetDefaultResponse model = new FooGetDefaultResponse(); /** - * Model tests for AdditionalPropertiesObject + * Model tests for FooGetDefaultResponse */ @Test - public void testAdditionalPropertiesObject() { - // TODO: test AdditionalPropertiesObject + public void testFooGetDefaultResponse() { + // TODO: test FooGetDefaultResponse } /** - * Test the property 'name' + * Test the property 'string' */ @Test - public void nameTest() { - // TODO: test name + public void stringTest() { + // TODO: test string } } diff --git a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java b/samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/FooTest.java similarity index 73% rename from samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java rename to samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/FooTest.java index 8e291df45f..195e487a79 100644 --- a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java +++ b/samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/FooTest.java @@ -24,25 +24,25 @@ import org.junit.Test; /** - * Model tests for BigCatAllOf + * Model tests for Foo */ -public class BigCatAllOfTest { - private final BigCatAllOf model = new BigCatAllOf(); +public class FooTest { + private final Foo model = new Foo(); /** - * Model tests for BigCatAllOf + * Model tests for Foo */ @Test - public void testBigCatAllOf() { - // TODO: test BigCatAllOf + public void testFoo() { + // TODO: test Foo } /** - * Test the property 'kind' + * Test the property 'bar' */ @Test - public void kindTest() { - // TODO: test kind + public void barTest() { + // TODO: test bar } } diff --git a/samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/HealthCheckResultTest.java b/samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/HealthCheckResultTest.java new file mode 100644 index 0000000000..15cc82702c --- /dev/null +++ b/samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/HealthCheckResultTest.java @@ -0,0 +1,52 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for HealthCheckResult + */ +public class HealthCheckResultTest { + private final HealthCheckResult model = new HealthCheckResult(); + + /** + * Model tests for HealthCheckResult + */ + @Test + public void testHealthCheckResult() { + // TODO: test HealthCheckResult + } + + /** + * Test the property 'nullableMessage' + */ + @Test + public void nullableMessageTest() { + // TODO: test nullableMessage + } + +} diff --git a/samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/NullableClassTest.java b/samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/NullableClassTest.java new file mode 100644 index 0000000000..cb3a631c91 --- /dev/null +++ b/samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/NullableClassTest.java @@ -0,0 +1,147 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for NullableClass + */ +public class NullableClassTest { + private final NullableClass model = new NullableClass(); + + /** + * Model tests for NullableClass + */ + @Test + public void testNullableClass() { + // TODO: test NullableClass + } + + /** + * Test the property 'integerProp' + */ + @Test + public void integerPropTest() { + // TODO: test integerProp + } + + /** + * Test the property 'numberProp' + */ + @Test + public void numberPropTest() { + // TODO: test numberProp + } + + /** + * Test the property 'booleanProp' + */ + @Test + public void booleanPropTest() { + // TODO: test booleanProp + } + + /** + * Test the property 'stringProp' + */ + @Test + public void stringPropTest() { + // TODO: test stringProp + } + + /** + * Test the property 'dateProp' + */ + @Test + public void datePropTest() { + // TODO: test dateProp + } + + /** + * Test the property 'datetimeProp' + */ + @Test + public void datetimePropTest() { + // TODO: test datetimeProp + } + + /** + * Test the property 'arrayNullableProp' + */ + @Test + public void arrayNullablePropTest() { + // TODO: test arrayNullableProp + } + + /** + * Test the property 'arrayAndItemsNullableProp' + */ + @Test + public void arrayAndItemsNullablePropTest() { + // TODO: test arrayAndItemsNullableProp + } + + /** + * Test the property 'arrayItemsNullable' + */ + @Test + public void arrayItemsNullableTest() { + // TODO: test arrayItemsNullable + } + + /** + * Test the property 'objectNullableProp' + */ + @Test + public void objectNullablePropTest() { + // TODO: test objectNullableProp + } + + /** + * Test the property 'objectAndItemsNullableProp' + */ + @Test + public void objectAndItemsNullablePropTest() { + // TODO: test objectAndItemsNullableProp + } + + /** + * Test the property 'objectItemsNullable' + */ + @Test + public void objectItemsNullableTest() { + // TODO: test objectItemsNullable + } + +} diff --git a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java b/samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/ObjectWithDeprecatedFieldsTest.java similarity index 55% rename from samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java rename to samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/ObjectWithDeprecatedFieldsTest.java index 8c096c188f..c59d5beba3 100644 --- a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java +++ b/samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/ObjectWithDeprecatedFieldsTest.java @@ -21,63 +21,56 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; +import org.openapitools.client.model.DeprecatedObject; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; /** - * Model tests for TypeHolderDefault + * Model tests for ObjectWithDeprecatedFields */ -public class TypeHolderDefaultTest { - private final TypeHolderDefault model = new TypeHolderDefault(); +public class ObjectWithDeprecatedFieldsTest { + private final ObjectWithDeprecatedFields model = new ObjectWithDeprecatedFields(); /** - * Model tests for TypeHolderDefault + * Model tests for ObjectWithDeprecatedFields */ @Test - public void testTypeHolderDefault() { - // TODO: test TypeHolderDefault + public void testObjectWithDeprecatedFields() { + // TODO: test ObjectWithDeprecatedFields } /** - * Test the property 'stringItem' + * Test the property 'uuid' */ @Test - public void stringItemTest() { - // TODO: test stringItem + public void uuidTest() { + // TODO: test uuid } /** - * Test the property 'numberItem' + * Test the property 'id' */ @Test - public void numberItemTest() { - // TODO: test numberItem + public void idTest() { + // TODO: test id } /** - * Test the property 'integerItem' + * Test the property 'deprecatedRef' */ @Test - public void integerItemTest() { - // TODO: test integerItem + public void deprecatedRefTest() { + // TODO: test deprecatedRef } /** - * Test the property 'boolItem' + * Test the property 'bars' */ @Test - public void boolItemTest() { - // TODO: test boolItem - } - - /** - * Test the property 'arrayItem' - */ - @Test - public void arrayItemTest() { - // TODO: test arrayItem + public void barsTest() { + // TODO: test bars } } diff --git a/samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/OuterEnumDefaultValueTest.java b/samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/OuterEnumDefaultValueTest.java new file mode 100644 index 0000000000..59c4eebd2f --- /dev/null +++ b/samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/OuterEnumDefaultValueTest.java @@ -0,0 +1,33 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for OuterEnumDefaultValue + */ +public class OuterEnumDefaultValueTest { + /** + * Model tests for OuterEnumDefaultValue + */ + @Test + public void testOuterEnumDefaultValue() { + // TODO: test OuterEnumDefaultValue + } + +} diff --git a/samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/OuterEnumIntegerDefaultValueTest.java b/samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/OuterEnumIntegerDefaultValueTest.java new file mode 100644 index 0000000000..fa981c7093 --- /dev/null +++ b/samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/OuterEnumIntegerDefaultValueTest.java @@ -0,0 +1,33 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for OuterEnumIntegerDefaultValue + */ +public class OuterEnumIntegerDefaultValueTest { + /** + * Model tests for OuterEnumIntegerDefaultValue + */ + @Test + public void testOuterEnumIntegerDefaultValue() { + // TODO: test OuterEnumIntegerDefaultValue + } + +} diff --git a/samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/OuterEnumIntegerTest.java b/samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/OuterEnumIntegerTest.java new file mode 100644 index 0000000000..1b98d326bb --- /dev/null +++ b/samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/OuterEnumIntegerTest.java @@ -0,0 +1,33 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for OuterEnumInteger + */ +public class OuterEnumIntegerTest { + /** + * Model tests for OuterEnumInteger + */ + @Test + public void testOuterEnumInteger() { + // TODO: test OuterEnumInteger + } + +} diff --git a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java b/samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/OuterObjectWithEnumPropertyTest.java similarity index 64% rename from samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java rename to samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/OuterObjectWithEnumPropertyTest.java index 4f6fd800ab..1a436d40cb 100644 --- a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java +++ b/samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/OuterObjectWithEnumPropertyTest.java @@ -18,33 +18,32 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import java.util.HashMap; -import java.util.Map; +import org.openapitools.client.model.OuterEnumInteger; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; /** - * Model tests for AdditionalPropertiesAnyType + * Model tests for OuterObjectWithEnumProperty */ -public class AdditionalPropertiesAnyTypeTest { - private final AdditionalPropertiesAnyType model = new AdditionalPropertiesAnyType(); +public class OuterObjectWithEnumPropertyTest { + private final OuterObjectWithEnumProperty model = new OuterObjectWithEnumProperty(); /** - * Model tests for AdditionalPropertiesAnyType + * Model tests for OuterObjectWithEnumProperty */ @Test - public void testAdditionalPropertiesAnyType() { - // TODO: test AdditionalPropertiesAnyType + public void testOuterObjectWithEnumProperty() { + // TODO: test OuterObjectWithEnumProperty } /** - * Test the property 'name' + * Test the property 'value' */ @Test - public void nameTest() { - // TODO: test name + public void valueTest() { + // TODO: test value } } diff --git a/samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/SingleRefTypeTest.java b/samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/SingleRefTypeTest.java new file mode 100644 index 0000000000..155e2a89b0 --- /dev/null +++ b/samples/client/petstore/java/apache-httpclient/src/test/java/org/openapitools/client/model/SingleRefTypeTest.java @@ -0,0 +1,33 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for SingleRefType + */ +public class SingleRefTypeTest { + /** + * Model tests for SingleRefType + */ + @Test + public void testSingleRefType() { + // TODO: test SingleRefType + } + +} diff --git a/samples/client/petstore/java/native-async/.openapi-generator/FILES b/samples/client/petstore/java/native-async/.openapi-generator/FILES index 9f46a0d990..0a91ba6169 100644 --- a/samples/client/petstore/java/native-async/.openapi-generator/FILES +++ b/samples/client/petstore/java/native-async/.openapi-generator/FILES @@ -5,27 +5,21 @@ README.md api/openapi.yaml build.gradle build.sbt -docs/AdditionalPropertiesAnyType.md -docs/AdditionalPropertiesArray.md -docs/AdditionalPropertiesBoolean.md docs/AdditionalPropertiesClass.md -docs/AdditionalPropertiesInteger.md -docs/AdditionalPropertiesNumber.md -docs/AdditionalPropertiesObject.md -docs/AdditionalPropertiesString.md +docs/AllOfWithSingleRef.md docs/Animal.md docs/AnotherFakeApi.md docs/ArrayOfArrayOfNumberOnly.md docs/ArrayOfNumberOnly.md docs/ArrayTest.md -docs/BigCat.md -docs/BigCatAllOf.md docs/Capitalization.md docs/Cat.md docs/CatAllOf.md docs/Category.md docs/ClassModel.md docs/Client.md +docs/DefaultApi.md +docs/DeprecatedObject.md docs/Dog.md docs/DogAllOf.md docs/EnumArrays.md @@ -34,8 +28,11 @@ docs/EnumTest.md docs/FakeApi.md docs/FakeClassnameTags123Api.md docs/FileSchemaTestClass.md +docs/Foo.md +docs/FooGetDefaultResponse.md docs/FormatTest.md docs/HasOnlyReadOnly.md +docs/HealthCheckResult.md docs/MapTest.md docs/MixedPropertiesAndAdditionalPropertiesClass.md docs/Model200Response.md @@ -44,21 +41,25 @@ docs/ModelFile.md docs/ModelList.md docs/ModelReturn.md docs/Name.md +docs/NullableClass.md docs/NumberOnly.md +docs/ObjectWithDeprecatedFields.md docs/Order.md docs/OuterComposite.md docs/OuterEnum.md +docs/OuterEnumDefaultValue.md +docs/OuterEnumInteger.md +docs/OuterEnumIntegerDefaultValue.md +docs/OuterObjectWithEnumProperty.md docs/Pet.md docs/PetApi.md docs/ReadOnlyFirst.md +docs/SingleRefType.md docs/SpecialModelName.md docs/StoreApi.md docs/Tag.md -docs/TypeHolderDefault.md -docs/TypeHolderExample.md docs/User.md docs/UserApi.md -docs/XmlItem.md git_push.sh gradle.properties gradle/wrapper/gradle-wrapper.jar @@ -78,40 +79,37 @@ src/main/java/org/openapitools/client/RFC3339DateFormat.java src/main/java/org/openapitools/client/ServerConfiguration.java src/main/java/org/openapitools/client/ServerVariable.java src/main/java/org/openapitools/client/api/AnotherFakeApi.java +src/main/java/org/openapitools/client/api/DefaultApi.java src/main/java/org/openapitools/client/api/FakeApi.java src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java src/main/java/org/openapitools/client/api/PetApi.java src/main/java/org/openapitools/client/api/StoreApi.java src/main/java/org/openapitools/client/api/UserApi.java src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java +src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java src/main/java/org/openapitools/client/model/Animal.java src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayTest.java -src/main/java/org/openapitools/client/model/BigCat.java -src/main/java/org/openapitools/client/model/BigCatAllOf.java src/main/java/org/openapitools/client/model/Capitalization.java src/main/java/org/openapitools/client/model/Cat.java src/main/java/org/openapitools/client/model/CatAllOf.java src/main/java/org/openapitools/client/model/Category.java src/main/java/org/openapitools/client/model/ClassModel.java src/main/java/org/openapitools/client/model/Client.java +src/main/java/org/openapitools/client/model/DeprecatedObject.java src/main/java/org/openapitools/client/model/Dog.java src/main/java/org/openapitools/client/model/DogAllOf.java src/main/java/org/openapitools/client/model/EnumArrays.java src/main/java/org/openapitools/client/model/EnumClass.java src/main/java/org/openapitools/client/model/EnumTest.java src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +src/main/java/org/openapitools/client/model/Foo.java +src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java src/main/java/org/openapitools/client/model/FormatTest.java src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +src/main/java/org/openapitools/client/model/HealthCheckResult.java src/main/java/org/openapitools/client/model/MapTest.java src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java src/main/java/org/openapitools/client/model/Model200Response.java @@ -120,15 +118,19 @@ src/main/java/org/openapitools/client/model/ModelFile.java src/main/java/org/openapitools/client/model/ModelList.java src/main/java/org/openapitools/client/model/ModelReturn.java src/main/java/org/openapitools/client/model/Name.java +src/main/java/org/openapitools/client/model/NullableClass.java src/main/java/org/openapitools/client/model/NumberOnly.java +src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java src/main/java/org/openapitools/client/model/Order.java src/main/java/org/openapitools/client/model/OuterComposite.java src/main/java/org/openapitools/client/model/OuterEnum.java +src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java +src/main/java/org/openapitools/client/model/OuterEnumInteger.java +src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java +src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java src/main/java/org/openapitools/client/model/Pet.java src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +src/main/java/org/openapitools/client/model/SingleRefType.java src/main/java/org/openapitools/client/model/SpecialModelName.java src/main/java/org/openapitools/client/model/Tag.java -src/main/java/org/openapitools/client/model/TypeHolderDefault.java -src/main/java/org/openapitools/client/model/TypeHolderExample.java src/main/java/org/openapitools/client/model/User.java -src/main/java/org/openapitools/client/model/XmlItem.java diff --git a/samples/client/petstore/java/native-async/README.md b/samples/client/petstore/java/native-async/README.md index 0b92908453..22e2a0969d 100644 --- a/samples/client/petstore/java/native-async/README.md +++ b/samples/client/petstore/java/native-async/README.md @@ -84,9 +84,9 @@ public class AnotherFakeApiExample { // Configure clients using the `defaultClient` object, such as // overriding the host and port, timeout, etc. AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); - Client body = new Client(); // Client | client model + Client client = new Client(); // Client | client model try { - CompletableFuture result = apiInstance.call123testSpecialTags(body); + CompletableFuture result = apiInstance.call123testSpecialTags(client); System.out.println(result.get()); } catch (ApiException e) { System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); @@ -108,8 +108,12 @@ Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- *AnotherFakeApi* | [**call123testSpecialTags**](docs/AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags *AnotherFakeApi* | [**call123testSpecialTagsWithHttpInfo**](docs/AnotherFakeApi.md#call123testSpecialTagsWithHttpInfo) | **PATCH** /another-fake/dummy | To test special tags -*FakeApi* | [**createXmlItem**](docs/FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem -*FakeApi* | [**createXmlItemWithHttpInfo**](docs/FakeApi.md#createXmlItemWithHttpInfo) | **POST** /fake/create_xml_item | creates an XmlItem +*DefaultApi* | [**fooGet**](docs/DefaultApi.md#fooGet) | **GET** /foo | +*DefaultApi* | [**fooGetWithHttpInfo**](docs/DefaultApi.md#fooGetWithHttpInfo) | **GET** /foo | +*FakeApi* | [**fakeHealthGet**](docs/FakeApi.md#fakeHealthGet) | **GET** /fake/health | Health check endpoint +*FakeApi* | [**fakeHealthGetWithHttpInfo**](docs/FakeApi.md#fakeHealthGetWithHttpInfo) | **GET** /fake/health | Health check endpoint +*FakeApi* | [**fakeHttpSignatureTest**](docs/FakeApi.md#fakeHttpSignatureTest) | **GET** /fake/http-signature-test | test http signature authentication +*FakeApi* | [**fakeHttpSignatureTestWithHttpInfo**](docs/FakeApi.md#fakeHttpSignatureTestWithHttpInfo) | **GET** /fake/http-signature-test | test http signature authentication *FakeApi* | [**fakeOuterBooleanSerialize**](docs/FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | *FakeApi* | [**fakeOuterBooleanSerializeWithHttpInfo**](docs/FakeApi.md#fakeOuterBooleanSerializeWithHttpInfo) | **POST** /fake/outer/boolean | *FakeApi* | [**fakeOuterCompositeSerialize**](docs/FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | @@ -118,14 +122,18 @@ Class | Method | HTTP request | Description *FakeApi* | [**fakeOuterNumberSerializeWithHttpInfo**](docs/FakeApi.md#fakeOuterNumberSerializeWithHttpInfo) | **POST** /fake/outer/number | *FakeApi* | [**fakeOuterStringSerialize**](docs/FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | *FakeApi* | [**fakeOuterStringSerializeWithHttpInfo**](docs/FakeApi.md#fakeOuterStringSerializeWithHttpInfo) | **POST** /fake/outer/string | +*FakeApi* | [**fakePropertyEnumIntegerSerialize**](docs/FakeApi.md#fakePropertyEnumIntegerSerialize) | **POST** /fake/property/enum-int | +*FakeApi* | [**fakePropertyEnumIntegerSerializeWithHttpInfo**](docs/FakeApi.md#fakePropertyEnumIntegerSerializeWithHttpInfo) | **POST** /fake/property/enum-int | +*FakeApi* | [**testBodyWithBinary**](docs/FakeApi.md#testBodyWithBinary) | **PUT** /fake/body-with-binary | +*FakeApi* | [**testBodyWithBinaryWithHttpInfo**](docs/FakeApi.md#testBodyWithBinaryWithHttpInfo) | **PUT** /fake/body-with-binary | *FakeApi* | [**testBodyWithFileSchema**](docs/FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | *FakeApi* | [**testBodyWithFileSchemaWithHttpInfo**](docs/FakeApi.md#testBodyWithFileSchemaWithHttpInfo) | **PUT** /fake/body-with-file-schema | *FakeApi* | [**testBodyWithQueryParams**](docs/FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | *FakeApi* | [**testBodyWithQueryParamsWithHttpInfo**](docs/FakeApi.md#testBodyWithQueryParamsWithHttpInfo) | **PUT** /fake/body-with-query-params | *FakeApi* | [**testClientModel**](docs/FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model *FakeApi* | [**testClientModelWithHttpInfo**](docs/FakeApi.md#testClientModelWithHttpInfo) | **PATCH** /fake | To test \"client\" model -*FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -*FakeApi* | [**testEndpointParametersWithHttpInfo**](docs/FakeApi.md#testEndpointParametersWithHttpInfo) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*FakeApi* | [**testEndpointParametersWithHttpInfo**](docs/FakeApi.md#testEndpointParametersWithHttpInfo) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *FakeApi* | [**testEnumParameters**](docs/FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters *FakeApi* | [**testEnumParametersWithHttpInfo**](docs/FakeApi.md#testEnumParametersWithHttpInfo) | **GET** /fake | To test enum parameters *FakeApi* | [**testGroupParameters**](docs/FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) @@ -184,34 +192,30 @@ Class | Method | HTTP request | Description ## Documentation for Models - - [AdditionalPropertiesAnyType](docs/AdditionalPropertiesAnyType.md) - - [AdditionalPropertiesArray](docs/AdditionalPropertiesArray.md) - - [AdditionalPropertiesBoolean](docs/AdditionalPropertiesBoolean.md) - [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) - - [AdditionalPropertiesInteger](docs/AdditionalPropertiesInteger.md) - - [AdditionalPropertiesNumber](docs/AdditionalPropertiesNumber.md) - - [AdditionalPropertiesObject](docs/AdditionalPropertiesObject.md) - - [AdditionalPropertiesString](docs/AdditionalPropertiesString.md) + - [AllOfWithSingleRef](docs/AllOfWithSingleRef.md) - [Animal](docs/Animal.md) - [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) - [ArrayTest](docs/ArrayTest.md) - - [BigCat](docs/BigCat.md) - - [BigCatAllOf](docs/BigCatAllOf.md) - [Capitalization](docs/Capitalization.md) - [Cat](docs/Cat.md) - [CatAllOf](docs/CatAllOf.md) - [Category](docs/Category.md) - [ClassModel](docs/ClassModel.md) - [Client](docs/Client.md) + - [DeprecatedObject](docs/DeprecatedObject.md) - [Dog](docs/Dog.md) - [DogAllOf](docs/DogAllOf.md) - [EnumArrays](docs/EnumArrays.md) - [EnumClass](docs/EnumClass.md) - [EnumTest](docs/EnumTest.md) - [FileSchemaTestClass](docs/FileSchemaTestClass.md) + - [Foo](docs/Foo.md) + - [FooGetDefaultResponse](docs/FooGetDefaultResponse.md) - [FormatTest](docs/FormatTest.md) - [HasOnlyReadOnly](docs/HasOnlyReadOnly.md) + - [HealthCheckResult](docs/HealthCheckResult.md) - [MapTest](docs/MapTest.md) - [MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md) - [Model200Response](docs/Model200Response.md) @@ -220,18 +224,22 @@ Class | Method | HTTP request | Description - [ModelList](docs/ModelList.md) - [ModelReturn](docs/ModelReturn.md) - [Name](docs/Name.md) + - [NullableClass](docs/NullableClass.md) - [NumberOnly](docs/NumberOnly.md) + - [ObjectWithDeprecatedFields](docs/ObjectWithDeprecatedFields.md) - [Order](docs/Order.md) - [OuterComposite](docs/OuterComposite.md) - [OuterEnum](docs/OuterEnum.md) + - [OuterEnumDefaultValue](docs/OuterEnumDefaultValue.md) + - [OuterEnumInteger](docs/OuterEnumInteger.md) + - [OuterEnumIntegerDefaultValue](docs/OuterEnumIntegerDefaultValue.md) + - [OuterObjectWithEnumProperty](docs/OuterObjectWithEnumProperty.md) - [Pet](docs/Pet.md) - [ReadOnlyFirst](docs/ReadOnlyFirst.md) + - [SingleRefType](docs/SingleRefType.md) - [SpecialModelName](docs/SpecialModelName.md) - [Tag](docs/Tag.md) - - [TypeHolderDefault](docs/TypeHolderDefault.md) - - [TypeHolderExample](docs/TypeHolderExample.md) - [User](docs/User.md) - - [XmlItem](docs/XmlItem.md) ## Documentation for Authorization @@ -251,9 +259,19 @@ Authentication schemes defined for the API: - **API key parameter name**: api_key_query - **Location**: URL query string +### bearer_test + + +- **Type**: HTTP basic authentication + ### http_basic_test +- **Type**: HTTP basic authentication + +### http_signature_test + + - **Type**: HTTP basic authentication ### petstore_auth diff --git a/samples/client/petstore/java/native-async/api/openapi.yaml b/samples/client/petstore/java/native-async/api/openapi.yaml index e7e17402f6..f9cbedf1e4 100644 --- a/samples/client/petstore/java/native-async/api/openapi.yaml +++ b/samples/client/petstore/java/native-async/api/openapi.yaml @@ -1,4 +1,4 @@ -openapi: 3.0.1 +openapi: 3.0.0 info: description: "This spec is mainly for testing Petstore server and contains fake\ \ endpoints, models. Please do not use this for any other purpose. Special characters:\ @@ -9,7 +9,30 @@ info: title: OpenAPI Petstore version: 1.0.0 servers: -- url: http://petstore.swagger.io:80/v2 +- description: petstore server + url: "http://{server}.swagger.io:{port}/v2" + variables: + server: + default: petstore + enum: + - petstore + - qa-petstore + - dev-petstore + port: + default: "80" + enum: + - "80" + - "8080" +- description: The local server + url: "https://localhost:8080/{version}" + variables: + version: + default: v2 + enum: + - v1 + - v2 +- description: The local server without variables + url: https://127.0.0.1/no_varaible tags: - description: Everything about your Pets name: pet @@ -18,25 +41,26 @@ tags: - description: Operations about user name: user paths: + /foo: + get: + responses: + default: + content: + application/json: + schema: + $ref: '#/components/schemas/_foo_get_default_response' + description: response + x-accepts: application/json /pet: post: + description: "" operationId: addPet requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Pet' - application/xml: - schema: - $ref: '#/components/schemas/Pet' - description: Pet object that needs to be added to the store - required: true + $ref: '#/components/requestBodies/Pet' responses: "200": - content: {} - description: successful operation + description: Successful operation "405": - content: {} description: Invalid input security: - petstore_auth: @@ -45,33 +69,21 @@ paths: summary: Add a new pet to the store tags: - pet - x-codegen-request-body-name: body x-content-type: application/json x-accepts: application/json put: + description: "" operationId: updatePet requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Pet' - application/xml: - schema: - $ref: '#/components/schemas/Pet' - description: Pet object that needs to be added to the store - required: true + $ref: '#/components/requestBodies/Pet' responses: "200": - content: {} - description: successful operation + description: Successful operation "400": - content: {} description: Invalid ID supplied "404": - content: {} description: Pet not found "405": - content: {} description: Validation exception security: - petstore_auth: @@ -80,15 +92,34 @@ paths: summary: Update an existing pet tags: - pet - x-codegen-request-body-name: body + x-webclient-blocking: true x-content-type: application/json x-accepts: application/json + servers: + - url: http://petstore.swagger.io/v2 + - url: http://path-server-test.petstore.local/v2 + - description: test server with variables + url: "http://{server}.swagger.io:{port}/v2" + variables: + server: + default: petstore + description: target server + enum: + - petstore + - qa-petstore + - dev-petstore + port: + default: "80" + enum: + - "80" + - "8080" /pet/findByStatus: get: description: Multiple status values can be provided with comma separated strings operationId: findPetsByStatus parameters: - - description: Status values that need to be considered for filter + - deprecated: true + description: Status values that need to be considered for filter explode: false in: query name: status @@ -118,7 +149,6 @@ paths: type: array description: successful operation "400": - content: {} description: Invalid status value security: - petstore_auth: @@ -127,6 +157,7 @@ paths: summary: Finds Pets by status tags: - pet + x-webclient-blocking: true x-accepts: application/json /pet/findByTags: get: @@ -163,7 +194,6 @@ paths: uniqueItems: true description: successful operation "400": - content: {} description: Invalid tag value security: - petstore_auth: @@ -172,28 +202,33 @@ paths: summary: Finds Pets by tags tags: - pet + x-webclient-blocking: true x-accepts: application/json /pet/{petId}: delete: + description: "" operationId: deletePet parameters: - - in: header + - explode: false + in: header name: api_key + required: false schema: type: string + style: simple - description: Pet id to delete + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple responses: "200": - content: {} - description: successful operation + description: Successful operation "400": - content: {} description: Invalid pet value security: - petstore_auth: @@ -208,12 +243,14 @@ paths: operationId: getPetById parameters: - description: ID of pet to return + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple responses: "200": content: @@ -225,35 +262,38 @@ paths: $ref: '#/components/schemas/Pet' description: successful operation "400": - content: {} description: Invalid ID supplied "404": - content: {} description: Pet not found security: - api_key: [] summary: Find pet by ID tags: - pet + x-webclient-blocking: true x-accepts: application/json post: + description: "" operationId: updatePetWithForm parameters: - description: ID of pet that needs to be updated + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple requestBody: content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/updatePetWithForm_request' responses: + "200": + description: Successful operation "405": - content: {} description: Invalid input security: - petstore_auth: @@ -266,15 +306,18 @@ paths: x-accepts: application/json /pet/{petId}/uploadImage: post: + description: "" operationId: uploadFile parameters: - description: ID of pet to update + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple requestBody: content: multipart/form-data: @@ -318,10 +361,11 @@ paths: x-accepts: application/json /store/order: post: + description: "" operationId: placeOrder requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/Order' description: order placed for purchasing the pet @@ -337,13 +381,11 @@ paths: $ref: '#/components/schemas/Order' description: successful operation "400": - content: {} description: Invalid Order summary: Place an order for a pet tags: - store - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: application/json /store/order/{order_id}: delete: @@ -352,17 +394,17 @@ paths: operationId: deleteOrder parameters: - description: ID of the order that needs to be deleted + explode: false in: path name: order_id required: true schema: type: string + style: simple responses: "400": - content: {} description: Invalid ID supplied "404": - content: {} description: Order not found summary: Delete purchase order by ID tags: @@ -374,6 +416,7 @@ paths: operationId: getOrderById parameters: - description: ID of pet that needs to be fetched + explode: false in: path name: order_id required: true @@ -382,6 +425,7 @@ paths: maximum: 5 minimum: 1 type: integer + style: simple responses: "200": content: @@ -393,10 +437,8 @@ paths: $ref: '#/components/schemas/Order' description: successful operation "400": - content: {} description: Invalid ID supplied "404": - content: {} description: Order not found summary: Find purchase order by ID tags: @@ -408,81 +450,68 @@ paths: operationId: createUser requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/User' description: Created user object required: true responses: default: - content: {} description: successful operation summary: Create user tags: - user - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: application/json /user/createWithArray: post: + description: "" operationId: createUsersWithArrayInput requestBody: - content: - '*/*': - schema: - items: - $ref: '#/components/schemas/User' - type: array - description: List of user object - required: true + $ref: '#/components/requestBodies/UserArray' responses: default: - content: {} description: successful operation summary: Creates list of users with given input array tags: - user - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: application/json /user/createWithList: post: + description: "" operationId: createUsersWithListInput requestBody: - content: - '*/*': - schema: - items: - $ref: '#/components/schemas/User' - type: array - description: List of user object - required: true + $ref: '#/components/requestBodies/UserArray' responses: default: - content: {} description: successful operation summary: Creates list of users with given input array tags: - user - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: application/json /user/login: get: + description: "" operationId: loginUser parameters: - description: The user name for login + explode: true in: query name: username required: true schema: type: string + style: form - description: The password for login in clear text + explode: true in: query name: password required: true schema: type: string + style: form responses: "200": content: @@ -496,16 +525,19 @@ paths: headers: X-Rate-Limit: description: calls per hour allowed by the user + explode: false schema: format: int32 type: integer + style: simple X-Expires-After: description: date in UTC when token expires + explode: false schema: format: date-time type: string + style: simple "400": - content: {} description: Invalid username/password supplied summary: Logs user into the system tags: @@ -513,10 +545,10 @@ paths: x-accepts: application/json /user/logout: get: + description: "" operationId: logoutUser responses: default: - content: {} description: successful operation summary: Logs out current logged in user session tags: @@ -528,31 +560,34 @@ paths: operationId: deleteUser parameters: - description: The name that needs to be deleted + explode: false in: path name: username required: true schema: type: string + style: simple responses: "400": - content: {} description: Invalid username supplied "404": - content: {} description: User not found summary: Delete user tags: - user x-accepts: application/json get: + description: "" operationId: getUserByName parameters: - description: The name that needs to be fetched. Use user1 for testing. + explode: false in: path name: username required: true schema: type: string + style: simple responses: "200": content: @@ -564,10 +599,8 @@ paths: $ref: '#/components/schemas/User' description: successful operation "400": - content: {} description: Invalid username supplied "404": - content: {} description: User not found summary: Get user by user name tags: @@ -578,42 +611,36 @@ paths: operationId: updateUser parameters: - description: name that need to be deleted + explode: false in: path name: username required: true schema: type: string + style: simple requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/User' description: Updated user object required: true responses: "400": - content: {} description: Invalid user supplied "404": - content: {} description: User not found summary: Updated user tags: - user - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: application/json /fake_classname_test: patch: description: To test class name in snake case operationId: testClassname requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - description: client model - required: true + $ref: '#/components/requestBodies/Client' responses: "200": content: @@ -626,7 +653,6 @@ paths: summary: To test class name in snake case tags: - fake_classname_tags 123#$%^ - x-codegen-request-body-name: body x-content-type: application/json x-accepts: application/json /fake: @@ -635,44 +661,60 @@ paths: operationId: testGroupParameters parameters: - description: Required String in group parameters + explode: true in: query name: required_string_group required: true schema: type: integer + style: form - description: Required Boolean in group parameters + explode: false in: header name: required_boolean_group required: true schema: type: boolean + style: simple - description: Required Integer in group parameters + explode: true in: query name: required_int64_group required: true schema: format: int64 type: integer + style: form - description: String in group parameters + explode: true in: query name: string_group + required: false schema: type: integer + style: form - description: Boolean in group parameters + explode: false in: header name: boolean_group + required: false schema: type: boolean + style: simple - description: Integer in group parameters + explode: true in: query name: int64_group + required: false schema: format: int64 type: integer + style: form responses: "400": - content: {} description: Something wrong + security: + - bearer_test: [] summary: Fake endpoint to test group parameters (optional) tags: - fake @@ -686,6 +728,7 @@ paths: explode: false in: header name: enum_header_string_array + required: false schema: items: default: $ @@ -696,8 +739,10 @@ paths: type: array style: simple - description: Header parameter enum test (string) + explode: false in: header name: enum_header_string + required: false schema: default: -efg enum: @@ -705,10 +750,12 @@ paths: - -efg - (xyz) type: string + style: simple - description: Query parameter enum test (string array) - explode: false + explode: true in: query name: enum_query_string_array + required: false schema: items: default: $ @@ -719,8 +766,10 @@ paths: type: array style: form - description: Query parameter enum test (string) + explode: true in: query name: enum_query_string + required: false schema: default: -efg enum: @@ -728,24 +777,40 @@ paths: - -efg - (xyz) type: string + style: form - description: Query parameter enum test (double) + explode: true in: query name: enum_query_integer + required: false schema: enum: - 1 - -2 format: int32 type: integer + style: form - description: Query parameter enum test (double) + explode: true in: query name: enum_query_double + required: false schema: enum: - 1.1 - -1.2 format: double type: number + style: form + - explode: true + in: query + name: enum_query_model_array + required: false + schema: + items: + $ref: '#/components/schemas/EnumClass' + type: array + style: form requestBody: content: application/x-www-form-urlencoded: @@ -753,10 +818,8 @@ paths: $ref: '#/components/schemas/testEnumParameters_request' responses: "400": - content: {} description: Invalid request "404": - content: {} description: Not found summary: To test enum parameters tags: @@ -767,12 +830,7 @@ paths: description: To test "client" model operationId: testClientModel requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - description: client model - required: true + $ref: '#/components/requestBodies/Client' responses: "200": content: @@ -783,36 +841,32 @@ paths: summary: To test "client" model tags: - fake - x-codegen-request-body-name: body x-content-type: application/json x-accepts: application/json post: - description: |- + description: | Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 operationId: testEndpointParameters requestBody: content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/testEndpointParameters_request' - required: true responses: "400": - content: {} description: Invalid username supplied "404": - content: {} description: User not found security: - http_basic_test: [] - summary: |- + summary: | Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 tags: - fake x-content-type: application/x-www-form-urlencoded @@ -823,11 +877,10 @@ paths: operationId: fakeOuterNumberSerialize requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/OuterNumber' description: Input number as post body - required: false responses: "200": content: @@ -837,8 +890,29 @@ paths: description: Output number tags: - fake - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json + x-accepts: '*/*' + /fake/property/enum-int: + post: + description: Test serialization of enum (int) properties with examples + operationId: fakePropertyEnumIntegerSerialize + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OuterObjectWithEnumProperty' + description: Input enum (int) as post body + required: true + responses: + "200": + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterObjectWithEnumProperty' + description: Output enum (int) + tags: + - fake + x-content-type: application/json x-accepts: '*/*' /fake/outer/string: post: @@ -846,11 +920,10 @@ paths: operationId: fakeOuterStringSerialize requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/OuterString' description: Input string as post body - required: false responses: "200": content: @@ -860,8 +933,7 @@ paths: description: Output string tags: - fake - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: '*/*' /fake/outer/boolean: post: @@ -869,11 +941,10 @@ paths: operationId: fakeOuterBooleanSerialize requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/OuterBoolean' description: Input boolean as post body - required: false responses: "200": content: @@ -883,8 +954,7 @@ paths: description: Output boolean tags: - fake - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: '*/*' /fake/outer/composite: post: @@ -892,11 +962,10 @@ paths: operationId: fakeOuterCompositeSerialize requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/OuterComposite' description: Input composite as post body - required: false responses: "200": content: @@ -906,21 +975,19 @@ paths: description: Output composite tags: - fake - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: '*/*' /fake/jsonFormData: get: + description: "" operationId: testJsonFormData requestBody: content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/testJsonFormData_request' - required: true responses: "200": - content: {} description: successful operation summary: test json serialization of form data tags: @@ -929,6 +996,7 @@ paths: x-accepts: application/json /fake/inline-additionalProperties: post: + description: "" operationId: testInlineAdditionalProperties requestBody: content: @@ -941,23 +1009,23 @@ paths: required: true responses: "200": - content: {} description: successful operation summary: test inline additionalProperties tags: - fake - x-codegen-request-body-name: param x-content-type: application/json x-accepts: application/json /fake/body-with-query-params: put: operationId: testBodyWithQueryParams parameters: - - in: query + - explode: true + in: query name: query required: true schema: type: string + style: form requestBody: content: application/json: @@ -966,60 +1034,17 @@ paths: required: true responses: "200": - content: {} description: Success tags: - fake - x-codegen-request-body-name: body x-content-type: application/json x-accepts: application/json - /fake/create_xml_item: - post: - description: this route creates an XmlItem - operationId: createXmlItem - requestBody: - content: - application/xml: - schema: - $ref: '#/components/schemas/XmlItem' - application/xml; charset=utf-8: - schema: - $ref: '#/components/schemas/XmlItem' - application/xml; charset=utf-16: - schema: - $ref: '#/components/schemas/XmlItem' - text/xml: - schema: - $ref: '#/components/schemas/XmlItem' - text/xml; charset=utf-8: - schema: - $ref: '#/components/schemas/XmlItem' - text/xml; charset=utf-16: - schema: - $ref: '#/components/schemas/XmlItem' - description: XmlItem Body - required: true - responses: - "200": - content: {} - description: successful operation - summary: creates an XmlItem - tags: - - fake - x-codegen-request-body-name: XmlItem - x-content-type: application/xml - x-accepts: application/json /another-fake/dummy: patch: description: To test special tags and operation ID starting with number operationId: 123_test_@#$%_special_tags requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - description: client model - required: true + $ref: '#/components/requestBodies/Client' responses: "200": content: @@ -1030,12 +1055,11 @@ paths: summary: To test special tags tags: - $another-fake? - x-codegen-request-body-name: body x-content-type: application/json x-accepts: application/json /fake/body-with-file-schema: put: - description: "For this test, the body for this request much reference a schema\ + description: "For this test, the body for this request must reference a schema\ \ named `File`." operationId: testBodyWithFileSchema requestBody: @@ -1046,13 +1070,31 @@ paths: required: true responses: "200": - content: {} description: Success tags: - fake - x-codegen-request-body-name: body x-content-type: application/json x-accepts: application/json + /fake/body-with-binary: + put: + description: "For this test, the body has to be a binary file." + operationId: testBodyWithBinary + requestBody: + content: + image/png: + schema: + format: binary + nullable: true + type: string + description: image to upload + required: true + responses: + "200": + description: Success + tags: + - fake + x-content-type: image/png + x-accepts: application/json /fake/test-query-parameters: put: description: To test the collection format in query parameters @@ -1066,15 +1108,18 @@ paths: items: type: string type: array - style: form - - in: query + style: pipeDelimited + - explode: false + in: query name: ioutil required: true schema: items: type: string type: array - - in: query + style: form + - explode: false + in: query name: http required: true schema: @@ -1100,30 +1145,49 @@ paths: type: string type: array style: form + - explode: true + in: query + name: language + required: false + schema: + additionalProperties: + format: string + type: string + type: object + style: form + - allowEmptyValue: true + explode: true + in: query + name: allowEmpty + required: true + schema: + type: string + style: form responses: "200": - content: {} description: Success tags: - fake x-accepts: application/json /fake/{petId}/uploadImageWithRequiredFile: post: + description: "" operationId: uploadFileWithRequiredFile parameters: - description: ID of pet to update + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple requestBody: content: multipart/form-data: schema: $ref: '#/components/schemas/uploadFileWithRequiredFile_request' - required: true responses: "200": content: @@ -1140,8 +1204,91 @@ paths: - pet x-content-type: multipart/form-data x-accepts: application/json + /fake/health: + get: + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/HealthCheckResult' + description: The instance started successfully + summary: Health check endpoint + tags: + - fake + x-accepts: application/json + /fake/http-signature-test: + get: + operationId: fake-http-signature-test + parameters: + - description: query parameter + explode: true + in: query + name: query_1 + required: false + schema: + type: string + style: form + - description: header parameter + explode: false + in: header + name: header_1 + required: false + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/Pet' + responses: + "200": + description: The instance started successfully + security: + - http_signature_test: [] + summary: test http signature authentication + tags: + - fake + x-content-type: application/json + x-accepts: application/json components: + requestBodies: + UserArray: + content: + application/json: + schema: + items: + $ref: '#/components/schemas/User' + type: array + description: List of user object + required: true + Client: + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + description: client model + required: true + Pet: + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store + required: true schemas: + Foo: + example: + bar: bar + properties: + bar: + default: bar + type: string + type: object + Bar: + default: bar + type: string Order: example: petId: 6 @@ -1307,21 +1454,12 @@ components: message: type: string type: object - $special[model.name]: - properties: - $special[property.name]: - format: int64 - type: integer - type: object - xml: - name: "$special[model.name]" Return: description: Model for testing reserved words properties: return: format: int32 type: integer - type: object xml: name: Return Name: @@ -1341,7 +1479,6 @@ components: type: integer required: - name - type: object xml: name: Name "200_response": @@ -1352,7 +1489,6 @@ components: type: integer class: type: string - type: object xml: name: Name ClassModel: @@ -1360,7 +1496,6 @@ components: properties: _class: type: string - type: object Dog: allOf: - $ref: '#/components/schemas/Animal' @@ -1369,10 +1504,6 @@ components: allOf: - $ref: '#/components/schemas/Animal' - $ref: '#/components/schemas/Cat_allOf' - BigCat: - allOf: - - $ref: '#/components/schemas/Cat' - - $ref: '#/components/schemas/BigCat_allOf' Animal: discriminator: propertyName: className @@ -1417,12 +1548,14 @@ components: maximum: 123.4 minimum: 67.8 type: number + decimal: + format: number + type: string string: pattern: "/[a-z]/i" type: string byte: format: byte - pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$" type: string binary: format: binary @@ -1442,8 +1575,14 @@ components: maxLength: 64 minLength: 10 type: string - BigDecimal: - format: number + pattern_with_digits: + description: A string that is a 10 digit number. Can have leading zeros. + pattern: "^\\d{10}$" + type: string + pattern_with_digits_and_delimiter: + description: A string starting with 'image_' (case insensitive) and one + to three digits following i.e. Image_01. + pattern: "/^image_\\d{1,3}$/i" type: string required: - byte @@ -1486,117 +1625,27 @@ components: type: number outerEnum: $ref: '#/components/schemas/OuterEnum' + outerEnumInteger: + $ref: '#/components/schemas/OuterEnumInteger' + outerEnumDefaultValue: + $ref: '#/components/schemas/OuterEnumDefaultValue' + outerEnumIntegerDefaultValue: + $ref: '#/components/schemas/OuterEnumIntegerDefaultValue' required: - enum_string_required type: object AdditionalPropertiesClass: properties: - map_string: + map_property: additionalProperties: type: string type: object - map_number: - additionalProperties: - type: number - type: object - map_integer: - additionalProperties: - type: integer - type: object - map_boolean: - additionalProperties: - type: boolean - type: object - map_array_integer: - additionalProperties: - items: - type: integer - type: array - type: object - map_array_anytype: - additionalProperties: - items: - properties: {} - type: object - type: array - type: object - map_map_string: + map_of_map_property: additionalProperties: additionalProperties: type: string type: object type: object - map_map_anytype: - additionalProperties: - additionalProperties: - properties: {} - type: object - type: object - type: object - anytype_1: - properties: {} - type: object - anytype_2: - type: object - anytype_3: - properties: {} - type: object - type: object - AdditionalPropertiesString: - additionalProperties: - type: string - properties: - name: - type: string - type: object - AdditionalPropertiesInteger: - additionalProperties: - type: integer - properties: - name: - type: string - type: object - AdditionalPropertiesNumber: - additionalProperties: - type: number - properties: - name: - type: string - type: object - AdditionalPropertiesBoolean: - additionalProperties: - type: boolean - properties: - name: - type: string - type: object - AdditionalPropertiesArray: - additionalProperties: - items: - properties: {} - type: object - type: array - properties: - name: - type: string - type: object - AdditionalPropertiesObject: - additionalProperties: - additionalProperties: - properties: {} - type: object - type: object - properties: - name: - type: string - type: object - AdditionalPropertiesAnyType: - additionalProperties: - properties: {} - type: object - properties: - name: - type: string type: object MixedPropertiesAndAdditionalPropertiesClass: properties: @@ -1686,6 +1735,8 @@ components: array_of_string: items: type: string + maxItems: 3 + minItems: 0 type: array array_array_of_integer: items: @@ -1742,7 +1793,29 @@ components: - placed - approved - delivered + nullable: true type: string + OuterEnumInteger: + enum: + - 0 + - 1 + - 2 + example: 2 + type: integer + OuterEnumDefaultValue: + default: placed + enum: + - placed + - approved + - delivered + type: string + OuterEnumIntegerDefaultValue: + default: 0 + enum: + - 0 + - 1 + - 2 + type: integer OuterComposite: example: my_string: my_string @@ -1792,243 +1865,133 @@ components: description: Test capitalization type: string type: object - TypeHolderDefault: + _special_model.name_: properties: - string_item: - default: what - type: string - number_item: - type: number - integer_item: + $special[property.name]: + format: int64 type: integer - bool_item: - default: true - type: boolean - array_item: - items: - type: integer - type: array - required: - - array_item - - bool_item - - integer_item - - number_item - - string_item - type: object - TypeHolderExample: - properties: - string_item: - example: what - type: string - number_item: - example: 1.234 - type: number - float_item: - example: 1.234 - format: float - type: number - integer_item: - example: -2 - type: integer - bool_item: - example: true - type: boolean - array_item: - example: - - 0 - - 1 - - 2 - - 3 - items: - type: integer - type: array - required: - - array_item - - bool_item - - float_item - - integer_item - - number_item - - string_item - type: object - XmlItem: - properties: - attribute_string: - example: string - type: string - xml: - attribute: true - attribute_number: - example: 1.234 - type: number - xml: - attribute: true - attribute_integer: - example: -2 - type: integer - xml: - attribute: true - attribute_boolean: - example: true - type: boolean - xml: - attribute: true - wrapped_array: - items: - type: integer - type: array - xml: - wrapped: true - name_string: - example: string - type: string - xml: - name: xml_name_string - name_number: - example: 1.234 - type: number - xml: - name: xml_name_number - name_integer: - example: -2 - type: integer - xml: - name: xml_name_integer - name_boolean: - example: true - type: boolean - xml: - name: xml_name_boolean - name_array: - items: - type: integer - xml: - name: xml_name_array_item - type: array - name_wrapped_array: - items: - type: integer - xml: - name: xml_name_wrapped_array_item - type: array - xml: - name: xml_name_wrapped_array - wrapped: true - prefix_string: - example: string - type: string - xml: - prefix: ab - prefix_number: - example: 1.234 - type: number - xml: - prefix: cd - prefix_integer: - example: -2 - type: integer - xml: - prefix: ef - prefix_boolean: - example: true - type: boolean - xml: - prefix: gh - prefix_array: - items: - type: integer - xml: - prefix: ij - type: array - prefix_wrapped_array: - items: - type: integer - xml: - prefix: mn - type: array - xml: - prefix: kl - wrapped: true - namespace_string: - example: string - type: string - xml: - namespace: http://a.com/schema - namespace_number: - example: 1.234 - type: number - xml: - namespace: http://b.com/schema - namespace_integer: - example: -2 - type: integer - xml: - namespace: http://c.com/schema - namespace_boolean: - example: true - type: boolean - xml: - namespace: http://d.com/schema - namespace_array: - items: - type: integer - xml: - namespace: http://e.com/schema - type: array - namespace_wrapped_array: - items: - type: integer - xml: - namespace: http://g.com/schema - type: array - xml: - namespace: http://f.com/schema - wrapped: true - prefix_ns_string: - example: string - type: string - xml: - namespace: http://a.com/schema - prefix: a - prefix_ns_number: - example: 1.234 - type: number - xml: - namespace: http://b.com/schema - prefix: b - prefix_ns_integer: - example: -2 - type: integer - xml: - namespace: http://c.com/schema - prefix: c - prefix_ns_boolean: - example: true - type: boolean - xml: - namespace: http://d.com/schema - prefix: d - prefix_ns_array: - items: - type: integer - xml: - namespace: http://e.com/schema - prefix: e - type: array - prefix_ns_wrapped_array: - items: - type: integer - xml: - namespace: http://g.com/schema - prefix: g - type: array - xml: - namespace: http://f.com/schema - prefix: f - wrapped: true - type: object xml: - namespace: http://a.com/schema - prefix: pre + name: "$special[model.name]" + HealthCheckResult: + description: Just a string to inform instance is up and running. Make it nullable + in hope to get it as pointer in generated model. + example: + NullableMessage: NullableMessage + properties: + NullableMessage: + nullable: true + type: string + type: object + NullableClass: + additionalProperties: + nullable: true + type: object + properties: + integer_prop: + nullable: true + type: integer + number_prop: + nullable: true + type: number + boolean_prop: + nullable: true + type: boolean + string_prop: + nullable: true + type: string + date_prop: + format: date + nullable: true + type: string + datetime_prop: + format: date-time + nullable: true + type: string + array_nullable_prop: + items: + type: object + nullable: true + type: array + array_and_items_nullable_prop: + items: + nullable: true + type: object + nullable: true + type: array + array_items_nullable: + items: + nullable: true + type: object + type: array + object_nullable_prop: + additionalProperties: + type: object + nullable: true + type: object + object_and_items_nullable_prop: + additionalProperties: + nullable: true + type: object + nullable: true + type: object + object_items_nullable: + additionalProperties: + nullable: true + type: object + type: object + type: object + OuterObjectWithEnumProperty: + example: + value: 2 + properties: + value: + $ref: '#/components/schemas/OuterEnumInteger' + required: + - value + type: object + DeprecatedObject: + deprecated: true + properties: + name: + type: string + type: object + ObjectWithDeprecatedFields: + properties: + uuid: + type: string + id: + deprecated: true + type: number + deprecatedRef: + $ref: '#/components/schemas/DeprecatedObject' + bars: + deprecated: true + items: + $ref: '#/components/schemas/Bar' + type: array + type: object + AllOfWithSingleRef: + properties: + username: + type: string + SingleRefType: + allOf: + - $ref: '#/components/schemas/SingleRefType' + type: object + SingleRefType: + enum: + - admin + - user + title: SingleRefType + type: string + _foo_get_default_response: + example: + string: + bar: bar + properties: + string: + $ref: '#/components/schemas/Foo' + type: object updatePetWithForm_request: properties: name: @@ -2072,7 +2035,6 @@ components: properties: integer: description: None - format: int32 maximum: 100 minimum: 10 type: integer @@ -2177,17 +2139,6 @@ components: type: boolean type: object example: null - BigCat_allOf: - properties: - kind: - enum: - - lions - - tigers - - leopards - - jaguars - type: string - type: object - example: null securitySchemes: petstore_auth: flows: @@ -2208,5 +2159,11 @@ components: http_basic_test: scheme: basic type: http -x-original-swagger-version: "2.0" + bearer_test: + bearerFormat: JWT + scheme: bearer + type: http + http_signature_test: + scheme: signature + type: http diff --git a/samples/client/petstore/java/native-async/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/native-async/docs/AdditionalPropertiesClass.md index 79402f75c6..fe69a56eeb 100644 --- a/samples/client/petstore/java/native-async/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/native-async/docs/AdditionalPropertiesClass.md @@ -7,17 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**mapString** | **Map<String, String>** | | [optional] | -|**mapNumber** | **Map<String, BigDecimal>** | | [optional] | -|**mapInteger** | **Map<String, Integer>** | | [optional] | -|**mapBoolean** | **Map<String, Boolean>** | | [optional] | -|**mapArrayInteger** | **Map<String, List<Integer>>** | | [optional] | -|**mapArrayAnytype** | **Map<String, List<Object>>** | | [optional] | -|**mapMapString** | **Map<String, Map<String, String>>** | | [optional] | -|**mapMapAnytype** | **Map<String, Map<String, Object>>** | | [optional] | -|**anytype1** | **Object** | | [optional] | -|**anytype2** | **Object** | | [optional] | -|**anytype3** | **Object** | | [optional] | +|**mapProperty** | **Map<String, String>** | | [optional] | +|**mapOfMapProperty** | **Map<String, Map<String, String>>** | | [optional] | diff --git a/samples/client/petstore/java/native-async/docs/AllOfWithSingleRef.md b/samples/client/petstore/java/native-async/docs/AllOfWithSingleRef.md new file mode 100644 index 0000000000..0a9e61bc68 --- /dev/null +++ b/samples/client/petstore/java/native-async/docs/AllOfWithSingleRef.md @@ -0,0 +1,14 @@ + + +# AllOfWithSingleRef + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**username** | **String** | | [optional] | +|**singleRefType** | [**SingleRefType**](SingleRefType.md) | | [optional] | + + + diff --git a/samples/client/petstore/java/native-async/docs/AnotherFakeApi.md b/samples/client/petstore/java/native-async/docs/AnotherFakeApi.md index e4f1d88a47..1f312f041c 100644 --- a/samples/client/petstore/java/native-async/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/native-async/docs/AnotherFakeApi.md @@ -11,7 +11,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* ## call123testSpecialTags -> CompletableFuture call123testSpecialTags(body) +> CompletableFuture call123testSpecialTags(client) To test special tags @@ -34,9 +34,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); - Client body = new Client(); // Client | client model + Client client = new Client(); // Client | client model try { - CompletableFuture result = apiInstance.call123testSpecialTags(body); + CompletableFuture result = apiInstance.call123testSpecialTags(client); System.out.println(result.get()); } catch (ApiException e) { System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); @@ -54,7 +54,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**Client**](Client.md)| client model | | +| **client** | [**Client**](Client.md)| client model | | ### Return type @@ -77,7 +77,7 @@ No authorization required ## call123testSpecialTagsWithHttpInfo -> CompletableFuture> call123testSpecialTags call123testSpecialTagsWithHttpInfo(body) +> CompletableFuture> call123testSpecialTags call123testSpecialTagsWithHttpInfo(client) To test special tags @@ -101,9 +101,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); - Client body = new Client(); // Client | client model + Client client = new Client(); // Client | client model try { - CompletableFuture> response = apiInstance.call123testSpecialTagsWithHttpInfo(body); + CompletableFuture> response = apiInstance.call123testSpecialTagsWithHttpInfo(client); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -130,7 +130,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**Client**](Client.md)| client model | | +| **client** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/native-async/docs/DefaultApi.md b/samples/client/petstore/java/native-async/docs/DefaultApi.md new file mode 100644 index 0000000000..f74db7fd44 --- /dev/null +++ b/samples/client/petstore/java/native-async/docs/DefaultApi.md @@ -0,0 +1,141 @@ +# DefaultApi + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**fooGet**](DefaultApi.md#fooGet) | **GET** /foo | | +| [**fooGetWithHttpInfo**](DefaultApi.md#fooGetWithHttpInfo) | **GET** /foo | | + + + +## fooGet + +> CompletableFuture fooGet() + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.DefaultApi; +import java.util.concurrent.CompletableFuture; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + try { + CompletableFuture result = apiInstance.fooGet(); + System.out.println(result.get()); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#fooGet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +CompletableFuture<[**FooGetDefaultResponse**](FooGetDefaultResponse.md)> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | response | - | + +## fooGetWithHttpInfo + +> CompletableFuture> fooGet fooGetWithHttpInfo() + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.ApiResponse; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.DefaultApi; +import java.util.concurrent.CompletableFuture; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + try { + CompletableFuture> response = apiInstance.fooGetWithHttpInfo(); + System.out.println("Status code: " + response.get().getStatusCode()); + System.out.println("Response headers: " + response.get().getHeaders()); + System.out.println("Response body: " + response.get().getData()); + } catch (InterruptedException | ExecutionException e) { + ApiException apiException = (ApiException)e.getCause(); + System.err.println("Exception when calling DefaultApi#fooGet"); + System.err.println("Status code: " + apiException.getCode()); + System.err.println("Response headers: " + apiException.getResponseHeaders()); + System.err.println("Reason: " + apiException.getResponseBody()); + e.printStackTrace(); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#fooGet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | response | - | + diff --git a/samples/client/petstore/java/native-async/docs/DeprecatedObject.md b/samples/client/petstore/java/native-async/docs/DeprecatedObject.md new file mode 100644 index 0000000000..48de1d6244 --- /dev/null +++ b/samples/client/petstore/java/native-async/docs/DeprecatedObject.md @@ -0,0 +1,13 @@ + + +# DeprecatedObject + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java/native-async/docs/EnumTest.md b/samples/client/petstore/java/native-async/docs/EnumTest.md index bf2def484c..380a2aef0b 100644 --- a/samples/client/petstore/java/native-async/docs/EnumTest.md +++ b/samples/client/petstore/java/native-async/docs/EnumTest.md @@ -12,6 +12,9 @@ |**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] | |**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] | |**outerEnum** | **OuterEnum** | | [optional] | +|**outerEnumInteger** | **OuterEnumInteger** | | [optional] | +|**outerEnumDefaultValue** | **OuterEnumDefaultValue** | | [optional] | +|**outerEnumIntegerDefaultValue** | **OuterEnumIntegerDefaultValue** | | [optional] | diff --git a/samples/client/petstore/java/native-async/docs/FakeApi.md b/samples/client/petstore/java/native-async/docs/FakeApi.md index a73552ed93..3efa97de5a 100644 --- a/samples/client/petstore/java/native-async/docs/FakeApi.md +++ b/samples/client/petstore/java/native-async/docs/FakeApi.md @@ -4,8 +4,10 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**createXmlItem**](FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem | -| [**createXmlItemWithHttpInfo**](FakeApi.md#createXmlItemWithHttpInfo) | **POST** /fake/create_xml_item | creates an XmlItem | +| [**fakeHealthGet**](FakeApi.md#fakeHealthGet) | **GET** /fake/health | Health check endpoint | +| [**fakeHealthGetWithHttpInfo**](FakeApi.md#fakeHealthGetWithHttpInfo) | **GET** /fake/health | Health check endpoint | +| [**fakeHttpSignatureTest**](FakeApi.md#fakeHttpSignatureTest) | **GET** /fake/http-signature-test | test http signature authentication | +| [**fakeHttpSignatureTestWithHttpInfo**](FakeApi.md#fakeHttpSignatureTestWithHttpInfo) | **GET** /fake/http-signature-test | test http signature authentication | | [**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | | | [**fakeOuterBooleanSerializeWithHttpInfo**](FakeApi.md#fakeOuterBooleanSerializeWithHttpInfo) | **POST** /fake/outer/boolean | | | [**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | | @@ -14,14 +16,18 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* | [**fakeOuterNumberSerializeWithHttpInfo**](FakeApi.md#fakeOuterNumberSerializeWithHttpInfo) | **POST** /fake/outer/number | | | [**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | | | [**fakeOuterStringSerializeWithHttpInfo**](FakeApi.md#fakeOuterStringSerializeWithHttpInfo) | **POST** /fake/outer/string | | +| [**fakePropertyEnumIntegerSerialize**](FakeApi.md#fakePropertyEnumIntegerSerialize) | **POST** /fake/property/enum-int | | +| [**fakePropertyEnumIntegerSerializeWithHttpInfo**](FakeApi.md#fakePropertyEnumIntegerSerializeWithHttpInfo) | **POST** /fake/property/enum-int | | +| [**testBodyWithBinary**](FakeApi.md#testBodyWithBinary) | **PUT** /fake/body-with-binary | | +| [**testBodyWithBinaryWithHttpInfo**](FakeApi.md#testBodyWithBinaryWithHttpInfo) | **PUT** /fake/body-with-binary | | | [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | | | [**testBodyWithFileSchemaWithHttpInfo**](FakeApi.md#testBodyWithFileSchemaWithHttpInfo) | **PUT** /fake/body-with-file-schema | | | [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | | | [**testBodyWithQueryParamsWithHttpInfo**](FakeApi.md#testBodyWithQueryParamsWithHttpInfo) | **PUT** /fake/body-with-query-params | | | [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model | | [**testClientModelWithHttpInfo**](FakeApi.md#testClientModelWithHttpInfo) | **PATCH** /fake | To test \"client\" model | -| [**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 | -| [**testEndpointParametersWithHttpInfo**](FakeApi.md#testEndpointParametersWithHttpInfo) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 | +| [**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 | +| [**testEndpointParametersWithHttpInfo**](FakeApi.md#testEndpointParametersWithHttpInfo) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 | | [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters | | [**testEnumParametersWithHttpInfo**](FakeApi.md#testEnumParametersWithHttpInfo) | **GET** /fake | To test enum parameters | | [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) | @@ -35,13 +41,11 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* -## createXmlItem +## fakeHealthGet -> CompletableFuture createXmlItem(xmlItem) +> CompletableFuture fakeHealthGet() -creates an XmlItem - -this route creates an XmlItem +Health check endpoint ### Example @@ -60,11 +64,11 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body try { - CompletableFuture result = apiInstance.createXmlItem(xmlItem); + CompletableFuture result = apiInstance.fakeHealthGet(); + System.out.println(result.get()); } catch (ApiException e) { - System.err.println("Exception when calling FakeApi#createXmlItem"); + System.err.println("Exception when calling FakeApi#fakeHealthGet"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -76,15 +80,12 @@ public class Example { ### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | | +This endpoint does not need any parameter. ### Return type +CompletableFuture<[**HealthCheckResult**](HealthCheckResult.md)> -CompletableFuture (empty response body) ### Authorization @@ -92,21 +93,19 @@ No authorization required ### HTTP request headers -- **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16 -- **Accept**: Not defined +- **Content-Type**: Not defined +- **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | successful operation | - | +| **200** | The instance started successfully | - | -## createXmlItemWithHttpInfo +## fakeHealthGetWithHttpInfo -> CompletableFuture> createXmlItem createXmlItemWithHttpInfo(xmlItem) +> CompletableFuture> fakeHealthGet fakeHealthGetWithHttpInfo() -creates an XmlItem - -this route creates an XmlItem +Health check endpoint ### Example @@ -126,20 +125,164 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body try { - CompletableFuture> response = apiInstance.createXmlItemWithHttpInfo(xmlItem); + CompletableFuture> response = apiInstance.fakeHealthGetWithHttpInfo(); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); + System.out.println("Response body: " + response.get().getData()); } catch (InterruptedException | ExecutionException e) { ApiException apiException = (ApiException)e.getCause(); - System.err.println("Exception when calling FakeApi#createXmlItem"); + System.err.println("Exception when calling FakeApi#fakeHealthGet"); System.err.println("Status code: " + apiException.getCode()); System.err.println("Response headers: " + apiException.getResponseHeaders()); System.err.println("Reason: " + apiException.getResponseBody()); e.printStackTrace(); } catch (ApiException e) { - System.err.println("Exception when calling FakeApi#createXmlItem"); + System.err.println("Exception when calling FakeApi#fakeHealthGet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | The instance started successfully | - | + + +## fakeHttpSignatureTest + +> CompletableFuture fakeHttpSignatureTest(pet, query1, header1) + +test http signature authentication + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +import java.util.concurrent.CompletableFuture; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + + FakeApi apiInstance = new FakeApi(defaultClient); + Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store + String query1 = "query1_example"; // String | query parameter + String header1 = "header1_example"; // String | header parameter + try { + CompletableFuture result = apiInstance.fakeHttpSignatureTest(pet, query1, header1); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeHttpSignatureTest"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | +| **query1** | **String**| query parameter | [optional] | +| **header1** | **String**| header parameter | [optional] | + +### Return type + + +CompletableFuture (empty response body) + +### Authorization + +[http_signature_test](../README.md#http_signature_test) + +### HTTP request headers + +- **Content-Type**: application/json, application/xml +- **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | The instance started successfully | - | + +## fakeHttpSignatureTestWithHttpInfo + +> CompletableFuture> fakeHttpSignatureTest fakeHttpSignatureTestWithHttpInfo(pet, query1, header1) + +test http signature authentication + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.ApiResponse; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +import java.util.concurrent.CompletableFuture; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + + FakeApi apiInstance = new FakeApi(defaultClient); + Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store + String query1 = "query1_example"; // String | query parameter + String header1 = "header1_example"; // String | header parameter + try { + CompletableFuture> response = apiInstance.fakeHttpSignatureTestWithHttpInfo(pet, query1, header1); + System.out.println("Status code: " + response.get().getStatusCode()); + System.out.println("Response headers: " + response.get().getHeaders()); + } catch (InterruptedException | ExecutionException e) { + ApiException apiException = (ApiException)e.getCause(); + System.err.println("Exception when calling FakeApi#fakeHttpSignatureTest"); + System.err.println("Status code: " + apiException.getCode()); + System.err.println("Response headers: " + apiException.getResponseHeaders()); + System.err.println("Reason: " + apiException.getResponseBody()); + e.printStackTrace(); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeHttpSignatureTest"); System.err.println("Status code: " + e.getCode()); System.err.println("Response headers: " + e.getResponseHeaders()); System.err.println("Reason: " + e.getResponseBody()); @@ -154,7 +297,9 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | | +| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | +| **query1** | **String**| query parameter | [optional] | +| **header1** | **String**| header parameter | [optional] | ### Return type @@ -163,17 +308,17 @@ CompletableFuture> ### Authorization -No authorization required +[http_signature_test](../README.md#http_signature_test) ### HTTP request headers -- **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16 +- **Content-Type**: application/json, application/xml - **Accept**: Not defined ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | successful operation | - | +| **200** | The instance started successfully | - | ## fakeOuterBooleanSerialize @@ -234,7 +379,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: */* ### HTTP response details @@ -310,7 +455,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: */* ### HTTP response details @@ -321,7 +466,7 @@ No authorization required ## fakeOuterCompositeSerialize -> CompletableFuture fakeOuterCompositeSerialize(body) +> CompletableFuture fakeOuterCompositeSerialize(outerComposite) @@ -344,9 +489,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body + OuterComposite outerComposite = new OuterComposite(); // OuterComposite | Input composite as post body try { - CompletableFuture result = apiInstance.fakeOuterCompositeSerialize(body); + CompletableFuture result = apiInstance.fakeOuterCompositeSerialize(outerComposite); System.out.println(result.get()); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize"); @@ -364,7 +509,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] | +| **outerComposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] | ### Return type @@ -377,7 +522,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: */* ### HTTP response details @@ -387,7 +532,7 @@ No authorization required ## fakeOuterCompositeSerializeWithHttpInfo -> CompletableFuture> fakeOuterCompositeSerialize fakeOuterCompositeSerializeWithHttpInfo(body) +> CompletableFuture> fakeOuterCompositeSerialize fakeOuterCompositeSerializeWithHttpInfo(outerComposite) @@ -411,9 +556,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body + OuterComposite outerComposite = new OuterComposite(); // OuterComposite | Input composite as post body try { - CompletableFuture> response = apiInstance.fakeOuterCompositeSerializeWithHttpInfo(body); + CompletableFuture> response = apiInstance.fakeOuterCompositeSerializeWithHttpInfo(outerComposite); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -440,7 +585,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] | +| **outerComposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] | ### Return type @@ -453,7 +598,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: */* ### HTTP response details @@ -520,7 +665,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: */* ### HTTP response details @@ -596,7 +741,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: */* ### HTTP response details @@ -663,7 +808,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: */* ### HTTP response details @@ -739,7 +884,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: */* ### HTTP response details @@ -748,13 +893,13 @@ No authorization required | **200** | Output string | - | -## testBodyWithFileSchema +## fakePropertyEnumIntegerSerialize -> CompletableFuture testBodyWithFileSchema(body) +> CompletableFuture fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty) -For this test, the body for this request much reference a schema named `File`. +Test serialization of enum (int) properties with examples ### Example @@ -773,9 +918,293 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass | + OuterObjectWithEnumProperty outerObjectWithEnumProperty = new OuterObjectWithEnumProperty(); // OuterObjectWithEnumProperty | Input enum (int) as post body try { - CompletableFuture result = apiInstance.testBodyWithFileSchema(body); + CompletableFuture result = apiInstance.fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty); + System.out.println(result.get()); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakePropertyEnumIntegerSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **outerObjectWithEnumProperty** | [**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md)| Input enum (int) as post body | | + +### Return type + +CompletableFuture<[**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md)> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output enum (int) | - | + +## fakePropertyEnumIntegerSerializeWithHttpInfo + +> CompletableFuture> fakePropertyEnumIntegerSerialize fakePropertyEnumIntegerSerializeWithHttpInfo(outerObjectWithEnumProperty) + + + +Test serialization of enum (int) properties with examples + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.ApiResponse; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +import java.util.concurrent.CompletableFuture; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + FakeApi apiInstance = new FakeApi(defaultClient); + OuterObjectWithEnumProperty outerObjectWithEnumProperty = new OuterObjectWithEnumProperty(); // OuterObjectWithEnumProperty | Input enum (int) as post body + try { + CompletableFuture> response = apiInstance.fakePropertyEnumIntegerSerializeWithHttpInfo(outerObjectWithEnumProperty); + System.out.println("Status code: " + response.get().getStatusCode()); + System.out.println("Response headers: " + response.get().getHeaders()); + System.out.println("Response body: " + response.get().getData()); + } catch (InterruptedException | ExecutionException e) { + ApiException apiException = (ApiException)e.getCause(); + System.err.println("Exception when calling FakeApi#fakePropertyEnumIntegerSerialize"); + System.err.println("Status code: " + apiException.getCode()); + System.err.println("Response headers: " + apiException.getResponseHeaders()); + System.err.println("Reason: " + apiException.getResponseBody()); + e.printStackTrace(); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakePropertyEnumIntegerSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **outerObjectWithEnumProperty** | [**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md)| Input enum (int) as post body | | + +### Return type + +CompletableFuture> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output enum (int) | - | + + +## testBodyWithBinary + +> CompletableFuture testBodyWithBinary(body) + + + +For this test, the body has to be a binary file. + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +import java.util.concurrent.CompletableFuture; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + FakeApi apiInstance = new FakeApi(defaultClient); + File body = new File("/path/to/file"); // File | image to upload + try { + CompletableFuture result = apiInstance.testBodyWithBinary(body); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testBodyWithBinary"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **File**| image to upload | | + +### Return type + + +CompletableFuture (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: image/png +- **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + +## testBodyWithBinaryWithHttpInfo + +> CompletableFuture> testBodyWithBinary testBodyWithBinaryWithHttpInfo(body) + + + +For this test, the body has to be a binary file. + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.ApiResponse; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +import java.util.concurrent.CompletableFuture; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + FakeApi apiInstance = new FakeApi(defaultClient); + File body = new File("/path/to/file"); // File | image to upload + try { + CompletableFuture> response = apiInstance.testBodyWithBinaryWithHttpInfo(body); + System.out.println("Status code: " + response.get().getStatusCode()); + System.out.println("Response headers: " + response.get().getHeaders()); + } catch (InterruptedException | ExecutionException e) { + ApiException apiException = (ApiException)e.getCause(); + System.err.println("Exception when calling FakeApi#testBodyWithBinary"); + System.err.println("Status code: " + apiException.getCode()); + System.err.println("Response headers: " + apiException.getResponseHeaders()); + System.err.println("Reason: " + apiException.getResponseBody()); + e.printStackTrace(); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testBodyWithBinary"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **File**| image to upload | | + +### Return type + + +CompletableFuture> + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: image/png +- **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + + +## testBodyWithFileSchema + +> CompletableFuture testBodyWithFileSchema(fileSchemaTestClass) + + + +For this test, the body for this request must reference a schema named `File`. + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; +import java.util.concurrent.CompletableFuture; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + FakeApi apiInstance = new FakeApi(defaultClient); + FileSchemaTestClass fileSchemaTestClass = new FileSchemaTestClass(); // FileSchemaTestClass | + try { + CompletableFuture result = apiInstance.testBodyWithFileSchema(fileSchemaTestClass); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testBodyWithFileSchema"); System.err.println("Status code: " + e.getCode()); @@ -792,7 +1221,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | | +| **fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | | ### Return type @@ -815,11 +1244,11 @@ No authorization required ## testBodyWithFileSchemaWithHttpInfo -> CompletableFuture> testBodyWithFileSchema testBodyWithFileSchemaWithHttpInfo(body) +> CompletableFuture> testBodyWithFileSchema testBodyWithFileSchemaWithHttpInfo(fileSchemaTestClass) -For this test, the body for this request much reference a schema named `File`. +For this test, the body for this request must reference a schema named `File`. ### Example @@ -839,9 +1268,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass | + FileSchemaTestClass fileSchemaTestClass = new FileSchemaTestClass(); // FileSchemaTestClass | try { - CompletableFuture> response = apiInstance.testBodyWithFileSchemaWithHttpInfo(body); + CompletableFuture> response = apiInstance.testBodyWithFileSchemaWithHttpInfo(fileSchemaTestClass); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); } catch (InterruptedException | ExecutionException e) { @@ -867,7 +1296,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | | +| **fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | | ### Return type @@ -891,7 +1320,7 @@ No authorization required ## testBodyWithQueryParams -> CompletableFuture testBodyWithQueryParams(query, body) +> CompletableFuture testBodyWithQueryParams(query, user) @@ -913,9 +1342,9 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); String query = "query_example"; // String | - User body = new User(); // User | + User user = new User(); // User | try { - CompletableFuture result = apiInstance.testBodyWithQueryParams(query, body); + CompletableFuture result = apiInstance.testBodyWithQueryParams(query, user); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testBodyWithQueryParams"); System.err.println("Status code: " + e.getCode()); @@ -933,7 +1362,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **query** | **String**| | | -| **body** | [**User**](User.md)| | | +| **user** | [**User**](User.md)| | | ### Return type @@ -956,7 +1385,7 @@ No authorization required ## testBodyWithQueryParamsWithHttpInfo -> CompletableFuture> testBodyWithQueryParams testBodyWithQueryParamsWithHttpInfo(query, body) +> CompletableFuture> testBodyWithQueryParams testBodyWithQueryParamsWithHttpInfo(query, user) @@ -979,9 +1408,9 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); String query = "query_example"; // String | - User body = new User(); // User | + User user = new User(); // User | try { - CompletableFuture> response = apiInstance.testBodyWithQueryParamsWithHttpInfo(query, body); + CompletableFuture> response = apiInstance.testBodyWithQueryParamsWithHttpInfo(query, user); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); } catch (InterruptedException | ExecutionException e) { @@ -1008,7 +1437,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **query** | **String**| | | -| **body** | [**User**](User.md)| | | +| **user** | [**User**](User.md)| | | ### Return type @@ -1032,7 +1461,7 @@ No authorization required ## testClientModel -> CompletableFuture testClientModel(body) +> CompletableFuture testClientModel(client) To test \"client\" model @@ -1055,9 +1484,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - Client body = new Client(); // Client | client model + Client client = new Client(); // Client | client model try { - CompletableFuture result = apiInstance.testClientModel(body); + CompletableFuture result = apiInstance.testClientModel(client); System.out.println(result.get()); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testClientModel"); @@ -1075,7 +1504,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**Client**](Client.md)| client model | | +| **client** | [**Client**](Client.md)| client model | | ### Return type @@ -1098,7 +1527,7 @@ No authorization required ## testClientModelWithHttpInfo -> CompletableFuture> testClientModel testClientModelWithHttpInfo(body) +> CompletableFuture> testClientModel testClientModelWithHttpInfo(client) To test \"client\" model @@ -1122,9 +1551,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - Client body = new Client(); // Client | client model + Client client = new Client(); // Client | client model try { - CompletableFuture> response = apiInstance.testClientModelWithHttpInfo(body); + CompletableFuture> response = apiInstance.testClientModelWithHttpInfo(client); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -1151,7 +1580,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**Client**](Client.md)| client model | | +| **client** | [**Client**](Client.md)| client model | | ### Return type @@ -1177,9 +1606,9 @@ No authorization required > CompletableFuture testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback) -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ### Example @@ -1275,9 +1704,9 @@ CompletableFuture (empty response body) > CompletableFuture> testEndpointParameters testEndpointParametersWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback) -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ### Example @@ -1382,7 +1811,7 @@ CompletableFuture> ## testEnumParameters -> CompletableFuture testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString) +> CompletableFuture testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString) To test enum parameters @@ -1411,10 +1840,11 @@ public class Example { String enumQueryString = "_abc"; // String | Query parameter enum test (string) Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) + List enumQueryModelArray = Arrays.asList(-efg); // List | List enumFormStringArray = Arrays.asList("$"); // List | Form parameter enum test (string array) String enumFormString = "_abc"; // String | Form parameter enum test (string) try { - CompletableFuture result = apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + CompletableFuture result = apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testEnumParameters"); System.err.println("Status code: " + e.getCode()); @@ -1437,6 +1867,7 @@ public class Example { | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | +| **enumQueryModelArray** | [**List<EnumClass>**](EnumClass.md)| | [optional] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | | **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | @@ -1462,7 +1893,7 @@ No authorization required ## testEnumParametersWithHttpInfo -> CompletableFuture> testEnumParameters testEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString) +> CompletableFuture> testEnumParameters testEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString) To test enum parameters @@ -1492,10 +1923,11 @@ public class Example { String enumQueryString = "_abc"; // String | Query parameter enum test (string) Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) + List enumQueryModelArray = Arrays.asList(-efg); // List | List enumFormStringArray = Arrays.asList("$"); // List | Form parameter enum test (string array) String enumFormString = "_abc"; // String | Form parameter enum test (string) try { - CompletableFuture> response = apiInstance.testEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + CompletableFuture> response = apiInstance.testEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); } catch (InterruptedException | ExecutionException e) { @@ -1527,6 +1959,7 @@ public class Example { | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | +| **enumQueryModelArray** | [**List<EnumClass>**](EnumClass.md)| | [optional] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | | **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | @@ -1566,6 +1999,7 @@ Fake endpoint to test group parameters (optional) import org.openapitools.client.ApiClient; import org.openapitools.client.ApiException; import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; import org.openapitools.client.models.*; import org.openapitools.client.api.FakeApi; import org.openapitools.client.api.FakeApi.*; @@ -1575,6 +2009,10 @@ public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure HTTP bearer authorization: bearer_test + HttpBearerAuth bearer_test = (HttpBearerAuth) defaultClient.getAuthentication("bearer_test"); + bearer_test.setBearerToken("BEARER TOKEN"); FakeApi apiInstance = new FakeApi(defaultClient); Integer requiredStringGroup = 56; // Integer | Required String in group parameters @@ -1617,7 +2055,7 @@ CompletableFuture (empty response body) ### Authorization -No authorization required +[bearer_test](../README.md#bearer_test) ### HTTP request headers @@ -1645,6 +2083,7 @@ import org.openapitools.client.ApiClient; import org.openapitools.client.ApiException; import org.openapitools.client.ApiResponse; import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; import org.openapitools.client.models.*; import org.openapitools.client.api.FakeApi; import org.openapitools.client.api.FakeApi.*; @@ -1654,6 +2093,10 @@ public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure HTTP bearer authorization: bearer_test + HttpBearerAuth bearer_test = (HttpBearerAuth) defaultClient.getAuthentication("bearer_test"); + bearer_test.setBearerToken("BEARER TOKEN"); FakeApi apiInstance = new FakeApi(defaultClient); Integer requiredStringGroup = 56; // Integer | Required String in group parameters @@ -1705,7 +2148,7 @@ CompletableFuture> ### Authorization -No authorization required +[bearer_test](../README.md#bearer_test) ### HTTP request headers @@ -1735,10 +2178,12 @@ No authorization required ## testInlineAdditionalProperties -> CompletableFuture testInlineAdditionalProperties(param) +> CompletableFuture testInlineAdditionalProperties(requestBody) test inline additionalProperties + + ### Example ```java @@ -1756,9 +2201,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - Map param = new HashMap(); // Map | request body + Map requestBody = new HashMap(); // Map | request body try { - CompletableFuture result = apiInstance.testInlineAdditionalProperties(param); + CompletableFuture result = apiInstance.testInlineAdditionalProperties(requestBody); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties"); System.err.println("Status code: " + e.getCode()); @@ -1775,7 +2220,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **param** | [**Map<String, String>**](String.md)| request body | | +| **requestBody** | [**Map<String, String>**](String.md)| request body | | ### Return type @@ -1798,10 +2243,12 @@ No authorization required ## testInlineAdditionalPropertiesWithHttpInfo -> CompletableFuture> testInlineAdditionalProperties testInlineAdditionalPropertiesWithHttpInfo(param) +> CompletableFuture> testInlineAdditionalProperties testInlineAdditionalPropertiesWithHttpInfo(requestBody) test inline additionalProperties + + ### Example ```java @@ -1820,9 +2267,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - Map param = new HashMap(); // Map | request body + Map requestBody = new HashMap(); // Map | request body try { - CompletableFuture> response = apiInstance.testInlineAdditionalPropertiesWithHttpInfo(param); + CompletableFuture> response = apiInstance.testInlineAdditionalPropertiesWithHttpInfo(requestBody); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); } catch (InterruptedException | ExecutionException e) { @@ -1848,7 +2295,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **param** | [**Map<String, String>**](String.md)| request body | | +| **requestBody** | [**Map<String, String>**](String.md)| request body | | ### Return type @@ -1876,6 +2323,8 @@ No authorization required test json serialization of form data + + ### Example ```java @@ -1941,6 +2390,8 @@ No authorization required test json serialization of form data + + ### Example ```java @@ -2013,7 +2464,7 @@ No authorization required ## testQueryParameterCollectionFormat -> CompletableFuture testQueryParameterCollectionFormat(pipe, ioutil, http, url, context) +> CompletableFuture testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language) @@ -2041,8 +2492,10 @@ public class Example { List http = Arrays.asList(); // List | List url = Arrays.asList(); // List | List context = Arrays.asList(); // List | + String allowEmpty = "allowEmpty_example"; // String | + Map language = new HashMap(); // Map | try { - CompletableFuture result = apiInstance.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context); + CompletableFuture result = apiInstance.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testQueryParameterCollectionFormat"); System.err.println("Status code: " + e.getCode()); @@ -2064,6 +2517,8 @@ public class Example { | **http** | [**List<String>**](String.md)| | | | **url** | [**List<String>**](String.md)| | | | **context** | [**List<String>**](String.md)| | | +| **allowEmpty** | **String**| | | +| **language** | [**Map<String, String>**](String.md)| | [optional] | ### Return type @@ -2086,7 +2541,7 @@ No authorization required ## testQueryParameterCollectionFormatWithHttpInfo -> CompletableFuture> testQueryParameterCollectionFormat testQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context) +> CompletableFuture> testQueryParameterCollectionFormat testQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context, allowEmpty, language) @@ -2115,8 +2570,10 @@ public class Example { List http = Arrays.asList(); // List | List url = Arrays.asList(); // List | List context = Arrays.asList(); // List | + String allowEmpty = "allowEmpty_example"; // String | + Map language = new HashMap(); // Map | try { - CompletableFuture> response = apiInstance.testQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context); + CompletableFuture> response = apiInstance.testQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context, allowEmpty, language); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); } catch (InterruptedException | ExecutionException e) { @@ -2147,6 +2604,8 @@ public class Example { | **http** | [**List<String>**](String.md)| | | | **url** | [**List<String>**](String.md)| | | | **context** | [**List<String>**](String.md)| | | +| **allowEmpty** | **String**| | | +| **language** | [**Map<String, String>**](String.md)| | [optional] | ### Return type diff --git a/samples/client/petstore/java/native-async/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/native-async/docs/FakeClassnameTags123Api.md index a149ae8063..b44ac8e61f 100644 --- a/samples/client/petstore/java/native-async/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/native-async/docs/FakeClassnameTags123Api.md @@ -11,7 +11,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* ## testClassname -> CompletableFuture testClassname(body) +> CompletableFuture testClassname(client) To test class name in snake case @@ -41,9 +41,9 @@ public class Example { //api_key_query.setApiKeyPrefix("Token"); FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(defaultClient); - Client body = new Client(); // Client | client model + Client client = new Client(); // Client | client model try { - CompletableFuture result = apiInstance.testClassname(body); + CompletableFuture result = apiInstance.testClassname(client); System.out.println(result.get()); } catch (ApiException e) { System.err.println("Exception when calling FakeClassnameTags123Api#testClassname"); @@ -61,7 +61,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**Client**](Client.md)| client model | | +| **client** | [**Client**](Client.md)| client model | | ### Return type @@ -84,7 +84,7 @@ CompletableFuture<[**Client**](Client.md)> ## testClassnameWithHttpInfo -> CompletableFuture> testClassname testClassnameWithHttpInfo(body) +> CompletableFuture> testClassname testClassnameWithHttpInfo(client) To test class name in snake case @@ -115,9 +115,9 @@ public class Example { //api_key_query.setApiKeyPrefix("Token"); FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(defaultClient); - Client body = new Client(); // Client | client model + Client client = new Client(); // Client | client model try { - CompletableFuture> response = apiInstance.testClassnameWithHttpInfo(body); + CompletableFuture> response = apiInstance.testClassnameWithHttpInfo(client); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -144,7 +144,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**Client**](Client.md)| client model | | +| **client** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/native-async/docs/Foo.md b/samples/client/petstore/java/native-async/docs/Foo.md new file mode 100644 index 0000000000..6b3f055652 --- /dev/null +++ b/samples/client/petstore/java/native-async/docs/Foo.md @@ -0,0 +1,13 @@ + + +# Foo + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bar** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java/native-async/docs/FooGetDefaultResponse.md b/samples/client/petstore/java/native-async/docs/FooGetDefaultResponse.md new file mode 100644 index 0000000000..ff3d7a3a56 --- /dev/null +++ b/samples/client/petstore/java/native-async/docs/FooGetDefaultResponse.md @@ -0,0 +1,13 @@ + + +# FooGetDefaultResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**string** | [**Foo**](Foo.md) | | [optional] | + + + diff --git a/samples/client/petstore/java/native-async/docs/FormatTest.md b/samples/client/petstore/java/native-async/docs/FormatTest.md index 9c68c3080e..01b8c777ae 100644 --- a/samples/client/petstore/java/native-async/docs/FormatTest.md +++ b/samples/client/petstore/java/native-async/docs/FormatTest.md @@ -13,6 +13,7 @@ |**number** | **BigDecimal** | | | |**_float** | **Float** | | [optional] | |**_double** | **Double** | | [optional] | +|**decimal** | **BigDecimal** | | [optional] | |**string** | **String** | | [optional] | |**_byte** | **byte[]** | | | |**binary** | **File** | | [optional] | @@ -20,7 +21,8 @@ |**dateTime** | **OffsetDateTime** | | [optional] | |**uuid** | **UUID** | | [optional] | |**password** | **String** | | | -|**bigDecimal** | **BigDecimal** | | [optional] | +|**patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] | +|**patternWithDigitsAndDelimiter** | **String** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [optional] | diff --git a/samples/client/petstore/java/native-async/docs/HealthCheckResult.md b/samples/client/petstore/java/native-async/docs/HealthCheckResult.md new file mode 100644 index 0000000000..4885e6f1ca --- /dev/null +++ b/samples/client/petstore/java/native-async/docs/HealthCheckResult.md @@ -0,0 +1,14 @@ + + +# HealthCheckResult + +Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**nullableMessage** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java/native-async/docs/NullableClass.md b/samples/client/petstore/java/native-async/docs/NullableClass.md new file mode 100644 index 0000000000..fa98c5c6d9 --- /dev/null +++ b/samples/client/petstore/java/native-async/docs/NullableClass.md @@ -0,0 +1,24 @@ + + +# NullableClass + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**integerProp** | **Integer** | | [optional] | +|**numberProp** | **BigDecimal** | | [optional] | +|**booleanProp** | **Boolean** | | [optional] | +|**stringProp** | **String** | | [optional] | +|**dateProp** | **LocalDate** | | [optional] | +|**datetimeProp** | **OffsetDateTime** | | [optional] | +|**arrayNullableProp** | **List<Object>** | | [optional] | +|**arrayAndItemsNullableProp** | **List<Object>** | | [optional] | +|**arrayItemsNullable** | **List<Object>** | | [optional] | +|**objectNullableProp** | **Map<String, Object>** | | [optional] | +|**objectAndItemsNullableProp** | **Map<String, Object>** | | [optional] | +|**objectItemsNullable** | **Map<String, Object>** | | [optional] | + + + diff --git a/samples/client/petstore/java/native-async/docs/ObjectWithDeprecatedFields.md b/samples/client/petstore/java/native-async/docs/ObjectWithDeprecatedFields.md new file mode 100644 index 0000000000..f1cf571f4c --- /dev/null +++ b/samples/client/petstore/java/native-async/docs/ObjectWithDeprecatedFields.md @@ -0,0 +1,16 @@ + + +# ObjectWithDeprecatedFields + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**uuid** | **String** | | [optional] | +|**id** | **BigDecimal** | | [optional] | +|**deprecatedRef** | [**DeprecatedObject**](DeprecatedObject.md) | | [optional] | +|**bars** | **List<String>** | | [optional] | + + + diff --git a/samples/client/petstore/java/native-async/docs/OuterEnumDefaultValue.md b/samples/client/petstore/java/native-async/docs/OuterEnumDefaultValue.md new file mode 100644 index 0000000000..cbc7f4ba54 --- /dev/null +++ b/samples/client/petstore/java/native-async/docs/OuterEnumDefaultValue.md @@ -0,0 +1,15 @@ + + +# OuterEnumDefaultValue + +## Enum + + +* `PLACED` (value: `"placed"`) + +* `APPROVED` (value: `"approved"`) + +* `DELIVERED` (value: `"delivered"`) + + + diff --git a/samples/client/petstore/java/native-async/docs/OuterEnumInteger.md b/samples/client/petstore/java/native-async/docs/OuterEnumInteger.md new file mode 100644 index 0000000000..f71dea30ad --- /dev/null +++ b/samples/client/petstore/java/native-async/docs/OuterEnumInteger.md @@ -0,0 +1,15 @@ + + +# OuterEnumInteger + +## Enum + + +* `NUMBER_0` (value: `0`) + +* `NUMBER_1` (value: `1`) + +* `NUMBER_2` (value: `2`) + + + diff --git a/samples/client/petstore/java/native-async/docs/OuterEnumIntegerDefaultValue.md b/samples/client/petstore/java/native-async/docs/OuterEnumIntegerDefaultValue.md new file mode 100644 index 0000000000..99e6389f42 --- /dev/null +++ b/samples/client/petstore/java/native-async/docs/OuterEnumIntegerDefaultValue.md @@ -0,0 +1,15 @@ + + +# OuterEnumIntegerDefaultValue + +## Enum + + +* `NUMBER_0` (value: `0`) + +* `NUMBER_1` (value: `1`) + +* `NUMBER_2` (value: `2`) + + + diff --git a/samples/client/petstore/java/native-async/docs/OuterObjectWithEnumProperty.md b/samples/client/petstore/java/native-async/docs/OuterObjectWithEnumProperty.md new file mode 100644 index 0000000000..0fafaaa271 --- /dev/null +++ b/samples/client/petstore/java/native-async/docs/OuterObjectWithEnumProperty.md @@ -0,0 +1,13 @@ + + +# OuterObjectWithEnumProperty + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**value** | **OuterEnumInteger** | | | + + + diff --git a/samples/client/petstore/java/native-async/docs/PetApi.md b/samples/client/petstore/java/native-async/docs/PetApi.md index 5556437778..80ab2a56af 100644 --- a/samples/client/petstore/java/native-async/docs/PetApi.md +++ b/samples/client/petstore/java/native-async/docs/PetApi.md @@ -27,10 +27,12 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* ## addPet -> CompletableFuture addPet(body) +> CompletableFuture addPet(pet) Add a new pet to the store + + ### Example ```java @@ -53,9 +55,9 @@ public class Example { petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); PetApi apiInstance = new PetApi(defaultClient); - Pet body = new Pet(); // Pet | Pet object that needs to be added to the store + Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store try { - CompletableFuture result = apiInstance.addPet(body); + CompletableFuture result = apiInstance.addPet(pet); } catch (ApiException e) { System.err.println("Exception when calling PetApi#addPet"); System.err.println("Status code: " + e.getCode()); @@ -72,7 +74,7 @@ public class Example { | 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 @@ -91,15 +93,17 @@ CompletableFuture (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | successful operation | - | +| **200** | Successful operation | - | | **405** | Invalid input | - | ## addPetWithHttpInfo -> CompletableFuture> addPet addPetWithHttpInfo(body) +> CompletableFuture> addPet addPetWithHttpInfo(pet) Add a new pet to the store + + ### Example ```java @@ -123,9 +127,9 @@ public class Example { petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); PetApi apiInstance = new PetApi(defaultClient); - Pet body = new Pet(); // Pet | Pet object that needs to be added to the store + Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store try { - CompletableFuture> response = apiInstance.addPetWithHttpInfo(body); + CompletableFuture> response = apiInstance.addPetWithHttpInfo(pet); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); } catch (InterruptedException | ExecutionException e) { @@ -151,7 +155,7 @@ public class Example { | 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 @@ -170,7 +174,7 @@ CompletableFuture> ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | successful operation | - | +| **200** | Successful operation | - | | **405** | Invalid input | - | @@ -180,6 +184,8 @@ CompletableFuture> Deletes a pet + + ### Example ```java @@ -242,7 +248,7 @@ CompletableFuture (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | successful operation | - | +| **200** | Successful operation | - | | **400** | Invalid pet value | - | ## deletePetWithHttpInfo @@ -251,6 +257,8 @@ CompletableFuture (empty response body) Deletes a pet + + ### Example ```java @@ -323,7 +331,7 @@ CompletableFuture> ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | successful operation | - | +| **200** | Successful operation | - | | **400** | Invalid pet value | - | @@ -800,10 +808,12 @@ CompletableFuture> ## updatePet -> CompletableFuture updatePet(body) +> CompletableFuture updatePet(pet) Update an existing pet + + ### Example ```java @@ -826,9 +836,9 @@ public class Example { petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); PetApi apiInstance = new PetApi(defaultClient); - Pet body = new Pet(); // Pet | Pet object that needs to be added to the store + Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store try { - CompletableFuture result = apiInstance.updatePet(body); + CompletableFuture result = apiInstance.updatePet(pet); } catch (ApiException e) { System.err.println("Exception when calling PetApi#updatePet"); System.err.println("Status code: " + e.getCode()); @@ -845,7 +855,7 @@ public class Example { | 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 @@ -864,17 +874,19 @@ CompletableFuture (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | successful operation | - | +| **200** | Successful operation | - | | **400** | Invalid ID supplied | - | | **404** | Pet not found | - | | **405** | Validation exception | - | ## updatePetWithHttpInfo -> CompletableFuture> updatePet updatePetWithHttpInfo(body) +> CompletableFuture> updatePet updatePetWithHttpInfo(pet) Update an existing pet + + ### Example ```java @@ -898,9 +910,9 @@ public class Example { petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); PetApi apiInstance = new PetApi(defaultClient); - Pet body = new Pet(); // Pet | Pet object that needs to be added to the store + Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store try { - CompletableFuture> response = apiInstance.updatePetWithHttpInfo(body); + CompletableFuture> response = apiInstance.updatePetWithHttpInfo(pet); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); } catch (InterruptedException | ExecutionException e) { @@ -926,7 +938,7 @@ public class Example { | 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 @@ -945,7 +957,7 @@ CompletableFuture> ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | successful operation | - | +| **200** | Successful operation | - | | **400** | Invalid ID supplied | - | | **404** | Pet not found | - | | **405** | Validation exception | - | @@ -957,6 +969,8 @@ CompletableFuture> Updates a pet in the store with form data + + ### Example ```java @@ -1021,6 +1035,7 @@ CompletableFuture (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| +| **200** | Successful operation | - | | **405** | Invalid input | - | ## updatePetWithFormWithHttpInfo @@ -1029,6 +1044,8 @@ CompletableFuture (empty response body) Updates a pet in the store with form data + + ### Example ```java @@ -1103,6 +1120,7 @@ CompletableFuture> ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| +| **200** | Successful operation | - | | **405** | Invalid input | - | @@ -1112,6 +1130,8 @@ CompletableFuture> uploads an image + + ### Example ```java @@ -1185,6 +1205,8 @@ CompletableFuture<[**ModelApiResponse**](ModelApiResponse.md)> uploads an image + + ### Example ```java @@ -1269,6 +1291,8 @@ CompletableFuture> uploads an image (required) + + ### Example ```java @@ -1342,6 +1366,8 @@ CompletableFuture<[**ModelApiResponse**](ModelApiResponse.md)> uploads an image (required) + + ### Example ```java diff --git a/samples/client/petstore/java/native-async/docs/SingleRefType.md b/samples/client/petstore/java/native-async/docs/SingleRefType.md new file mode 100644 index 0000000000..cc269bb871 --- /dev/null +++ b/samples/client/petstore/java/native-async/docs/SingleRefType.md @@ -0,0 +1,13 @@ + + +# SingleRefType + +## Enum + + +* `ADMIN` (value: `"admin"`) + +* `USER` (value: `"user"`) + + + diff --git a/samples/client/petstore/java/native-async/docs/StoreApi.md b/samples/client/petstore/java/native-async/docs/StoreApi.md index 13a27f70bd..1321b7fa46 100644 --- a/samples/client/petstore/java/native-async/docs/StoreApi.md +++ b/samples/client/petstore/java/native-async/docs/StoreApi.md @@ -456,10 +456,12 @@ No authorization required ## placeOrder -> CompletableFuture placeOrder(body) +> CompletableFuture placeOrder(order) Place an order for a pet + + ### Example ```java @@ -477,9 +479,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); StoreApi apiInstance = new StoreApi(defaultClient); - Order body = new Order(); // Order | order placed for purchasing the pet + Order order = new Order(); // Order | order placed for purchasing the pet try { - CompletableFuture result = apiInstance.placeOrder(body); + CompletableFuture result = apiInstance.placeOrder(order); System.out.println(result.get()); } catch (ApiException e) { System.err.println("Exception when calling StoreApi#placeOrder"); @@ -497,7 +499,7 @@ public class Example { | 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 @@ -510,7 +512,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: application/xml, application/json ### HTTP response details @@ -521,10 +523,12 @@ No authorization required ## placeOrderWithHttpInfo -> CompletableFuture> placeOrder placeOrderWithHttpInfo(body) +> CompletableFuture> placeOrder placeOrderWithHttpInfo(order) Place an order for a pet + + ### Example ```java @@ -543,9 +547,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); StoreApi apiInstance = new StoreApi(defaultClient); - Order body = new Order(); // Order | order placed for purchasing the pet + Order order = new Order(); // Order | order placed for purchasing the pet try { - CompletableFuture> response = apiInstance.placeOrderWithHttpInfo(body); + CompletableFuture> response = apiInstance.placeOrderWithHttpInfo(order); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); System.out.println("Response body: " + response.get().getData()); @@ -572,7 +576,7 @@ public class Example { | 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 @@ -585,7 +589,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: application/xml, application/json ### HTTP response details diff --git a/samples/client/petstore/java/native-async/docs/UserApi.md b/samples/client/petstore/java/native-async/docs/UserApi.md index ce9d1a23f4..2c5247bdbd 100644 --- a/samples/client/petstore/java/native-async/docs/UserApi.md +++ b/samples/client/petstore/java/native-async/docs/UserApi.md @@ -25,7 +25,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* ## createUser -> CompletableFuture createUser(body) +> CompletableFuture createUser(user) Create user @@ -48,9 +48,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); UserApi apiInstance = new UserApi(defaultClient); - User body = new User(); // User | Created user object + User user = new User(); // User | Created user object try { - CompletableFuture result = apiInstance.createUser(body); + CompletableFuture result = apiInstance.createUser(user); } catch (ApiException e) { System.err.println("Exception when calling UserApi#createUser"); System.err.println("Status code: " + e.getCode()); @@ -67,7 +67,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**User**](User.md)| Created user object | | +| **user** | [**User**](User.md)| Created user object | | ### Return type @@ -80,7 +80,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: Not defined ### HTTP response details @@ -90,7 +90,7 @@ No authorization required ## createUserWithHttpInfo -> CompletableFuture> createUser createUserWithHttpInfo(body) +> CompletableFuture> createUser createUserWithHttpInfo(user) Create user @@ -114,9 +114,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); UserApi apiInstance = new UserApi(defaultClient); - User body = new User(); // User | Created user object + User user = new User(); // User | Created user object try { - CompletableFuture> response = apiInstance.createUserWithHttpInfo(body); + CompletableFuture> response = apiInstance.createUserWithHttpInfo(user); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); } catch (InterruptedException | ExecutionException e) { @@ -142,7 +142,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**User**](User.md)| Created user object | | +| **user** | [**User**](User.md)| Created user object | | ### Return type @@ -155,7 +155,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: Not defined ### HTTP response details @@ -166,10 +166,12 @@ No authorization required ## createUsersWithArrayInput -> CompletableFuture createUsersWithArrayInput(body) +> CompletableFuture createUsersWithArrayInput(user) Creates list of users with given input array + + ### Example ```java @@ -187,9 +189,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); UserApi apiInstance = new UserApi(defaultClient); - List body = Arrays.asList(); // List | List of user object + List user = Arrays.asList(); // List | List of user object try { - CompletableFuture result = apiInstance.createUsersWithArrayInput(body); + CompletableFuture result = apiInstance.createUsersWithArrayInput(user); } catch (ApiException e) { System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); System.err.println("Status code: " + e.getCode()); @@ -206,7 +208,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**List<User>**](User.md)| List of user object | | +| **user** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -219,7 +221,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: Not defined ### HTTP response details @@ -229,10 +231,12 @@ No authorization required ## createUsersWithArrayInputWithHttpInfo -> CompletableFuture> createUsersWithArrayInput createUsersWithArrayInputWithHttpInfo(body) +> CompletableFuture> createUsersWithArrayInput createUsersWithArrayInputWithHttpInfo(user) Creates list of users with given input array + + ### Example ```java @@ -251,9 +255,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); UserApi apiInstance = new UserApi(defaultClient); - List body = Arrays.asList(); // List | List of user object + List user = Arrays.asList(); // List | List of user object try { - CompletableFuture> response = apiInstance.createUsersWithArrayInputWithHttpInfo(body); + CompletableFuture> response = apiInstance.createUsersWithArrayInputWithHttpInfo(user); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); } catch (InterruptedException | ExecutionException e) { @@ -279,7 +283,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**List<User>**](User.md)| List of user object | | +| **user** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -292,7 +296,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: Not defined ### HTTP response details @@ -303,10 +307,12 @@ No authorization required ## createUsersWithListInput -> CompletableFuture createUsersWithListInput(body) +> CompletableFuture createUsersWithListInput(user) Creates list of users with given input array + + ### Example ```java @@ -324,9 +330,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); UserApi apiInstance = new UserApi(defaultClient); - List body = Arrays.asList(); // List | List of user object + List user = Arrays.asList(); // List | List of user object try { - CompletableFuture result = apiInstance.createUsersWithListInput(body); + CompletableFuture result = apiInstance.createUsersWithListInput(user); } catch (ApiException e) { System.err.println("Exception when calling UserApi#createUsersWithListInput"); System.err.println("Status code: " + e.getCode()); @@ -343,7 +349,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**List<User>**](User.md)| List of user object | | +| **user** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -356,7 +362,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: Not defined ### HTTP response details @@ -366,10 +372,12 @@ No authorization required ## createUsersWithListInputWithHttpInfo -> CompletableFuture> createUsersWithListInput createUsersWithListInputWithHttpInfo(body) +> CompletableFuture> createUsersWithListInput createUsersWithListInputWithHttpInfo(user) Creates list of users with given input array + + ### Example ```java @@ -388,9 +396,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); UserApi apiInstance = new UserApi(defaultClient); - List body = Arrays.asList(); // List | List of user object + List user = Arrays.asList(); // List | List of user object try { - CompletableFuture> response = apiInstance.createUsersWithListInputWithHttpInfo(body); + CompletableFuture> response = apiInstance.createUsersWithListInputWithHttpInfo(user); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); } catch (InterruptedException | ExecutionException e) { @@ -416,7 +424,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**List<User>**](User.md)| List of user object | | +| **user** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -429,7 +437,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: Not defined ### HTTP response details @@ -587,6 +595,8 @@ No authorization required Get user by user name + + ### Example ```java @@ -653,6 +663,8 @@ No authorization required Get user by user name + + ### Example ```java @@ -730,6 +742,8 @@ No authorization required Logs user into the system + + ### Example ```java @@ -797,6 +811,8 @@ No authorization required Logs user into the system + + ### Example ```java @@ -875,6 +891,8 @@ No authorization required Logs out current logged in user session + + ### Example ```java @@ -934,6 +952,8 @@ No authorization required Logs out current logged in user session + + ### Example ```java @@ -1000,7 +1020,7 @@ No authorization required ## updateUser -> CompletableFuture updateUser(username, body) +> CompletableFuture updateUser(username, user) Updated user @@ -1024,9 +1044,9 @@ public class Example { UserApi apiInstance = new UserApi(defaultClient); String username = "username_example"; // String | name that need to be deleted - User body = new User(); // User | Updated user object + User user = new User(); // User | Updated user object try { - CompletableFuture result = apiInstance.updateUser(username, body); + CompletableFuture result = apiInstance.updateUser(username, user); } catch (ApiException e) { System.err.println("Exception when calling UserApi#updateUser"); System.err.println("Status code: " + e.getCode()); @@ -1044,7 +1064,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **username** | **String**| name that need to be deleted | | -| **body** | [**User**](User.md)| Updated user object | | +| **user** | [**User**](User.md)| Updated user object | | ### Return type @@ -1057,7 +1077,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: Not defined ### HTTP response details @@ -1068,7 +1088,7 @@ No authorization required ## updateUserWithHttpInfo -> CompletableFuture> updateUser updateUserWithHttpInfo(username, body) +> CompletableFuture> updateUser updateUserWithHttpInfo(username, user) Updated user @@ -1093,9 +1113,9 @@ public class Example { UserApi apiInstance = new UserApi(defaultClient); String username = "username_example"; // String | name that need to be deleted - User body = new User(); // User | Updated user object + User user = new User(); // User | Updated user object try { - CompletableFuture> response = apiInstance.updateUserWithHttpInfo(username, body); + CompletableFuture> response = apiInstance.updateUserWithHttpInfo(username, user); System.out.println("Status code: " + response.get().getStatusCode()); System.out.println("Response headers: " + response.get().getHeaders()); } catch (InterruptedException | ExecutionException e) { @@ -1122,7 +1142,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **username** | **String**| name that need to be deleted | | -| **body** | [**User**](User.md)| Updated user object | | +| **user** | [**User**](User.md)| Updated user object | | ### Return type @@ -1135,7 +1155,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: Not defined ### HTTP response details diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index 729e87bdcb..b8d35b69e5 100644 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -78,13 +78,13 @@ public class AnotherFakeApi { /** * To test special tags * To test special tags and operation ID starting with number - * @param body client model (required) + * @param client client model (required) * @return CompletableFuture<Client> * @throws ApiException if fails to make API call */ - public CompletableFuture call123testSpecialTags(Client body) throws ApiException { + public CompletableFuture call123testSpecialTags(Client client) throws ApiException { try { - HttpRequest.Builder localVarRequestBuilder = call123testSpecialTagsRequestBuilder(body); + HttpRequest.Builder localVarRequestBuilder = call123testSpecialTagsRequestBuilder(client); return memberVarHttpClient.sendAsync( localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> { @@ -109,13 +109,13 @@ public class AnotherFakeApi { /** * To test special tags * To test special tags and operation ID starting with number - * @param body client model (required) + * @param client client model (required) * @return CompletableFuture<ApiResponse<Client>> * @throws ApiException if fails to make API call */ - public CompletableFuture> call123testSpecialTagsWithHttpInfo(Client body) throws ApiException { + public CompletableFuture> call123testSpecialTagsWithHttpInfo(Client client) throws ApiException { try { - HttpRequest.Builder localVarRequestBuilder = call123testSpecialTagsRequestBuilder(body); + HttpRequest.Builder localVarRequestBuilder = call123testSpecialTagsRequestBuilder(client); return memberVarHttpClient.sendAsync( localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> { @@ -144,10 +144,10 @@ public class AnotherFakeApi { } } - private HttpRequest.Builder call123testSpecialTagsRequestBuilder(Client body) throws ApiException { - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling call123testSpecialTags"); + private HttpRequest.Builder call123testSpecialTagsRequestBuilder(Client client) throws ApiException { + // verify the required parameter 'client' is set + if (client == null) { + throw new ApiException(400, "Missing the required parameter 'client' when calling call123testSpecialTags"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -160,7 +160,7 @@ public class AnotherFakeApi { localVarRequestBuilder.header("Accept", "application/json"); try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(client); localVarRequestBuilder.method("PATCH", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { throw new ApiException(e); diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/DefaultApi.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/DefaultApi.java new file mode 100644 index 0000000000..e7010b99e8 --- /dev/null +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/DefaultApi.java @@ -0,0 +1,164 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package org.openapitools.client.api; + +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.ApiResponse; +import org.openapitools.client.Pair; + +import org.openapitools.client.model.FooGetDefaultResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.IOException; +import java.io.InputStream; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +import java.util.concurrent.CompletableFuture; + +@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DefaultApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public DefaultApi() { + this(new ApiClient()); + } + + public DefaultApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + private ApiException getApiException(String operationId, HttpResponse response) { + String message = formatExceptionMessage(operationId, response.statusCode(), response.body()); + return new ApiException(response.statusCode(), message, response.headers(), response.body()); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * + * + * @return CompletableFuture<FooGetDefaultResponse> + * @throws ApiException if fails to make API call + */ + public CompletableFuture fooGet() throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = fooGetRequestBuilder(); + return memberVarHttpClient.sendAsync( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> { + if (localVarResponse.statusCode()/ 100 != 2) { + return CompletableFuture.failedFuture(getApiException("fooGet", localVarResponse)); + } + try { + String responseBody = localVarResponse.body(); + return CompletableFuture.completedFuture( + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } + catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + /** + * + * + * @return CompletableFuture<ApiResponse<FooGetDefaultResponse>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> fooGetWithHttpInfo() throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = fooGetRequestBuilder(); + return memberVarHttpClient.sendAsync( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> { + if (memberVarAsyncResponseInterceptor != null) { + memberVarAsyncResponseInterceptor.accept(localVarResponse); + } + if (localVarResponse.statusCode()/ 100 != 2) { + return CompletableFuture.failedFuture(getApiException("fooGet", localVarResponse)); + } + try { + String responseBody = localVarResponse.body(); + return CompletableFuture.completedFuture( + new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {})) + ); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + } + ); + } + catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder fooGetRequestBuilder() throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/foo"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/FakeApi.java index 80be8d99f2..2a09b2f3fe 100644 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/FakeApi.java @@ -19,13 +19,16 @@ import org.openapitools.client.Pair; import java.math.BigDecimal; import org.openapitools.client.model.Client; +import org.openapitools.client.model.EnumClass; import java.io.File; import org.openapitools.client.model.FileSchemaTestClass; +import org.openapitools.client.model.HealthCheckResult; import java.time.LocalDate; import java.time.OffsetDateTime; import org.openapitools.client.model.OuterComposite; +import org.openapitools.client.model.OuterObjectWithEnumProperty; +import org.openapitools.client.model.Pet; import org.openapitools.client.model.User; -import org.openapitools.client.model.XmlItem; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; @@ -84,20 +87,108 @@ public class FakeApi { } /** - * creates an XmlItem - * this route creates an XmlItem - * @param xmlItem XmlItem Body (required) - * @return CompletableFuture<Void> + * Health check endpoint + * + * @return CompletableFuture<HealthCheckResult> * @throws ApiException if fails to make API call */ - public CompletableFuture createXmlItem(XmlItem xmlItem) throws ApiException { + public CompletableFuture fakeHealthGet() throws ApiException { try { - HttpRequest.Builder localVarRequestBuilder = createXmlItemRequestBuilder(xmlItem); + HttpRequest.Builder localVarRequestBuilder = fakeHealthGetRequestBuilder(); return memberVarHttpClient.sendAsync( localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> { if (localVarResponse.statusCode()/ 100 != 2) { - return CompletableFuture.failedFuture(getApiException("createXmlItem", localVarResponse)); + return CompletableFuture.failedFuture(getApiException("fakeHealthGet", localVarResponse)); + } + try { + String responseBody = localVarResponse.body(); + return CompletableFuture.completedFuture( + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } + catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + /** + * Health check endpoint + * + * @return CompletableFuture<ApiResponse<HealthCheckResult>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> fakeHealthGetWithHttpInfo() throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = fakeHealthGetRequestBuilder(); + return memberVarHttpClient.sendAsync( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> { + if (memberVarAsyncResponseInterceptor != null) { + memberVarAsyncResponseInterceptor.accept(localVarResponse); + } + if (localVarResponse.statusCode()/ 100 != 2) { + return CompletableFuture.failedFuture(getApiException("fakeHealthGet", localVarResponse)); + } + try { + String responseBody = localVarResponse.body(); + return CompletableFuture.completedFuture( + new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {})) + ); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + } + ); + } + catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder fakeHealthGetRequestBuilder() throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/fake/health"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** + * test http signature authentication + * + * @param pet Pet object that needs to be added to the store (required) + * @param query1 query parameter (optional) + * @param header1 header parameter (optional) + * @return CompletableFuture<Void> + * @throws ApiException if fails to make API call + */ + public CompletableFuture fakeHttpSignatureTest(Pet pet, String query1, String header1) throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = fakeHttpSignatureTestRequestBuilder(pet, query1, header1); + return memberVarHttpClient.sendAsync( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> { + if (localVarResponse.statusCode()/ 100 != 2) { + return CompletableFuture.failedFuture(getApiException("fakeHttpSignatureTest", localVarResponse)); } return CompletableFuture.completedFuture(null); }); @@ -108,15 +199,17 @@ public class FakeApi { } /** - * creates an XmlItem - * this route creates an XmlItem - * @param xmlItem XmlItem Body (required) + * test http signature authentication + * + * @param pet Pet object that needs to be added to the store (required) + * @param query1 query parameter (optional) + * @param header1 header parameter (optional) * @return CompletableFuture<ApiResponse<Void>> * @throws ApiException if fails to make API call */ - public CompletableFuture> createXmlItemWithHttpInfo(XmlItem xmlItem) throws ApiException { + public CompletableFuture> fakeHttpSignatureTestWithHttpInfo(Pet pet, String query1, String header1) throws ApiException { try { - HttpRequest.Builder localVarRequestBuilder = createXmlItemRequestBuilder(xmlItem); + HttpRequest.Builder localVarRequestBuilder = fakeHttpSignatureTestRequestBuilder(pet, query1, header1); return memberVarHttpClient.sendAsync( localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> { @@ -124,7 +217,7 @@ public class FakeApi { memberVarAsyncResponseInterceptor.accept(localVarResponse); } if (localVarResponse.statusCode()/ 100 != 2) { - return CompletableFuture.failedFuture(getApiException("createXmlItem", localVarResponse)); + return CompletableFuture.failedFuture(getApiException("fakeHttpSignatureTest", localVarResponse)); } return CompletableFuture.completedFuture( new ApiResponse(localVarResponse.statusCode(), localVarResponse.headers().map(), null) @@ -137,24 +230,36 @@ public class FakeApi { } } - private HttpRequest.Builder createXmlItemRequestBuilder(XmlItem xmlItem) throws ApiException { - // verify the required parameter 'xmlItem' is set - if (xmlItem == null) { - throw new ApiException(400, "Missing the required parameter 'xmlItem' when calling createXmlItem"); + private HttpRequest.Builder fakeHttpSignatureTestRequestBuilder(Pet pet, String query1, String header1) throws ApiException { + // verify the required parameter 'pet' is set + if (pet == null) { + throw new ApiException(400, "Missing the required parameter 'pet' when calling fakeHttpSignatureTest"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/fake/create_xml_item"; + String localVarPath = "/fake/http-signature-test"; - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + List localVarQueryParams = new ArrayList<>(); + localVarQueryParams.addAll(ApiClient.parameterToPairs("query_1", query1)); - localVarRequestBuilder.header("Content-Type", "application/xml"); + if (!localVarQueryParams.isEmpty()) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + if (header1 != null) { + localVarRequestBuilder.header("header_1", header1.toString()); + } + localVarRequestBuilder.header("Content-Type", "application/json"); localVarRequestBuilder.header("Accept", "application/json"); try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(xmlItem); - localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(pet); + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { throw new ApiException(e); } @@ -263,13 +368,13 @@ public class FakeApi { /** * * Test serialization of object with outer number type - * @param body Input composite as post body (optional) + * @param outerComposite Input composite as post body (optional) * @return CompletableFuture<OuterComposite> * @throws ApiException if fails to make API call */ - public CompletableFuture fakeOuterCompositeSerialize(OuterComposite body) throws ApiException { + public CompletableFuture fakeOuterCompositeSerialize(OuterComposite outerComposite) throws ApiException { try { - HttpRequest.Builder localVarRequestBuilder = fakeOuterCompositeSerializeRequestBuilder(body); + HttpRequest.Builder localVarRequestBuilder = fakeOuterCompositeSerializeRequestBuilder(outerComposite); return memberVarHttpClient.sendAsync( localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> { @@ -294,13 +399,13 @@ public class FakeApi { /** * * Test serialization of object with outer number type - * @param body Input composite as post body (optional) + * @param outerComposite Input composite as post body (optional) * @return CompletableFuture<ApiResponse<OuterComposite>> * @throws ApiException if fails to make API call */ - public CompletableFuture> fakeOuterCompositeSerializeWithHttpInfo(OuterComposite body) throws ApiException { + public CompletableFuture> fakeOuterCompositeSerializeWithHttpInfo(OuterComposite outerComposite) throws ApiException { try { - HttpRequest.Builder localVarRequestBuilder = fakeOuterCompositeSerializeRequestBuilder(body); + HttpRequest.Builder localVarRequestBuilder = fakeOuterCompositeSerializeRequestBuilder(outerComposite); return memberVarHttpClient.sendAsync( localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> { @@ -329,7 +434,7 @@ public class FakeApi { } } - private HttpRequest.Builder fakeOuterCompositeSerializeRequestBuilder(OuterComposite body) throws ApiException { + private HttpRequest.Builder fakeOuterCompositeSerializeRequestBuilder(OuterComposite outerComposite) throws ApiException { HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -341,7 +446,7 @@ public class FakeApi { localVarRequestBuilder.header("Accept", "*/*"); try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(outerComposite); localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { throw new ApiException(e); @@ -539,19 +644,117 @@ public class FakeApi { } /** * - * For this test, the body for this request much reference a schema named `File`. - * @param body (required) - * @return CompletableFuture<Void> + * Test serialization of enum (int) properties with examples + * @param outerObjectWithEnumProperty Input enum (int) as post body (required) + * @return CompletableFuture<OuterObjectWithEnumProperty> * @throws ApiException if fails to make API call */ - public CompletableFuture testBodyWithFileSchema(FileSchemaTestClass body) throws ApiException { + public CompletableFuture fakePropertyEnumIntegerSerialize(OuterObjectWithEnumProperty outerObjectWithEnumProperty) throws ApiException { try { - HttpRequest.Builder localVarRequestBuilder = testBodyWithFileSchemaRequestBuilder(body); + HttpRequest.Builder localVarRequestBuilder = fakePropertyEnumIntegerSerializeRequestBuilder(outerObjectWithEnumProperty); return memberVarHttpClient.sendAsync( localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> { if (localVarResponse.statusCode()/ 100 != 2) { - return CompletableFuture.failedFuture(getApiException("testBodyWithFileSchema", localVarResponse)); + return CompletableFuture.failedFuture(getApiException("fakePropertyEnumIntegerSerialize", localVarResponse)); + } + try { + String responseBody = localVarResponse.body(); + return CompletableFuture.completedFuture( + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) + ); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + }); + } + catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + /** + * + * Test serialization of enum (int) properties with examples + * @param outerObjectWithEnumProperty Input enum (int) as post body (required) + * @return CompletableFuture<ApiResponse<OuterObjectWithEnumProperty>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> fakePropertyEnumIntegerSerializeWithHttpInfo(OuterObjectWithEnumProperty outerObjectWithEnumProperty) throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = fakePropertyEnumIntegerSerializeRequestBuilder(outerObjectWithEnumProperty); + return memberVarHttpClient.sendAsync( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> { + if (memberVarAsyncResponseInterceptor != null) { + memberVarAsyncResponseInterceptor.accept(localVarResponse); + } + if (localVarResponse.statusCode()/ 100 != 2) { + return CompletableFuture.failedFuture(getApiException("fakePropertyEnumIntegerSerialize", localVarResponse)); + } + try { + String responseBody = localVarResponse.body(); + return CompletableFuture.completedFuture( + new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody == null || responseBody.isBlank() ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {})) + ); + } catch (IOException e) { + return CompletableFuture.failedFuture(new ApiException(e)); + } + } + ); + } + catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder fakePropertyEnumIntegerSerializeRequestBuilder(OuterObjectWithEnumProperty outerObjectWithEnumProperty) throws ApiException { + // verify the required parameter 'outerObjectWithEnumProperty' is set + if (outerObjectWithEnumProperty == null) { + throw new ApiException(400, "Missing the required parameter 'outerObjectWithEnumProperty' when calling fakePropertyEnumIntegerSerialize"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/fake/property/enum-int"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "*/*"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(outerObjectWithEnumProperty); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** + * + * For this test, the body has to be a binary file. + * @param body image to upload (required) + * @return CompletableFuture<Void> + * @throws ApiException if fails to make API call + */ + public CompletableFuture testBodyWithBinary(File body) throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = testBodyWithBinaryRequestBuilder(body); + return memberVarHttpClient.sendAsync( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> { + if (localVarResponse.statusCode()/ 100 != 2) { + return CompletableFuture.failedFuture(getApiException("testBodyWithBinary", localVarResponse)); } return CompletableFuture.completedFuture(null); }); @@ -563,14 +766,14 @@ public class FakeApi { /** * - * For this test, the body for this request much reference a schema named `File`. - * @param body (required) + * For this test, the body has to be a binary file. + * @param body image to upload (required) * @return CompletableFuture<ApiResponse<Void>> * @throws ApiException if fails to make API call */ - public CompletableFuture> testBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass body) throws ApiException { + public CompletableFuture> testBodyWithBinaryWithHttpInfo(File body) throws ApiException { try { - HttpRequest.Builder localVarRequestBuilder = testBodyWithFileSchemaRequestBuilder(body); + HttpRequest.Builder localVarRequestBuilder = testBodyWithBinaryRequestBuilder(body); return memberVarHttpClient.sendAsync( localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> { @@ -578,7 +781,7 @@ public class FakeApi { memberVarAsyncResponseInterceptor.accept(localVarResponse); } if (localVarResponse.statusCode()/ 100 != 2) { - return CompletableFuture.failedFuture(getApiException("testBodyWithFileSchema", localVarResponse)); + return CompletableFuture.failedFuture(getApiException("testBodyWithBinary", localVarResponse)); } return CompletableFuture.completedFuture( new ApiResponse(localVarResponse.statusCode(), localVarResponse.headers().map(), null) @@ -591,19 +794,19 @@ public class FakeApi { } } - private HttpRequest.Builder testBodyWithFileSchemaRequestBuilder(FileSchemaTestClass body) throws ApiException { + private HttpRequest.Builder testBodyWithBinaryRequestBuilder(File body) throws ApiException { // verify the required parameter 'body' is set if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling testBodyWithFileSchema"); + throw new ApiException(400, "Missing the required parameter 'body' when calling testBodyWithBinary"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/fake/body-with-file-schema"; + String localVarPath = "/fake/body-with-binary"; localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); - localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Content-Type", "image/png"); localVarRequestBuilder.header("Accept", "application/json"); try { @@ -622,15 +825,98 @@ public class FakeApi { } /** * - * - * @param query (required) - * @param body (required) + * For this test, the body for this request must reference a schema named `File`. + * @param fileSchemaTestClass (required) * @return CompletableFuture<Void> * @throws ApiException if fails to make API call */ - public CompletableFuture testBodyWithQueryParams(String query, User body) throws ApiException { + public CompletableFuture testBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass) throws ApiException { try { - HttpRequest.Builder localVarRequestBuilder = testBodyWithQueryParamsRequestBuilder(query, body); + HttpRequest.Builder localVarRequestBuilder = testBodyWithFileSchemaRequestBuilder(fileSchemaTestClass); + return memberVarHttpClient.sendAsync( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> { + if (localVarResponse.statusCode()/ 100 != 2) { + return CompletableFuture.failedFuture(getApiException("testBodyWithFileSchema", localVarResponse)); + } + return CompletableFuture.completedFuture(null); + }); + } + catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + /** + * + * For this test, the body for this request must reference a schema named `File`. + * @param fileSchemaTestClass (required) + * @return CompletableFuture<ApiResponse<Void>> + * @throws ApiException if fails to make API call + */ + public CompletableFuture> testBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass fileSchemaTestClass) throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = testBodyWithFileSchemaRequestBuilder(fileSchemaTestClass); + return memberVarHttpClient.sendAsync( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> { + if (memberVarAsyncResponseInterceptor != null) { + memberVarAsyncResponseInterceptor.accept(localVarResponse); + } + if (localVarResponse.statusCode()/ 100 != 2) { + return CompletableFuture.failedFuture(getApiException("testBodyWithFileSchema", localVarResponse)); + } + return CompletableFuture.completedFuture( + new ApiResponse(localVarResponse.statusCode(), localVarResponse.headers().map(), null) + ); + } + ); + } + catch (ApiException e) { + return CompletableFuture.failedFuture(e); + } + } + + private HttpRequest.Builder testBodyWithFileSchemaRequestBuilder(FileSchemaTestClass fileSchemaTestClass) throws ApiException { + // verify the required parameter 'fileSchemaTestClass' is set + if (fileSchemaTestClass == null) { + throw new ApiException(400, "Missing the required parameter 'fileSchemaTestClass' when calling testBodyWithFileSchema"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/fake/body-with-file-schema"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(fileSchemaTestClass); + localVarRequestBuilder.method("PUT", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** + * + * + * @param query (required) + * @param user (required) + * @return CompletableFuture<Void> + * @throws ApiException if fails to make API call + */ + public CompletableFuture testBodyWithQueryParams(String query, User user) throws ApiException { + try { + HttpRequest.Builder localVarRequestBuilder = testBodyWithQueryParamsRequestBuilder(query, user); return memberVarHttpClient.sendAsync( localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> { @@ -649,13 +935,13 @@ public class FakeApi { * * * @param query (required) - * @param body (required) + * @param user (required) * @return CompletableFuture<ApiResponse<Void>> * @throws ApiException if fails to make API call */ - public CompletableFuture> testBodyWithQueryParamsWithHttpInfo(String query, User body) throws ApiException { + public CompletableFuture> testBodyWithQueryParamsWithHttpInfo(String query, User user) throws ApiException { try { - HttpRequest.Builder localVarRequestBuilder = testBodyWithQueryParamsRequestBuilder(query, body); + HttpRequest.Builder localVarRequestBuilder = testBodyWithQueryParamsRequestBuilder(query, user); return memberVarHttpClient.sendAsync( localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> { @@ -676,14 +962,14 @@ public class FakeApi { } } - private HttpRequest.Builder testBodyWithQueryParamsRequestBuilder(String query, User body) throws ApiException { + private HttpRequest.Builder testBodyWithQueryParamsRequestBuilder(String query, User user) throws ApiException { // verify the required parameter 'query' is set if (query == null) { throw new ApiException(400, "Missing the required parameter 'query' when calling testBodyWithQueryParams"); } - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling testBodyWithQueryParams"); + // verify the required parameter 'user' is set + if (user == null) { + throw new ApiException(400, "Missing the required parameter 'user' when calling testBodyWithQueryParams"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -705,7 +991,7 @@ public class FakeApi { localVarRequestBuilder.header("Accept", "application/json"); try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(user); localVarRequestBuilder.method("PUT", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { throw new ApiException(e); @@ -721,13 +1007,13 @@ public class FakeApi { /** * To test \"client\" model * To test \"client\" model - * @param body client model (required) + * @param client client model (required) * @return CompletableFuture<Client> * @throws ApiException if fails to make API call */ - public CompletableFuture testClientModel(Client body) throws ApiException { + public CompletableFuture testClientModel(Client client) throws ApiException { try { - HttpRequest.Builder localVarRequestBuilder = testClientModelRequestBuilder(body); + HttpRequest.Builder localVarRequestBuilder = testClientModelRequestBuilder(client); return memberVarHttpClient.sendAsync( localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> { @@ -752,13 +1038,13 @@ public class FakeApi { /** * To test \"client\" model * To test \"client\" model - * @param body client model (required) + * @param client client model (required) * @return CompletableFuture<ApiResponse<Client>> * @throws ApiException if fails to make API call */ - public CompletableFuture> testClientModelWithHttpInfo(Client body) throws ApiException { + public CompletableFuture> testClientModelWithHttpInfo(Client client) throws ApiException { try { - HttpRequest.Builder localVarRequestBuilder = testClientModelRequestBuilder(body); + HttpRequest.Builder localVarRequestBuilder = testClientModelRequestBuilder(client); return memberVarHttpClient.sendAsync( localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> { @@ -787,10 +1073,10 @@ public class FakeApi { } } - private HttpRequest.Builder testClientModelRequestBuilder(Client body) throws ApiException { - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling testClientModel"); + private HttpRequest.Builder testClientModelRequestBuilder(Client client) throws ApiException { + // verify the required parameter 'client' is set + if (client == null) { + throw new ApiException(400, "Missing the required parameter 'client' when calling testClientModel"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -803,7 +1089,7 @@ public class FakeApi { localVarRequestBuilder.header("Accept", "application/json"); try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(client); localVarRequestBuilder.method("PATCH", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { throw new ApiException(e); @@ -817,8 +1103,8 @@ public class FakeApi { return localVarRequestBuilder; } /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * @param number None (required) * @param _double None (required) * @param patternWithoutDelimiter None (required) @@ -854,8 +1140,8 @@ public class 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 假端點 偽のエンドポイント 가짜 엔드 포인트 * @param number None (required) * @param _double None (required) * @param patternWithoutDelimiter None (required) @@ -940,14 +1226,15 @@ public class FakeApi { * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) + * @param enumQueryModelArray (optional * @param enumFormStringArray Form parameter enum test (string array) (optional * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @return CompletableFuture<Void> * @throws ApiException if fails to make API call */ - public CompletableFuture testEnumParameters(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString) throws ApiException { + public CompletableFuture testEnumParameters(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumQueryModelArray, List enumFormStringArray, String enumFormString) throws ApiException { try { - HttpRequest.Builder localVarRequestBuilder = testEnumParametersRequestBuilder(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + HttpRequest.Builder localVarRequestBuilder = testEnumParametersRequestBuilder(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString); return memberVarHttpClient.sendAsync( localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> { @@ -971,14 +1258,15 @@ public class FakeApi { * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) + * @param enumQueryModelArray (optional * @param enumFormStringArray Form parameter enum test (string array) (optional * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @return CompletableFuture<ApiResponse<Void>> * @throws ApiException if fails to make API call */ - public CompletableFuture> testEnumParametersWithHttpInfo(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString) throws ApiException { + public CompletableFuture> testEnumParametersWithHttpInfo(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumQueryModelArray, List enumFormStringArray, String enumFormString) throws ApiException { try { - HttpRequest.Builder localVarRequestBuilder = testEnumParametersRequestBuilder(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + HttpRequest.Builder localVarRequestBuilder = testEnumParametersRequestBuilder(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString); return memberVarHttpClient.sendAsync( localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> { @@ -999,17 +1287,18 @@ public class FakeApi { } } - private HttpRequest.Builder testEnumParametersRequestBuilder(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString) throws ApiException { + private HttpRequest.Builder testEnumParametersRequestBuilder(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumQueryModelArray, List enumFormStringArray, String enumFormString) throws ApiException { HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); String localVarPath = "/fake"; List localVarQueryParams = new ArrayList<>(); - localVarQueryParams.addAll(ApiClient.parameterToPairs("csv", "enum_query_string_array", enumQueryStringArray)); + localVarQueryParams.addAll(ApiClient.parameterToPairs("multi", "enum_query_string_array", enumQueryStringArray)); localVarQueryParams.addAll(ApiClient.parameterToPairs("enum_query_string", enumQueryString)); localVarQueryParams.addAll(ApiClient.parameterToPairs("enum_query_integer", enumQueryInteger)); localVarQueryParams.addAll(ApiClient.parameterToPairs("enum_query_double", enumQueryDouble)); + localVarQueryParams.addAll(ApiClient.parameterToPairs("multi", "enum_query_model_array", enumQueryModelArray)); if (!localVarQueryParams.isEmpty()) { StringJoiner queryJoiner = new StringJoiner("&"); @@ -1263,13 +1552,13 @@ public class FakeApi { /** * test inline additionalProperties * - * @param param request body (required) + * @param requestBody request body (required) * @return CompletableFuture<Void> * @throws ApiException if fails to make API call */ - public CompletableFuture testInlineAdditionalProperties(Map param) throws ApiException { + public CompletableFuture testInlineAdditionalProperties(Map requestBody) throws ApiException { try { - HttpRequest.Builder localVarRequestBuilder = testInlineAdditionalPropertiesRequestBuilder(param); + HttpRequest.Builder localVarRequestBuilder = testInlineAdditionalPropertiesRequestBuilder(requestBody); return memberVarHttpClient.sendAsync( localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> { @@ -1287,13 +1576,13 @@ public class FakeApi { /** * test inline additionalProperties * - * @param param request body (required) + * @param requestBody request body (required) * @return CompletableFuture<ApiResponse<Void>> * @throws ApiException if fails to make API call */ - public CompletableFuture> testInlineAdditionalPropertiesWithHttpInfo(Map param) throws ApiException { + public CompletableFuture> testInlineAdditionalPropertiesWithHttpInfo(Map requestBody) throws ApiException { try { - HttpRequest.Builder localVarRequestBuilder = testInlineAdditionalPropertiesRequestBuilder(param); + HttpRequest.Builder localVarRequestBuilder = testInlineAdditionalPropertiesRequestBuilder(requestBody); return memberVarHttpClient.sendAsync( localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> { @@ -1314,10 +1603,10 @@ public class FakeApi { } } - private HttpRequest.Builder testInlineAdditionalPropertiesRequestBuilder(Map param) throws ApiException { - // verify the required parameter 'param' is set - if (param == null) { - throw new ApiException(400, "Missing the required parameter 'param' when calling testInlineAdditionalProperties"); + private HttpRequest.Builder testInlineAdditionalPropertiesRequestBuilder(Map requestBody) throws ApiException { + // verify the required parameter 'requestBody' is set + if (requestBody == null) { + throw new ApiException(400, "Missing the required parameter 'requestBody' when calling testInlineAdditionalProperties"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -1330,7 +1619,7 @@ public class FakeApi { localVarRequestBuilder.header("Accept", "application/json"); try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(param); + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(requestBody); localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { throw new ApiException(e); @@ -1434,12 +1723,14 @@ public class FakeApi { * @param http (required) * @param url (required) * @param context (required) + * @param allowEmpty (required) + * @param language (optional * @return CompletableFuture<Void> * @throws ApiException if fails to make API call */ - public CompletableFuture testQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context) throws ApiException { + public CompletableFuture testQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, String allowEmpty, Map language) throws ApiException { try { - HttpRequest.Builder localVarRequestBuilder = testQueryParameterCollectionFormatRequestBuilder(pipe, ioutil, http, url, context); + HttpRequest.Builder localVarRequestBuilder = testQueryParameterCollectionFormatRequestBuilder(pipe, ioutil, http, url, context, allowEmpty, language); return memberVarHttpClient.sendAsync( localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> { @@ -1462,12 +1753,14 @@ public class FakeApi { * @param http (required) * @param url (required) * @param context (required) + * @param allowEmpty (required) + * @param language (optional * @return CompletableFuture<ApiResponse<Void>> * @throws ApiException if fails to make API call */ - public CompletableFuture> testQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context) throws ApiException { + public CompletableFuture> testQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context, String allowEmpty, Map language) throws ApiException { try { - HttpRequest.Builder localVarRequestBuilder = testQueryParameterCollectionFormatRequestBuilder(pipe, ioutil, http, url, context); + HttpRequest.Builder localVarRequestBuilder = testQueryParameterCollectionFormatRequestBuilder(pipe, ioutil, http, url, context, allowEmpty, language); return memberVarHttpClient.sendAsync( localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> { @@ -1488,7 +1781,7 @@ public class FakeApi { } } - private HttpRequest.Builder testQueryParameterCollectionFormatRequestBuilder(List pipe, List ioutil, List http, List url, List context) throws ApiException { + private HttpRequest.Builder testQueryParameterCollectionFormatRequestBuilder(List pipe, List ioutil, List http, List url, List context, String allowEmpty, Map language) throws ApiException { // verify the required parameter 'pipe' is set if (pipe == null) { throw new ApiException(400, "Missing the required parameter 'pipe' when calling testQueryParameterCollectionFormat"); @@ -1509,17 +1802,23 @@ public class FakeApi { if (context == null) { throw new ApiException(400, "Missing the required parameter 'context' when calling testQueryParameterCollectionFormat"); } + // verify the required parameter 'allowEmpty' is set + if (allowEmpty == null) { + throw new ApiException(400, "Missing the required parameter 'allowEmpty' when calling testQueryParameterCollectionFormat"); + } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); String localVarPath = "/fake/test-query-parameters"; List localVarQueryParams = new ArrayList<>(); - localVarQueryParams.addAll(ApiClient.parameterToPairs("csv", "pipe", pipe)); + localVarQueryParams.addAll(ApiClient.parameterToPairs("pipes", "pipe", pipe)); localVarQueryParams.addAll(ApiClient.parameterToPairs("csv", "ioutil", ioutil)); localVarQueryParams.addAll(ApiClient.parameterToPairs("ssv", "http", http)); localVarQueryParams.addAll(ApiClient.parameterToPairs("csv", "url", url)); localVarQueryParams.addAll(ApiClient.parameterToPairs("multi", "context", context)); + localVarQueryParams.addAll(ApiClient.parameterToPairs("language", language)); + localVarQueryParams.addAll(ApiClient.parameterToPairs("allowEmpty", allowEmpty)); if (!localVarQueryParams.isEmpty()) { StringJoiner queryJoiner = new StringJoiner("&"); diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index d70a04ac72..6287689467 100644 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -78,13 +78,13 @@ public class FakeClassnameTags123Api { /** * To test class name in snake case * To test class name in snake case - * @param body client model (required) + * @param client client model (required) * @return CompletableFuture<Client> * @throws ApiException if fails to make API call */ - public CompletableFuture testClassname(Client body) throws ApiException { + public CompletableFuture testClassname(Client client) throws ApiException { try { - HttpRequest.Builder localVarRequestBuilder = testClassnameRequestBuilder(body); + HttpRequest.Builder localVarRequestBuilder = testClassnameRequestBuilder(client); return memberVarHttpClient.sendAsync( localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> { @@ -109,13 +109,13 @@ public class FakeClassnameTags123Api { /** * To test class name in snake case * To test class name in snake case - * @param body client model (required) + * @param client client model (required) * @return CompletableFuture<ApiResponse<Client>> * @throws ApiException if fails to make API call */ - public CompletableFuture> testClassnameWithHttpInfo(Client body) throws ApiException { + public CompletableFuture> testClassnameWithHttpInfo(Client client) throws ApiException { try { - HttpRequest.Builder localVarRequestBuilder = testClassnameRequestBuilder(body); + HttpRequest.Builder localVarRequestBuilder = testClassnameRequestBuilder(client); return memberVarHttpClient.sendAsync( localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> { @@ -144,10 +144,10 @@ public class FakeClassnameTags123Api { } } - private HttpRequest.Builder testClassnameRequestBuilder(Client body) throws ApiException { - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling testClassname"); + private HttpRequest.Builder testClassnameRequestBuilder(Client client) throws ApiException { + // verify the required parameter 'client' is set + if (client == null) { + throw new ApiException(400, "Missing the required parameter 'client' when calling testClassname"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -160,7 +160,7 @@ public class FakeClassnameTags123Api { localVarRequestBuilder.header("Accept", "application/json"); try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(client); localVarRequestBuilder.method("PATCH", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { throw new ApiException(e); diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/PetApi.java index 7a473d5882..d00cb44e7c 100644 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/PetApi.java @@ -81,13 +81,13 @@ public class PetApi { /** * Add a new pet to the store * - * @param body Pet object that needs to be added to the store (required) + * @param pet Pet object that needs to be added to the store (required) * @return CompletableFuture<Void> * @throws ApiException if fails to make API call */ - public CompletableFuture addPet(Pet body) throws ApiException { + public CompletableFuture addPet(Pet pet) throws ApiException { try { - HttpRequest.Builder localVarRequestBuilder = addPetRequestBuilder(body); + HttpRequest.Builder localVarRequestBuilder = addPetRequestBuilder(pet); return memberVarHttpClient.sendAsync( localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> { @@ -105,13 +105,13 @@ public class PetApi { /** * Add a new pet to the store * - * @param body Pet object that needs to be added to the store (required) + * @param pet Pet object that needs to be added to the store (required) * @return CompletableFuture<ApiResponse<Void>> * @throws ApiException if fails to make API call */ - public CompletableFuture> addPetWithHttpInfo(Pet body) throws ApiException { + public CompletableFuture> addPetWithHttpInfo(Pet pet) throws ApiException { try { - HttpRequest.Builder localVarRequestBuilder = addPetRequestBuilder(body); + HttpRequest.Builder localVarRequestBuilder = addPetRequestBuilder(pet); return memberVarHttpClient.sendAsync( localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> { @@ -132,10 +132,10 @@ public class PetApi { } } - private HttpRequest.Builder addPetRequestBuilder(Pet body) throws ApiException { - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling addPet"); + private HttpRequest.Builder addPetRequestBuilder(Pet pet) throws ApiException { + // verify the required parameter 'pet' is set + if (pet == null) { + throw new ApiException(400, "Missing the required parameter 'pet' when calling addPet"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -148,7 +148,7 @@ public class PetApi { localVarRequestBuilder.header("Accept", "application/json"); try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(pet); localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { throw new ApiException(e); @@ -546,13 +546,13 @@ public class PetApi { /** * Update an existing pet * - * @param body Pet object that needs to be added to the store (required) + * @param pet Pet object that needs to be added to the store (required) * @return CompletableFuture<Void> * @throws ApiException if fails to make API call */ - public CompletableFuture updatePet(Pet body) throws ApiException { + public CompletableFuture updatePet(Pet pet) throws ApiException { try { - HttpRequest.Builder localVarRequestBuilder = updatePetRequestBuilder(body); + HttpRequest.Builder localVarRequestBuilder = updatePetRequestBuilder(pet); return memberVarHttpClient.sendAsync( localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> { @@ -570,13 +570,13 @@ public class PetApi { /** * Update an existing pet * - * @param body Pet object that needs to be added to the store (required) + * @param pet Pet object that needs to be added to the store (required) * @return CompletableFuture<ApiResponse<Void>> * @throws ApiException if fails to make API call */ - public CompletableFuture> updatePetWithHttpInfo(Pet body) throws ApiException { + public CompletableFuture> updatePetWithHttpInfo(Pet pet) throws ApiException { try { - HttpRequest.Builder localVarRequestBuilder = updatePetRequestBuilder(body); + HttpRequest.Builder localVarRequestBuilder = updatePetRequestBuilder(pet); return memberVarHttpClient.sendAsync( localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> { @@ -597,10 +597,10 @@ public class PetApi { } } - private HttpRequest.Builder updatePetRequestBuilder(Pet body) throws ApiException { - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling updatePet"); + private HttpRequest.Builder updatePetRequestBuilder(Pet pet) throws ApiException { + // verify the required parameter 'pet' is set + if (pet == null) { + throw new ApiException(400, "Missing the required parameter 'pet' when calling updatePet"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -613,7 +613,7 @@ public class PetApi { localVarRequestBuilder.header("Accept", "application/json"); try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(pet); localVarRequestBuilder.method("PUT", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { throw new ApiException(e); diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/StoreApi.java index 73fbf0c1bd..70e7fa2fac 100644 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/StoreApi.java @@ -335,13 +335,13 @@ public class StoreApi { /** * Place an order for a pet * - * @param body order placed for purchasing the pet (required) + * @param order order placed for purchasing the pet (required) * @return CompletableFuture<Order> * @throws ApiException if fails to make API call */ - public CompletableFuture placeOrder(Order body) throws ApiException { + public CompletableFuture placeOrder(Order order) throws ApiException { try { - HttpRequest.Builder localVarRequestBuilder = placeOrderRequestBuilder(body); + HttpRequest.Builder localVarRequestBuilder = placeOrderRequestBuilder(order); return memberVarHttpClient.sendAsync( localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> { @@ -366,13 +366,13 @@ public class StoreApi { /** * Place an order for a pet * - * @param body order placed for purchasing the pet (required) + * @param order order placed for purchasing the pet (required) * @return CompletableFuture<ApiResponse<Order>> * @throws ApiException if fails to make API call */ - public CompletableFuture> placeOrderWithHttpInfo(Order body) throws ApiException { + public CompletableFuture> placeOrderWithHttpInfo(Order order) throws ApiException { try { - HttpRequest.Builder localVarRequestBuilder = placeOrderRequestBuilder(body); + HttpRequest.Builder localVarRequestBuilder = placeOrderRequestBuilder(order); return memberVarHttpClient.sendAsync( localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> { @@ -401,10 +401,10 @@ public class StoreApi { } } - private HttpRequest.Builder placeOrderRequestBuilder(Order body) throws ApiException { - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling placeOrder"); + private HttpRequest.Builder placeOrderRequestBuilder(Order order) throws ApiException { + // verify the required parameter 'order' is set + if (order == null) { + throw new ApiException(400, "Missing the required parameter 'order' when calling placeOrder"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -417,7 +417,7 @@ public class StoreApi { localVarRequestBuilder.header("Accept", "application/xml, application/json"); try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(order); localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { throw new ApiException(e); diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/UserApi.java index 57fb6bf7a8..cd486caf4b 100644 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/api/UserApi.java @@ -79,13 +79,13 @@ public class UserApi { /** * Create user * This can only be done by the logged in user. - * @param body Created user object (required) + * @param user Created user object (required) * @return CompletableFuture<Void> * @throws ApiException if fails to make API call */ - public CompletableFuture createUser(User body) throws ApiException { + public CompletableFuture createUser(User user) throws ApiException { try { - HttpRequest.Builder localVarRequestBuilder = createUserRequestBuilder(body); + HttpRequest.Builder localVarRequestBuilder = createUserRequestBuilder(user); return memberVarHttpClient.sendAsync( localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> { @@ -103,13 +103,13 @@ public class UserApi { /** * Create user * This can only be done by the logged in user. - * @param body Created user object (required) + * @param user Created user object (required) * @return CompletableFuture<ApiResponse<Void>> * @throws ApiException if fails to make API call */ - public CompletableFuture> createUserWithHttpInfo(User body) throws ApiException { + public CompletableFuture> createUserWithHttpInfo(User user) throws ApiException { try { - HttpRequest.Builder localVarRequestBuilder = createUserRequestBuilder(body); + HttpRequest.Builder localVarRequestBuilder = createUserRequestBuilder(user); return memberVarHttpClient.sendAsync( localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> { @@ -130,10 +130,10 @@ public class UserApi { } } - private HttpRequest.Builder createUserRequestBuilder(User body) throws ApiException { - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling createUser"); + private HttpRequest.Builder createUserRequestBuilder(User user) throws ApiException { + // verify the required parameter 'user' is set + if (user == null) { + throw new ApiException(400, "Missing the required parameter 'user' when calling createUser"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -146,7 +146,7 @@ public class UserApi { localVarRequestBuilder.header("Accept", "application/json"); try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(user); localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { throw new ApiException(e); @@ -162,13 +162,13 @@ public class UserApi { /** * Creates list of users with given input array * - * @param body List of user object (required) + * @param user List of user object (required) * @return CompletableFuture<Void> * @throws ApiException if fails to make API call */ - public CompletableFuture createUsersWithArrayInput(List body) throws ApiException { + public CompletableFuture createUsersWithArrayInput(List user) throws ApiException { try { - HttpRequest.Builder localVarRequestBuilder = createUsersWithArrayInputRequestBuilder(body); + HttpRequest.Builder localVarRequestBuilder = createUsersWithArrayInputRequestBuilder(user); return memberVarHttpClient.sendAsync( localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> { @@ -186,13 +186,13 @@ public class UserApi { /** * Creates list of users with given input array * - * @param body List of user object (required) + * @param user List of user object (required) * @return CompletableFuture<ApiResponse<Void>> * @throws ApiException if fails to make API call */ - public CompletableFuture> createUsersWithArrayInputWithHttpInfo(List body) throws ApiException { + public CompletableFuture> createUsersWithArrayInputWithHttpInfo(List user) throws ApiException { try { - HttpRequest.Builder localVarRequestBuilder = createUsersWithArrayInputRequestBuilder(body); + HttpRequest.Builder localVarRequestBuilder = createUsersWithArrayInputRequestBuilder(user); return memberVarHttpClient.sendAsync( localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> { @@ -213,10 +213,10 @@ public class UserApi { } } - private HttpRequest.Builder createUsersWithArrayInputRequestBuilder(List body) throws ApiException { - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling createUsersWithArrayInput"); + private HttpRequest.Builder createUsersWithArrayInputRequestBuilder(List user) throws ApiException { + // verify the required parameter 'user' is set + if (user == null) { + throw new ApiException(400, "Missing the required parameter 'user' when calling createUsersWithArrayInput"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -229,7 +229,7 @@ public class UserApi { localVarRequestBuilder.header("Accept", "application/json"); try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(user); localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { throw new ApiException(e); @@ -245,13 +245,13 @@ public class UserApi { /** * Creates list of users with given input array * - * @param body List of user object (required) + * @param user List of user object (required) * @return CompletableFuture<Void> * @throws ApiException if fails to make API call */ - public CompletableFuture createUsersWithListInput(List body) throws ApiException { + public CompletableFuture createUsersWithListInput(List user) throws ApiException { try { - HttpRequest.Builder localVarRequestBuilder = createUsersWithListInputRequestBuilder(body); + HttpRequest.Builder localVarRequestBuilder = createUsersWithListInputRequestBuilder(user); return memberVarHttpClient.sendAsync( localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> { @@ -269,13 +269,13 @@ public class UserApi { /** * Creates list of users with given input array * - * @param body List of user object (required) + * @param user List of user object (required) * @return CompletableFuture<ApiResponse<Void>> * @throws ApiException if fails to make API call */ - public CompletableFuture> createUsersWithListInputWithHttpInfo(List body) throws ApiException { + public CompletableFuture> createUsersWithListInputWithHttpInfo(List user) throws ApiException { try { - HttpRequest.Builder localVarRequestBuilder = createUsersWithListInputRequestBuilder(body); + HttpRequest.Builder localVarRequestBuilder = createUsersWithListInputRequestBuilder(user); return memberVarHttpClient.sendAsync( localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> { @@ -296,10 +296,10 @@ public class UserApi { } } - private HttpRequest.Builder createUsersWithListInputRequestBuilder(List body) throws ApiException { - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling createUsersWithListInput"); + private HttpRequest.Builder createUsersWithListInputRequestBuilder(List user) throws ApiException { + // verify the required parameter 'user' is set + if (user == null) { + throw new ApiException(400, "Missing the required parameter 'user' when calling createUsersWithListInput"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -312,7 +312,7 @@ public class UserApi { localVarRequestBuilder.header("Accept", "application/json"); try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(user); localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { throw new ApiException(e); @@ -679,13 +679,13 @@ public class UserApi { * Updated user * This can only be done by the logged in user. * @param username name that need to be deleted (required) - * @param body Updated user object (required) + * @param user Updated user object (required) * @return CompletableFuture<Void> * @throws ApiException if fails to make API call */ - public CompletableFuture updateUser(String username, User body) throws ApiException { + public CompletableFuture updateUser(String username, User user) throws ApiException { try { - HttpRequest.Builder localVarRequestBuilder = updateUserRequestBuilder(username, body); + HttpRequest.Builder localVarRequestBuilder = updateUserRequestBuilder(username, user); return memberVarHttpClient.sendAsync( localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> { @@ -704,13 +704,13 @@ public class UserApi { * Updated user * This can only be done by the logged in user. * @param username name that need to be deleted (required) - * @param body Updated user object (required) + * @param user Updated user object (required) * @return CompletableFuture<ApiResponse<Void>> * @throws ApiException if fails to make API call */ - public CompletableFuture> updateUserWithHttpInfo(String username, User body) throws ApiException { + public CompletableFuture> updateUserWithHttpInfo(String username, User user) throws ApiException { try { - HttpRequest.Builder localVarRequestBuilder = updateUserRequestBuilder(username, body); + HttpRequest.Builder localVarRequestBuilder = updateUserRequestBuilder(username, user); return memberVarHttpClient.sendAsync( localVarRequestBuilder.build(), HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> { @@ -731,14 +731,14 @@ public class UserApi { } } - private HttpRequest.Builder updateUserRequestBuilder(String username, User body) throws ApiException { + private HttpRequest.Builder updateUserRequestBuilder(String username, User user) throws ApiException { // verify the required parameter 'username' is set if (username == null) { throw new ApiException(400, "Missing the required parameter 'username' when calling updateUser"); } - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling updateUser"); + // verify the required parameter 'user' is set + if (user == null) { + throw new ApiException(400, "Missing the required parameter 'user' when calling updateUser"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -752,7 +752,7 @@ public class UserApi { localVarRequestBuilder.header("Accept", "application/json"); try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(user); localVarRequestBuilder.method("PUT", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { throw new ApiException(e); diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index eba8b80e4f..47c89b3eaf 100644 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -22,9 +22,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import java.math.BigDecimal; import java.util.HashMap; -import java.util.List; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -33,392 +31,83 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; * AdditionalPropertiesClass */ @JsonPropertyOrder({ - AdditionalPropertiesClass.JSON_PROPERTY_MAP_STRING, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_NUMBER, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_INTEGER, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_BOOLEAN, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_INTEGER, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_ANYTYPE, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_STRING, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_ANYTYPE, - AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE1, - AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE2, - AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE3 + AdditionalPropertiesClass.JSON_PROPERTY_MAP_PROPERTY, + AdditionalPropertiesClass.JSON_PROPERTY_MAP_OF_MAP_PROPERTY }) @javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class AdditionalPropertiesClass { - public static final String JSON_PROPERTY_MAP_STRING = "map_string"; - private Map mapString = null; + public static final String JSON_PROPERTY_MAP_PROPERTY = "map_property"; + private Map mapProperty = null; - public static final String JSON_PROPERTY_MAP_NUMBER = "map_number"; - private Map mapNumber = null; - - public static final String JSON_PROPERTY_MAP_INTEGER = "map_integer"; - private Map mapInteger = null; - - public static final String JSON_PROPERTY_MAP_BOOLEAN = "map_boolean"; - private Map mapBoolean = null; - - public static final String JSON_PROPERTY_MAP_ARRAY_INTEGER = "map_array_integer"; - private Map> mapArrayInteger = null; - - public static final String JSON_PROPERTY_MAP_ARRAY_ANYTYPE = "map_array_anytype"; - private Map> mapArrayAnytype = null; - - public static final String JSON_PROPERTY_MAP_MAP_STRING = "map_map_string"; - private Map> mapMapString = null; - - public static final String JSON_PROPERTY_MAP_MAP_ANYTYPE = "map_map_anytype"; - private Map> mapMapAnytype = null; - - public static final String JSON_PROPERTY_ANYTYPE1 = "anytype_1"; - private Object anytype1; - - public static final String JSON_PROPERTY_ANYTYPE2 = "anytype_2"; - private Object anytype2; - - public static final String JSON_PROPERTY_ANYTYPE3 = "anytype_3"; - private Object anytype3; + public static final String JSON_PROPERTY_MAP_OF_MAP_PROPERTY = "map_of_map_property"; + private Map> mapOfMapProperty = null; public AdditionalPropertiesClass() { } - public AdditionalPropertiesClass mapString(Map mapString) { - this.mapString = mapString; + public AdditionalPropertiesClass mapProperty(Map mapProperty) { + this.mapProperty = mapProperty; return this; } - public AdditionalPropertiesClass putMapStringItem(String key, String mapStringItem) { - if (this.mapString == null) { - this.mapString = new HashMap<>(); + public AdditionalPropertiesClass putMapPropertyItem(String key, String mapPropertyItem) { + if (this.mapProperty == null) { + this.mapProperty = new HashMap<>(); } - this.mapString.put(key, mapStringItem); + this.mapProperty.put(key, mapPropertyItem); return this; } /** - * Get mapString - * @return mapString + * Get mapProperty + * @return mapProperty **/ @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP_STRING) + @JsonProperty(JSON_PROPERTY_MAP_PROPERTY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getMapString() { - return mapString; + public Map getMapProperty() { + return mapProperty; } - @JsonProperty(JSON_PROPERTY_MAP_STRING) + @JsonProperty(JSON_PROPERTY_MAP_PROPERTY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapString(Map mapString) { - this.mapString = mapString; + public void setMapProperty(Map mapProperty) { + this.mapProperty = mapProperty; } - public AdditionalPropertiesClass mapNumber(Map mapNumber) { - this.mapNumber = mapNumber; + public AdditionalPropertiesClass mapOfMapProperty(Map> mapOfMapProperty) { + this.mapOfMapProperty = mapOfMapProperty; return this; } - public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumberItem) { - if (this.mapNumber == null) { - this.mapNumber = new HashMap<>(); + public AdditionalPropertiesClass putMapOfMapPropertyItem(String key, Map mapOfMapPropertyItem) { + if (this.mapOfMapProperty == null) { + this.mapOfMapProperty = new HashMap<>(); } - this.mapNumber.put(key, mapNumberItem); + this.mapOfMapProperty.put(key, mapOfMapPropertyItem); return this; } /** - * Get mapNumber - * @return mapNumber + * Get mapOfMapProperty + * @return mapOfMapProperty **/ @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP_NUMBER) + @JsonProperty(JSON_PROPERTY_MAP_OF_MAP_PROPERTY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getMapNumber() { - return mapNumber; + public Map> getMapOfMapProperty() { + return mapOfMapProperty; } - @JsonProperty(JSON_PROPERTY_MAP_NUMBER) + @JsonProperty(JSON_PROPERTY_MAP_OF_MAP_PROPERTY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapNumber(Map mapNumber) { - this.mapNumber = mapNumber; - } - - - public AdditionalPropertiesClass mapInteger(Map mapInteger) { - this.mapInteger = mapInteger; - return this; - } - - public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntegerItem) { - if (this.mapInteger == null) { - this.mapInteger = new HashMap<>(); - } - this.mapInteger.put(key, mapIntegerItem); - return this; - } - - /** - * Get mapInteger - * @return mapInteger - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map getMapInteger() { - return mapInteger; - } - - - @JsonProperty(JSON_PROPERTY_MAP_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapInteger(Map mapInteger) { - this.mapInteger = mapInteger; - } - - - public AdditionalPropertiesClass mapBoolean(Map mapBoolean) { - this.mapBoolean = mapBoolean; - return this; - } - - public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBooleanItem) { - if (this.mapBoolean == null) { - this.mapBoolean = new HashMap<>(); - } - this.mapBoolean.put(key, mapBooleanItem); - return this; - } - - /** - * Get mapBoolean - * @return mapBoolean - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP_BOOLEAN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map getMapBoolean() { - return mapBoolean; - } - - - @JsonProperty(JSON_PROPERTY_MAP_BOOLEAN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapBoolean(Map mapBoolean) { - this.mapBoolean = mapBoolean; - } - - - public AdditionalPropertiesClass mapArrayInteger(Map> mapArrayInteger) { - this.mapArrayInteger = mapArrayInteger; - return this; - } - - public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List mapArrayIntegerItem) { - if (this.mapArrayInteger == null) { - this.mapArrayInteger = new HashMap<>(); - } - this.mapArrayInteger.put(key, mapArrayIntegerItem); - return this; - } - - /** - * Get mapArrayInteger - * @return mapArrayInteger - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP_ARRAY_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map> getMapArrayInteger() { - return mapArrayInteger; - } - - - @JsonProperty(JSON_PROPERTY_MAP_ARRAY_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapArrayInteger(Map> mapArrayInteger) { - this.mapArrayInteger = mapArrayInteger; - } - - - public AdditionalPropertiesClass mapArrayAnytype(Map> mapArrayAnytype) { - this.mapArrayAnytype = mapArrayAnytype; - return this; - } - - public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List mapArrayAnytypeItem) { - if (this.mapArrayAnytype == null) { - this.mapArrayAnytype = new HashMap<>(); - } - this.mapArrayAnytype.put(key, mapArrayAnytypeItem); - return this; - } - - /** - * Get mapArrayAnytype - * @return mapArrayAnytype - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP_ARRAY_ANYTYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map> getMapArrayAnytype() { - return mapArrayAnytype; - } - - - @JsonProperty(JSON_PROPERTY_MAP_ARRAY_ANYTYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapArrayAnytype(Map> mapArrayAnytype) { - this.mapArrayAnytype = mapArrayAnytype; - } - - - public AdditionalPropertiesClass mapMapString(Map> mapMapString) { - this.mapMapString = mapMapString; - return this; - } - - public AdditionalPropertiesClass putMapMapStringItem(String key, Map mapMapStringItem) { - if (this.mapMapString == null) { - this.mapMapString = new HashMap<>(); - } - this.mapMapString.put(key, mapMapStringItem); - return this; - } - - /** - * Get mapMapString - * @return mapMapString - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP_MAP_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map> getMapMapString() { - return mapMapString; - } - - - @JsonProperty(JSON_PROPERTY_MAP_MAP_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapMapString(Map> mapMapString) { - this.mapMapString = mapMapString; - } - - - public AdditionalPropertiesClass mapMapAnytype(Map> mapMapAnytype) { - this.mapMapAnytype = mapMapAnytype; - return this; - } - - public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map mapMapAnytypeItem) { - if (this.mapMapAnytype == null) { - this.mapMapAnytype = new HashMap<>(); - } - this.mapMapAnytype.put(key, mapMapAnytypeItem); - return this; - } - - /** - * Get mapMapAnytype - * @return mapMapAnytype - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP_MAP_ANYTYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map> getMapMapAnytype() { - return mapMapAnytype; - } - - - @JsonProperty(JSON_PROPERTY_MAP_MAP_ANYTYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapMapAnytype(Map> mapMapAnytype) { - this.mapMapAnytype = mapMapAnytype; - } - - - public AdditionalPropertiesClass anytype1(Object anytype1) { - this.anytype1 = anytype1; - return this; - } - - /** - * Get anytype1 - * @return anytype1 - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ANYTYPE1) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Object getAnytype1() { - return anytype1; - } - - - @JsonProperty(JSON_PROPERTY_ANYTYPE1) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAnytype1(Object anytype1) { - this.anytype1 = anytype1; - } - - - public AdditionalPropertiesClass anytype2(Object anytype2) { - this.anytype2 = anytype2; - return this; - } - - /** - * Get anytype2 - * @return anytype2 - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ANYTYPE2) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Object getAnytype2() { - return anytype2; - } - - - @JsonProperty(JSON_PROPERTY_ANYTYPE2) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAnytype2(Object anytype2) { - this.anytype2 = anytype2; - } - - - public AdditionalPropertiesClass anytype3(Object anytype3) { - this.anytype3 = anytype3; - return this; - } - - /** - * Get anytype3 - * @return anytype3 - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ANYTYPE3) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Object getAnytype3() { - return anytype3; - } - - - @JsonProperty(JSON_PROPERTY_ANYTYPE3) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAnytype3(Object anytype3) { - this.anytype3 = anytype3; + public void setMapOfMapProperty(Map> mapOfMapProperty) { + this.mapOfMapProperty = mapOfMapProperty; } @@ -434,39 +123,21 @@ public class AdditionalPropertiesClass { return false; } AdditionalPropertiesClass additionalPropertiesClass = (AdditionalPropertiesClass) o; - return Objects.equals(this.mapString, additionalPropertiesClass.mapString) && - Objects.equals(this.mapNumber, additionalPropertiesClass.mapNumber) && - Objects.equals(this.mapInteger, additionalPropertiesClass.mapInteger) && - Objects.equals(this.mapBoolean, additionalPropertiesClass.mapBoolean) && - Objects.equals(this.mapArrayInteger, additionalPropertiesClass.mapArrayInteger) && - Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && - Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && - Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && - Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && - Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && - Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); + return Objects.equals(this.mapProperty, additionalPropertiesClass.mapProperty) && + Objects.equals(this.mapOfMapProperty, additionalPropertiesClass.mapOfMapProperty); } @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); + return Objects.hash(mapProperty, mapOfMapProperty); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AdditionalPropertiesClass {\n"); - sb.append(" mapString: ").append(toIndentedString(mapString)).append("\n"); - sb.append(" mapNumber: ").append(toIndentedString(mapNumber)).append("\n"); - sb.append(" mapInteger: ").append(toIndentedString(mapInteger)).append("\n"); - sb.append(" mapBoolean: ").append(toIndentedString(mapBoolean)).append("\n"); - sb.append(" mapArrayInteger: ").append(toIndentedString(mapArrayInteger)).append("\n"); - sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); - sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); - sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); - sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); - sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); - sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); + sb.append(" mapProperty: ").append(toIndentedString(mapProperty)).append("\n"); + sb.append(" mapOfMapProperty: ").append(toIndentedString(mapOfMapProperty)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java new file mode 100644 index 0000000000..dadb9089a5 --- /dev/null +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java @@ -0,0 +1,140 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.client.model.SingleRefType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * AllOfWithSingleRef + */ +@JsonPropertyOrder({ + AllOfWithSingleRef.JSON_PROPERTY_USERNAME, + AllOfWithSingleRef.JSON_PROPERTY_SINGLE_REF_TYPE +}) +@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AllOfWithSingleRef { + public static final String JSON_PROPERTY_USERNAME = "username"; + private String username; + + public static final String JSON_PROPERTY_SINGLE_REF_TYPE = "SingleRefType"; + private SingleRefType singleRefType; + + public AllOfWithSingleRef() { + } + + public AllOfWithSingleRef username(String username) { + this.username = username; + return this; + } + + /** + * Get username + * @return username + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USERNAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getUsername() { + return username; + } + + + @JsonProperty(JSON_PROPERTY_USERNAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUsername(String username) { + this.username = username; + } + + + public AllOfWithSingleRef singleRefType(SingleRefType singleRefType) { + this.singleRefType = singleRefType; + return this; + } + + /** + * Get singleRefType + * @return singleRefType + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SINGLE_REF_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public SingleRefType getSingleRefType() { + return singleRefType; + } + + + @JsonProperty(JSON_PROPERTY_SINGLE_REF_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSingleRefType(SingleRefType singleRefType) { + this.singleRefType = singleRefType; + } + + + /** + * Return true if this AllOfWithSingleRef object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AllOfWithSingleRef allOfWithSingleRef = (AllOfWithSingleRef) o; + return Objects.equals(this.username, allOfWithSingleRef.username) && + Objects.equals(this.singleRefType, allOfWithSingleRef.singleRefType); + } + + @Override + public int hashCode() { + return Objects.hash(username, singleRefType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AllOfWithSingleRef {\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" singleRefType: ").append(toIndentedString(singleRefType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/Animal.java index 0b75f44f77..27b13a6af7 100644 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/Animal.java @@ -25,7 +25,6 @@ import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import org.openapitools.client.model.BigCat; import org.openapitools.client.model.Cat; import org.openapitools.client.model.Dog; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -46,7 +45,6 @@ import org.openapitools.client.JSON; ) @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ - @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) @@ -156,7 +154,6 @@ public class Animal { static { // Initialize and register the discriminator mappings. Map> mappings = new HashMap>(); - mappings.put("BigCat", BigCat.class); mappings.put("Cat", Cat.class); mappings.put("Dog", Dog.class); mappings.put("Animal", Animal.class); diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/Cat.java index 900c7566cc..a3793dccde 100644 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/Cat.java @@ -26,7 +26,6 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.client.model.Animal; -import org.openapitools.client.model.BigCat; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -43,9 +42,6 @@ import org.openapitools.client.JSON; allowSetters = true // allows the className to be set during deserialization ) @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) -@JsonSubTypes({ - @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), -}) public class Cat extends Animal { public static final String JSON_PROPERTY_DECLAWED = "declawed"; @@ -124,7 +120,6 @@ public class Cat extends Animal { static { // Initialize and register the discriminator mappings. Map> mappings = new HashMap>(); - mappings.put("BigCat", BigCat.class); mappings.put("Cat", Cat.class); JSON.registerDiscriminator(Cat.class, "className", mappings); } diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/DeprecatedObject.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/DeprecatedObject.java new file mode 100644 index 0000000000..1b0f2c1372 --- /dev/null +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/DeprecatedObject.java @@ -0,0 +1,110 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * DeprecatedObject + * @deprecated + */ +@Deprecated +@JsonPropertyOrder({ + DeprecatedObject.JSON_PROPERTY_NAME +}) +@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DeprecatedObject { + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public DeprecatedObject() { + } + + public DeprecatedObject name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(String name) { + this.name = name; + } + + + /** + * Return true if this DeprecatedObject object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeprecatedObject deprecatedObject = (DeprecatedObject) o; + return Objects.equals(this.name, deprecatedObject.name); + } + + @Override + public int hashCode() { + return Objects.hash(name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeprecatedObject {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/EnumTest.java index 27766254d0..942d299c28 100644 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/EnumTest.java @@ -23,6 +23,13 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.client.model.OuterEnum; +import org.openapitools.client.model.OuterEnumDefaultValue; +import org.openapitools.client.model.OuterEnumInteger; +import org.openapitools.client.model.OuterEnumIntegerDefaultValue; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -34,7 +41,10 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; EnumTest.JSON_PROPERTY_ENUM_STRING_REQUIRED, EnumTest.JSON_PROPERTY_ENUM_INTEGER, EnumTest.JSON_PROPERTY_ENUM_NUMBER, - EnumTest.JSON_PROPERTY_OUTER_ENUM + EnumTest.JSON_PROPERTY_OUTER_ENUM, + EnumTest.JSON_PROPERTY_OUTER_ENUM_INTEGER, + EnumTest.JSON_PROPERTY_OUTER_ENUM_DEFAULT_VALUE, + EnumTest.JSON_PROPERTY_OUTER_ENUM_INTEGER_DEFAULT_VALUE }) @javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class EnumTest { @@ -195,7 +205,16 @@ public class EnumTest { private EnumNumberEnum enumNumber; public static final String JSON_PROPERTY_OUTER_ENUM = "outerEnum"; - private OuterEnum outerEnum; + private JsonNullable outerEnum = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_OUTER_ENUM_INTEGER = "outerEnumInteger"; + private OuterEnumInteger outerEnumInteger; + + public static final String JSON_PROPERTY_OUTER_ENUM_DEFAULT_VALUE = "outerEnumDefaultValue"; + private OuterEnumDefaultValue outerEnumDefaultValue = OuterEnumDefaultValue.PLACED; + + public static final String JSON_PROPERTY_OUTER_ENUM_INTEGER_DEFAULT_VALUE = "outerEnumIntegerDefaultValue"; + private OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue = OuterEnumIntegerDefaultValue.NUMBER_0; public EnumTest() { } @@ -301,7 +320,7 @@ public class EnumTest { public EnumTest outerEnum(OuterEnum outerEnum) { - this.outerEnum = outerEnum; + this.outerEnum = JsonNullable.of(outerEnum); return this; } @@ -310,18 +329,101 @@ public class EnumTest { * @return outerEnum **/ @javax.annotation.Nullable + @JsonIgnore + + public OuterEnum getOuterEnum() { + return outerEnum.orElse(null); + } + @JsonProperty(JSON_PROPERTY_OUTER_ENUM) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OuterEnum getOuterEnum() { + public JsonNullable getOuterEnum_JsonNullable() { return outerEnum; } + + @JsonProperty(JSON_PROPERTY_OUTER_ENUM) + public void setOuterEnum_JsonNullable(JsonNullable outerEnum) { + this.outerEnum = outerEnum; + } + + public void setOuterEnum(OuterEnum outerEnum) { + this.outerEnum = JsonNullable.of(outerEnum); + } - @JsonProperty(JSON_PROPERTY_OUTER_ENUM) + public EnumTest outerEnumInteger(OuterEnumInteger outerEnumInteger) { + this.outerEnumInteger = outerEnumInteger; + return this; + } + + /** + * Get outerEnumInteger + * @return outerEnumInteger + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OUTER_ENUM_INTEGER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOuterEnum(OuterEnum outerEnum) { - this.outerEnum = outerEnum; + + public OuterEnumInteger getOuterEnumInteger() { + return outerEnumInteger; + } + + + @JsonProperty(JSON_PROPERTY_OUTER_ENUM_INTEGER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOuterEnumInteger(OuterEnumInteger outerEnumInteger) { + this.outerEnumInteger = outerEnumInteger; + } + + + public EnumTest outerEnumDefaultValue(OuterEnumDefaultValue outerEnumDefaultValue) { + this.outerEnumDefaultValue = outerEnumDefaultValue; + return this; + } + + /** + * Get outerEnumDefaultValue + * @return outerEnumDefaultValue + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OUTER_ENUM_DEFAULT_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OuterEnumDefaultValue getOuterEnumDefaultValue() { + return outerEnumDefaultValue; + } + + + @JsonProperty(JSON_PROPERTY_OUTER_ENUM_DEFAULT_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOuterEnumDefaultValue(OuterEnumDefaultValue outerEnumDefaultValue) { + this.outerEnumDefaultValue = outerEnumDefaultValue; + } + + + public EnumTest outerEnumIntegerDefaultValue(OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue) { + this.outerEnumIntegerDefaultValue = outerEnumIntegerDefaultValue; + return this; + } + + /** + * Get outerEnumIntegerDefaultValue + * @return outerEnumIntegerDefaultValue + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OUTER_ENUM_INTEGER_DEFAULT_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OuterEnumIntegerDefaultValue getOuterEnumIntegerDefaultValue() { + return outerEnumIntegerDefaultValue; + } + + + @JsonProperty(JSON_PROPERTY_OUTER_ENUM_INTEGER_DEFAULT_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOuterEnumIntegerDefaultValue(OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue) { + this.outerEnumIntegerDefaultValue = outerEnumIntegerDefaultValue; } @@ -341,12 +443,26 @@ public class EnumTest { Objects.equals(this.enumStringRequired, enumTest.enumStringRequired) && Objects.equals(this.enumInteger, enumTest.enumInteger) && Objects.equals(this.enumNumber, enumTest.enumNumber) && - Objects.equals(this.outerEnum, enumTest.outerEnum); + equalsNullable(this.outerEnum, enumTest.outerEnum) && + Objects.equals(this.outerEnumInteger, enumTest.outerEnumInteger) && + Objects.equals(this.outerEnumDefaultValue, enumTest.outerEnumDefaultValue) && + Objects.equals(this.outerEnumIntegerDefaultValue, enumTest.outerEnumIntegerDefaultValue); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); } @Override public int hashCode() { - return Objects.hash(enumString, enumStringRequired, enumInteger, enumNumber, outerEnum); + return Objects.hash(enumString, enumStringRequired, enumInteger, enumNumber, hashCodeNullable(outerEnum), outerEnumInteger, outerEnumDefaultValue, outerEnumIntegerDefaultValue); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; } @Override @@ -358,6 +474,9 @@ public class EnumTest { sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); sb.append(" enumNumber: ").append(toIndentedString(enumNumber)).append("\n"); sb.append(" outerEnum: ").append(toIndentedString(outerEnum)).append("\n"); + sb.append(" outerEnumInteger: ").append(toIndentedString(outerEnumInteger)).append("\n"); + sb.append(" outerEnumDefaultValue: ").append(toIndentedString(outerEnumDefaultValue)).append("\n"); + sb.append(" outerEnumIntegerDefaultValue: ").append(toIndentedString(outerEnumIntegerDefaultValue)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/Foo.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/Foo.java new file mode 100644 index 0000000000..e8bb3f5412 --- /dev/null +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/Foo.java @@ -0,0 +1,108 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Foo + */ +@JsonPropertyOrder({ + Foo.JSON_PROPERTY_BAR +}) +@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Foo { + public static final String JSON_PROPERTY_BAR = "bar"; + private String bar = "bar"; + + public Foo() { + } + + public Foo bar(String bar) { + this.bar = bar; + return this; + } + + /** + * Get bar + * @return bar + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getBar() { + return bar; + } + + + @JsonProperty(JSON_PROPERTY_BAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBar(String bar) { + this.bar = bar; + } + + + /** + * Return true if this Foo object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Foo foo = (Foo) o; + return Objects.equals(this.bar, foo.bar); + } + + @Override + public int hashCode() { + return Objects.hash(bar); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Foo {\n"); + sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java new file mode 100644 index 0000000000..c103221b13 --- /dev/null +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java @@ -0,0 +1,109 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.client.model.Foo; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * FooGetDefaultResponse + */ +@JsonPropertyOrder({ + FooGetDefaultResponse.JSON_PROPERTY_STRING +}) +@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class FooGetDefaultResponse { + public static final String JSON_PROPERTY_STRING = "string"; + private Foo string; + + public FooGetDefaultResponse() { + } + + public FooGetDefaultResponse string(Foo string) { + this.string = string; + return this; + } + + /** + * Get string + * @return string + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Foo getString() { + return string; + } + + + @JsonProperty(JSON_PROPERTY_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setString(Foo string) { + this.string = string; + } + + + /** + * Return true if this _foo_get_default_response object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FooGetDefaultResponse fooGetDefaultResponse = (FooGetDefaultResponse) o; + return Objects.equals(this.string, fooGetDefaultResponse.string); + } + + @Override + public int hashCode() { + return Objects.hash(string); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FooGetDefaultResponse {\n"); + sb.append(" string: ").append(toIndentedString(string)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/FormatTest.java index 793e2c85f7..784366237f 100644 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/FormatTest.java @@ -40,6 +40,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; FormatTest.JSON_PROPERTY_NUMBER, FormatTest.JSON_PROPERTY_FLOAT, FormatTest.JSON_PROPERTY_DOUBLE, + FormatTest.JSON_PROPERTY_DECIMAL, FormatTest.JSON_PROPERTY_STRING, FormatTest.JSON_PROPERTY_BYTE, FormatTest.JSON_PROPERTY_BINARY, @@ -47,7 +48,8 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; FormatTest.JSON_PROPERTY_DATE_TIME, FormatTest.JSON_PROPERTY_UUID, FormatTest.JSON_PROPERTY_PASSWORD, - FormatTest.JSON_PROPERTY_BIG_DECIMAL + FormatTest.JSON_PROPERTY_PATTERN_WITH_DIGITS, + FormatTest.JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER }) @javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class FormatTest { @@ -69,6 +71,9 @@ public class FormatTest { public static final String JSON_PROPERTY_DOUBLE = "double"; private Double _double; + public static final String JSON_PROPERTY_DECIMAL = "decimal"; + private BigDecimal decimal; + public static final String JSON_PROPERTY_STRING = "string"; private String string; @@ -90,8 +95,11 @@ public class FormatTest { public static final String JSON_PROPERTY_PASSWORD = "password"; private String password; - public static final String JSON_PROPERTY_BIG_DECIMAL = "BigDecimal"; - private BigDecimal bigDecimal; + public static final String JSON_PROPERTY_PATTERN_WITH_DIGITS = "pattern_with_digits"; + private String patternWithDigits; + + public static final String JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER = "pattern_with_digits_and_delimiter"; + private String patternWithDigitsAndDelimiter; public FormatTest() { } @@ -256,6 +264,31 @@ public class FormatTest { } + public FormatTest decimal(BigDecimal decimal) { + this.decimal = decimal; + return this; + } + + /** + * Get decimal + * @return decimal + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DECIMAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BigDecimal getDecimal() { + return decimal; + } + + + @JsonProperty(JSON_PROPERTY_DECIMAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDecimal(BigDecimal decimal) { + this.decimal = decimal; + } + + public FormatTest string(String string) { this.string = string; return this; @@ -431,28 +464,53 @@ public class FormatTest { } - public FormatTest bigDecimal(BigDecimal bigDecimal) { - this.bigDecimal = bigDecimal; + public FormatTest patternWithDigits(String patternWithDigits) { + this.patternWithDigits = patternWithDigits; return this; } /** - * Get bigDecimal - * @return bigDecimal + * A string that is a 10 digit number. Can have leading zeros. + * @return patternWithDigits **/ @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BIG_DECIMAL) + @JsonProperty(JSON_PROPERTY_PATTERN_WITH_DIGITS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public BigDecimal getBigDecimal() { - return bigDecimal; + public String getPatternWithDigits() { + return patternWithDigits; } - @JsonProperty(JSON_PROPERTY_BIG_DECIMAL) + @JsonProperty(JSON_PROPERTY_PATTERN_WITH_DIGITS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBigDecimal(BigDecimal bigDecimal) { - this.bigDecimal = bigDecimal; + public void setPatternWithDigits(String patternWithDigits) { + this.patternWithDigits = patternWithDigits; + } + + + public FormatTest patternWithDigitsAndDelimiter(String patternWithDigitsAndDelimiter) { + this.patternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; + return this; + } + + /** + * A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. + * @return patternWithDigitsAndDelimiter + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPatternWithDigitsAndDelimiter() { + return patternWithDigitsAndDelimiter; + } + + + @JsonProperty(JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPatternWithDigitsAndDelimiter(String patternWithDigitsAndDelimiter) { + this.patternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; } @@ -474,6 +532,7 @@ public class FormatTest { Objects.equals(this.number, formatTest.number) && Objects.equals(this._float, formatTest._float) && Objects.equals(this._double, formatTest._double) && + Objects.equals(this.decimal, formatTest.decimal) && Objects.equals(this.string, formatTest.string) && Arrays.equals(this._byte, formatTest._byte) && Objects.equals(this.binary, formatTest.binary) && @@ -481,12 +540,13 @@ public class FormatTest { Objects.equals(this.dateTime, formatTest.dateTime) && Objects.equals(this.uuid, formatTest.uuid) && Objects.equals(this.password, formatTest.password) && - Objects.equals(this.bigDecimal, formatTest.bigDecimal); + Objects.equals(this.patternWithDigits, formatTest.patternWithDigits) && + Objects.equals(this.patternWithDigitsAndDelimiter, formatTest.patternWithDigitsAndDelimiter); } @Override public int hashCode() { - return Objects.hash(integer, int32, int64, number, _float, _double, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, bigDecimal); + return Objects.hash(integer, int32, int64, number, _float, _double, decimal, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, patternWithDigits, patternWithDigitsAndDelimiter); } @Override @@ -499,6 +559,7 @@ public class FormatTest { sb.append(" number: ").append(toIndentedString(number)).append("\n"); sb.append(" _float: ").append(toIndentedString(_float)).append("\n"); sb.append(" _double: ").append(toIndentedString(_double)).append("\n"); + sb.append(" decimal: ").append(toIndentedString(decimal)).append("\n"); sb.append(" string: ").append(toIndentedString(string)).append("\n"); sb.append(" _byte: ").append(toIndentedString(_byte)).append("\n"); sb.append(" binary: ").append(toIndentedString(binary)).append("\n"); @@ -506,7 +567,8 @@ 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(" patternWithDigits: ").append(toIndentedString(patternWithDigits)).append("\n"); + sb.append(" patternWithDigitsAndDelimiter: ").append(toIndentedString(patternWithDigitsAndDelimiter)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/HealthCheckResult.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/HealthCheckResult.java new file mode 100644 index 0000000000..11b3d08734 --- /dev/null +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/HealthCheckResult.java @@ -0,0 +1,131 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. + */ +@JsonPropertyOrder({ + HealthCheckResult.JSON_PROPERTY_NULLABLE_MESSAGE +}) +@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class HealthCheckResult { + public static final String JSON_PROPERTY_NULLABLE_MESSAGE = "NullableMessage"; + private JsonNullable nullableMessage = JsonNullable.undefined(); + + public HealthCheckResult() { + } + + public HealthCheckResult nullableMessage(String nullableMessage) { + this.nullableMessage = JsonNullable.of(nullableMessage); + return this; + } + + /** + * Get nullableMessage + * @return nullableMessage + **/ + @javax.annotation.Nullable + @JsonIgnore + + public String getNullableMessage() { + return nullableMessage.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NULLABLE_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNullableMessage_JsonNullable() { + return nullableMessage; + } + + @JsonProperty(JSON_PROPERTY_NULLABLE_MESSAGE) + public void setNullableMessage_JsonNullable(JsonNullable nullableMessage) { + this.nullableMessage = nullableMessage; + } + + public void setNullableMessage(String nullableMessage) { + this.nullableMessage = JsonNullable.of(nullableMessage); + } + + + /** + * Return true if this HealthCheckResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + HealthCheckResult healthCheckResult = (HealthCheckResult) o; + return equalsNullable(this.nullableMessage, healthCheckResult.nullableMessage); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(nullableMessage)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class HealthCheckResult {\n"); + sb.append(" nullableMessage: ").append(toIndentedString(nullableMessage)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/NullableClass.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/NullableClass.java new file mode 100644 index 0000000000..65d26d3f3e --- /dev/null +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/NullableClass.java @@ -0,0 +1,666 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * NullableClass + */ +@JsonPropertyOrder({ + NullableClass.JSON_PROPERTY_INTEGER_PROP, + NullableClass.JSON_PROPERTY_NUMBER_PROP, + NullableClass.JSON_PROPERTY_BOOLEAN_PROP, + NullableClass.JSON_PROPERTY_STRING_PROP, + NullableClass.JSON_PROPERTY_DATE_PROP, + NullableClass.JSON_PROPERTY_DATETIME_PROP, + NullableClass.JSON_PROPERTY_ARRAY_NULLABLE_PROP, + NullableClass.JSON_PROPERTY_ARRAY_AND_ITEMS_NULLABLE_PROP, + NullableClass.JSON_PROPERTY_ARRAY_ITEMS_NULLABLE, + NullableClass.JSON_PROPERTY_OBJECT_NULLABLE_PROP, + NullableClass.JSON_PROPERTY_OBJECT_AND_ITEMS_NULLABLE_PROP, + NullableClass.JSON_PROPERTY_OBJECT_ITEMS_NULLABLE +}) +@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class NullableClass extends HashMap { + public static final String JSON_PROPERTY_INTEGER_PROP = "integer_prop"; + private JsonNullable integerProp = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_NUMBER_PROP = "number_prop"; + private JsonNullable numberProp = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_BOOLEAN_PROP = "boolean_prop"; + private JsonNullable booleanProp = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_STRING_PROP = "string_prop"; + private JsonNullable stringProp = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DATE_PROP = "date_prop"; + private JsonNullable dateProp = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DATETIME_PROP = "datetime_prop"; + private JsonNullable datetimeProp = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ARRAY_NULLABLE_PROP = "array_nullable_prop"; + private JsonNullable> arrayNullableProp = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_ARRAY_AND_ITEMS_NULLABLE_PROP = "array_and_items_nullable_prop"; + private JsonNullable> arrayAndItemsNullableProp = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_ARRAY_ITEMS_NULLABLE = "array_items_nullable"; + private List arrayItemsNullable = null; + + public static final String JSON_PROPERTY_OBJECT_NULLABLE_PROP = "object_nullable_prop"; + private JsonNullable> objectNullableProp = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_OBJECT_AND_ITEMS_NULLABLE_PROP = "object_and_items_nullable_prop"; + private JsonNullable> objectAndItemsNullableProp = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_OBJECT_ITEMS_NULLABLE = "object_items_nullable"; + private Map objectItemsNullable = null; + + public NullableClass() { + } + + public NullableClass integerProp(Integer integerProp) { + this.integerProp = JsonNullable.of(integerProp); + return this; + } + + /** + * Get integerProp + * @return integerProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public Integer getIntegerProp() { + return integerProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_INTEGER_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getIntegerProp_JsonNullable() { + return integerProp; + } + + @JsonProperty(JSON_PROPERTY_INTEGER_PROP) + public void setIntegerProp_JsonNullable(JsonNullable integerProp) { + this.integerProp = integerProp; + } + + public void setIntegerProp(Integer integerProp) { + this.integerProp = JsonNullable.of(integerProp); + } + + + public NullableClass numberProp(BigDecimal numberProp) { + this.numberProp = JsonNullable.of(numberProp); + return this; + } + + /** + * Get numberProp + * @return numberProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public BigDecimal getNumberProp() { + return numberProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NUMBER_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNumberProp_JsonNullable() { + return numberProp; + } + + @JsonProperty(JSON_PROPERTY_NUMBER_PROP) + public void setNumberProp_JsonNullable(JsonNullable numberProp) { + this.numberProp = numberProp; + } + + public void setNumberProp(BigDecimal numberProp) { + this.numberProp = JsonNullable.of(numberProp); + } + + + public NullableClass booleanProp(Boolean booleanProp) { + this.booleanProp = JsonNullable.of(booleanProp); + return this; + } + + /** + * Get booleanProp + * @return booleanProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public Boolean getBooleanProp() { + return booleanProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_BOOLEAN_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getBooleanProp_JsonNullable() { + return booleanProp; + } + + @JsonProperty(JSON_PROPERTY_BOOLEAN_PROP) + public void setBooleanProp_JsonNullable(JsonNullable booleanProp) { + this.booleanProp = booleanProp; + } + + public void setBooleanProp(Boolean booleanProp) { + this.booleanProp = JsonNullable.of(booleanProp); + } + + + public NullableClass stringProp(String stringProp) { + this.stringProp = JsonNullable.of(stringProp); + return this; + } + + /** + * Get stringProp + * @return stringProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public String getStringProp() { + return stringProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_STRING_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getStringProp_JsonNullable() { + return stringProp; + } + + @JsonProperty(JSON_PROPERTY_STRING_PROP) + public void setStringProp_JsonNullable(JsonNullable stringProp) { + this.stringProp = stringProp; + } + + public void setStringProp(String stringProp) { + this.stringProp = JsonNullable.of(stringProp); + } + + + public NullableClass dateProp(LocalDate dateProp) { + this.dateProp = JsonNullable.of(dateProp); + return this; + } + + /** + * Get dateProp + * @return dateProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public LocalDate getDateProp() { + return dateProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DATE_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDateProp_JsonNullable() { + return dateProp; + } + + @JsonProperty(JSON_PROPERTY_DATE_PROP) + public void setDateProp_JsonNullable(JsonNullable dateProp) { + this.dateProp = dateProp; + } + + public void setDateProp(LocalDate dateProp) { + this.dateProp = JsonNullable.of(dateProp); + } + + + public NullableClass datetimeProp(OffsetDateTime datetimeProp) { + this.datetimeProp = JsonNullable.of(datetimeProp); + return this; + } + + /** + * Get datetimeProp + * @return datetimeProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public OffsetDateTime getDatetimeProp() { + return datetimeProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DATETIME_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDatetimeProp_JsonNullable() { + return datetimeProp; + } + + @JsonProperty(JSON_PROPERTY_DATETIME_PROP) + public void setDatetimeProp_JsonNullable(JsonNullable datetimeProp) { + this.datetimeProp = datetimeProp; + } + + public void setDatetimeProp(OffsetDateTime datetimeProp) { + this.datetimeProp = JsonNullable.of(datetimeProp); + } + + + public NullableClass arrayNullableProp(List arrayNullableProp) { + this.arrayNullableProp = JsonNullable.>of(arrayNullableProp); + return this; + } + + public NullableClass addArrayNullablePropItem(Object arrayNullablePropItem) { + if (this.arrayNullableProp == null || !this.arrayNullableProp.isPresent()) { + this.arrayNullableProp = JsonNullable.>of(new ArrayList<>()); + } + try { + this.arrayNullableProp.get().add(arrayNullablePropItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get arrayNullableProp + * @return arrayNullableProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public List getArrayNullableProp() { + return arrayNullableProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ARRAY_NULLABLE_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getArrayNullableProp_JsonNullable() { + return arrayNullableProp; + } + + @JsonProperty(JSON_PROPERTY_ARRAY_NULLABLE_PROP) + public void setArrayNullableProp_JsonNullable(JsonNullable> arrayNullableProp) { + this.arrayNullableProp = arrayNullableProp; + } + + public void setArrayNullableProp(List arrayNullableProp) { + this.arrayNullableProp = JsonNullable.>of(arrayNullableProp); + } + + + public NullableClass arrayAndItemsNullableProp(List arrayAndItemsNullableProp) { + this.arrayAndItemsNullableProp = JsonNullable.>of(arrayAndItemsNullableProp); + return this; + } + + public NullableClass addArrayAndItemsNullablePropItem(Object arrayAndItemsNullablePropItem) { + if (this.arrayAndItemsNullableProp == null || !this.arrayAndItemsNullableProp.isPresent()) { + this.arrayAndItemsNullableProp = JsonNullable.>of(new ArrayList<>()); + } + try { + this.arrayAndItemsNullableProp.get().add(arrayAndItemsNullablePropItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get arrayAndItemsNullableProp + * @return arrayAndItemsNullableProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public List getArrayAndItemsNullableProp() { + return arrayAndItemsNullableProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ARRAY_AND_ITEMS_NULLABLE_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getArrayAndItemsNullableProp_JsonNullable() { + return arrayAndItemsNullableProp; + } + + @JsonProperty(JSON_PROPERTY_ARRAY_AND_ITEMS_NULLABLE_PROP) + public void setArrayAndItemsNullableProp_JsonNullable(JsonNullable> arrayAndItemsNullableProp) { + this.arrayAndItemsNullableProp = arrayAndItemsNullableProp; + } + + public void setArrayAndItemsNullableProp(List arrayAndItemsNullableProp) { + this.arrayAndItemsNullableProp = JsonNullable.>of(arrayAndItemsNullableProp); + } + + + public NullableClass arrayItemsNullable(List arrayItemsNullable) { + this.arrayItemsNullable = arrayItemsNullable; + return this; + } + + public NullableClass addArrayItemsNullableItem(Object arrayItemsNullableItem) { + if (this.arrayItemsNullable == null) { + this.arrayItemsNullable = new ArrayList<>(); + } + this.arrayItemsNullable.add(arrayItemsNullableItem); + return this; + } + + /** + * Get arrayItemsNullable + * @return arrayItemsNullable + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ARRAY_ITEMS_NULLABLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getArrayItemsNullable() { + return arrayItemsNullable; + } + + + @JsonProperty(JSON_PROPERTY_ARRAY_ITEMS_NULLABLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setArrayItemsNullable(List arrayItemsNullable) { + this.arrayItemsNullable = arrayItemsNullable; + } + + + public NullableClass objectNullableProp(Map objectNullableProp) { + this.objectNullableProp = JsonNullable.>of(objectNullableProp); + return this; + } + + public NullableClass putObjectNullablePropItem(String key, Object objectNullablePropItem) { + if (this.objectNullableProp == null || !this.objectNullableProp.isPresent()) { + this.objectNullableProp = JsonNullable.>of(new HashMap<>()); + } + try { + this.objectNullableProp.get().put(key, objectNullablePropItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get objectNullableProp + * @return objectNullableProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public Map getObjectNullableProp() { + return objectNullableProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_OBJECT_NULLABLE_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getObjectNullableProp_JsonNullable() { + return objectNullableProp; + } + + @JsonProperty(JSON_PROPERTY_OBJECT_NULLABLE_PROP) + public void setObjectNullableProp_JsonNullable(JsonNullable> objectNullableProp) { + this.objectNullableProp = objectNullableProp; + } + + public void setObjectNullableProp(Map objectNullableProp) { + this.objectNullableProp = JsonNullable.>of(objectNullableProp); + } + + + public NullableClass objectAndItemsNullableProp(Map objectAndItemsNullableProp) { + this.objectAndItemsNullableProp = JsonNullable.>of(objectAndItemsNullableProp); + return this; + } + + public NullableClass putObjectAndItemsNullablePropItem(String key, Object objectAndItemsNullablePropItem) { + if (this.objectAndItemsNullableProp == null || !this.objectAndItemsNullableProp.isPresent()) { + this.objectAndItemsNullableProp = JsonNullable.>of(new HashMap<>()); + } + try { + this.objectAndItemsNullableProp.get().put(key, objectAndItemsNullablePropItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get objectAndItemsNullableProp + * @return objectAndItemsNullableProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public Map getObjectAndItemsNullableProp() { + return objectAndItemsNullableProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_OBJECT_AND_ITEMS_NULLABLE_PROP) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getObjectAndItemsNullableProp_JsonNullable() { + return objectAndItemsNullableProp; + } + + @JsonProperty(JSON_PROPERTY_OBJECT_AND_ITEMS_NULLABLE_PROP) + public void setObjectAndItemsNullableProp_JsonNullable(JsonNullable> objectAndItemsNullableProp) { + this.objectAndItemsNullableProp = objectAndItemsNullableProp; + } + + public void setObjectAndItemsNullableProp(Map objectAndItemsNullableProp) { + this.objectAndItemsNullableProp = JsonNullable.>of(objectAndItemsNullableProp); + } + + + public NullableClass objectItemsNullable(Map objectItemsNullable) { + this.objectItemsNullable = objectItemsNullable; + return this; + } + + public NullableClass putObjectItemsNullableItem(String key, Object objectItemsNullableItem) { + if (this.objectItemsNullable == null) { + this.objectItemsNullable = new HashMap<>(); + } + this.objectItemsNullable.put(key, objectItemsNullableItem); + return this; + } + + /** + * Get objectItemsNullable + * @return objectItemsNullable + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OBJECT_ITEMS_NULLABLE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + + public Map getObjectItemsNullable() { + return objectItemsNullable; + } + + + @JsonProperty(JSON_PROPERTY_OBJECT_ITEMS_NULLABLE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setObjectItemsNullable(Map objectItemsNullable) { + this.objectItemsNullable = objectItemsNullable; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * @param key the name of the property + * @param value the value of the property + * @return self reference + */ + @JsonAnySetter + public NullableClass putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) properties. + * @return the additional (undeclared) properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * @param key the name of the property + * @return the additional (undeclared) property with the specified name + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this NullableClass object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NullableClass nullableClass = (NullableClass) o; + return equalsNullable(this.integerProp, nullableClass.integerProp) && + equalsNullable(this.numberProp, nullableClass.numberProp) && + equalsNullable(this.booleanProp, nullableClass.booleanProp) && + equalsNullable(this.stringProp, nullableClass.stringProp) && + equalsNullable(this.dateProp, nullableClass.dateProp) && + equalsNullable(this.datetimeProp, nullableClass.datetimeProp) && + equalsNullable(this.arrayNullableProp, nullableClass.arrayNullableProp) && + equalsNullable(this.arrayAndItemsNullableProp, nullableClass.arrayAndItemsNullableProp) && + Objects.equals(this.arrayItemsNullable, nullableClass.arrayItemsNullable) && + equalsNullable(this.objectNullableProp, nullableClass.objectNullableProp) && + equalsNullable(this.objectAndItemsNullableProp, nullableClass.objectAndItemsNullableProp) && + Objects.equals(this.objectItemsNullable, nullableClass.objectItemsNullable)&& + Objects.equals(this.additionalProperties, nullableClass.additionalProperties) && + super.equals(o); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(integerProp), hashCodeNullable(numberProp), hashCodeNullable(booleanProp), hashCodeNullable(stringProp), hashCodeNullable(dateProp), hashCodeNullable(datetimeProp), hashCodeNullable(arrayNullableProp), hashCodeNullable(arrayAndItemsNullableProp), arrayItemsNullable, hashCodeNullable(objectNullableProp), hashCodeNullable(objectAndItemsNullableProp), objectItemsNullable, super.hashCode(), additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NullableClass {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" integerProp: ").append(toIndentedString(integerProp)).append("\n"); + sb.append(" numberProp: ").append(toIndentedString(numberProp)).append("\n"); + sb.append(" booleanProp: ").append(toIndentedString(booleanProp)).append("\n"); + sb.append(" stringProp: ").append(toIndentedString(stringProp)).append("\n"); + sb.append(" dateProp: ").append(toIndentedString(dateProp)).append("\n"); + sb.append(" datetimeProp: ").append(toIndentedString(datetimeProp)).append("\n"); + sb.append(" arrayNullableProp: ").append(toIndentedString(arrayNullableProp)).append("\n"); + sb.append(" arrayAndItemsNullableProp: ").append(toIndentedString(arrayAndItemsNullableProp)).append("\n"); + sb.append(" arrayItemsNullable: ").append(toIndentedString(arrayItemsNullable)).append("\n"); + sb.append(" objectNullableProp: ").append(toIndentedString(objectNullableProp)).append("\n"); + sb.append(" objectAndItemsNullableProp: ").append(toIndentedString(objectAndItemsNullableProp)).append("\n"); + sb.append(" objectItemsNullable: ").append(toIndentedString(objectItemsNullable)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java new file mode 100644 index 0000000000..21154f18b2 --- /dev/null +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java @@ -0,0 +1,219 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.client.model.DeprecatedObject; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ObjectWithDeprecatedFields + */ +@JsonPropertyOrder({ + ObjectWithDeprecatedFields.JSON_PROPERTY_UUID, + ObjectWithDeprecatedFields.JSON_PROPERTY_ID, + ObjectWithDeprecatedFields.JSON_PROPERTY_DEPRECATED_REF, + ObjectWithDeprecatedFields.JSON_PROPERTY_BARS +}) +@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ObjectWithDeprecatedFields { + public static final String JSON_PROPERTY_UUID = "uuid"; + private String uuid; + + public static final String JSON_PROPERTY_ID = "id"; + private BigDecimal id; + + public static final String JSON_PROPERTY_DEPRECATED_REF = "deprecatedRef"; + private DeprecatedObject deprecatedRef; + + public static final String JSON_PROPERTY_BARS = "bars"; + private List bars = null; + + public ObjectWithDeprecatedFields() { + } + + public ObjectWithDeprecatedFields uuid(String uuid) { + this.uuid = uuid; + return this; + } + + /** + * Get uuid + * @return uuid + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UUID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getUuid() { + return uuid; + } + + + @JsonProperty(JSON_PROPERTY_UUID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUuid(String uuid) { + this.uuid = uuid; + } + + + public ObjectWithDeprecatedFields id(BigDecimal id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + * @deprecated + **/ + @Deprecated + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BigDecimal getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(BigDecimal id) { + this.id = id; + } + + + public ObjectWithDeprecatedFields deprecatedRef(DeprecatedObject deprecatedRef) { + this.deprecatedRef = deprecatedRef; + return this; + } + + /** + * Get deprecatedRef + * @return deprecatedRef + * @deprecated + **/ + @Deprecated + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DEPRECATED_REF) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public DeprecatedObject getDeprecatedRef() { + return deprecatedRef; + } + + + @JsonProperty(JSON_PROPERTY_DEPRECATED_REF) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDeprecatedRef(DeprecatedObject deprecatedRef) { + this.deprecatedRef = deprecatedRef; + } + + + public ObjectWithDeprecatedFields bars(List bars) { + this.bars = bars; + return this; + } + + public ObjectWithDeprecatedFields addBarsItem(String barsItem) { + if (this.bars == null) { + this.bars = new ArrayList<>(); + } + this.bars.add(barsItem); + return this; + } + + /** + * Get bars + * @return bars + * @deprecated + **/ + @Deprecated + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BARS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getBars() { + return bars; + } + + + @JsonProperty(JSON_PROPERTY_BARS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBars(List bars) { + this.bars = bars; + } + + + /** + * Return true if this ObjectWithDeprecatedFields object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ObjectWithDeprecatedFields objectWithDeprecatedFields = (ObjectWithDeprecatedFields) o; + return Objects.equals(this.uuid, objectWithDeprecatedFields.uuid) && + Objects.equals(this.id, objectWithDeprecatedFields.id) && + Objects.equals(this.deprecatedRef, objectWithDeprecatedFields.deprecatedRef) && + Objects.equals(this.bars, objectWithDeprecatedFields.bars); + } + + @Override + public int hashCode() { + return Objects.hash(uuid, id, deprecatedRef, bars); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ObjectWithDeprecatedFields {\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" deprecatedRef: ").append(toIndentedString(deprecatedRef)).append("\n"); + sb.append(" bars: ").append(toIndentedString(bars)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/OuterEnum.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/OuterEnum.java index 4f5adceee2..afc9120412 100644 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/OuterEnum.java +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/OuterEnum.java @@ -57,7 +57,7 @@ public enum OuterEnum { return b; } } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); + return null; } } diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java new file mode 100644 index 0000000000..f24d69e69e --- /dev/null +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java @@ -0,0 +1,63 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets OuterEnumDefaultValue + */ +public enum OuterEnumDefaultValue { + + PLACED("placed"), + + APPROVED("approved"), + + DELIVERED("delivered"); + + private String value; + + OuterEnumDefaultValue(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OuterEnumDefaultValue fromValue(String value) { + for (OuterEnumDefaultValue b : OuterEnumDefaultValue.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/OuterEnumInteger.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/OuterEnumInteger.java new file mode 100644 index 0000000000..e2d7dd1409 --- /dev/null +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/OuterEnumInteger.java @@ -0,0 +1,63 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets OuterEnumInteger + */ +public enum OuterEnumInteger { + + NUMBER_0(0), + + NUMBER_1(1), + + NUMBER_2(2); + + private Integer value; + + OuterEnumInteger(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OuterEnumInteger fromValue(Integer value) { + for (OuterEnumInteger b : OuterEnumInteger.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java new file mode 100644 index 0000000000..029cf8899a --- /dev/null +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java @@ -0,0 +1,63 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets OuterEnumIntegerDefaultValue + */ +public enum OuterEnumIntegerDefaultValue { + + NUMBER_0(0), + + NUMBER_1(1), + + NUMBER_2(2); + + private Integer value; + + OuterEnumIntegerDefaultValue(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OuterEnumIntegerDefaultValue fromValue(Integer value) { + for (OuterEnumIntegerDefaultValue b : OuterEnumIntegerDefaultValue.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java new file mode 100644 index 0000000000..5d10aea545 --- /dev/null +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java @@ -0,0 +1,109 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.client.model.OuterEnumInteger; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * OuterObjectWithEnumProperty + */ +@JsonPropertyOrder({ + OuterObjectWithEnumProperty.JSON_PROPERTY_VALUE +}) +@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class OuterObjectWithEnumProperty { + public static final String JSON_PROPERTY_VALUE = "value"; + private OuterEnumInteger value; + + public OuterObjectWithEnumProperty() { + } + + public OuterObjectWithEnumProperty value(OuterEnumInteger value) { + this.value = value; + return this; + } + + /** + * Get value + * @return value + **/ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OuterEnumInteger getValue() { + return value; + } + + + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setValue(OuterEnumInteger value) { + this.value = value; + } + + + /** + * Return true if this OuterObjectWithEnumProperty object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OuterObjectWithEnumProperty outerObjectWithEnumProperty = (OuterObjectWithEnumProperty) o; + return Objects.equals(this.value, outerObjectWithEnumProperty.value); + } + + @Override + public int hashCode() { + return Objects.hash(value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OuterObjectWithEnumProperty {\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/SingleRefType.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/SingleRefType.java new file mode 100644 index 0000000000..bda82b5fe7 --- /dev/null +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/SingleRefType.java @@ -0,0 +1,61 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets SingleRefType + */ +public enum SingleRefType { + + ADMIN("admin"), + + USER("user"); + + private String value; + + SingleRefType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SingleRefType fromValue(String value) { + for (SingleRefType b : SingleRefType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/SpecialModelName.java index 0ddd9e563c..b9474286ab 100644 --- a/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/native-async/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -65,7 +65,7 @@ public class SpecialModelName { /** - * Return true if this $special[model.name] object is equal to o. + * Return true if this _special_model.name_ object is equal to o. */ @Override public boolean equals(Object o) { @@ -75,8 +75,8 @@ public class SpecialModelName { if (o == null || getClass() != o.getClass()) { return false; } - SpecialModelName $specialModelName = (SpecialModelName) o; - return Objects.equals(this.$specialPropertyName, $specialModelName.$specialPropertyName); + SpecialModelName specialModelName = (SpecialModelName) o; + return Objects.equals(this.$specialPropertyName, specialModelName.$specialPropertyName); } @Override diff --git a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java b/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java index 8022ebac99..8f841e28f6 100644 --- a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java +++ b/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java @@ -22,6 +22,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Set; import java.util.concurrent.CompletableFuture; @@ -44,9 +45,9 @@ public class AnotherFakeApiTest { */ @Test public void call123testSpecialTagsTest() throws ApiException { - Client body = null; + Client client = null; CompletableFuture response = - api.call123testSpecialTags(body); + api.call123testSpecialTags(client); // TODO: test validations } diff --git a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/api/DefaultApiTest.java b/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/api/DefaultApiTest.java new file mode 100644 index 0000000000..833c05f940 --- /dev/null +++ b/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/api/DefaultApiTest.java @@ -0,0 +1,54 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.api; + +import org.openapitools.client.ApiException; +import org.openapitools.client.model.FooGetDefaultResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import java.util.concurrent.CompletableFuture; + +/** + * API tests for DefaultApi + */ +@Ignore +public class DefaultApiTest { + + private final DefaultApi api = new DefaultApi(); + + + /** + * + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void fooGetTest() throws ApiException { + CompletableFuture response = + api.fooGet(); + + // TODO: test validations + } + +} diff --git a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/api/FakeApiTest.java b/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/api/FakeApiTest.java index e73d4f28e2..1bec054a57 100644 --- a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/api/FakeApiTest.java +++ b/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/api/FakeApiTest.java @@ -16,13 +16,16 @@ package org.openapitools.client.api; import org.openapitools.client.ApiException; import java.math.BigDecimal; import org.openapitools.client.model.Client; +import org.openapitools.client.model.EnumClass; import java.io.File; import org.openapitools.client.model.FileSchemaTestClass; +import org.openapitools.client.model.HealthCheckResult; import java.time.LocalDate; import java.time.OffsetDateTime; import org.openapitools.client.model.OuterComposite; +import org.openapitools.client.model.OuterObjectWithEnumProperty; +import org.openapitools.client.model.Pet; import org.openapitools.client.model.User; -import org.openapitools.client.model.XmlItem; import org.junit.Test; import org.junit.Ignore; @@ -30,6 +33,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Set; import java.util.concurrent.CompletableFuture; @@ -43,18 +47,36 @@ public class FakeApiTest { /** - * creates an XmlItem + * Health check endpoint * - * this route creates an XmlItem + * * * @throws ApiException * if the Api call fails */ @Test - public void createXmlItemTest() throws ApiException { - XmlItem xmlItem = null; + public void fakeHealthGetTest() throws ApiException { + CompletableFuture response = + api.fakeHealthGet(); - CompletableFuture response = api.createXmlItem(xmlItem); + // TODO: test validations + } + + /** + * test http signature authentication + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void fakeHttpSignatureTestTest() throws ApiException { + Pet pet = null; + String query1 = null; + String header1 = null; + + CompletableFuture response = api.fakeHttpSignatureTest(pet, query1, header1); // TODO: test validations } @@ -86,9 +108,9 @@ public class FakeApiTest { */ @Test public void fakeOuterCompositeSerializeTest() throws ApiException { - OuterComposite body = null; + OuterComposite outerComposite = null; CompletableFuture response = - api.fakeOuterCompositeSerialize(body); + api.fakeOuterCompositeSerialize(outerComposite); // TODO: test validations } @@ -130,16 +152,50 @@ public class FakeApiTest { /** * * - * For this test, the body for this request much reference a schema named `File`. + * Test serialization of enum (int) properties with examples + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void fakePropertyEnumIntegerSerializeTest() throws ApiException { + OuterObjectWithEnumProperty outerObjectWithEnumProperty = null; + CompletableFuture response = + api.fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty); + + // TODO: test validations + } + + /** + * + * + * For this test, the body has to be a binary file. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testBodyWithBinaryTest() throws ApiException { + File body = null; + + CompletableFuture response = api.testBodyWithBinary(body); + + // TODO: test validations + } + + /** + * + * + * For this test, the body for this request must reference a schema named `File`. * * @throws ApiException * if the Api call fails */ @Test public void testBodyWithFileSchemaTest() throws ApiException { - FileSchemaTestClass body = null; + FileSchemaTestClass fileSchemaTestClass = null; - CompletableFuture response = api.testBodyWithFileSchema(body); + CompletableFuture response = api.testBodyWithFileSchema(fileSchemaTestClass); // TODO: test validations } @@ -155,9 +211,9 @@ public class FakeApiTest { @Test public void testBodyWithQueryParamsTest() throws ApiException { String query = null; - User body = null; + User user = null; - CompletableFuture response = api.testBodyWithQueryParams(query, body); + CompletableFuture response = api.testBodyWithQueryParams(query, user); // TODO: test validations } @@ -172,17 +228,17 @@ public class FakeApiTest { */ @Test public void testClientModelTest() throws ApiException { - Client body = null; + Client client = null; CompletableFuture response = - api.testClientModel(body); + api.testClientModel(client); // TODO: test validations } /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * * @throws ApiException * if the Api call fails @@ -225,10 +281,11 @@ public class FakeApiTest { String enumQueryString = null; Integer enumQueryInteger = null; Double enumQueryDouble = null; + List enumQueryModelArray = null; List enumFormStringArray = null; String enumFormString = null; - CompletableFuture response = api.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + CompletableFuture response = api.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString); // TODO: test validations } @@ -274,9 +331,9 @@ public class FakeApiTest { */ @Test public void testInlineAdditionalPropertiesTest() throws ApiException { - Map param = null; + Map requestBody = null; - CompletableFuture response = api.testInlineAdditionalProperties(param); + CompletableFuture response = api.testInlineAdditionalProperties(requestBody); // TODO: test validations } @@ -314,8 +371,10 @@ public class FakeApiTest { List http = null; List url = null; List context = null; + String allowEmpty = null; + Map language = null; - CompletableFuture response = api.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context); + CompletableFuture response = api.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language); // TODO: test validations } diff --git a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java b/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java index a63cac2186..6cc5bf21f8 100644 --- a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java +++ b/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java @@ -22,6 +22,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Set; import java.util.concurrent.CompletableFuture; @@ -44,9 +45,9 @@ public class FakeClassnameTags123ApiTest { */ @Test public void testClassnameTest() throws ApiException { - Client body = null; + Client client = null; CompletableFuture response = - api.testClassname(body); + api.testClassname(client); // TODO: test validations } diff --git a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/api/PetApiTest.java b/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/api/PetApiTest.java index 933cb8c341..7395e0b820 100644 --- a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/api/PetApiTest.java +++ b/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/api/PetApiTest.java @@ -25,6 +25,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Set; import java.util.concurrent.CompletableFuture; @@ -47,9 +48,9 @@ public class PetApiTest { */ @Test public void addPetTest() throws ApiException { - Pet body = null; + Pet pet = null; - CompletableFuture response = api.addPet(body); + CompletableFuture response = api.addPet(pet); // TODO: test validations } @@ -133,9 +134,9 @@ public class PetApiTest { */ @Test public void updatePetTest() throws ApiException { - Pet body = null; + Pet pet = null; - CompletableFuture response = api.updatePet(body); + CompletableFuture response = api.updatePet(pet); // TODO: test validations } @@ -171,9 +172,9 @@ public class PetApiTest { public void uploadFileTest() throws ApiException { Long petId = null; String additionalMetadata = null; - File file = null; + File _file = null; CompletableFuture response = - api.uploadFile(petId, additionalMetadata, file); + api.uploadFile(petId, additionalMetadata, _file); // TODO: test validations } diff --git a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/api/StoreApiTest.java index a130cb587f..bc13789341 100644 --- a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -22,6 +22,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Set; import java.util.concurrent.CompletableFuture; @@ -94,9 +95,9 @@ public class StoreApiTest { */ @Test public void placeOrderTest() throws ApiException { - Order body = null; + Order order = null; CompletableFuture response = - api.placeOrder(body); + api.placeOrder(order); // TODO: test validations } diff --git a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/api/UserApiTest.java b/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/api/UserApiTest.java index 265b71ad0c..fd849a92b3 100644 --- a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/api/UserApiTest.java +++ b/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/api/UserApiTest.java @@ -14,6 +14,7 @@ package org.openapitools.client.api; import org.openapitools.client.ApiException; +import java.time.OffsetDateTime; import org.openapitools.client.model.User; import org.junit.Test; import org.junit.Ignore; @@ -22,6 +23,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Set; import java.util.concurrent.CompletableFuture; @@ -44,9 +46,9 @@ public class UserApiTest { */ @Test public void createUserTest() throws ApiException { - User body = null; + User user = null; - CompletableFuture response = api.createUser(body); + CompletableFuture response = api.createUser(user); // TODO: test validations } @@ -61,9 +63,9 @@ public class UserApiTest { */ @Test public void createUsersWithArrayInputTest() throws ApiException { - List body = null; + List user = null; - CompletableFuture response = api.createUsersWithArrayInput(body); + CompletableFuture response = api.createUsersWithArrayInput(user); // TODO: test validations } @@ -78,9 +80,9 @@ public class UserApiTest { */ @Test public void createUsersWithListInputTest() throws ApiException { - List body = null; + List user = null; - CompletableFuture response = api.createUsersWithListInput(body); + CompletableFuture response = api.createUsersWithListInput(user); // TODO: test validations } @@ -164,9 +166,9 @@ public class UserApiTest { @Test public void updateUserTest() throws ApiException { String username = null; - User body = null; + User user = null; - CompletableFuture response = api.updateUser(username, body); + CompletableFuture response = api.updateUser(username, user); // TODO: test validations } diff --git a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java b/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java index 14fd8022fe..94f0881ce4 100644 --- a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java +++ b/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java @@ -18,9 +18,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import java.math.BigDecimal; import java.util.HashMap; -import java.util.List; import java.util.Map; import org.junit.Assert; import org.junit.Ignore; @@ -42,91 +40,19 @@ public class AdditionalPropertiesClassTest { } /** - * Test the property 'mapString' + * Test the property 'mapProperty' */ @Test - public void mapStringTest() { - // TODO: test mapString + public void mapPropertyTest() { + // TODO: test mapProperty } /** - * Test the property 'mapNumber' + * Test the property 'mapOfMapProperty' */ @Test - public void mapNumberTest() { - // TODO: test mapNumber - } - - /** - * Test the property 'mapInteger' - */ - @Test - public void mapIntegerTest() { - // TODO: test mapInteger - } - - /** - * Test the property 'mapBoolean' - */ - @Test - public void mapBooleanTest() { - // TODO: test mapBoolean - } - - /** - * Test the property 'mapArrayInteger' - */ - @Test - public void mapArrayIntegerTest() { - // TODO: test mapArrayInteger - } - - /** - * Test the property 'mapArrayAnytype' - */ - @Test - public void mapArrayAnytypeTest() { - // TODO: test mapArrayAnytype - } - - /** - * Test the property 'mapMapString' - */ - @Test - public void mapMapStringTest() { - // TODO: test mapMapString - } - - /** - * Test the property 'mapMapAnytype' - */ - @Test - public void mapMapAnytypeTest() { - // TODO: test mapMapAnytype - } - - /** - * Test the property 'anytype1' - */ - @Test - public void anytype1Test() { - // TODO: test anytype1 - } - - /** - * Test the property 'anytype2' - */ - @Test - public void anytype2Test() { - // TODO: test anytype2 - } - - /** - * Test the property 'anytype3' - */ - @Test - public void anytype3Test() { - // TODO: test anytype3 + public void mapOfMapPropertyTest() { + // TODO: test mapOfMapProperty } } diff --git a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java b/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java deleted file mode 100644 index 10ad938f52..0000000000 --- a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.math.BigDecimal; -import java.util.HashMap; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for AdditionalPropertiesNumber - */ -public class AdditionalPropertiesNumberTest { - private final AdditionalPropertiesNumber model = new AdditionalPropertiesNumber(); - - /** - * Model tests for AdditionalPropertiesNumber - */ - @Test - public void testAdditionalPropertiesNumber() { - // TODO: test AdditionalPropertiesNumber - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/AllOfWithSingleRefTest.java b/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/AllOfWithSingleRefTest.java new file mode 100644 index 0000000000..1acef2d396 --- /dev/null +++ b/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/AllOfWithSingleRefTest.java @@ -0,0 +1,57 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.client.model.SingleRefType; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for AllOfWithSingleRef + */ +public class AllOfWithSingleRefTest { + private final AllOfWithSingleRef model = new AllOfWithSingleRef(); + + /** + * Model tests for AllOfWithSingleRef + */ + @Test + public void testAllOfWithSingleRef() { + // TODO: test AllOfWithSingleRef + } + + /** + * Test the property 'username' + */ + @Test + public void usernameTest() { + // TODO: test username + } + + /** + * Test the property 'singleRefType' + */ + @Test + public void singleRefTypeTest() { + // TODO: test singleRefType + } + +} diff --git a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/AnimalTest.java b/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/AnimalTest.java index 930e5c17d0..15d5c977c6 100644 --- a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/AnimalTest.java +++ b/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/AnimalTest.java @@ -21,7 +21,6 @@ import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import org.openapitools.client.model.BigCat; import org.openapitools.client.model.Cat; import org.openapitools.client.model.Dog; import org.junit.Assert; diff --git a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/BigCatTest.java b/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/BigCatTest.java deleted file mode 100644 index f6c4621c9e..0000000000 --- a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/BigCatTest.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.openapitools.client.model.Cat; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for BigCat - */ -public class BigCatTest { - private final BigCat model = new BigCat(); - - /** - * Model tests for BigCat - */ - @Test - public void testBigCat() { - // TODO: test BigCat - } - - /** - * Test the property 'className' - */ - @Test - public void classNameTest() { - // TODO: test className - } - - /** - * Test the property 'color' - */ - @Test - public void colorTest() { - // TODO: test color - } - - /** - * Test the property 'declawed' - */ - @Test - public void declawedTest() { - // TODO: test declawed - } - - /** - * Test the property 'kind' - */ - @Test - public void kindTest() { - // TODO: test kind - } - -} diff --git a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/CatTest.java b/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/CatTest.java index 90fdba14c2..c3827d3a2e 100644 --- a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/CatTest.java +++ b/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/CatTest.java @@ -22,7 +22,6 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.client.model.Animal; -import org.openapitools.client.model.BigCat; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; diff --git a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java b/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/DeprecatedObjectTest.java similarity index 71% rename from samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java rename to samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/DeprecatedObjectTest.java index bcbb9c54b2..a61e43f63a 100644 --- a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java +++ b/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/DeprecatedObjectTest.java @@ -18,25 +18,23 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import java.util.HashMap; -import java.util.Map; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; /** - * Model tests for AdditionalPropertiesObject + * Model tests for DeprecatedObject */ -public class AdditionalPropertiesObjectTest { - private final AdditionalPropertiesObject model = new AdditionalPropertiesObject(); +public class DeprecatedObjectTest { + private final DeprecatedObject model = new DeprecatedObject(); /** - * Model tests for AdditionalPropertiesObject + * Model tests for DeprecatedObject */ @Test - public void testAdditionalPropertiesObject() { - // TODO: test AdditionalPropertiesObject + public void testDeprecatedObject() { + // TODO: test DeprecatedObject } /** diff --git a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/EnumTestTest.java b/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/EnumTestTest.java index 8907cfa8e8..1b55a5dade 100644 --- a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/EnumTestTest.java +++ b/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/EnumTestTest.java @@ -19,6 +19,13 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.client.model.OuterEnum; +import org.openapitools.client.model.OuterEnumDefaultValue; +import org.openapitools.client.model.OuterEnumInteger; +import org.openapitools.client.model.OuterEnumIntegerDefaultValue; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; @@ -78,4 +85,28 @@ public class EnumTestTest { // TODO: test outerEnum } + /** + * Test the property 'outerEnumInteger' + */ + @Test + public void outerEnumIntegerTest() { + // TODO: test outerEnumInteger + } + + /** + * Test the property 'outerEnumDefaultValue' + */ + @Test + public void outerEnumDefaultValueTest() { + // TODO: test outerEnumDefaultValue + } + + /** + * Test the property 'outerEnumIntegerDefaultValue' + */ + @Test + public void outerEnumIntegerDefaultValueTest() { + // TODO: test outerEnumIntegerDefaultValue + } + } diff --git a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/FooGetDefaultResponseTest.java b/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/FooGetDefaultResponseTest.java new file mode 100644 index 0000000000..5830df74c8 --- /dev/null +++ b/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/FooGetDefaultResponseTest.java @@ -0,0 +1,49 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.client.model.Foo; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for FooGetDefaultResponse + */ +public class FooGetDefaultResponseTest { + private final FooGetDefaultResponse model = new FooGetDefaultResponse(); + + /** + * Model tests for FooGetDefaultResponse + */ + @Test + public void testFooGetDefaultResponse() { + // TODO: test FooGetDefaultResponse + } + + /** + * Test the property 'string' + */ + @Test + public void stringTest() { + // TODO: test string + } + +} diff --git a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java b/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/FooTest.java similarity index 73% rename from samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java rename to samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/FooTest.java index 8e291df45f..195e487a79 100644 --- a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/BigCatAllOfTest.java +++ b/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/FooTest.java @@ -24,25 +24,25 @@ import org.junit.Test; /** - * Model tests for BigCatAllOf + * Model tests for Foo */ -public class BigCatAllOfTest { - private final BigCatAllOf model = new BigCatAllOf(); +public class FooTest { + private final Foo model = new Foo(); /** - * Model tests for BigCatAllOf + * Model tests for Foo */ @Test - public void testBigCatAllOf() { - // TODO: test BigCatAllOf + public void testFoo() { + // TODO: test Foo } /** - * Test the property 'kind' + * Test the property 'bar' */ @Test - public void kindTest() { - // TODO: test kind + public void barTest() { + // TODO: test bar } } diff --git a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/FormatTestTest.java b/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/FormatTestTest.java index 48bec93d99..fba75da100 100644 --- a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/FormatTestTest.java +++ b/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/FormatTestTest.java @@ -90,6 +90,14 @@ public class FormatTestTest { // TODO: test _double } + /** + * Test the property 'decimal' + */ + @Test + public void decimalTest() { + // TODO: test decimal + } + /** * Test the property 'string' */ @@ -147,11 +155,19 @@ public class FormatTestTest { } /** - * Test the property 'bigDecimal' + * Test the property 'patternWithDigits' */ @Test - public void bigDecimalTest() { - // TODO: test bigDecimal + public void patternWithDigitsTest() { + // TODO: test patternWithDigits + } + + /** + * Test the property 'patternWithDigitsAndDelimiter' + */ + @Test + public void patternWithDigitsAndDelimiterTest() { + // TODO: test patternWithDigitsAndDelimiter } } diff --git a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/HealthCheckResultTest.java b/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/HealthCheckResultTest.java new file mode 100644 index 0000000000..15cc82702c --- /dev/null +++ b/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/HealthCheckResultTest.java @@ -0,0 +1,52 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for HealthCheckResult + */ +public class HealthCheckResultTest { + private final HealthCheckResult model = new HealthCheckResult(); + + /** + * Model tests for HealthCheckResult + */ + @Test + public void testHealthCheckResult() { + // TODO: test HealthCheckResult + } + + /** + * Test the property 'nullableMessage' + */ + @Test + public void nullableMessageTest() { + // TODO: test nullableMessage + } + +} diff --git a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/NullableClassTest.java b/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/NullableClassTest.java new file mode 100644 index 0000000000..cb3a631c91 --- /dev/null +++ b/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/NullableClassTest.java @@ -0,0 +1,147 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for NullableClass + */ +public class NullableClassTest { + private final NullableClass model = new NullableClass(); + + /** + * Model tests for NullableClass + */ + @Test + public void testNullableClass() { + // TODO: test NullableClass + } + + /** + * Test the property 'integerProp' + */ + @Test + public void integerPropTest() { + // TODO: test integerProp + } + + /** + * Test the property 'numberProp' + */ + @Test + public void numberPropTest() { + // TODO: test numberProp + } + + /** + * Test the property 'booleanProp' + */ + @Test + public void booleanPropTest() { + // TODO: test booleanProp + } + + /** + * Test the property 'stringProp' + */ + @Test + public void stringPropTest() { + // TODO: test stringProp + } + + /** + * Test the property 'dateProp' + */ + @Test + public void datePropTest() { + // TODO: test dateProp + } + + /** + * Test the property 'datetimeProp' + */ + @Test + public void datetimePropTest() { + // TODO: test datetimeProp + } + + /** + * Test the property 'arrayNullableProp' + */ + @Test + public void arrayNullablePropTest() { + // TODO: test arrayNullableProp + } + + /** + * Test the property 'arrayAndItemsNullableProp' + */ + @Test + public void arrayAndItemsNullablePropTest() { + // TODO: test arrayAndItemsNullableProp + } + + /** + * Test the property 'arrayItemsNullable' + */ + @Test + public void arrayItemsNullableTest() { + // TODO: test arrayItemsNullable + } + + /** + * Test the property 'objectNullableProp' + */ + @Test + public void objectNullablePropTest() { + // TODO: test objectNullableProp + } + + /** + * Test the property 'objectAndItemsNullableProp' + */ + @Test + public void objectAndItemsNullablePropTest() { + // TODO: test objectAndItemsNullableProp + } + + /** + * Test the property 'objectItemsNullable' + */ + @Test + public void objectItemsNullableTest() { + // TODO: test objectItemsNullable + } + +} diff --git a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java b/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/ObjectWithDeprecatedFieldsTest.java similarity index 55% rename from samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java rename to samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/ObjectWithDeprecatedFieldsTest.java index 8c096c188f..c59d5beba3 100644 --- a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java +++ b/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/ObjectWithDeprecatedFieldsTest.java @@ -21,63 +21,56 @@ import com.fasterxml.jackson.annotation.JsonValue; import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; +import org.openapitools.client.model.DeprecatedObject; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; /** - * Model tests for TypeHolderDefault + * Model tests for ObjectWithDeprecatedFields */ -public class TypeHolderDefaultTest { - private final TypeHolderDefault model = new TypeHolderDefault(); +public class ObjectWithDeprecatedFieldsTest { + private final ObjectWithDeprecatedFields model = new ObjectWithDeprecatedFields(); /** - * Model tests for TypeHolderDefault + * Model tests for ObjectWithDeprecatedFields */ @Test - public void testTypeHolderDefault() { - // TODO: test TypeHolderDefault + public void testObjectWithDeprecatedFields() { + // TODO: test ObjectWithDeprecatedFields } /** - * Test the property 'stringItem' + * Test the property 'uuid' */ @Test - public void stringItemTest() { - // TODO: test stringItem + public void uuidTest() { + // TODO: test uuid } /** - * Test the property 'numberItem' + * Test the property 'id' */ @Test - public void numberItemTest() { - // TODO: test numberItem + public void idTest() { + // TODO: test id } /** - * Test the property 'integerItem' + * Test the property 'deprecatedRef' */ @Test - public void integerItemTest() { - // TODO: test integerItem + public void deprecatedRefTest() { + // TODO: test deprecatedRef } /** - * Test the property 'boolItem' + * Test the property 'bars' */ @Test - public void boolItemTest() { - // TODO: test boolItem - } - - /** - * Test the property 'arrayItem' - */ - @Test - public void arrayItemTest() { - // TODO: test arrayItem + public void barsTest() { + // TODO: test bars } } diff --git a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/OuterEnumDefaultValueTest.java b/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/OuterEnumDefaultValueTest.java new file mode 100644 index 0000000000..59c4eebd2f --- /dev/null +++ b/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/OuterEnumDefaultValueTest.java @@ -0,0 +1,33 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for OuterEnumDefaultValue + */ +public class OuterEnumDefaultValueTest { + /** + * Model tests for OuterEnumDefaultValue + */ + @Test + public void testOuterEnumDefaultValue() { + // TODO: test OuterEnumDefaultValue + } + +} diff --git a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/OuterEnumIntegerDefaultValueTest.java b/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/OuterEnumIntegerDefaultValueTest.java new file mode 100644 index 0000000000..fa981c7093 --- /dev/null +++ b/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/OuterEnumIntegerDefaultValueTest.java @@ -0,0 +1,33 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for OuterEnumIntegerDefaultValue + */ +public class OuterEnumIntegerDefaultValueTest { + /** + * Model tests for OuterEnumIntegerDefaultValue + */ + @Test + public void testOuterEnumIntegerDefaultValue() { + // TODO: test OuterEnumIntegerDefaultValue + } + +} diff --git a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/OuterEnumIntegerTest.java b/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/OuterEnumIntegerTest.java new file mode 100644 index 0000000000..1b98d326bb --- /dev/null +++ b/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/OuterEnumIntegerTest.java @@ -0,0 +1,33 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for OuterEnumInteger + */ +public class OuterEnumIntegerTest { + /** + * Model tests for OuterEnumInteger + */ + @Test + public void testOuterEnumInteger() { + // TODO: test OuterEnumInteger + } + +} diff --git a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java b/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/OuterObjectWithEnumPropertyTest.java similarity index 64% rename from samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java rename to samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/OuterObjectWithEnumPropertyTest.java index 41e6497ece..1a436d40cb 100644 --- a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java +++ b/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/OuterObjectWithEnumPropertyTest.java @@ -18,34 +18,32 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import org.openapitools.client.model.OuterEnumInteger; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; /** - * Model tests for AdditionalPropertiesArray + * Model tests for OuterObjectWithEnumProperty */ -public class AdditionalPropertiesArrayTest { - private final AdditionalPropertiesArray model = new AdditionalPropertiesArray(); +public class OuterObjectWithEnumPropertyTest { + private final OuterObjectWithEnumProperty model = new OuterObjectWithEnumProperty(); /** - * Model tests for AdditionalPropertiesArray + * Model tests for OuterObjectWithEnumProperty */ @Test - public void testAdditionalPropertiesArray() { - // TODO: test AdditionalPropertiesArray + public void testOuterObjectWithEnumProperty() { + // TODO: test OuterObjectWithEnumProperty } /** - * Test the property 'name' + * Test the property 'value' */ @Test - public void nameTest() { - // TODO: test name + public void valueTest() { + // TODO: test value } } diff --git a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/SingleRefTypeTest.java b/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/SingleRefTypeTest.java new file mode 100644 index 0000000000..155e2a89b0 --- /dev/null +++ b/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/SingleRefTypeTest.java @@ -0,0 +1,33 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for SingleRefType + */ +public class SingleRefTypeTest { + /** + * Model tests for SingleRefType + */ + @Test + public void testSingleRefType() { + // TODO: test SingleRefType + } + +} diff --git a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java b/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java deleted file mode 100644 index b1655df616..0000000000 --- a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for TypeHolderExample - */ -public class TypeHolderExampleTest { - private final TypeHolderExample model = new TypeHolderExample(); - - /** - * Model tests for TypeHolderExample - */ - @Test - public void testTypeHolderExample() { - // TODO: test TypeHolderExample - } - - /** - * Test the property 'stringItem' - */ - @Test - public void stringItemTest() { - // TODO: test stringItem - } - - /** - * Test the property 'numberItem' - */ - @Test - public void numberItemTest() { - // TODO: test numberItem - } - - /** - * Test the property 'floatItem' - */ - @Test - public void floatItemTest() { - // TODO: test floatItem - } - - /** - * Test the property 'integerItem' - */ - @Test - public void integerItemTest() { - // TODO: test integerItem - } - - /** - * Test the property 'boolItem' - */ - @Test - public void boolItemTest() { - // TODO: test boolItem - } - - /** - * Test the property 'arrayItem' - */ - @Test - public void arrayItemTest() { - // TODO: test arrayItem - } - -} diff --git a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/XmlItemTest.java b/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/XmlItemTest.java deleted file mode 100644 index 4bab95a912..0000000000 --- a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/XmlItemTest.java +++ /dev/null @@ -1,275 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for XmlItem - */ -public class XmlItemTest { - private final XmlItem model = new XmlItem(); - - /** - * Model tests for XmlItem - */ - @Test - public void testXmlItem() { - // TODO: test XmlItem - } - - /** - * Test the property 'attributeString' - */ - @Test - public void attributeStringTest() { - // TODO: test attributeString - } - - /** - * Test the property 'attributeNumber' - */ - @Test - public void attributeNumberTest() { - // TODO: test attributeNumber - } - - /** - * Test the property 'attributeInteger' - */ - @Test - public void attributeIntegerTest() { - // TODO: test attributeInteger - } - - /** - * Test the property 'attributeBoolean' - */ - @Test - public void attributeBooleanTest() { - // TODO: test attributeBoolean - } - - /** - * Test the property 'wrappedArray' - */ - @Test - public void wrappedArrayTest() { - // TODO: test wrappedArray - } - - /** - * Test the property 'nameString' - */ - @Test - public void nameStringTest() { - // TODO: test nameString - } - - /** - * Test the property 'nameNumber' - */ - @Test - public void nameNumberTest() { - // TODO: test nameNumber - } - - /** - * Test the property 'nameInteger' - */ - @Test - public void nameIntegerTest() { - // TODO: test nameInteger - } - - /** - * Test the property 'nameBoolean' - */ - @Test - public void nameBooleanTest() { - // TODO: test nameBoolean - } - - /** - * Test the property 'nameArray' - */ - @Test - public void nameArrayTest() { - // TODO: test nameArray - } - - /** - * Test the property 'nameWrappedArray' - */ - @Test - public void nameWrappedArrayTest() { - // TODO: test nameWrappedArray - } - - /** - * Test the property 'prefixString' - */ - @Test - public void prefixStringTest() { - // TODO: test prefixString - } - - /** - * Test the property 'prefixNumber' - */ - @Test - public void prefixNumberTest() { - // TODO: test prefixNumber - } - - /** - * Test the property 'prefixInteger' - */ - @Test - public void prefixIntegerTest() { - // TODO: test prefixInteger - } - - /** - * Test the property 'prefixBoolean' - */ - @Test - public void prefixBooleanTest() { - // TODO: test prefixBoolean - } - - /** - * Test the property 'prefixArray' - */ - @Test - public void prefixArrayTest() { - // TODO: test prefixArray - } - - /** - * Test the property 'prefixWrappedArray' - */ - @Test - public void prefixWrappedArrayTest() { - // TODO: test prefixWrappedArray - } - - /** - * Test the property 'namespaceString' - */ - @Test - public void namespaceStringTest() { - // TODO: test namespaceString - } - - /** - * Test the property 'namespaceNumber' - */ - @Test - public void namespaceNumberTest() { - // TODO: test namespaceNumber - } - - /** - * Test the property 'namespaceInteger' - */ - @Test - public void namespaceIntegerTest() { - // TODO: test namespaceInteger - } - - /** - * Test the property 'namespaceBoolean' - */ - @Test - public void namespaceBooleanTest() { - // TODO: test namespaceBoolean - } - - /** - * Test the property 'namespaceArray' - */ - @Test - public void namespaceArrayTest() { - // TODO: test namespaceArray - } - - /** - * Test the property 'namespaceWrappedArray' - */ - @Test - public void namespaceWrappedArrayTest() { - // TODO: test namespaceWrappedArray - } - - /** - * Test the property 'prefixNsString' - */ - @Test - public void prefixNsStringTest() { - // TODO: test prefixNsString - } - - /** - * Test the property 'prefixNsNumber' - */ - @Test - public void prefixNsNumberTest() { - // TODO: test prefixNsNumber - } - - /** - * Test the property 'prefixNsInteger' - */ - @Test - public void prefixNsIntegerTest() { - // TODO: test prefixNsInteger - } - - /** - * Test the property 'prefixNsBoolean' - */ - @Test - public void prefixNsBooleanTest() { - // TODO: test prefixNsBoolean - } - - /** - * Test the property 'prefixNsArray' - */ - @Test - public void prefixNsArrayTest() { - // TODO: test prefixNsArray - } - - /** - * Test the property 'prefixNsWrappedArray' - */ - @Test - public void prefixNsWrappedArrayTest() { - // TODO: test prefixNsWrappedArray - } - -} diff --git a/samples/client/petstore/java/native/.openapi-generator/FILES b/samples/client/petstore/java/native/.openapi-generator/FILES index 9f46a0d990..0a91ba6169 100644 --- a/samples/client/petstore/java/native/.openapi-generator/FILES +++ b/samples/client/petstore/java/native/.openapi-generator/FILES @@ -5,27 +5,21 @@ README.md api/openapi.yaml build.gradle build.sbt -docs/AdditionalPropertiesAnyType.md -docs/AdditionalPropertiesArray.md -docs/AdditionalPropertiesBoolean.md docs/AdditionalPropertiesClass.md -docs/AdditionalPropertiesInteger.md -docs/AdditionalPropertiesNumber.md -docs/AdditionalPropertiesObject.md -docs/AdditionalPropertiesString.md +docs/AllOfWithSingleRef.md docs/Animal.md docs/AnotherFakeApi.md docs/ArrayOfArrayOfNumberOnly.md docs/ArrayOfNumberOnly.md docs/ArrayTest.md -docs/BigCat.md -docs/BigCatAllOf.md docs/Capitalization.md docs/Cat.md docs/CatAllOf.md docs/Category.md docs/ClassModel.md docs/Client.md +docs/DefaultApi.md +docs/DeprecatedObject.md docs/Dog.md docs/DogAllOf.md docs/EnumArrays.md @@ -34,8 +28,11 @@ docs/EnumTest.md docs/FakeApi.md docs/FakeClassnameTags123Api.md docs/FileSchemaTestClass.md +docs/Foo.md +docs/FooGetDefaultResponse.md docs/FormatTest.md docs/HasOnlyReadOnly.md +docs/HealthCheckResult.md docs/MapTest.md docs/MixedPropertiesAndAdditionalPropertiesClass.md docs/Model200Response.md @@ -44,21 +41,25 @@ docs/ModelFile.md docs/ModelList.md docs/ModelReturn.md docs/Name.md +docs/NullableClass.md docs/NumberOnly.md +docs/ObjectWithDeprecatedFields.md docs/Order.md docs/OuterComposite.md docs/OuterEnum.md +docs/OuterEnumDefaultValue.md +docs/OuterEnumInteger.md +docs/OuterEnumIntegerDefaultValue.md +docs/OuterObjectWithEnumProperty.md docs/Pet.md docs/PetApi.md docs/ReadOnlyFirst.md +docs/SingleRefType.md docs/SpecialModelName.md docs/StoreApi.md docs/Tag.md -docs/TypeHolderDefault.md -docs/TypeHolderExample.md docs/User.md docs/UserApi.md -docs/XmlItem.md git_push.sh gradle.properties gradle/wrapper/gradle-wrapper.jar @@ -78,40 +79,37 @@ src/main/java/org/openapitools/client/RFC3339DateFormat.java src/main/java/org/openapitools/client/ServerConfiguration.java src/main/java/org/openapitools/client/ServerVariable.java src/main/java/org/openapitools/client/api/AnotherFakeApi.java +src/main/java/org/openapitools/client/api/DefaultApi.java src/main/java/org/openapitools/client/api/FakeApi.java src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java src/main/java/org/openapitools/client/api/PetApi.java src/main/java/org/openapitools/client/api/StoreApi.java src/main/java/org/openapitools/client/api/UserApi.java src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java +src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java src/main/java/org/openapitools/client/model/Animal.java src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java src/main/java/org/openapitools/client/model/ArrayTest.java -src/main/java/org/openapitools/client/model/BigCat.java -src/main/java/org/openapitools/client/model/BigCatAllOf.java src/main/java/org/openapitools/client/model/Capitalization.java src/main/java/org/openapitools/client/model/Cat.java src/main/java/org/openapitools/client/model/CatAllOf.java src/main/java/org/openapitools/client/model/Category.java src/main/java/org/openapitools/client/model/ClassModel.java src/main/java/org/openapitools/client/model/Client.java +src/main/java/org/openapitools/client/model/DeprecatedObject.java src/main/java/org/openapitools/client/model/Dog.java src/main/java/org/openapitools/client/model/DogAllOf.java src/main/java/org/openapitools/client/model/EnumArrays.java src/main/java/org/openapitools/client/model/EnumClass.java src/main/java/org/openapitools/client/model/EnumTest.java src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +src/main/java/org/openapitools/client/model/Foo.java +src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java src/main/java/org/openapitools/client/model/FormatTest.java src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +src/main/java/org/openapitools/client/model/HealthCheckResult.java src/main/java/org/openapitools/client/model/MapTest.java src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java src/main/java/org/openapitools/client/model/Model200Response.java @@ -120,15 +118,19 @@ src/main/java/org/openapitools/client/model/ModelFile.java src/main/java/org/openapitools/client/model/ModelList.java src/main/java/org/openapitools/client/model/ModelReturn.java src/main/java/org/openapitools/client/model/Name.java +src/main/java/org/openapitools/client/model/NullableClass.java src/main/java/org/openapitools/client/model/NumberOnly.java +src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java src/main/java/org/openapitools/client/model/Order.java src/main/java/org/openapitools/client/model/OuterComposite.java src/main/java/org/openapitools/client/model/OuterEnum.java +src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java +src/main/java/org/openapitools/client/model/OuterEnumInteger.java +src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java +src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java src/main/java/org/openapitools/client/model/Pet.java src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +src/main/java/org/openapitools/client/model/SingleRefType.java src/main/java/org/openapitools/client/model/SpecialModelName.java src/main/java/org/openapitools/client/model/Tag.java -src/main/java/org/openapitools/client/model/TypeHolderDefault.java -src/main/java/org/openapitools/client/model/TypeHolderExample.java src/main/java/org/openapitools/client/model/User.java -src/main/java/org/openapitools/client/model/XmlItem.java diff --git a/samples/client/petstore/java/native/README.md b/samples/client/petstore/java/native/README.md index 0da4e8e90f..8585cc0f0d 100644 --- a/samples/client/petstore/java/native/README.md +++ b/samples/client/petstore/java/native/README.md @@ -83,9 +83,9 @@ public class AnotherFakeApiExample { // Configure clients using the `defaultClient` object, such as // overriding the host and port, timeout, etc. AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); - Client body = new Client(); // Client | client model + Client client = new Client(); // Client | client model try { - Client result = apiInstance.call123testSpecialTags(body); + Client result = apiInstance.call123testSpecialTags(client); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); @@ -107,8 +107,12 @@ Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- *AnotherFakeApi* | [**call123testSpecialTags**](docs/AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags *AnotherFakeApi* | [**call123testSpecialTagsWithHttpInfo**](docs/AnotherFakeApi.md#call123testSpecialTagsWithHttpInfo) | **PATCH** /another-fake/dummy | To test special tags -*FakeApi* | [**createXmlItem**](docs/FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem -*FakeApi* | [**createXmlItemWithHttpInfo**](docs/FakeApi.md#createXmlItemWithHttpInfo) | **POST** /fake/create_xml_item | creates an XmlItem +*DefaultApi* | [**fooGet**](docs/DefaultApi.md#fooGet) | **GET** /foo | +*DefaultApi* | [**fooGetWithHttpInfo**](docs/DefaultApi.md#fooGetWithHttpInfo) | **GET** /foo | +*FakeApi* | [**fakeHealthGet**](docs/FakeApi.md#fakeHealthGet) | **GET** /fake/health | Health check endpoint +*FakeApi* | [**fakeHealthGetWithHttpInfo**](docs/FakeApi.md#fakeHealthGetWithHttpInfo) | **GET** /fake/health | Health check endpoint +*FakeApi* | [**fakeHttpSignatureTest**](docs/FakeApi.md#fakeHttpSignatureTest) | **GET** /fake/http-signature-test | test http signature authentication +*FakeApi* | [**fakeHttpSignatureTestWithHttpInfo**](docs/FakeApi.md#fakeHttpSignatureTestWithHttpInfo) | **GET** /fake/http-signature-test | test http signature authentication *FakeApi* | [**fakeOuterBooleanSerialize**](docs/FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | *FakeApi* | [**fakeOuterBooleanSerializeWithHttpInfo**](docs/FakeApi.md#fakeOuterBooleanSerializeWithHttpInfo) | **POST** /fake/outer/boolean | *FakeApi* | [**fakeOuterCompositeSerialize**](docs/FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | @@ -117,14 +121,18 @@ Class | Method | HTTP request | Description *FakeApi* | [**fakeOuterNumberSerializeWithHttpInfo**](docs/FakeApi.md#fakeOuterNumberSerializeWithHttpInfo) | **POST** /fake/outer/number | *FakeApi* | [**fakeOuterStringSerialize**](docs/FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | *FakeApi* | [**fakeOuterStringSerializeWithHttpInfo**](docs/FakeApi.md#fakeOuterStringSerializeWithHttpInfo) | **POST** /fake/outer/string | +*FakeApi* | [**fakePropertyEnumIntegerSerialize**](docs/FakeApi.md#fakePropertyEnumIntegerSerialize) | **POST** /fake/property/enum-int | +*FakeApi* | [**fakePropertyEnumIntegerSerializeWithHttpInfo**](docs/FakeApi.md#fakePropertyEnumIntegerSerializeWithHttpInfo) | **POST** /fake/property/enum-int | +*FakeApi* | [**testBodyWithBinary**](docs/FakeApi.md#testBodyWithBinary) | **PUT** /fake/body-with-binary | +*FakeApi* | [**testBodyWithBinaryWithHttpInfo**](docs/FakeApi.md#testBodyWithBinaryWithHttpInfo) | **PUT** /fake/body-with-binary | *FakeApi* | [**testBodyWithFileSchema**](docs/FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | *FakeApi* | [**testBodyWithFileSchemaWithHttpInfo**](docs/FakeApi.md#testBodyWithFileSchemaWithHttpInfo) | **PUT** /fake/body-with-file-schema | *FakeApi* | [**testBodyWithQueryParams**](docs/FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | *FakeApi* | [**testBodyWithQueryParamsWithHttpInfo**](docs/FakeApi.md#testBodyWithQueryParamsWithHttpInfo) | **PUT** /fake/body-with-query-params | *FakeApi* | [**testClientModel**](docs/FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model *FakeApi* | [**testClientModelWithHttpInfo**](docs/FakeApi.md#testClientModelWithHttpInfo) | **PATCH** /fake | To test \"client\" model -*FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -*FakeApi* | [**testEndpointParametersWithHttpInfo**](docs/FakeApi.md#testEndpointParametersWithHttpInfo) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*FakeApi* | [**testEndpointParametersWithHttpInfo**](docs/FakeApi.md#testEndpointParametersWithHttpInfo) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 *FakeApi* | [**testEnumParameters**](docs/FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters *FakeApi* | [**testEnumParametersWithHttpInfo**](docs/FakeApi.md#testEnumParametersWithHttpInfo) | **GET** /fake | To test enum parameters *FakeApi* | [**testGroupParameters**](docs/FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) @@ -183,34 +191,30 @@ Class | Method | HTTP request | Description ## Documentation for Models - - [AdditionalPropertiesAnyType](docs/AdditionalPropertiesAnyType.md) - - [AdditionalPropertiesArray](docs/AdditionalPropertiesArray.md) - - [AdditionalPropertiesBoolean](docs/AdditionalPropertiesBoolean.md) - [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) - - [AdditionalPropertiesInteger](docs/AdditionalPropertiesInteger.md) - - [AdditionalPropertiesNumber](docs/AdditionalPropertiesNumber.md) - - [AdditionalPropertiesObject](docs/AdditionalPropertiesObject.md) - - [AdditionalPropertiesString](docs/AdditionalPropertiesString.md) + - [AllOfWithSingleRef](docs/AllOfWithSingleRef.md) - [Animal](docs/Animal.md) - [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) - [ArrayTest](docs/ArrayTest.md) - - [BigCat](docs/BigCat.md) - - [BigCatAllOf](docs/BigCatAllOf.md) - [Capitalization](docs/Capitalization.md) - [Cat](docs/Cat.md) - [CatAllOf](docs/CatAllOf.md) - [Category](docs/Category.md) - [ClassModel](docs/ClassModel.md) - [Client](docs/Client.md) + - [DeprecatedObject](docs/DeprecatedObject.md) - [Dog](docs/Dog.md) - [DogAllOf](docs/DogAllOf.md) - [EnumArrays](docs/EnumArrays.md) - [EnumClass](docs/EnumClass.md) - [EnumTest](docs/EnumTest.md) - [FileSchemaTestClass](docs/FileSchemaTestClass.md) + - [Foo](docs/Foo.md) + - [FooGetDefaultResponse](docs/FooGetDefaultResponse.md) - [FormatTest](docs/FormatTest.md) - [HasOnlyReadOnly](docs/HasOnlyReadOnly.md) + - [HealthCheckResult](docs/HealthCheckResult.md) - [MapTest](docs/MapTest.md) - [MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md) - [Model200Response](docs/Model200Response.md) @@ -219,18 +223,22 @@ Class | Method | HTTP request | Description - [ModelList](docs/ModelList.md) - [ModelReturn](docs/ModelReturn.md) - [Name](docs/Name.md) + - [NullableClass](docs/NullableClass.md) - [NumberOnly](docs/NumberOnly.md) + - [ObjectWithDeprecatedFields](docs/ObjectWithDeprecatedFields.md) - [Order](docs/Order.md) - [OuterComposite](docs/OuterComposite.md) - [OuterEnum](docs/OuterEnum.md) + - [OuterEnumDefaultValue](docs/OuterEnumDefaultValue.md) + - [OuterEnumInteger](docs/OuterEnumInteger.md) + - [OuterEnumIntegerDefaultValue](docs/OuterEnumIntegerDefaultValue.md) + - [OuterObjectWithEnumProperty](docs/OuterObjectWithEnumProperty.md) - [Pet](docs/Pet.md) - [ReadOnlyFirst](docs/ReadOnlyFirst.md) + - [SingleRefType](docs/SingleRefType.md) - [SpecialModelName](docs/SpecialModelName.md) - [Tag](docs/Tag.md) - - [TypeHolderDefault](docs/TypeHolderDefault.md) - - [TypeHolderExample](docs/TypeHolderExample.md) - [User](docs/User.md) - - [XmlItem](docs/XmlItem.md) ## Documentation for Authorization @@ -250,9 +258,19 @@ Authentication schemes defined for the API: - **API key parameter name**: api_key_query - **Location**: URL query string +### bearer_test + + +- **Type**: HTTP basic authentication + ### http_basic_test +- **Type**: HTTP basic authentication + +### http_signature_test + + - **Type**: HTTP basic authentication ### petstore_auth diff --git a/samples/client/petstore/java/native/api/openapi.yaml b/samples/client/petstore/java/native/api/openapi.yaml index e7e17402f6..f9cbedf1e4 100644 --- a/samples/client/petstore/java/native/api/openapi.yaml +++ b/samples/client/petstore/java/native/api/openapi.yaml @@ -1,4 +1,4 @@ -openapi: 3.0.1 +openapi: 3.0.0 info: description: "This spec is mainly for testing Petstore server and contains fake\ \ endpoints, models. Please do not use this for any other purpose. Special characters:\ @@ -9,7 +9,30 @@ info: title: OpenAPI Petstore version: 1.0.0 servers: -- url: http://petstore.swagger.io:80/v2 +- description: petstore server + url: "http://{server}.swagger.io:{port}/v2" + variables: + server: + default: petstore + enum: + - petstore + - qa-petstore + - dev-petstore + port: + default: "80" + enum: + - "80" + - "8080" +- description: The local server + url: "https://localhost:8080/{version}" + variables: + version: + default: v2 + enum: + - v1 + - v2 +- description: The local server without variables + url: https://127.0.0.1/no_varaible tags: - description: Everything about your Pets name: pet @@ -18,25 +41,26 @@ tags: - description: Operations about user name: user paths: + /foo: + get: + responses: + default: + content: + application/json: + schema: + $ref: '#/components/schemas/_foo_get_default_response' + description: response + x-accepts: application/json /pet: post: + description: "" operationId: addPet requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Pet' - application/xml: - schema: - $ref: '#/components/schemas/Pet' - description: Pet object that needs to be added to the store - required: true + $ref: '#/components/requestBodies/Pet' responses: "200": - content: {} - description: successful operation + description: Successful operation "405": - content: {} description: Invalid input security: - petstore_auth: @@ -45,33 +69,21 @@ paths: summary: Add a new pet to the store tags: - pet - x-codegen-request-body-name: body x-content-type: application/json x-accepts: application/json put: + description: "" operationId: updatePet requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Pet' - application/xml: - schema: - $ref: '#/components/schemas/Pet' - description: Pet object that needs to be added to the store - required: true + $ref: '#/components/requestBodies/Pet' responses: "200": - content: {} - description: successful operation + description: Successful operation "400": - content: {} description: Invalid ID supplied "404": - content: {} description: Pet not found "405": - content: {} description: Validation exception security: - petstore_auth: @@ -80,15 +92,34 @@ paths: summary: Update an existing pet tags: - pet - x-codegen-request-body-name: body + x-webclient-blocking: true x-content-type: application/json x-accepts: application/json + servers: + - url: http://petstore.swagger.io/v2 + - url: http://path-server-test.petstore.local/v2 + - description: test server with variables + url: "http://{server}.swagger.io:{port}/v2" + variables: + server: + default: petstore + description: target server + enum: + - petstore + - qa-petstore + - dev-petstore + port: + default: "80" + enum: + - "80" + - "8080" /pet/findByStatus: get: description: Multiple status values can be provided with comma separated strings operationId: findPetsByStatus parameters: - - description: Status values that need to be considered for filter + - deprecated: true + description: Status values that need to be considered for filter explode: false in: query name: status @@ -118,7 +149,6 @@ paths: type: array description: successful operation "400": - content: {} description: Invalid status value security: - petstore_auth: @@ -127,6 +157,7 @@ paths: summary: Finds Pets by status tags: - pet + x-webclient-blocking: true x-accepts: application/json /pet/findByTags: get: @@ -163,7 +194,6 @@ paths: uniqueItems: true description: successful operation "400": - content: {} description: Invalid tag value security: - petstore_auth: @@ -172,28 +202,33 @@ paths: summary: Finds Pets by tags tags: - pet + x-webclient-blocking: true x-accepts: application/json /pet/{petId}: delete: + description: "" operationId: deletePet parameters: - - in: header + - explode: false + in: header name: api_key + required: false schema: type: string + style: simple - description: Pet id to delete + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple responses: "200": - content: {} - description: successful operation + description: Successful operation "400": - content: {} description: Invalid pet value security: - petstore_auth: @@ -208,12 +243,14 @@ paths: operationId: getPetById parameters: - description: ID of pet to return + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple responses: "200": content: @@ -225,35 +262,38 @@ paths: $ref: '#/components/schemas/Pet' description: successful operation "400": - content: {} description: Invalid ID supplied "404": - content: {} description: Pet not found security: - api_key: [] summary: Find pet by ID tags: - pet + x-webclient-blocking: true x-accepts: application/json post: + description: "" operationId: updatePetWithForm parameters: - description: ID of pet that needs to be updated + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple requestBody: content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/updatePetWithForm_request' responses: + "200": + description: Successful operation "405": - content: {} description: Invalid input security: - petstore_auth: @@ -266,15 +306,18 @@ paths: x-accepts: application/json /pet/{petId}/uploadImage: post: + description: "" operationId: uploadFile parameters: - description: ID of pet to update + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple requestBody: content: multipart/form-data: @@ -318,10 +361,11 @@ paths: x-accepts: application/json /store/order: post: + description: "" operationId: placeOrder requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/Order' description: order placed for purchasing the pet @@ -337,13 +381,11 @@ paths: $ref: '#/components/schemas/Order' description: successful operation "400": - content: {} description: Invalid Order summary: Place an order for a pet tags: - store - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: application/json /store/order/{order_id}: delete: @@ -352,17 +394,17 @@ paths: operationId: deleteOrder parameters: - description: ID of the order that needs to be deleted + explode: false in: path name: order_id required: true schema: type: string + style: simple responses: "400": - content: {} description: Invalid ID supplied "404": - content: {} description: Order not found summary: Delete purchase order by ID tags: @@ -374,6 +416,7 @@ paths: operationId: getOrderById parameters: - description: ID of pet that needs to be fetched + explode: false in: path name: order_id required: true @@ -382,6 +425,7 @@ paths: maximum: 5 minimum: 1 type: integer + style: simple responses: "200": content: @@ -393,10 +437,8 @@ paths: $ref: '#/components/schemas/Order' description: successful operation "400": - content: {} description: Invalid ID supplied "404": - content: {} description: Order not found summary: Find purchase order by ID tags: @@ -408,81 +450,68 @@ paths: operationId: createUser requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/User' description: Created user object required: true responses: default: - content: {} description: successful operation summary: Create user tags: - user - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: application/json /user/createWithArray: post: + description: "" operationId: createUsersWithArrayInput requestBody: - content: - '*/*': - schema: - items: - $ref: '#/components/schemas/User' - type: array - description: List of user object - required: true + $ref: '#/components/requestBodies/UserArray' responses: default: - content: {} description: successful operation summary: Creates list of users with given input array tags: - user - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: application/json /user/createWithList: post: + description: "" operationId: createUsersWithListInput requestBody: - content: - '*/*': - schema: - items: - $ref: '#/components/schemas/User' - type: array - description: List of user object - required: true + $ref: '#/components/requestBodies/UserArray' responses: default: - content: {} description: successful operation summary: Creates list of users with given input array tags: - user - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: application/json /user/login: get: + description: "" operationId: loginUser parameters: - description: The user name for login + explode: true in: query name: username required: true schema: type: string + style: form - description: The password for login in clear text + explode: true in: query name: password required: true schema: type: string + style: form responses: "200": content: @@ -496,16 +525,19 @@ paths: headers: X-Rate-Limit: description: calls per hour allowed by the user + explode: false schema: format: int32 type: integer + style: simple X-Expires-After: description: date in UTC when token expires + explode: false schema: format: date-time type: string + style: simple "400": - content: {} description: Invalid username/password supplied summary: Logs user into the system tags: @@ -513,10 +545,10 @@ paths: x-accepts: application/json /user/logout: get: + description: "" operationId: logoutUser responses: default: - content: {} description: successful operation summary: Logs out current logged in user session tags: @@ -528,31 +560,34 @@ paths: operationId: deleteUser parameters: - description: The name that needs to be deleted + explode: false in: path name: username required: true schema: type: string + style: simple responses: "400": - content: {} description: Invalid username supplied "404": - content: {} description: User not found summary: Delete user tags: - user x-accepts: application/json get: + description: "" operationId: getUserByName parameters: - description: The name that needs to be fetched. Use user1 for testing. + explode: false in: path name: username required: true schema: type: string + style: simple responses: "200": content: @@ -564,10 +599,8 @@ paths: $ref: '#/components/schemas/User' description: successful operation "400": - content: {} description: Invalid username supplied "404": - content: {} description: User not found summary: Get user by user name tags: @@ -578,42 +611,36 @@ paths: operationId: updateUser parameters: - description: name that need to be deleted + explode: false in: path name: username required: true schema: type: string + style: simple requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/User' description: Updated user object required: true responses: "400": - content: {} description: Invalid user supplied "404": - content: {} description: User not found summary: Updated user tags: - user - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: application/json /fake_classname_test: patch: description: To test class name in snake case operationId: testClassname requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - description: client model - required: true + $ref: '#/components/requestBodies/Client' responses: "200": content: @@ -626,7 +653,6 @@ paths: summary: To test class name in snake case tags: - fake_classname_tags 123#$%^ - x-codegen-request-body-name: body x-content-type: application/json x-accepts: application/json /fake: @@ -635,44 +661,60 @@ paths: operationId: testGroupParameters parameters: - description: Required String in group parameters + explode: true in: query name: required_string_group required: true schema: type: integer + style: form - description: Required Boolean in group parameters + explode: false in: header name: required_boolean_group required: true schema: type: boolean + style: simple - description: Required Integer in group parameters + explode: true in: query name: required_int64_group required: true schema: format: int64 type: integer + style: form - description: String in group parameters + explode: true in: query name: string_group + required: false schema: type: integer + style: form - description: Boolean in group parameters + explode: false in: header name: boolean_group + required: false schema: type: boolean + style: simple - description: Integer in group parameters + explode: true in: query name: int64_group + required: false schema: format: int64 type: integer + style: form responses: "400": - content: {} description: Something wrong + security: + - bearer_test: [] summary: Fake endpoint to test group parameters (optional) tags: - fake @@ -686,6 +728,7 @@ paths: explode: false in: header name: enum_header_string_array + required: false schema: items: default: $ @@ -696,8 +739,10 @@ paths: type: array style: simple - description: Header parameter enum test (string) + explode: false in: header name: enum_header_string + required: false schema: default: -efg enum: @@ -705,10 +750,12 @@ paths: - -efg - (xyz) type: string + style: simple - description: Query parameter enum test (string array) - explode: false + explode: true in: query name: enum_query_string_array + required: false schema: items: default: $ @@ -719,8 +766,10 @@ paths: type: array style: form - description: Query parameter enum test (string) + explode: true in: query name: enum_query_string + required: false schema: default: -efg enum: @@ -728,24 +777,40 @@ paths: - -efg - (xyz) type: string + style: form - description: Query parameter enum test (double) + explode: true in: query name: enum_query_integer + required: false schema: enum: - 1 - -2 format: int32 type: integer + style: form - description: Query parameter enum test (double) + explode: true in: query name: enum_query_double + required: false schema: enum: - 1.1 - -1.2 format: double type: number + style: form + - explode: true + in: query + name: enum_query_model_array + required: false + schema: + items: + $ref: '#/components/schemas/EnumClass' + type: array + style: form requestBody: content: application/x-www-form-urlencoded: @@ -753,10 +818,8 @@ paths: $ref: '#/components/schemas/testEnumParameters_request' responses: "400": - content: {} description: Invalid request "404": - content: {} description: Not found summary: To test enum parameters tags: @@ -767,12 +830,7 @@ paths: description: To test "client" model operationId: testClientModel requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - description: client model - required: true + $ref: '#/components/requestBodies/Client' responses: "200": content: @@ -783,36 +841,32 @@ paths: summary: To test "client" model tags: - fake - x-codegen-request-body-name: body x-content-type: application/json x-accepts: application/json post: - description: |- + description: | Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 operationId: testEndpointParameters requestBody: content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/testEndpointParameters_request' - required: true responses: "400": - content: {} description: Invalid username supplied "404": - content: {} description: User not found security: - http_basic_test: [] - summary: |- + summary: | Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 tags: - fake x-content-type: application/x-www-form-urlencoded @@ -823,11 +877,10 @@ paths: operationId: fakeOuterNumberSerialize requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/OuterNumber' description: Input number as post body - required: false responses: "200": content: @@ -837,8 +890,29 @@ paths: description: Output number tags: - fake - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json + x-accepts: '*/*' + /fake/property/enum-int: + post: + description: Test serialization of enum (int) properties with examples + operationId: fakePropertyEnumIntegerSerialize + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OuterObjectWithEnumProperty' + description: Input enum (int) as post body + required: true + responses: + "200": + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterObjectWithEnumProperty' + description: Output enum (int) + tags: + - fake + x-content-type: application/json x-accepts: '*/*' /fake/outer/string: post: @@ -846,11 +920,10 @@ paths: operationId: fakeOuterStringSerialize requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/OuterString' description: Input string as post body - required: false responses: "200": content: @@ -860,8 +933,7 @@ paths: description: Output string tags: - fake - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: '*/*' /fake/outer/boolean: post: @@ -869,11 +941,10 @@ paths: operationId: fakeOuterBooleanSerialize requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/OuterBoolean' description: Input boolean as post body - required: false responses: "200": content: @@ -883,8 +954,7 @@ paths: description: Output boolean tags: - fake - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: '*/*' /fake/outer/composite: post: @@ -892,11 +962,10 @@ paths: operationId: fakeOuterCompositeSerialize requestBody: content: - '*/*': + application/json: schema: $ref: '#/components/schemas/OuterComposite' description: Input composite as post body - required: false responses: "200": content: @@ -906,21 +975,19 @@ paths: description: Output composite tags: - fake - x-codegen-request-body-name: body - x-content-type: '*/*' + x-content-type: application/json x-accepts: '*/*' /fake/jsonFormData: get: + description: "" operationId: testJsonFormData requestBody: content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/testJsonFormData_request' - required: true responses: "200": - content: {} description: successful operation summary: test json serialization of form data tags: @@ -929,6 +996,7 @@ paths: x-accepts: application/json /fake/inline-additionalProperties: post: + description: "" operationId: testInlineAdditionalProperties requestBody: content: @@ -941,23 +1009,23 @@ paths: required: true responses: "200": - content: {} description: successful operation summary: test inline additionalProperties tags: - fake - x-codegen-request-body-name: param x-content-type: application/json x-accepts: application/json /fake/body-with-query-params: put: operationId: testBodyWithQueryParams parameters: - - in: query + - explode: true + in: query name: query required: true schema: type: string + style: form requestBody: content: application/json: @@ -966,60 +1034,17 @@ paths: required: true responses: "200": - content: {} description: Success tags: - fake - x-codegen-request-body-name: body x-content-type: application/json x-accepts: application/json - /fake/create_xml_item: - post: - description: this route creates an XmlItem - operationId: createXmlItem - requestBody: - content: - application/xml: - schema: - $ref: '#/components/schemas/XmlItem' - application/xml; charset=utf-8: - schema: - $ref: '#/components/schemas/XmlItem' - application/xml; charset=utf-16: - schema: - $ref: '#/components/schemas/XmlItem' - text/xml: - schema: - $ref: '#/components/schemas/XmlItem' - text/xml; charset=utf-8: - schema: - $ref: '#/components/schemas/XmlItem' - text/xml; charset=utf-16: - schema: - $ref: '#/components/schemas/XmlItem' - description: XmlItem Body - required: true - responses: - "200": - content: {} - description: successful operation - summary: creates an XmlItem - tags: - - fake - x-codegen-request-body-name: XmlItem - x-content-type: application/xml - x-accepts: application/json /another-fake/dummy: patch: description: To test special tags and operation ID starting with number operationId: 123_test_@#$%_special_tags requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - description: client model - required: true + $ref: '#/components/requestBodies/Client' responses: "200": content: @@ -1030,12 +1055,11 @@ paths: summary: To test special tags tags: - $another-fake? - x-codegen-request-body-name: body x-content-type: application/json x-accepts: application/json /fake/body-with-file-schema: put: - description: "For this test, the body for this request much reference a schema\ + description: "For this test, the body for this request must reference a schema\ \ named `File`." operationId: testBodyWithFileSchema requestBody: @@ -1046,13 +1070,31 @@ paths: required: true responses: "200": - content: {} description: Success tags: - fake - x-codegen-request-body-name: body x-content-type: application/json x-accepts: application/json + /fake/body-with-binary: + put: + description: "For this test, the body has to be a binary file." + operationId: testBodyWithBinary + requestBody: + content: + image/png: + schema: + format: binary + nullable: true + type: string + description: image to upload + required: true + responses: + "200": + description: Success + tags: + - fake + x-content-type: image/png + x-accepts: application/json /fake/test-query-parameters: put: description: To test the collection format in query parameters @@ -1066,15 +1108,18 @@ paths: items: type: string type: array - style: form - - in: query + style: pipeDelimited + - explode: false + in: query name: ioutil required: true schema: items: type: string type: array - - in: query + style: form + - explode: false + in: query name: http required: true schema: @@ -1100,30 +1145,49 @@ paths: type: string type: array style: form + - explode: true + in: query + name: language + required: false + schema: + additionalProperties: + format: string + type: string + type: object + style: form + - allowEmptyValue: true + explode: true + in: query + name: allowEmpty + required: true + schema: + type: string + style: form responses: "200": - content: {} description: Success tags: - fake x-accepts: application/json /fake/{petId}/uploadImageWithRequiredFile: post: + description: "" operationId: uploadFileWithRequiredFile parameters: - description: ID of pet to update + explode: false in: path name: petId required: true schema: format: int64 type: integer + style: simple requestBody: content: multipart/form-data: schema: $ref: '#/components/schemas/uploadFileWithRequiredFile_request' - required: true responses: "200": content: @@ -1140,8 +1204,91 @@ paths: - pet x-content-type: multipart/form-data x-accepts: application/json + /fake/health: + get: + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/HealthCheckResult' + description: The instance started successfully + summary: Health check endpoint + tags: + - fake + x-accepts: application/json + /fake/http-signature-test: + get: + operationId: fake-http-signature-test + parameters: + - description: query parameter + explode: true + in: query + name: query_1 + required: false + schema: + type: string + style: form + - description: header parameter + explode: false + in: header + name: header_1 + required: false + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/Pet' + responses: + "200": + description: The instance started successfully + security: + - http_signature_test: [] + summary: test http signature authentication + tags: + - fake + x-content-type: application/json + x-accepts: application/json components: + requestBodies: + UserArray: + content: + application/json: + schema: + items: + $ref: '#/components/schemas/User' + type: array + description: List of user object + required: true + Client: + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + description: client model + required: true + Pet: + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store + required: true schemas: + Foo: + example: + bar: bar + properties: + bar: + default: bar + type: string + type: object + Bar: + default: bar + type: string Order: example: petId: 6 @@ -1307,21 +1454,12 @@ components: message: type: string type: object - $special[model.name]: - properties: - $special[property.name]: - format: int64 - type: integer - type: object - xml: - name: "$special[model.name]" Return: description: Model for testing reserved words properties: return: format: int32 type: integer - type: object xml: name: Return Name: @@ -1341,7 +1479,6 @@ components: type: integer required: - name - type: object xml: name: Name "200_response": @@ -1352,7 +1489,6 @@ components: type: integer class: type: string - type: object xml: name: Name ClassModel: @@ -1360,7 +1496,6 @@ components: properties: _class: type: string - type: object Dog: allOf: - $ref: '#/components/schemas/Animal' @@ -1369,10 +1504,6 @@ components: allOf: - $ref: '#/components/schemas/Animal' - $ref: '#/components/schemas/Cat_allOf' - BigCat: - allOf: - - $ref: '#/components/schemas/Cat' - - $ref: '#/components/schemas/BigCat_allOf' Animal: discriminator: propertyName: className @@ -1417,12 +1548,14 @@ components: maximum: 123.4 minimum: 67.8 type: number + decimal: + format: number + type: string string: pattern: "/[a-z]/i" type: string byte: format: byte - pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$" type: string binary: format: binary @@ -1442,8 +1575,14 @@ components: maxLength: 64 minLength: 10 type: string - BigDecimal: - format: number + pattern_with_digits: + description: A string that is a 10 digit number. Can have leading zeros. + pattern: "^\\d{10}$" + type: string + pattern_with_digits_and_delimiter: + description: A string starting with 'image_' (case insensitive) and one + to three digits following i.e. Image_01. + pattern: "/^image_\\d{1,3}$/i" type: string required: - byte @@ -1486,117 +1625,27 @@ components: type: number outerEnum: $ref: '#/components/schemas/OuterEnum' + outerEnumInteger: + $ref: '#/components/schemas/OuterEnumInteger' + outerEnumDefaultValue: + $ref: '#/components/schemas/OuterEnumDefaultValue' + outerEnumIntegerDefaultValue: + $ref: '#/components/schemas/OuterEnumIntegerDefaultValue' required: - enum_string_required type: object AdditionalPropertiesClass: properties: - map_string: + map_property: additionalProperties: type: string type: object - map_number: - additionalProperties: - type: number - type: object - map_integer: - additionalProperties: - type: integer - type: object - map_boolean: - additionalProperties: - type: boolean - type: object - map_array_integer: - additionalProperties: - items: - type: integer - type: array - type: object - map_array_anytype: - additionalProperties: - items: - properties: {} - type: object - type: array - type: object - map_map_string: + map_of_map_property: additionalProperties: additionalProperties: type: string type: object type: object - map_map_anytype: - additionalProperties: - additionalProperties: - properties: {} - type: object - type: object - type: object - anytype_1: - properties: {} - type: object - anytype_2: - type: object - anytype_3: - properties: {} - type: object - type: object - AdditionalPropertiesString: - additionalProperties: - type: string - properties: - name: - type: string - type: object - AdditionalPropertiesInteger: - additionalProperties: - type: integer - properties: - name: - type: string - type: object - AdditionalPropertiesNumber: - additionalProperties: - type: number - properties: - name: - type: string - type: object - AdditionalPropertiesBoolean: - additionalProperties: - type: boolean - properties: - name: - type: string - type: object - AdditionalPropertiesArray: - additionalProperties: - items: - properties: {} - type: object - type: array - properties: - name: - type: string - type: object - AdditionalPropertiesObject: - additionalProperties: - additionalProperties: - properties: {} - type: object - type: object - properties: - name: - type: string - type: object - AdditionalPropertiesAnyType: - additionalProperties: - properties: {} - type: object - properties: - name: - type: string type: object MixedPropertiesAndAdditionalPropertiesClass: properties: @@ -1686,6 +1735,8 @@ components: array_of_string: items: type: string + maxItems: 3 + minItems: 0 type: array array_array_of_integer: items: @@ -1742,7 +1793,29 @@ components: - placed - approved - delivered + nullable: true type: string + OuterEnumInteger: + enum: + - 0 + - 1 + - 2 + example: 2 + type: integer + OuterEnumDefaultValue: + default: placed + enum: + - placed + - approved + - delivered + type: string + OuterEnumIntegerDefaultValue: + default: 0 + enum: + - 0 + - 1 + - 2 + type: integer OuterComposite: example: my_string: my_string @@ -1792,243 +1865,133 @@ components: description: Test capitalization type: string type: object - TypeHolderDefault: + _special_model.name_: properties: - string_item: - default: what - type: string - number_item: - type: number - integer_item: + $special[property.name]: + format: int64 type: integer - bool_item: - default: true - type: boolean - array_item: - items: - type: integer - type: array - required: - - array_item - - bool_item - - integer_item - - number_item - - string_item - type: object - TypeHolderExample: - properties: - string_item: - example: what - type: string - number_item: - example: 1.234 - type: number - float_item: - example: 1.234 - format: float - type: number - integer_item: - example: -2 - type: integer - bool_item: - example: true - type: boolean - array_item: - example: - - 0 - - 1 - - 2 - - 3 - items: - type: integer - type: array - required: - - array_item - - bool_item - - float_item - - integer_item - - number_item - - string_item - type: object - XmlItem: - properties: - attribute_string: - example: string - type: string - xml: - attribute: true - attribute_number: - example: 1.234 - type: number - xml: - attribute: true - attribute_integer: - example: -2 - type: integer - xml: - attribute: true - attribute_boolean: - example: true - type: boolean - xml: - attribute: true - wrapped_array: - items: - type: integer - type: array - xml: - wrapped: true - name_string: - example: string - type: string - xml: - name: xml_name_string - name_number: - example: 1.234 - type: number - xml: - name: xml_name_number - name_integer: - example: -2 - type: integer - xml: - name: xml_name_integer - name_boolean: - example: true - type: boolean - xml: - name: xml_name_boolean - name_array: - items: - type: integer - xml: - name: xml_name_array_item - type: array - name_wrapped_array: - items: - type: integer - xml: - name: xml_name_wrapped_array_item - type: array - xml: - name: xml_name_wrapped_array - wrapped: true - prefix_string: - example: string - type: string - xml: - prefix: ab - prefix_number: - example: 1.234 - type: number - xml: - prefix: cd - prefix_integer: - example: -2 - type: integer - xml: - prefix: ef - prefix_boolean: - example: true - type: boolean - xml: - prefix: gh - prefix_array: - items: - type: integer - xml: - prefix: ij - type: array - prefix_wrapped_array: - items: - type: integer - xml: - prefix: mn - type: array - xml: - prefix: kl - wrapped: true - namespace_string: - example: string - type: string - xml: - namespace: http://a.com/schema - namespace_number: - example: 1.234 - type: number - xml: - namespace: http://b.com/schema - namespace_integer: - example: -2 - type: integer - xml: - namespace: http://c.com/schema - namespace_boolean: - example: true - type: boolean - xml: - namespace: http://d.com/schema - namespace_array: - items: - type: integer - xml: - namespace: http://e.com/schema - type: array - namespace_wrapped_array: - items: - type: integer - xml: - namespace: http://g.com/schema - type: array - xml: - namespace: http://f.com/schema - wrapped: true - prefix_ns_string: - example: string - type: string - xml: - namespace: http://a.com/schema - prefix: a - prefix_ns_number: - example: 1.234 - type: number - xml: - namespace: http://b.com/schema - prefix: b - prefix_ns_integer: - example: -2 - type: integer - xml: - namespace: http://c.com/schema - prefix: c - prefix_ns_boolean: - example: true - type: boolean - xml: - namespace: http://d.com/schema - prefix: d - prefix_ns_array: - items: - type: integer - xml: - namespace: http://e.com/schema - prefix: e - type: array - prefix_ns_wrapped_array: - items: - type: integer - xml: - namespace: http://g.com/schema - prefix: g - type: array - xml: - namespace: http://f.com/schema - prefix: f - wrapped: true - type: object xml: - namespace: http://a.com/schema - prefix: pre + name: "$special[model.name]" + HealthCheckResult: + description: Just a string to inform instance is up and running. Make it nullable + in hope to get it as pointer in generated model. + example: + NullableMessage: NullableMessage + properties: + NullableMessage: + nullable: true + type: string + type: object + NullableClass: + additionalProperties: + nullable: true + type: object + properties: + integer_prop: + nullable: true + type: integer + number_prop: + nullable: true + type: number + boolean_prop: + nullable: true + type: boolean + string_prop: + nullable: true + type: string + date_prop: + format: date + nullable: true + type: string + datetime_prop: + format: date-time + nullable: true + type: string + array_nullable_prop: + items: + type: object + nullable: true + type: array + array_and_items_nullable_prop: + items: + nullable: true + type: object + nullable: true + type: array + array_items_nullable: + items: + nullable: true + type: object + type: array + object_nullable_prop: + additionalProperties: + type: object + nullable: true + type: object + object_and_items_nullable_prop: + additionalProperties: + nullable: true + type: object + nullable: true + type: object + object_items_nullable: + additionalProperties: + nullable: true + type: object + type: object + type: object + OuterObjectWithEnumProperty: + example: + value: 2 + properties: + value: + $ref: '#/components/schemas/OuterEnumInteger' + required: + - value + type: object + DeprecatedObject: + deprecated: true + properties: + name: + type: string + type: object + ObjectWithDeprecatedFields: + properties: + uuid: + type: string + id: + deprecated: true + type: number + deprecatedRef: + $ref: '#/components/schemas/DeprecatedObject' + bars: + deprecated: true + items: + $ref: '#/components/schemas/Bar' + type: array + type: object + AllOfWithSingleRef: + properties: + username: + type: string + SingleRefType: + allOf: + - $ref: '#/components/schemas/SingleRefType' + type: object + SingleRefType: + enum: + - admin + - user + title: SingleRefType + type: string + _foo_get_default_response: + example: + string: + bar: bar + properties: + string: + $ref: '#/components/schemas/Foo' + type: object updatePetWithForm_request: properties: name: @@ -2072,7 +2035,6 @@ components: properties: integer: description: None - format: int32 maximum: 100 minimum: 10 type: integer @@ -2177,17 +2139,6 @@ components: type: boolean type: object example: null - BigCat_allOf: - properties: - kind: - enum: - - lions - - tigers - - leopards - - jaguars - type: string - type: object - example: null securitySchemes: petstore_auth: flows: @@ -2208,5 +2159,11 @@ components: http_basic_test: scheme: basic type: http -x-original-swagger-version: "2.0" + bearer_test: + bearerFormat: JWT + scheme: bearer + type: http + http_signature_test: + scheme: signature + type: http diff --git a/samples/client/petstore/java/native/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/native/docs/AdditionalPropertiesClass.md index 79402f75c6..fe69a56eeb 100644 --- a/samples/client/petstore/java/native/docs/AdditionalPropertiesClass.md +++ b/samples/client/petstore/java/native/docs/AdditionalPropertiesClass.md @@ -7,17 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**mapString** | **Map<String, String>** | | [optional] | -|**mapNumber** | **Map<String, BigDecimal>** | | [optional] | -|**mapInteger** | **Map<String, Integer>** | | [optional] | -|**mapBoolean** | **Map<String, Boolean>** | | [optional] | -|**mapArrayInteger** | **Map<String, List<Integer>>** | | [optional] | -|**mapArrayAnytype** | **Map<String, List<Object>>** | | [optional] | -|**mapMapString** | **Map<String, Map<String, String>>** | | [optional] | -|**mapMapAnytype** | **Map<String, Map<String, Object>>** | | [optional] | -|**anytype1** | **Object** | | [optional] | -|**anytype2** | **Object** | | [optional] | -|**anytype3** | **Object** | | [optional] | +|**mapProperty** | **Map<String, String>** | | [optional] | +|**mapOfMapProperty** | **Map<String, Map<String, String>>** | | [optional] | diff --git a/samples/client/petstore/java/native/docs/AllOfWithSingleRef.md b/samples/client/petstore/java/native/docs/AllOfWithSingleRef.md new file mode 100644 index 0000000000..0a9e61bc68 --- /dev/null +++ b/samples/client/petstore/java/native/docs/AllOfWithSingleRef.md @@ -0,0 +1,14 @@ + + +# AllOfWithSingleRef + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**username** | **String** | | [optional] | +|**singleRefType** | [**SingleRefType**](SingleRefType.md) | | [optional] | + + + diff --git a/samples/client/petstore/java/native/docs/AnotherFakeApi.md b/samples/client/petstore/java/native/docs/AnotherFakeApi.md index da47c8bee3..444df75a33 100644 --- a/samples/client/petstore/java/native/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/native/docs/AnotherFakeApi.md @@ -11,7 +11,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* ## call123testSpecialTags -> Client call123testSpecialTags(body) +> Client call123testSpecialTags(client) To test special tags @@ -33,9 +33,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); - Client body = new Client(); // Client | client model + Client client = new Client(); // Client | client model try { - Client result = apiInstance.call123testSpecialTags(body); + Client result = apiInstance.call123testSpecialTags(client); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); @@ -53,7 +53,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**Client**](Client.md)| client model | | +| **client** | [**Client**](Client.md)| client model | | ### Return type @@ -76,7 +76,7 @@ No authorization required ## call123testSpecialTagsWithHttpInfo -> ApiResponse call123testSpecialTags call123testSpecialTagsWithHttpInfo(body) +> ApiResponse call123testSpecialTags call123testSpecialTagsWithHttpInfo(client) To test special tags @@ -99,9 +99,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); - Client body = new Client(); // Client | client model + Client client = new Client(); // Client | client model try { - ApiResponse response = apiInstance.call123testSpecialTagsWithHttpInfo(body); + ApiResponse response = apiInstance.call123testSpecialTagsWithHttpInfo(client); System.out.println("Status code: " + response.getStatusCode()); System.out.println("Response headers: " + response.getHeaders()); System.out.println("Response body: " + response.getData()); @@ -121,7 +121,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**Client**](Client.md)| client model | | +| **client** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/native/docs/DefaultApi.md b/samples/client/petstore/java/native/docs/DefaultApi.md new file mode 100644 index 0000000000..6dbf941055 --- /dev/null +++ b/samples/client/petstore/java/native/docs/DefaultApi.md @@ -0,0 +1,132 @@ +# DefaultApi + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**fooGet**](DefaultApi.md#fooGet) | **GET** /foo | | +| [**fooGetWithHttpInfo**](DefaultApi.md#fooGetWithHttpInfo) | **GET** /foo | | + + + +## fooGet + +> FooGetDefaultResponse fooGet() + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + try { + FooGetDefaultResponse result = apiInstance.fooGet(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#fooGet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**FooGetDefaultResponse**](FooGetDefaultResponse.md) + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | response | - | + +## fooGetWithHttpInfo + +> ApiResponse fooGet fooGetWithHttpInfo() + + + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.ApiResponse; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.DefaultApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + DefaultApi apiInstance = new DefaultApi(defaultClient); + try { + ApiResponse response = apiInstance.fooGetWithHttpInfo(); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling DefaultApi#fooGet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +ApiResponse<[**FooGetDefaultResponse**](FooGetDefaultResponse.md)> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **0** | response | - | + diff --git a/samples/client/petstore/java/native/docs/DeprecatedObject.md b/samples/client/petstore/java/native/docs/DeprecatedObject.md new file mode 100644 index 0000000000..48de1d6244 --- /dev/null +++ b/samples/client/petstore/java/native/docs/DeprecatedObject.md @@ -0,0 +1,13 @@ + + +# DeprecatedObject + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java/native/docs/EnumTest.md b/samples/client/petstore/java/native/docs/EnumTest.md index bf2def484c..380a2aef0b 100644 --- a/samples/client/petstore/java/native/docs/EnumTest.md +++ b/samples/client/petstore/java/native/docs/EnumTest.md @@ -12,6 +12,9 @@ |**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] | |**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] | |**outerEnum** | **OuterEnum** | | [optional] | +|**outerEnumInteger** | **OuterEnumInteger** | | [optional] | +|**outerEnumDefaultValue** | **OuterEnumDefaultValue** | | [optional] | +|**outerEnumIntegerDefaultValue** | **OuterEnumIntegerDefaultValue** | | [optional] | diff --git a/samples/client/petstore/java/native/docs/FakeApi.md b/samples/client/petstore/java/native/docs/FakeApi.md index c6c947207f..d8a9ca83a3 100644 --- a/samples/client/petstore/java/native/docs/FakeApi.md +++ b/samples/client/petstore/java/native/docs/FakeApi.md @@ -4,8 +4,10 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**createXmlItem**](FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem | -| [**createXmlItemWithHttpInfo**](FakeApi.md#createXmlItemWithHttpInfo) | **POST** /fake/create_xml_item | creates an XmlItem | +| [**fakeHealthGet**](FakeApi.md#fakeHealthGet) | **GET** /fake/health | Health check endpoint | +| [**fakeHealthGetWithHttpInfo**](FakeApi.md#fakeHealthGetWithHttpInfo) | **GET** /fake/health | Health check endpoint | +| [**fakeHttpSignatureTest**](FakeApi.md#fakeHttpSignatureTest) | **GET** /fake/http-signature-test | test http signature authentication | +| [**fakeHttpSignatureTestWithHttpInfo**](FakeApi.md#fakeHttpSignatureTestWithHttpInfo) | **GET** /fake/http-signature-test | test http signature authentication | | [**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | | | [**fakeOuterBooleanSerializeWithHttpInfo**](FakeApi.md#fakeOuterBooleanSerializeWithHttpInfo) | **POST** /fake/outer/boolean | | | [**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | | @@ -14,14 +16,18 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* | [**fakeOuterNumberSerializeWithHttpInfo**](FakeApi.md#fakeOuterNumberSerializeWithHttpInfo) | **POST** /fake/outer/number | | | [**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | | | [**fakeOuterStringSerializeWithHttpInfo**](FakeApi.md#fakeOuterStringSerializeWithHttpInfo) | **POST** /fake/outer/string | | +| [**fakePropertyEnumIntegerSerialize**](FakeApi.md#fakePropertyEnumIntegerSerialize) | **POST** /fake/property/enum-int | | +| [**fakePropertyEnumIntegerSerializeWithHttpInfo**](FakeApi.md#fakePropertyEnumIntegerSerializeWithHttpInfo) | **POST** /fake/property/enum-int | | +| [**testBodyWithBinary**](FakeApi.md#testBodyWithBinary) | **PUT** /fake/body-with-binary | | +| [**testBodyWithBinaryWithHttpInfo**](FakeApi.md#testBodyWithBinaryWithHttpInfo) | **PUT** /fake/body-with-binary | | | [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | | | [**testBodyWithFileSchemaWithHttpInfo**](FakeApi.md#testBodyWithFileSchemaWithHttpInfo) | **PUT** /fake/body-with-file-schema | | | [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | | | [**testBodyWithQueryParamsWithHttpInfo**](FakeApi.md#testBodyWithQueryParamsWithHttpInfo) | **PUT** /fake/body-with-query-params | | | [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model | | [**testClientModelWithHttpInfo**](FakeApi.md#testClientModelWithHttpInfo) | **PATCH** /fake | To test \"client\" model | -| [**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 | -| [**testEndpointParametersWithHttpInfo**](FakeApi.md#testEndpointParametersWithHttpInfo) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 | +| [**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 | +| [**testEndpointParametersWithHttpInfo**](FakeApi.md#testEndpointParametersWithHttpInfo) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 | | [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters | | [**testEnumParametersWithHttpInfo**](FakeApi.md#testEnumParametersWithHttpInfo) | **GET** /fake | To test enum parameters | | [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) | @@ -35,13 +41,11 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* -## createXmlItem +## fakeHealthGet -> void createXmlItem(xmlItem) +> HealthCheckResult fakeHealthGet() -creates an XmlItem - -this route creates an XmlItem +Health check endpoint ### Example @@ -59,11 +63,11 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body try { - apiInstance.createXmlItem(xmlItem); + HealthCheckResult result = apiInstance.fakeHealthGet(); + System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling FakeApi#createXmlItem"); + System.err.println("Exception when calling FakeApi#fakeHealthGet"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -75,15 +79,12 @@ public class Example { ### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | | +This endpoint does not need any parameter. ### Return type +[**HealthCheckResult**](HealthCheckResult.md) -null (empty response body) ### Authorization @@ -91,21 +92,19 @@ No authorization required ### HTTP request headers -- **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16 -- **Accept**: Not defined +- **Content-Type**: Not defined +- **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | successful operation | - | +| **200** | The instance started successfully | - | -## createXmlItemWithHttpInfo +## fakeHealthGetWithHttpInfo -> ApiResponse createXmlItem createXmlItemWithHttpInfo(xmlItem) +> ApiResponse fakeHealthGet fakeHealthGetWithHttpInfo() -creates an XmlItem - -this route creates an XmlItem +Health check endpoint ### Example @@ -124,13 +123,148 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body try { - ApiResponse response = apiInstance.createXmlItemWithHttpInfo(xmlItem); + ApiResponse response = apiInstance.fakeHealthGetWithHttpInfo(); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeHealthGet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +ApiResponse<[**HealthCheckResult**](HealthCheckResult.md)> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | The instance started successfully | - | + + +## fakeHttpSignatureTest + +> void fakeHttpSignatureTest(pet, query1, header1) + +test http signature authentication + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + + FakeApi apiInstance = new FakeApi(defaultClient); + Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store + String query1 = "query1_example"; // String | query parameter + String header1 = "header1_example"; // String | header parameter + try { + apiInstance.fakeHttpSignatureTest(pet, query1, header1); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakeHttpSignatureTest"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | +| **query1** | **String**| query parameter | [optional] | +| **header1** | **String**| header parameter | [optional] | + +### Return type + + +null (empty response body) + +### Authorization + +[http_signature_test](../README.md#http_signature_test) + +### HTTP request headers + +- **Content-Type**: application/json, application/xml +- **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | The instance started successfully | - | + +## fakeHttpSignatureTestWithHttpInfo + +> ApiResponse fakeHttpSignatureTest fakeHttpSignatureTestWithHttpInfo(pet, query1, header1) + +test http signature authentication + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.ApiResponse; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + + FakeApi apiInstance = new FakeApi(defaultClient); + Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store + String query1 = "query1_example"; // String | query parameter + String header1 = "header1_example"; // String | header parameter + try { + ApiResponse response = apiInstance.fakeHttpSignatureTestWithHttpInfo(pet, query1, header1); System.out.println("Status code: " + response.getStatusCode()); System.out.println("Response headers: " + response.getHeaders()); } catch (ApiException e) { - System.err.println("Exception when calling FakeApi#createXmlItem"); + System.err.println("Exception when calling FakeApi#fakeHttpSignatureTest"); System.err.println("Status code: " + e.getCode()); System.err.println("Response headers: " + e.getResponseHeaders()); System.err.println("Reason: " + e.getResponseBody()); @@ -145,7 +279,9 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | | +| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | +| **query1** | **String**| query parameter | [optional] | +| **header1** | **String**| header parameter | [optional] | ### Return type @@ -154,17 +290,17 @@ ApiResponse ### Authorization -No authorization required +[http_signature_test](../README.md#http_signature_test) ### HTTP request headers -- **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16 +- **Content-Type**: application/json, application/xml - **Accept**: Not defined ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | successful operation | - | +| **200** | The instance started successfully | - | ## fakeOuterBooleanSerialize @@ -224,7 +360,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: */* ### HTTP response details @@ -292,7 +428,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: */* ### HTTP response details @@ -303,7 +439,7 @@ No authorization required ## fakeOuterCompositeSerialize -> OuterComposite fakeOuterCompositeSerialize(body) +> OuterComposite fakeOuterCompositeSerialize(outerComposite) @@ -325,9 +461,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body + OuterComposite outerComposite = new OuterComposite(); // OuterComposite | Input composite as post body try { - OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body); + OuterComposite result = apiInstance.fakeOuterCompositeSerialize(outerComposite); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize"); @@ -345,7 +481,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] | +| **outerComposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] | ### Return type @@ -358,7 +494,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: */* ### HTTP response details @@ -368,7 +504,7 @@ No authorization required ## fakeOuterCompositeSerializeWithHttpInfo -> ApiResponse fakeOuterCompositeSerialize fakeOuterCompositeSerializeWithHttpInfo(body) +> ApiResponse fakeOuterCompositeSerialize fakeOuterCompositeSerializeWithHttpInfo(outerComposite) @@ -391,9 +527,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body + OuterComposite outerComposite = new OuterComposite(); // OuterComposite | Input composite as post body try { - ApiResponse response = apiInstance.fakeOuterCompositeSerializeWithHttpInfo(body); + ApiResponse response = apiInstance.fakeOuterCompositeSerializeWithHttpInfo(outerComposite); System.out.println("Status code: " + response.getStatusCode()); System.out.println("Response headers: " + response.getHeaders()); System.out.println("Response body: " + response.getData()); @@ -413,7 +549,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] | +| **outerComposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] | ### Return type @@ -426,7 +562,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: */* ### HTTP response details @@ -492,7 +628,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: */* ### HTTP response details @@ -560,7 +696,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: */* ### HTTP response details @@ -626,7 +762,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: */* ### HTTP response details @@ -694,7 +830,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: */* ### HTTP response details @@ -703,13 +839,13 @@ No authorization required | **200** | Output string | - | -## testBodyWithFileSchema +## fakePropertyEnumIntegerSerialize -> void testBodyWithFileSchema(body) +> OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty) -For this test, the body for this request much reference a schema named `File`. +Test serialization of enum (int) properties with examples ### Example @@ -727,9 +863,275 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass | + OuterObjectWithEnumProperty outerObjectWithEnumProperty = new OuterObjectWithEnumProperty(); // OuterObjectWithEnumProperty | Input enum (int) as post body try { - apiInstance.testBodyWithFileSchema(body); + OuterObjectWithEnumProperty result = apiInstance.fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakePropertyEnumIntegerSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **outerObjectWithEnumProperty** | [**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md)| Input enum (int) as post body | | + +### Return type + +[**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md) + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output enum (int) | - | + +## fakePropertyEnumIntegerSerializeWithHttpInfo + +> ApiResponse fakePropertyEnumIntegerSerialize fakePropertyEnumIntegerSerializeWithHttpInfo(outerObjectWithEnumProperty) + + + +Test serialization of enum (int) properties with examples + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.ApiResponse; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + FakeApi apiInstance = new FakeApi(defaultClient); + OuterObjectWithEnumProperty outerObjectWithEnumProperty = new OuterObjectWithEnumProperty(); // OuterObjectWithEnumProperty | Input enum (int) as post body + try { + ApiResponse response = apiInstance.fakePropertyEnumIntegerSerializeWithHttpInfo(outerObjectWithEnumProperty); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#fakePropertyEnumIntegerSerialize"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **outerObjectWithEnumProperty** | [**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md)| Input enum (int) as post body | | + +### Return type + +ApiResponse<[**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md)> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Output enum (int) | - | + + +## testBodyWithBinary + +> void testBodyWithBinary(body) + + + +For this test, the body has to be a binary file. + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + FakeApi apiInstance = new FakeApi(defaultClient); + File body = new File("/path/to/file"); // File | image to upload + try { + apiInstance.testBodyWithBinary(body); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testBodyWithBinary"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **File**| image to upload | | + +### Return type + + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: image/png +- **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + +## testBodyWithBinaryWithHttpInfo + +> ApiResponse testBodyWithBinary testBodyWithBinaryWithHttpInfo(body) + + + +For this test, the body has to be a binary file. + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.ApiResponse; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + FakeApi apiInstance = new FakeApi(defaultClient); + File body = new File("/path/to/file"); // File | image to upload + try { + ApiResponse response = apiInstance.testBodyWithBinaryWithHttpInfo(body); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + } catch (ApiException e) { + System.err.println("Exception when calling FakeApi#testBodyWithBinary"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **File**| image to upload | | + +### Return type + + +ApiResponse + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: image/png +- **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Success | - | + + +## testBodyWithFileSchema + +> void testBodyWithFileSchema(fileSchemaTestClass) + + + +For this test, the body for this request must reference a schema named `File`. + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FakeApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + FakeApi apiInstance = new FakeApi(defaultClient); + FileSchemaTestClass fileSchemaTestClass = new FileSchemaTestClass(); // FileSchemaTestClass | + try { + apiInstance.testBodyWithFileSchema(fileSchemaTestClass); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testBodyWithFileSchema"); System.err.println("Status code: " + e.getCode()); @@ -746,7 +1148,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | | +| **fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | | ### Return type @@ -769,11 +1171,11 @@ No authorization required ## testBodyWithFileSchemaWithHttpInfo -> ApiResponse testBodyWithFileSchema testBodyWithFileSchemaWithHttpInfo(body) +> ApiResponse testBodyWithFileSchema testBodyWithFileSchemaWithHttpInfo(fileSchemaTestClass) -For this test, the body for this request much reference a schema named `File`. +For this test, the body for this request must reference a schema named `File`. ### Example @@ -792,9 +1194,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass | + FileSchemaTestClass fileSchemaTestClass = new FileSchemaTestClass(); // FileSchemaTestClass | try { - ApiResponse response = apiInstance.testBodyWithFileSchemaWithHttpInfo(body); + ApiResponse response = apiInstance.testBodyWithFileSchemaWithHttpInfo(fileSchemaTestClass); System.out.println("Status code: " + response.getStatusCode()); System.out.println("Response headers: " + response.getHeaders()); } catch (ApiException e) { @@ -813,7 +1215,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | | +| **fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | | ### Return type @@ -837,7 +1239,7 @@ No authorization required ## testBodyWithQueryParams -> void testBodyWithQueryParams(query, body) +> void testBodyWithQueryParams(query, user) @@ -858,9 +1260,9 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); String query = "query_example"; // String | - User body = new User(); // User | + User user = new User(); // User | try { - apiInstance.testBodyWithQueryParams(query, body); + apiInstance.testBodyWithQueryParams(query, user); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testBodyWithQueryParams"); System.err.println("Status code: " + e.getCode()); @@ -878,7 +1280,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **query** | **String**| | | -| **body** | [**User**](User.md)| | | +| **user** | [**User**](User.md)| | | ### Return type @@ -901,7 +1303,7 @@ No authorization required ## testBodyWithQueryParamsWithHttpInfo -> ApiResponse testBodyWithQueryParams testBodyWithQueryParamsWithHttpInfo(query, body) +> ApiResponse testBodyWithQueryParams testBodyWithQueryParamsWithHttpInfo(query, user) @@ -923,9 +1325,9 @@ public class Example { FakeApi apiInstance = new FakeApi(defaultClient); String query = "query_example"; // String | - User body = new User(); // User | + User user = new User(); // User | try { - ApiResponse response = apiInstance.testBodyWithQueryParamsWithHttpInfo(query, body); + ApiResponse response = apiInstance.testBodyWithQueryParamsWithHttpInfo(query, user); System.out.println("Status code: " + response.getStatusCode()); System.out.println("Response headers: " + response.getHeaders()); } catch (ApiException e) { @@ -945,7 +1347,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **query** | **String**| | | -| **body** | [**User**](User.md)| | | +| **user** | [**User**](User.md)| | | ### Return type @@ -969,7 +1371,7 @@ No authorization required ## testClientModel -> Client testClientModel(body) +> Client testClientModel(client) To test \"client\" model @@ -991,9 +1393,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - Client body = new Client(); // Client | client model + Client client = new Client(); // Client | client model try { - Client result = apiInstance.testClientModel(body); + Client result = apiInstance.testClientModel(client); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testClientModel"); @@ -1011,7 +1413,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**Client**](Client.md)| client model | | +| **client** | [**Client**](Client.md)| client model | | ### Return type @@ -1034,7 +1436,7 @@ No authorization required ## testClientModelWithHttpInfo -> ApiResponse testClientModel testClientModelWithHttpInfo(body) +> ApiResponse testClientModel testClientModelWithHttpInfo(client) To test \"client\" model @@ -1057,9 +1459,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - Client body = new Client(); // Client | client model + Client client = new Client(); // Client | client model try { - ApiResponse response = apiInstance.testClientModelWithHttpInfo(body); + ApiResponse response = apiInstance.testClientModelWithHttpInfo(client); System.out.println("Status code: " + response.getStatusCode()); System.out.println("Response headers: " + response.getHeaders()); System.out.println("Response body: " + response.getData()); @@ -1079,7 +1481,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**Client**](Client.md)| client model | | +| **client** | [**Client**](Client.md)| client model | | ### Return type @@ -1105,9 +1507,9 @@ No authorization required > void testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback) -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ### Example @@ -1202,9 +1604,9 @@ null (empty response body) > ApiResponse testEndpointParameters testEndpointParametersWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback) -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ### Example @@ -1301,7 +1703,7 @@ ApiResponse ## testEnumParameters -> void testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString) +> void testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString) To test enum parameters @@ -1329,10 +1731,11 @@ public class Example { String enumQueryString = "_abc"; // String | Query parameter enum test (string) Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) + List enumQueryModelArray = Arrays.asList(-efg); // List | List enumFormStringArray = Arrays.asList("$"); // List | Form parameter enum test (string array) String enumFormString = "_abc"; // String | Form parameter enum test (string) try { - apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testEnumParameters"); System.err.println("Status code: " + e.getCode()); @@ -1355,6 +1758,7 @@ public class Example { | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | +| **enumQueryModelArray** | [**List<EnumClass>**](EnumClass.md)| | [optional] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | | **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | @@ -1380,7 +1784,7 @@ No authorization required ## testEnumParametersWithHttpInfo -> ApiResponse testEnumParameters testEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString) +> ApiResponse testEnumParameters testEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString) To test enum parameters @@ -1409,10 +1813,11 @@ public class Example { String enumQueryString = "_abc"; // String | Query parameter enum test (string) Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) + List enumQueryModelArray = Arrays.asList(-efg); // List | List enumFormStringArray = Arrays.asList("$"); // List | Form parameter enum test (string array) String enumFormString = "_abc"; // String | Form parameter enum test (string) try { - ApiResponse response = apiInstance.testEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + ApiResponse response = apiInstance.testEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString); System.out.println("Status code: " + response.getStatusCode()); System.out.println("Response headers: " + response.getHeaders()); } catch (ApiException e) { @@ -1437,6 +1842,7 @@ public class Example { | **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | | **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | | **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | +| **enumQueryModelArray** | [**List<EnumClass>**](EnumClass.md)| | [optional] | | **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | | **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | @@ -1476,6 +1882,7 @@ Fake endpoint to test group parameters (optional) import org.openapitools.client.ApiClient; import org.openapitools.client.ApiException; import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; import org.openapitools.client.models.*; import org.openapitools.client.api.FakeApi; import org.openapitools.client.api.FakeApi.*; @@ -1484,6 +1891,10 @@ public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure HTTP bearer authorization: bearer_test + HttpBearerAuth bearer_test = (HttpBearerAuth) defaultClient.getAuthentication("bearer_test"); + bearer_test.setBearerToken("BEARER TOKEN"); FakeApi apiInstance = new FakeApi(defaultClient); Integer requiredStringGroup = 56; // Integer | Required String in group parameters @@ -1526,7 +1937,7 @@ null (empty response body) ### Authorization -No authorization required +[bearer_test](../README.md#bearer_test) ### HTTP request headers @@ -1554,6 +1965,7 @@ import org.openapitools.client.ApiClient; import org.openapitools.client.ApiException; import org.openapitools.client.ApiResponse; import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; import org.openapitools.client.models.*; import org.openapitools.client.api.FakeApi; import org.openapitools.client.api.FakeApi.*; @@ -1562,6 +1974,10 @@ public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); + + // Configure HTTP bearer authorization: bearer_test + HttpBearerAuth bearer_test = (HttpBearerAuth) defaultClient.getAuthentication("bearer_test"); + bearer_test.setBearerToken("BEARER TOKEN"); FakeApi apiInstance = new FakeApi(defaultClient); Integer requiredStringGroup = 56; // Integer | Required String in group parameters @@ -1606,7 +2022,7 @@ ApiResponse ### Authorization -No authorization required +[bearer_test](../README.md#bearer_test) ### HTTP request headers @@ -1636,10 +2052,12 @@ No authorization required ## testInlineAdditionalProperties -> void testInlineAdditionalProperties(param) +> void testInlineAdditionalProperties(requestBody) test inline additionalProperties + + ### Example ```java @@ -1656,9 +2074,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - Map param = new HashMap(); // Map | request body + Map requestBody = new HashMap(); // Map | request body try { - apiInstance.testInlineAdditionalProperties(param); + apiInstance.testInlineAdditionalProperties(requestBody); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties"); System.err.println("Status code: " + e.getCode()); @@ -1675,7 +2093,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **param** | [**Map<String, String>**](String.md)| request body | | +| **requestBody** | [**Map<String, String>**](String.md)| request body | | ### Return type @@ -1698,10 +2116,12 @@ No authorization required ## testInlineAdditionalPropertiesWithHttpInfo -> ApiResponse testInlineAdditionalProperties testInlineAdditionalPropertiesWithHttpInfo(param) +> ApiResponse testInlineAdditionalProperties testInlineAdditionalPropertiesWithHttpInfo(requestBody) test inline additionalProperties + + ### Example ```java @@ -1719,9 +2139,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); FakeApi apiInstance = new FakeApi(defaultClient); - Map param = new HashMap(); // Map | request body + Map requestBody = new HashMap(); // Map | request body try { - ApiResponse response = apiInstance.testInlineAdditionalPropertiesWithHttpInfo(param); + ApiResponse response = apiInstance.testInlineAdditionalPropertiesWithHttpInfo(requestBody); System.out.println("Status code: " + response.getStatusCode()); System.out.println("Response headers: " + response.getHeaders()); } catch (ApiException e) { @@ -1740,7 +2160,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **param** | [**Map<String, String>**](String.md)| request body | | +| **requestBody** | [**Map<String, String>**](String.md)| request body | | ### Return type @@ -1768,6 +2188,8 @@ No authorization required test json serialization of form data + + ### Example ```java @@ -1832,6 +2254,8 @@ No authorization required test json serialization of form data + + ### Example ```java @@ -1896,7 +2320,7 @@ No authorization required ## testQueryParameterCollectionFormat -> void testQueryParameterCollectionFormat(pipe, ioutil, http, url, context) +> void testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language) @@ -1923,8 +2347,10 @@ public class Example { List http = Arrays.asList(); // List | List url = Arrays.asList(); // List | List context = Arrays.asList(); // List | + String allowEmpty = "allowEmpty_example"; // String | + Map language = new HashMap(); // Map | try { - apiInstance.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context); + apiInstance.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language); } catch (ApiException e) { System.err.println("Exception when calling FakeApi#testQueryParameterCollectionFormat"); System.err.println("Status code: " + e.getCode()); @@ -1946,6 +2372,8 @@ public class Example { | **http** | [**List<String>**](String.md)| | | | **url** | [**List<String>**](String.md)| | | | **context** | [**List<String>**](String.md)| | | +| **allowEmpty** | **String**| | | +| **language** | [**Map<String, String>**](String.md)| | [optional] | ### Return type @@ -1968,7 +2396,7 @@ No authorization required ## testQueryParameterCollectionFormatWithHttpInfo -> ApiResponse testQueryParameterCollectionFormat testQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context) +> ApiResponse testQueryParameterCollectionFormat testQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context, allowEmpty, language) @@ -1996,8 +2424,10 @@ public class Example { List http = Arrays.asList(); // List | List url = Arrays.asList(); // List | List context = Arrays.asList(); // List | + String allowEmpty = "allowEmpty_example"; // String | + Map language = new HashMap(); // Map | try { - ApiResponse response = apiInstance.testQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context); + ApiResponse response = apiInstance.testQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context, allowEmpty, language); System.out.println("Status code: " + response.getStatusCode()); System.out.println("Response headers: " + response.getHeaders()); } catch (ApiException e) { @@ -2021,6 +2451,8 @@ public class Example { | **http** | [**List<String>**](String.md)| | | | **url** | [**List<String>**](String.md)| | | | **context** | [**List<String>**](String.md)| | | +| **allowEmpty** | **String**| | | +| **language** | [**Map<String, String>**](String.md)| | [optional] | ### Return type diff --git a/samples/client/petstore/java/native/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/native/docs/FakeClassnameTags123Api.md index 50553769d1..f139bfdd27 100644 --- a/samples/client/petstore/java/native/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/java/native/docs/FakeClassnameTags123Api.md @@ -11,7 +11,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* ## testClassname -> Client testClassname(body) +> Client testClassname(client) To test class name in snake case @@ -40,9 +40,9 @@ public class Example { //api_key_query.setApiKeyPrefix("Token"); FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(defaultClient); - Client body = new Client(); // Client | client model + Client client = new Client(); // Client | client model try { - Client result = apiInstance.testClassname(body); + Client result = apiInstance.testClassname(client); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FakeClassnameTags123Api#testClassname"); @@ -60,7 +60,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**Client**](Client.md)| client model | | +| **client** | [**Client**](Client.md)| client model | | ### Return type @@ -83,7 +83,7 @@ public class Example { ## testClassnameWithHttpInfo -> ApiResponse testClassname testClassnameWithHttpInfo(body) +> ApiResponse testClassname testClassnameWithHttpInfo(client) To test class name in snake case @@ -113,9 +113,9 @@ public class Example { //api_key_query.setApiKeyPrefix("Token"); FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(defaultClient); - Client body = new Client(); // Client | client model + Client client = new Client(); // Client | client model try { - ApiResponse response = apiInstance.testClassnameWithHttpInfo(body); + ApiResponse response = apiInstance.testClassnameWithHttpInfo(client); System.out.println("Status code: " + response.getStatusCode()); System.out.println("Response headers: " + response.getHeaders()); System.out.println("Response body: " + response.getData()); @@ -135,7 +135,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**Client**](Client.md)| client model | | +| **client** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/native/docs/Foo.md b/samples/client/petstore/java/native/docs/Foo.md new file mode 100644 index 0000000000..6b3f055652 --- /dev/null +++ b/samples/client/petstore/java/native/docs/Foo.md @@ -0,0 +1,13 @@ + + +# Foo + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**bar** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java/native/docs/FooGetDefaultResponse.md b/samples/client/petstore/java/native/docs/FooGetDefaultResponse.md new file mode 100644 index 0000000000..ff3d7a3a56 --- /dev/null +++ b/samples/client/petstore/java/native/docs/FooGetDefaultResponse.md @@ -0,0 +1,13 @@ + + +# FooGetDefaultResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**string** | [**Foo**](Foo.md) | | [optional] | + + + diff --git a/samples/client/petstore/java/native/docs/FormatTest.md b/samples/client/petstore/java/native/docs/FormatTest.md index 9c68c3080e..01b8c777ae 100644 --- a/samples/client/petstore/java/native/docs/FormatTest.md +++ b/samples/client/petstore/java/native/docs/FormatTest.md @@ -13,6 +13,7 @@ |**number** | **BigDecimal** | | | |**_float** | **Float** | | [optional] | |**_double** | **Double** | | [optional] | +|**decimal** | **BigDecimal** | | [optional] | |**string** | **String** | | [optional] | |**_byte** | **byte[]** | | | |**binary** | **File** | | [optional] | @@ -20,7 +21,8 @@ |**dateTime** | **OffsetDateTime** | | [optional] | |**uuid** | **UUID** | | [optional] | |**password** | **String** | | | -|**bigDecimal** | **BigDecimal** | | [optional] | +|**patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] | +|**patternWithDigitsAndDelimiter** | **String** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [optional] | diff --git a/samples/client/petstore/java/native/docs/HealthCheckResult.md b/samples/client/petstore/java/native/docs/HealthCheckResult.md new file mode 100644 index 0000000000..4885e6f1ca --- /dev/null +++ b/samples/client/petstore/java/native/docs/HealthCheckResult.md @@ -0,0 +1,14 @@ + + +# HealthCheckResult + +Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**nullableMessage** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java/native/docs/NullableClass.md b/samples/client/petstore/java/native/docs/NullableClass.md new file mode 100644 index 0000000000..fa98c5c6d9 --- /dev/null +++ b/samples/client/petstore/java/native/docs/NullableClass.md @@ -0,0 +1,24 @@ + + +# NullableClass + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**integerProp** | **Integer** | | [optional] | +|**numberProp** | **BigDecimal** | | [optional] | +|**booleanProp** | **Boolean** | | [optional] | +|**stringProp** | **String** | | [optional] | +|**dateProp** | **LocalDate** | | [optional] | +|**datetimeProp** | **OffsetDateTime** | | [optional] | +|**arrayNullableProp** | **List<Object>** | | [optional] | +|**arrayAndItemsNullableProp** | **List<Object>** | | [optional] | +|**arrayItemsNullable** | **List<Object>** | | [optional] | +|**objectNullableProp** | **Map<String, Object>** | | [optional] | +|**objectAndItemsNullableProp** | **Map<String, Object>** | | [optional] | +|**objectItemsNullable** | **Map<String, Object>** | | [optional] | + + + diff --git a/samples/client/petstore/java/native/docs/ObjectWithDeprecatedFields.md b/samples/client/petstore/java/native/docs/ObjectWithDeprecatedFields.md new file mode 100644 index 0000000000..f1cf571f4c --- /dev/null +++ b/samples/client/petstore/java/native/docs/ObjectWithDeprecatedFields.md @@ -0,0 +1,16 @@ + + +# ObjectWithDeprecatedFields + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**uuid** | **String** | | [optional] | +|**id** | **BigDecimal** | | [optional] | +|**deprecatedRef** | [**DeprecatedObject**](DeprecatedObject.md) | | [optional] | +|**bars** | **List<String>** | | [optional] | + + + diff --git a/samples/client/petstore/java/native/docs/OuterEnumDefaultValue.md b/samples/client/petstore/java/native/docs/OuterEnumDefaultValue.md new file mode 100644 index 0000000000..cbc7f4ba54 --- /dev/null +++ b/samples/client/petstore/java/native/docs/OuterEnumDefaultValue.md @@ -0,0 +1,15 @@ + + +# OuterEnumDefaultValue + +## Enum + + +* `PLACED` (value: `"placed"`) + +* `APPROVED` (value: `"approved"`) + +* `DELIVERED` (value: `"delivered"`) + + + diff --git a/samples/client/petstore/java/native/docs/OuterEnumInteger.md b/samples/client/petstore/java/native/docs/OuterEnumInteger.md new file mode 100644 index 0000000000..f71dea30ad --- /dev/null +++ b/samples/client/petstore/java/native/docs/OuterEnumInteger.md @@ -0,0 +1,15 @@ + + +# OuterEnumInteger + +## Enum + + +* `NUMBER_0` (value: `0`) + +* `NUMBER_1` (value: `1`) + +* `NUMBER_2` (value: `2`) + + + diff --git a/samples/client/petstore/java/native/docs/OuterEnumIntegerDefaultValue.md b/samples/client/petstore/java/native/docs/OuterEnumIntegerDefaultValue.md new file mode 100644 index 0000000000..99e6389f42 --- /dev/null +++ b/samples/client/petstore/java/native/docs/OuterEnumIntegerDefaultValue.md @@ -0,0 +1,15 @@ + + +# OuterEnumIntegerDefaultValue + +## Enum + + +* `NUMBER_0` (value: `0`) + +* `NUMBER_1` (value: `1`) + +* `NUMBER_2` (value: `2`) + + + diff --git a/samples/client/petstore/java/native/docs/OuterObjectWithEnumProperty.md b/samples/client/petstore/java/native/docs/OuterObjectWithEnumProperty.md new file mode 100644 index 0000000000..0fafaaa271 --- /dev/null +++ b/samples/client/petstore/java/native/docs/OuterObjectWithEnumProperty.md @@ -0,0 +1,13 @@ + + +# OuterObjectWithEnumProperty + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**value** | **OuterEnumInteger** | | | + + + diff --git a/samples/client/petstore/java/native/docs/PetApi.md b/samples/client/petstore/java/native/docs/PetApi.md index 9ee7f49c4e..400ff9cd87 100644 --- a/samples/client/petstore/java/native/docs/PetApi.md +++ b/samples/client/petstore/java/native/docs/PetApi.md @@ -27,10 +27,12 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* ## addPet -> void addPet(body) +> void addPet(pet) Add a new pet to the store + + ### Example ```java @@ -52,9 +54,9 @@ public class Example { petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); PetApi apiInstance = new PetApi(defaultClient); - Pet body = new Pet(); // Pet | Pet object that needs to be added to the store + Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store try { - apiInstance.addPet(body); + apiInstance.addPet(pet); } catch (ApiException e) { System.err.println("Exception when calling PetApi#addPet"); System.err.println("Status code: " + e.getCode()); @@ -71,7 +73,7 @@ public class Example { | 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 @@ -90,15 +92,17 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | successful operation | - | +| **200** | Successful operation | - | | **405** | Invalid input | - | ## addPetWithHttpInfo -> ApiResponse addPet addPetWithHttpInfo(body) +> ApiResponse addPet addPetWithHttpInfo(pet) Add a new pet to the store + + ### Example ```java @@ -121,9 +125,9 @@ public class Example { petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); PetApi apiInstance = new PetApi(defaultClient); - Pet body = new Pet(); // Pet | Pet object that needs to be added to the store + Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store try { - ApiResponse response = apiInstance.addPetWithHttpInfo(body); + ApiResponse response = apiInstance.addPetWithHttpInfo(pet); System.out.println("Status code: " + response.getStatusCode()); System.out.println("Response headers: " + response.getHeaders()); } catch (ApiException e) { @@ -142,7 +146,7 @@ public class Example { | 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 @@ -161,7 +165,7 @@ ApiResponse ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | successful operation | - | +| **200** | Successful operation | - | | **405** | Invalid input | - | @@ -171,6 +175,8 @@ ApiResponse Deletes a pet + + ### Example ```java @@ -232,7 +238,7 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | successful operation | - | +| **200** | Successful operation | - | | **400** | Invalid pet value | - | ## deletePetWithHttpInfo @@ -241,6 +247,8 @@ null (empty response body) Deletes a pet + + ### Example ```java @@ -305,7 +313,7 @@ ApiResponse ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | successful operation | - | +| **200** | Successful operation | - | | **400** | Invalid pet value | - | @@ -755,10 +763,12 @@ ApiResponse<[**Pet**](Pet.md)> ## updatePet -> void updatePet(body) +> void updatePet(pet) Update an existing pet + + ### Example ```java @@ -780,9 +790,9 @@ public class Example { petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); PetApi apiInstance = new PetApi(defaultClient); - Pet body = new Pet(); // Pet | Pet object that needs to be added to the store + Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store try { - apiInstance.updatePet(body); + apiInstance.updatePet(pet); } catch (ApiException e) { System.err.println("Exception when calling PetApi#updatePet"); System.err.println("Status code: " + e.getCode()); @@ -799,7 +809,7 @@ public class Example { | 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 @@ -818,17 +828,19 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | successful operation | - | +| **200** | Successful operation | - | | **400** | Invalid ID supplied | - | | **404** | Pet not found | - | | **405** | Validation exception | - | ## updatePetWithHttpInfo -> ApiResponse updatePet updatePetWithHttpInfo(body) +> ApiResponse updatePet updatePetWithHttpInfo(pet) Update an existing pet + + ### Example ```java @@ -851,9 +863,9 @@ public class Example { petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); PetApi apiInstance = new PetApi(defaultClient); - Pet body = new Pet(); // Pet | Pet object that needs to be added to the store + Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store try { - ApiResponse response = apiInstance.updatePetWithHttpInfo(body); + ApiResponse response = apiInstance.updatePetWithHttpInfo(pet); System.out.println("Status code: " + response.getStatusCode()); System.out.println("Response headers: " + response.getHeaders()); } catch (ApiException e) { @@ -872,7 +884,7 @@ public class Example { | 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 @@ -891,7 +903,7 @@ ApiResponse ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | successful operation | - | +| **200** | Successful operation | - | | **400** | Invalid ID supplied | - | | **404** | Pet not found | - | | **405** | Validation exception | - | @@ -903,6 +915,8 @@ ApiResponse Updates a pet in the store with form data + + ### Example ```java @@ -966,6 +980,7 @@ null (empty response body) ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| +| **200** | Successful operation | - | | **405** | Invalid input | - | ## updatePetWithFormWithHttpInfo @@ -974,6 +989,8 @@ null (empty response body) Updates a pet in the store with form data + + ### Example ```java @@ -1040,6 +1057,7 @@ ApiResponse ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| +| **200** | Successful operation | - | | **405** | Invalid input | - | @@ -1049,6 +1067,8 @@ ApiResponse uploads an image + + ### Example ```java @@ -1121,6 +1141,8 @@ public class Example { uploads an image + + ### Example ```java @@ -1197,6 +1219,8 @@ ApiResponse<[**ModelApiResponse**](ModelApiResponse.md)> uploads an image (required) + + ### Example ```java @@ -1269,6 +1293,8 @@ public class Example { uploads an image (required) + + ### Example ```java diff --git a/samples/client/petstore/java/native/docs/SingleRefType.md b/samples/client/petstore/java/native/docs/SingleRefType.md new file mode 100644 index 0000000000..cc269bb871 --- /dev/null +++ b/samples/client/petstore/java/native/docs/SingleRefType.md @@ -0,0 +1,13 @@ + + +# SingleRefType + +## Enum + + +* `ADMIN` (value: `"admin"`) + +* `USER` (value: `"user"`) + + + diff --git a/samples/client/petstore/java/native/docs/StoreApi.md b/samples/client/petstore/java/native/docs/StoreApi.md index f45d5a4c76..b10b04f4c4 100644 --- a/samples/client/petstore/java/native/docs/StoreApi.md +++ b/samples/client/petstore/java/native/docs/StoreApi.md @@ -429,10 +429,12 @@ No authorization required ## placeOrder -> Order placeOrder(body) +> Order placeOrder(order) Place an order for a pet + + ### Example ```java @@ -449,9 +451,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); StoreApi apiInstance = new StoreApi(defaultClient); - Order body = new Order(); // Order | order placed for purchasing the pet + Order order = new Order(); // Order | order placed for purchasing the pet try { - Order result = apiInstance.placeOrder(body); + Order result = apiInstance.placeOrder(order); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling StoreApi#placeOrder"); @@ -469,7 +471,7 @@ public class Example { | 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 @@ -482,7 +484,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: application/xml, application/json ### HTTP response details @@ -493,10 +495,12 @@ No authorization required ## placeOrderWithHttpInfo -> ApiResponse placeOrder placeOrderWithHttpInfo(body) +> ApiResponse placeOrder placeOrderWithHttpInfo(order) Place an order for a pet + + ### Example ```java @@ -514,9 +518,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); StoreApi apiInstance = new StoreApi(defaultClient); - Order body = new Order(); // Order | order placed for purchasing the pet + Order order = new Order(); // Order | order placed for purchasing the pet try { - ApiResponse response = apiInstance.placeOrderWithHttpInfo(body); + ApiResponse response = apiInstance.placeOrderWithHttpInfo(order); System.out.println("Status code: " + response.getStatusCode()); System.out.println("Response headers: " + response.getHeaders()); System.out.println("Response body: " + response.getData()); @@ -536,7 +540,7 @@ public class Example { | 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 @@ -549,7 +553,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: application/xml, application/json ### HTTP response details diff --git a/samples/client/petstore/java/native/docs/UserApi.md b/samples/client/petstore/java/native/docs/UserApi.md index f1bc072177..6a427b4ef9 100644 --- a/samples/client/petstore/java/native/docs/UserApi.md +++ b/samples/client/petstore/java/native/docs/UserApi.md @@ -25,7 +25,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* ## createUser -> void createUser(body) +> void createUser(user) Create user @@ -47,9 +47,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); UserApi apiInstance = new UserApi(defaultClient); - User body = new User(); // User | Created user object + User user = new User(); // User | Created user object try { - apiInstance.createUser(body); + apiInstance.createUser(user); } catch (ApiException e) { System.err.println("Exception when calling UserApi#createUser"); System.err.println("Status code: " + e.getCode()); @@ -66,7 +66,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**User**](User.md)| Created user object | | +| **user** | [**User**](User.md)| Created user object | | ### Return type @@ -79,7 +79,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: Not defined ### HTTP response details @@ -89,7 +89,7 @@ No authorization required ## createUserWithHttpInfo -> ApiResponse createUser createUserWithHttpInfo(body) +> ApiResponse createUser createUserWithHttpInfo(user) Create user @@ -112,9 +112,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); UserApi apiInstance = new UserApi(defaultClient); - User body = new User(); // User | Created user object + User user = new User(); // User | Created user object try { - ApiResponse response = apiInstance.createUserWithHttpInfo(body); + ApiResponse response = apiInstance.createUserWithHttpInfo(user); System.out.println("Status code: " + response.getStatusCode()); System.out.println("Response headers: " + response.getHeaders()); } catch (ApiException e) { @@ -133,7 +133,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**User**](User.md)| Created user object | | +| **user** | [**User**](User.md)| Created user object | | ### Return type @@ -146,7 +146,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: Not defined ### HTTP response details @@ -157,10 +157,12 @@ No authorization required ## createUsersWithArrayInput -> void createUsersWithArrayInput(body) +> void createUsersWithArrayInput(user) Creates list of users with given input array + + ### Example ```java @@ -177,9 +179,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); UserApi apiInstance = new UserApi(defaultClient); - List body = Arrays.asList(); // List | List of user object + List user = Arrays.asList(); // List | List of user object try { - apiInstance.createUsersWithArrayInput(body); + apiInstance.createUsersWithArrayInput(user); } catch (ApiException e) { System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); System.err.println("Status code: " + e.getCode()); @@ -196,7 +198,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**List<User>**](User.md)| List of user object | | +| **user** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -209,7 +211,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: Not defined ### HTTP response details @@ -219,10 +221,12 @@ No authorization required ## createUsersWithArrayInputWithHttpInfo -> ApiResponse createUsersWithArrayInput createUsersWithArrayInputWithHttpInfo(body) +> ApiResponse createUsersWithArrayInput createUsersWithArrayInputWithHttpInfo(user) Creates list of users with given input array + + ### Example ```java @@ -240,9 +244,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); UserApi apiInstance = new UserApi(defaultClient); - List body = Arrays.asList(); // List | List of user object + List user = Arrays.asList(); // List | List of user object try { - ApiResponse response = apiInstance.createUsersWithArrayInputWithHttpInfo(body); + ApiResponse response = apiInstance.createUsersWithArrayInputWithHttpInfo(user); System.out.println("Status code: " + response.getStatusCode()); System.out.println("Response headers: " + response.getHeaders()); } catch (ApiException e) { @@ -261,7 +265,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**List<User>**](User.md)| List of user object | | +| **user** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -274,7 +278,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: Not defined ### HTTP response details @@ -285,10 +289,12 @@ No authorization required ## createUsersWithListInput -> void createUsersWithListInput(body) +> void createUsersWithListInput(user) Creates list of users with given input array + + ### Example ```java @@ -305,9 +311,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); UserApi apiInstance = new UserApi(defaultClient); - List body = Arrays.asList(); // List | List of user object + List user = Arrays.asList(); // List | List of user object try { - apiInstance.createUsersWithListInput(body); + apiInstance.createUsersWithListInput(user); } catch (ApiException e) { System.err.println("Exception when calling UserApi#createUsersWithListInput"); System.err.println("Status code: " + e.getCode()); @@ -324,7 +330,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**List<User>**](User.md)| List of user object | | +| **user** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -337,7 +343,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: Not defined ### HTTP response details @@ -347,10 +353,12 @@ No authorization required ## createUsersWithListInputWithHttpInfo -> ApiResponse createUsersWithListInput createUsersWithListInputWithHttpInfo(body) +> ApiResponse createUsersWithListInput createUsersWithListInputWithHttpInfo(user) Creates list of users with given input array + + ### Example ```java @@ -368,9 +376,9 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); UserApi apiInstance = new UserApi(defaultClient); - List body = Arrays.asList(); // List | List of user object + List user = Arrays.asList(); // List | List of user object try { - ApiResponse response = apiInstance.createUsersWithListInputWithHttpInfo(body); + ApiResponse response = apiInstance.createUsersWithListInputWithHttpInfo(user); System.out.println("Status code: " + response.getStatusCode()); System.out.println("Response headers: " + response.getHeaders()); } catch (ApiException e) { @@ -389,7 +397,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | [**List<User>**](User.md)| List of user object | | +| **user** | [**List<User>**](User.md)| List of user object | | ### Return type @@ -402,7 +410,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: Not defined ### HTTP response details @@ -551,6 +559,8 @@ No authorization required Get user by user name + + ### Example ```java @@ -616,6 +626,8 @@ No authorization required Get user by user name + + ### Example ```java @@ -685,6 +697,8 @@ No authorization required Logs user into the system + + ### Example ```java @@ -751,6 +765,8 @@ No authorization required Logs user into the system + + ### Example ```java @@ -821,6 +837,8 @@ No authorization required Logs out current logged in user session + + ### Example ```java @@ -879,6 +897,8 @@ No authorization required Logs out current logged in user session + + ### Example ```java @@ -937,7 +957,7 @@ No authorization required ## updateUser -> void updateUser(username, body) +> void updateUser(username, user) Updated user @@ -960,9 +980,9 @@ public class Example { UserApi apiInstance = new UserApi(defaultClient); String username = "username_example"; // String | name that need to be deleted - User body = new User(); // User | Updated user object + User user = new User(); // User | Updated user object try { - apiInstance.updateUser(username, body); + apiInstance.updateUser(username, user); } catch (ApiException e) { System.err.println("Exception when calling UserApi#updateUser"); System.err.println("Status code: " + e.getCode()); @@ -980,7 +1000,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **username** | **String**| name that need to be deleted | | -| **body** | [**User**](User.md)| Updated user object | | +| **user** | [**User**](User.md)| Updated user object | | ### Return type @@ -993,7 +1013,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: Not defined ### HTTP response details @@ -1004,7 +1024,7 @@ No authorization required ## updateUserWithHttpInfo -> ApiResponse updateUser updateUserWithHttpInfo(username, body) +> ApiResponse updateUser updateUserWithHttpInfo(username, user) Updated user @@ -1028,9 +1048,9 @@ public class Example { UserApi apiInstance = new UserApi(defaultClient); String username = "username_example"; // String | name that need to be deleted - User body = new User(); // User | Updated user object + User user = new User(); // User | Updated user object try { - ApiResponse response = apiInstance.updateUserWithHttpInfo(username, body); + ApiResponse response = apiInstance.updateUserWithHttpInfo(username, user); System.out.println("Status code: " + response.getStatusCode()); System.out.println("Response headers: " + response.getHeaders()); } catch (ApiException e) { @@ -1050,7 +1070,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **username** | **String**| name that need to be deleted | | -| **body** | [**User**](User.md)| Updated user object | | +| **user** | [**User**](User.md)| Updated user object | | ### Return type @@ -1063,7 +1083,7 @@ No authorization required ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: Not defined ### HTTP response details diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index c647634e91..61d8857b92 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -77,24 +77,24 @@ public class AnotherFakeApi { /** * To test special tags * To test special tags and operation ID starting with number - * @param body client model (required) + * @param client client model (required) * @return Client * @throws ApiException if fails to make API call */ - public Client call123testSpecialTags(Client body) throws ApiException { - ApiResponse localVarResponse = call123testSpecialTagsWithHttpInfo(body); + public Client call123testSpecialTags(Client client) throws ApiException { + ApiResponse localVarResponse = call123testSpecialTagsWithHttpInfo(client); return localVarResponse.getData(); } /** * To test special tags * To test special tags and operation ID starting with number - * @param body client model (required) + * @param client client model (required) * @return ApiResponse<Client> * @throws ApiException if fails to make API call */ - public ApiResponse call123testSpecialTagsWithHttpInfo(Client body) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = call123testSpecialTagsRequestBuilder(body); + public ApiResponse call123testSpecialTagsWithHttpInfo(Client client) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = call123testSpecialTagsRequestBuilder(client); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -124,10 +124,10 @@ public class AnotherFakeApi { } } - private HttpRequest.Builder call123testSpecialTagsRequestBuilder(Client body) throws ApiException { - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling call123testSpecialTags"); + private HttpRequest.Builder call123testSpecialTagsRequestBuilder(Client client) throws ApiException { + // verify the required parameter 'client' is set + if (client == null) { + throw new ApiException(400, "Missing the required parameter 'client' when calling call123testSpecialTags"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -140,7 +140,7 @@ public class AnotherFakeApi { localVarRequestBuilder.header("Accept", "application/json"); try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(client); localVarRequestBuilder.method("PATCH", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { throw new ApiException(e); diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/DefaultApi.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/DefaultApi.java new file mode 100644 index 0000000000..f5e4029c68 --- /dev/null +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/DefaultApi.java @@ -0,0 +1,144 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package org.openapitools.client.api; + +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.ApiResponse; +import org.openapitools.client.Pair; + +import org.openapitools.client.model.FooGetDefaultResponse; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.IOException; +import java.io.InputStream; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DefaultApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public DefaultApi() { + this(new ApiClient()); + } + + public DefaultApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * + * + * @return FooGetDefaultResponse + * @throws ApiException if fails to make API call + */ + public FooGetDefaultResponse fooGet() throws ApiException { + ApiResponse localVarResponse = fooGetWithHttpInfo(); + return localVarResponse.getData(); + } + + /** + * + * + * @return ApiResponse<FooGetDefaultResponse> + * @throws ApiException if fails to make API call + */ + public ApiResponse fooGetWithHttpInfo() throws ApiException { + HttpRequest.Builder localVarRequestBuilder = fooGetRequestBuilder(); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("fooGet", localVarResponse); + } + InputStream responseBody = localVarResponse.body(); + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) // closes the InputStream + + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder fooGetRequestBuilder() throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/foo"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/FakeApi.java index 382ae5e0c5..4ae660f5b8 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/FakeApi.java @@ -19,13 +19,16 @@ import org.openapitools.client.Pair; import java.math.BigDecimal; import org.openapitools.client.model.Client; +import org.openapitools.client.model.EnumClass; import java.io.File; import org.openapitools.client.model.FileSchemaTestClass; +import org.openapitools.client.model.HealthCheckResult; import java.time.LocalDate; import java.time.OffsetDateTime; import org.openapitools.client.model.OuterComposite; +import org.openapitools.client.model.OuterObjectWithEnumProperty; +import org.openapitools.client.model.Pet; import org.openapitools.client.model.User; -import org.openapitools.client.model.XmlItem; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; @@ -83,24 +86,24 @@ public class FakeApi { } /** - * creates an XmlItem - * this route creates an XmlItem - * @param xmlItem XmlItem Body (required) + * Health check endpoint + * + * @return HealthCheckResult * @throws ApiException if fails to make API call */ - public void createXmlItem(XmlItem xmlItem) throws ApiException { - createXmlItemWithHttpInfo(xmlItem); + public HealthCheckResult fakeHealthGet() throws ApiException { + ApiResponse localVarResponse = fakeHealthGetWithHttpInfo(); + return localVarResponse.getData(); } /** - * creates an XmlItem - * this route creates an XmlItem - * @param xmlItem XmlItem Body (required) - * @return ApiResponse<Void> + * Health check endpoint + * + * @return ApiResponse<HealthCheckResult> * @throws ApiException if fails to make API call */ - public ApiResponse createXmlItemWithHttpInfo(XmlItem xmlItem) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = createXmlItemRequestBuilder(xmlItem); + public ApiResponse fakeHealthGetWithHttpInfo() throws ApiException { + HttpRequest.Builder localVarRequestBuilder = fakeHealthGetRequestBuilder(); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -110,7 +113,78 @@ public class FakeApi { } try { if (localVarResponse.statusCode()/ 100 != 2) { - throw getApiException("createXmlItem", localVarResponse); + throw getApiException("fakeHealthGet", localVarResponse); + } + InputStream responseBody = localVarResponse.body(); + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) // closes the InputStream + + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder fakeHealthGetRequestBuilder() throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/fake/health"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "application/json"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** + * test http signature authentication + * + * @param pet Pet object that needs to be added to the store (required) + * @param query1 query parameter (optional) + * @param header1 header parameter (optional) + * @throws ApiException if fails to make API call + */ + public void fakeHttpSignatureTest(Pet pet, String query1, String header1) throws ApiException { + fakeHttpSignatureTestWithHttpInfo(pet, query1, header1); + } + + /** + * test http signature authentication + * + * @param pet Pet object that needs to be added to the store (required) + * @param query1 query parameter (optional) + * @param header1 header parameter (optional) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + */ + public ApiResponse fakeHttpSignatureTestWithHttpInfo(Pet pet, String query1, String header1) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = fakeHttpSignatureTestRequestBuilder(pet, query1, header1); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("fakeHttpSignatureTest", localVarResponse); } return new ApiResponse( localVarResponse.statusCode(), @@ -134,24 +208,36 @@ public class FakeApi { } } - private HttpRequest.Builder createXmlItemRequestBuilder(XmlItem xmlItem) throws ApiException { - // verify the required parameter 'xmlItem' is set - if (xmlItem == null) { - throw new ApiException(400, "Missing the required parameter 'xmlItem' when calling createXmlItem"); + private HttpRequest.Builder fakeHttpSignatureTestRequestBuilder(Pet pet, String query1, String header1) throws ApiException { + // verify the required parameter 'pet' is set + if (pet == null) { + throw new ApiException(400, "Missing the required parameter 'pet' when calling fakeHttpSignatureTest"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); - String localVarPath = "/fake/create_xml_item"; + String localVarPath = "/fake/http-signature-test"; - localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + List localVarQueryParams = new ArrayList<>(); + localVarQueryParams.addAll(ApiClient.parameterToPairs("query_1", query1)); - localVarRequestBuilder.header("Content-Type", "application/xml"); + if (!localVarQueryParams.isEmpty()) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + if (header1 != null) { + localVarRequestBuilder.header("header_1", header1.toString()); + } + localVarRequestBuilder.header("Content-Type", "application/json"); localVarRequestBuilder.header("Accept", "application/json"); try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(xmlItem); - localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(pet); + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { throw new ApiException(e); } @@ -241,24 +327,24 @@ public class FakeApi { /** * * Test serialization of object with outer number type - * @param body Input composite as post body (optional) + * @param outerComposite Input composite as post body (optional) * @return OuterComposite * @throws ApiException if fails to make API call */ - public OuterComposite fakeOuterCompositeSerialize(OuterComposite body) throws ApiException { - ApiResponse localVarResponse = fakeOuterCompositeSerializeWithHttpInfo(body); + public OuterComposite fakeOuterCompositeSerialize(OuterComposite outerComposite) throws ApiException { + ApiResponse localVarResponse = fakeOuterCompositeSerializeWithHttpInfo(outerComposite); return localVarResponse.getData(); } /** * * Test serialization of object with outer number type - * @param body Input composite as post body (optional) + * @param outerComposite Input composite as post body (optional) * @return ApiResponse<OuterComposite> * @throws ApiException if fails to make API call */ - public ApiResponse fakeOuterCompositeSerializeWithHttpInfo(OuterComposite body) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = fakeOuterCompositeSerializeRequestBuilder(body); + public ApiResponse fakeOuterCompositeSerializeWithHttpInfo(OuterComposite outerComposite) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = fakeOuterCompositeSerializeRequestBuilder(outerComposite); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -288,7 +374,7 @@ public class FakeApi { } } - private HttpRequest.Builder fakeOuterCompositeSerializeRequestBuilder(OuterComposite body) throws ApiException { + private HttpRequest.Builder fakeOuterCompositeSerializeRequestBuilder(OuterComposite outerComposite) throws ApiException { HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -300,7 +386,7 @@ public class FakeApi { localVarRequestBuilder.header("Accept", "*/*"); try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(outerComposite); localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { throw new ApiException(e); @@ -460,23 +546,183 @@ public class FakeApi { } /** * - * For this test, the body for this request much reference a schema named `File`. - * @param body (required) + * Test serialization of enum (int) properties with examples + * @param outerObjectWithEnumProperty Input enum (int) as post body (required) + * @return OuterObjectWithEnumProperty * @throws ApiException if fails to make API call */ - public void testBodyWithFileSchema(FileSchemaTestClass body) throws ApiException { - testBodyWithFileSchemaWithHttpInfo(body); + public OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(OuterObjectWithEnumProperty outerObjectWithEnumProperty) throws ApiException { + ApiResponse localVarResponse = fakePropertyEnumIntegerSerializeWithHttpInfo(outerObjectWithEnumProperty); + return localVarResponse.getData(); } /** * - * For this test, the body for this request much reference a schema named `File`. - * @param body (required) + * Test serialization of enum (int) properties with examples + * @param outerObjectWithEnumProperty Input enum (int) as post body (required) + * @return ApiResponse<OuterObjectWithEnumProperty> + * @throws ApiException if fails to make API call + */ + public ApiResponse fakePropertyEnumIntegerSerializeWithHttpInfo(OuterObjectWithEnumProperty outerObjectWithEnumProperty) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = fakePropertyEnumIntegerSerializeRequestBuilder(outerObjectWithEnumProperty); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("fakePropertyEnumIntegerSerialize", localVarResponse); + } + InputStream responseBody = localVarResponse.body(); + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) // closes the InputStream + + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder fakePropertyEnumIntegerSerializeRequestBuilder(OuterObjectWithEnumProperty outerObjectWithEnumProperty) throws ApiException { + // verify the required parameter 'outerObjectWithEnumProperty' is set + if (outerObjectWithEnumProperty == null) { + throw new ApiException(400, "Missing the required parameter 'outerObjectWithEnumProperty' when calling fakePropertyEnumIntegerSerialize"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/fake/property/enum-int"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "*/*"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(outerObjectWithEnumProperty); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** + * + * For this test, the body has to be a binary file. + * @param body image to upload (required) + * @throws ApiException if fails to make API call + */ + public void testBodyWithBinary(File body) throws ApiException { + testBodyWithBinaryWithHttpInfo(body); + } + + /** + * + * For this test, the body has to be a binary file. + * @param body image to upload (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ - public ApiResponse testBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass body) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = testBodyWithFileSchemaRequestBuilder(body); + public ApiResponse testBodyWithBinaryWithHttpInfo(File body) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = testBodyWithBinaryRequestBuilder(body); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("testBodyWithBinary", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + + null + ); + } finally { + // Drain the InputStream + while (localVarResponse.body().read() != -1) { + // Ignore + } + localVarResponse.body().close(); + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder testBodyWithBinaryRequestBuilder(File body) throws ApiException { + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException(400, "Missing the required parameter 'body' when calling testBodyWithBinary"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/fake/body-with-binary"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "image/png"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); + localVarRequestBuilder.method("PUT", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** + * + * For this test, the body for this request must reference a schema named `File`. + * @param fileSchemaTestClass (required) + * @throws ApiException if fails to make API call + */ + public void testBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass) throws ApiException { + testBodyWithFileSchemaWithHttpInfo(fileSchemaTestClass); + } + + /** + * + * For this test, the body for this request must reference a schema named `File`. + * @param fileSchemaTestClass (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + */ + public ApiResponse testBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass fileSchemaTestClass) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = testBodyWithFileSchemaRequestBuilder(fileSchemaTestClass); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -510,10 +756,10 @@ public class FakeApi { } } - private HttpRequest.Builder testBodyWithFileSchemaRequestBuilder(FileSchemaTestClass body) throws ApiException { - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling testBodyWithFileSchema"); + private HttpRequest.Builder testBodyWithFileSchemaRequestBuilder(FileSchemaTestClass fileSchemaTestClass) throws ApiException { + // verify the required parameter 'fileSchemaTestClass' is set + if (fileSchemaTestClass == null) { + throw new ApiException(400, "Missing the required parameter 'fileSchemaTestClass' when calling testBodyWithFileSchema"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -526,7 +772,7 @@ public class FakeApi { localVarRequestBuilder.header("Accept", "application/json"); try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(fileSchemaTestClass); localVarRequestBuilder.method("PUT", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { throw new ApiException(e); @@ -543,23 +789,23 @@ public class FakeApi { * * * @param query (required) - * @param body (required) + * @param user (required) * @throws ApiException if fails to make API call */ - public void testBodyWithQueryParams(String query, User body) throws ApiException { - testBodyWithQueryParamsWithHttpInfo(query, body); + public void testBodyWithQueryParams(String query, User user) throws ApiException { + testBodyWithQueryParamsWithHttpInfo(query, user); } /** * * * @param query (required) - * @param body (required) + * @param user (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ - public ApiResponse testBodyWithQueryParamsWithHttpInfo(String query, User body) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = testBodyWithQueryParamsRequestBuilder(query, body); + public ApiResponse testBodyWithQueryParamsWithHttpInfo(String query, User user) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = testBodyWithQueryParamsRequestBuilder(query, user); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -593,14 +839,14 @@ public class FakeApi { } } - private HttpRequest.Builder testBodyWithQueryParamsRequestBuilder(String query, User body) throws ApiException { + private HttpRequest.Builder testBodyWithQueryParamsRequestBuilder(String query, User user) throws ApiException { // verify the required parameter 'query' is set if (query == null) { throw new ApiException(400, "Missing the required parameter 'query' when calling testBodyWithQueryParams"); } - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling testBodyWithQueryParams"); + // verify the required parameter 'user' is set + if (user == null) { + throw new ApiException(400, "Missing the required parameter 'user' when calling testBodyWithQueryParams"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -622,7 +868,7 @@ public class FakeApi { localVarRequestBuilder.header("Accept", "application/json"); try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(user); localVarRequestBuilder.method("PUT", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { throw new ApiException(e); @@ -638,24 +884,24 @@ public class FakeApi { /** * To test \"client\" model * To test \"client\" model - * @param body client model (required) + * @param client client model (required) * @return Client * @throws ApiException if fails to make API call */ - public Client testClientModel(Client body) throws ApiException { - ApiResponse localVarResponse = testClientModelWithHttpInfo(body); + public Client testClientModel(Client client) throws ApiException { + ApiResponse localVarResponse = testClientModelWithHttpInfo(client); return localVarResponse.getData(); } /** * To test \"client\" model * To test \"client\" model - * @param body client model (required) + * @param client client model (required) * @return ApiResponse<Client> * @throws ApiException if fails to make API call */ - public ApiResponse testClientModelWithHttpInfo(Client body) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = testClientModelRequestBuilder(body); + public ApiResponse testClientModelWithHttpInfo(Client client) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = testClientModelRequestBuilder(client); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -685,10 +931,10 @@ public class FakeApi { } } - private HttpRequest.Builder testClientModelRequestBuilder(Client body) throws ApiException { - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling testClientModel"); + private HttpRequest.Builder testClientModelRequestBuilder(Client client) throws ApiException { + // verify the required parameter 'client' is set + if (client == null) { + throw new ApiException(400, "Missing the required parameter 'client' when calling testClientModel"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -701,7 +947,7 @@ public class FakeApi { localVarRequestBuilder.header("Accept", "application/json"); try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(client); localVarRequestBuilder.method("PATCH", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { throw new ApiException(e); @@ -715,8 +961,8 @@ public class FakeApi { return localVarRequestBuilder; } /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * @param number None (required) * @param _double None (required) * @param patternWithoutDelimiter None (required) @@ -738,8 +984,8 @@ public class 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 假端點 偽のエンドポイント 가짜 엔드 포인트 * @param number None (required) * @param _double None (required) * @param patternWithoutDelimiter None (required) @@ -836,12 +1082,13 @@ public class FakeApi { * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) + * @param enumQueryModelArray (optional * @param enumFormStringArray Form parameter enum test (string array) (optional * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @throws ApiException if fails to make API call */ - public void testEnumParameters(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString) throws ApiException { - testEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + public void testEnumParameters(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumQueryModelArray, List enumFormStringArray, String enumFormString) throws ApiException { + testEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString); } /** @@ -853,13 +1100,14 @@ public class FakeApi { * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) * @param enumQueryInteger Query parameter enum test (double) (optional) * @param enumQueryDouble Query parameter enum test (double) (optional) + * @param enumQueryModelArray (optional * @param enumFormStringArray Form parameter enum test (string array) (optional * @param enumFormString Form parameter enum test (string) (optional, default to -efg) * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ - public ApiResponse testEnumParametersWithHttpInfo(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = testEnumParametersRequestBuilder(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + public ApiResponse testEnumParametersWithHttpInfo(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumQueryModelArray, List enumFormStringArray, String enumFormString) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = testEnumParametersRequestBuilder(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -893,17 +1141,18 @@ public class FakeApi { } } - private HttpRequest.Builder testEnumParametersRequestBuilder(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumFormStringArray, String enumFormString) throws ApiException { + private HttpRequest.Builder testEnumParametersRequestBuilder(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumQueryModelArray, List enumFormStringArray, String enumFormString) throws ApiException { HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); String localVarPath = "/fake"; List localVarQueryParams = new ArrayList<>(); - localVarQueryParams.addAll(ApiClient.parameterToPairs("csv", "enum_query_string_array", enumQueryStringArray)); + localVarQueryParams.addAll(ApiClient.parameterToPairs("multi", "enum_query_string_array", enumQueryStringArray)); localVarQueryParams.addAll(ApiClient.parameterToPairs("enum_query_string", enumQueryString)); localVarQueryParams.addAll(ApiClient.parameterToPairs("enum_query_integer", enumQueryInteger)); localVarQueryParams.addAll(ApiClient.parameterToPairs("enum_query_double", enumQueryDouble)); + localVarQueryParams.addAll(ApiClient.parameterToPairs("multi", "enum_query_model_array", enumQueryModelArray)); if (!localVarQueryParams.isEmpty()) { StringJoiner queryJoiner = new StringJoiner("&"); @@ -1154,22 +1403,22 @@ public class FakeApi { /** * test inline additionalProperties * - * @param param request body (required) + * @param requestBody request body (required) * @throws ApiException if fails to make API call */ - public void testInlineAdditionalProperties(Map param) throws ApiException { - testInlineAdditionalPropertiesWithHttpInfo(param); + public void testInlineAdditionalProperties(Map requestBody) throws ApiException { + testInlineAdditionalPropertiesWithHttpInfo(requestBody); } /** * test inline additionalProperties * - * @param param request body (required) + * @param requestBody request body (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ - public ApiResponse testInlineAdditionalPropertiesWithHttpInfo(Map param) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = testInlineAdditionalPropertiesRequestBuilder(param); + public ApiResponse testInlineAdditionalPropertiesWithHttpInfo(Map requestBody) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = testInlineAdditionalPropertiesRequestBuilder(requestBody); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -1203,10 +1452,10 @@ public class FakeApi { } } - private HttpRequest.Builder testInlineAdditionalPropertiesRequestBuilder(Map param) throws ApiException { - // verify the required parameter 'param' is set - if (param == null) { - throw new ApiException(400, "Missing the required parameter 'param' when calling testInlineAdditionalProperties"); + private HttpRequest.Builder testInlineAdditionalPropertiesRequestBuilder(Map requestBody) throws ApiException { + // verify the required parameter 'requestBody' is set + if (requestBody == null) { + throw new ApiException(400, "Missing the required parameter 'requestBody' when calling testInlineAdditionalProperties"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -1219,7 +1468,7 @@ public class FakeApi { localVarRequestBuilder.header("Accept", "application/json"); try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(param); + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(requestBody); localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { throw new ApiException(e); @@ -1321,10 +1570,12 @@ public class FakeApi { * @param http (required) * @param url (required) * @param context (required) + * @param allowEmpty (required) + * @param language (optional * @throws ApiException if fails to make API call */ - public void testQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context) throws ApiException { - testQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context); + public void testQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, String allowEmpty, Map language) throws ApiException { + testQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context, allowEmpty, language); } /** @@ -1335,11 +1586,13 @@ public class FakeApi { * @param http (required) * @param url (required) * @param context (required) + * @param allowEmpty (required) + * @param language (optional * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ - public ApiResponse testQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = testQueryParameterCollectionFormatRequestBuilder(pipe, ioutil, http, url, context); + public ApiResponse testQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context, String allowEmpty, Map language) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = testQueryParameterCollectionFormatRequestBuilder(pipe, ioutil, http, url, context, allowEmpty, language); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -1373,7 +1626,7 @@ public class FakeApi { } } - private HttpRequest.Builder testQueryParameterCollectionFormatRequestBuilder(List pipe, List ioutil, List http, List url, List context) throws ApiException { + private HttpRequest.Builder testQueryParameterCollectionFormatRequestBuilder(List pipe, List ioutil, List http, List url, List context, String allowEmpty, Map language) throws ApiException { // verify the required parameter 'pipe' is set if (pipe == null) { throw new ApiException(400, "Missing the required parameter 'pipe' when calling testQueryParameterCollectionFormat"); @@ -1394,17 +1647,23 @@ public class FakeApi { if (context == null) { throw new ApiException(400, "Missing the required parameter 'context' when calling testQueryParameterCollectionFormat"); } + // verify the required parameter 'allowEmpty' is set + if (allowEmpty == null) { + throw new ApiException(400, "Missing the required parameter 'allowEmpty' when calling testQueryParameterCollectionFormat"); + } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); String localVarPath = "/fake/test-query-parameters"; List localVarQueryParams = new ArrayList<>(); - localVarQueryParams.addAll(ApiClient.parameterToPairs("csv", "pipe", pipe)); + localVarQueryParams.addAll(ApiClient.parameterToPairs("pipes", "pipe", pipe)); localVarQueryParams.addAll(ApiClient.parameterToPairs("csv", "ioutil", ioutil)); localVarQueryParams.addAll(ApiClient.parameterToPairs("ssv", "http", http)); localVarQueryParams.addAll(ApiClient.parameterToPairs("csv", "url", url)); localVarQueryParams.addAll(ApiClient.parameterToPairs("multi", "context", context)); + localVarQueryParams.addAll(ApiClient.parameterToPairs("language", language)); + localVarQueryParams.addAll(ApiClient.parameterToPairs("allowEmpty", allowEmpty)); if (!localVarQueryParams.isEmpty()) { StringJoiner queryJoiner = new StringJoiner("&"); diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index 97a6e1fd2b..2e4e339669 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -77,24 +77,24 @@ public class FakeClassnameTags123Api { /** * To test class name in snake case * To test class name in snake case - * @param body client model (required) + * @param client client model (required) * @return Client * @throws ApiException if fails to make API call */ - public Client testClassname(Client body) throws ApiException { - ApiResponse localVarResponse = testClassnameWithHttpInfo(body); + public Client testClassname(Client client) throws ApiException { + ApiResponse localVarResponse = testClassnameWithHttpInfo(client); return localVarResponse.getData(); } /** * To test class name in snake case * To test class name in snake case - * @param body client model (required) + * @param client client model (required) * @return ApiResponse<Client> * @throws ApiException if fails to make API call */ - public ApiResponse testClassnameWithHttpInfo(Client body) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = testClassnameRequestBuilder(body); + public ApiResponse testClassnameWithHttpInfo(Client client) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = testClassnameRequestBuilder(client); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -124,10 +124,10 @@ public class FakeClassnameTags123Api { } } - private HttpRequest.Builder testClassnameRequestBuilder(Client body) throws ApiException { - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling testClassname"); + private HttpRequest.Builder testClassnameRequestBuilder(Client client) throws ApiException { + // verify the required parameter 'client' is set + if (client == null) { + throw new ApiException(400, "Missing the required parameter 'client' when calling testClassname"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -140,7 +140,7 @@ public class FakeClassnameTags123Api { localVarRequestBuilder.header("Accept", "application/json"); try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(client); localVarRequestBuilder.method("PATCH", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { throw new ApiException(e); diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/PetApi.java index eb825b7555..0da1da313a 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/PetApi.java @@ -80,22 +80,22 @@ public class PetApi { /** * Add a new pet to the store * - * @param body Pet object that needs to be added to the store (required) + * @param pet Pet object that needs to be added to the store (required) * @throws ApiException if fails to make API call */ - public void addPet(Pet body) throws ApiException { - addPetWithHttpInfo(body); + public void addPet(Pet pet) throws ApiException { + addPetWithHttpInfo(pet); } /** * Add a new pet to the store * - * @param body Pet object that needs to be added to the store (required) + * @param pet Pet object that needs to be added to the store (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ - public ApiResponse addPetWithHttpInfo(Pet body) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = addPetRequestBuilder(body); + public ApiResponse addPetWithHttpInfo(Pet pet) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = addPetRequestBuilder(pet); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -129,10 +129,10 @@ public class PetApi { } } - private HttpRequest.Builder addPetRequestBuilder(Pet body) throws ApiException { - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling addPet"); + private HttpRequest.Builder addPetRequestBuilder(Pet pet) throws ApiException { + // verify the required parameter 'pet' is set + if (pet == null) { + throw new ApiException(400, "Missing the required parameter 'pet' when calling addPet"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -145,7 +145,7 @@ public class PetApi { localVarRequestBuilder.header("Accept", "application/json"); try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(pet); localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { throw new ApiException(e); @@ -484,22 +484,22 @@ public class PetApi { /** * Update an existing pet * - * @param body Pet object that needs to be added to the store (required) + * @param pet Pet object that needs to be added to the store (required) * @throws ApiException if fails to make API call */ - public void updatePet(Pet body) throws ApiException { - updatePetWithHttpInfo(body); + public void updatePet(Pet pet) throws ApiException { + updatePetWithHttpInfo(pet); } /** * Update an existing pet * - * @param body Pet object that needs to be added to the store (required) + * @param pet Pet object that needs to be added to the store (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ - public ApiResponse updatePetWithHttpInfo(Pet body) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = updatePetRequestBuilder(body); + public ApiResponse updatePetWithHttpInfo(Pet pet) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = updatePetRequestBuilder(pet); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -533,10 +533,10 @@ public class PetApi { } } - private HttpRequest.Builder updatePetRequestBuilder(Pet body) throws ApiException { - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling updatePet"); + private HttpRequest.Builder updatePetRequestBuilder(Pet pet) throws ApiException { + // verify the required parameter 'pet' is set + if (pet == null) { + throw new ApiException(400, "Missing the required parameter 'pet' when calling updatePet"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -549,7 +549,7 @@ public class PetApi { localVarRequestBuilder.header("Accept", "application/json"); try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(pet); localVarRequestBuilder.method("PUT", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { throw new ApiException(e); diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/StoreApi.java index c813f3c22e..6180d1ba62 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/StoreApi.java @@ -294,24 +294,24 @@ public class StoreApi { /** * Place an order for a pet * - * @param body order placed for purchasing the pet (required) + * @param order order placed for purchasing the pet (required) * @return Order * @throws ApiException if fails to make API call */ - public Order placeOrder(Order body) throws ApiException { - ApiResponse localVarResponse = placeOrderWithHttpInfo(body); + public Order placeOrder(Order order) throws ApiException { + ApiResponse localVarResponse = placeOrderWithHttpInfo(order); return localVarResponse.getData(); } /** * Place an order for a pet * - * @param body order placed for purchasing the pet (required) + * @param order order placed for purchasing the pet (required) * @return ApiResponse<Order> * @throws ApiException if fails to make API call */ - public ApiResponse placeOrderWithHttpInfo(Order body) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = placeOrderRequestBuilder(body); + public ApiResponse placeOrderWithHttpInfo(Order order) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = placeOrderRequestBuilder(order); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -341,10 +341,10 @@ public class StoreApi { } } - private HttpRequest.Builder placeOrderRequestBuilder(Order body) throws ApiException { - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling placeOrder"); + private HttpRequest.Builder placeOrderRequestBuilder(Order order) throws ApiException { + // verify the required parameter 'order' is set + if (order == null) { + throw new ApiException(400, "Missing the required parameter 'order' when calling placeOrder"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -357,7 +357,7 @@ public class StoreApi { localVarRequestBuilder.header("Accept", "application/xml, application/json"); try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(order); localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { throw new ApiException(e); diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/UserApi.java index 7617c7c60f..7451afc649 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/UserApi.java @@ -78,22 +78,22 @@ public class UserApi { /** * Create user * This can only be done by the logged in user. - * @param body Created user object (required) + * @param user Created user object (required) * @throws ApiException if fails to make API call */ - public void createUser(User body) throws ApiException { - createUserWithHttpInfo(body); + public void createUser(User user) throws ApiException { + createUserWithHttpInfo(user); } /** * Create user * This can only be done by the logged in user. - * @param body Created user object (required) + * @param user Created user object (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ - public ApiResponse createUserWithHttpInfo(User body) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = createUserRequestBuilder(body); + public ApiResponse createUserWithHttpInfo(User user) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = createUserRequestBuilder(user); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -127,10 +127,10 @@ public class UserApi { } } - private HttpRequest.Builder createUserRequestBuilder(User body) throws ApiException { - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling createUser"); + private HttpRequest.Builder createUserRequestBuilder(User user) throws ApiException { + // verify the required parameter 'user' is set + if (user == null) { + throw new ApiException(400, "Missing the required parameter 'user' when calling createUser"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -143,7 +143,7 @@ public class UserApi { localVarRequestBuilder.header("Accept", "application/json"); try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(user); localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { throw new ApiException(e); @@ -159,22 +159,22 @@ public class UserApi { /** * Creates list of users with given input array * - * @param body List of user object (required) + * @param user List of user object (required) * @throws ApiException if fails to make API call */ - public void createUsersWithArrayInput(List body) throws ApiException { - createUsersWithArrayInputWithHttpInfo(body); + public void createUsersWithArrayInput(List user) throws ApiException { + createUsersWithArrayInputWithHttpInfo(user); } /** * Creates list of users with given input array * - * @param body List of user object (required) + * @param user List of user object (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ - public ApiResponse createUsersWithArrayInputWithHttpInfo(List body) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = createUsersWithArrayInputRequestBuilder(body); + public ApiResponse createUsersWithArrayInputWithHttpInfo(List user) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = createUsersWithArrayInputRequestBuilder(user); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -208,10 +208,10 @@ public class UserApi { } } - private HttpRequest.Builder createUsersWithArrayInputRequestBuilder(List body) throws ApiException { - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling createUsersWithArrayInput"); + private HttpRequest.Builder createUsersWithArrayInputRequestBuilder(List user) throws ApiException { + // verify the required parameter 'user' is set + if (user == null) { + throw new ApiException(400, "Missing the required parameter 'user' when calling createUsersWithArrayInput"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -224,7 +224,7 @@ public class UserApi { localVarRequestBuilder.header("Accept", "application/json"); try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(user); localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { throw new ApiException(e); @@ -240,22 +240,22 @@ public class UserApi { /** * Creates list of users with given input array * - * @param body List of user object (required) + * @param user List of user object (required) * @throws ApiException if fails to make API call */ - public void createUsersWithListInput(List body) throws ApiException { - createUsersWithListInputWithHttpInfo(body); + public void createUsersWithListInput(List user) throws ApiException { + createUsersWithListInputWithHttpInfo(user); } /** * Creates list of users with given input array * - * @param body List of user object (required) + * @param user List of user object (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ - public ApiResponse createUsersWithListInputWithHttpInfo(List body) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = createUsersWithListInputRequestBuilder(body); + public ApiResponse createUsersWithListInputWithHttpInfo(List user) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = createUsersWithListInputRequestBuilder(user); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -289,10 +289,10 @@ public class UserApi { } } - private HttpRequest.Builder createUsersWithListInputRequestBuilder(List body) throws ApiException { - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling createUsersWithListInput"); + private HttpRequest.Builder createUsersWithListInputRequestBuilder(List user) throws ApiException { + // verify the required parameter 'user' is set + if (user == null) { + throw new ApiException(400, "Missing the required parameter 'user' when calling createUsersWithListInput"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -305,7 +305,7 @@ public class UserApi { localVarRequestBuilder.header("Accept", "application/json"); try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(user); localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { throw new ApiException(e); @@ -630,23 +630,23 @@ public class UserApi { * Updated user * This can only be done by the logged in user. * @param username name that need to be deleted (required) - * @param body Updated user object (required) + * @param user Updated user object (required) * @throws ApiException if fails to make API call */ - public void updateUser(String username, User body) throws ApiException { - updateUserWithHttpInfo(username, body); + public void updateUser(String username, User user) throws ApiException { + updateUserWithHttpInfo(username, user); } /** * Updated user * This can only be done by the logged in user. * @param username name that need to be deleted (required) - * @param body Updated user object (required) + * @param user Updated user object (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call */ - public ApiResponse updateUserWithHttpInfo(String username, User body) throws ApiException { - HttpRequest.Builder localVarRequestBuilder = updateUserRequestBuilder(username, body); + public ApiResponse updateUserWithHttpInfo(String username, User user) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = updateUserRequestBuilder(username, user); try { HttpResponse localVarResponse = memberVarHttpClient.send( localVarRequestBuilder.build(), @@ -680,14 +680,14 @@ public class UserApi { } } - private HttpRequest.Builder updateUserRequestBuilder(String username, User body) throws ApiException { + private HttpRequest.Builder updateUserRequestBuilder(String username, User user) throws ApiException { // verify the required parameter 'username' is set if (username == null) { throw new ApiException(400, "Missing the required parameter 'username' when calling updateUser"); } - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling updateUser"); + // verify the required parameter 'user' is set + if (user == null) { + throw new ApiException(400, "Missing the required parameter 'user' when calling updateUser"); } HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); @@ -701,7 +701,7 @@ public class UserApi { localVarRequestBuilder.header("Accept", "application/json"); try { - byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(body); + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(user); localVarRequestBuilder.method("PUT", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); } catch (IOException e) { throw new ApiException(e); diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java index eba8b80e4f..47c89b3eaf 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java @@ -22,9 +22,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import java.math.BigDecimal; import java.util.HashMap; -import java.util.List; import java.util.Map; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -33,392 +31,83 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; * AdditionalPropertiesClass */ @JsonPropertyOrder({ - AdditionalPropertiesClass.JSON_PROPERTY_MAP_STRING, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_NUMBER, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_INTEGER, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_BOOLEAN, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_INTEGER, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_ANYTYPE, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_STRING, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_ANYTYPE, - AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE1, - AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE2, - AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE3 + AdditionalPropertiesClass.JSON_PROPERTY_MAP_PROPERTY, + AdditionalPropertiesClass.JSON_PROPERTY_MAP_OF_MAP_PROPERTY }) @javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class AdditionalPropertiesClass { - public static final String JSON_PROPERTY_MAP_STRING = "map_string"; - private Map mapString = null; + public static final String JSON_PROPERTY_MAP_PROPERTY = "map_property"; + private Map mapProperty = null; - public static final String JSON_PROPERTY_MAP_NUMBER = "map_number"; - private Map mapNumber = null; - - public static final String JSON_PROPERTY_MAP_INTEGER = "map_integer"; - private Map mapInteger = null; - - public static final String JSON_PROPERTY_MAP_BOOLEAN = "map_boolean"; - private Map mapBoolean = null; - - public static final String JSON_PROPERTY_MAP_ARRAY_INTEGER = "map_array_integer"; - private Map> mapArrayInteger = null; - - public static final String JSON_PROPERTY_MAP_ARRAY_ANYTYPE = "map_array_anytype"; - private Map> mapArrayAnytype = null; - - public static final String JSON_PROPERTY_MAP_MAP_STRING = "map_map_string"; - private Map> mapMapString = null; - - public static final String JSON_PROPERTY_MAP_MAP_ANYTYPE = "map_map_anytype"; - private Map> mapMapAnytype = null; - - public static final String JSON_PROPERTY_ANYTYPE1 = "anytype_1"; - private Object anytype1; - - public static final String JSON_PROPERTY_ANYTYPE2 = "anytype_2"; - private Object anytype2; - - public static final String JSON_PROPERTY_ANYTYPE3 = "anytype_3"; - private Object anytype3; + public static final String JSON_PROPERTY_MAP_OF_MAP_PROPERTY = "map_of_map_property"; + private Map> mapOfMapProperty = null; public AdditionalPropertiesClass() { } - public AdditionalPropertiesClass mapString(Map mapString) { - this.mapString = mapString; + public AdditionalPropertiesClass mapProperty(Map mapProperty) { + this.mapProperty = mapProperty; return this; } - public AdditionalPropertiesClass putMapStringItem(String key, String mapStringItem) { - if (this.mapString == null) { - this.mapString = new HashMap<>(); + public AdditionalPropertiesClass putMapPropertyItem(String key, String mapPropertyItem) { + if (this.mapProperty == null) { + this.mapProperty = new HashMap<>(); } - this.mapString.put(key, mapStringItem); + this.mapProperty.put(key, mapPropertyItem); return this; } /** - * Get mapString - * @return mapString + * Get mapProperty + * @return mapProperty **/ @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP_STRING) + @JsonProperty(JSON_PROPERTY_MAP_PROPERTY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getMapString() { - return mapString; + public Map getMapProperty() { + return mapProperty; } - @JsonProperty(JSON_PROPERTY_MAP_STRING) + @JsonProperty(JSON_PROPERTY_MAP_PROPERTY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapString(Map mapString) { - this.mapString = mapString; + public void setMapProperty(Map mapProperty) { + this.mapProperty = mapProperty; } - public AdditionalPropertiesClass mapNumber(Map mapNumber) { - this.mapNumber = mapNumber; + public AdditionalPropertiesClass mapOfMapProperty(Map> mapOfMapProperty) { + this.mapOfMapProperty = mapOfMapProperty; return this; } - public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumberItem) { - if (this.mapNumber == null) { - this.mapNumber = new HashMap<>(); + public AdditionalPropertiesClass putMapOfMapPropertyItem(String key, Map mapOfMapPropertyItem) { + if (this.mapOfMapProperty == null) { + this.mapOfMapProperty = new HashMap<>(); } - this.mapNumber.put(key, mapNumberItem); + this.mapOfMapProperty.put(key, mapOfMapPropertyItem); return this; } /** - * Get mapNumber - * @return mapNumber + * Get mapOfMapProperty + * @return mapOfMapProperty **/ @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP_NUMBER) + @JsonProperty(JSON_PROPERTY_MAP_OF_MAP_PROPERTY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getMapNumber() { - return mapNumber; + public Map> getMapOfMapProperty() { + return mapOfMapProperty; } - @JsonProperty(JSON_PROPERTY_MAP_NUMBER) + @JsonProperty(JSON_PROPERTY_MAP_OF_MAP_PROPERTY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapNumber(Map mapNumber) { - this.mapNumber = mapNumber; - } - - - public AdditionalPropertiesClass mapInteger(Map mapInteger) { - this.mapInteger = mapInteger; - return this; - } - - public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntegerItem) { - if (this.mapInteger == null) { - this.mapInteger = new HashMap<>(); - } - this.mapInteger.put(key, mapIntegerItem); - return this; - } - - /** - * Get mapInteger - * @return mapInteger - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map getMapInteger() { - return mapInteger; - } - - - @JsonProperty(JSON_PROPERTY_MAP_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapInteger(Map mapInteger) { - this.mapInteger = mapInteger; - } - - - public AdditionalPropertiesClass mapBoolean(Map mapBoolean) { - this.mapBoolean = mapBoolean; - return this; - } - - public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBooleanItem) { - if (this.mapBoolean == null) { - this.mapBoolean = new HashMap<>(); - } - this.mapBoolean.put(key, mapBooleanItem); - return this; - } - - /** - * Get mapBoolean - * @return mapBoolean - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP_BOOLEAN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map getMapBoolean() { - return mapBoolean; - } - - - @JsonProperty(JSON_PROPERTY_MAP_BOOLEAN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapBoolean(Map mapBoolean) { - this.mapBoolean = mapBoolean; - } - - - public AdditionalPropertiesClass mapArrayInteger(Map> mapArrayInteger) { - this.mapArrayInteger = mapArrayInteger; - return this; - } - - public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List mapArrayIntegerItem) { - if (this.mapArrayInteger == null) { - this.mapArrayInteger = new HashMap<>(); - } - this.mapArrayInteger.put(key, mapArrayIntegerItem); - return this; - } - - /** - * Get mapArrayInteger - * @return mapArrayInteger - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP_ARRAY_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map> getMapArrayInteger() { - return mapArrayInteger; - } - - - @JsonProperty(JSON_PROPERTY_MAP_ARRAY_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapArrayInteger(Map> mapArrayInteger) { - this.mapArrayInteger = mapArrayInteger; - } - - - public AdditionalPropertiesClass mapArrayAnytype(Map> mapArrayAnytype) { - this.mapArrayAnytype = mapArrayAnytype; - return this; - } - - public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List mapArrayAnytypeItem) { - if (this.mapArrayAnytype == null) { - this.mapArrayAnytype = new HashMap<>(); - } - this.mapArrayAnytype.put(key, mapArrayAnytypeItem); - return this; - } - - /** - * Get mapArrayAnytype - * @return mapArrayAnytype - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP_ARRAY_ANYTYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map> getMapArrayAnytype() { - return mapArrayAnytype; - } - - - @JsonProperty(JSON_PROPERTY_MAP_ARRAY_ANYTYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapArrayAnytype(Map> mapArrayAnytype) { - this.mapArrayAnytype = mapArrayAnytype; - } - - - public AdditionalPropertiesClass mapMapString(Map> mapMapString) { - this.mapMapString = mapMapString; - return this; - } - - public AdditionalPropertiesClass putMapMapStringItem(String key, Map mapMapStringItem) { - if (this.mapMapString == null) { - this.mapMapString = new HashMap<>(); - } - this.mapMapString.put(key, mapMapStringItem); - return this; - } - - /** - * Get mapMapString - * @return mapMapString - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP_MAP_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map> getMapMapString() { - return mapMapString; - } - - - @JsonProperty(JSON_PROPERTY_MAP_MAP_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapMapString(Map> mapMapString) { - this.mapMapString = mapMapString; - } - - - public AdditionalPropertiesClass mapMapAnytype(Map> mapMapAnytype) { - this.mapMapAnytype = mapMapAnytype; - return this; - } - - public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map mapMapAnytypeItem) { - if (this.mapMapAnytype == null) { - this.mapMapAnytype = new HashMap<>(); - } - this.mapMapAnytype.put(key, mapMapAnytypeItem); - return this; - } - - /** - * Get mapMapAnytype - * @return mapMapAnytype - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP_MAP_ANYTYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map> getMapMapAnytype() { - return mapMapAnytype; - } - - - @JsonProperty(JSON_PROPERTY_MAP_MAP_ANYTYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapMapAnytype(Map> mapMapAnytype) { - this.mapMapAnytype = mapMapAnytype; - } - - - public AdditionalPropertiesClass anytype1(Object anytype1) { - this.anytype1 = anytype1; - return this; - } - - /** - * Get anytype1 - * @return anytype1 - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ANYTYPE1) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Object getAnytype1() { - return anytype1; - } - - - @JsonProperty(JSON_PROPERTY_ANYTYPE1) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAnytype1(Object anytype1) { - this.anytype1 = anytype1; - } - - - public AdditionalPropertiesClass anytype2(Object anytype2) { - this.anytype2 = anytype2; - return this; - } - - /** - * Get anytype2 - * @return anytype2 - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ANYTYPE2) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Object getAnytype2() { - return anytype2; - } - - - @JsonProperty(JSON_PROPERTY_ANYTYPE2) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAnytype2(Object anytype2) { - this.anytype2 = anytype2; - } - - - public AdditionalPropertiesClass anytype3(Object anytype3) { - this.anytype3 = anytype3; - return this; - } - - /** - * Get anytype3 - * @return anytype3 - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ANYTYPE3) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Object getAnytype3() { - return anytype3; - } - - - @JsonProperty(JSON_PROPERTY_ANYTYPE3) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setAnytype3(Object anytype3) { - this.anytype3 = anytype3; + public void setMapOfMapProperty(Map> mapOfMapProperty) { + this.mapOfMapProperty = mapOfMapProperty; } @@ -434,39 +123,21 @@ public class AdditionalPropertiesClass { return false; } AdditionalPropertiesClass additionalPropertiesClass = (AdditionalPropertiesClass) o; - return Objects.equals(this.mapString, additionalPropertiesClass.mapString) && - Objects.equals(this.mapNumber, additionalPropertiesClass.mapNumber) && - Objects.equals(this.mapInteger, additionalPropertiesClass.mapInteger) && - Objects.equals(this.mapBoolean, additionalPropertiesClass.mapBoolean) && - Objects.equals(this.mapArrayInteger, additionalPropertiesClass.mapArrayInteger) && - Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) && - Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) && - Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) && - Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) && - Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) && - Objects.equals(this.anytype3, additionalPropertiesClass.anytype3); + return Objects.equals(this.mapProperty, additionalPropertiesClass.mapProperty) && + Objects.equals(this.mapOfMapProperty, additionalPropertiesClass.mapOfMapProperty); } @Override public int hashCode() { - return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); + return Objects.hash(mapProperty, mapOfMapProperty); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AdditionalPropertiesClass {\n"); - sb.append(" mapString: ").append(toIndentedString(mapString)).append("\n"); - sb.append(" mapNumber: ").append(toIndentedString(mapNumber)).append("\n"); - sb.append(" mapInteger: ").append(toIndentedString(mapInteger)).append("\n"); - sb.append(" mapBoolean: ").append(toIndentedString(mapBoolean)).append("\n"); - sb.append(" mapArrayInteger: ").append(toIndentedString(mapArrayInteger)).append("\n"); - sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n"); - sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n"); - sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n"); - sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n"); - sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n"); - sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n"); + sb.append(" mapProperty: ").append(toIndentedString(mapProperty)).append("\n"); + sb.append(" mapOfMapProperty: ").append(toIndentedString(mapOfMapProperty)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java new file mode 100644 index 0000000000..dadb9089a5 --- /dev/null +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java @@ -0,0 +1,140 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.client.model.SingleRefType; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * AllOfWithSingleRef + */ +@JsonPropertyOrder({ + AllOfWithSingleRef.JSON_PROPERTY_USERNAME, + AllOfWithSingleRef.JSON_PROPERTY_SINGLE_REF_TYPE +}) +@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AllOfWithSingleRef { + public static final String JSON_PROPERTY_USERNAME = "username"; + private String username; + + public static final String JSON_PROPERTY_SINGLE_REF_TYPE = "SingleRefType"; + private SingleRefType singleRefType; + + public AllOfWithSingleRef() { + } + + public AllOfWithSingleRef username(String username) { + this.username = username; + return this; + } + + /** + * Get username + * @return username + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USERNAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getUsername() { + return username; + } + + + @JsonProperty(JSON_PROPERTY_USERNAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUsername(String username) { + this.username = username; + } + + + public AllOfWithSingleRef singleRefType(SingleRefType singleRefType) { + this.singleRefType = singleRefType; + return this; + } + + /** + * Get singleRefType + * @return singleRefType + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SINGLE_REF_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public SingleRefType getSingleRefType() { + return singleRefType; + } + + + @JsonProperty(JSON_PROPERTY_SINGLE_REF_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSingleRefType(SingleRefType singleRefType) { + this.singleRefType = singleRefType; + } + + + /** + * Return true if this AllOfWithSingleRef object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AllOfWithSingleRef allOfWithSingleRef = (AllOfWithSingleRef) o; + return Objects.equals(this.username, allOfWithSingleRef.username) && + Objects.equals(this.singleRefType, allOfWithSingleRef.singleRefType); + } + + @Override + public int hashCode() { + return Objects.hash(username, singleRefType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AllOfWithSingleRef {\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" singleRefType: ").append(toIndentedString(singleRefType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Animal.java index 0b75f44f77..27b13a6af7 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Animal.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Animal.java @@ -25,7 +25,6 @@ import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import org.openapitools.client.model.BigCat; import org.openapitools.client.model.Cat; import org.openapitools.client.model.Dog; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -46,7 +45,6 @@ import org.openapitools.client.JSON; ) @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) @JsonSubTypes({ - @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = Dog.class, name = "Dog"), }) @@ -156,7 +154,6 @@ public class Animal { static { // Initialize and register the discriminator mappings. Map> mappings = new HashMap>(); - mappings.put("BigCat", BigCat.class); mappings.put("Cat", Cat.class); mappings.put("Dog", Dog.class); mappings.put("Animal", Animal.class); diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Cat.java index 900c7566cc..a3793dccde 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Cat.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Cat.java @@ -26,7 +26,6 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.client.model.Animal; -import org.openapitools.client.model.BigCat; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -43,9 +42,6 @@ import org.openapitools.client.JSON; allowSetters = true // allows the className to be set during deserialization ) @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) -@JsonSubTypes({ - @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), -}) public class Cat extends Animal { public static final String JSON_PROPERTY_DECLAWED = "declawed"; @@ -124,7 +120,6 @@ public class Cat extends Animal { static { // Initialize and register the discriminator mappings. Map> mappings = new HashMap>(); - mappings.put("BigCat", BigCat.class); mappings.put("Cat", Cat.class); JSON.registerDiscriminator(Cat.class, "className", mappings); } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/DeprecatedObject.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/DeprecatedObject.java new file mode 100644 index 0000000000..1b0f2c1372 --- /dev/null +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/DeprecatedObject.java @@ -0,0 +1,110 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * DeprecatedObject + * @deprecated + */ +@Deprecated +@JsonPropertyOrder({ + DeprecatedObject.JSON_PROPERTY_NAME +}) +@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DeprecatedObject { + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public DeprecatedObject() { + } + + public DeprecatedObject name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(String name) { + this.name = name; + } + + + /** + * Return true if this DeprecatedObject object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeprecatedObject deprecatedObject = (DeprecatedObject) o; + return Objects.equals(this.name, deprecatedObject.name); + } + + @Override + public int hashCode() { + return Objects.hash(name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeprecatedObject {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/EnumTest.java index 27766254d0..942d299c28 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/EnumTest.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/EnumTest.java @@ -23,6 +23,13 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.client.model.OuterEnum; +import org.openapitools.client.model.OuterEnumDefaultValue; +import org.openapitools.client.model.OuterEnumInteger; +import org.openapitools.client.model.OuterEnumIntegerDefaultValue; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -34,7 +41,10 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; EnumTest.JSON_PROPERTY_ENUM_STRING_REQUIRED, EnumTest.JSON_PROPERTY_ENUM_INTEGER, EnumTest.JSON_PROPERTY_ENUM_NUMBER, - EnumTest.JSON_PROPERTY_OUTER_ENUM + EnumTest.JSON_PROPERTY_OUTER_ENUM, + EnumTest.JSON_PROPERTY_OUTER_ENUM_INTEGER, + EnumTest.JSON_PROPERTY_OUTER_ENUM_DEFAULT_VALUE, + EnumTest.JSON_PROPERTY_OUTER_ENUM_INTEGER_DEFAULT_VALUE }) @javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class EnumTest { @@ -195,7 +205,16 @@ public class EnumTest { private EnumNumberEnum enumNumber; public static final String JSON_PROPERTY_OUTER_ENUM = "outerEnum"; - private OuterEnum outerEnum; + private JsonNullable outerEnum = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_OUTER_ENUM_INTEGER = "outerEnumInteger"; + private OuterEnumInteger outerEnumInteger; + + public static final String JSON_PROPERTY_OUTER_ENUM_DEFAULT_VALUE = "outerEnumDefaultValue"; + private OuterEnumDefaultValue outerEnumDefaultValue = OuterEnumDefaultValue.PLACED; + + public static final String JSON_PROPERTY_OUTER_ENUM_INTEGER_DEFAULT_VALUE = "outerEnumIntegerDefaultValue"; + private OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue = OuterEnumIntegerDefaultValue.NUMBER_0; public EnumTest() { } @@ -301,7 +320,7 @@ public class EnumTest { public EnumTest outerEnum(OuterEnum outerEnum) { - this.outerEnum = outerEnum; + this.outerEnum = JsonNullable.of(outerEnum); return this; } @@ -310,18 +329,101 @@ public class EnumTest { * @return outerEnum **/ @javax.annotation.Nullable + @JsonIgnore + + public OuterEnum getOuterEnum() { + return outerEnum.orElse(null); + } + @JsonProperty(JSON_PROPERTY_OUTER_ENUM) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OuterEnum getOuterEnum() { + public JsonNullable getOuterEnum_JsonNullable() { return outerEnum; } + + @JsonProperty(JSON_PROPERTY_OUTER_ENUM) + public void setOuterEnum_JsonNullable(JsonNullable outerEnum) { + this.outerEnum = outerEnum; + } + + public void setOuterEnum(OuterEnum outerEnum) { + this.outerEnum = JsonNullable.of(outerEnum); + } - @JsonProperty(JSON_PROPERTY_OUTER_ENUM) + public EnumTest outerEnumInteger(OuterEnumInteger outerEnumInteger) { + this.outerEnumInteger = outerEnumInteger; + return this; + } + + /** + * Get outerEnumInteger + * @return outerEnumInteger + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OUTER_ENUM_INTEGER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOuterEnum(OuterEnum outerEnum) { - this.outerEnum = outerEnum; + + public OuterEnumInteger getOuterEnumInteger() { + return outerEnumInteger; + } + + + @JsonProperty(JSON_PROPERTY_OUTER_ENUM_INTEGER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOuterEnumInteger(OuterEnumInteger outerEnumInteger) { + this.outerEnumInteger = outerEnumInteger; + } + + + public EnumTest outerEnumDefaultValue(OuterEnumDefaultValue outerEnumDefaultValue) { + this.outerEnumDefaultValue = outerEnumDefaultValue; + return this; + } + + /** + * Get outerEnumDefaultValue + * @return outerEnumDefaultValue + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OUTER_ENUM_DEFAULT_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OuterEnumDefaultValue getOuterEnumDefaultValue() { + return outerEnumDefaultValue; + } + + + @JsonProperty(JSON_PROPERTY_OUTER_ENUM_DEFAULT_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOuterEnumDefaultValue(OuterEnumDefaultValue outerEnumDefaultValue) { + this.outerEnumDefaultValue = outerEnumDefaultValue; + } + + + public EnumTest outerEnumIntegerDefaultValue(OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue) { + this.outerEnumIntegerDefaultValue = outerEnumIntegerDefaultValue; + return this; + } + + /** + * Get outerEnumIntegerDefaultValue + * @return outerEnumIntegerDefaultValue + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OUTER_ENUM_INTEGER_DEFAULT_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OuterEnumIntegerDefaultValue getOuterEnumIntegerDefaultValue() { + return outerEnumIntegerDefaultValue; + } + + + @JsonProperty(JSON_PROPERTY_OUTER_ENUM_INTEGER_DEFAULT_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOuterEnumIntegerDefaultValue(OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue) { + this.outerEnumIntegerDefaultValue = outerEnumIntegerDefaultValue; } @@ -341,12 +443,26 @@ public class EnumTest { Objects.equals(this.enumStringRequired, enumTest.enumStringRequired) && Objects.equals(this.enumInteger, enumTest.enumInteger) && Objects.equals(this.enumNumber, enumTest.enumNumber) && - Objects.equals(this.outerEnum, enumTest.outerEnum); + equalsNullable(this.outerEnum, enumTest.outerEnum) && + Objects.equals(this.outerEnumInteger, enumTest.outerEnumInteger) && + Objects.equals(this.outerEnumDefaultValue, enumTest.outerEnumDefaultValue) && + Objects.equals(this.outerEnumIntegerDefaultValue, enumTest.outerEnumIntegerDefaultValue); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); } @Override public int hashCode() { - return Objects.hash(enumString, enumStringRequired, enumInteger, enumNumber, outerEnum); + return Objects.hash(enumString, enumStringRequired, enumInteger, enumNumber, hashCodeNullable(outerEnum), outerEnumInteger, outerEnumDefaultValue, outerEnumIntegerDefaultValue); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; } @Override @@ -358,6 +474,9 @@ public class EnumTest { sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); sb.append(" enumNumber: ").append(toIndentedString(enumNumber)).append("\n"); sb.append(" outerEnum: ").append(toIndentedString(outerEnum)).append("\n"); + sb.append(" outerEnumInteger: ").append(toIndentedString(outerEnumInteger)).append("\n"); + sb.append(" outerEnumDefaultValue: ").append(toIndentedString(outerEnumDefaultValue)).append("\n"); + sb.append(" outerEnumIntegerDefaultValue: ").append(toIndentedString(outerEnumIntegerDefaultValue)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Foo.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Foo.java new file mode 100644 index 0000000000..e8bb3f5412 --- /dev/null +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/Foo.java @@ -0,0 +1,108 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Foo + */ +@JsonPropertyOrder({ + Foo.JSON_PROPERTY_BAR +}) +@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Foo { + public static final String JSON_PROPERTY_BAR = "bar"; + private String bar = "bar"; + + public Foo() { + } + + public Foo bar(String bar) { + this.bar = bar; + return this; + } + + /** + * Get bar + * @return bar + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getBar() { + return bar; + } + + + @JsonProperty(JSON_PROPERTY_BAR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBar(String bar) { + this.bar = bar; + } + + + /** + * Return true if this Foo object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Foo foo = (Foo) o; + return Objects.equals(this.bar, foo.bar); + } + + @Override + public int hashCode() { + return Objects.hash(bar); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Foo {\n"); + sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java new file mode 100644 index 0000000000..c103221b13 --- /dev/null +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java @@ -0,0 +1,109 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.client.model.Foo; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * FooGetDefaultResponse + */ +@JsonPropertyOrder({ + FooGetDefaultResponse.JSON_PROPERTY_STRING +}) +@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class FooGetDefaultResponse { + public static final String JSON_PROPERTY_STRING = "string"; + private Foo string; + + public FooGetDefaultResponse() { + } + + public FooGetDefaultResponse string(Foo string) { + this.string = string; + return this; + } + + /** + * Get string + * @return string + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Foo getString() { + return string; + } + + + @JsonProperty(JSON_PROPERTY_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setString(Foo string) { + this.string = string; + } + + + /** + * Return true if this _foo_get_default_response object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FooGetDefaultResponse fooGetDefaultResponse = (FooGetDefaultResponse) o; + return Objects.equals(this.string, fooGetDefaultResponse.string); + } + + @Override + public int hashCode() { + return Objects.hash(string); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FooGetDefaultResponse {\n"); + sb.append(" string: ").append(toIndentedString(string)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FormatTest.java index 793e2c85f7..784366237f 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/FormatTest.java @@ -40,6 +40,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; FormatTest.JSON_PROPERTY_NUMBER, FormatTest.JSON_PROPERTY_FLOAT, FormatTest.JSON_PROPERTY_DOUBLE, + FormatTest.JSON_PROPERTY_DECIMAL, FormatTest.JSON_PROPERTY_STRING, FormatTest.JSON_PROPERTY_BYTE, FormatTest.JSON_PROPERTY_BINARY, @@ -47,7 +48,8 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; FormatTest.JSON_PROPERTY_DATE_TIME, FormatTest.JSON_PROPERTY_UUID, FormatTest.JSON_PROPERTY_PASSWORD, - FormatTest.JSON_PROPERTY_BIG_DECIMAL + FormatTest.JSON_PROPERTY_PATTERN_WITH_DIGITS, + FormatTest.JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER }) @javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class FormatTest { @@ -69,6 +71,9 @@ public class FormatTest { public static final String JSON_PROPERTY_DOUBLE = "double"; private Double _double; + public static final String JSON_PROPERTY_DECIMAL = "decimal"; + private BigDecimal decimal; + public static final String JSON_PROPERTY_STRING = "string"; private String string; @@ -90,8 +95,11 @@ public class FormatTest { public static final String JSON_PROPERTY_PASSWORD = "password"; private String password; - public static final String JSON_PROPERTY_BIG_DECIMAL = "BigDecimal"; - private BigDecimal bigDecimal; + public static final String JSON_PROPERTY_PATTERN_WITH_DIGITS = "pattern_with_digits"; + private String patternWithDigits; + + public static final String JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER = "pattern_with_digits_and_delimiter"; + private String patternWithDigitsAndDelimiter; public FormatTest() { } @@ -256,6 +264,31 @@ public class FormatTest { } + public FormatTest decimal(BigDecimal decimal) { + this.decimal = decimal; + return this; + } + + /** + * Get decimal + * @return decimal + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DECIMAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BigDecimal getDecimal() { + return decimal; + } + + + @JsonProperty(JSON_PROPERTY_DECIMAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDecimal(BigDecimal decimal) { + this.decimal = decimal; + } + + public FormatTest string(String string) { this.string = string; return this; @@ -431,28 +464,53 @@ public class FormatTest { } - public FormatTest bigDecimal(BigDecimal bigDecimal) { - this.bigDecimal = bigDecimal; + public FormatTest patternWithDigits(String patternWithDigits) { + this.patternWithDigits = patternWithDigits; return this; } /** - * Get bigDecimal - * @return bigDecimal + * A string that is a 10 digit number. Can have leading zeros. + * @return patternWithDigits **/ @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BIG_DECIMAL) + @JsonProperty(JSON_PROPERTY_PATTERN_WITH_DIGITS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public BigDecimal getBigDecimal() { - return bigDecimal; + public String getPatternWithDigits() { + return patternWithDigits; } - @JsonProperty(JSON_PROPERTY_BIG_DECIMAL) + @JsonProperty(JSON_PROPERTY_PATTERN_WITH_DIGITS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBigDecimal(BigDecimal bigDecimal) { - this.bigDecimal = bigDecimal; + public void setPatternWithDigits(String patternWithDigits) { + this.patternWithDigits = patternWithDigits; + } + + + public FormatTest patternWithDigitsAndDelimiter(String patternWithDigitsAndDelimiter) { + this.patternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; + return this; + } + + /** + * A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. + * @return patternWithDigitsAndDelimiter + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPatternWithDigitsAndDelimiter() { + return patternWithDigitsAndDelimiter; + } + + + @JsonProperty(JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPatternWithDigitsAndDelimiter(String patternWithDigitsAndDelimiter) { + this.patternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; } @@ -474,6 +532,7 @@ public class FormatTest { Objects.equals(this.number, formatTest.number) && Objects.equals(this._float, formatTest._float) && Objects.equals(this._double, formatTest._double) && + Objects.equals(this.decimal, formatTest.decimal) && Objects.equals(this.string, formatTest.string) && Arrays.equals(this._byte, formatTest._byte) && Objects.equals(this.binary, formatTest.binary) && @@ -481,12 +540,13 @@ public class FormatTest { Objects.equals(this.dateTime, formatTest.dateTime) && Objects.equals(this.uuid, formatTest.uuid) && Objects.equals(this.password, formatTest.password) && - Objects.equals(this.bigDecimal, formatTest.bigDecimal); + Objects.equals(this.patternWithDigits, formatTest.patternWithDigits) && + Objects.equals(this.patternWithDigitsAndDelimiter, formatTest.patternWithDigitsAndDelimiter); } @Override public int hashCode() { - return Objects.hash(integer, int32, int64, number, _float, _double, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, bigDecimal); + return Objects.hash(integer, int32, int64, number, _float, _double, decimal, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, patternWithDigits, patternWithDigitsAndDelimiter); } @Override @@ -499,6 +559,7 @@ public class FormatTest { sb.append(" number: ").append(toIndentedString(number)).append("\n"); sb.append(" _float: ").append(toIndentedString(_float)).append("\n"); sb.append(" _double: ").append(toIndentedString(_double)).append("\n"); + sb.append(" decimal: ").append(toIndentedString(decimal)).append("\n"); sb.append(" string: ").append(toIndentedString(string)).append("\n"); sb.append(" _byte: ").append(toIndentedString(_byte)).append("\n"); sb.append(" binary: ").append(toIndentedString(binary)).append("\n"); @@ -506,7 +567,8 @@ 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(" patternWithDigits: ").append(toIndentedString(patternWithDigits)).append("\n"); + sb.append(" patternWithDigitsAndDelimiter: ").append(toIndentedString(patternWithDigitsAndDelimiter)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/HealthCheckResult.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/HealthCheckResult.java new file mode 100644 index 0000000000..11b3d08734 --- /dev/null +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/HealthCheckResult.java @@ -0,0 +1,131 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. + */ +@JsonPropertyOrder({ + HealthCheckResult.JSON_PROPERTY_NULLABLE_MESSAGE +}) +@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class HealthCheckResult { + public static final String JSON_PROPERTY_NULLABLE_MESSAGE = "NullableMessage"; + private JsonNullable nullableMessage = JsonNullable.undefined(); + + public HealthCheckResult() { + } + + public HealthCheckResult nullableMessage(String nullableMessage) { + this.nullableMessage = JsonNullable.of(nullableMessage); + return this; + } + + /** + * Get nullableMessage + * @return nullableMessage + **/ + @javax.annotation.Nullable + @JsonIgnore + + public String getNullableMessage() { + return nullableMessage.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NULLABLE_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNullableMessage_JsonNullable() { + return nullableMessage; + } + + @JsonProperty(JSON_PROPERTY_NULLABLE_MESSAGE) + public void setNullableMessage_JsonNullable(JsonNullable nullableMessage) { + this.nullableMessage = nullableMessage; + } + + public void setNullableMessage(String nullableMessage) { + this.nullableMessage = JsonNullable.of(nullableMessage); + } + + + /** + * Return true if this HealthCheckResult object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + HealthCheckResult healthCheckResult = (HealthCheckResult) o; + return equalsNullable(this.nullableMessage, healthCheckResult.nullableMessage); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(nullableMessage)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class HealthCheckResult {\n"); + sb.append(" nullableMessage: ").append(toIndentedString(nullableMessage)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/NullableClass.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/NullableClass.java new file mode 100644 index 0000000000..65d26d3f3e --- /dev/null +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/NullableClass.java @@ -0,0 +1,666 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * NullableClass + */ +@JsonPropertyOrder({ + NullableClass.JSON_PROPERTY_INTEGER_PROP, + NullableClass.JSON_PROPERTY_NUMBER_PROP, + NullableClass.JSON_PROPERTY_BOOLEAN_PROP, + NullableClass.JSON_PROPERTY_STRING_PROP, + NullableClass.JSON_PROPERTY_DATE_PROP, + NullableClass.JSON_PROPERTY_DATETIME_PROP, + NullableClass.JSON_PROPERTY_ARRAY_NULLABLE_PROP, + NullableClass.JSON_PROPERTY_ARRAY_AND_ITEMS_NULLABLE_PROP, + NullableClass.JSON_PROPERTY_ARRAY_ITEMS_NULLABLE, + NullableClass.JSON_PROPERTY_OBJECT_NULLABLE_PROP, + NullableClass.JSON_PROPERTY_OBJECT_AND_ITEMS_NULLABLE_PROP, + NullableClass.JSON_PROPERTY_OBJECT_ITEMS_NULLABLE +}) +@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class NullableClass extends HashMap { + public static final String JSON_PROPERTY_INTEGER_PROP = "integer_prop"; + private JsonNullable integerProp = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_NUMBER_PROP = "number_prop"; + private JsonNullable numberProp = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_BOOLEAN_PROP = "boolean_prop"; + private JsonNullable booleanProp = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_STRING_PROP = "string_prop"; + private JsonNullable stringProp = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DATE_PROP = "date_prop"; + private JsonNullable dateProp = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_DATETIME_PROP = "datetime_prop"; + private JsonNullable datetimeProp = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_ARRAY_NULLABLE_PROP = "array_nullable_prop"; + private JsonNullable> arrayNullableProp = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_ARRAY_AND_ITEMS_NULLABLE_PROP = "array_and_items_nullable_prop"; + private JsonNullable> arrayAndItemsNullableProp = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_ARRAY_ITEMS_NULLABLE = "array_items_nullable"; + private List arrayItemsNullable = null; + + public static final String JSON_PROPERTY_OBJECT_NULLABLE_PROP = "object_nullable_prop"; + private JsonNullable> objectNullableProp = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_OBJECT_AND_ITEMS_NULLABLE_PROP = "object_and_items_nullable_prop"; + private JsonNullable> objectAndItemsNullableProp = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_OBJECT_ITEMS_NULLABLE = "object_items_nullable"; + private Map objectItemsNullable = null; + + public NullableClass() { + } + + public NullableClass integerProp(Integer integerProp) { + this.integerProp = JsonNullable.of(integerProp); + return this; + } + + /** + * Get integerProp + * @return integerProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public Integer getIntegerProp() { + return integerProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_INTEGER_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getIntegerProp_JsonNullable() { + return integerProp; + } + + @JsonProperty(JSON_PROPERTY_INTEGER_PROP) + public void setIntegerProp_JsonNullable(JsonNullable integerProp) { + this.integerProp = integerProp; + } + + public void setIntegerProp(Integer integerProp) { + this.integerProp = JsonNullable.of(integerProp); + } + + + public NullableClass numberProp(BigDecimal numberProp) { + this.numberProp = JsonNullable.of(numberProp); + return this; + } + + /** + * Get numberProp + * @return numberProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public BigDecimal getNumberProp() { + return numberProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_NUMBER_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getNumberProp_JsonNullable() { + return numberProp; + } + + @JsonProperty(JSON_PROPERTY_NUMBER_PROP) + public void setNumberProp_JsonNullable(JsonNullable numberProp) { + this.numberProp = numberProp; + } + + public void setNumberProp(BigDecimal numberProp) { + this.numberProp = JsonNullable.of(numberProp); + } + + + public NullableClass booleanProp(Boolean booleanProp) { + this.booleanProp = JsonNullable.of(booleanProp); + return this; + } + + /** + * Get booleanProp + * @return booleanProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public Boolean getBooleanProp() { + return booleanProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_BOOLEAN_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getBooleanProp_JsonNullable() { + return booleanProp; + } + + @JsonProperty(JSON_PROPERTY_BOOLEAN_PROP) + public void setBooleanProp_JsonNullable(JsonNullable booleanProp) { + this.booleanProp = booleanProp; + } + + public void setBooleanProp(Boolean booleanProp) { + this.booleanProp = JsonNullable.of(booleanProp); + } + + + public NullableClass stringProp(String stringProp) { + this.stringProp = JsonNullable.of(stringProp); + return this; + } + + /** + * Get stringProp + * @return stringProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public String getStringProp() { + return stringProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_STRING_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getStringProp_JsonNullable() { + return stringProp; + } + + @JsonProperty(JSON_PROPERTY_STRING_PROP) + public void setStringProp_JsonNullable(JsonNullable stringProp) { + this.stringProp = stringProp; + } + + public void setStringProp(String stringProp) { + this.stringProp = JsonNullable.of(stringProp); + } + + + public NullableClass dateProp(LocalDate dateProp) { + this.dateProp = JsonNullable.of(dateProp); + return this; + } + + /** + * Get dateProp + * @return dateProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public LocalDate getDateProp() { + return dateProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DATE_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDateProp_JsonNullable() { + return dateProp; + } + + @JsonProperty(JSON_PROPERTY_DATE_PROP) + public void setDateProp_JsonNullable(JsonNullable dateProp) { + this.dateProp = dateProp; + } + + public void setDateProp(LocalDate dateProp) { + this.dateProp = JsonNullable.of(dateProp); + } + + + public NullableClass datetimeProp(OffsetDateTime datetimeProp) { + this.datetimeProp = JsonNullable.of(datetimeProp); + return this; + } + + /** + * Get datetimeProp + * @return datetimeProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public OffsetDateTime getDatetimeProp() { + return datetimeProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_DATETIME_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getDatetimeProp_JsonNullable() { + return datetimeProp; + } + + @JsonProperty(JSON_PROPERTY_DATETIME_PROP) + public void setDatetimeProp_JsonNullable(JsonNullable datetimeProp) { + this.datetimeProp = datetimeProp; + } + + public void setDatetimeProp(OffsetDateTime datetimeProp) { + this.datetimeProp = JsonNullable.of(datetimeProp); + } + + + public NullableClass arrayNullableProp(List arrayNullableProp) { + this.arrayNullableProp = JsonNullable.>of(arrayNullableProp); + return this; + } + + public NullableClass addArrayNullablePropItem(Object arrayNullablePropItem) { + if (this.arrayNullableProp == null || !this.arrayNullableProp.isPresent()) { + this.arrayNullableProp = JsonNullable.>of(new ArrayList<>()); + } + try { + this.arrayNullableProp.get().add(arrayNullablePropItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get arrayNullableProp + * @return arrayNullableProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public List getArrayNullableProp() { + return arrayNullableProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ARRAY_NULLABLE_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getArrayNullableProp_JsonNullable() { + return arrayNullableProp; + } + + @JsonProperty(JSON_PROPERTY_ARRAY_NULLABLE_PROP) + public void setArrayNullableProp_JsonNullable(JsonNullable> arrayNullableProp) { + this.arrayNullableProp = arrayNullableProp; + } + + public void setArrayNullableProp(List arrayNullableProp) { + this.arrayNullableProp = JsonNullable.>of(arrayNullableProp); + } + + + public NullableClass arrayAndItemsNullableProp(List arrayAndItemsNullableProp) { + this.arrayAndItemsNullableProp = JsonNullable.>of(arrayAndItemsNullableProp); + return this; + } + + public NullableClass addArrayAndItemsNullablePropItem(Object arrayAndItemsNullablePropItem) { + if (this.arrayAndItemsNullableProp == null || !this.arrayAndItemsNullableProp.isPresent()) { + this.arrayAndItemsNullableProp = JsonNullable.>of(new ArrayList<>()); + } + try { + this.arrayAndItemsNullableProp.get().add(arrayAndItemsNullablePropItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get arrayAndItemsNullableProp + * @return arrayAndItemsNullableProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public List getArrayAndItemsNullableProp() { + return arrayAndItemsNullableProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ARRAY_AND_ITEMS_NULLABLE_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getArrayAndItemsNullableProp_JsonNullable() { + return arrayAndItemsNullableProp; + } + + @JsonProperty(JSON_PROPERTY_ARRAY_AND_ITEMS_NULLABLE_PROP) + public void setArrayAndItemsNullableProp_JsonNullable(JsonNullable> arrayAndItemsNullableProp) { + this.arrayAndItemsNullableProp = arrayAndItemsNullableProp; + } + + public void setArrayAndItemsNullableProp(List arrayAndItemsNullableProp) { + this.arrayAndItemsNullableProp = JsonNullable.>of(arrayAndItemsNullableProp); + } + + + public NullableClass arrayItemsNullable(List arrayItemsNullable) { + this.arrayItemsNullable = arrayItemsNullable; + return this; + } + + public NullableClass addArrayItemsNullableItem(Object arrayItemsNullableItem) { + if (this.arrayItemsNullable == null) { + this.arrayItemsNullable = new ArrayList<>(); + } + this.arrayItemsNullable.add(arrayItemsNullableItem); + return this; + } + + /** + * Get arrayItemsNullable + * @return arrayItemsNullable + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ARRAY_ITEMS_NULLABLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getArrayItemsNullable() { + return arrayItemsNullable; + } + + + @JsonProperty(JSON_PROPERTY_ARRAY_ITEMS_NULLABLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setArrayItemsNullable(List arrayItemsNullable) { + this.arrayItemsNullable = arrayItemsNullable; + } + + + public NullableClass objectNullableProp(Map objectNullableProp) { + this.objectNullableProp = JsonNullable.>of(objectNullableProp); + return this; + } + + public NullableClass putObjectNullablePropItem(String key, Object objectNullablePropItem) { + if (this.objectNullableProp == null || !this.objectNullableProp.isPresent()) { + this.objectNullableProp = JsonNullable.>of(new HashMap<>()); + } + try { + this.objectNullableProp.get().put(key, objectNullablePropItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get objectNullableProp + * @return objectNullableProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public Map getObjectNullableProp() { + return objectNullableProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_OBJECT_NULLABLE_PROP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getObjectNullableProp_JsonNullable() { + return objectNullableProp; + } + + @JsonProperty(JSON_PROPERTY_OBJECT_NULLABLE_PROP) + public void setObjectNullableProp_JsonNullable(JsonNullable> objectNullableProp) { + this.objectNullableProp = objectNullableProp; + } + + public void setObjectNullableProp(Map objectNullableProp) { + this.objectNullableProp = JsonNullable.>of(objectNullableProp); + } + + + public NullableClass objectAndItemsNullableProp(Map objectAndItemsNullableProp) { + this.objectAndItemsNullableProp = JsonNullable.>of(objectAndItemsNullableProp); + return this; + } + + public NullableClass putObjectAndItemsNullablePropItem(String key, Object objectAndItemsNullablePropItem) { + if (this.objectAndItemsNullableProp == null || !this.objectAndItemsNullableProp.isPresent()) { + this.objectAndItemsNullableProp = JsonNullable.>of(new HashMap<>()); + } + try { + this.objectAndItemsNullableProp.get().put(key, objectAndItemsNullablePropItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get objectAndItemsNullableProp + * @return objectAndItemsNullableProp + **/ + @javax.annotation.Nullable + @JsonIgnore + + public Map getObjectAndItemsNullableProp() { + return objectAndItemsNullableProp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_OBJECT_AND_ITEMS_NULLABLE_PROP) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getObjectAndItemsNullableProp_JsonNullable() { + return objectAndItemsNullableProp; + } + + @JsonProperty(JSON_PROPERTY_OBJECT_AND_ITEMS_NULLABLE_PROP) + public void setObjectAndItemsNullableProp_JsonNullable(JsonNullable> objectAndItemsNullableProp) { + this.objectAndItemsNullableProp = objectAndItemsNullableProp; + } + + public void setObjectAndItemsNullableProp(Map objectAndItemsNullableProp) { + this.objectAndItemsNullableProp = JsonNullable.>of(objectAndItemsNullableProp); + } + + + public NullableClass objectItemsNullable(Map objectItemsNullable) { + this.objectItemsNullable = objectItemsNullable; + return this; + } + + public NullableClass putObjectItemsNullableItem(String key, Object objectItemsNullableItem) { + if (this.objectItemsNullable == null) { + this.objectItemsNullable = new HashMap<>(); + } + this.objectItemsNullable.put(key, objectItemsNullableItem); + return this; + } + + /** + * Get objectItemsNullable + * @return objectItemsNullable + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OBJECT_ITEMS_NULLABLE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + + public Map getObjectItemsNullable() { + return objectItemsNullable; + } + + + @JsonProperty(JSON_PROPERTY_OBJECT_ITEMS_NULLABLE) + @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) + public void setObjectItemsNullable(Map objectItemsNullable) { + this.objectItemsNullable = objectItemsNullable; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * @param key the name of the property + * @param value the value of the property + * @return self reference + */ + @JsonAnySetter + public NullableClass putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) properties. + * @return the additional (undeclared) properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * @param key the name of the property + * @return the additional (undeclared) property with the specified name + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this NullableClass object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NullableClass nullableClass = (NullableClass) o; + return equalsNullable(this.integerProp, nullableClass.integerProp) && + equalsNullable(this.numberProp, nullableClass.numberProp) && + equalsNullable(this.booleanProp, nullableClass.booleanProp) && + equalsNullable(this.stringProp, nullableClass.stringProp) && + equalsNullable(this.dateProp, nullableClass.dateProp) && + equalsNullable(this.datetimeProp, nullableClass.datetimeProp) && + equalsNullable(this.arrayNullableProp, nullableClass.arrayNullableProp) && + equalsNullable(this.arrayAndItemsNullableProp, nullableClass.arrayAndItemsNullableProp) && + Objects.equals(this.arrayItemsNullable, nullableClass.arrayItemsNullable) && + equalsNullable(this.objectNullableProp, nullableClass.objectNullableProp) && + equalsNullable(this.objectAndItemsNullableProp, nullableClass.objectAndItemsNullableProp) && + Objects.equals(this.objectItemsNullable, nullableClass.objectItemsNullable)&& + Objects.equals(this.additionalProperties, nullableClass.additionalProperties) && + super.equals(o); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(hashCodeNullable(integerProp), hashCodeNullable(numberProp), hashCodeNullable(booleanProp), hashCodeNullable(stringProp), hashCodeNullable(dateProp), hashCodeNullable(datetimeProp), hashCodeNullable(arrayNullableProp), hashCodeNullable(arrayAndItemsNullableProp), arrayItemsNullable, hashCodeNullable(objectNullableProp), hashCodeNullable(objectAndItemsNullableProp), objectItemsNullable, super.hashCode(), additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NullableClass {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" integerProp: ").append(toIndentedString(integerProp)).append("\n"); + sb.append(" numberProp: ").append(toIndentedString(numberProp)).append("\n"); + sb.append(" booleanProp: ").append(toIndentedString(booleanProp)).append("\n"); + sb.append(" stringProp: ").append(toIndentedString(stringProp)).append("\n"); + sb.append(" dateProp: ").append(toIndentedString(dateProp)).append("\n"); + sb.append(" datetimeProp: ").append(toIndentedString(datetimeProp)).append("\n"); + sb.append(" arrayNullableProp: ").append(toIndentedString(arrayNullableProp)).append("\n"); + sb.append(" arrayAndItemsNullableProp: ").append(toIndentedString(arrayAndItemsNullableProp)).append("\n"); + sb.append(" arrayItemsNullable: ").append(toIndentedString(arrayItemsNullable)).append("\n"); + sb.append(" objectNullableProp: ").append(toIndentedString(objectNullableProp)).append("\n"); + sb.append(" objectAndItemsNullableProp: ").append(toIndentedString(objectAndItemsNullableProp)).append("\n"); + sb.append(" objectItemsNullable: ").append(toIndentedString(objectItemsNullable)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java new file mode 100644 index 0000000000..21154f18b2 --- /dev/null +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java @@ -0,0 +1,219 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.client.model.DeprecatedObject; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * ObjectWithDeprecatedFields + */ +@JsonPropertyOrder({ + ObjectWithDeprecatedFields.JSON_PROPERTY_UUID, + ObjectWithDeprecatedFields.JSON_PROPERTY_ID, + ObjectWithDeprecatedFields.JSON_PROPERTY_DEPRECATED_REF, + ObjectWithDeprecatedFields.JSON_PROPERTY_BARS +}) +@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ObjectWithDeprecatedFields { + public static final String JSON_PROPERTY_UUID = "uuid"; + private String uuid; + + public static final String JSON_PROPERTY_ID = "id"; + private BigDecimal id; + + public static final String JSON_PROPERTY_DEPRECATED_REF = "deprecatedRef"; + private DeprecatedObject deprecatedRef; + + public static final String JSON_PROPERTY_BARS = "bars"; + private List bars = null; + + public ObjectWithDeprecatedFields() { + } + + public ObjectWithDeprecatedFields uuid(String uuid) { + this.uuid = uuid; + return this; + } + + /** + * Get uuid + * @return uuid + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UUID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getUuid() { + return uuid; + } + + + @JsonProperty(JSON_PROPERTY_UUID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUuid(String uuid) { + this.uuid = uuid; + } + + + public ObjectWithDeprecatedFields id(BigDecimal id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + * @deprecated + **/ + @Deprecated + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BigDecimal getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(BigDecimal id) { + this.id = id; + } + + + public ObjectWithDeprecatedFields deprecatedRef(DeprecatedObject deprecatedRef) { + this.deprecatedRef = deprecatedRef; + return this; + } + + /** + * Get deprecatedRef + * @return deprecatedRef + * @deprecated + **/ + @Deprecated + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DEPRECATED_REF) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public DeprecatedObject getDeprecatedRef() { + return deprecatedRef; + } + + + @JsonProperty(JSON_PROPERTY_DEPRECATED_REF) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDeprecatedRef(DeprecatedObject deprecatedRef) { + this.deprecatedRef = deprecatedRef; + } + + + public ObjectWithDeprecatedFields bars(List bars) { + this.bars = bars; + return this; + } + + public ObjectWithDeprecatedFields addBarsItem(String barsItem) { + if (this.bars == null) { + this.bars = new ArrayList<>(); + } + this.bars.add(barsItem); + return this; + } + + /** + * Get bars + * @return bars + * @deprecated + **/ + @Deprecated + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BARS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getBars() { + return bars; + } + + + @JsonProperty(JSON_PROPERTY_BARS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setBars(List bars) { + this.bars = bars; + } + + + /** + * Return true if this ObjectWithDeprecatedFields object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ObjectWithDeprecatedFields objectWithDeprecatedFields = (ObjectWithDeprecatedFields) o; + return Objects.equals(this.uuid, objectWithDeprecatedFields.uuid) && + Objects.equals(this.id, objectWithDeprecatedFields.id) && + Objects.equals(this.deprecatedRef, objectWithDeprecatedFields.deprecatedRef) && + Objects.equals(this.bars, objectWithDeprecatedFields.bars); + } + + @Override + public int hashCode() { + return Objects.hash(uuid, id, deprecatedRef, bars); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ObjectWithDeprecatedFields {\n"); + sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" deprecatedRef: ").append(toIndentedString(deprecatedRef)).append("\n"); + sb.append(" bars: ").append(toIndentedString(bars)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/OuterEnum.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/OuterEnum.java index 4f5adceee2..afc9120412 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/OuterEnum.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/OuterEnum.java @@ -57,7 +57,7 @@ public enum OuterEnum { return b; } } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); + return null; } } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java new file mode 100644 index 0000000000..f24d69e69e --- /dev/null +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java @@ -0,0 +1,63 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets OuterEnumDefaultValue + */ +public enum OuterEnumDefaultValue { + + PLACED("placed"), + + APPROVED("approved"), + + DELIVERED("delivered"); + + private String value; + + OuterEnumDefaultValue(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OuterEnumDefaultValue fromValue(String value) { + for (OuterEnumDefaultValue b : OuterEnumDefaultValue.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/OuterEnumInteger.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/OuterEnumInteger.java new file mode 100644 index 0000000000..e2d7dd1409 --- /dev/null +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/OuterEnumInteger.java @@ -0,0 +1,63 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets OuterEnumInteger + */ +public enum OuterEnumInteger { + + NUMBER_0(0), + + NUMBER_1(1), + + NUMBER_2(2); + + private Integer value; + + OuterEnumInteger(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OuterEnumInteger fromValue(Integer value) { + for (OuterEnumInteger b : OuterEnumInteger.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java new file mode 100644 index 0000000000..029cf8899a --- /dev/null +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java @@ -0,0 +1,63 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets OuterEnumIntegerDefaultValue + */ +public enum OuterEnumIntegerDefaultValue { + + NUMBER_0(0), + + NUMBER_1(1), + + NUMBER_2(2); + + private Integer value; + + OuterEnumIntegerDefaultValue(Integer value) { + this.value = value; + } + + @JsonValue + public Integer getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OuterEnumIntegerDefaultValue fromValue(Integer value) { + for (OuterEnumIntegerDefaultValue b : OuterEnumIntegerDefaultValue.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java new file mode 100644 index 0000000000..5d10aea545 --- /dev/null +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java @@ -0,0 +1,109 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.client.model.OuterEnumInteger; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * OuterObjectWithEnumProperty + */ +@JsonPropertyOrder({ + OuterObjectWithEnumProperty.JSON_PROPERTY_VALUE +}) +@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class OuterObjectWithEnumProperty { + public static final String JSON_PROPERTY_VALUE = "value"; + private OuterEnumInteger value; + + public OuterObjectWithEnumProperty() { + } + + public OuterObjectWithEnumProperty value(OuterEnumInteger value) { + this.value = value; + return this; + } + + /** + * Get value + * @return value + **/ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public OuterEnumInteger getValue() { + return value; + } + + + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setValue(OuterEnumInteger value) { + this.value = value; + } + + + /** + * Return true if this OuterObjectWithEnumProperty object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OuterObjectWithEnumProperty outerObjectWithEnumProperty = (OuterObjectWithEnumProperty) o; + return Objects.equals(this.value, outerObjectWithEnumProperty.value); + } + + @Override + public int hashCode() { + return Objects.hash(value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OuterObjectWithEnumProperty {\n"); + sb.append(" value: ").append(toIndentedString(value)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/SingleRefType.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/SingleRefType.java new file mode 100644 index 0000000000..bda82b5fe7 --- /dev/null +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/SingleRefType.java @@ -0,0 +1,61 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Gets or Sets SingleRefType + */ +public enum SingleRefType { + + ADMIN("admin"), + + USER("user"); + + private String value; + + SingleRefType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static SingleRefType fromValue(String value) { + for (SingleRefType b : SingleRefType.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/SpecialModelName.java index 0ddd9e563c..b9474286ab 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/model/SpecialModelName.java @@ -65,7 +65,7 @@ public class SpecialModelName { /** - * Return true if this $special[model.name] object is equal to o. + * Return true if this _special_model.name_ object is equal to o. */ @Override public boolean equals(Object o) { @@ -75,8 +75,8 @@ public class SpecialModelName { if (o == null || getClass() != o.getClass()) { return false; } - SpecialModelName $specialModelName = (SpecialModelName) o; - return Objects.equals(this.$specialPropertyName, $specialModelName.$specialPropertyName); + SpecialModelName specialModelName = (SpecialModelName) o; + return Objects.equals(this.$specialPropertyName, specialModelName.$specialPropertyName); } @Override diff --git a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java b/samples/client/petstore/java/native/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java index b0df7dc64c..b0d39879d4 100644 --- a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java +++ b/samples/client/petstore/java/native/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java @@ -22,6 +22,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Set; /** @@ -43,9 +44,9 @@ public class AnotherFakeApiTest { */ @Test public void call123testSpecialTagsTest() throws ApiException { - Client body = null; + Client client = null; Client response = - api.call123testSpecialTags(body); + api.call123testSpecialTags(client); // TODO: test validations } diff --git a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/api/DefaultApiTest.java b/samples/client/petstore/java/native/src/test/java/org/openapitools/client/api/DefaultApiTest.java new file mode 100644 index 0000000000..ce4c890752 --- /dev/null +++ b/samples/client/petstore/java/native/src/test/java/org/openapitools/client/api/DefaultApiTest.java @@ -0,0 +1,53 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.api; + +import org.openapitools.client.ApiException; +import org.openapitools.client.model.FooGetDefaultResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for DefaultApi + */ +@Ignore +public class DefaultApiTest { + + private final DefaultApi api = new DefaultApi(); + + + /** + * + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void fooGetTest() throws ApiException { + FooGetDefaultResponse response = + api.fooGet(); + + // TODO: test validations + } + +} diff --git a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/api/FakeApiTest.java b/samples/client/petstore/java/native/src/test/java/org/openapitools/client/api/FakeApiTest.java index c98e14e9da..dbf783f896 100644 --- a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/api/FakeApiTest.java +++ b/samples/client/petstore/java/native/src/test/java/org/openapitools/client/api/FakeApiTest.java @@ -16,13 +16,16 @@ package org.openapitools.client.api; import org.openapitools.client.ApiException; import java.math.BigDecimal; import org.openapitools.client.model.Client; +import org.openapitools.client.model.EnumClass; import java.io.File; import org.openapitools.client.model.FileSchemaTestClass; +import org.openapitools.client.model.HealthCheckResult; import java.time.LocalDate; import java.time.OffsetDateTime; import org.openapitools.client.model.OuterComposite; +import org.openapitools.client.model.OuterObjectWithEnumProperty; +import org.openapitools.client.model.Pet; import org.openapitools.client.model.User; -import org.openapitools.client.model.XmlItem; import org.junit.Test; import org.junit.Ignore; @@ -30,6 +33,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Set; /** @@ -42,18 +46,36 @@ public class FakeApiTest { /** - * creates an XmlItem + * Health check endpoint * - * this route creates an XmlItem + * * * @throws ApiException * if the Api call fails */ @Test - public void createXmlItemTest() throws ApiException { - XmlItem xmlItem = null; + public void fakeHealthGetTest() throws ApiException { + HealthCheckResult response = + api.fakeHealthGet(); - api.createXmlItem(xmlItem); + // TODO: test validations + } + + /** + * test http signature authentication + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void fakeHttpSignatureTestTest() throws ApiException { + Pet pet = null; + String query1 = null; + String header1 = null; + + api.fakeHttpSignatureTest(pet, query1, header1); // TODO: test validations } @@ -85,9 +107,9 @@ public class FakeApiTest { */ @Test public void fakeOuterCompositeSerializeTest() throws ApiException { - OuterComposite body = null; + OuterComposite outerComposite = null; OuterComposite response = - api.fakeOuterCompositeSerialize(body); + api.fakeOuterCompositeSerialize(outerComposite); // TODO: test validations } @@ -129,16 +151,50 @@ public class FakeApiTest { /** * * - * For this test, the body for this request much reference a schema named `File`. + * Test serialization of enum (int) properties with examples + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void fakePropertyEnumIntegerSerializeTest() throws ApiException { + OuterObjectWithEnumProperty outerObjectWithEnumProperty = null; + OuterObjectWithEnumProperty response = + api.fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty); + + // TODO: test validations + } + + /** + * + * + * For this test, the body has to be a binary file. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testBodyWithBinaryTest() throws ApiException { + File body = null; + + api.testBodyWithBinary(body); + + // TODO: test validations + } + + /** + * + * + * For this test, the body for this request must reference a schema named `File`. * * @throws ApiException * if the Api call fails */ @Test public void testBodyWithFileSchemaTest() throws ApiException { - FileSchemaTestClass body = null; + FileSchemaTestClass fileSchemaTestClass = null; - api.testBodyWithFileSchema(body); + api.testBodyWithFileSchema(fileSchemaTestClass); // TODO: test validations } @@ -154,9 +210,9 @@ public class FakeApiTest { @Test public void testBodyWithQueryParamsTest() throws ApiException { String query = null; - User body = null; + User user = null; - api.testBodyWithQueryParams(query, body); + api.testBodyWithQueryParams(query, user); // TODO: test validations } @@ -171,17 +227,17 @@ public class FakeApiTest { */ @Test public void testClientModelTest() throws ApiException { - Client body = null; + Client client = null; Client response = - api.testClientModel(body); + api.testClientModel(client); // TODO: test validations } /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * * @throws ApiException * if the Api call fails @@ -224,10 +280,11 @@ public class FakeApiTest { String enumQueryString = null; Integer enumQueryInteger = null; Double enumQueryDouble = null; + List enumQueryModelArray = null; List enumFormStringArray = null; String enumFormString = null; - api.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); + api.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString); // TODO: test validations } @@ -273,9 +330,9 @@ public class FakeApiTest { */ @Test public void testInlineAdditionalPropertiesTest() throws ApiException { - Map param = null; + Map requestBody = null; - api.testInlineAdditionalProperties(param); + api.testInlineAdditionalProperties(requestBody); // TODO: test validations } @@ -313,8 +370,10 @@ public class FakeApiTest { List http = null; List url = null; List context = null; + String allowEmpty = null; + Map language = null; - api.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context); + api.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language); // TODO: test validations } diff --git a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java b/samples/client/petstore/java/native/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java index fec12340b5..005434c820 100644 --- a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java +++ b/samples/client/petstore/java/native/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java @@ -22,6 +22,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Set; /** @@ -43,9 +44,9 @@ public class FakeClassnameTags123ApiTest { */ @Test public void testClassnameTest() throws ApiException { - Client body = null; + Client client = null; Client response = - api.testClassname(body); + api.testClassname(client); // TODO: test validations } diff --git a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/api/PetApiTest.java b/samples/client/petstore/java/native/src/test/java/org/openapitools/client/api/PetApiTest.java index 593db35574..5fe19a4ee6 100644 --- a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/api/PetApiTest.java +++ b/samples/client/petstore/java/native/src/test/java/org/openapitools/client/api/PetApiTest.java @@ -25,6 +25,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Set; /** @@ -46,9 +47,9 @@ public class PetApiTest { */ @Test public void addPetTest() throws ApiException { - Pet body = null; + Pet pet = null; - api.addPet(body); + api.addPet(pet); // TODO: test validations } @@ -132,9 +133,9 @@ public class PetApiTest { */ @Test public void updatePetTest() throws ApiException { - Pet body = null; + Pet pet = null; - api.updatePet(body); + api.updatePet(pet); // TODO: test validations } @@ -170,9 +171,9 @@ public class PetApiTest { public void uploadFileTest() throws ApiException { Long petId = null; String additionalMetadata = null; - File file = null; + File _file = null; ModelApiResponse response = - api.uploadFile(petId, additionalMetadata, file); + api.uploadFile(petId, additionalMetadata, _file); // TODO: test validations } diff --git a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/native/src/test/java/org/openapitools/client/api/StoreApiTest.java index 6ca7297142..6d3e1bc7ea 100644 --- a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ b/samples/client/petstore/java/native/src/test/java/org/openapitools/client/api/StoreApiTest.java @@ -22,6 +22,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Set; /** @@ -93,9 +94,9 @@ public class StoreApiTest { */ @Test public void placeOrderTest() throws ApiException { - Order body = null; + Order order = null; Order response = - api.placeOrder(body); + api.placeOrder(order); // TODO: test validations } diff --git a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/api/UserApiTest.java b/samples/client/petstore/java/native/src/test/java/org/openapitools/client/api/UserApiTest.java index 16daf27c9d..4ffe22ee19 100644 --- a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/api/UserApiTest.java +++ b/samples/client/petstore/java/native/src/test/java/org/openapitools/client/api/UserApiTest.java @@ -14,6 +14,7 @@ package org.openapitools.client.api; import org.openapitools.client.ApiException; +import java.time.OffsetDateTime; import org.openapitools.client.model.User; import org.junit.Test; import org.junit.Ignore; @@ -22,6 +23,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Set; /** @@ -43,9 +45,9 @@ public class UserApiTest { */ @Test public void createUserTest() throws ApiException { - User body = null; + User user = null; - api.createUser(body); + api.createUser(user); // TODO: test validations } @@ -60,9 +62,9 @@ public class UserApiTest { */ @Test public void createUsersWithArrayInputTest() throws ApiException { - List body = null; + List user = null; - api.createUsersWithArrayInput(body); + api.createUsersWithArrayInput(user); // TODO: test validations } @@ -77,9 +79,9 @@ public class UserApiTest { */ @Test public void createUsersWithListInputTest() throws ApiException { - List body = null; + List user = null; - api.createUsersWithListInput(body); + api.createUsersWithListInput(user); // TODO: test validations } @@ -163,9 +165,9 @@ public class UserApiTest { @Test public void updateUserTest() throws ApiException { String username = null; - User body = null; + User user = null; - api.updateUser(username, body); + api.updateUser(username, user); // TODO: test validations } diff --git a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java b/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java deleted file mode 100644 index 4f6fd800ab..0000000000 --- a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.HashMap; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for AdditionalPropertiesAnyType - */ -public class AdditionalPropertiesAnyTypeTest { - private final AdditionalPropertiesAnyType model = new AdditionalPropertiesAnyType(); - - /** - * Model tests for AdditionalPropertiesAnyType - */ - @Test - public void testAdditionalPropertiesAnyType() { - // TODO: test AdditionalPropertiesAnyType - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java b/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java deleted file mode 100644 index 41e6497ece..0000000000 --- a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for AdditionalPropertiesArray - */ -public class AdditionalPropertiesArrayTest { - private final AdditionalPropertiesArray model = new AdditionalPropertiesArray(); - - /** - * Model tests for AdditionalPropertiesArray - */ - @Test - public void testAdditionalPropertiesArray() { - // TODO: test AdditionalPropertiesArray - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java b/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java deleted file mode 100644 index d2e17831ba..0000000000 --- a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.HashMap; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for AdditionalPropertiesBoolean - */ -public class AdditionalPropertiesBooleanTest { - private final AdditionalPropertiesBoolean model = new AdditionalPropertiesBoolean(); - - /** - * Model tests for AdditionalPropertiesBoolean - */ - @Test - public void testAdditionalPropertiesBoolean() { - // TODO: test AdditionalPropertiesBoolean - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java b/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java index 14fd8022fe..94f0881ce4 100644 --- a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java +++ b/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java @@ -18,9 +18,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import java.math.BigDecimal; import java.util.HashMap; -import java.util.List; import java.util.Map; import org.junit.Assert; import org.junit.Ignore; @@ -42,91 +40,19 @@ public class AdditionalPropertiesClassTest { } /** - * Test the property 'mapString' + * Test the property 'mapProperty' */ @Test - public void mapStringTest() { - // TODO: test mapString + public void mapPropertyTest() { + // TODO: test mapProperty } /** - * Test the property 'mapNumber' + * Test the property 'mapOfMapProperty' */ @Test - public void mapNumberTest() { - // TODO: test mapNumber - } - - /** - * Test the property 'mapInteger' - */ - @Test - public void mapIntegerTest() { - // TODO: test mapInteger - } - - /** - * Test the property 'mapBoolean' - */ - @Test - public void mapBooleanTest() { - // TODO: test mapBoolean - } - - /** - * Test the property 'mapArrayInteger' - */ - @Test - public void mapArrayIntegerTest() { - // TODO: test mapArrayInteger - } - - /** - * Test the property 'mapArrayAnytype' - */ - @Test - public void mapArrayAnytypeTest() { - // TODO: test mapArrayAnytype - } - - /** - * Test the property 'mapMapString' - */ - @Test - public void mapMapStringTest() { - // TODO: test mapMapString - } - - /** - * Test the property 'mapMapAnytype' - */ - @Test - public void mapMapAnytypeTest() { - // TODO: test mapMapAnytype - } - - /** - * Test the property 'anytype1' - */ - @Test - public void anytype1Test() { - // TODO: test anytype1 - } - - /** - * Test the property 'anytype2' - */ - @Test - public void anytype2Test() { - // TODO: test anytype2 - } - - /** - * Test the property 'anytype3' - */ - @Test - public void anytype3Test() { - // TODO: test anytype3 + public void mapOfMapPropertyTest() { + // TODO: test mapOfMapProperty } } diff --git a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java b/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java deleted file mode 100644 index 58b7521c6a..0000000000 --- a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.HashMap; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for AdditionalPropertiesInteger - */ -public class AdditionalPropertiesIntegerTest { - private final AdditionalPropertiesInteger model = new AdditionalPropertiesInteger(); - - /** - * Model tests for AdditionalPropertiesInteger - */ - @Test - public void testAdditionalPropertiesInteger() { - // TODO: test AdditionalPropertiesInteger - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java b/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java deleted file mode 100644 index 10ad938f52..0000000000 --- a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.math.BigDecimal; -import java.util.HashMap; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for AdditionalPropertiesNumber - */ -public class AdditionalPropertiesNumberTest { - private final AdditionalPropertiesNumber model = new AdditionalPropertiesNumber(); - - /** - * Model tests for AdditionalPropertiesNumber - */ - @Test - public void testAdditionalPropertiesNumber() { - // TODO: test AdditionalPropertiesNumber - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/AllOfWithSingleRefTest.java b/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/AllOfWithSingleRefTest.java new file mode 100644 index 0000000000..1acef2d396 --- /dev/null +++ b/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/AllOfWithSingleRefTest.java @@ -0,0 +1,57 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.client.model.SingleRefType; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for AllOfWithSingleRef + */ +public class AllOfWithSingleRefTest { + private final AllOfWithSingleRef model = new AllOfWithSingleRef(); + + /** + * Model tests for AllOfWithSingleRef + */ + @Test + public void testAllOfWithSingleRef() { + // TODO: test AllOfWithSingleRef + } + + /** + * Test the property 'username' + */ + @Test + public void usernameTest() { + // TODO: test username + } + + /** + * Test the property 'singleRefType' + */ + @Test + public void singleRefTypeTest() { + // TODO: test singleRefType + } + +} diff --git a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/AnimalTest.java b/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/AnimalTest.java index 930e5c17d0..15d5c977c6 100644 --- a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/AnimalTest.java +++ b/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/AnimalTest.java @@ -21,7 +21,6 @@ import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import org.openapitools.client.model.BigCat; import org.openapitools.client.model.Cat; import org.openapitools.client.model.Dog; import org.junit.Assert; diff --git a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/CatTest.java b/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/CatTest.java index 90fdba14c2..c3827d3a2e 100644 --- a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/CatTest.java +++ b/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/CatTest.java @@ -22,7 +22,6 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.client.model.Animal; -import org.openapitools.client.model.BigCat; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; diff --git a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java b/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/DeprecatedObjectTest.java similarity index 71% rename from samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java rename to samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/DeprecatedObjectTest.java index f7662d6c46..a61e43f63a 100644 --- a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java +++ b/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/DeprecatedObjectTest.java @@ -18,25 +18,23 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import java.util.HashMap; -import java.util.Map; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; /** - * Model tests for AdditionalPropertiesString + * Model tests for DeprecatedObject */ -public class AdditionalPropertiesStringTest { - private final AdditionalPropertiesString model = new AdditionalPropertiesString(); +public class DeprecatedObjectTest { + private final DeprecatedObject model = new DeprecatedObject(); /** - * Model tests for AdditionalPropertiesString + * Model tests for DeprecatedObject */ @Test - public void testAdditionalPropertiesString() { - // TODO: test AdditionalPropertiesString + public void testDeprecatedObject() { + // TODO: test DeprecatedObject } /** diff --git a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/EnumTestTest.java b/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/EnumTestTest.java index 8907cfa8e8..1b55a5dade 100644 --- a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/EnumTestTest.java +++ b/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/EnumTestTest.java @@ -19,6 +19,13 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; import org.openapitools.client.model.OuterEnum; +import org.openapitools.client.model.OuterEnumDefaultValue; +import org.openapitools.client.model.OuterEnumInteger; +import org.openapitools.client.model.OuterEnumIntegerDefaultValue; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; @@ -78,4 +85,28 @@ public class EnumTestTest { // TODO: test outerEnum } + /** + * Test the property 'outerEnumInteger' + */ + @Test + public void outerEnumIntegerTest() { + // TODO: test outerEnumInteger + } + + /** + * Test the property 'outerEnumDefaultValue' + */ + @Test + public void outerEnumDefaultValueTest() { + // TODO: test outerEnumDefaultValue + } + + /** + * Test the property 'outerEnumIntegerDefaultValue' + */ + @Test + public void outerEnumIntegerDefaultValueTest() { + // TODO: test outerEnumIntegerDefaultValue + } + } diff --git a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/FooGetDefaultResponseTest.java b/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/FooGetDefaultResponseTest.java new file mode 100644 index 0000000000..5830df74c8 --- /dev/null +++ b/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/FooGetDefaultResponseTest.java @@ -0,0 +1,49 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.client.model.Foo; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for FooGetDefaultResponse + */ +public class FooGetDefaultResponseTest { + private final FooGetDefaultResponse model = new FooGetDefaultResponse(); + + /** + * Model tests for FooGetDefaultResponse + */ + @Test + public void testFooGetDefaultResponse() { + // TODO: test FooGetDefaultResponse + } + + /** + * Test the property 'string' + */ + @Test + public void stringTest() { + // TODO: test string + } + +} diff --git a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/FooTest.java b/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/FooTest.java new file mode 100644 index 0000000000..195e487a79 --- /dev/null +++ b/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/FooTest.java @@ -0,0 +1,48 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for Foo + */ +public class FooTest { + private final Foo model = new Foo(); + + /** + * Model tests for Foo + */ + @Test + public void testFoo() { + // TODO: test Foo + } + + /** + * Test the property 'bar' + */ + @Test + public void barTest() { + // TODO: test bar + } + +} diff --git a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/FormatTestTest.java b/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/FormatTestTest.java index 48bec93d99..fba75da100 100644 --- a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/FormatTestTest.java +++ b/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/FormatTestTest.java @@ -90,6 +90,14 @@ public class FormatTestTest { // TODO: test _double } + /** + * Test the property 'decimal' + */ + @Test + public void decimalTest() { + // TODO: test decimal + } + /** * Test the property 'string' */ @@ -147,11 +155,19 @@ public class FormatTestTest { } /** - * Test the property 'bigDecimal' + * Test the property 'patternWithDigits' */ @Test - public void bigDecimalTest() { - // TODO: test bigDecimal + public void patternWithDigitsTest() { + // TODO: test patternWithDigits + } + + /** + * Test the property 'patternWithDigitsAndDelimiter' + */ + @Test + public void patternWithDigitsAndDelimiterTest() { + // TODO: test patternWithDigitsAndDelimiter } } diff --git a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/HealthCheckResultTest.java b/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/HealthCheckResultTest.java new file mode 100644 index 0000000000..15cc82702c --- /dev/null +++ b/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/HealthCheckResultTest.java @@ -0,0 +1,52 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for HealthCheckResult + */ +public class HealthCheckResultTest { + private final HealthCheckResult model = new HealthCheckResult(); + + /** + * Model tests for HealthCheckResult + */ + @Test + public void testHealthCheckResult() { + // TODO: test HealthCheckResult + } + + /** + * Test the property 'nullableMessage' + */ + @Test + public void nullableMessageTest() { + // TODO: test nullableMessage + } + +} diff --git a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/NullableClassTest.java b/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/NullableClassTest.java new file mode 100644 index 0000000000..cb3a631c91 --- /dev/null +++ b/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/NullableClassTest.java @@ -0,0 +1,147 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for NullableClass + */ +public class NullableClassTest { + private final NullableClass model = new NullableClass(); + + /** + * Model tests for NullableClass + */ + @Test + public void testNullableClass() { + // TODO: test NullableClass + } + + /** + * Test the property 'integerProp' + */ + @Test + public void integerPropTest() { + // TODO: test integerProp + } + + /** + * Test the property 'numberProp' + */ + @Test + public void numberPropTest() { + // TODO: test numberProp + } + + /** + * Test the property 'booleanProp' + */ + @Test + public void booleanPropTest() { + // TODO: test booleanProp + } + + /** + * Test the property 'stringProp' + */ + @Test + public void stringPropTest() { + // TODO: test stringProp + } + + /** + * Test the property 'dateProp' + */ + @Test + public void datePropTest() { + // TODO: test dateProp + } + + /** + * Test the property 'datetimeProp' + */ + @Test + public void datetimePropTest() { + // TODO: test datetimeProp + } + + /** + * Test the property 'arrayNullableProp' + */ + @Test + public void arrayNullablePropTest() { + // TODO: test arrayNullableProp + } + + /** + * Test the property 'arrayAndItemsNullableProp' + */ + @Test + public void arrayAndItemsNullablePropTest() { + // TODO: test arrayAndItemsNullableProp + } + + /** + * Test the property 'arrayItemsNullable' + */ + @Test + public void arrayItemsNullableTest() { + // TODO: test arrayItemsNullable + } + + /** + * Test the property 'objectNullableProp' + */ + @Test + public void objectNullablePropTest() { + // TODO: test objectNullableProp + } + + /** + * Test the property 'objectAndItemsNullableProp' + */ + @Test + public void objectAndItemsNullablePropTest() { + // TODO: test objectAndItemsNullableProp + } + + /** + * Test the property 'objectItemsNullable' + */ + @Test + public void objectItemsNullableTest() { + // TODO: test objectItemsNullable + } + +} diff --git a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/BigCatTest.java b/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/ObjectWithDeprecatedFieldsTest.java similarity index 53% rename from samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/BigCatTest.java rename to samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/ObjectWithDeprecatedFieldsTest.java index f6c4621c9e..c59d5beba3 100644 --- a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/BigCatTest.java +++ b/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/ObjectWithDeprecatedFieldsTest.java @@ -13,64 +13,64 @@ package org.openapitools.client.model; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import org.openapitools.client.model.Cat; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.client.model.DeprecatedObject; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; /** - * Model tests for BigCat + * Model tests for ObjectWithDeprecatedFields */ -public class BigCatTest { - private final BigCat model = new BigCat(); +public class ObjectWithDeprecatedFieldsTest { + private final ObjectWithDeprecatedFields model = new ObjectWithDeprecatedFields(); /** - * Model tests for BigCat + * Model tests for ObjectWithDeprecatedFields */ @Test - public void testBigCat() { - // TODO: test BigCat + public void testObjectWithDeprecatedFields() { + // TODO: test ObjectWithDeprecatedFields } /** - * Test the property 'className' + * Test the property 'uuid' */ @Test - public void classNameTest() { - // TODO: test className + public void uuidTest() { + // TODO: test uuid } /** - * Test the property 'color' + * Test the property 'id' */ @Test - public void colorTest() { - // TODO: test color + public void idTest() { + // TODO: test id } /** - * Test the property 'declawed' + * Test the property 'deprecatedRef' */ @Test - public void declawedTest() { - // TODO: test declawed + public void deprecatedRefTest() { + // TODO: test deprecatedRef } /** - * Test the property 'kind' + * Test the property 'bars' */ @Test - public void kindTest() { - // TODO: test kind + public void barsTest() { + // TODO: test bars } } diff --git a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/OuterEnumDefaultValueTest.java b/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/OuterEnumDefaultValueTest.java new file mode 100644 index 0000000000..59c4eebd2f --- /dev/null +++ b/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/OuterEnumDefaultValueTest.java @@ -0,0 +1,33 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for OuterEnumDefaultValue + */ +public class OuterEnumDefaultValueTest { + /** + * Model tests for OuterEnumDefaultValue + */ + @Test + public void testOuterEnumDefaultValue() { + // TODO: test OuterEnumDefaultValue + } + +} diff --git a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/OuterEnumIntegerDefaultValueTest.java b/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/OuterEnumIntegerDefaultValueTest.java new file mode 100644 index 0000000000..fa981c7093 --- /dev/null +++ b/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/OuterEnumIntegerDefaultValueTest.java @@ -0,0 +1,33 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for OuterEnumIntegerDefaultValue + */ +public class OuterEnumIntegerDefaultValueTest { + /** + * Model tests for OuterEnumIntegerDefaultValue + */ + @Test + public void testOuterEnumIntegerDefaultValue() { + // TODO: test OuterEnumIntegerDefaultValue + } + +} diff --git a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/OuterEnumIntegerTest.java b/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/OuterEnumIntegerTest.java new file mode 100644 index 0000000000..1b98d326bb --- /dev/null +++ b/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/OuterEnumIntegerTest.java @@ -0,0 +1,33 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for OuterEnumInteger + */ +public class OuterEnumIntegerTest { + /** + * Model tests for OuterEnumInteger + */ + @Test + public void testOuterEnumInteger() { + // TODO: test OuterEnumInteger + } + +} diff --git a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java b/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/OuterObjectWithEnumPropertyTest.java similarity index 64% rename from samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java rename to samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/OuterObjectWithEnumPropertyTest.java index d2e17831ba..1a436d40cb 100644 --- a/samples/client/petstore/java/native-async/src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java +++ b/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/OuterObjectWithEnumPropertyTest.java @@ -18,33 +18,32 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import java.util.HashMap; -import java.util.Map; +import org.openapitools.client.model.OuterEnumInteger; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; /** - * Model tests for AdditionalPropertiesBoolean + * Model tests for OuterObjectWithEnumProperty */ -public class AdditionalPropertiesBooleanTest { - private final AdditionalPropertiesBoolean model = new AdditionalPropertiesBoolean(); +public class OuterObjectWithEnumPropertyTest { + private final OuterObjectWithEnumProperty model = new OuterObjectWithEnumProperty(); /** - * Model tests for AdditionalPropertiesBoolean + * Model tests for OuterObjectWithEnumProperty */ @Test - public void testAdditionalPropertiesBoolean() { - // TODO: test AdditionalPropertiesBoolean + public void testOuterObjectWithEnumProperty() { + // TODO: test OuterObjectWithEnumProperty } /** - * Test the property 'name' + * Test the property 'value' */ @Test - public void nameTest() { - // TODO: test name + public void valueTest() { + // TODO: test value } } diff --git a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/SingleRefTypeTest.java b/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/SingleRefTypeTest.java new file mode 100644 index 0000000000..155e2a89b0 --- /dev/null +++ b/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/SingleRefTypeTest.java @@ -0,0 +1,33 @@ +/* + * OpenAPI Petstore + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for SingleRefType + */ +public class SingleRefTypeTest { + /** + * Model tests for SingleRefType + */ + @Test + public void testSingleRefType() { + // TODO: test SingleRefType + } + +} diff --git a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java b/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java deleted file mode 100644 index b1655df616..0000000000 --- a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for TypeHolderExample - */ -public class TypeHolderExampleTest { - private final TypeHolderExample model = new TypeHolderExample(); - - /** - * Model tests for TypeHolderExample - */ - @Test - public void testTypeHolderExample() { - // TODO: test TypeHolderExample - } - - /** - * Test the property 'stringItem' - */ - @Test - public void stringItemTest() { - // TODO: test stringItem - } - - /** - * Test the property 'numberItem' - */ - @Test - public void numberItemTest() { - // TODO: test numberItem - } - - /** - * Test the property 'floatItem' - */ - @Test - public void floatItemTest() { - // TODO: test floatItem - } - - /** - * Test the property 'integerItem' - */ - @Test - public void integerItemTest() { - // TODO: test integerItem - } - - /** - * Test the property 'boolItem' - */ - @Test - public void boolItemTest() { - // TODO: test boolItem - } - - /** - * Test the property 'arrayItem' - */ - @Test - public void arrayItemTest() { - // TODO: test arrayItem - } - -} diff --git a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/XmlItemTest.java b/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/XmlItemTest.java deleted file mode 100644 index 4bab95a912..0000000000 --- a/samples/client/petstore/java/native/src/test/java/org/openapitools/client/model/XmlItemTest.java +++ /dev/null @@ -1,275 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for XmlItem - */ -public class XmlItemTest { - private final XmlItem model = new XmlItem(); - - /** - * Model tests for XmlItem - */ - @Test - public void testXmlItem() { - // TODO: test XmlItem - } - - /** - * Test the property 'attributeString' - */ - @Test - public void attributeStringTest() { - // TODO: test attributeString - } - - /** - * Test the property 'attributeNumber' - */ - @Test - public void attributeNumberTest() { - // TODO: test attributeNumber - } - - /** - * Test the property 'attributeInteger' - */ - @Test - public void attributeIntegerTest() { - // TODO: test attributeInteger - } - - /** - * Test the property 'attributeBoolean' - */ - @Test - public void attributeBooleanTest() { - // TODO: test attributeBoolean - } - - /** - * Test the property 'wrappedArray' - */ - @Test - public void wrappedArrayTest() { - // TODO: test wrappedArray - } - - /** - * Test the property 'nameString' - */ - @Test - public void nameStringTest() { - // TODO: test nameString - } - - /** - * Test the property 'nameNumber' - */ - @Test - public void nameNumberTest() { - // TODO: test nameNumber - } - - /** - * Test the property 'nameInteger' - */ - @Test - public void nameIntegerTest() { - // TODO: test nameInteger - } - - /** - * Test the property 'nameBoolean' - */ - @Test - public void nameBooleanTest() { - // TODO: test nameBoolean - } - - /** - * Test the property 'nameArray' - */ - @Test - public void nameArrayTest() { - // TODO: test nameArray - } - - /** - * Test the property 'nameWrappedArray' - */ - @Test - public void nameWrappedArrayTest() { - // TODO: test nameWrappedArray - } - - /** - * Test the property 'prefixString' - */ - @Test - public void prefixStringTest() { - // TODO: test prefixString - } - - /** - * Test the property 'prefixNumber' - */ - @Test - public void prefixNumberTest() { - // TODO: test prefixNumber - } - - /** - * Test the property 'prefixInteger' - */ - @Test - public void prefixIntegerTest() { - // TODO: test prefixInteger - } - - /** - * Test the property 'prefixBoolean' - */ - @Test - public void prefixBooleanTest() { - // TODO: test prefixBoolean - } - - /** - * Test the property 'prefixArray' - */ - @Test - public void prefixArrayTest() { - // TODO: test prefixArray - } - - /** - * Test the property 'prefixWrappedArray' - */ - @Test - public void prefixWrappedArrayTest() { - // TODO: test prefixWrappedArray - } - - /** - * Test the property 'namespaceString' - */ - @Test - public void namespaceStringTest() { - // TODO: test namespaceString - } - - /** - * Test the property 'namespaceNumber' - */ - @Test - public void namespaceNumberTest() { - // TODO: test namespaceNumber - } - - /** - * Test the property 'namespaceInteger' - */ - @Test - public void namespaceIntegerTest() { - // TODO: test namespaceInteger - } - - /** - * Test the property 'namespaceBoolean' - */ - @Test - public void namespaceBooleanTest() { - // TODO: test namespaceBoolean - } - - /** - * Test the property 'namespaceArray' - */ - @Test - public void namespaceArrayTest() { - // TODO: test namespaceArray - } - - /** - * Test the property 'namespaceWrappedArray' - */ - @Test - public void namespaceWrappedArrayTest() { - // TODO: test namespaceWrappedArray - } - - /** - * Test the property 'prefixNsString' - */ - @Test - public void prefixNsStringTest() { - // TODO: test prefixNsString - } - - /** - * Test the property 'prefixNsNumber' - */ - @Test - public void prefixNsNumberTest() { - // TODO: test prefixNsNumber - } - - /** - * Test the property 'prefixNsInteger' - */ - @Test - public void prefixNsIntegerTest() { - // TODO: test prefixNsInteger - } - - /** - * Test the property 'prefixNsBoolean' - */ - @Test - public void prefixNsBooleanTest() { - // TODO: test prefixNsBoolean - } - - /** - * Test the property 'prefixNsArray' - */ - @Test - public void prefixNsArrayTest() { - // TODO: test prefixNsArray - } - - /** - * Test the property 'prefixNsWrappedArray' - */ - @Test - public void prefixNsWrappedArrayTest() { - // TODO: test prefixNsWrappedArray - } - -} From 743202241eff70c10e258f658fac2fbfdcbb4f6d Mon Sep 17 00:00:00 2001 From: William Cheng Date: Thu, 24 Nov 2022 23:55:14 +0800 Subject: [PATCH 046/189] [Java][native][apache-httpclient] update dependencies to newer versions (#14110) * update java native dependencies to newer versions * update java native, apache-httpclient to newer version --- .../apache-httpclient/build.gradle.mustache | 6 +-- .../libraries/apache-httpclient/pom.mustache | 37 ++++++++++--------- .../libraries/native/build.gradle.mustache | 8 +++- .../Java/libraries/native/pom.mustache | 22 ++++++----- .../java/apache-httpclient/build.gradle | 6 +-- .../petstore/java/apache-httpclient/pom.xml | 24 ++++++------ .../petstore/java/native-async/build.gradle | 4 +- .../client/petstore/java/native-async/pom.xml | 19 +++++----- .../client/petstore/java/native/build.gradle | 4 +- samples/client/petstore/java/native/pom.xml | 19 +++++----- 10 files changed, 74 insertions(+), 75 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/build.gradle.mustache index 911979d76a..6c7379be3c 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/build.gradle.mustache @@ -113,9 +113,9 @@ if(hasProperty('target') && target == 'android') { } ext { - swagger_annotations_version = "1.5.22" - jackson_version = "2.13.4" - jackson_databind_version = "2.13.4.2" + swagger_annotations_version = "1.6.6" + jackson_version = "2.14.1" + jackson_databind_version = "2.14.1" {{#openApiNullable}} jackson_databind_nullable_version = "0.2.4" {{/openApiNullable}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/pom.mustache index 343f4334bd..6e5abf83f9 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/pom.mustache @@ -43,7 +43,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.8.1 + 3.10.1 1.8 1.8 @@ -60,7 +60,7 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.0.0-M1 + 3.1.0 enforce-maven @@ -80,7 +80,7 @@ org.apache.maven.plugins maven-surefire-plugin - 2.12 + 3.0.0-M7 @@ -90,6 +90,7 @@ -Xms512m -Xmx1500m methods + 10 pertest @@ -112,11 +113,10 @@ org.apache.maven.plugins maven-jar-plugin - 2.2 + 3.3.0 - jar test-jar @@ -128,7 +128,7 @@ org.codehaus.mojo build-helper-maven-plugin - 1.10 + 3.3.0 add_sources @@ -159,7 +159,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.3.2 + 3.4.1 none 1.8 @@ -176,7 +176,7 @@ org.apache.maven.plugins maven-source-plugin - 2.2.1 + 3.2.1 attach-sources @@ -197,7 +197,7 @@ org.apache.maven.plugins maven-gpg-plugin - 1.5 + 3.0.1 sign-artifacts @@ -299,7 +299,7 @@ org.hibernate hibernate-validator - 5.4.1.Final + 5.4.3.Final {{/performBeanValidation}} {{#parcelableModel}} @@ -334,18 +334,19 @@ UTF-8 + {{#swagger1AnnotationLibrary}} 1.6.6 + {{/swagger1AnnotationLibrary}} 4.5.13 - 2.13.4 - 2.13.4.2 -{{#openApiNullable}} + 2.14.1 + 2.14.1 + {{#openApiNullable}} 0.2.4 -{{/openApiNullable}} + {{/openApiNullable}} 1.3.5 -{{#useBeanValidation}} - 2.0.2 -{{/useBeanValidation}} - 1.0.0 + {{#useBeanValidation}} + 3.0.2 + {{/useBeanValidation}} 4.13.2 diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/native/build.gradle.mustache index 6bfd3f6fed..a7ae198508 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/native/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/native/build.gradle.mustache @@ -62,14 +62,18 @@ artifacts { ext { - swagger_annotations_version = "1.5.22" - jackson_version = "2.13.4" + {{#swagger1AnnotationLibrary}} + swagger_annotations_version = "1.6.9" + {{/swagger1AnnotationLibrary}} + jackson_version = "2.14.1" jakarta_annotation_version = "1.3.5" junit_version = "4.13.2" } dependencies { + {{#swagger1AnnotationLibrary}} implementation "io.swagger:swagger-annotations:$swagger_annotations_version" + {{/swagger1AnnotationLibrary}} implementation "com.google.code.findbugs:jsr305:3.0.2" implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version" implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/native/pom.mustache index 584a57fffe..2a40aad08a 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/native/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/native/pom.mustache @@ -42,7 +42,7 @@ maven-enforcer-plugin - 3.0.0-M1 + 3.1.0 enforce-maven @@ -64,7 +64,7 @@ maven-surefire-plugin - 3.0.0-M3 + 3.0.0-M7 conf/log4j.properties @@ -76,7 +76,7 @@ maven-dependency-plugin - 3.1.1 + 3.3.0 package @@ -94,7 +94,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.1.2 + 3.3.0 @@ -107,12 +107,12 @@ maven-compiler-plugin - 3.8.1 + 3.10.1 org.apache.maven.plugins maven-javadoc-plugin - 3.3.2 + 3.4.1 attach-javadocs @@ -124,7 +124,7 @@ maven-source-plugin - 3.1.0 + 3.2.1 attach-sources @@ -144,7 +144,7 @@ maven-gpg-plugin - 1.6 + 3.0.1 sign-artifacts @@ -220,10 +220,12 @@ UTF-8 - 1.6.6 + {{#swagger1AnnotationLibrary}} + 1.6.9 + {{/swagger1AnnotationLibrary}} 11 11 - 2.13.4 + 2.14.1 0.2.4 1.3.5 4.13.2 diff --git a/samples/client/petstore/java/apache-httpclient/build.gradle b/samples/client/petstore/java/apache-httpclient/build.gradle index f344755af4..4378618057 100644 --- a/samples/client/petstore/java/apache-httpclient/build.gradle +++ b/samples/client/petstore/java/apache-httpclient/build.gradle @@ -113,9 +113,9 @@ if(hasProperty('target') && target == 'android') { } ext { - swagger_annotations_version = "1.5.22" - jackson_version = "2.13.4" - jackson_databind_version = "2.13.4.2" + swagger_annotations_version = "1.6.6" + jackson_version = "2.14.1" + jackson_databind_version = "2.14.1" jackson_databind_nullable_version = "0.2.4" jakarta_annotation_version = "1.3.5" httpclient_version = "4.5.13" diff --git a/samples/client/petstore/java/apache-httpclient/pom.xml b/samples/client/petstore/java/apache-httpclient/pom.xml index 847bb322c5..e87487e616 100644 --- a/samples/client/petstore/java/apache-httpclient/pom.xml +++ b/samples/client/petstore/java/apache-httpclient/pom.xml @@ -36,7 +36,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.8.1 + 3.10.1 1.8 1.8 @@ -53,7 +53,7 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.0.0-M1 + 3.1.0 enforce-maven @@ -73,7 +73,7 @@ org.apache.maven.plugins maven-surefire-plugin - 2.12 + 3.0.0-M7 @@ -83,6 +83,7 @@ -Xms512m -Xmx1500m methods + 10 pertest @@ -105,11 +106,10 @@ org.apache.maven.plugins maven-jar-plugin - 2.2 + 3.3.0 - jar test-jar @@ -121,7 +121,7 @@ org.codehaus.mojo build-helper-maven-plugin - 1.10 + 3.3.0 add_sources @@ -152,7 +152,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.3.2 + 3.4.1 none 1.8 @@ -169,7 +169,7 @@ org.apache.maven.plugins maven-source-plugin - 2.2.1 + 3.2.1 attach-sources @@ -190,7 +190,7 @@ org.apache.maven.plugins maven-gpg-plugin - 1.5 + 3.0.1 sign-artifacts @@ -275,13 +275,11 @@ UTF-8 - 1.6.6 4.5.13 - 2.13.4 - 2.13.4.2 + 2.14.1 + 2.14.1 0.2.4 1.3.5 - 1.0.0 4.13.2 diff --git a/samples/client/petstore/java/native-async/build.gradle b/samples/client/petstore/java/native-async/build.gradle index d69b1d8078..e8e2a8f42d 100644 --- a/samples/client/petstore/java/native-async/build.gradle +++ b/samples/client/petstore/java/native-async/build.gradle @@ -62,14 +62,12 @@ artifacts { ext { - swagger_annotations_version = "1.5.22" - jackson_version = "2.13.4" + jackson_version = "2.14.1" jakarta_annotation_version = "1.3.5" junit_version = "4.13.2" } dependencies { - implementation "io.swagger:swagger-annotations:$swagger_annotations_version" implementation "com.google.code.findbugs:jsr305:3.0.2" implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version" implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" diff --git a/samples/client/petstore/java/native-async/pom.xml b/samples/client/petstore/java/native-async/pom.xml index 11457d2f72..ea73292b75 100644 --- a/samples/client/petstore/java/native-async/pom.xml +++ b/samples/client/petstore/java/native-async/pom.xml @@ -35,7 +35,7 @@ maven-enforcer-plugin - 3.0.0-M1 + 3.1.0 enforce-maven @@ -57,7 +57,7 @@ maven-surefire-plugin - 3.0.0-M3 + 3.0.0-M7 conf/log4j.properties @@ -69,7 +69,7 @@ maven-dependency-plugin - 3.1.1 + 3.3.0 package @@ -87,7 +87,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.1.2 + 3.3.0 @@ -100,12 +100,12 @@ maven-compiler-plugin - 3.8.1 + 3.10.1 org.apache.maven.plugins maven-javadoc-plugin - 3.3.2 + 3.4.1 attach-javadocs @@ -117,7 +117,7 @@ maven-source-plugin - 3.1.0 + 3.2.1 attach-sources @@ -137,7 +137,7 @@ maven-gpg-plugin - 1.6 + 3.0.1 sign-artifacts @@ -206,10 +206,9 @@ UTF-8 - 1.6.6 11 11 - 2.13.4 + 2.14.1 0.2.4 1.3.5 4.13.2 diff --git a/samples/client/petstore/java/native/build.gradle b/samples/client/petstore/java/native/build.gradle index d69b1d8078..e8e2a8f42d 100644 --- a/samples/client/petstore/java/native/build.gradle +++ b/samples/client/petstore/java/native/build.gradle @@ -62,14 +62,12 @@ artifacts { ext { - swagger_annotations_version = "1.5.22" - jackson_version = "2.13.4" + jackson_version = "2.14.1" jakarta_annotation_version = "1.3.5" junit_version = "4.13.2" } dependencies { - implementation "io.swagger:swagger-annotations:$swagger_annotations_version" implementation "com.google.code.findbugs:jsr305:3.0.2" implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version" implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" diff --git a/samples/client/petstore/java/native/pom.xml b/samples/client/petstore/java/native/pom.xml index 11457d2f72..ea73292b75 100644 --- a/samples/client/petstore/java/native/pom.xml +++ b/samples/client/petstore/java/native/pom.xml @@ -35,7 +35,7 @@ maven-enforcer-plugin - 3.0.0-M1 + 3.1.0 enforce-maven @@ -57,7 +57,7 @@ maven-surefire-plugin - 3.0.0-M3 + 3.0.0-M7 conf/log4j.properties @@ -69,7 +69,7 @@ maven-dependency-plugin - 3.1.1 + 3.3.0 package @@ -87,7 +87,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.1.2 + 3.3.0 @@ -100,12 +100,12 @@ maven-compiler-plugin - 3.8.1 + 3.10.1 org.apache.maven.plugins maven-javadoc-plugin - 3.3.2 + 3.4.1 attach-javadocs @@ -117,7 +117,7 @@ maven-source-plugin - 3.1.0 + 3.2.1 attach-sources @@ -137,7 +137,7 @@ maven-gpg-plugin - 1.6 + 3.0.1 sign-artifacts @@ -206,10 +206,9 @@ UTF-8 - 1.6.6 11 11 - 2.13.4 + 2.14.1 0.2.4 1.3.5 4.13.2 From 76d81191500e52464fa4f7d0705d8ae46c83eee0 Mon Sep 17 00:00:00 2001 From: Mintas Date: Fri, 25 Nov 2022 05:55:15 +0300 Subject: [PATCH 047/189] put back missing import for NotNull annotation in #13365 fix #13885 (#13941) --- .../main/resources/JavaSpring/model.mustache | 8 +++ .../java/spring/SpringCodegenTest.java | 62 ++++++++++++++++--- 2 files changed, 61 insertions(+), 9 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/model.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/model.mustache index 9cf46316b9..8c267ca635 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/model.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/model.mustache @@ -21,6 +21,14 @@ import javax.validation.Valid; import javax.validation.constraints.*; {{/useJakartaEe}} {{/useBeanValidation}} +{{^useBeanValidation}} +{{#useJakartaEe}} +import jakarta.validation.constraints.NotNull; +{{/useJakartaEe}} +{{^useJakartaEe}} +import javax.validation.constraints.NotNull; +{{/useJakartaEe}} +{{/useBeanValidation}} {{#performBeanValidation}} import org.hibernate.validator.constraints.*; {{/performBeanValidation}} diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java index e7c9b733cd..fb1f01b7e1 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java @@ -29,6 +29,7 @@ import static org.openapitools.codegen.languages.features.DocumentationProviderF import static org.testng.Assert.assertEquals; import static org.testng.Assert.fail; +import com.github.javaparser.ast.nodeTypes.NodeWithName; import io.swagger.parser.OpenAPIParser; import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.Operation; @@ -46,6 +47,7 @@ import java.util.function.Consumer; import java.util.function.Function; import java.util.stream.Collectors; +import org.assertj.core.api.Condition; import org.openapitools.codegen.java.assertions.JavaFileAssert; import org.openapitools.codegen.CliOption; import org.openapitools.codegen.ClientOptInput; @@ -1501,14 +1503,48 @@ public class SpringCodegenTest { Map files = generateFiles(codegen, "src/test/resources/bugs/issue_13365.yml"); //Assert that NotNull annotation exists alone with no other BeanValidation annotations - JavaFileAssert.assertThat(files.get("Person.java")) - .printFileContent().assertMethod("getName").assertMethodAnnotations() + JavaFileAssert javaFileAssert = JavaFileAssert.assertThat(files.get("Person.java")) + .printFileContent(); + javaFileAssert.assertMethod("getName").assertMethodAnnotations() .containsWithName("NotNull").anyMatch(annotation -> !annotation.getNameAsString().equals("Valid") || !annotation.getNameAsString().equals("Pattern") || !annotation.getNameAsString().equals("Email") || !annotation.getNameAsString().equals("Size")); + javaFileAssert.hasImports("javax.validation.constraints.NotNull"); + } + @Test + public void requiredFieldShouldIncludeNotNullAnnotationJakarta_issue13365_issue13885() throws IOException { + + SpringCodegen codegen = new SpringCodegen(); + codegen.setLibrary(SPRING_BOOT); + codegen.additionalProperties().put(SpringCodegen.INTERFACE_ONLY, "true"); + codegen.additionalProperties().put(SpringCodegen.USE_BEANVALIDATION, "false"); + codegen.additionalProperties().put(SpringCodegen.PERFORM_BEANVALIDATION, "false"); + codegen.additionalProperties().put(SpringCodegen.USE_SPRING_BOOT3, "true"); + codegen.additionalProperties().put(SpringCodegen.USE_JAKARTA_EE, "true"); + codegen.additionalProperties().put(SpringCodegen.OPENAPI_NULLABLE, "false"); + codegen.additionalProperties().put(SpringCodegen.UNHANDLED_EXCEPTION_HANDLING, "false"); + codegen.additionalProperties().put(CodegenConstants.SORT_MODEL_PROPERTIES_BY_REQUIRED_FLAG, "false"); + codegen.additionalProperties().put(CodegenConstants.SORT_PARAMS_BY_REQUIRED_FLAG, "false"); + codegen.additionalProperties().put(CodegenConstants.SERIALIZATION_LIBRARY, "jackson"); + codegen.additionalProperties().put(CodegenConstants.ENUM_PROPERTY_NAMING, "PascalCase"); + codegen.additionalProperties().put(SpringCodegen.USE_TAGS, "true"); + + DefaultGenerator generator = new DefaultGenerator(); + Map files = generateFiles(codegen, "src/test/resources/bugs/issue_13365.yml"); + + //Assert that NotNull annotation exists alone with no other BeanValidation annotations + JavaFileAssert javaFileAssert = JavaFileAssert.assertThat(files.get("Person.java")) + .printFileContent(); + javaFileAssert.assertMethod("getName").assertMethodAnnotations() + .containsWithName("NotNull").anyMatch(annotation -> + !annotation.getNameAsString().equals("Valid") || + !annotation.getNameAsString().equals("Pattern") || + !annotation.getNameAsString().equals("Email") || + !annotation.getNameAsString().equals("Size")); + javaFileAssert.hasImports("jakarta.validation.constraints.NotNull"); } @Test @@ -1517,8 +1553,8 @@ public class SpringCodegenTest { SpringCodegen codegen = new SpringCodegen(); codegen.setLibrary(SPRING_BOOT); codegen.additionalProperties().put(SpringCodegen.INTERFACE_ONLY, "true"); - codegen.additionalProperties().put(SpringCodegen.USE_BEANVALIDATION, "false"); - codegen.additionalProperties().put(SpringCodegen.PERFORM_BEANVALIDATION, "false"); + codegen.additionalProperties().put(SpringCodegen.USE_BEANVALIDATION, "true"); + codegen.additionalProperties().put(SpringCodegen.PERFORM_BEANVALIDATION, "true"); codegen.additionalProperties().put(SpringCodegen.OPENAPI_NULLABLE, "false"); codegen.additionalProperties().put(SpringCodegen.UNHANDLED_EXCEPTION_HANDLING, "false"); codegen.additionalProperties().put(CodegenConstants.SORT_MODEL_PROPERTIES_BY_REQUIRED_FLAG, "false"); @@ -1529,9 +1565,13 @@ public class SpringCodegenTest { Map files = generateFiles(codegen, "src/test/resources/bugs/issue_13365.yml"); - JavaFileAssert.assertThat(files.get("Alien.java")) - .printFileContent().assertMethod("getName") + JavaFileAssert javaFileAssert = JavaFileAssert.assertThat(files.get("Alien.java")) + .printFileContent(); + javaFileAssert.assertMethod("getName") .assertMethodAnnotations().anyMatch(annotation -> !annotation.getNameAsString().equals("NotNull")); + javaFileAssert.isNot(new Condition<>(classfile -> + classfile.getImports().stream().map(NodeWithName::getNameAsString) + .anyMatch("javax.validation.constraints.NotNull"::equals), "")); } @Test @@ -1552,10 +1592,14 @@ public class SpringCodegenTest { Map files = generateFiles(codegen, "src/test/resources/bugs/issue_13365.yml"); - JavaFileAssert.assertThat(files.get("Person.java")) - .printFileContent().assertMethod("getName").assertMethodAnnotations() + JavaFileAssert javaFileAssert = JavaFileAssert.assertThat(files.get("Person.java")) + .printFileContent(); + javaFileAssert.assertMethod("getName").assertMethodAnnotations() .containsWithName("NotNull").containsWithName("Size").containsWithName("Email"); - + javaFileAssert.isNot(new Condition<>(classfile -> + classfile.getImports().stream().map(NodeWithName::getNameAsString) + .anyMatch("javax.validation.constraints.NotNull"::equals), "")); + javaFileAssert.hasImports("javax.validation.constraints"); } public void shouldUseEqualsNullableForArrayWhenSetInConfig_issue13385() throws IOException { From 9220e726742588274974f5482d3645eef2b2bab1 Mon Sep 17 00:00:00 2001 From: Daniel Ziegler <44165453+ziegler-daniel@users.noreply.github.com> Date: Fri, 25 Nov 2022 03:56:28 +0100 Subject: [PATCH 048/189] [JavaSpring] fix missing description in @Operation annotation (#13995) * fix: Java Spring missing description in operation annotation * update samples Co-authored-by: Daniel Ziegler --- .../src/main/resources/JavaSpring/api.mustache | 6 +++--- .../src/main/java/org/openapitools/api/PetApi.java | 8 ++++++++ .../src/main/java/org/openapitools/api/StoreApi.java | 4 ++++ .../src/main/java/org/openapitools/api/UserApi.java | 8 ++++++++ .../src/main/java/org/openapitools/api/PetApi.java | 3 +++ .../src/main/java/org/openapitools/api/StoreApi.java | 3 +++ .../src/main/java/org/openapitools/api/UserApi.java | 3 +++ .../main/java/org/openapitools/api/DefaultApi.java | 1 + .../java/org/openapitools/api/AnotherFakeApi.java | 1 + .../src/main/java/org/openapitools/api/FakeApi.java | 11 +++++++++++ .../org/openapitools/api/FakeClassnameTags123Api.java | 1 + .../src/main/java/org/openapitools/api/PetApi.java | 3 +++ .../src/main/java/org/openapitools/api/StoreApi.java | 3 +++ .../src/main/java/org/openapitools/api/UserApi.java | 3 +++ .../src/main/java/org/openapitools/api/PetApi.java | 3 +++ .../src/main/java/org/openapitools/api/StoreApi.java | 3 +++ .../src/main/java/org/openapitools/api/UserApi.java | 3 +++ .../src/main/java/org/openapitools/api/PetApi.java | 8 ++++++++ .../src/main/java/org/openapitools/api/StoreApi.java | 4 ++++ .../src/main/java/org/openapitools/api/UserApi.java | 8 ++++++++ .../src/main/java/org/openapitools/api/PetApi.java | 3 +++ .../src/main/java/org/openapitools/api/StoreApi.java | 3 +++ .../src/main/java/org/openapitools/api/UserApi.java | 3 +++ .../src/main/java/org/openapitools/api/PetApi.java | 3 +++ .../src/main/java/org/openapitools/api/StoreApi.java | 3 +++ .../src/main/java/org/openapitools/api/UserApi.java | 3 +++ .../src/main/java/org/openapitools/api/PetApi.java | 8 ++++++++ .../src/main/java/org/openapitools/api/StoreApi.java | 4 ++++ .../src/main/java/org/openapitools/api/UserApi.java | 8 ++++++++ .../src/main/java/org/openapitools/api/PetApi.java | 8 ++++++++ .../src/main/java/org/openapitools/api/StoreApi.java | 4 ++++ .../src/main/java/org/openapitools/api/UserApi.java | 8 ++++++++ .../java/org/openapitools/api/AnotherFakeApi.java | 1 + .../src/main/java/org/openapitools/api/FakeApi.java | 11 +++++++++++ .../org/openapitools/api/FakeClassnameTestApi.java | 1 + .../src/main/java/org/openapitools/api/PetApi.java | 3 +++ .../src/main/java/org/openapitools/api/StoreApi.java | 3 +++ .../src/main/java/org/openapitools/api/UserApi.java | 3 +++ .../java/org/openapitools/api/AnotherFakeApi.java | 1 + .../src/main/java/org/openapitools/api/FakeApi.java | 11 +++++++++++ .../org/openapitools/api/FakeClassnameTestApi.java | 1 + .../src/main/java/org/openapitools/api/PetApi.java | 3 +++ .../src/main/java/org/openapitools/api/StoreApi.java | 3 +++ .../src/main/java/org/openapitools/api/UserApi.java | 3 +++ .../java/org/openapitools/api/AnotherFakeApi.java | 1 + .../src/main/java/org/openapitools/api/FakeApi.java | 11 +++++++++++ .../org/openapitools/api/FakeClassnameTestApi.java | 1 + .../src/main/java/org/openapitools/api/PetApi.java | 3 +++ .../src/main/java/org/openapitools/api/StoreApi.java | 3 +++ .../src/main/java/org/openapitools/api/UserApi.java | 3 +++ .../java/org/openapitools/api/AnotherFakeApi.java | 1 + .../src/main/java/org/openapitools/api/FakeApi.java | 11 +++++++++++ .../org/openapitools/api/FakeClassnameTestApi.java | 1 + .../src/main/java/org/openapitools/api/PetApi.java | 3 +++ .../src/main/java/org/openapitools/api/StoreApi.java | 3 +++ .../src/main/java/org/openapitools/api/UserApi.java | 3 +++ .../java/org/openapitools/api/AnotherFakeApi.java | 1 + .../src/main/java/org/openapitools/api/FakeApi.java | 11 +++++++++++ .../org/openapitools/api/FakeClassnameTestApi.java | 1 + .../src/main/java/org/openapitools/api/PetApi.java | 3 +++ .../src/main/java/org/openapitools/api/StoreApi.java | 3 +++ .../src/main/java/org/openapitools/api/UserApi.java | 3 +++ .../src/main/java/org/openapitools/api/PetApi.java | 8 ++++++++ .../src/main/java/org/openapitools/api/StoreApi.java | 4 ++++ .../src/main/java/org/openapitools/api/UserApi.java | 8 ++++++++ .../java/org/openapitools/api/AnotherFakeApi.java | 1 + .../src/main/java/org/openapitools/api/FakeApi.java | 11 +++++++++++ .../org/openapitools/api/FakeClassnameTestApi.java | 1 + .../src/main/java/org/openapitools/api/PetApi.java | 3 +++ .../src/main/java/org/openapitools/api/StoreApi.java | 3 +++ .../src/main/java/org/openapitools/api/UserApi.java | 3 +++ .../main/java/org/openapitools/api/NullableApi.java | 1 + .../openapitools/virtualan/api/AnotherFakeApi.java | 1 + .../java/org/openapitools/virtualan/api/FakeApi.java | 11 +++++++++++ .../virtualan/api/FakeClassnameTestApi.java | 1 + .../java/org/openapitools/virtualan/api/PetApi.java | 3 +++ .../java/org/openapitools/virtualan/api/StoreApi.java | 3 +++ .../java/org/openapitools/virtualan/api/UserApi.java | 3 +++ 78 files changed, 317 insertions(+), 3 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/JavaSpring/api.mustache b/modules/openapi-generator/src/main/resources/JavaSpring/api.mustache index d548a7be1f..0ae5e6db62 100644 --- a/modules/openapi-generator/src/main/resources/JavaSpring/api.mustache +++ b/modules/openapi-generator/src/main/resources/JavaSpring/api.mustache @@ -151,9 +151,9 @@ public interface {{classname}} { {{#summary}} summary = "{{{.}}}", {{/summary}} - {{#description}} - description= "{{{.}}}", - {{/description}} + {{#notes}} + description = "{{{.}}}", + {{/notes}} {{#vendorExtensions.x-tags.size}} tags = { {{#vendorExtensions.x-tags}}"{{tag}}"{{^-last}}, {{/-last}}{{/vendorExtensions.x-tags}} }, {{/vendorExtensions.x-tags.size}} diff --git a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/PetApi.java index 0b132252a8..77e20f7384 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/PetApi.java @@ -46,6 +46,7 @@ public interface PetApi { @Operation( operationId = "addPet", summary = "Add a new pet to the store", + description = "", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -80,6 +81,7 @@ public interface PetApi { @Operation( operationId = "deletePet", summary = "Deletes a pet", + description = "", tags = { "pet" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid pet value") @@ -109,6 +111,7 @@ public interface PetApi { @Operation( operationId = "findPetsByStatus", summary = "Finds Pets by status", + description = "Multiple status values can be provided with comma separated strings", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -144,6 +147,7 @@ public interface PetApi { @Operation( operationId = "findPetsByTags", summary = "Finds Pets by tags", + description = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -178,6 +182,7 @@ public interface PetApi { @Operation( operationId = "getPetById", summary = "Find pet by ID", + description = "Returns a single pet", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -214,6 +219,7 @@ public interface PetApi { @Operation( operationId = "updatePet", summary = "Update an existing pet", + description = "", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -251,6 +257,7 @@ public interface PetApi { @Operation( operationId = "updatePetWithForm", summary = "Updates a pet in the store with form data", + description = "", tags = { "pet" }, responses = { @ApiResponse(responseCode = "405", description = "Invalid input") @@ -283,6 +290,7 @@ public interface PetApi { @Operation( operationId = "uploadFile", summary = "uploads an image", + description = "", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { diff --git a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/StoreApi.java index 34a445b908..15bad92ad3 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/StoreApi.java @@ -46,6 +46,7 @@ public interface StoreApi { @Operation( operationId = "deleteOrder", summary = "Delete purchase order by ID", + description = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags = { "store" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -70,6 +71,7 @@ public interface StoreApi { @Operation( operationId = "getInventory", summary = "Returns pet inventories by status", + description = "Returns a map of status codes to quantities", tags = { "store" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -102,6 +104,7 @@ public interface StoreApi { @Operation( operationId = "getOrderById", summary = "Find purchase order by ID", + description = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", tags = { "store" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -133,6 +136,7 @@ public interface StoreApi { @Operation( operationId = "placeOrder", summary = "Place an order for a pet", + description = "", tags = { "store" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { diff --git a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/UserApi.java index 5aa08f0954..ffc58f2cd3 100644 --- a/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-3/src/main/java/org/openapitools/api/UserApi.java @@ -46,6 +46,7 @@ public interface UserApi { @Operation( operationId = "createUser", summary = "Create user", + description = "This can only be done by the logged in user.", tags = { "user" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation") @@ -74,6 +75,7 @@ public interface UserApi { @Operation( operationId = "createUsersWithArrayInput", summary = "Creates list of users with given input array", + description = "", tags = { "user" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation") @@ -102,6 +104,7 @@ public interface UserApi { @Operation( operationId = "createUsersWithListInput", summary = "Creates list of users with given input array", + description = "", tags = { "user" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation") @@ -131,6 +134,7 @@ public interface UserApi { @Operation( operationId = "deleteUser", summary = "Delete user", + description = "This can only be done by the logged in user.", tags = { "user" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid username supplied"), @@ -161,6 +165,7 @@ public interface UserApi { @Operation( operationId = "getUserByName", summary = "Get user by user name", + description = "", tags = { "user" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -193,6 +198,7 @@ public interface UserApi { @Operation( operationId = "loginUser", summary = "Logs user into the system", + description = "", tags = { "user" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -222,6 +228,7 @@ public interface UserApi { @Operation( operationId = "logoutUser", summary = "Logs out current logged in user session", + description = "", tags = { "user" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation") @@ -251,6 +258,7 @@ public interface UserApi { @Operation( operationId = "updateUser", summary = "Updated user", + description = "This can only be done by the logged in user.", tags = { "user" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid user supplied"), diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java index 2e2c28c255..760328649b 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java @@ -102,6 +102,7 @@ public interface PetApi { @Operation( operationId = "findPetsByStatus", summary = "Finds Pets by status", + description = "Multiple status values can be provided with comma separated strings", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -137,6 +138,7 @@ public interface PetApi { @Operation( operationId = "findPetsByTags", summary = "Finds Pets by tags", + description = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -171,6 +173,7 @@ public interface PetApi { @Operation( operationId = "getPetById", summary = "Find pet by ID", + description = "Returns a single pet", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java index 6aa67c36ac..93e9dd1ba0 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java @@ -47,6 +47,7 @@ public interface StoreApi { @Operation( operationId = "deleteOrder", summary = "Delete purchase order by ID", + description = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags = { "store" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -71,6 +72,7 @@ public interface StoreApi { @Operation( operationId = "getInventory", summary = "Returns pet inventories by status", + description = "Returns a map of status codes to quantities", tags = { "store" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -103,6 +105,7 @@ public interface StoreApi { @Operation( operationId = "getOrderById", summary = "Find purchase order by ID", + description = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", tags = { "store" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { diff --git a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java index 7ae58d7ef0..2b9b3a7031 100644 --- a/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java @@ -47,6 +47,7 @@ public interface UserApi { @Operation( operationId = "createUser", summary = "Create user", + description = "This can only be done by the logged in user.", tags = { "user" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation") @@ -118,6 +119,7 @@ public interface UserApi { @Operation( operationId = "deleteUser", summary = "Delete user", + description = "This can only be done by the logged in user.", tags = { "user" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid username supplied"), @@ -229,6 +231,7 @@ public interface UserApi { @Operation( operationId = "updateUser", summary = "Updated user", + description = "This can only be done by the logged in user.", tags = { "user" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid user supplied"), diff --git a/samples/openapi3/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java b/samples/openapi3/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java index 4943e148b0..0c00e65f9a 100644 --- a/samples/openapi3/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-date-time/src/main/java/org/openapitools/api/DefaultApi.java @@ -73,6 +73,7 @@ public interface DefaultApi { */ @Operation( operationId = "updatePetWithForm", + description = "update with form data", responses = { @ApiResponse(responseCode = "405", description = "Invalid input") } diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/AnotherFakeApi.java index 47e3335ede..35cd6d5afc 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -44,6 +44,7 @@ public interface AnotherFakeApi { @Operation( operationId = "call123testSpecialTags", summary = "To test special tags", + description = "To test special tags and operation ID starting with number", tags = { "$another-fake?" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeApi.java index 24844f582b..aa53bcb8c4 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeApi.java @@ -53,6 +53,7 @@ public interface FakeApi { @Operation( operationId = "createXmlItem", summary = "creates an XmlItem", + description = "this route creates an XmlItem", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation") @@ -77,6 +78,7 @@ public interface FakeApi { */ @Operation( operationId = "fakeOuterBooleanSerialize", + description = "Test serialization of outer boolean types", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output boolean", content = { @@ -103,6 +105,7 @@ public interface FakeApi { */ @Operation( operationId = "fakeOuterCompositeSerialize", + description = "Test serialization of object with outer number type", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output composite", content = { @@ -129,6 +132,7 @@ public interface FakeApi { */ @Operation( operationId = "fakeOuterNumberSerialize", + description = "Test serialization of outer number types", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output number", content = { @@ -155,6 +159,7 @@ public interface FakeApi { */ @Operation( operationId = "fakeOuterStringSerialize", + description = "Test serialization of outer string types", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output string", content = { @@ -181,6 +186,7 @@ public interface FakeApi { */ @Operation( operationId = "testBodyWithFileSchema", + description = "For this test, the body for this request much reference a schema named `File`.", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Success") @@ -231,6 +237,7 @@ public interface FakeApi { @Operation( operationId = "testClientModel", summary = "To test \"client\" model", + description = "To test \"client\" model", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -273,6 +280,7 @@ public interface FakeApi { @Operation( operationId = "testEndpointParameters", summary = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", + description = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", tags = { "fake" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid username supplied"), @@ -323,6 +331,7 @@ public interface FakeApi { @Operation( operationId = "testEnumParameters", summary = "To test enum parameters", + description = "To test enum parameters", tags = { "fake" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid request"), @@ -361,6 +370,7 @@ public interface FakeApi { @Operation( operationId = "testGroupParameters", summary = "Fake endpoint to test group parameters (optional)", + description = "Fake endpoint to test group parameters (optional)", tags = { "fake" }, responses = { @ApiResponse(responseCode = "400", description = "Something wrong") @@ -443,6 +453,7 @@ public interface FakeApi { */ @Operation( operationId = "testQueryParameterCollectionFormat", + description = "To test the collection format in query parameters", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Success") diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java index d41f06b6c2..d0dc258920 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/FakeClassnameTags123Api.java @@ -44,6 +44,7 @@ public interface FakeClassnameTags123Api { @Operation( operationId = "testClassname", summary = "To test class name in snake case", + description = "To test class name in snake case", tags = { "fake_classname_tags 123#$%^" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/PetApi.java index d63709b82b..6411cb6aa1 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/PetApi.java @@ -106,6 +106,7 @@ public interface PetApi { @Operation( operationId = "findPetsByStatus", summary = "Finds Pets by status", + description = "Multiple status values can be provided with comma separated strings", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -141,6 +142,7 @@ public interface PetApi { @Operation( operationId = "findPetsByTags", summary = "Finds Pets by tags", + description = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -175,6 +177,7 @@ public interface PetApi { @Operation( operationId = "getPetById", summary = "Find pet by ID", + description = "Returns a single pet", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/StoreApi.java index e473e22502..66c6f99730 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/StoreApi.java @@ -46,6 +46,7 @@ public interface StoreApi { @Operation( operationId = "deleteOrder", summary = "Delete purchase order by ID", + description = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags = { "store" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -70,6 +71,7 @@ public interface StoreApi { @Operation( operationId = "getInventory", summary = "Returns pet inventories by status", + description = "Returns a map of status codes to quantities", tags = { "store" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -102,6 +104,7 @@ public interface StoreApi { @Operation( operationId = "getOrderById", summary = "Find purchase order by ID", + description = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", tags = { "store" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/UserApi.java index 27e4a06605..7f4a34020c 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/api/UserApi.java @@ -46,6 +46,7 @@ public interface UserApi { @Operation( operationId = "createUser", summary = "Create user", + description = "This can only be done by the logged in user.", tags = { "user" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation") @@ -117,6 +118,7 @@ public interface UserApi { @Operation( operationId = "deleteUser", summary = "Delete user", + description = "This can only be done by the logged in user.", tags = { "user" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid username supplied"), @@ -228,6 +230,7 @@ public interface UserApi { @Operation( operationId = "updateUser", summary = "Updated user", + description = "This can only be done by the logged in user.", tags = { "user" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid user supplied"), diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java index ea55371104..d00750ed78 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java @@ -103,6 +103,7 @@ public interface PetApi { @Operation( operationId = "findPetsByStatus", summary = "Finds Pets by status", + description = "Multiple status values can be provided with comma separated strings", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -139,6 +140,7 @@ public interface PetApi { @Operation( operationId = "findPetsByTags", summary = "Finds Pets by tags", + description = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -174,6 +176,7 @@ public interface PetApi { @Operation( operationId = "getPetById", summary = "Find pet by ID", + description = "Returns a single pet", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java index 7362603c2b..9b7ab5e5f7 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java @@ -46,6 +46,7 @@ public interface StoreApi { @Operation( operationId = "deleteOrder", summary = "Delete purchase order by ID", + description = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags = { "store" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -70,6 +71,7 @@ public interface StoreApi { @Operation( operationId = "getInventory", summary = "Returns pet inventories by status", + description = "Returns a map of status codes to quantities", tags = { "store" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -102,6 +104,7 @@ public interface StoreApi { @Operation( operationId = "getOrderById", summary = "Find purchase order by ID", + description = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", tags = { "store" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { diff --git a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java index 6f51045b26..25b855e7dd 100644 --- a/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java @@ -46,6 +46,7 @@ public interface UserApi { @Operation( operationId = "createUser", summary = "Create user", + description = "This can only be done by the logged in user.", tags = { "user" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation") @@ -117,6 +118,7 @@ public interface UserApi { @Operation( operationId = "deleteUser", summary = "Delete user", + description = "This can only be done by the logged in user.", tags = { "user" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid username supplied"), @@ -250,6 +252,7 @@ public interface UserApi { @Operation( operationId = "updateUser", summary = "Updated user", + description = "This can only be done by the logged in user.", tags = { "user" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid user supplied"), diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java index 649a08904c..b32d37b3e3 100644 --- a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java @@ -46,6 +46,7 @@ public interface PetApi { @Operation( operationId = "addPet", summary = "Add a new pet to the store", + description = "", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -80,6 +81,7 @@ public interface PetApi { @Operation( operationId = "deletePet", summary = "Deletes a pet", + description = "", tags = { "pet" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid pet value") @@ -109,6 +111,7 @@ public interface PetApi { @Operation( operationId = "findPetsByStatus", summary = "Finds Pets by status", + description = "Multiple status values can be provided with comma separated strings", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -144,6 +147,7 @@ public interface PetApi { @Operation( operationId = "findPetsByTags", summary = "Finds Pets by tags", + description = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -178,6 +182,7 @@ public interface PetApi { @Operation( operationId = "getPetById", summary = "Find pet by ID", + description = "Returns a single pet", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -214,6 +219,7 @@ public interface PetApi { @Operation( operationId = "updatePet", summary = "Update an existing pet", + description = "", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -251,6 +257,7 @@ public interface PetApi { @Operation( operationId = "updatePetWithForm", summary = "Updates a pet in the store with form data", + description = "", tags = { "pet" }, responses = { @ApiResponse(responseCode = "405", description = "Invalid input") @@ -283,6 +290,7 @@ public interface PetApi { @Operation( operationId = "uploadFile", summary = "uploads an image", + description = "", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java index d79552405b..4564d95596 100644 --- a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java @@ -46,6 +46,7 @@ public interface StoreApi { @Operation( operationId = "deleteOrder", summary = "Delete purchase order by ID", + description = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags = { "store" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -70,6 +71,7 @@ public interface StoreApi { @Operation( operationId = "getInventory", summary = "Returns pet inventories by status", + description = "Returns a map of status codes to quantities", tags = { "store" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -102,6 +104,7 @@ public interface StoreApi { @Operation( operationId = "getOrderById", summary = "Find purchase order by ID", + description = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", tags = { "store" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -133,6 +136,7 @@ public interface StoreApi { @Operation( operationId = "placeOrder", summary = "Place an order for a pet", + description = "", tags = { "store" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { diff --git a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java index 2c04552621..3733b5fedc 100644 --- a/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java @@ -46,6 +46,7 @@ public interface UserApi { @Operation( operationId = "createUser", summary = "Create user", + description = "This can only be done by the logged in user.", tags = { "user" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation") @@ -74,6 +75,7 @@ public interface UserApi { @Operation( operationId = "createUsersWithArrayInput", summary = "Creates list of users with given input array", + description = "", tags = { "user" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation") @@ -102,6 +104,7 @@ public interface UserApi { @Operation( operationId = "createUsersWithListInput", summary = "Creates list of users with given input array", + description = "", tags = { "user" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation") @@ -131,6 +134,7 @@ public interface UserApi { @Operation( operationId = "deleteUser", summary = "Delete user", + description = "This can only be done by the logged in user.", tags = { "user" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid username supplied"), @@ -161,6 +165,7 @@ public interface UserApi { @Operation( operationId = "getUserByName", summary = "Get user by user name", + description = "", tags = { "user" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -193,6 +198,7 @@ public interface UserApi { @Operation( operationId = "loginUser", summary = "Logs user into the system", + description = "", tags = { "user" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -222,6 +228,7 @@ public interface UserApi { @Operation( operationId = "logoutUser", summary = "Logs out current logged in user session", + description = "", tags = { "user" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation") @@ -251,6 +258,7 @@ public interface UserApi { @Operation( operationId = "updateUser", summary = "Updated user", + description = "This can only be done by the logged in user.", tags = { "user" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid user supplied"), diff --git a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/PetApi.java index c74ca0c0a5..fe47723b1f 100644 --- a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/PetApi.java @@ -101,6 +101,7 @@ public interface PetApi { @Operation( operationId = "findPetsByStatus", summary = "Finds Pets by status", + description = "Multiple status values can be provided with comma separated strings", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -136,6 +137,7 @@ public interface PetApi { @Operation( operationId = "findPetsByTags", summary = "Finds Pets by tags", + description = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -170,6 +172,7 @@ public interface PetApi { @Operation( operationId = "getPetById", summary = "Find pet by ID", + description = "Returns a single pet", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { diff --git a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/StoreApi.java index 1aa5ffe1b9..d95949ac2d 100644 --- a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/StoreApi.java @@ -46,6 +46,7 @@ public interface StoreApi { @Operation( operationId = "deleteOrder", summary = "Delete purchase order by ID", + description = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags = { "store" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -70,6 +71,7 @@ public interface StoreApi { @Operation( operationId = "getInventory", summary = "Returns pet inventories by status", + description = "Returns a map of status codes to quantities", tags = { "store" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -102,6 +104,7 @@ public interface StoreApi { @Operation( operationId = "getOrderById", summary = "Find purchase order by ID", + description = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", tags = { "store" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { diff --git a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/UserApi.java index aecc9b4b1a..777a841dad 100644 --- a/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-stubs-skip-default-interface/src/main/java/org/openapitools/api/UserApi.java @@ -46,6 +46,7 @@ public interface UserApi { @Operation( operationId = "createUser", summary = "Create user", + description = "This can only be done by the logged in user.", tags = { "user" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation") @@ -117,6 +118,7 @@ public interface UserApi { @Operation( operationId = "deleteUser", summary = "Delete user", + description = "This can only be done by the logged in user.", tags = { "user" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid username supplied"), @@ -228,6 +230,7 @@ public interface UserApi { @Operation( operationId = "updateUser", summary = "Updated user", + description = "This can only be done by the logged in user.", tags = { "user" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid user supplied"), diff --git a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java index 67c4a8d4dc..b8adaec29b 100644 --- a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java @@ -111,6 +111,7 @@ public interface PetApi { @Operation( operationId = "findPetsByStatus", summary = "Finds Pets by status", + description = "Multiple status values can be provided with comma separated strings", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -163,6 +164,7 @@ public interface PetApi { @Operation( operationId = "findPetsByTags", summary = "Finds Pets by tags", + description = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -214,6 +216,7 @@ public interface PetApi { @Operation( operationId = "getPetById", summary = "Find pet by ID", + description = "Returns a single pet", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { diff --git a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java index 9144b524af..f6515d4eda 100644 --- a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java @@ -50,6 +50,7 @@ public interface StoreApi { @Operation( operationId = "deleteOrder", summary = "Delete purchase order by ID", + description = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags = { "store" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -77,6 +78,7 @@ public interface StoreApi { @Operation( operationId = "getInventory", summary = "Returns pet inventories by status", + description = "Returns a map of status codes to quantities", tags = { "store" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -112,6 +114,7 @@ public interface StoreApi { @Operation( operationId = "getOrderById", summary = "Find purchase order by ID", + description = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", tags = { "store" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { diff --git a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java index 274d3b37f3..0c2919d2ab 100644 --- a/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java @@ -50,6 +50,7 @@ public interface UserApi { @Operation( operationId = "createUser", summary = "Create user", + description = "This can only be done by the logged in user.", tags = { "user" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation") @@ -130,6 +131,7 @@ public interface UserApi { @Operation( operationId = "deleteUser", summary = "Delete user", + description = "This can only be done by the logged in user.", tags = { "user" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid username supplied"), @@ -267,6 +269,7 @@ public interface UserApi { @Operation( operationId = "updateUser", summary = "Updated user", + description = "This can only be done by the logged in user.", tags = { "user" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid user supplied"), diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/PetApi.java index 469a5e322e..892b590a10 100644 --- a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/PetApi.java @@ -50,6 +50,7 @@ public interface PetApi { @Operation( operationId = "addPet", summary = "Add a new pet to the store", + description = "", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -101,6 +102,7 @@ public interface PetApi { @Operation( operationId = "deletePet", summary = "Deletes a pet", + description = "", tags = { "pet" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid pet value") @@ -133,6 +135,7 @@ public interface PetApi { @Operation( operationId = "findPetsByStatus", summary = "Finds Pets by status", + description = "Multiple status values can be provided with comma separated strings", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -185,6 +188,7 @@ public interface PetApi { @Operation( operationId = "findPetsByTags", summary = "Finds Pets by tags", + description = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -236,6 +240,7 @@ public interface PetApi { @Operation( operationId = "getPetById", summary = "Find pet by ID", + description = "Returns a single pet", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -289,6 +294,7 @@ public interface PetApi { @Operation( operationId = "updatePet", summary = "Update an existing pet", + description = "", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -343,6 +349,7 @@ public interface PetApi { @Operation( operationId = "updatePetWithForm", summary = "Updates a pet in the store with form data", + description = "", tags = { "pet" }, responses = { @ApiResponse(responseCode = "405", description = "Invalid input") @@ -378,6 +385,7 @@ public interface PetApi { @Operation( operationId = "uploadFile", summary = "uploads an image", + description = "", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/StoreApi.java index 748f4f5cc3..431f4f5d51 100644 --- a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/StoreApi.java @@ -50,6 +50,7 @@ public interface StoreApi { @Operation( operationId = "deleteOrder", summary = "Delete purchase order by ID", + description = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags = { "store" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -77,6 +78,7 @@ public interface StoreApi { @Operation( operationId = "getInventory", summary = "Returns pet inventories by status", + description = "Returns a map of status codes to quantities", tags = { "store" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -112,6 +114,7 @@ public interface StoreApi { @Operation( operationId = "getOrderById", summary = "Find purchase order by ID", + description = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", tags = { "store" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -160,6 +163,7 @@ public interface StoreApi { @Operation( operationId = "placeOrder", summary = "Place an order for a pet", + description = "", tags = { "store" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { diff --git a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/UserApi.java index a82dfc1734..95ba342625 100644 --- a/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/spring-boot-springdoc/src/main/java/org/openapitools/api/UserApi.java @@ -50,6 +50,7 @@ public interface UserApi { @Operation( operationId = "createUser", summary = "Create user", + description = "This can only be done by the logged in user.", tags = { "user" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation") @@ -81,6 +82,7 @@ public interface UserApi { @Operation( operationId = "createUsersWithArrayInput", summary = "Creates list of users with given input array", + description = "", tags = { "user" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation") @@ -112,6 +114,7 @@ public interface UserApi { @Operation( operationId = "createUsersWithListInput", summary = "Creates list of users with given input array", + description = "", tags = { "user" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation") @@ -144,6 +147,7 @@ public interface UserApi { @Operation( operationId = "deleteUser", summary = "Delete user", + description = "This can only be done by the logged in user.", tags = { "user" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid username supplied"), @@ -177,6 +181,7 @@ public interface UserApi { @Operation( operationId = "getUserByName", summary = "Get user by user name", + description = "", tags = { "user" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -226,6 +231,7 @@ public interface UserApi { @Operation( operationId = "loginUser", summary = "Logs user into the system", + description = "", tags = { "user" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -258,6 +264,7 @@ public interface UserApi { @Operation( operationId = "logoutUser", summary = "Logs out current logged in user session", + description = "", tags = { "user" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation") @@ -290,6 +297,7 @@ public interface UserApi { @Operation( operationId = "updateUser", summary = "Updated user", + description = "This can only be done by the logged in user.", tags = { "user" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid user supplied"), diff --git a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/PetApi.java index f1f70a9f8b..65c9500952 100644 --- a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/PetApi.java @@ -50,6 +50,7 @@ public interface PetApi { @Operation( operationId = "addPet", summary = "Add a new pet to the store", + description = "", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -101,6 +102,7 @@ public interface PetApi { @Operation( operationId = "deletePet", summary = "Deletes a pet", + description = "", tags = { "pet" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid pet value") @@ -133,6 +135,7 @@ public interface PetApi { @Operation( operationId = "findPetsByStatus", summary = "Finds Pets by status", + description = "Multiple status values can be provided with comma separated strings", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -185,6 +188,7 @@ public interface PetApi { @Operation( operationId = "findPetsByTags", summary = "Finds Pets by tags", + description = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -236,6 +240,7 @@ public interface PetApi { @Operation( operationId = "getPetById", summary = "Find pet by ID", + description = "Returns a single pet", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -289,6 +294,7 @@ public interface PetApi { @Operation( operationId = "updatePet", summary = "Update an existing pet", + description = "", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -343,6 +349,7 @@ public interface PetApi { @Operation( operationId = "updatePetWithForm", summary = "Updates a pet in the store with form data", + description = "", tags = { "pet" }, responses = { @ApiResponse(responseCode = "405", description = "Invalid input") @@ -378,6 +385,7 @@ public interface PetApi { @Operation( operationId = "uploadFile", summary = "uploads an image", + description = "", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { diff --git a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/StoreApi.java index e9e58af2ab..d40e26d5cf 100644 --- a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/StoreApi.java @@ -50,6 +50,7 @@ public interface StoreApi { @Operation( operationId = "deleteOrder", summary = "Delete purchase order by ID", + description = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags = { "store" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -77,6 +78,7 @@ public interface StoreApi { @Operation( operationId = "getInventory", summary = "Returns pet inventories by status", + description = "Returns a map of status codes to quantities", tags = { "store" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -112,6 +114,7 @@ public interface StoreApi { @Operation( operationId = "getOrderById", summary = "Find purchase order by ID", + description = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", tags = { "store" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -160,6 +163,7 @@ public interface StoreApi { @Operation( operationId = "placeOrder", summary = "Place an order for a pet", + description = "", tags = { "store" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { diff --git a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/UserApi.java index d44b39e135..39bc673a00 100644 --- a/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/springboot-3/src/main/java/org/openapitools/api/UserApi.java @@ -50,6 +50,7 @@ public interface UserApi { @Operation( operationId = "createUser", summary = "Create user", + description = "This can only be done by the logged in user.", tags = { "user" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation") @@ -81,6 +82,7 @@ public interface UserApi { @Operation( operationId = "createUsersWithArrayInput", summary = "Creates list of users with given input array", + description = "", tags = { "user" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation") @@ -112,6 +114,7 @@ public interface UserApi { @Operation( operationId = "createUsersWithListInput", summary = "Creates list of users with given input array", + description = "", tags = { "user" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation") @@ -144,6 +147,7 @@ public interface UserApi { @Operation( operationId = "deleteUser", summary = "Delete user", + description = "This can only be done by the logged in user.", tags = { "user" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid username supplied"), @@ -177,6 +181,7 @@ public interface UserApi { @Operation( operationId = "getUserByName", summary = "Get user by user name", + description = "", tags = { "user" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -226,6 +231,7 @@ public interface UserApi { @Operation( operationId = "loginUser", summary = "Logs user into the system", + description = "", tags = { "user" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -258,6 +264,7 @@ public interface UserApi { @Operation( operationId = "logoutUser", summary = "Logs out current logged in user session", + description = "", tags = { "user" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation") @@ -290,6 +297,7 @@ public interface UserApi { @Operation( operationId = "updateUser", summary = "Updated user", + description = "This can only be done by the logged in user.", tags = { "user" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid user supplied"), diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java index fba11ac08b..686658862e 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -48,6 +48,7 @@ public interface AnotherFakeApi { @Operation( operationId = "call123testSpecialTags", summary = "To test special tags", + description = "To test special tags and operation ID starting with number", tags = { "$another-fake?" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java index c640ac479d..f14f76675b 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java @@ -58,6 +58,7 @@ public interface FakeApi { @Operation( operationId = "createXmlItem", summary = "creates an XmlItem", + description = "this route creates an XmlItem", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation") @@ -85,6 +86,7 @@ public interface FakeApi { */ @Operation( operationId = "fakeOuterBooleanSerialize", + description = "Test serialization of outer boolean types", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output boolean", content = { @@ -114,6 +116,7 @@ public interface FakeApi { */ @Operation( operationId = "fakeOuterCompositeSerialize", + description = "Test serialization of object with outer number type", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output composite", content = { @@ -152,6 +155,7 @@ public interface FakeApi { */ @Operation( operationId = "fakeOuterNumberSerialize", + description = "Test serialization of outer number types", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output number", content = { @@ -181,6 +185,7 @@ public interface FakeApi { */ @Operation( operationId = "fakeOuterStringSerialize", + description = "Test serialization of outer string types", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output string", content = { @@ -210,6 +215,7 @@ public interface FakeApi { */ @Operation( operationId = "testBodyWithFileSchema", + description = "For this test, the body for this request much reference a schema named `File`.", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Success") @@ -266,6 +272,7 @@ public interface FakeApi { @Operation( operationId = "testClientModel", summary = "To test \"client\" model", + description = "To test \"client\" model", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -320,6 +327,7 @@ public interface FakeApi { @Operation( operationId = "testEndpointParameters", summary = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", + description = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", tags = { "fake" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid username supplied"), @@ -373,6 +381,7 @@ public interface FakeApi { @Operation( operationId = "testEnumParameters", summary = "To test enum parameters", + description = "To test enum parameters", tags = { "fake" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid request"), @@ -414,6 +423,7 @@ public interface FakeApi { @Operation( operationId = "testGroupParameters", summary = "Fake endpoint to test group parameters (optional)", + description = "Fake endpoint to test group parameters (optional)", tags = { "fake" }, responses = { @ApiResponse(responseCode = "400", description = "Something wrong") @@ -505,6 +515,7 @@ public interface FakeApi { */ @Operation( operationId = "testQueryParameterCollectionFormat", + description = "To test the collection format in query parameters", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Success") diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 8d87477c2b..07f29752b7 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -48,6 +48,7 @@ public interface FakeClassnameTestApi { @Operation( operationId = "testClassname", summary = "To test class name in snake case", + description = "To test class name in snake case", tags = { "fake_classname_tags 123#$%^" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java index 3542fcccb5..75063ee1a1 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java @@ -116,6 +116,7 @@ public interface PetApi { @Operation( operationId = "findPetsByStatus", summary = "Finds Pets by status", + description = "Multiple status values can be provided with comma separated strings", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -168,6 +169,7 @@ public interface PetApi { @Operation( operationId = "findPetsByTags", summary = "Finds Pets by tags", + description = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -219,6 +221,7 @@ public interface PetApi { @Operation( operationId = "getPetById", summary = "Find pet by ID", + description = "Returns a single pet", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java index 77f6a5e386..be82f953d4 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java @@ -50,6 +50,7 @@ public interface StoreApi { @Operation( operationId = "deleteOrder", summary = "Delete purchase order by ID", + description = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags = { "store" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -77,6 +78,7 @@ public interface StoreApi { @Operation( operationId = "getInventory", summary = "Returns pet inventories by status", + description = "Returns a map of status codes to quantities", tags = { "store" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -112,6 +114,7 @@ public interface StoreApi { @Operation( operationId = "getOrderById", summary = "Find purchase order by ID", + description = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", tags = { "store" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { diff --git a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java index 09484728d8..f55834070d 100644 --- a/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java @@ -50,6 +50,7 @@ public interface UserApi { @Operation( operationId = "createUser", summary = "Create user", + description = "This can only be done by the logged in user.", tags = { "user" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation") @@ -130,6 +131,7 @@ public interface UserApi { @Operation( operationId = "deleteUser", summary = "Delete user", + description = "This can only be done by the logged in user.", tags = { "user" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid username supplied"), @@ -267,6 +269,7 @@ public interface UserApi { @Operation( operationId = "updateUser", summary = "Updated user", + description = "This can only be done by the logged in user.", tags = { "user" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid user supplied"), diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java index 122955b07b..74920dd773 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -44,6 +44,7 @@ public interface AnotherFakeApi { @Operation( operationId = "call123testSpecialTags", summary = "To test special tags", + description = "To test special tags and operation ID starting with number", tags = { "$another-fake?" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java index ae9085e66e..91fcc67fb1 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java @@ -54,6 +54,7 @@ public interface FakeApi { @Operation( operationId = "createXmlItem", summary = "creates an XmlItem", + description = "this route creates an XmlItem", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation") @@ -80,6 +81,7 @@ public interface FakeApi { */ @Operation( operationId = "fakeOuterBooleanSerialize", + description = "Test serialization of outer boolean types", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output boolean", content = { @@ -108,6 +110,7 @@ public interface FakeApi { */ @Operation( operationId = "fakeOuterCompositeSerialize", + description = "Test serialization of object with outer number type", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output composite", content = { @@ -136,6 +139,7 @@ public interface FakeApi { */ @Operation( operationId = "fakeOuterNumberSerialize", + description = "Test serialization of outer number types", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output number", content = { @@ -164,6 +168,7 @@ public interface FakeApi { */ @Operation( operationId = "fakeOuterStringSerialize", + description = "Test serialization of outer string types", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output string", content = { @@ -192,6 +197,7 @@ public interface FakeApi { */ @Operation( operationId = "testBodyWithFileSchema", + description = "For this test, the body for this request much reference a schema named `File`.", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Success") @@ -246,6 +252,7 @@ public interface FakeApi { @Operation( operationId = "testClientModel", summary = "To test \"client\" model", + description = "To test \"client\" model", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -290,6 +297,7 @@ public interface FakeApi { @Operation( operationId = "testEndpointParameters", summary = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", + description = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", tags = { "fake" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid username supplied"), @@ -342,6 +350,7 @@ public interface FakeApi { @Operation( operationId = "testEnumParameters", summary = "To test enum parameters", + description = "To test enum parameters", tags = { "fake" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid request"), @@ -382,6 +391,7 @@ public interface FakeApi { @Operation( operationId = "testGroupParameters", summary = "Fake endpoint to test group parameters (optional)", + description = "Fake endpoint to test group parameters (optional)", tags = { "fake" }, responses = { @ApiResponse(responseCode = "400", description = "Something wrong") @@ -470,6 +480,7 @@ public interface FakeApi { */ @Operation( operationId = "testQueryParameterCollectionFormat", + description = "To test the collection format in query parameters", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Success") diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index a42bc82021..d8929ca473 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -44,6 +44,7 @@ public interface FakeClassnameTestApi { @Operation( operationId = "testClassname", summary = "To test class name in snake case", + description = "To test class name in snake case", tags = { "fake_classname_tags 123#$%^" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java index 8ef3dca5c9..28a8cf3305 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java @@ -110,6 +110,7 @@ public interface PetApi { @Operation( operationId = "findPetsByStatus", summary = "Finds Pets by status", + description = "Multiple status values can be provided with comma separated strings", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -147,6 +148,7 @@ public interface PetApi { @Operation( operationId = "findPetsByTags", summary = "Finds Pets by tags", + description = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -183,6 +185,7 @@ public interface PetApi { @Operation( operationId = "getPetById", summary = "Find pet by ID", + description = "Returns a single pet", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java index 80be70f876..934b6e6be9 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java @@ -46,6 +46,7 @@ public interface StoreApi { @Operation( operationId = "deleteOrder", summary = "Delete purchase order by ID", + description = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags = { "store" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -72,6 +73,7 @@ public interface StoreApi { @Operation( operationId = "getInventory", summary = "Returns pet inventories by status", + description = "Returns a map of status codes to quantities", tags = { "store" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -106,6 +108,7 @@ public interface StoreApi { @Operation( operationId = "getOrderById", summary = "Find purchase order by ID", + description = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", tags = { "store" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java index 46f9117542..4264ccdd4c 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java @@ -46,6 +46,7 @@ public interface UserApi { @Operation( operationId = "createUser", summary = "Create user", + description = "This can only be done by the logged in user.", tags = { "user" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation") @@ -123,6 +124,7 @@ public interface UserApi { @Operation( operationId = "deleteUser", summary = "Delete user", + description = "This can only be done by the logged in user.", tags = { "user" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid username supplied"), @@ -242,6 +244,7 @@ public interface UserApi { @Operation( operationId = "updateUser", summary = "Updated user", + description = "This can only be done by the logged in user.", tags = { "user" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid user supplied"), diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java index fba11ac08b..686658862e 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -48,6 +48,7 @@ public interface AnotherFakeApi { @Operation( operationId = "call123testSpecialTags", summary = "To test special tags", + description = "To test special tags and operation ID starting with number", tags = { "$another-fake?" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java index c54f65aab4..12914c8269 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java @@ -58,6 +58,7 @@ public interface FakeApi { @Operation( operationId = "createXmlItem", summary = "creates an XmlItem", + description = "this route creates an XmlItem", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation") @@ -85,6 +86,7 @@ public interface FakeApi { */ @Operation( operationId = "fakeOuterBooleanSerialize", + description = "Test serialization of outer boolean types", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output boolean", content = { @@ -114,6 +116,7 @@ public interface FakeApi { */ @Operation( operationId = "fakeOuterCompositeSerialize", + description = "Test serialization of object with outer number type", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output composite", content = { @@ -152,6 +155,7 @@ public interface FakeApi { */ @Operation( operationId = "fakeOuterNumberSerialize", + description = "Test serialization of outer number types", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output number", content = { @@ -181,6 +185,7 @@ public interface FakeApi { */ @Operation( operationId = "fakeOuterStringSerialize", + description = "Test serialization of outer string types", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output string", content = { @@ -210,6 +215,7 @@ public interface FakeApi { */ @Operation( operationId = "testBodyWithFileSchema", + description = "For this test, the body for this request much reference a schema named `File`.", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Success") @@ -266,6 +272,7 @@ public interface FakeApi { @Operation( operationId = "testClientModel", summary = "To test \"client\" model", + description = "To test \"client\" model", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -320,6 +327,7 @@ public interface FakeApi { @Operation( operationId = "testEndpointParameters", summary = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", + description = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", tags = { "fake" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid username supplied"), @@ -371,6 +379,7 @@ public interface FakeApi { @Operation( operationId = "testEnumParameters", summary = "To test enum parameters", + description = "To test enum parameters", tags = { "fake" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid request"), @@ -412,6 +421,7 @@ public interface FakeApi { @Operation( operationId = "testGroupParameters", summary = "Fake endpoint to test group parameters (optional)", + description = "Fake endpoint to test group parameters (optional)", tags = { "fake" }, responses = { @ApiResponse(responseCode = "400", description = "Something wrong") @@ -505,6 +515,7 @@ public interface FakeApi { */ @Operation( operationId = "testQueryParameterCollectionFormat", + description = "To test the collection format in query parameters", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Success") diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 8d87477c2b..07f29752b7 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -48,6 +48,7 @@ public interface FakeClassnameTestApi { @Operation( operationId = "testClassname", summary = "To test class name in snake case", + description = "To test class name in snake case", tags = { "fake_classname_tags 123#$%^" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java index 7fa1f66a01..0244e5e200 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java @@ -117,6 +117,7 @@ public interface PetApi { @Operation( operationId = "findPetsByStatus", summary = "Finds Pets by status", + description = "Multiple status values can be provided with comma separated strings", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -169,6 +170,7 @@ public interface PetApi { @Operation( operationId = "findPetsByTags", summary = "Finds Pets by tags", + description = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -220,6 +222,7 @@ public interface PetApi { @Operation( operationId = "getPetById", summary = "Find pet by ID", + description = "Returns a single pet", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java index 77f6a5e386..be82f953d4 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java @@ -50,6 +50,7 @@ public interface StoreApi { @Operation( operationId = "deleteOrder", summary = "Delete purchase order by ID", + description = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags = { "store" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -77,6 +78,7 @@ public interface StoreApi { @Operation( operationId = "getInventory", summary = "Returns pet inventories by status", + description = "Returns a map of status codes to quantities", tags = { "store" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -112,6 +114,7 @@ public interface StoreApi { @Operation( operationId = "getOrderById", summary = "Find purchase order by ID", + description = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", tags = { "store" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java index 09484728d8..f55834070d 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java @@ -50,6 +50,7 @@ public interface UserApi { @Operation( operationId = "createUser", summary = "Create user", + description = "This can only be done by the logged in user.", tags = { "user" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation") @@ -130,6 +131,7 @@ public interface UserApi { @Operation( operationId = "deleteUser", summary = "Delete user", + description = "This can only be done by the logged in user.", tags = { "user" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid username supplied"), @@ -267,6 +269,7 @@ public interface UserApi { @Operation( operationId = "updateUser", summary = "Updated user", + description = "This can only be done by the logged in user.", tags = { "user" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid user supplied"), diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java index 66d3dc1509..bb21625923 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -48,6 +48,7 @@ public interface AnotherFakeApi { @Operation( operationId = "call123testSpecialTags", summary = "To test special tags", + description = "To test special tags and operation ID starting with number", tags = { "$another-fake?" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java index dd7a16a827..04a35d5160 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java @@ -58,6 +58,7 @@ public interface FakeApi { @Operation( operationId = "createXmlItem", summary = "creates an XmlItem", + description = "this route creates an XmlItem", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation") @@ -85,6 +86,7 @@ public interface FakeApi { */ @Operation( operationId = "fakeOuterBooleanSerialize", + description = "Test serialization of outer boolean types", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output boolean", content = { @@ -114,6 +116,7 @@ public interface FakeApi { */ @Operation( operationId = "fakeOuterCompositeSerialize", + description = "Test serialization of object with outer number type", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output composite", content = { @@ -143,6 +146,7 @@ public interface FakeApi { */ @Operation( operationId = "fakeOuterNumberSerialize", + description = "Test serialization of outer number types", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output number", content = { @@ -172,6 +176,7 @@ public interface FakeApi { */ @Operation( operationId = "fakeOuterStringSerialize", + description = "Test serialization of outer string types", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output string", content = { @@ -201,6 +206,7 @@ public interface FakeApi { */ @Operation( operationId = "testBodyWithFileSchema", + description = "For this test, the body for this request much reference a schema named `File`.", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Success") @@ -257,6 +263,7 @@ public interface FakeApi { @Operation( operationId = "testClientModel", summary = "To test \"client\" model", + description = "To test \"client\" model", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -302,6 +309,7 @@ public interface FakeApi { @Operation( operationId = "testEndpointParameters", summary = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", + description = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", tags = { "fake" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid username supplied"), @@ -355,6 +363,7 @@ public interface FakeApi { @Operation( operationId = "testEnumParameters", summary = "To test enum parameters", + description = "To test enum parameters", tags = { "fake" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid request"), @@ -396,6 +405,7 @@ public interface FakeApi { @Operation( operationId = "testGroupParameters", summary = "Fake endpoint to test group parameters (optional)", + description = "Fake endpoint to test group parameters (optional)", tags = { "fake" }, responses = { @ApiResponse(responseCode = "400", description = "Something wrong") @@ -487,6 +497,7 @@ public interface FakeApi { */ @Operation( operationId = "testQueryParameterCollectionFormat", + description = "To test the collection format in query parameters", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Success") diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 2baae42af1..839ed454cc 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -48,6 +48,7 @@ public interface FakeClassnameTestApi { @Operation( operationId = "testClassname", summary = "To test class name in snake case", + description = "To test class name in snake case", tags = { "fake_classname_tags 123#$%^" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java index e5bb02ffaf..1657bbc0d0 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java @@ -116,6 +116,7 @@ public interface PetApi { @Operation( operationId = "findPetsByStatus", summary = "Finds Pets by status", + description = "Multiple status values can be provided with comma separated strings", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -154,6 +155,7 @@ public interface PetApi { @Operation( operationId = "findPetsByTags", summary = "Finds Pets by tags", + description = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -191,6 +193,7 @@ public interface PetApi { @Operation( operationId = "getPetById", summary = "Find pet by ID", + description = "Returns a single pet", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java index 9c42b929a1..61f14339f4 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java @@ -50,6 +50,7 @@ public interface StoreApi { @Operation( operationId = "deleteOrder", summary = "Delete purchase order by ID", + description = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags = { "store" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -77,6 +78,7 @@ public interface StoreApi { @Operation( operationId = "getInventory", summary = "Returns pet inventories by status", + description = "Returns a map of status codes to quantities", tags = { "store" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -111,6 +113,7 @@ public interface StoreApi { @Operation( operationId = "getOrderById", summary = "Find purchase order by ID", + description = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", tags = { "store" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { diff --git a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java index fb9f62f466..69c0decc1d 100644 --- a/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java @@ -50,6 +50,7 @@ public interface UserApi { @Operation( operationId = "createUser", summary = "Create user", + description = "This can only be done by the logged in user.", tags = { "user" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation") @@ -130,6 +131,7 @@ public interface UserApi { @Operation( operationId = "deleteUser", summary = "Delete user", + description = "This can only be done by the logged in user.", tags = { "user" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid username supplied"), @@ -252,6 +254,7 @@ public interface UserApi { @Operation( operationId = "updateUser", summary = "Updated user", + description = "This can only be done by the logged in user.", tags = { "user" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid user supplied"), diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java index fba11ac08b..686658862e 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -48,6 +48,7 @@ public interface AnotherFakeApi { @Operation( operationId = "call123testSpecialTags", summary = "To test special tags", + description = "To test special tags and operation ID starting with number", tags = { "$another-fake?" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java index acef662cd1..a3b5c32f92 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java @@ -58,6 +58,7 @@ public interface FakeApi { @Operation( operationId = "createXmlItem", summary = "creates an XmlItem", + description = "this route creates an XmlItem", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation") @@ -85,6 +86,7 @@ public interface FakeApi { */ @Operation( operationId = "fakeOuterBooleanSerialize", + description = "Test serialization of outer boolean types", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output boolean", content = { @@ -114,6 +116,7 @@ public interface FakeApi { */ @Operation( operationId = "fakeOuterCompositeSerialize", + description = "Test serialization of object with outer number type", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output composite", content = { @@ -152,6 +155,7 @@ public interface FakeApi { */ @Operation( operationId = "fakeOuterNumberSerialize", + description = "Test serialization of outer number types", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output number", content = { @@ -181,6 +185,7 @@ public interface FakeApi { */ @Operation( operationId = "fakeOuterStringSerialize", + description = "Test serialization of outer string types", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output string", content = { @@ -210,6 +215,7 @@ public interface FakeApi { */ @Operation( operationId = "testBodyWithFileSchema", + description = "For this test, the body for this request much reference a schema named `File`.", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Success") @@ -266,6 +272,7 @@ public interface FakeApi { @Operation( operationId = "testClientModel", summary = "To test \"client\" model", + description = "To test \"client\" model", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -320,6 +327,7 @@ public interface FakeApi { @Operation( operationId = "testEndpointParameters", summary = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", + description = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", tags = { "fake" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid username supplied"), @@ -373,6 +381,7 @@ public interface FakeApi { @Operation( operationId = "testEnumParameters", summary = "To test enum parameters", + description = "To test enum parameters", tags = { "fake" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid request"), @@ -414,6 +423,7 @@ public interface FakeApi { @Operation( operationId = "testGroupParameters", summary = "Fake endpoint to test group parameters (optional)", + description = "Fake endpoint to test group parameters (optional)", tags = { "fake" }, responses = { @ApiResponse(responseCode = "400", description = "Something wrong") @@ -505,6 +515,7 @@ public interface FakeApi { */ @Operation( operationId = "testQueryParameterCollectionFormat", + description = "To test the collection format in query parameters", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Success") diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index 8d87477c2b..07f29752b7 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -48,6 +48,7 @@ public interface FakeClassnameTestApi { @Operation( operationId = "testClassname", summary = "To test class name in snake case", + description = "To test class name in snake case", tags = { "fake_classname_tags 123#$%^" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java index 7655565567..2d4bb84ba1 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java @@ -116,6 +116,7 @@ public interface PetApi { @Operation( operationId = "findPetsByStatus", summary = "Finds Pets by status", + description = "Multiple status values can be provided with comma separated strings", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -168,6 +169,7 @@ public interface PetApi { @Operation( operationId = "findPetsByTags", summary = "Finds Pets by tags", + description = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -219,6 +221,7 @@ public interface PetApi { @Operation( operationId = "getPetById", summary = "Find pet by ID", + description = "Returns a single pet", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java index 77f6a5e386..be82f953d4 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java @@ -50,6 +50,7 @@ public interface StoreApi { @Operation( operationId = "deleteOrder", summary = "Delete purchase order by ID", + description = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags = { "store" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -77,6 +78,7 @@ public interface StoreApi { @Operation( operationId = "getInventory", summary = "Returns pet inventories by status", + description = "Returns a map of status codes to quantities", tags = { "store" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -112,6 +114,7 @@ public interface StoreApi { @Operation( operationId = "getOrderById", summary = "Find purchase order by ID", + description = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", tags = { "store" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { diff --git a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java index 09484728d8..f55834070d 100644 --- a/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java @@ -50,6 +50,7 @@ public interface UserApi { @Operation( operationId = "createUser", summary = "Create user", + description = "This can only be done by the logged in user.", tags = { "user" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation") @@ -130,6 +131,7 @@ public interface UserApi { @Operation( operationId = "deleteUser", summary = "Delete user", + description = "This can only be done by the logged in user.", tags = { "user" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid username supplied"), @@ -267,6 +269,7 @@ public interface UserApi { @Operation( operationId = "updateUser", summary = "Updated user", + description = "This can only be done by the logged in user.", tags = { "user" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid user supplied"), diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java index 0f7ff0628f..e850a25c2e 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java @@ -51,6 +51,7 @@ public interface PetApi { @Operation( operationId = "addPet", summary = "Add a new pet to the store", + description = "", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -102,6 +103,7 @@ public interface PetApi { @Operation( operationId = "deletePet", summary = "Deletes a pet", + description = "", tags = { "pet" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid pet value") @@ -134,6 +136,7 @@ public interface PetApi { @Operation( operationId = "findPetsByStatus", summary = "Finds Pets by status", + description = "Multiple status values can be provided with comma separated strings", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -186,6 +189,7 @@ public interface PetApi { @Operation( operationId = "findPetsByTags", summary = "Finds Pets by tags", + description = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -237,6 +241,7 @@ public interface PetApi { @Operation( operationId = "getPetById", summary = "Find pet by ID", + description = "Returns a single pet", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -290,6 +295,7 @@ public interface PetApi { @Operation( operationId = "updatePet", summary = "Update an existing pet", + description = "", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -344,6 +350,7 @@ public interface PetApi { @Operation( operationId = "updatePetWithForm", summary = "Updates a pet in the store with form data", + description = "", tags = { "pet" }, responses = { @ApiResponse(responseCode = "405", description = "Invalid input") @@ -379,6 +386,7 @@ public interface PetApi { @Operation( operationId = "uploadFile", summary = "uploads an image", + description = "", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java index f3d4f3b21f..5707f91672 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java @@ -51,6 +51,7 @@ public interface StoreApi { @Operation( operationId = "deleteOrder", summary = "Delete purchase order by ID", + description = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags = { "store" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -78,6 +79,7 @@ public interface StoreApi { @Operation( operationId = "getInventory", summary = "Returns pet inventories by status", + description = "Returns a map of status codes to quantities", tags = { "store" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -113,6 +115,7 @@ public interface StoreApi { @Operation( operationId = "getOrderById", summary = "Find purchase order by ID", + description = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", tags = { "store" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -161,6 +164,7 @@ public interface StoreApi { @Operation( operationId = "placeOrder", summary = "Place an order for a pet", + description = "", tags = { "store" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { diff --git a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java index 5b734a75ab..b284540a80 100644 --- a/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/openapi3/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java @@ -51,6 +51,7 @@ public interface UserApi { @Operation( operationId = "createUser", summary = "Create user", + description = "This can only be done by the logged in user.", tags = { "user" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation") @@ -82,6 +83,7 @@ public interface UserApi { @Operation( operationId = "createUsersWithArrayInput", summary = "Creates list of users with given input array", + description = "", tags = { "user" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation") @@ -113,6 +115,7 @@ public interface UserApi { @Operation( operationId = "createUsersWithListInput", summary = "Creates list of users with given input array", + description = "", tags = { "user" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation") @@ -145,6 +148,7 @@ public interface UserApi { @Operation( operationId = "deleteUser", summary = "Delete user", + description = "This can only be done by the logged in user.", tags = { "user" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid username supplied"), @@ -178,6 +182,7 @@ public interface UserApi { @Operation( operationId = "getUserByName", summary = "Get user by user name", + description = "", tags = { "user" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -227,6 +232,7 @@ public interface UserApi { @Operation( operationId = "loginUser", summary = "Logs user into the system", + description = "", tags = { "user" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -259,6 +265,7 @@ public interface UserApi { @Operation( operationId = "logoutUser", summary = "Logs out current logged in user session", + description = "", tags = { "user" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation") @@ -291,6 +298,7 @@ public interface UserApi { @Operation( operationId = "updateUser", summary = "Updated user", + description = "This can only be done by the logged in user.", tags = { "user" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid user supplied"), diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/AnotherFakeApi.java index 4e261bd440..1050d60877 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -44,6 +44,7 @@ public interface AnotherFakeApi { @Operation( operationId = "call123testSpecialTags", summary = "To test special tags", + description = "To test special tags and operation ID starting with number", tags = { "$another-fake?" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeApi.java index f57640f366..5abf4cef7a 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeApi.java @@ -54,6 +54,7 @@ public interface FakeApi { @Operation( operationId = "createXmlItem", summary = "creates an XmlItem", + description = "this route creates an XmlItem", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation") @@ -78,6 +79,7 @@ public interface FakeApi { */ @Operation( operationId = "fakeOuterBooleanSerialize", + description = "Test serialization of outer boolean types", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output boolean", content = { @@ -104,6 +106,7 @@ public interface FakeApi { */ @Operation( operationId = "fakeOuterCompositeSerialize", + description = "Test serialization of object with outer number type", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output composite", content = { @@ -130,6 +133,7 @@ public interface FakeApi { */ @Operation( operationId = "fakeOuterNumberSerialize", + description = "Test serialization of outer number types", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output number", content = { @@ -156,6 +160,7 @@ public interface FakeApi { */ @Operation( operationId = "fakeOuterStringSerialize", + description = "Test serialization of outer string types", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output string", content = { @@ -182,6 +187,7 @@ public interface FakeApi { */ @Operation( operationId = "testBodyWithFileSchema", + description = "For this test, the body for this request much reference a schema named `File`.", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Success") @@ -232,6 +238,7 @@ public interface FakeApi { @Operation( operationId = "testClientModel", summary = "To test \"client\" model", + description = "To test \"client\" model", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -274,6 +281,7 @@ public interface FakeApi { @Operation( operationId = "testEndpointParameters", summary = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", + description = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", tags = { "fake" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid username supplied"), @@ -324,6 +332,7 @@ public interface FakeApi { @Operation( operationId = "testEnumParameters", summary = "To test enum parameters", + description = "To test enum parameters", tags = { "fake" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid request"), @@ -362,6 +371,7 @@ public interface FakeApi { @Operation( operationId = "testGroupParameters", summary = "Fake endpoint to test group parameters (optional)", + description = "Fake endpoint to test group parameters (optional)", tags = { "fake" }, responses = { @ApiResponse(responseCode = "400", description = "Something wrong") @@ -444,6 +454,7 @@ public interface FakeApi { */ @Operation( operationId = "testQueryParameterCollectionFormat", + description = "To test the collection format in query parameters", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Success") diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeClassnameTestApi.java index e2586f6f79..ef3d03dd5f 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/FakeClassnameTestApi.java @@ -44,6 +44,7 @@ public interface FakeClassnameTestApi { @Operation( operationId = "testClassname", summary = "To test class name in snake case", + description = "To test class name in snake case", tags = { "fake_classname_tags 123#$%^" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/PetApi.java index e4f09ff62f..dc4be98ac1 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/PetApi.java @@ -106,6 +106,7 @@ public interface PetApi { @Operation( operationId = "findPetsByStatus", summary = "Finds Pets by status", + description = "Multiple status values can be provided with comma separated strings", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -141,6 +142,7 @@ public interface PetApi { @Operation( operationId = "findPetsByTags", summary = "Finds Pets by tags", + description = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -175,6 +177,7 @@ public interface PetApi { @Operation( operationId = "getPetById", summary = "Find pet by ID", + description = "Returns a single pet", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/StoreApi.java index 7f4f5f24b5..a3ca817338 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/StoreApi.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/StoreApi.java @@ -46,6 +46,7 @@ public interface StoreApi { @Operation( operationId = "deleteOrder", summary = "Delete purchase order by ID", + description = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags = { "store" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -70,6 +71,7 @@ public interface StoreApi { @Operation( operationId = "getInventory", summary = "Returns pet inventories by status", + description = "Returns a map of status codes to quantities", tags = { "store" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -102,6 +104,7 @@ public interface StoreApi { @Operation( operationId = "getOrderById", summary = "Find purchase order by ID", + description = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", tags = { "store" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/UserApi.java index c3bf4cafe0..546d8f2cb6 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/UserApi.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/api/UserApi.java @@ -46,6 +46,7 @@ public interface UserApi { @Operation( operationId = "createUser", summary = "Create user", + description = "This can only be done by the logged in user.", tags = { "user" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation") @@ -117,6 +118,7 @@ public interface UserApi { @Operation( operationId = "deleteUser", summary = "Delete user", + description = "This can only be done by the logged in user.", tags = { "user" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid username supplied"), @@ -228,6 +230,7 @@ public interface UserApi { @Operation( operationId = "updateUser", summary = "Updated user", + description = "This can only be done by the logged in user.", tags = { "user" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid user supplied"), diff --git a/samples/server/petstore/spring-boot-nullable-set/src/main/java/org/openapitools/api/NullableApi.java b/samples/server/petstore/spring-boot-nullable-set/src/main/java/org/openapitools/api/NullableApi.java index b361abf3ba..9ac6887f54 100644 --- a/samples/server/petstore/spring-boot-nullable-set/src/main/java/org/openapitools/api/NullableApi.java +++ b/samples/server/petstore/spring-boot-nullable-set/src/main/java/org/openapitools/api/NullableApi.java @@ -48,6 +48,7 @@ public interface NullableApi { */ @Operation( operationId = "nullableTest", + description = "nullable test", responses = { @ApiResponse(responseCode = "204", description = "processed"), @ApiResponse(responseCode = "405", description = "Invalid input") diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/AnotherFakeApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/AnotherFakeApi.java index cb271de881..fbe25a65a5 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/AnotherFakeApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/AnotherFakeApi.java @@ -52,6 +52,7 @@ public interface AnotherFakeApi { @Operation( operationId = "call123testSpecialTags", summary = "To test special tags", + description = "To test special tags and operation ID starting with number", tags = { "$another-fake?" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java index 269695baca..a53e2dfbd5 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java @@ -62,6 +62,7 @@ public interface FakeApi { @Operation( operationId = "createXmlItem", summary = "creates an XmlItem", + description = "this route creates an XmlItem", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation") @@ -90,6 +91,7 @@ public interface FakeApi { @ApiVirtual @Operation( operationId = "fakeOuterBooleanSerialize", + description = "Test serialization of outer boolean types", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output boolean", content = { @@ -120,6 +122,7 @@ public interface FakeApi { @ApiVirtual @Operation( operationId = "fakeOuterCompositeSerialize", + description = "Test serialization of object with outer number type", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output composite", content = { @@ -159,6 +162,7 @@ public interface FakeApi { @ApiVirtual @Operation( operationId = "fakeOuterNumberSerialize", + description = "Test serialization of outer number types", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output number", content = { @@ -189,6 +193,7 @@ public interface FakeApi { @ApiVirtual @Operation( operationId = "fakeOuterStringSerialize", + description = "Test serialization of outer string types", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Output string", content = { @@ -219,6 +224,7 @@ public interface FakeApi { @ApiVirtual @Operation( operationId = "testBodyWithFileSchema", + description = "For this test, the body for this request much reference a schema named `File`.", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Success") @@ -277,6 +283,7 @@ public interface FakeApi { @Operation( operationId = "testClientModel", summary = "To test \"client\" model", + description = "To test \"client\" model", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -332,6 +339,7 @@ public interface FakeApi { @Operation( operationId = "testEndpointParameters", summary = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", + description = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", tags = { "fake" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid username supplied"), @@ -386,6 +394,7 @@ public interface FakeApi { @Operation( operationId = "testEnumParameters", summary = "To test enum parameters", + description = "To test enum parameters", tags = { "fake" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid request"), @@ -428,6 +437,7 @@ public interface FakeApi { @Operation( operationId = "testGroupParameters", summary = "Fake endpoint to test group parameters (optional)", + description = "Fake endpoint to test group parameters (optional)", tags = { "fake" }, responses = { @ApiResponse(responseCode = "400", description = "Something wrong") @@ -522,6 +532,7 @@ public interface FakeApi { @ApiVirtual @Operation( operationId = "testQueryParameterCollectionFormat", + description = "To test the collection format in query parameters", tags = { "fake" }, responses = { @ApiResponse(responseCode = "200", description = "Success") diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeClassnameTestApi.java index a95cbe23b7..0d1d1c09a7 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeClassnameTestApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeClassnameTestApi.java @@ -52,6 +52,7 @@ public interface FakeClassnameTestApi { @Operation( operationId = "testClassname", summary = "To test class name in snake case", + description = "To test class name in snake case", tags = { "fake_classname_tags 123#$%^" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApi.java index e37f6b77f6..c272973742 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApi.java @@ -122,6 +122,7 @@ public interface PetApi { @Operation( operationId = "findPetsByStatus", summary = "Finds Pets by status", + description = "Multiple status values can be provided with comma separated strings", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -175,6 +176,7 @@ public interface PetApi { @Operation( operationId = "findPetsByTags", summary = "Finds Pets by tags", + description = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -227,6 +229,7 @@ public interface PetApi { @Operation( operationId = "getPetById", summary = "Find pet by ID", + description = "Returns a single pet", tags = { "pet" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java index 4239e75c31..355a3546e3 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java @@ -54,6 +54,7 @@ public interface StoreApi { @Operation( operationId = "deleteOrder", summary = "Delete purchase order by ID", + description = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", tags = { "store" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid ID supplied"), @@ -82,6 +83,7 @@ public interface StoreApi { @Operation( operationId = "getInventory", summary = "Returns pet inventories by status", + description = "Returns a map of status codes to quantities", tags = { "store" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { @@ -118,6 +120,7 @@ public interface StoreApi { @Operation( operationId = "getOrderById", summary = "Find purchase order by ID", + description = "For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions", tags = { "store" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation", content = { diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java index e9dfc2dcfb..580325ba4f 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java @@ -54,6 +54,7 @@ public interface UserApi { @Operation( operationId = "createUser", summary = "Create user", + description = "This can only be done by the logged in user.", tags = { "user" }, responses = { @ApiResponse(responseCode = "200", description = "successful operation") @@ -137,6 +138,7 @@ public interface UserApi { @Operation( operationId = "deleteUser", summary = "Delete user", + description = "This can only be done by the logged in user.", tags = { "user" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid username supplied"), @@ -278,6 +280,7 @@ public interface UserApi { @Operation( operationId = "updateUser", summary = "Updated user", + description = "This can only be done by the logged in user.", tags = { "user" }, responses = { @ApiResponse(responseCode = "400", description = "Invalid user supplied"), From 90a8b4effbae368fd9d78b98e254719f37c43db1 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Fri, 25 Nov 2022 15:01:02 +0800 Subject: [PATCH 049/189] [PHP] better PHP symfony test (#14117) * better php symfony test * trigger build failure * Revert "trigger build failure" This reverts commit ed7a57ead2726705fe733a7027717b864810843f. * update samples --- .github/workflows/samples-php8.yaml | 4 +- .../php-symfony-SymfonyBundle-php.yaml | 2 +- .../resources/3_0/php-symfony/petstore.yaml | 745 ++++++++++++++++++ .../.openapi-generator/FILES | 2 + .../Model/EnumStringModel.php | 55 ++ .../php-symfony/SymfonyBundle-php/README.md | 1 + .../Tests/Model/EnumStringModelTest.php | 87 ++ .../docs/Model/EnumStringModel.md | 9 + 8 files changed, 902 insertions(+), 3 deletions(-) create mode 100644 modules/openapi-generator/src/test/resources/3_0/php-symfony/petstore.yaml create mode 100644 samples/server/petstore/php-symfony/SymfonyBundle-php/Model/EnumStringModel.php create mode 100644 samples/server/petstore/php-symfony/SymfonyBundle-php/Tests/Model/EnumStringModelTest.php create mode 100644 samples/server/petstore/php-symfony/SymfonyBundle-php/docs/Model/EnumStringModel.md diff --git a/.github/workflows/samples-php8.yaml b/.github/workflows/samples-php8.yaml index 18c279bc3c..b9bb97a33d 100644 --- a/.github/workflows/samples-php8.yaml +++ b/.github/workflows/samples-php8.yaml @@ -3,10 +3,10 @@ name: Samples PHP 8.x on: push: paths: - - samples/server/petstore/php-symfony/SymfonyBundle-php/ + - samples/server/petstore/php-symfony/SymfonyBundle-php/** pull_request: paths: - - samples/server/petstore/php-symfony/SymfonyBundle-php/ + - samples/server/petstore/php-symfony/SymfonyBundle-php/** jobs: build: name: Build PHP projects diff --git a/bin/configs/php-symfony-SymfonyBundle-php.yaml b/bin/configs/php-symfony-SymfonyBundle-php.yaml index 45871b6da2..3d6c3b7edc 100644 --- a/bin/configs/php-symfony-SymfonyBundle-php.yaml +++ b/bin/configs/php-symfony-SymfonyBundle-php.yaml @@ -1,6 +1,6 @@ generatorName: php-symfony outputDir: samples/server/petstore/php-symfony/SymfonyBundle-php -inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +inputSpec: modules/openapi-generator/src/test/resources/3_0/php-symfony/petstore.yaml templateDir: modules/openapi-generator/src/main/resources/php-symfony gitUserId: openapitools gitRepoId: petstore diff --git a/modules/openapi-generator/src/test/resources/3_0/php-symfony/petstore.yaml b/modules/openapi-generator/src/test/resources/3_0/php-symfony/petstore.yaml new file mode 100644 index 0000000000..28b3ff13a3 --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/php-symfony/petstore.yaml @@ -0,0 +1,745 @@ +openapi: 3.0.0 +servers: + - url: 'http://petstore.swagger.io/v2' +info: + description: >- + This is a sample server Petstore server. For this sample, you can use the api key + `special-key` to test the authorization filters. + version: 1.0.0 + title: OpenAPI Petstore + license: + name: Apache-2.0 + url: 'https://www.apache.org/licenses/LICENSE-2.0.html' +tags: + - name: pet + description: Everything about your Pets + - name: store + description: Access to Petstore orders + - name: user + description: Operations about user +paths: + /pet: + post: + tags: + - pet + summary: Add a new pet to the store + description: '' + operationId: addPet + responses: + '200': + description: successful operation + content: + application/xml: + schema: + $ref: '#/components/schemas/Pet' + application/json: + schema: + $ref: '#/components/schemas/Pet' + '405': + description: Invalid input + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + requestBody: + $ref: '#/components/requestBodies/Pet' + put: + tags: + - pet + summary: Update an existing pet + description: '' + operationId: updatePet + responses: + '200': + description: successful operation + content: + application/xml: + schema: + $ref: '#/components/schemas/Pet' + application/json: + schema: + $ref: '#/components/schemas/Pet' + '400': + description: Invalid ID supplied + '404': + description: Pet not found + '405': + description: Validation exception + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + requestBody: + $ref: '#/components/requestBodies/Pet' + /pet/findByStatus: + get: + tags: + - pet + summary: Finds Pets by status + description: Multiple status values can be provided with comma separated strings + operationId: findPetsByStatus + parameters: + - name: status + in: query + description: Status values that need to be considered for filter + required: true + style: form + explode: false + deprecated: true + schema: + type: array + items: + type: string + enum: + - available + - pending + - sold + default: available + responses: + '200': + description: successful operation + content: + application/xml: + schema: + type: array + items: + $ref: '#/components/schemas/Pet' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Pet' + '400': + description: Invalid status value + security: + - petstore_auth: + - 'read:pets' + /pet/findByTags: + get: + tags: + - pet + summary: Finds Pets by tags + description: >- + Multiple tags can be provided with comma separated strings. Use tag1, + tag2, tag3 for testing. + operationId: findPetsByTags + parameters: + - name: tags + in: query + description: Tags to filter by + required: true + style: form + explode: false + schema: + type: array + items: + type: string + responses: + '200': + description: successful operation + content: + application/xml: + schema: + type: array + items: + $ref: '#/components/schemas/Pet' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Pet' + '400': + description: Invalid tag value + security: + - petstore_auth: + - 'read:pets' + deprecated: true + '/pet/{petId}': + get: + tags: + - pet + summary: Find pet by ID + description: Returns a single pet + operationId: getPetById + parameters: + - name: petId + in: path + description: ID of pet to return + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: successful operation + content: + application/xml: + schema: + $ref: '#/components/schemas/Pet' + application/json: + schema: + $ref: '#/components/schemas/Pet' + '400': + description: Invalid ID supplied + '404': + description: Pet not found + security: + - api_key: [] + post: + tags: + - pet + summary: Updates a pet in the store with form data + description: '' + operationId: updatePetWithForm + parameters: + - name: petId + in: path + description: ID of pet that needs to be updated + required: true + schema: + type: integer + format: int64 + responses: + '405': + description: Invalid input + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + name: + description: Updated name of the pet + type: string + status: + description: Updated status of the pet + type: string + delete: + tags: + - pet + summary: Deletes a pet + description: '' + operationId: deletePet + parameters: + - name: api_key + in: header + required: false + schema: + type: string + - name: petId + in: path + description: Pet id to delete + required: true + schema: + type: integer + format: int64 + responses: + '400': + description: Invalid pet value + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + '/pet/{petId}/uploadImage': + post: + tags: + - pet + summary: uploads an image + description: '' + operationId: uploadFile + parameters: + - name: petId + in: path + description: ID of pet to update + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + file: + description: file to upload + type: string + format: binary + /store/inventory: + get: + tags: + - store + summary: Returns pet inventories by status + description: Returns a map of status codes to quantities + operationId: getInventory + responses: + '200': + description: successful operation + content: + application/json: + schema: + type: object + additionalProperties: + type: integer + format: int32 + security: + - api_key: [] + /store/order: + post: + tags: + - store + summary: Place an order for a pet + description: '' + operationId: placeOrder + responses: + '200': + description: successful operation + content: + application/xml: + schema: + $ref: '#/components/schemas/Order' + application/json: + schema: + $ref: '#/components/schemas/Order' + '400': + description: Invalid Order + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Order' + description: order placed for purchasing the pet + required: true + '/store/order/{orderId}': + get: + tags: + - store + summary: Find purchase order by ID + description: >- + For valid response try integer IDs with value <= 5 or > 10. Other values + will generate exceptions + operationId: getOrderById + parameters: + - name: orderId + in: path + description: ID of pet that needs to be fetched + required: true + schema: + type: integer + format: int64 + minimum: 1 + maximum: 5 + responses: + '200': + description: successful operation + content: + application/xml: + schema: + $ref: '#/components/schemas/Order' + application/json: + schema: + $ref: '#/components/schemas/Order' + '400': + description: Invalid ID supplied + '404': + description: Order not found + delete: + tags: + - store + summary: Delete purchase order by ID + description: >- + For valid response try integer IDs with value < 1000. Anything above + 1000 or nonintegers will generate API errors + operationId: deleteOrder + parameters: + - name: orderId + in: path + description: ID of the order that needs to be deleted + required: true + schema: + type: string + responses: + '400': + description: Invalid ID supplied + '404': + description: Order not found + /user: + post: + tags: + - user + summary: Create user + description: This can only be done by the logged in user. + operationId: createUser + responses: + default: + description: successful operation + security: + - api_key: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/User' + description: Created user object + required: true + /user/createWithArray: + post: + tags: + - user + summary: Creates list of users with given input array + description: '' + operationId: createUsersWithArrayInput + responses: + default: + description: successful operation + security: + - api_key: [] + requestBody: + $ref: '#/components/requestBodies/UserArray' + /user/createWithList: + post: + tags: + - user + summary: Creates list of users with given input array + description: '' + operationId: createUsersWithListInput + responses: + default: + description: successful operation + security: + - api_key: [] + requestBody: + $ref: '#/components/requestBodies/UserArray' + /user/login: + get: + tags: + - user + summary: Logs user into the system + description: '' + operationId: loginUser + parameters: + - name: username + in: query + description: The user name for login + required: true + schema: + type: string + pattern: '^[a-zA-Z0-9]+[a-zA-Z0-9\.\-_]*[a-zA-Z0-9]+$' + - name: password + in: query + description: The password for login in clear text + required: true + schema: + type: string + responses: + '200': + description: successful operation + headers: + Set-Cookie: + description: >- + Cookie authentication key for use with the `api_key` + apiKey authentication. + schema: + type: string + example: AUTH_KEY=abcde12345; Path=/; HttpOnly + X-Rate-Limit: + description: calls per hour allowed by the user + schema: + type: integer + format: int32 + X-Expires-After: + description: date in UTC when token expires + schema: + type: string + format: date-time + content: + application/xml: + schema: + type: string + application/json: + schema: + type: string + '400': + description: Invalid username/password supplied + /user/logout: + get: + tags: + - user + summary: Logs out current logged in user session + description: '' + operationId: logoutUser + responses: + default: + description: successful operation + security: + - api_key: [] + '/user/{username}': + get: + tags: + - user + summary: Get user by user name + description: '' + operationId: getUserByName + parameters: + - name: username + in: path + description: The name that needs to be fetched. Use user1 for testing. + required: true + schema: + type: string + responses: + '200': + description: successful operation + content: + application/xml: + schema: + $ref: '#/components/schemas/User' + application/json: + schema: + $ref: '#/components/schemas/User' + '400': + description: Invalid username supplied + '404': + description: User not found + put: + tags: + - user + summary: Updated user + description: This can only be done by the logged in user. + operationId: updateUser + parameters: + - name: username + in: path + description: name that need to be deleted + required: true + schema: + type: string + responses: + '400': + description: Invalid user supplied + '404': + description: User not found + security: + - api_key: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/User' + description: Updated user object + required: true + delete: + tags: + - user + summary: Delete user + description: This can only be done by the logged in user. + operationId: deleteUser + parameters: + - name: username + in: path + description: The name that needs to be deleted + required: true + schema: + type: string + responses: + '400': + description: Invalid username supplied + '404': + description: User not found + security: + - api_key: [] +externalDocs: + description: Find out more about Swagger + url: 'http://swagger.io' +components: + requestBodies: + UserArray: + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/User' + description: List of user object + required: true + Pet: + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store + required: true + securitySchemes: + petstore_auth: + type: oauth2 + flows: + implicit: + authorizationUrl: 'http://petstore.swagger.io/api/oauth/dialog' + scopes: + 'write:pets': modify pets in your account + 'read:pets': read your pets + api_key: + type: apiKey + name: api_key + in: header + schemas: + Order: + title: Pet Order + description: An order for a pets from the pet store + type: object + properties: + id: + type: integer + format: int64 + petId: + type: integer + format: int64 + quantity: + type: integer + format: int32 + shipDate: + type: string + format: date-time + status: + type: string + description: Order Status + enum: + - placed + - approved + - delivered + complete: + type: boolean + default: false + xml: + name: Order + Category: + title: Pet category + description: A category for a pet + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + pattern: '^[a-zA-Z0-9]+[a-zA-Z0-9\.\-_]*[a-zA-Z0-9]+$' + xml: + name: Category + User: + title: a User + description: A User who is purchasing from the pet store + type: object + properties: + id: + type: integer + format: int64 + username: + type: string + firstName: + type: string + lastName: + type: string + email: + type: string + password: + type: string + phone: + type: string + userStatus: + type: integer + format: int32 + description: User Status + xml: + name: User + Tag: + title: Pet Tag + description: A tag for a pet + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + xml: + name: Tag + Pet: + title: a Pet + description: A pet for sale in the pet store + type: object + required: + - name + - photoUrls + properties: + id: + type: integer + format: int64 + category: + $ref: '#/components/schemas/Category' + name: + type: string + example: doggie + photoUrls: + type: array + xml: + name: photoUrl + wrapped: true + items: + type: string + tags: + type: array + xml: + name: tag + wrapped: true + items: + $ref: '#/components/schemas/Tag' + status: + type: string + description: pet status in the store + deprecated: true + enum: + - available + - pending + - sold + xml: + name: Pet + ApiResponse: + title: An uploaded response + description: Describes the result of uploading an image resource + type: object + properties: + code: + type: integer + format: int32 + type: + type: string + message: + type: string + EnumStringModel: + type: string + description: enum model + enum: + - available + - pending + - sold 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 e1b272ff1e..9d2321185f 100644 --- a/samples/server/petstore/php-symfony/SymfonyBundle-php/.openapi-generator/FILES +++ b/samples/server/petstore/php-symfony/SymfonyBundle-php/.openapi-generator/FILES @@ -14,6 +14,7 @@ DependencyInjection/Compiler/OpenAPIServerApiPass.php DependencyInjection/OpenAPIServerExtension.php Model/ApiResponse.php Model/Category.php +Model/EnumStringModel.php Model/Order.php Model/Pet.php Model/Tag.php @@ -39,6 +40,7 @@ docs/Api/StoreApiInterface.md docs/Api/UserApiInterface.md docs/Model/ApiResponse.md docs/Model/Category.md +docs/Model/EnumStringModel.md docs/Model/Order.md docs/Model/Pet.md docs/Model/Tag.md diff --git a/samples/server/petstore/php-symfony/SymfonyBundle-php/Model/EnumStringModel.php b/samples/server/petstore/php-symfony/SymfonyBundle-php/Model/EnumStringModel.php new file mode 100644 index 0000000000..c2bffa5852 --- /dev/null +++ b/samples/server/petstore/php-symfony/SymfonyBundle-php/Model/EnumStringModel.php @@ -0,0 +1,55 @@ +object = $this->getMockBuilder(EnumStringModel::class)->getMockForAbstractClass(); + } + + /** + * Clean up after running each test case + */ + public function tearDown(): void + { + } + + /** + * Clean up after running all test cases + */ + public static function tearDownAfterClass(): void + { + } + + /** + * @group integration + * @small + */ + public function testTestClassExists(): void + { + $this->assertTrue(class_exists(EnumStringModel::class)); + $this->assertInstanceOf(EnumStringModel::class, $this->object); + } +} diff --git a/samples/server/petstore/php-symfony/SymfonyBundle-php/docs/Model/EnumStringModel.md b/samples/server/petstore/php-symfony/SymfonyBundle-php/docs/Model/EnumStringModel.md new file mode 100644 index 0000000000..4c48cdd565 --- /dev/null +++ b/samples/server/petstore/php-symfony/SymfonyBundle-php/docs/Model/EnumStringModel.md @@ -0,0 +1,9 @@ +# EnumStringModel + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + From f9d4d28f48d236e4c3fb69ace7d2eb0e2e3e5a1c Mon Sep 17 00:00:00 2001 From: DmitryKubahov Date: Fri, 25 Nov 2022 08:28:18 +0100 Subject: [PATCH 050/189] [Micronaut] Improving micronaut-model and micronaut-client generation (#14065) * fix documentation * improve build.gradle.mustache and pom.xml.mustache to assume different serialization libs jackson or micronaut-serde-jackson * improve pojo.mustache to skip generating @JsonDeserialize as for micronaut-serde-jackson * improve model generating by removing visible flag from @JsonTypeInfo as it is not supported by micronaut-serde-jackson Co-authored-by: dmitry.kubakhov --- docs/generators/java-micronaut-client.md | 2 + docs/generators/java-micronaut-server.md | 1 + .../JavaMicronautAbstractCodegen.java | 28 +++++++++- .../languages/JavaMicronautClientCodegen.java | 16 ++++++ .../java-micronaut/client/api.mustache | 3 ++ .../gradle/build.gradle.mustache | 13 +++++ .../common/configuration/pom.xml.mustache | 25 +++++++++ .../common/model/jackson_annotations.mustache | 18 +++++-- .../java-micronaut/common/model/pojo.mustache | 7 ++- .../common/model/typeInfoAnnotation.mustache | 17 ++++++ ...ClientCodegenSerializationLibraryTest.java | 53 +++++++++++++++++++ .../micronaut/MicronautClientCodegenTest.java | 12 +++++ 12 files changed, 188 insertions(+), 7 deletions(-) create mode 100644 modules/openapi-generator/src/test/java/org/openapitools/codegen/java/micronaut/JavaMicronautClientCodegenSerializationLibraryTest.java diff --git a/docs/generators/java-micronaut-client.md b/docs/generators/java-micronaut-client.md index bf0e245cae..e15a6437b5 100644 --- a/docs/generators/java-micronaut-client.md +++ b/docs/generators/java-micronaut-client.md @@ -18,6 +18,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | +|additionalClientTypeAnnotations|Additional annotations for client type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| |additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null| |additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| |additionalOneOfTypeAnnotations|Additional annotations for oneOf interfaces(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null| @@ -70,6 +71,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false| +|serializationLibrary|Serialization library for model|
**jackson**
Jackson as serialization library
**micronaut_serde_jackson**
Use micronaut-serialization with Jackson annotations
|jackson| |snapshotVersion|Uses a SNAPSHOT version.|
**true**
Use a SnapShot Version
**false**
Use a Release Version
|null| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| diff --git a/docs/generators/java-micronaut-server.md b/docs/generators/java-micronaut-server.md index d0ccd44dbb..cce9d87d4e 100644 --- a/docs/generators/java-micronaut-server.md +++ b/docs/generators/java-micronaut-server.md @@ -72,6 +72,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| |serializableModel|boolean - toggle "implements Serializable" for generated models| |false| +|serializationLibrary|Serialization library for model|
**jackson**
Jackson as serialization library
**micronaut_serde_jackson**
Use micronaut-serialization with Jackson annotations
|jackson| |snapshotVersion|Uses a SNAPSHOT version.|
**true**
Use a SnapShot Version
**false**
Use a Release Version
|null| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| |sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaMicronautAbstractCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaMicronautAbstractCodegen.java index e90fcfd5d6..e169a653e8 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaMicronautAbstractCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaMicronautAbstractCodegen.java @@ -53,6 +53,7 @@ public abstract class JavaMicronautAbstractCodegen extends AbstractJavaCodegen i public static final String OPT_GENERATE_SWAGGER_ANNOTATIONS_TRUE = "true"; public static final String OPT_GENERATE_SWAGGER_ANNOTATIONS_FALSE = "false"; public static final String OPT_GENERATE_OPERATION_ONLY_FOR_FIRST_TAG = "generateOperationOnlyForFirstTag"; + public enum SERIALIZATION_LIBRARY_TYPE {jackson, micronaut_serde_jackson} protected final Logger LOGGER = LoggerFactory.getLogger(JavaMicronautAbstractCodegen.class); @@ -69,6 +70,7 @@ public abstract class JavaMicronautAbstractCodegen extends AbstractJavaCodegen i protected String appName; protected String generateSwaggerAnnotations; protected boolean generateOperationOnlyForFirstTag; + protected String serializationLibrary = SERIALIZATION_LIBRARY_TYPE.jackson.name(); public static final String CONTENT_TYPE_APPLICATION_FORM_URLENCODED = "application/x-www-form-urlencoded"; public static final String CONTENT_TYPE_APPLICATION_JSON = "application/json"; @@ -123,7 +125,6 @@ public abstract class JavaMicronautAbstractCodegen extends AbstractJavaCodegen i ); // Set additional properties - additionalProperties.put("jackson", "true"); additionalProperties.put("openbrace", "{"); additionalProperties.put("closebrace", "}"); @@ -180,6 +181,14 @@ public abstract class JavaMicronautAbstractCodegen extends AbstractJavaCodegen i opt.setEnum(valuesEnum); }); + final CliOption serializationLibraryOpt = CliOption.newString(CodegenConstants.SERIALIZATION_LIBRARY, "Serialization library for model"); + serializationLibraryOpt.defaultValue(SERIALIZATION_LIBRARY_TYPE.jackson.name()); + Map serializationLibraryOptions = new HashMap<>(); + serializationLibraryOptions.put(SERIALIZATION_LIBRARY_TYPE.jackson.name(), "Jackson as serialization library"); + serializationLibraryOptions.put(SERIALIZATION_LIBRARY_TYPE.micronaut_serde_jackson.name(), "Use micronaut-serialization with Jackson annotations"); + serializationLibraryOpt.setEnum(serializationLibraryOptions); + cliOptions.add(serializationLibraryOpt); + // Add reserved words String[] reservedWordsArray = { "client", "format", "queryvalue", "queryparam", "pathvariable", "header", "cookie", @@ -305,6 +314,11 @@ public abstract class JavaMicronautAbstractCodegen extends AbstractJavaCodegen i additionalProperties.put("generateSwagger2Annotations", true); } + if (additionalProperties.containsKey(CodegenConstants.SERIALIZATION_LIBRARY)) { + setSerializationLibrary((String) additionalProperties.get(CodegenConstants.SERIALIZATION_LIBRARY)); + } + additionalProperties.put(this.serializationLibrary, true); + // Add all the supporting files String resourceFolder = projectFolder + "/resources"; supportingFiles.add(new SupportingFile("common/configuration/application.yml.mustache", resourceFolder, "application.yml").doNotOverwrite()); @@ -710,4 +724,16 @@ public abstract class JavaMicronautAbstractCodegen extends AbstractJavaCodegen i writer.write(fragment.execute().replace('.', '_')); } } + + public void setSerializationLibrary(final String serializationLibrary) { + try { + this.serializationLibrary = JavaMicronautAbstractCodegen.SERIALIZATION_LIBRARY_TYPE.valueOf(serializationLibrary).name(); + } catch (IllegalArgumentException ex) { + StringBuilder sb = new StringBuilder(serializationLibrary + " is an invalid enum property naming option. Please choose from:"); + for (JavaMicronautAbstractCodegen.SERIALIZATION_LIBRARY_TYPE availableSerializationLibrary : JavaMicronautAbstractCodegen.SERIALIZATION_LIBRARY_TYPE.values()) { + sb.append("\n ").append(availableSerializationLibrary.name()); + } + throw new RuntimeException(sb.toString()); + } + } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaMicronautClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaMicronautClientCodegen.java index 6a530c3af5..9e8d2140fd 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaMicronautClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaMicronautClientCodegen.java @@ -1,5 +1,8 @@ package org.openapitools.codegen.languages; +import java.util.Arrays; +import java.util.List; + import org.openapitools.codegen.CliOption; import org.openapitools.codegen.CodegenType; import org.openapitools.codegen.SupportingFile; @@ -10,10 +13,12 @@ import org.openapitools.codegen.meta.Stability; public class JavaMicronautClientCodegen extends JavaMicronautAbstractCodegen { public static final String OPT_CONFIGURE_AUTH = "configureAuth"; + public static final String ADDITIONAL_CLIENT_TYPE_ANNOTATIONS = "additionalClientTypeAnnotations"; public static final String NAME = "java-micronaut-client"; protected boolean configureAuthorization; + protected List additionalClientTypeAnnotations; public JavaMicronautClientCodegen() { super(); @@ -27,6 +32,7 @@ public class JavaMicronautClientCodegen extends JavaMicronautAbstractCodegen { additionalProperties.put("client", "true"); cliOptions.add(CliOption.newBoolean(OPT_CONFIGURE_AUTH, "Configure all the authorization methods as specified in the file", configureAuthorization)); + cliOptions.add(CliOption.newString(ADDITIONAL_CLIENT_TYPE_ANNOTATIONS, "Additional annotations for client type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)")); } @Override @@ -75,6 +81,12 @@ public class JavaMicronautClientCodegen extends JavaMicronautAbstractCodegen { supportingFiles.add(new SupportingFile("client/auth/configuration/HttpBasicAuthConfiguration.mustache", authConfigurationFolder, "HttpBasicAuthConfiguration.java")); } + if (additionalProperties.containsKey(ADDITIONAL_CLIENT_TYPE_ANNOTATIONS)) { + String additionalClientAnnotationsList = additionalProperties.get(ADDITIONAL_CLIENT_TYPE_ANNOTATIONS).toString(); + this.setAdditionalClientTypeAnnotations(Arrays.asList(additionalClientAnnotationsList.trim().split("\\s*(;|\\r?\\n)\\s*"))); + additionalProperties.put(ADDITIONAL_CLIENT_TYPE_ANNOTATIONS, additionalClientTypeAnnotations); + } + // Api file apiTemplateFiles.clear(); apiTemplateFiles.put("client/api.mustache", ".java"); @@ -93,4 +105,8 @@ public class JavaMicronautClientCodegen extends JavaMicronautAbstractCodegen { apiDocTemplateFiles.clear(); apiDocTemplateFiles.put("client/doc/api_doc.mustache", ".md"); } + + public void setAdditionalClientTypeAnnotations(final List additionalClientTypeAnnotations) { + this.additionalClientTypeAnnotations = additionalClientTypeAnnotations; + } } diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/client/api.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/client/api.mustache index 22bc78e27b..30e4b839ab 100644 --- a/modules/openapi-generator/src/main/resources/java-micronaut/client/api.mustache +++ b/modules/openapi-generator/src/main/resources/java-micronaut/client/api.mustache @@ -41,6 +41,9 @@ import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.security.SecurityRequirement; {{/generateSwagger2Annotations}} +{{#additionalClientTypeAnnotations}} + {{{.}}} +{{/additionalClientTypeAnnotations}} {{>common/generatedAnnotation}} @Client("${{openbrace}}{{{applicationName}}}-base-path{{closebrace}}") public interface {{classname}} { diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/gradle/build.gradle.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/gradle/build.gradle.mustache index 5f6fbfd00e..341fce57ab 100644 --- a/modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/gradle/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/gradle/build.gradle.mustache @@ -33,6 +33,10 @@ dependencies { {{#useAuth}} annotationProcessor("io.micronaut.security:micronaut-security-annotations") {{/useAuth}} + {{#micronaut_serde_jackson}} + annotationProcessor("io.micronaut.serde:micronaut-serde-processor") + implementation("io.micronaut.serde:micronaut-serde-jackson") + {{/micronaut_serde_jackson}} implementation("io.micronaut:micronaut-http-client") implementation("io.micronaut:micronaut-runtime") implementation("io.micronaut:micronaut-validation") @@ -51,6 +55,15 @@ dependencies { {{/generateSwagger2Annotations}} runtimeOnly("ch.qos.logback:logback-classic") } +{{#micronaut_serde_jackson}} +// TODO Please, check the version of the serde, maybe it must be upgraded. +configurations.all { + resolutionStrategy.dependencySubstitution { + substitute(module("io.micronaut:micronaut-jackson-databind")) + .using(module("io.micronaut.serde:micronaut-serde-jackson:1.3.3")) + } +} +{{/micronaut_serde_jackson}} // TODO Set the main class application { diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/pom.xml.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/pom.xml.mustache index e8da59a73f..4985d6a6b6 100644 --- a/modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/pom.xml.mustache +++ b/modules/openapi-generator/src/main/resources/java-micronaut/common/configuration/pom.xml.mustache @@ -141,6 +141,24 @@ ${swagger-annotations-version} {{/generateSwagger2Annotations}} + {{#micronaut_serde_jackson}} + + io.micronaut + micronaut-runtime + compile + + + io.micronaut + micronaut-jackson-databind + + + + + io.micronaut.serde + micronaut-serde-jackson + compile + + {{/micronaut_serde_jackson}} @@ -170,6 +188,13 @@ ${micronaut.security.version} {{/useAuth}} + {{#micronaut_serde_jackson}} + + io.micronaut.serde + micronaut-serde-processor + ${micronaut.serialization.version} + + {{/micronaut_serde_jackson}} -Amicronaut.processing.group={{groupId}} diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/common/model/jackson_annotations.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/common/model/jackson_annotations.mustache index 30e167e737..41afad0028 100644 --- a/modules/openapi-generator/src/main/resources/java-micronaut/common/model/jackson_annotations.mustache +++ b/modules/openapi-generator/src/main/resources/java-micronaut/common/model/jackson_annotations.mustache @@ -18,9 +18,19 @@ {{/isXmlWrapped}} {{/isContainer}} {{/withXml}} - {{#isDateTime}} + {{#jackson}} + {{#isDateTime}} @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "{{{datetimeFormat}}}") - {{/isDateTime}} - {{#isDate}} + {{/isDateTime}} + {{#isDate}} @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "{{{dateFormat}}}") - {{/isDate}} \ No newline at end of file + {{/isDate}} + {{/jackson}} + {{#micronaut_serde_jackson}} + {{#isDateTime}} + @JsonFormat(pattern = "{{{datetimeFormat}}}") + {{/isDateTime}} + {{#isDate}} + @JsonFormat(pattern = "{{{dateFormat}}}") + {{/isDate}} + {{/micronaut_serde_jackson}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/common/model/pojo.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/common/model/pojo.mustache index 8292f413b2..b9d6067351 100644 --- a/modules/openapi-generator/src/main/resources/java-micronaut/common/model/pojo.mustache +++ b/modules/openapi-generator/src/main/resources/java-micronaut/common/model/pojo.mustache @@ -9,6 +9,9 @@ @Schema({{#name}}name = "{{name}}", {{/name}}description = "{{{description}}}") {{/generateSwagger2Annotations}} {{/description}} +{{#micronaut_serde_jackson}} +@io.micronaut.serde.annotation.Serdeable +{{/micronaut_serde_jackson}} {{#jackson}} @JsonPropertyOrder({ {{#vars}} @@ -236,8 +239,8 @@ Declare the class with extends and implements {{^isReadOnly}} {{#jackson}} {{^vendorExtensions.x-is-jackson-optional-nullable}} -{{>common/model/jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{/jackson}}{{#vendorExtensions.x-setter-extra-annotation}} {{{vendorExtensions.x-setter-extra-annotation}}} -{{/vendorExtensions.x-setter-extra-annotation}} public void {{setter}}({{{datatypeWithEnum}}} {{name}}) { +{{>common/model/jackson_annotations}}{{/vendorExtensions.x-is-jackson-optional-nullable}}{{#vendorExtensions.x-setter-extra-annotation}} {{{vendorExtensions.x-setter-extra-annotation}}} +{{/vendorExtensions.x-setter-extra-annotation}}{{/jackson}} public void {{setter}}({{{datatypeWithEnum}}} {{name}}) { {{#vendorExtensions.x-is-jackson-optional-nullable}} this.{{name}} = JsonNullable.<{{{datatypeWithEnum}}}>of({{name}}); {{/vendorExtensions.x-is-jackson-optional-nullable}} diff --git a/modules/openapi-generator/src/main/resources/java-micronaut/common/model/typeInfoAnnotation.mustache b/modules/openapi-generator/src/main/resources/java-micronaut/common/model/typeInfoAnnotation.mustache index c833321ebf..42f63ee9ae 100644 --- a/modules/openapi-generator/src/main/resources/java-micronaut/common/model/typeInfoAnnotation.mustache +++ b/modules/openapi-generator/src/main/resources/java-micronaut/common/model/typeInfoAnnotation.mustache @@ -15,3 +15,20 @@ {{/-last}} {{/discriminator.mappedModels}} {{/jackson}} +{{#micronaut_serde_jackson}} + +@JsonIgnoreProperties( + value = "{{{discriminator.propertyBaseName}}}", // ignore manually set {{{discriminator.propertyBaseName}}}, it will be automatically generated by Jackson during serialization + allowSetters = true // allows the {{{discriminator.propertyBaseName}}} to be set during deserialization +) +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "{{{discriminator.propertyBaseName}}}") +{{#discriminator.mappedModels}} +{{#-first}} +@JsonSubTypes({ +{{/-first}} + @JsonSubTypes.Type(value = {{modelName}}.class, name = "{{^vendorExtensions.x-discriminator-value}}{{mappingName}}{{/vendorExtensions.x-discriminator-value}}{{#vendorExtensions.x-discriminator-value}}{{{vendorExtensions.x-discriminator-value}}}{{/vendorExtensions.x-discriminator-value}}"), +{{#-last}} +}) +{{/-last}} +{{/discriminator.mappedModels}} +{{/micronaut_serde_jackson}} diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/micronaut/JavaMicronautClientCodegenSerializationLibraryTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/micronaut/JavaMicronautClientCodegenSerializationLibraryTest.java new file mode 100644 index 0000000000..77569fcb5e --- /dev/null +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/micronaut/JavaMicronautClientCodegenSerializationLibraryTest.java @@ -0,0 +1,53 @@ +package org.openapitools.codegen.java.micronaut; + +import org.openapitools.codegen.CodegenConstants; +import org.openapitools.codegen.languages.JavaMicronautAbstractCodegen; +import org.openapitools.codegen.languages.JavaMicronautClientCodegen; +import org.testng.annotations.Test; + +public class JavaMicronautClientCodegenSerializationLibraryTest extends AbstractMicronautCodegenTest { + + @Test + public void testSerializationLibraryJackson() { + JavaMicronautClientCodegen codegen = new JavaMicronautClientCodegen(); + codegen.additionalProperties().put(CodegenConstants.SERIALIZATION_LIBRARY, JavaMicronautAbstractCodegen.SERIALIZATION_LIBRARY_TYPE.jackson.name()); + String outputPath = generateFiles(codegen, PETSTORE_PATH, + CodegenConstants.MODELS); + + // Model does not contain micronaut serde annotation + String micronautSerDeAnnotation = "@io.micronaut.serde.annotation.Serdeable"; + String modelPath = outputPath + "src/main/java/org/openapitools/model/"; + assertFileNotContains(modelPath + "Pet.java", micronautSerDeAnnotation); + assertFileNotContains(modelPath + "User.java", micronautSerDeAnnotation); + assertFileNotContains(modelPath + "Order.java", micronautSerDeAnnotation); + assertFileNotContains(modelPath + "Tag.java", micronautSerDeAnnotation); + assertFileNotContains(modelPath + "Category.java", micronautSerDeAnnotation); + + //JsonFormat with jackson must be with shape attribute + assertFileContains(modelPath + "Order.java", "@JsonFormat(shape = JsonFormat.Shape.STRING"); + } + + /** + * Checks micronaut-serde-jackson limitation. + * @see + */ + @Test + public void testSerializationLibraryMicronautSerdeJackson() { + JavaMicronautClientCodegen codegen = new JavaMicronautClientCodegen(); + codegen.additionalProperties().put(CodegenConstants.SERIALIZATION_LIBRARY, JavaMicronautAbstractCodegen.SERIALIZATION_LIBRARY_TYPE.micronaut_serde_jackson.name()); + String outputPath = generateFiles(codegen, PETSTORE_PATH, + CodegenConstants.MODELS); + + // Model contains micronaut serde annotation + String micronautSerDeAnnotation = "@io.micronaut.serde.annotation.Serdeable"; + String modelPath = outputPath + "src/main/java/org/openapitools/model/"; + assertFileContains(modelPath + "Pet.java", micronautSerDeAnnotation); + assertFileContains(modelPath + "User.java", micronautSerDeAnnotation); + assertFileContains(modelPath + "Order.java", micronautSerDeAnnotation); + assertFileContains(modelPath + "Tag.java", micronautSerDeAnnotation); + assertFileContains(modelPath + "Category.java", micronautSerDeAnnotation); + + //JsonFormat with micronaut-serde-jackson must be without shape attribute + assertFileNotContains(modelPath + "Order.java", "@JsonFormat(shape = JsonFormat.Shape.STRING"); + } +} diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/micronaut/MicronautClientCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/micronaut/MicronautClientCodegenTest.java index 2a19418c9a..af612bd47c 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/micronaut/MicronautClientCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/micronaut/MicronautClientCodegenTest.java @@ -239,4 +239,16 @@ public class MicronautClientCodegenTest extends AbstractMicronautCodegenTest { String resourcesPath = outputPath + "src/main/resources/"; assertFileContains(resourcesPath + "application.yml", "OAuth_2_0_Client_Credentials:"); } + + @Test + public void testAdditionalClientTypeAnnotations() { + JavaMicronautClientCodegen codegen = new JavaMicronautClientCodegen(); + codegen.additionalProperties().put(JavaMicronautClientCodegen.ADDITIONAL_CLIENT_TYPE_ANNOTATIONS, "MyAdditionalAnnotation1(1,${param1});MyAdditionalAnnotation2(2,${param2});"); + String outputPath = generateFiles(codegen, PETSTORE_PATH, + CodegenConstants.APIS); + + // Micronaut declarative http client should contain custom added annotations + assertFileContains(outputPath + "/src/main/java/org/openapitools/api/PetApi.java", "MyAdditionalAnnotation1(1,${param1})"); + assertFileContains(outputPath + "/src/main/java/org/openapitools/api/PetApi.java", "MyAdditionalAnnotation2(2,${param2})"); + } } From 57644b681788634decacc55e0a1c9c1b792d9bfb Mon Sep 17 00:00:00 2001 From: Clemens Heppner Date: Fri, 25 Nov 2022 09:17:17 +0100 Subject: [PATCH 051/189] Initialization of typeAliases was triggered by fromModel(...), which is incorrect. (#14054) When fromOperation(...) was called before fromModel, the aliases were uninitialized. (cherry picked from commit 44ea23168362cfacf8a61ff944701990cf3fea76) Co-authored-by: Clemens Heppner --- .../java/org/openapitools/codegen/DefaultCodegen.java | 9 ++++----- .../org/openapitools/codegen/DefaultCodegenTest.java | 1 + .../codegen/java/AbstractJavaCodegenTest.java | 1 + .../codegen/kotlin/AbstractKotlinCodegenTest.java | 1 + .../openapitools/codegen/php/AbstractPhpCodegenTest.java | 2 ++ .../typescriptnode/TypeScriptNodeClientCodegenTest.java | 2 ++ 6 files changed, 11 insertions(+), 5 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index 81f2e83b83..06638d134c 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java @@ -242,7 +242,7 @@ public class DefaultCodegen implements CodegenConfig { // Then translated back during JSON encoding and decoding protected Map specialCharReplacements = new LinkedHashMap<>(); // When a model is an alias for a simple type - protected Map typeAliases = null; + protected Map typeAliases = Collections.emptyMap(); protected Boolean prependFormOrBodyParameters = false; // The extension of the generated documentation files (defaults to markdown .md) protected String docExtension; @@ -844,6 +844,9 @@ public class DefaultCodegen implements CodegenConfig { // Set global settings such that helper functions in ModelUtils can lookup the value // of the CLI option. ModelUtils.setDisallowAdditionalPropertiesIfNotPresent(getDisallowAdditionalPropertiesIfNotPresent()); + + // Multiple operations rely on proper type aliases, so we should always update them + typeAliases = getAllAliases(ModelUtils.getSchemas(openAPI)); } // override with any message to be shown right before the process finishes @@ -2861,10 +2864,6 @@ public class DefaultCodegen implements CodegenConfig { @Override public CodegenModel fromModel(String name, Schema schema) { Map allDefinitions = ModelUtils.getSchemas(this.openAPI); - if (typeAliases == null) { - // Only do this once during first call - typeAliases = getAllAliases(allDefinitions); - } CodegenModel m = CodegenModelFactory.newInstance(CodegenModelType.MODEL); if (schema.equals(trueSchema)) { diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java index 05ca4fc602..05fa241e40 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java @@ -1763,6 +1763,7 @@ public class DefaultCodegenTest { final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/component-deprecated.yml"); new InlineModelResolver().flatten(openAPI); final DefaultCodegen codegen = new DefaultCodegen(); + codegen.setOpenAPI(openAPI); CodegenModel codegenPetModel = codegen.fromModel("Pet", openAPI.getComponents().getSchemas().get("Pet")); Assert.assertTrue(codegenPetModel.isDeprecated); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/AbstractJavaCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/AbstractJavaCodegenTest.java index a63f5be427..0e2817fd9b 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/AbstractJavaCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/AbstractJavaCodegenTest.java @@ -864,6 +864,7 @@ public class AbstractJavaCodegenTest { public void testOneOfModelImports() throws Exception { final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/oneOf_nonPrimitive.yaml"); final P_AbstractJavaCodegen codegen = new P_AbstractJavaCodegen(); + codegen.setOpenAPI(openAPI); codegen.preprocessOpenAPI(openAPI); Schema schema = openAPI.getComponents().getSchemas().get("Example"); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/AbstractKotlinCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/AbstractKotlinCodegenTest.java index 7873dff7cb..e0e32bc681 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/AbstractKotlinCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/AbstractKotlinCodegenTest.java @@ -263,6 +263,7 @@ public class AbstractKotlinCodegenTest { public void testEnumPropertyWithDefaultValue() { final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/kotlin/issue10591-enum-defaultValue.yaml"); final AbstractKotlinCodegen codegen = new P_AbstractKotlinCodegen(); + codegen.setOpenAPI(openAPI); Schema test1 = openAPI.getComponents().getSchemas().get("ModelWithEnumPropertyHavingDefault"); CodegenModel cm1 = codegen.fromModel("ModelWithEnumPropertyHavingDefault", test1); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/php/AbstractPhpCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/php/AbstractPhpCodegenTest.java index 5f7c52e542..f89f5f95ea 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/php/AbstractPhpCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/php/AbstractPhpCodegenTest.java @@ -132,6 +132,7 @@ public class AbstractPhpCodegenTest { public void testArrayOfArrays() { final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/issue_8945.yaml"); final AbstractPhpCodegen codegen = new P_AbstractPhpCodegen(); + codegen.setOpenAPI(openAPI); Schema test1 = openAPI.getComponents().getSchemas().get("MyResponse"); CodegenModel cm1 = codegen.fromModel("MyResponse", test1); @@ -150,6 +151,7 @@ public class AbstractPhpCodegenTest { public void testEnumPropertyWithDefaultValue() { final OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/php/issue_10244.yaml"); final AbstractPhpCodegen codegen = new P_AbstractPhpCodegen(); + codegen.setOpenAPI(openAPI); Schema test1 = openAPI.getComponents().getSchemas().get("ModelWithEnumPropertyHavingDefault"); CodegenModel cm1 = codegen.fromModel("ModelWithEnumPropertyHavingDefault", test1); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/typescriptnode/TypeScriptNodeClientCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/typescriptnode/TypeScriptNodeClientCodegenTest.java index 2a9843669a..275bc89fdb 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/typescriptnode/TypeScriptNodeClientCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/typescriptnode/TypeScriptNodeClientCodegenTest.java @@ -180,6 +180,7 @@ public class TypeScriptNodeClientCodegenTest { .addSchemas("Child", childSchema); final TypeScriptNodeClientCodegen codegen = new TypeScriptNodeClientCodegen(); + codegen.setOpenAPI(openAPI); codegen.setModelNameSuffix("Suffix"); final HashMap allModels = createParameterForPostProcessAllModels( @@ -209,6 +210,7 @@ public class TypeScriptNodeClientCodegenTest { .addSchemas("Child", childSchema); final TypeScriptNodeClientCodegen codegen = new TypeScriptNodeClientCodegen(); + codegen.setOpenAPI(openAPI); codegen.setModelNamePrefix("Prefix"); final HashMap allModels = createParameterForPostProcessAllModels( From e32b7a41b6e2d31be9201ff67715eda0a014b84f Mon Sep 17 00:00:00 2001 From: Tomasz365 <3113049+Tomasz365@users.noreply.github.com> Date: Fri, 25 Nov 2022 13:27:54 +0100 Subject: [PATCH 052/189] typescript-angular: Fixed path parameter encoding for date-time dataFormat (#14114) * Fixed path parameter encoding for date-time dataFromat * Regenerated samples --- .../main/resources/typescript-angular/configuration.mustache | 2 +- .../typescript/additional-properties-expected/configuration.ts | 2 +- .../typescript/array-and-object-expected/configuration.ts | 2 +- .../typescript/custom-path-params-expected/configuration.ts | 2 +- .../typescript/petstore-expected/configuration.ts | 2 +- .../builds/default/configuration.ts | 2 +- .../builds/default/configuration.ts | 2 +- .../builds/default/configuration.ts | 2 +- .../builds/with-npm/configuration.ts | 2 +- .../builds/default/configuration.ts | 2 +- .../builds/default/configuration.ts | 2 +- .../builds/default/configuration.ts | 2 +- .../builds/with-npm/configuration.ts | 2 +- .../builds/default/configuration.ts | 2 +- .../configuration.ts | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/typescript-angular/configuration.mustache b/modules/openapi-generator/src/main/resources/typescript-angular/configuration.mustache index e73eeebf7b..39f73f8e2a 100644 --- a/modules/openapi-generator/src/main/resources/typescript-angular/configuration.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-angular/configuration.mustache @@ -196,7 +196,7 @@ export class {{configurationClassName}} { // // But: if that's all you need (i.e.: the most common use-case): no need for customization! - const value = param.dataFormat === 'date-time' + const value = param.dataFormat === 'date-time' && param.value instanceof Date ? (param.value as Date).toISOString() : param.value; diff --git a/modules/openapi-generator/src/test/resources/integrationtests/typescript/additional-properties-expected/configuration.ts b/modules/openapi-generator/src/test/resources/integrationtests/typescript/additional-properties-expected/configuration.ts index d38a4c153f..526b454fb2 100644 --- a/modules/openapi-generator/src/test/resources/integrationtests/typescript/additional-properties-expected/configuration.ts +++ b/modules/openapi-generator/src/test/resources/integrationtests/typescript/additional-properties-expected/configuration.ts @@ -157,7 +157,7 @@ export class Configuration { // // But: if that's all you need (i.e.: the most common use-case): no need for customization! - const value = param.dataFormat === 'date-time' + const value = param.dataFormat === 'date-time' && param.value instanceof Date ? (param.value as Date).toISOString() : param.value; diff --git a/modules/openapi-generator/src/test/resources/integrationtests/typescript/array-and-object-expected/configuration.ts b/modules/openapi-generator/src/test/resources/integrationtests/typescript/array-and-object-expected/configuration.ts index d38a4c153f..526b454fb2 100644 --- a/modules/openapi-generator/src/test/resources/integrationtests/typescript/array-and-object-expected/configuration.ts +++ b/modules/openapi-generator/src/test/resources/integrationtests/typescript/array-and-object-expected/configuration.ts @@ -157,7 +157,7 @@ export class Configuration { // // But: if that's all you need (i.e.: the most common use-case): no need for customization! - const value = param.dataFormat === 'date-time' + const value = param.dataFormat === 'date-time' && param.value instanceof Date ? (param.value as Date).toISOString() : param.value; diff --git a/modules/openapi-generator/src/test/resources/integrationtests/typescript/custom-path-params-expected/configuration.ts b/modules/openapi-generator/src/test/resources/integrationtests/typescript/custom-path-params-expected/configuration.ts index d38a4c153f..526b454fb2 100644 --- a/modules/openapi-generator/src/test/resources/integrationtests/typescript/custom-path-params-expected/configuration.ts +++ b/modules/openapi-generator/src/test/resources/integrationtests/typescript/custom-path-params-expected/configuration.ts @@ -157,7 +157,7 @@ export class Configuration { // // But: if that's all you need (i.e.: the most common use-case): no need for customization! - const value = param.dataFormat === 'date-time' + const value = param.dataFormat === 'date-time' && param.value instanceof Date ? (param.value as Date).toISOString() : param.value; diff --git a/modules/openapi-generator/src/test/resources/integrationtests/typescript/petstore-expected/configuration.ts b/modules/openapi-generator/src/test/resources/integrationtests/typescript/petstore-expected/configuration.ts index 5ea92c82cb..c119def95a 100644 --- a/modules/openapi-generator/src/test/resources/integrationtests/typescript/petstore-expected/configuration.ts +++ b/modules/openapi-generator/src/test/resources/integrationtests/typescript/petstore-expected/configuration.ts @@ -177,7 +177,7 @@ export class Configuration { // // But: if that's all you need (i.e.: the most common use-case): no need for customization! - const value = param.dataFormat === 'date-time' + const value = param.dataFormat === 'date-time' && param.value instanceof Date ? (param.value as Date).toISOString() : param.value; diff --git a/samples/client/petstore/typescript-angular-v12-oneOf/builds/default/configuration.ts b/samples/client/petstore/typescript-angular-v12-oneOf/builds/default/configuration.ts index d38a4c153f..526b454fb2 100644 --- a/samples/client/petstore/typescript-angular-v12-oneOf/builds/default/configuration.ts +++ b/samples/client/petstore/typescript-angular-v12-oneOf/builds/default/configuration.ts @@ -157,7 +157,7 @@ export class Configuration { // // But: if that's all you need (i.e.: the most common use-case): no need for customization! - const value = param.dataFormat === 'date-time' + const value = param.dataFormat === 'date-time' && param.value instanceof Date ? (param.value as Date).toISOString() : param.value; diff --git a/samples/client/petstore/typescript-angular-v12-provided-in-any/builds/default/configuration.ts b/samples/client/petstore/typescript-angular-v12-provided-in-any/builds/default/configuration.ts index 5ea92c82cb..c119def95a 100644 --- a/samples/client/petstore/typescript-angular-v12-provided-in-any/builds/default/configuration.ts +++ b/samples/client/petstore/typescript-angular-v12-provided-in-any/builds/default/configuration.ts @@ -177,7 +177,7 @@ export class Configuration { // // But: if that's all you need (i.e.: the most common use-case): no need for customization! - const value = param.dataFormat === 'date-time' + const value = param.dataFormat === 'date-time' && param.value instanceof Date ? (param.value as Date).toISOString() : param.value; diff --git a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/configuration.ts b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/configuration.ts index 5ea92c82cb..c119def95a 100644 --- a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/configuration.ts +++ b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/configuration.ts @@ -177,7 +177,7 @@ export class Configuration { // // But: if that's all you need (i.e.: the most common use-case): no need for customization! - const value = param.dataFormat === 'date-time' + const value = param.dataFormat === 'date-time' && param.value instanceof Date ? (param.value as Date).toISOString() : param.value; diff --git a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/configuration.ts b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/configuration.ts index 5ea92c82cb..c119def95a 100644 --- a/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/configuration.ts +++ b/samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/configuration.ts @@ -177,7 +177,7 @@ export class Configuration { // // But: if that's all you need (i.e.: the most common use-case): no need for customization! - const value = param.dataFormat === 'date-time' + const value = param.dataFormat === 'date-time' && param.value instanceof Date ? (param.value as Date).toISOString() : param.value; diff --git a/samples/client/petstore/typescript-angular-v13-oneOf/builds/default/configuration.ts b/samples/client/petstore/typescript-angular-v13-oneOf/builds/default/configuration.ts index d38a4c153f..526b454fb2 100644 --- a/samples/client/petstore/typescript-angular-v13-oneOf/builds/default/configuration.ts +++ b/samples/client/petstore/typescript-angular-v13-oneOf/builds/default/configuration.ts @@ -157,7 +157,7 @@ export class Configuration { // // But: if that's all you need (i.e.: the most common use-case): no need for customization! - const value = param.dataFormat === 'date-time' + const value = param.dataFormat === 'date-time' && param.value instanceof Date ? (param.value as Date).toISOString() : param.value; diff --git a/samples/client/petstore/typescript-angular-v13-provided-in-any/builds/default/configuration.ts b/samples/client/petstore/typescript-angular-v13-provided-in-any/builds/default/configuration.ts index 5ea92c82cb..c119def95a 100644 --- a/samples/client/petstore/typescript-angular-v13-provided-in-any/builds/default/configuration.ts +++ b/samples/client/petstore/typescript-angular-v13-provided-in-any/builds/default/configuration.ts @@ -177,7 +177,7 @@ export class Configuration { // // But: if that's all you need (i.e.: the most common use-case): no need for customization! - const value = param.dataFormat === 'date-time' + const value = param.dataFormat === 'date-time' && param.value instanceof Date ? (param.value as Date).toISOString() : param.value; diff --git a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/configuration.ts b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/configuration.ts index 5ea92c82cb..c119def95a 100644 --- a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/configuration.ts +++ b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/configuration.ts @@ -177,7 +177,7 @@ export class Configuration { // // But: if that's all you need (i.e.: the most common use-case): no need for customization! - const value = param.dataFormat === 'date-time' + const value = param.dataFormat === 'date-time' && param.value instanceof Date ? (param.value as Date).toISOString() : param.value; diff --git a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/configuration.ts b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/configuration.ts index 5ea92c82cb..c119def95a 100644 --- a/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/configuration.ts +++ b/samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/configuration.ts @@ -177,7 +177,7 @@ export class Configuration { // // But: if that's all you need (i.e.: the most common use-case): no need for customization! - const value = param.dataFormat === 'date-time' + const value = param.dataFormat === 'date-time' && param.value instanceof Date ? (param.value as Date).toISOString() : param.value; diff --git a/samples/client/petstore/typescript-angular-v14-provided-in-root/builds/default/configuration.ts b/samples/client/petstore/typescript-angular-v14-provided-in-root/builds/default/configuration.ts index 5ea92c82cb..c119def95a 100644 --- a/samples/client/petstore/typescript-angular-v14-provided-in-root/builds/default/configuration.ts +++ b/samples/client/petstore/typescript-angular-v14-provided-in-root/builds/default/configuration.ts @@ -177,7 +177,7 @@ export class Configuration { // // But: if that's all you need (i.e.: the most common use-case): no need for customization! - const value = param.dataFormat === 'date-time' + const value = param.dataFormat === 'date-time' && param.value instanceof Date ? (param.value as Date).toISOString() : param.value; diff --git a/samples/client/petstore/typescript-angular-v14-query-param-object-format/configuration.ts b/samples/client/petstore/typescript-angular-v14-query-param-object-format/configuration.ts index 5ea92c82cb..c119def95a 100644 --- a/samples/client/petstore/typescript-angular-v14-query-param-object-format/configuration.ts +++ b/samples/client/petstore/typescript-angular-v14-query-param-object-format/configuration.ts @@ -177,7 +177,7 @@ export class Configuration { // // But: if that's all you need (i.e.: the most common use-case): no need for customization! - const value = param.dataFormat === 'date-time' + const value = param.dataFormat === 'date-time' && param.value instanceof Date ? (param.value as Date).toISOString() : param.value; From d5ce79ac2414a70423d7ef5cef4a58f6df37b63f Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sat, 26 Nov 2022 17:39:50 +0800 Subject: [PATCH 053/189] fix build warning in java apache client (#14127) --- .../apache-httpclient/ApiClient.mustache | 24 ++++++++++++++++++- .../org/openapitools/client/ApiClient.java | 24 ++++++++++++++++++- 2 files changed, 46 insertions(+), 2 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/ApiClient.mustache index 5aeb9da6b8..499619f022 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/ApiClient.mustache @@ -181,6 +181,9 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { } /** + * Sets the object mapper. + * + * @param objectMapper object mapper * @return API client */ public ApiClient setObjectMapper(ObjectMapper objectMapper) { @@ -193,6 +196,9 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { } /** + * Sets the HTTP client. + * + * @param httpClient HTTP client * @return API client */ public ApiClient setHttpClient(CloseableHttpClient httpClient) { @@ -205,6 +211,9 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { } /** + * Sets the base path. + * + * @param basePath base path * @return API client */ public ApiClient setBasePath(String basePath) { @@ -218,6 +227,9 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { } /** + * Sets the server. + * + * @param servers a list of server configuration * @return API client */ public ApiClient setServers(List servers) { @@ -230,6 +242,9 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { } /** + * Sets the server index. + * + * @param serverIndex server index * @return API client */ public ApiClient setServerIndex(Integer serverIndex) { @@ -242,6 +257,9 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { } /** + * Sets the server variables. + * + * @param serverVariables server variables * @return API client */ public ApiClient setServerVariables(Map serverVariables) { @@ -251,6 +269,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { /** * Gets the status code of the previous request + * * @return Status code */ public int getStatusCode() { @@ -688,7 +707,10 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { } /** - * Transform response headers into map + * Transforms response headers into map. + * + * @param headers HTTP headers + * @return a map of string array */ protected Map> transformResponseHeaders(Header[] headers) { Map> headersMap = new HashMap<>(); diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/ApiClient.java index e0bb95d2f0..4d226d043f 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/ApiClient.java @@ -205,6 +205,9 @@ public class ApiClient extends JavaTimeFormatter { } /** + * Sets the object mapper. + * + * @param objectMapper object mapper * @return API client */ public ApiClient setObjectMapper(ObjectMapper objectMapper) { @@ -217,6 +220,9 @@ public class ApiClient extends JavaTimeFormatter { } /** + * Sets the HTTP client. + * + * @param httpClient HTTP client * @return API client */ public ApiClient setHttpClient(CloseableHttpClient httpClient) { @@ -229,6 +235,9 @@ public class ApiClient extends JavaTimeFormatter { } /** + * Sets the base path. + * + * @param basePath base path * @return API client */ public ApiClient setBasePath(String basePath) { @@ -242,6 +251,9 @@ public class ApiClient extends JavaTimeFormatter { } /** + * Sets the server. + * + * @param servers a list of server configuration * @return API client */ public ApiClient setServers(List servers) { @@ -254,6 +266,9 @@ public class ApiClient extends JavaTimeFormatter { } /** + * Sets the server index. + * + * @param serverIndex server index * @return API client */ public ApiClient setServerIndex(Integer serverIndex) { @@ -266,6 +281,9 @@ public class ApiClient extends JavaTimeFormatter { } /** + * Sets the server variables. + * + * @param serverVariables server variables * @return API client */ public ApiClient setServerVariables(Map serverVariables) { @@ -275,6 +293,7 @@ public class ApiClient extends JavaTimeFormatter { /** * Gets the status code of the previous request + * * @return Status code */ public int getStatusCode() { @@ -704,7 +723,10 @@ public class ApiClient extends JavaTimeFormatter { } /** - * Transform response headers into map + * Transforms response headers into map. + * + * @param headers HTTP headers + * @return a map of string array */ protected Map> transformResponseHeaders(Header[] headers) { Map> headersMap = new HashMap<>(); From e93906eaea3e91b0a127c4b9e01b287f14f32d90 Mon Sep 17 00:00:00 2001 From: Matthias Ernst Date: Mon, 28 Nov 2022 17:37:59 +0100 Subject: [PATCH 054/189] [kotlin] Update kotlin to 1.7.21 and ktor to 2.1.3 (#14128) --- .../src/main/resources/kotlin-client/README.mustache | 2 +- .../resources/kotlin-client/build.gradle.mustache | 8 ++++---- .../multiplatform/build.gradle.kts.mustache | 12 ++++++------ .../petstore/kotlin-allOff-discriminator/README.md | 2 +- .../kotlin-allOff-discriminator/build.gradle | 2 +- .../kotlin-array-simple-string-jvm-okhttp3/README.md | 2 +- .../build.gradle | 2 +- .../kotlin-array-simple-string-jvm-okhttp4/README.md | 2 +- .../build.gradle | 2 +- .../build.gradle.kts | 12 ++++++------ .../build.gradle.kts | 12 ++++++------ .../kotlin-bigdecimal-default-okhttp4/README.md | 2 +- .../kotlin-bigdecimal-default-okhttp4/build.gradle | 2 +- .../kotlin-default-values-jvm-okhttp3/README.md | 2 +- .../kotlin-default-values-jvm-okhttp3/build.gradle | 2 +- .../kotlin-default-values-jvm-okhttp4/README.md | 2 +- .../kotlin-default-values-jvm-okhttp4/build.gradle | 2 +- .../kotlin-default-values-jvm-retrofit2/README.md | 2 +- .../kotlin-default-values-jvm-retrofit2/build.gradle | 2 +- .../build.gradle.kts | 12 ++++++------ .../petstore/kotlin-enum-default-value/README.md | 2 +- .../petstore/kotlin-enum-default-value/build.gradle | 2 +- samples/client/petstore/kotlin-gson/README.md | 2 +- samples/client/petstore/kotlin-gson/build.gradle | 2 +- samples/client/petstore/kotlin-jackson/README.md | 2 +- samples/client/petstore/kotlin-jackson/build.gradle | 2 +- .../petstore/kotlin-json-request-string/README.md | 2 +- .../petstore/kotlin-json-request-string/build.gradle | 4 ++-- .../client/petstore/kotlin-jvm-ktor-gson/README.md | 2 +- .../petstore/kotlin-jvm-ktor-gson/build.gradle | 4 ++-- .../petstore/kotlin-jvm-ktor-jackson/README.md | 2 +- .../petstore/kotlin-jvm-ktor-jackson/build.gradle | 4 ++-- .../petstore/kotlin-jvm-okhttp4-coroutines/README.md | 2 +- .../kotlin-jvm-okhttp4-coroutines/build.gradle | 4 ++-- .../client/petstore/kotlin-jvm-vertx-gson/README.md | 2 +- .../petstore/kotlin-jvm-vertx-gson/build.gradle | 2 +- .../kotlin-jvm-vertx-jackson-coroutines/README.md | 2 +- .../kotlin-jvm-vertx-jackson-coroutines/build.gradle | 4 ++-- .../petstore/kotlin-jvm-vertx-jackson/README.md | 2 +- .../petstore/kotlin-jvm-vertx-jackson/build.gradle | 2 +- .../client/petstore/kotlin-jvm-vertx-moshi/README.md | 2 +- .../petstore/kotlin-jvm-vertx-moshi/build.gradle | 2 +- .../client/petstore/kotlin-modelMutable/README.md | 2 +- .../client/petstore/kotlin-modelMutable/build.gradle | 2 +- .../client/petstore/kotlin-moshi-codegen/README.md | 2 +- .../petstore/kotlin-moshi-codegen/build.gradle | 2 +- .../petstore/kotlin-multiplatform/build.gradle.kts | 12 ++++++------ samples/client/petstore/kotlin-nonpublic/README.md | 2 +- .../client/petstore/kotlin-nonpublic/build.gradle | 2 +- samples/client/petstore/kotlin-nullable/README.md | 2 +- samples/client/petstore/kotlin-nullable/build.gradle | 2 +- samples/client/petstore/kotlin-okhttp3/README.md | 2 +- samples/client/petstore/kotlin-okhttp3/build.gradle | 2 +- .../kotlin-retrofit2-kotlinx_serialization/README.md | 2 +- .../build.gradle | 4 ++-- .../client/petstore/kotlin-retrofit2-rx3/README.md | 2 +- .../petstore/kotlin-retrofit2-rx3/build.gradle | 2 +- samples/client/petstore/kotlin-retrofit2/README.md | 2 +- .../client/petstore/kotlin-retrofit2/build.gradle | 2 +- samples/client/petstore/kotlin-string/README.md | 2 +- samples/client/petstore/kotlin-string/build.gradle | 2 +- samples/client/petstore/kotlin-threetenbp/README.md | 2 +- .../client/petstore/kotlin-threetenbp/build.gradle | 2 +- .../client/petstore/kotlin-uppercase-enum/README.md | 2 +- .../petstore/kotlin-uppercase-enum/build.gradle | 4 ++-- samples/client/petstore/kotlin/README.md | 2 +- samples/client/petstore/kotlin/build.gradle | 2 +- 67 files changed, 102 insertions(+), 102 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/README.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/README.mustache index d805869f5a..3d75062afa 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/README.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/README.mustache @@ -20,7 +20,7 @@ For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) ## Requires {{#jvm}} -* Kotlin 1.6.10 +* Kotlin 1.7.21 * Gradle 7.5 {{/jvm}} {{#multiplatform}} diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/build.gradle.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/build.gradle.mustache index b43ef7f39f..9ab76aa3a9 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/build.gradle.mustache @@ -9,9 +9,9 @@ wrapper { {{/omitGradleWrapper}} buildscript { - ext.kotlin_version = '1.6.10' + ext.kotlin_version = '1.7.21' {{#jvm-ktor}} - ext.ktor_version = '2.1.2' + ext.ktor_version = '2.1.3' {{/jvm-ktor}} {{#jvm-retrofit2}} ext.retrofitVersion = '2.9.0' @@ -75,7 +75,7 @@ dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" {{^doNotUseRxAndCoroutines}} {{#useCoroutines}} - implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.3" + implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4" {{/useCoroutines}} {{/doNotUseRxAndCoroutines}} {{#moshi}} @@ -99,7 +99,7 @@ dependencies { implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.13.3" {{/jackson}} {{#kotlinx_serialization}} - implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.3" + implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.4.1" {{/kotlinx_serialization}} {{#jvm-ktor}} implementation "io.ktor:ktor-client-core:$ktor_version" diff --git a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/build.gradle.kts.mustache b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/build.gradle.kts.mustache index 797279d5d4..21c2f97f08 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/build.gradle.kts.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-client/libraries/multiplatform/build.gradle.kts.mustache @@ -1,17 +1,17 @@ import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget plugins { - kotlin("multiplatform"){{^omitGradlePluginVersions}} version "1.6.0" // kotlin_version{{/omitGradlePluginVersions}} - kotlin("plugin.serialization"){{^omitGradlePluginVersions}} version "1.6.0" // kotlin_version{{/omitGradlePluginVersions}} + kotlin("multiplatform"){{^omitGradlePluginVersions}} version "1.7.21" // kotlin_version{{/omitGradlePluginVersions}} + kotlin("plugin.serialization"){{^omitGradlePluginVersions}} version "1.7.21" // kotlin_version{{/omitGradlePluginVersions}} } group = "{{groupId}}" version = "{{artifactVersion}}" -val kotlin_version = "1.6.10" -val coroutines_version = "1.6.3" +val kotlin_version = "1.7.21" +val coroutines_version = "1.6.4" val serialization_version = "1.3.3" -val ktor_version = "2.0.3" +val ktor_version = "2.1.3" repositories { mavenCentral() @@ -76,7 +76,7 @@ kotlin { all { languageSettings.apply { - useExperimentalAnnotation("kotlin.Experimental") + optIn("kotlin.Experimental") } } } diff --git a/samples/client/petstore/kotlin-allOff-discriminator/README.md b/samples/client/petstore/kotlin-allOff-discriminator/README.md index b8f74b2742..743b4f5905 100644 --- a/samples/client/petstore/kotlin-allOff-discriminator/README.md +++ b/samples/client/petstore/kotlin-allOff-discriminator/README.md @@ -12,7 +12,7 @@ For more information, please visit [https://example.org](https://example.org) ## Requires -* Kotlin 1.6.10 +* Kotlin 1.7.21 * Gradle 7.5 ## Build diff --git a/samples/client/petstore/kotlin-allOff-discriminator/build.gradle b/samples/client/petstore/kotlin-allOff-discriminator/build.gradle index 527140cfc8..43b2b3fa42 100644 --- a/samples/client/petstore/kotlin-allOff-discriminator/build.gradle +++ b/samples/client/petstore/kotlin-allOff-discriminator/build.gradle @@ -7,7 +7,7 @@ wrapper { } buildscript { - ext.kotlin_version = '1.6.10' + ext.kotlin_version = '1.7.21' repositories { maven { url "https://repo1.maven.org/maven2" } diff --git a/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp3/README.md b/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp3/README.md index 49b1c94dab..db54378ab5 100644 --- a/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp3/README.md +++ b/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp3/README.md @@ -11,7 +11,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.6.10 +* Kotlin 1.7.21 * Gradle 7.5 ## Build diff --git a/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp3/build.gradle b/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp3/build.gradle index e48744c81e..759f2a40b5 100644 --- a/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp3/build.gradle +++ b/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp3/build.gradle @@ -7,7 +7,7 @@ wrapper { } buildscript { - ext.kotlin_version = '1.6.10' + ext.kotlin_version = '1.7.21' repositories { maven { url "https://repo1.maven.org/maven2" } diff --git a/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp4/README.md b/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp4/README.md index 49b1c94dab..db54378ab5 100644 --- a/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp4/README.md +++ b/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp4/README.md @@ -11,7 +11,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.6.10 +* Kotlin 1.7.21 * Gradle 7.5 ## Build diff --git a/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp4/build.gradle b/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp4/build.gradle index 527140cfc8..43b2b3fa42 100644 --- a/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp4/build.gradle +++ b/samples/client/petstore/kotlin-array-simple-string-jvm-okhttp4/build.gradle @@ -7,7 +7,7 @@ wrapper { } buildscript { - ext.kotlin_version = '1.6.10' + ext.kotlin_version = '1.7.21' repositories { maven { url "https://repo1.maven.org/maven2" } diff --git a/samples/client/petstore/kotlin-array-simple-string-multiplatform/build.gradle.kts b/samples/client/petstore/kotlin-array-simple-string-multiplatform/build.gradle.kts index 219d79917c..2aaf14f1d7 100644 --- a/samples/client/petstore/kotlin-array-simple-string-multiplatform/build.gradle.kts +++ b/samples/client/petstore/kotlin-array-simple-string-multiplatform/build.gradle.kts @@ -1,17 +1,17 @@ import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget plugins { - kotlin("multiplatform") version "1.6.0" // kotlin_version - kotlin("plugin.serialization") version "1.6.0" // kotlin_version + kotlin("multiplatform") version "1.7.21" // kotlin_version + kotlin("plugin.serialization") version "1.7.21" // kotlin_version } group = "org.openapitools" version = "1.0.0" -val kotlin_version = "1.6.10" -val coroutines_version = "1.6.3" +val kotlin_version = "1.7.21" +val coroutines_version = "1.6.4" val serialization_version = "1.3.3" -val ktor_version = "2.0.3" +val ktor_version = "2.1.3" repositories { mavenCentral() @@ -76,7 +76,7 @@ kotlin { all { languageSettings.apply { - useExperimentalAnnotation("kotlin.Experimental") + optIn("kotlin.Experimental") } } } diff --git a/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/build.gradle.kts b/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/build.gradle.kts index 219d79917c..2aaf14f1d7 100644 --- a/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/build.gradle.kts +++ b/samples/client/petstore/kotlin-bigdecimal-default-multiplatform/build.gradle.kts @@ -1,17 +1,17 @@ import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget plugins { - kotlin("multiplatform") version "1.6.0" // kotlin_version - kotlin("plugin.serialization") version "1.6.0" // kotlin_version + kotlin("multiplatform") version "1.7.21" // kotlin_version + kotlin("plugin.serialization") version "1.7.21" // kotlin_version } group = "org.openapitools" version = "1.0.0" -val kotlin_version = "1.6.10" -val coroutines_version = "1.6.3" +val kotlin_version = "1.7.21" +val coroutines_version = "1.6.4" val serialization_version = "1.3.3" -val ktor_version = "2.0.3" +val ktor_version = "2.1.3" repositories { mavenCentral() @@ -76,7 +76,7 @@ kotlin { all { languageSettings.apply { - useExperimentalAnnotation("kotlin.Experimental") + optIn("kotlin.Experimental") } } } diff --git a/samples/client/petstore/kotlin-bigdecimal-default-okhttp4/README.md b/samples/client/petstore/kotlin-bigdecimal-default-okhttp4/README.md index ccbdb1a4e4..6fce6a46e0 100644 --- a/samples/client/petstore/kotlin-bigdecimal-default-okhttp4/README.md +++ b/samples/client/petstore/kotlin-bigdecimal-default-okhttp4/README.md @@ -11,7 +11,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.6.10 +* Kotlin 1.7.21 * Gradle 7.5 ## Build diff --git a/samples/client/petstore/kotlin-bigdecimal-default-okhttp4/build.gradle b/samples/client/petstore/kotlin-bigdecimal-default-okhttp4/build.gradle index 527140cfc8..43b2b3fa42 100644 --- a/samples/client/petstore/kotlin-bigdecimal-default-okhttp4/build.gradle +++ b/samples/client/petstore/kotlin-bigdecimal-default-okhttp4/build.gradle @@ -7,7 +7,7 @@ wrapper { } buildscript { - ext.kotlin_version = '1.6.10' + ext.kotlin_version = '1.7.21' repositories { maven { url "https://repo1.maven.org/maven2" } diff --git a/samples/client/petstore/kotlin-default-values-jvm-okhttp3/README.md b/samples/client/petstore/kotlin-default-values-jvm-okhttp3/README.md index c1b435ada5..b7e7e8b1c5 100644 --- a/samples/client/petstore/kotlin-default-values-jvm-okhttp3/README.md +++ b/samples/client/petstore/kotlin-default-values-jvm-okhttp3/README.md @@ -11,7 +11,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.6.10 +* Kotlin 1.7.21 * Gradle 7.5 ## Build diff --git a/samples/client/petstore/kotlin-default-values-jvm-okhttp3/build.gradle b/samples/client/petstore/kotlin-default-values-jvm-okhttp3/build.gradle index e48744c81e..759f2a40b5 100644 --- a/samples/client/petstore/kotlin-default-values-jvm-okhttp3/build.gradle +++ b/samples/client/petstore/kotlin-default-values-jvm-okhttp3/build.gradle @@ -7,7 +7,7 @@ wrapper { } buildscript { - ext.kotlin_version = '1.6.10' + ext.kotlin_version = '1.7.21' repositories { maven { url "https://repo1.maven.org/maven2" } diff --git a/samples/client/petstore/kotlin-default-values-jvm-okhttp4/README.md b/samples/client/petstore/kotlin-default-values-jvm-okhttp4/README.md index c1b435ada5..b7e7e8b1c5 100644 --- a/samples/client/petstore/kotlin-default-values-jvm-okhttp4/README.md +++ b/samples/client/petstore/kotlin-default-values-jvm-okhttp4/README.md @@ -11,7 +11,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.6.10 +* Kotlin 1.7.21 * Gradle 7.5 ## Build diff --git a/samples/client/petstore/kotlin-default-values-jvm-okhttp4/build.gradle b/samples/client/petstore/kotlin-default-values-jvm-okhttp4/build.gradle index 527140cfc8..43b2b3fa42 100644 --- a/samples/client/petstore/kotlin-default-values-jvm-okhttp4/build.gradle +++ b/samples/client/petstore/kotlin-default-values-jvm-okhttp4/build.gradle @@ -7,7 +7,7 @@ wrapper { } buildscript { - ext.kotlin_version = '1.6.10' + ext.kotlin_version = '1.7.21' repositories { maven { url "https://repo1.maven.org/maven2" } diff --git a/samples/client/petstore/kotlin-default-values-jvm-retrofit2/README.md b/samples/client/petstore/kotlin-default-values-jvm-retrofit2/README.md index be72f0dfcf..341981ae11 100644 --- a/samples/client/petstore/kotlin-default-values-jvm-retrofit2/README.md +++ b/samples/client/petstore/kotlin-default-values-jvm-retrofit2/README.md @@ -11,7 +11,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.6.10 +* Kotlin 1.7.21 * Gradle 7.5 ## Build diff --git a/samples/client/petstore/kotlin-default-values-jvm-retrofit2/build.gradle b/samples/client/petstore/kotlin-default-values-jvm-retrofit2/build.gradle index 07cd4614b2..91745c4f63 100644 --- a/samples/client/petstore/kotlin-default-values-jvm-retrofit2/build.gradle +++ b/samples/client/petstore/kotlin-default-values-jvm-retrofit2/build.gradle @@ -7,7 +7,7 @@ wrapper { } buildscript { - ext.kotlin_version = '1.6.10' + ext.kotlin_version = '1.7.21' ext.retrofitVersion = '2.9.0' repositories { diff --git a/samples/client/petstore/kotlin-default-values-multiplatform/build.gradle.kts b/samples/client/petstore/kotlin-default-values-multiplatform/build.gradle.kts index 219d79917c..2aaf14f1d7 100644 --- a/samples/client/petstore/kotlin-default-values-multiplatform/build.gradle.kts +++ b/samples/client/petstore/kotlin-default-values-multiplatform/build.gradle.kts @@ -1,17 +1,17 @@ import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget plugins { - kotlin("multiplatform") version "1.6.0" // kotlin_version - kotlin("plugin.serialization") version "1.6.0" // kotlin_version + kotlin("multiplatform") version "1.7.21" // kotlin_version + kotlin("plugin.serialization") version "1.7.21" // kotlin_version } group = "org.openapitools" version = "1.0.0" -val kotlin_version = "1.6.10" -val coroutines_version = "1.6.3" +val kotlin_version = "1.7.21" +val coroutines_version = "1.6.4" val serialization_version = "1.3.3" -val ktor_version = "2.0.3" +val ktor_version = "2.1.3" repositories { mavenCentral() @@ -76,7 +76,7 @@ kotlin { all { languageSettings.apply { - useExperimentalAnnotation("kotlin.Experimental") + optIn("kotlin.Experimental") } } } diff --git a/samples/client/petstore/kotlin-enum-default-value/README.md b/samples/client/petstore/kotlin-enum-default-value/README.md index 665d735287..f2d8500aa2 100644 --- a/samples/client/petstore/kotlin-enum-default-value/README.md +++ b/samples/client/petstore/kotlin-enum-default-value/README.md @@ -11,7 +11,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.6.10 +* Kotlin 1.7.21 * Gradle 7.5 ## Build diff --git a/samples/client/petstore/kotlin-enum-default-value/build.gradle b/samples/client/petstore/kotlin-enum-default-value/build.gradle index 527140cfc8..43b2b3fa42 100644 --- a/samples/client/petstore/kotlin-enum-default-value/build.gradle +++ b/samples/client/petstore/kotlin-enum-default-value/build.gradle @@ -7,7 +7,7 @@ wrapper { } buildscript { - ext.kotlin_version = '1.6.10' + ext.kotlin_version = '1.7.21' repositories { maven { url "https://repo1.maven.org/maven2" } diff --git a/samples/client/petstore/kotlin-gson/README.md b/samples/client/petstore/kotlin-gson/README.md index e3f2108bfc..e639c6d663 100644 --- a/samples/client/petstore/kotlin-gson/README.md +++ b/samples/client/petstore/kotlin-gson/README.md @@ -11,7 +11,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.6.10 +* Kotlin 1.7.21 * Gradle 7.5 ## Build diff --git a/samples/client/petstore/kotlin-gson/build.gradle b/samples/client/petstore/kotlin-gson/build.gradle index 205e3365af..433706ed21 100644 --- a/samples/client/petstore/kotlin-gson/build.gradle +++ b/samples/client/petstore/kotlin-gson/build.gradle @@ -7,7 +7,7 @@ wrapper { } buildscript { - ext.kotlin_version = '1.6.10' + ext.kotlin_version = '1.7.21' repositories { maven { url "https://repo1.maven.org/maven2" } diff --git a/samples/client/petstore/kotlin-jackson/README.md b/samples/client/petstore/kotlin-jackson/README.md index e3f2108bfc..e639c6d663 100644 --- a/samples/client/petstore/kotlin-jackson/README.md +++ b/samples/client/petstore/kotlin-jackson/README.md @@ -11,7 +11,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.6.10 +* Kotlin 1.7.21 * Gradle 7.5 ## Build diff --git a/samples/client/petstore/kotlin-jackson/build.gradle b/samples/client/petstore/kotlin-jackson/build.gradle index e4d25c073c..8aff3040b4 100644 --- a/samples/client/petstore/kotlin-jackson/build.gradle +++ b/samples/client/petstore/kotlin-jackson/build.gradle @@ -7,7 +7,7 @@ wrapper { } buildscript { - ext.kotlin_version = '1.6.10' + ext.kotlin_version = '1.7.21' repositories { maven { url "https://repo1.maven.org/maven2" } diff --git a/samples/client/petstore/kotlin-json-request-string/README.md b/samples/client/petstore/kotlin-json-request-string/README.md index 928a13052e..7989ca8e5a 100644 --- a/samples/client/petstore/kotlin-json-request-string/README.md +++ b/samples/client/petstore/kotlin-json-request-string/README.md @@ -11,7 +11,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.6.10 +* Kotlin 1.7.21 * Gradle 7.5 ## Build diff --git a/samples/client/petstore/kotlin-json-request-string/build.gradle b/samples/client/petstore/kotlin-json-request-string/build.gradle index f495c77a74..f2e1ee62dd 100644 --- a/samples/client/petstore/kotlin-json-request-string/build.gradle +++ b/samples/client/petstore/kotlin-json-request-string/build.gradle @@ -7,7 +7,7 @@ wrapper { } buildscript { - ext.kotlin_version = '1.6.10' + ext.kotlin_version = '1.7.21' repositories { maven { url "https://repo1.maven.org/maven2" } @@ -32,7 +32,7 @@ test { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" - implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.3" + implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.4.1" implementation "com.squareup.okhttp3:okhttp:4.10.0" testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" } diff --git a/samples/client/petstore/kotlin-jvm-ktor-gson/README.md b/samples/client/petstore/kotlin-jvm-ktor-gson/README.md index e3f2108bfc..e639c6d663 100644 --- a/samples/client/petstore/kotlin-jvm-ktor-gson/README.md +++ b/samples/client/petstore/kotlin-jvm-ktor-gson/README.md @@ -11,7 +11,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.6.10 +* Kotlin 1.7.21 * Gradle 7.5 ## Build diff --git a/samples/client/petstore/kotlin-jvm-ktor-gson/build.gradle b/samples/client/petstore/kotlin-jvm-ktor-gson/build.gradle index 67441d77a6..67e0eaa959 100644 --- a/samples/client/petstore/kotlin-jvm-ktor-gson/build.gradle +++ b/samples/client/petstore/kotlin-jvm-ktor-gson/build.gradle @@ -7,8 +7,8 @@ wrapper { } buildscript { - ext.kotlin_version = '1.6.10' - ext.ktor_version = '2.1.2' + ext.kotlin_version = '1.7.21' + ext.ktor_version = '2.1.3' repositories { maven { url "https://repo1.maven.org/maven2" } diff --git a/samples/client/petstore/kotlin-jvm-ktor-jackson/README.md b/samples/client/petstore/kotlin-jvm-ktor-jackson/README.md index e3f2108bfc..e639c6d663 100644 --- a/samples/client/petstore/kotlin-jvm-ktor-jackson/README.md +++ b/samples/client/petstore/kotlin-jvm-ktor-jackson/README.md @@ -11,7 +11,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.6.10 +* Kotlin 1.7.21 * Gradle 7.5 ## Build diff --git a/samples/client/petstore/kotlin-jvm-ktor-jackson/build.gradle b/samples/client/petstore/kotlin-jvm-ktor-jackson/build.gradle index 072128b1ce..ba08faca5e 100644 --- a/samples/client/petstore/kotlin-jvm-ktor-jackson/build.gradle +++ b/samples/client/petstore/kotlin-jvm-ktor-jackson/build.gradle @@ -7,8 +7,8 @@ wrapper { } buildscript { - ext.kotlin_version = '1.6.10' - ext.ktor_version = '2.1.2' + ext.kotlin_version = '1.7.21' + ext.ktor_version = '2.1.3' repositories { maven { url "https://repo1.maven.org/maven2" } diff --git a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/README.md b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/README.md index e3f2108bfc..e639c6d663 100644 --- a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/README.md +++ b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/README.md @@ -11,7 +11,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.6.10 +* Kotlin 1.7.21 * Gradle 7.5 ## Build diff --git a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/build.gradle b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/build.gradle index 410fce57b4..750ca35800 100644 --- a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/build.gradle +++ b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/build.gradle @@ -7,7 +7,7 @@ wrapper { } buildscript { - ext.kotlin_version = '1.6.10' + ext.kotlin_version = '1.7.21' repositories { maven { url "https://repo1.maven.org/maven2" } @@ -29,7 +29,7 @@ test { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" - implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.3" + implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4" implementation "com.google.code.gson:gson:2.9.0" implementation "com.squareup.okhttp3:okhttp:4.10.0" testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" diff --git a/samples/client/petstore/kotlin-jvm-vertx-gson/README.md b/samples/client/petstore/kotlin-jvm-vertx-gson/README.md index e3f2108bfc..e639c6d663 100644 --- a/samples/client/petstore/kotlin-jvm-vertx-gson/README.md +++ b/samples/client/petstore/kotlin-jvm-vertx-gson/README.md @@ -11,7 +11,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.6.10 +* Kotlin 1.7.21 * Gradle 7.5 ## Build diff --git a/samples/client/petstore/kotlin-jvm-vertx-gson/build.gradle b/samples/client/petstore/kotlin-jvm-vertx-gson/build.gradle index 5dbc1fb23d..87adecca40 100644 --- a/samples/client/petstore/kotlin-jvm-vertx-gson/build.gradle +++ b/samples/client/petstore/kotlin-jvm-vertx-gson/build.gradle @@ -7,7 +7,7 @@ wrapper { } buildscript { - ext.kotlin_version = '1.6.10' + ext.kotlin_version = '1.7.21' ext.vertx_version = "4.3.3" repositories { diff --git a/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/README.md b/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/README.md index e3f2108bfc..e639c6d663 100644 --- a/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/README.md +++ b/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/README.md @@ -11,7 +11,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.6.10 +* Kotlin 1.7.21 * Gradle 7.5 ## Build diff --git a/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/build.gradle b/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/build.gradle index 563f957e3f..673cb2f4df 100644 --- a/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/build.gradle +++ b/samples/client/petstore/kotlin-jvm-vertx-jackson-coroutines/build.gradle @@ -7,7 +7,7 @@ wrapper { } buildscript { - ext.kotlin_version = '1.6.10' + ext.kotlin_version = '1.7.21' ext.vertx_version = "4.3.3" repositories { @@ -30,7 +30,7 @@ test { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" - implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.3" + implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4" implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.13.3" implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.13.3" diff --git a/samples/client/petstore/kotlin-jvm-vertx-jackson/README.md b/samples/client/petstore/kotlin-jvm-vertx-jackson/README.md index e3f2108bfc..e639c6d663 100644 --- a/samples/client/petstore/kotlin-jvm-vertx-jackson/README.md +++ b/samples/client/petstore/kotlin-jvm-vertx-jackson/README.md @@ -11,7 +11,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.6.10 +* Kotlin 1.7.21 * Gradle 7.5 ## Build diff --git a/samples/client/petstore/kotlin-jvm-vertx-jackson/build.gradle b/samples/client/petstore/kotlin-jvm-vertx-jackson/build.gradle index b28c2542d7..82d9d58a79 100644 --- a/samples/client/petstore/kotlin-jvm-vertx-jackson/build.gradle +++ b/samples/client/petstore/kotlin-jvm-vertx-jackson/build.gradle @@ -7,7 +7,7 @@ wrapper { } buildscript { - ext.kotlin_version = '1.6.10' + ext.kotlin_version = '1.7.21' ext.vertx_version = "4.3.3" repositories { diff --git a/samples/client/petstore/kotlin-jvm-vertx-moshi/README.md b/samples/client/petstore/kotlin-jvm-vertx-moshi/README.md index e3f2108bfc..e639c6d663 100644 --- a/samples/client/petstore/kotlin-jvm-vertx-moshi/README.md +++ b/samples/client/petstore/kotlin-jvm-vertx-moshi/README.md @@ -11,7 +11,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.6.10 +* Kotlin 1.7.21 * Gradle 7.5 ## Build diff --git a/samples/client/petstore/kotlin-jvm-vertx-moshi/build.gradle b/samples/client/petstore/kotlin-jvm-vertx-moshi/build.gradle index ec3e077d41..815a2b9bdf 100644 --- a/samples/client/petstore/kotlin-jvm-vertx-moshi/build.gradle +++ b/samples/client/petstore/kotlin-jvm-vertx-moshi/build.gradle @@ -7,7 +7,7 @@ wrapper { } buildscript { - ext.kotlin_version = '1.6.10' + ext.kotlin_version = '1.7.21' ext.vertx_version = "4.3.3" repositories { diff --git a/samples/client/petstore/kotlin-modelMutable/README.md b/samples/client/petstore/kotlin-modelMutable/README.md index e3f2108bfc..e639c6d663 100644 --- a/samples/client/petstore/kotlin-modelMutable/README.md +++ b/samples/client/petstore/kotlin-modelMutable/README.md @@ -11,7 +11,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.6.10 +* Kotlin 1.7.21 * Gradle 7.5 ## Build diff --git a/samples/client/petstore/kotlin-modelMutable/build.gradle b/samples/client/petstore/kotlin-modelMutable/build.gradle index 527140cfc8..43b2b3fa42 100644 --- a/samples/client/petstore/kotlin-modelMutable/build.gradle +++ b/samples/client/petstore/kotlin-modelMutable/build.gradle @@ -7,7 +7,7 @@ wrapper { } buildscript { - ext.kotlin_version = '1.6.10' + ext.kotlin_version = '1.7.21' repositories { maven { url "https://repo1.maven.org/maven2" } diff --git a/samples/client/petstore/kotlin-moshi-codegen/README.md b/samples/client/petstore/kotlin-moshi-codegen/README.md index e3f2108bfc..e639c6d663 100644 --- a/samples/client/petstore/kotlin-moshi-codegen/README.md +++ b/samples/client/petstore/kotlin-moshi-codegen/README.md @@ -11,7 +11,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.6.10 +* Kotlin 1.7.21 * Gradle 7.5 ## Build diff --git a/samples/client/petstore/kotlin-moshi-codegen/build.gradle b/samples/client/petstore/kotlin-moshi-codegen/build.gradle index 1f5a719c9d..177686ccbf 100644 --- a/samples/client/petstore/kotlin-moshi-codegen/build.gradle +++ b/samples/client/petstore/kotlin-moshi-codegen/build.gradle @@ -7,7 +7,7 @@ wrapper { } buildscript { - ext.kotlin_version = '1.6.10' + ext.kotlin_version = '1.7.21' repositories { maven { url "https://repo1.maven.org/maven2" } diff --git a/samples/client/petstore/kotlin-multiplatform/build.gradle.kts b/samples/client/petstore/kotlin-multiplatform/build.gradle.kts index 219d79917c..2aaf14f1d7 100644 --- a/samples/client/petstore/kotlin-multiplatform/build.gradle.kts +++ b/samples/client/petstore/kotlin-multiplatform/build.gradle.kts @@ -1,17 +1,17 @@ import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget plugins { - kotlin("multiplatform") version "1.6.0" // kotlin_version - kotlin("plugin.serialization") version "1.6.0" // kotlin_version + kotlin("multiplatform") version "1.7.21" // kotlin_version + kotlin("plugin.serialization") version "1.7.21" // kotlin_version } group = "org.openapitools" version = "1.0.0" -val kotlin_version = "1.6.10" -val coroutines_version = "1.6.3" +val kotlin_version = "1.7.21" +val coroutines_version = "1.6.4" val serialization_version = "1.3.3" -val ktor_version = "2.0.3" +val ktor_version = "2.1.3" repositories { mavenCentral() @@ -76,7 +76,7 @@ kotlin { all { languageSettings.apply { - useExperimentalAnnotation("kotlin.Experimental") + optIn("kotlin.Experimental") } } } diff --git a/samples/client/petstore/kotlin-nonpublic/README.md b/samples/client/petstore/kotlin-nonpublic/README.md index e3f2108bfc..e639c6d663 100644 --- a/samples/client/petstore/kotlin-nonpublic/README.md +++ b/samples/client/petstore/kotlin-nonpublic/README.md @@ -11,7 +11,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.6.10 +* Kotlin 1.7.21 * Gradle 7.5 ## Build diff --git a/samples/client/petstore/kotlin-nonpublic/build.gradle b/samples/client/petstore/kotlin-nonpublic/build.gradle index 527140cfc8..43b2b3fa42 100644 --- a/samples/client/petstore/kotlin-nonpublic/build.gradle +++ b/samples/client/petstore/kotlin-nonpublic/build.gradle @@ -7,7 +7,7 @@ wrapper { } buildscript { - ext.kotlin_version = '1.6.10' + ext.kotlin_version = '1.7.21' repositories { maven { url "https://repo1.maven.org/maven2" } diff --git a/samples/client/petstore/kotlin-nullable/README.md b/samples/client/petstore/kotlin-nullable/README.md index e3f2108bfc..e639c6d663 100644 --- a/samples/client/petstore/kotlin-nullable/README.md +++ b/samples/client/petstore/kotlin-nullable/README.md @@ -11,7 +11,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.6.10 +* Kotlin 1.7.21 * Gradle 7.5 ## Build diff --git a/samples/client/petstore/kotlin-nullable/build.gradle b/samples/client/petstore/kotlin-nullable/build.gradle index 527140cfc8..43b2b3fa42 100644 --- a/samples/client/petstore/kotlin-nullable/build.gradle +++ b/samples/client/petstore/kotlin-nullable/build.gradle @@ -7,7 +7,7 @@ wrapper { } buildscript { - ext.kotlin_version = '1.6.10' + ext.kotlin_version = '1.7.21' repositories { maven { url "https://repo1.maven.org/maven2" } diff --git a/samples/client/petstore/kotlin-okhttp3/README.md b/samples/client/petstore/kotlin-okhttp3/README.md index e3f2108bfc..e639c6d663 100644 --- a/samples/client/petstore/kotlin-okhttp3/README.md +++ b/samples/client/petstore/kotlin-okhttp3/README.md @@ -11,7 +11,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.6.10 +* Kotlin 1.7.21 * Gradle 7.5 ## Build diff --git a/samples/client/petstore/kotlin-okhttp3/build.gradle b/samples/client/petstore/kotlin-okhttp3/build.gradle index e48744c81e..759f2a40b5 100644 --- a/samples/client/petstore/kotlin-okhttp3/build.gradle +++ b/samples/client/petstore/kotlin-okhttp3/build.gradle @@ -7,7 +7,7 @@ wrapper { } buildscript { - ext.kotlin_version = '1.6.10' + ext.kotlin_version = '1.7.21' repositories { maven { url "https://repo1.maven.org/maven2" } diff --git a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/README.md b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/README.md index 473c874b30..a92b6bad73 100644 --- a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/README.md +++ b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/README.md @@ -11,7 +11,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.6.10 +* Kotlin 1.7.21 * Gradle 7.5 ## Build diff --git a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/build.gradle b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/build.gradle index e94a5d0130..4a0a28e61b 100644 --- a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/build.gradle +++ b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/build.gradle @@ -7,7 +7,7 @@ wrapper { } buildscript { - ext.kotlin_version = '1.6.10' + ext.kotlin_version = '1.7.21' ext.retrofitVersion = '2.9.0' repositories { @@ -32,7 +32,7 @@ test { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" - implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.3" + implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.4.1" implementation "org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:1.0.2" implementation "com.squareup.okhttp3:logging-interceptor:4.10.0" implementation "com.squareup.retrofit2:retrofit:$retrofitVersion" diff --git a/samples/client/petstore/kotlin-retrofit2-rx3/README.md b/samples/client/petstore/kotlin-retrofit2-rx3/README.md index 473c874b30..a92b6bad73 100644 --- a/samples/client/petstore/kotlin-retrofit2-rx3/README.md +++ b/samples/client/petstore/kotlin-retrofit2-rx3/README.md @@ -11,7 +11,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.6.10 +* Kotlin 1.7.21 * Gradle 7.5 ## Build diff --git a/samples/client/petstore/kotlin-retrofit2-rx3/build.gradle b/samples/client/petstore/kotlin-retrofit2-rx3/build.gradle index 8d3c9dd1bd..53ae2d6bdf 100644 --- a/samples/client/petstore/kotlin-retrofit2-rx3/build.gradle +++ b/samples/client/petstore/kotlin-retrofit2-rx3/build.gradle @@ -7,7 +7,7 @@ wrapper { } buildscript { - ext.kotlin_version = '1.6.10' + ext.kotlin_version = '1.7.21' ext.retrofitVersion = '2.9.0' ext.rxJava3Version = '3.0.12' diff --git a/samples/client/petstore/kotlin-retrofit2/README.md b/samples/client/petstore/kotlin-retrofit2/README.md index 473c874b30..a92b6bad73 100644 --- a/samples/client/petstore/kotlin-retrofit2/README.md +++ b/samples/client/petstore/kotlin-retrofit2/README.md @@ -11,7 +11,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.6.10 +* Kotlin 1.7.21 * Gradle 7.5 ## Build diff --git a/samples/client/petstore/kotlin-retrofit2/build.gradle b/samples/client/petstore/kotlin-retrofit2/build.gradle index 2c2228d9d6..95f7ab0f41 100644 --- a/samples/client/petstore/kotlin-retrofit2/build.gradle +++ b/samples/client/petstore/kotlin-retrofit2/build.gradle @@ -7,7 +7,7 @@ wrapper { } buildscript { - ext.kotlin_version = '1.6.10' + ext.kotlin_version = '1.7.21' ext.retrofitVersion = '2.9.0' repositories { diff --git a/samples/client/petstore/kotlin-string/README.md b/samples/client/petstore/kotlin-string/README.md index e3f2108bfc..e639c6d663 100644 --- a/samples/client/petstore/kotlin-string/README.md +++ b/samples/client/petstore/kotlin-string/README.md @@ -11,7 +11,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.6.10 +* Kotlin 1.7.21 * Gradle 7.5 ## Build diff --git a/samples/client/petstore/kotlin-string/build.gradle b/samples/client/petstore/kotlin-string/build.gradle index 527140cfc8..43b2b3fa42 100644 --- a/samples/client/petstore/kotlin-string/build.gradle +++ b/samples/client/petstore/kotlin-string/build.gradle @@ -7,7 +7,7 @@ wrapper { } buildscript { - ext.kotlin_version = '1.6.10' + ext.kotlin_version = '1.7.21' repositories { maven { url "https://repo1.maven.org/maven2" } diff --git a/samples/client/petstore/kotlin-threetenbp/README.md b/samples/client/petstore/kotlin-threetenbp/README.md index e3f2108bfc..e639c6d663 100644 --- a/samples/client/petstore/kotlin-threetenbp/README.md +++ b/samples/client/petstore/kotlin-threetenbp/README.md @@ -11,7 +11,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.6.10 +* Kotlin 1.7.21 * Gradle 7.5 ## Build diff --git a/samples/client/petstore/kotlin-threetenbp/build.gradle b/samples/client/petstore/kotlin-threetenbp/build.gradle index e27847c2f3..76b5e18fa5 100644 --- a/samples/client/petstore/kotlin-threetenbp/build.gradle +++ b/samples/client/petstore/kotlin-threetenbp/build.gradle @@ -7,7 +7,7 @@ wrapper { } buildscript { - ext.kotlin_version = '1.6.10' + ext.kotlin_version = '1.7.21' repositories { maven { url "https://repo1.maven.org/maven2" } diff --git a/samples/client/petstore/kotlin-uppercase-enum/README.md b/samples/client/petstore/kotlin-uppercase-enum/README.md index 40a6b5fa1a..c55bfe4f6a 100644 --- a/samples/client/petstore/kotlin-uppercase-enum/README.md +++ b/samples/client/petstore/kotlin-uppercase-enum/README.md @@ -11,7 +11,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.6.10 +* Kotlin 1.7.21 * Gradle 7.5 ## Build diff --git a/samples/client/petstore/kotlin-uppercase-enum/build.gradle b/samples/client/petstore/kotlin-uppercase-enum/build.gradle index 1df0362d6c..6b97e54c1b 100644 --- a/samples/client/petstore/kotlin-uppercase-enum/build.gradle +++ b/samples/client/petstore/kotlin-uppercase-enum/build.gradle @@ -7,7 +7,7 @@ wrapper { } buildscript { - ext.kotlin_version = '1.6.10' + ext.kotlin_version = '1.7.21' repositories { maven { url "https://repo1.maven.org/maven2" } @@ -31,7 +31,7 @@ test { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" - implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.3" + implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.4.1" implementation "com.squareup.okhttp3:okhttp:4.10.0" testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2" } diff --git a/samples/client/petstore/kotlin/README.md b/samples/client/petstore/kotlin/README.md index e3f2108bfc..e639c6d663 100644 --- a/samples/client/petstore/kotlin/README.md +++ b/samples/client/petstore/kotlin/README.md @@ -11,7 +11,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat ## Requires -* Kotlin 1.6.10 +* Kotlin 1.7.21 * Gradle 7.5 ## Build diff --git a/samples/client/petstore/kotlin/build.gradle b/samples/client/petstore/kotlin/build.gradle index 527140cfc8..43b2b3fa42 100644 --- a/samples/client/petstore/kotlin/build.gradle +++ b/samples/client/petstore/kotlin/build.gradle @@ -7,7 +7,7 @@ wrapper { } buildscript { - ext.kotlin_version = '1.6.10' + ext.kotlin_version = '1.7.21' repositories { maven { url "https://repo1.maven.org/maven2" } From 9f8ed6b0e288728cd653cf27c9ff4dc7c13028c7 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 29 Nov 2022 01:54:28 +0800 Subject: [PATCH 055/189] update customization doc with better example on using the inline schema name mapping option (#14135) --- docs/customization.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/customization.md b/docs/customization.md index 45255f009c..b180d783c2 100644 --- a/docs/customization.md +++ b/docs/customization.md @@ -430,11 +430,20 @@ paths: ## Inline Schema Naming -Inline schemas are created as separate schemas automatically and the auto-generated schema name may not look good to everyone. One can customize the name using the `title` field or the `inlineSchemaNameMapping` option, e.g. in CLI +Inline schemas are created as separate schemas automatically and the auto-generated schema name may not look good to everyone. One can customize the name using the `title` field or the `inlineSchemaNameMapping` option. For exmaple, run the following, ``` java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -g java -i modules/openapi-generator/src/test/resources/3_0/inline_model_resolver.yaml -o /tmp/java3/ --skip-validate-spec --inline-schema-name-mappings inline_object_2=SomethingMapped,inline_object_4=nothing_new ``` +will show the following in the console: +``` +[main] INFO o.o.codegen.InlineModelResolver - Inline schema created as arbitraryObjectRequestBodyProperty_request. To have complete control of the model name, set the `title` field or use the inlineSchemaNameMapping option (--inline-schema-name-mappings in CLI). +[main] INFO o.o.codegen.InlineModelResolver - Inline schema created as meta_200_response. To have complete control of the model name, set the `title` field or use the inlineSchemaNameMapping option (--inline-schema-name-mappings in CLI). +``` +For example, to name the inline schema `meta_200_response` as `MetaObject`, use the `--inline-schema-name-mappings` option as follows: +``` +java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -g java -i modules/openapi-generator/src/test/resources/3_0/inline_model_resolver.yaml -o /tmp/java3/ --skip-validate-spec --inline-schema-name-mappings meta_200_response=MetaObject,arbitraryObjectRequestBodyProperty_request=ArbitraryRequest +``` Another useful option is `inlineSchemaNameDefaults`, which allows you to customize the suffix of the auto-generated inline schema name, e.g. in CLI ``` From fabd0a8be2afba7111fe8088bcf009c25e57efdd Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 29 Nov 2022 10:55:03 +0800 Subject: [PATCH 056/189] update jackson databind to newer versions (#14136) --- .../Java/libraries/resttemplate/build.gradle.mustache | 6 +++--- .../resources/Java/libraries/resttemplate/pom.mustache | 10 +++++++--- .../JavaVertXWebServer/supportFiles/pom.mustache | 2 +- .../main/resources/java-undertow-server/pom.mustache | 4 ++-- .../petstore/java/resttemplate-swagger1/build.gradle | 6 +++--- .../client/petstore/java/resttemplate-swagger1/pom.xml | 6 +++--- .../petstore/java/resttemplate-withXml/build.gradle | 6 +++--- .../client/petstore/java/resttemplate-withXml/pom.xml | 6 +++--- samples/client/petstore/java/resttemplate/build.gradle | 6 +++--- samples/client/petstore/java/resttemplate/pom.xml | 6 +++--- samples/server/petstore/java-undertow/pom.xml | 4 ++-- samples/server/petstore/java-vertx-web/pom.xml | 2 +- 12 files changed, 34 insertions(+), 30 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/build.gradle.mustache index ba319ebc89..19dfe6d117 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/build.gradle.mustache @@ -97,9 +97,9 @@ if(hasProperty('target') && target == 'android') { } ext { - swagger_annotations_version = "1.5.22" - jackson_version = "2.13.4" - jackson_databind_version = "2.13.4.2" + swagger_annotations_version = "1.6.9" + jackson_version = "2.14.1" + jackson_databind_version = "2.14.1" {{#openApiNullable}} jackson_databind_nullable_version = "0.2.4" {{/openApiNullable}} diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/pom.mustache index b780d880de..325bcef4f3 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/pom.mustache @@ -253,11 +253,13 @@ jackson-jaxrs-json-provider ${jackson-version} + {{#openApiNullable}} org.openapitools jackson-databind-nullable ${jackson-databind-nullable-version} + {{/openApiNullable}} {{#withXml}} @@ -306,11 +308,13 @@ UTF-8 - 1.6.6 + 1.6.9 5.3.18 - 2.12.7 - 2.12.7 + 2.14.1 + 2.14.1 + {{#openApiNullable}} 0.2.4 + {{/openApiNullable}} 1.3.5 {{#joda}} 2.9.9 diff --git a/modules/openapi-generator/src/main/resources/JavaVertXWebServer/supportFiles/pom.mustache b/modules/openapi-generator/src/main/resources/JavaVertXWebServer/supportFiles/pom.mustache index f1c266b5dc..2e67baf7d9 100644 --- a/modules/openapi-generator/src/main/resources/JavaVertXWebServer/supportFiles/pom.mustache +++ b/modules/openapi-generator/src/main/resources/JavaVertXWebServer/supportFiles/pom.mustache @@ -20,7 +20,7 @@ 4.2.4 5.7.0 1.7.30 - 2.12.7 + 2.14.1 {{invokerPackage}}.HttpServerVerticle diff --git a/modules/openapi-generator/src/main/resources/java-undertow-server/pom.mustache b/modules/openapi-generator/src/main/resources/java-undertow-server/pom.mustache index b339616cd5..21396fa267 100644 --- a/modules/openapi-generator/src/main/resources/java-undertow-server/pom.mustache +++ b/modules/openapi-generator/src/main/resources/java-undertow-server/pom.mustache @@ -16,8 +16,8 @@ 1.8 UTF-8 0.1.1 - 2.12.7 - 2.12.7 + 2.14.1 + 2.14.1 1.7.21 0.5.2 4.5.3 diff --git a/samples/client/petstore/java/resttemplate-swagger1/build.gradle b/samples/client/petstore/java/resttemplate-swagger1/build.gradle index d441c4e64b..fad7db2df9 100644 --- a/samples/client/petstore/java/resttemplate-swagger1/build.gradle +++ b/samples/client/petstore/java/resttemplate-swagger1/build.gradle @@ -97,9 +97,9 @@ if(hasProperty('target') && target == 'android') { } ext { - swagger_annotations_version = "1.5.22" - jackson_version = "2.13.4" - jackson_databind_version = "2.13.4.2" + swagger_annotations_version = "1.6.9" + jackson_version = "2.14.1" + jackson_databind_version = "2.14.1" jackson_databind_nullable_version = "0.2.4" jakarta_annotation_version = "1.3.5" spring_web_version = "5.3.18" diff --git a/samples/client/petstore/java/resttemplate-swagger1/pom.xml b/samples/client/petstore/java/resttemplate-swagger1/pom.xml index 97214b9c74..9f99df0f36 100644 --- a/samples/client/petstore/java/resttemplate-swagger1/pom.xml +++ b/samples/client/petstore/java/resttemplate-swagger1/pom.xml @@ -271,10 +271,10 @@ UTF-8 - 1.6.6 + 1.6.9 5.3.18 - 2.12.7 - 2.12.7 + 2.14.1 + 2.14.1 0.2.4 1.3.5 1.0.0 diff --git a/samples/client/petstore/java/resttemplate-withXml/build.gradle b/samples/client/petstore/java/resttemplate-withXml/build.gradle index cb264be6fb..9f675fe177 100644 --- a/samples/client/petstore/java/resttemplate-withXml/build.gradle +++ b/samples/client/petstore/java/resttemplate-withXml/build.gradle @@ -97,9 +97,9 @@ if(hasProperty('target') && target == 'android') { } ext { - swagger_annotations_version = "1.5.22" - jackson_version = "2.13.4" - jackson_databind_version = "2.13.4.2" + swagger_annotations_version = "1.6.9" + jackson_version = "2.14.1" + jackson_databind_version = "2.14.1" jackson_databind_nullable_version = "0.2.4" jakarta_annotation_version = "1.3.5" spring_web_version = "5.3.18" diff --git a/samples/client/petstore/java/resttemplate-withXml/pom.xml b/samples/client/petstore/java/resttemplate-withXml/pom.xml index 789f27f61c..1fea82ac76 100644 --- a/samples/client/petstore/java/resttemplate-withXml/pom.xml +++ b/samples/client/petstore/java/resttemplate-withXml/pom.xml @@ -278,10 +278,10 @@ UTF-8 - 1.6.6 + 1.6.9 5.3.18 - 2.12.7 - 2.12.7 + 2.14.1 + 2.14.1 0.2.4 1.3.5 1.0.0 diff --git a/samples/client/petstore/java/resttemplate/build.gradle b/samples/client/petstore/java/resttemplate/build.gradle index d441c4e64b..fad7db2df9 100644 --- a/samples/client/petstore/java/resttemplate/build.gradle +++ b/samples/client/petstore/java/resttemplate/build.gradle @@ -97,9 +97,9 @@ if(hasProperty('target') && target == 'android') { } ext { - swagger_annotations_version = "1.5.22" - jackson_version = "2.13.4" - jackson_databind_version = "2.13.4.2" + swagger_annotations_version = "1.6.9" + jackson_version = "2.14.1" + jackson_databind_version = "2.14.1" jackson_databind_nullable_version = "0.2.4" jakarta_annotation_version = "1.3.5" spring_web_version = "5.3.18" diff --git a/samples/client/petstore/java/resttemplate/pom.xml b/samples/client/petstore/java/resttemplate/pom.xml index a73435d85b..922f7528c4 100644 --- a/samples/client/petstore/java/resttemplate/pom.xml +++ b/samples/client/petstore/java/resttemplate/pom.xml @@ -266,10 +266,10 @@ UTF-8 - 1.6.6 + 1.6.9 5.3.18 - 2.12.7 - 2.12.7 + 2.14.1 + 2.14.1 0.2.4 1.3.5 1.0.0 diff --git a/samples/server/petstore/java-undertow/pom.xml b/samples/server/petstore/java-undertow/pom.xml index 600c7f0be9..2e94e2b405 100644 --- a/samples/server/petstore/java-undertow/pom.xml +++ b/samples/server/petstore/java-undertow/pom.xml @@ -16,8 +16,8 @@ 1.8 UTF-8 0.1.1 - 2.12.7 - 2.12.7 + 2.14.1 + 2.14.1 1.7.21 0.5.2 4.5.3 diff --git a/samples/server/petstore/java-vertx-web/pom.xml b/samples/server/petstore/java-vertx-web/pom.xml index 0c475e0789..7c4747fca8 100644 --- a/samples/server/petstore/java-vertx-web/pom.xml +++ b/samples/server/petstore/java-vertx-web/pom.xml @@ -20,7 +20,7 @@ 4.2.4 5.7.0 1.7.30 - 2.12.7 + 2.14.1 org.openapitools.vertxweb.server.HttpServerVerticle From 3a26da76b0fe5e1f314c4be92a00678c6d3acfcd Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 29 Nov 2022 14:18:14 +0800 Subject: [PATCH 057/189] Better tests for Java native client (#14132) * add echo tests with java native client * fix echo server * fix github * add npm install * update samples * add license header * update smaples * add test for array of string * fix java native respone type casting * better code format * add license header --- .../samples-java-client-echo-api-jdk11.yaml | 42 ++ bin/configs/java-native-echo-api.yaml | 8 + .../codegen/languages/JavaClientCodegen.java | 18 + .../Java/libraries/native/api.mustache | 32 +- .../src/test/resources/3_0/echo_api.yaml | 138 ++++++ .../java/native/.github/workflows/maven.yml | 30 ++ .../client/echo_api/java/native/.gitignore | 21 + .../java/native/.openapi-generator-ignore | 23 + .../java/native/.openapi-generator/FILES | 36 ++ .../java/native/.openapi-generator/VERSION | 1 + .../client/echo_api/java/native/.travis.yml | 16 + samples/client/echo_api/java/native/README.md | 135 ++++++ .../echo_api/java/native/api/openapi.yaml | 129 +++++ .../client/echo_api/java/native/build.gradle | 79 +++ samples/client/echo_api/java/native/build.sbt | 1 + .../echo_api/java/native/docs/Category.md | 14 + .../client/echo_api/java/native/docs/Pet.md | 28 ++ .../echo_api/java/native/docs/QueryApi.md | 280 +++++++++++ .../client/echo_api/java/native/docs/Tag.md | 14 + ...lodeTrueArrayStringQueryObjectParameter.md | 13 + .../client/echo_api/java/native/git_push.sh | 57 +++ .../echo_api/java/native/gradle.properties | 0 .../native/gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 59536 bytes .../gradle/wrapper/gradle-wrapper.properties | 5 + samples/client/echo_api/java/native/gradlew | 234 +++++++++ .../client/echo_api/java/native/gradlew.bat | 89 ++++ samples/client/echo_api/java/native/pom.xml | 216 +++++++++ .../echo_api/java/native/settings.gradle | 1 + .../java/native/src/main/AndroidManifest.xml | 3 + .../org/openapitools/client/ApiClient.java | 456 ++++++++++++++++++ .../org/openapitools/client/ApiException.java | 90 ++++ .../org/openapitools/client/ApiResponse.java | 59 +++ .../openapitools/client/Configuration.java | 39 ++ .../java/org/openapitools/client/JSON.java | 248 ++++++++++ .../java/org/openapitools/client/Pair.java | 57 +++ .../client/RFC3339DateFormat.java | 57 +++ .../client/ServerConfiguration.java | 58 +++ .../openapitools/client/ServerVariable.java | 23 + .../org/openapitools/client/api/QueryApi.java | 253 ++++++++++ .../client/model/AbstractOpenApiSchema.java | 147 ++++++ .../openapitools/client/model/Category.java | 139 ++++++ .../org/openapitools/client/model/Pet.java | 317 ++++++++++++ .../org/openapitools/client/model/Tag.java | 139 ++++++ ...deTrueArrayStringQueryObjectParameter.java | 118 +++++ .../org/openapitools/client/CustomTest.java | 70 +++ .../client/EchoServerResponseParser.java | 51 ++ .../openapitools/client/api/QueryApiTest.java | 54 +++ .../client/model/CategoryTest.java | 56 +++ .../openapitools/client/model/PetTest.java | 92 ++++ .../openapitools/client/model/TagTest.java | 56 +++ ...ueArrayStringQueryObjectParameterTest.java | 50 ++ .../client/api/AnotherFakeApi.java | 1 - .../openapitools/client/api/DefaultApi.java | 1 - .../org/openapitools/client/api/FakeApi.java | 17 - .../client/api/FakeClassnameTags123Api.java | 1 - .../org/openapitools/client/api/PetApi.java | 9 - .../org/openapitools/client/api/StoreApi.java | 4 - .../org/openapitools/client/api/UserApi.java | 8 - 58 files changed, 4288 insertions(+), 45 deletions(-) create mode 100644 .github/workflows/samples-java-client-echo-api-jdk11.yaml create mode 100644 bin/configs/java-native-echo-api.yaml create mode 100644 modules/openapi-generator/src/test/resources/3_0/echo_api.yaml create mode 100644 samples/client/echo_api/java/native/.github/workflows/maven.yml create mode 100644 samples/client/echo_api/java/native/.gitignore create mode 100644 samples/client/echo_api/java/native/.openapi-generator-ignore create mode 100644 samples/client/echo_api/java/native/.openapi-generator/FILES create mode 100644 samples/client/echo_api/java/native/.openapi-generator/VERSION create mode 100644 samples/client/echo_api/java/native/.travis.yml create mode 100644 samples/client/echo_api/java/native/README.md create mode 100644 samples/client/echo_api/java/native/api/openapi.yaml create mode 100644 samples/client/echo_api/java/native/build.gradle create mode 100644 samples/client/echo_api/java/native/build.sbt create mode 100644 samples/client/echo_api/java/native/docs/Category.md create mode 100644 samples/client/echo_api/java/native/docs/Pet.md create mode 100644 samples/client/echo_api/java/native/docs/QueryApi.md create mode 100644 samples/client/echo_api/java/native/docs/Tag.md create mode 100644 samples/client/echo_api/java/native/docs/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md create mode 100644 samples/client/echo_api/java/native/git_push.sh create mode 100644 samples/client/echo_api/java/native/gradle.properties create mode 100644 samples/client/echo_api/java/native/gradle/wrapper/gradle-wrapper.jar create mode 100644 samples/client/echo_api/java/native/gradle/wrapper/gradle-wrapper.properties create mode 100644 samples/client/echo_api/java/native/gradlew create mode 100644 samples/client/echo_api/java/native/gradlew.bat create mode 100644 samples/client/echo_api/java/native/pom.xml create mode 100644 samples/client/echo_api/java/native/settings.gradle create mode 100644 samples/client/echo_api/java/native/src/main/AndroidManifest.xml create mode 100644 samples/client/echo_api/java/native/src/main/java/org/openapitools/client/ApiClient.java create mode 100644 samples/client/echo_api/java/native/src/main/java/org/openapitools/client/ApiException.java create mode 100644 samples/client/echo_api/java/native/src/main/java/org/openapitools/client/ApiResponse.java create mode 100644 samples/client/echo_api/java/native/src/main/java/org/openapitools/client/Configuration.java create mode 100644 samples/client/echo_api/java/native/src/main/java/org/openapitools/client/JSON.java create mode 100644 samples/client/echo_api/java/native/src/main/java/org/openapitools/client/Pair.java create mode 100644 samples/client/echo_api/java/native/src/main/java/org/openapitools/client/RFC3339DateFormat.java create mode 100644 samples/client/echo_api/java/native/src/main/java/org/openapitools/client/ServerConfiguration.java create mode 100644 samples/client/echo_api/java/native/src/main/java/org/openapitools/client/ServerVariable.java create mode 100644 samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/QueryApi.java create mode 100644 samples/client/echo_api/java/native/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java create mode 100644 samples/client/echo_api/java/native/src/main/java/org/openapitools/client/model/Category.java create mode 100644 samples/client/echo_api/java/native/src/main/java/org/openapitools/client/model/Pet.java create mode 100644 samples/client/echo_api/java/native/src/main/java/org/openapitools/client/model/Tag.java create mode 100644 samples/client/echo_api/java/native/src/main/java/org/openapitools/client/model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.java create mode 100644 samples/client/echo_api/java/native/src/test/java/org/openapitools/client/CustomTest.java create mode 100644 samples/client/echo_api/java/native/src/test/java/org/openapitools/client/EchoServerResponseParser.java create mode 100644 samples/client/echo_api/java/native/src/test/java/org/openapitools/client/api/QueryApiTest.java create mode 100644 samples/client/echo_api/java/native/src/test/java/org/openapitools/client/model/CategoryTest.java create mode 100644 samples/client/echo_api/java/native/src/test/java/org/openapitools/client/model/PetTest.java create mode 100644 samples/client/echo_api/java/native/src/test/java/org/openapitools/client/model/TagTest.java create mode 100644 samples/client/echo_api/java/native/src/test/java/org/openapitools/client/model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameterTest.java diff --git a/.github/workflows/samples-java-client-echo-api-jdk11.yaml b/.github/workflows/samples-java-client-echo-api-jdk11.yaml new file mode 100644 index 0000000000..6f088440bb --- /dev/null +++ b/.github/workflows/samples-java-client-echo-api-jdk11.yaml @@ -0,0 +1,42 @@ +name: Java Client (Echo API) JDK11 + +on: + push: + paths: + - samples/client/echo_api/java/** + pull_request: + paths: + - samples/client/echo_api/java/** +jobs: + build: + name: Build Java Client JDK11 + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + sample: + # clients + - samples/client/echo_api/java/native + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: 11 + - name: Cache maven dependencies + uses: actions/cache@v3 + env: + cache-name: maven-repository + with: + path: | + ~/.m2 + key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }} + - name: Setup node.js + uses: actions/setup-node@v3 + - name: Run echo server + run: | + git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server + (cd http-echo-server && npm install && npm start &) + - name: Build + working-directory: ${{ matrix.sample }} + run: mvn clean package diff --git a/bin/configs/java-native-echo-api.yaml b/bin/configs/java-native-echo-api.yaml new file mode 100644 index 0000000000..dd14faddab --- /dev/null +++ b/bin/configs/java-native-echo-api.yaml @@ -0,0 +1,8 @@ +generatorName: java +outputDir: samples/client/echo_api/java/native +library: native +inputSpec: modules/openapi-generator/src/test/resources/3_0/echo_api.yaml +templateDir: modules/openapi-generator/src/main/resources/Java +additionalProperties: + artifactId: echo-api-native + hideGenerationTimestamp: "true" diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java index a0aae6cc17..fe59a2216c 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java @@ -795,6 +795,24 @@ public class JavaClientCodegen extends AbstractJavaCodegen } } + if (NATIVE.equals(getLibrary()) || APACHE.equals(getLibrary())) { + OperationMap operations = objs.getOperations(); + List operationList = operations.getOperation(); + Pattern methodPattern = Pattern.compile("^(.*):([^:]*)$"); + for (CodegenOperation op : operationList) { + // add extension to indicate content type is `text/plain` and the response type is `String` + if (op.produces != null) { + for (Map produce : op.produces) { + if ("text/plain".equalsIgnoreCase(produce.get("mediaType")) + && "String".equals(op.returnType)) { + op.vendorExtensions.put("x-java-text-plain-string", true); + continue; + } + } + } + } + } + if (MICROPROFILE.equals(getLibrary())) { objs = AbstractJavaJAXRSServerCodegen.jaxrsPostProcessOperations(objs); } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/native/api.mustache index 4d30cbe57b..e5af481f06 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/native/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/native/api.mustache @@ -237,13 +237,37 @@ public class {{classname}} { if (localVarResponse.statusCode()/ 100 != 2) { throw getApiException("{{operationId}}", localVarResponse); } - {{#returnType}}InputStream responseBody = localVarResponse.body(); - {{/returnType}}return new ApiResponse<{{{returnType}}}{{^returnType}}Void{{/returnType}}>( + {{#vendorExtensions.x-java-text-plain-string}} + // for plain text response + InputStream responseBody = localVarResponse.body(); + if (localVarResponse.headers().map().containsKey("Content-Type") && + "text/plain".equalsIgnoreCase(localVarResponse.headers().map().get("Content-Type").get(0))) { + java.util.Scanner s = new java.util.Scanner(responseBody).useDelimiter("\\A"); + String responseBodyText = s.hasNext() ? s.next() : ""; + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBodyText + ); + } else { + throw new RuntimeException("Error! The response Content-Type is supposed to be `text/plain` but it's not: " + localVarResponse); + } + {{/vendorExtensions.x-java-text-plain-string}} + {{^vendorExtensions.x-java-text-plain-string}} + {{#returnType}} + InputStream responseBody = localVarResponse.body(); + {{/returnType}} + return new ApiResponse<{{{returnType}}}{{^returnType}}Void{{/returnType}}>( localVarResponse.statusCode(), localVarResponse.headers().map(), - {{#returnType}}responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference<{{{returnType}}}>() {}) // closes the InputStream{{/returnType}} - {{^returnType}}null{{/returnType}} + {{#returnType}} + responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference<{{{returnType}}}>() {}) // closes the InputStream + {{/returnType}} + {{^returnType}} + null + {{/returnType}} ); + {{/vendorExtensions.x-java-text-plain-string}} } finally { {{^returnType}} // Drain the InputStream diff --git a/modules/openapi-generator/src/test/resources/3_0/echo_api.yaml b/modules/openapi-generator/src/test/resources/3_0/echo_api.yaml new file mode 100644 index 0000000000..968f890cd3 --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/echo_api.yaml @@ -0,0 +1,138 @@ +# +# Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +openapi: 3.0.3 +info: + title: Echo Server API + description: Echo Server API + contact: + email: team@openapitools.org + license: + name: Apache 2.0 + url: http://www.apache.org/licenses/LICENSE-2.0.html + version: 0.1.0 +servers: + - url: http://localhost:3000/ +paths: + /query/style_form/explode_true/array_string: + get: + tags: + - query + summary: Test query parameter(s) + description: Test query parameter(s) + operationId: test/query/style_form/explode_true/array_string + parameters: + - in: query + name: query_object + style: form #default + explode: true #default + schema: + type: object + properties: + values: + type: array + items: + type: string + responses: + '200': + description: Successful operation + content: + text/plain: + schema: + type: string + /query/style_form/explode_true/object: + get: + tags: + - query + summary: Test query parameter(s) + description: Test query parameter(s) + operationId: test/query/style_form/explode_true/object + parameters: + - in: query + name: query_object + style: form #default + explode: true #default + schema: + $ref: '#/components/schemas/Pet' + responses: + '200': + description: Successful operation + content: + text/plain: + schema: + type: string + +components: + schemas: + Category: + type: object + properties: + id: + type: integer + format: int64 + example: 1 + name: + type: string + example: Dogs + xml: + name: category + Tag: + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + xml: + name: tag + Pet: + required: + - name + - photoUrls + type: object + properties: + id: + type: integer + format: int64 + example: 10 + name: + type: string + example: doggie + category: + $ref: '#/components/schemas/Category' + photoUrls: + type: array + xml: + wrapped: true + items: + type: string + xml: + name: photoUrl + tags: + type: array + xml: + wrapped: true + items: + $ref: '#/components/schemas/Tag' + status: + type: string + description: pet status in the store + enum: + - available + - pending + - sold + xml: + name: pet diff --git a/samples/client/echo_api/java/native/.github/workflows/maven.yml b/samples/client/echo_api/java/native/.github/workflows/maven.yml new file mode 100644 index 0000000000..aa75c11642 --- /dev/null +++ b/samples/client/echo_api/java/native/.github/workflows/maven.yml @@ -0,0 +1,30 @@ +# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven +# +# This file is auto-generated by OpenAPI Generator (https://openapi-generator.tech) + +name: Java CI with Maven + +on: + push: + branches: [ main, master ] + pull_request: + branches: [ main, master ] + +jobs: + build: + name: Build Echo Server API + runs-on: ubuntu-latest + strategy: + matrix: + java: [ '8' ] + steps: + - uses: actions/checkout@v2 + - name: Set up JDK + uses: actions/setup-java@v2 + with: + java-version: ${{ matrix.java }} + distribution: 'temurin' + cache: maven + - name: Build with Maven + run: mvn -B package --no-transfer-progress --file pom.xml diff --git a/samples/client/echo_api/java/native/.gitignore b/samples/client/echo_api/java/native/.gitignore new file mode 100644 index 0000000000..a530464afa --- /dev/null +++ b/samples/client/echo_api/java/native/.gitignore @@ -0,0 +1,21 @@ +*.class + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.ear + +# exclude jar for gradle wrapper +!gradle/wrapper/*.jar + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* + +# build files +**/target +target +.gradle +build diff --git a/samples/client/echo_api/java/native/.openapi-generator-ignore b/samples/client/echo_api/java/native/.openapi-generator-ignore new file mode 100644 index 0000000000..7484ee590a --- /dev/null +++ b/samples/client/echo_api/java/native/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/samples/client/echo_api/java/native/.openapi-generator/FILES b/samples/client/echo_api/java/native/.openapi-generator/FILES new file mode 100644 index 0000000000..47b38d17c7 --- /dev/null +++ b/samples/client/echo_api/java/native/.openapi-generator/FILES @@ -0,0 +1,36 @@ +.github/workflows/maven.yml +.gitignore +.travis.yml +README.md +api/openapi.yaml +build.gradle +build.sbt +docs/Category.md +docs/Pet.md +docs/QueryApi.md +docs/Tag.md +docs/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md +git_push.sh +gradle.properties +gradle/wrapper/gradle-wrapper.jar +gradle/wrapper/gradle-wrapper.properties +gradlew +gradlew.bat +pom.xml +settings.gradle +src/main/AndroidManifest.xml +src/main/java/org/openapitools/client/ApiClient.java +src/main/java/org/openapitools/client/ApiException.java +src/main/java/org/openapitools/client/ApiResponse.java +src/main/java/org/openapitools/client/Configuration.java +src/main/java/org/openapitools/client/JSON.java +src/main/java/org/openapitools/client/Pair.java +src/main/java/org/openapitools/client/RFC3339DateFormat.java +src/main/java/org/openapitools/client/ServerConfiguration.java +src/main/java/org/openapitools/client/ServerVariable.java +src/main/java/org/openapitools/client/api/QueryApi.java +src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java +src/main/java/org/openapitools/client/model/Category.java +src/main/java/org/openapitools/client/model/Pet.java +src/main/java/org/openapitools/client/model/Tag.java +src/main/java/org/openapitools/client/model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.java diff --git a/samples/client/echo_api/java/native/.openapi-generator/VERSION b/samples/client/echo_api/java/native/.openapi-generator/VERSION new file mode 100644 index 0000000000..d6b4ec4aa7 --- /dev/null +++ b/samples/client/echo_api/java/native/.openapi-generator/VERSION @@ -0,0 +1 @@ +6.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/echo_api/java/native/.travis.yml b/samples/client/echo_api/java/native/.travis.yml new file mode 100644 index 0000000000..c946474792 --- /dev/null +++ b/samples/client/echo_api/java/native/.travis.yml @@ -0,0 +1,16 @@ +# +# Generated by: https://openapi-generator.tech +# +language: java +jdk: + - oraclejdk11 +before_install: + # ensure gradlew has proper permission + - chmod a+x ./gradlew +script: + # test using maven + - mvn test + # uncomment below to test using gradle + # - gradle test + # uncomment below to test using sbt + # - sbt test diff --git a/samples/client/echo_api/java/native/README.md b/samples/client/echo_api/java/native/README.md new file mode 100644 index 0000000000..ffea3d084c --- /dev/null +++ b/samples/client/echo_api/java/native/README.md @@ -0,0 +1,135 @@ +# echo-api-native + +Echo Server API + +- API version: 0.1.0 + +Echo Server API + + +*Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech)* + +## Requirements + +Building the API client library requires: + +1. Java 11+ +2. Maven/Gradle + +## Installation + +To install the API client library to your local Maven repository, simply execute: + +```shell +mvn clean install +``` + +To deploy it to a remote Maven repository instead, configure the settings of the repository and execute: + +```shell +mvn clean deploy +``` + +Refer to the [OSSRH Guide](http://central.sonatype.org/pages/ossrh-guide.html) for more information. + +### Maven users + +Add this dependency to your project's POM: + +```xml + + org.openapitools + echo-api-native + 0.1.0 + compile + +``` + +### Gradle users + +Add this dependency to your project's build file: + +```groovy +compile "org.openapitools:echo-api-native:0.1.0" +``` + +### Others + +At first generate the JAR by executing: + +```shell +mvn clean package +``` + +Then manually install the following JARs: + +- `target/echo-api-native-0.1.0.jar` +- `target/lib/*.jar` + +## Getting Started + +Please follow the [installation](#installation) instruction and execute the following Java code: + +```java + +import org.openapitools.client.*; +import org.openapitools.client.model.*; +import org.openapitools.client.api.QueryApi; + +public class QueryApiExample { + + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + // Configure clients using the `defaultClient` object, such as + // overriding the host and port, timeout, etc. + QueryApi apiInstance = new QueryApi(defaultClient); + TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter queryObject = new HashMap(); // TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter | + try { + String result = apiInstance.testQueryStyleFormExplodeTrueArrayString(queryObject); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling QueryApi#testQueryStyleFormExplodeTrueArrayString"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} + +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://localhost:3000* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*QueryApi* | [**testQueryStyleFormExplodeTrueArrayString**](docs/QueryApi.md#testQueryStyleFormExplodeTrueArrayString) | **GET** /query/style_form/explode_true/array_string | Test query parameter(s) +*QueryApi* | [**testQueryStyleFormExplodeTrueArrayStringWithHttpInfo**](docs/QueryApi.md#testQueryStyleFormExplodeTrueArrayStringWithHttpInfo) | **GET** /query/style_form/explode_true/array_string | Test query parameter(s) +*QueryApi* | [**testQueryStyleFormExplodeTrueObject**](docs/QueryApi.md#testQueryStyleFormExplodeTrueObject) | **GET** /query/style_form/explode_true/object | Test query parameter(s) +*QueryApi* | [**testQueryStyleFormExplodeTrueObjectWithHttpInfo**](docs/QueryApi.md#testQueryStyleFormExplodeTrueObjectWithHttpInfo) | **GET** /query/style_form/explode_true/object | Test query parameter(s) + + +## Documentation for Models + + - [Category](docs/Category.md) + - [Pet](docs/Pet.md) + - [Tag](docs/Tag.md) + - [TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter](docs/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md) + + +## Documentation for Authorization + +All endpoints do not require authorization. +Authentication schemes defined for the API: + +## Recommendation + +It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues. +However, the instances of the api clients created from the `ApiClient` are thread-safe and can be re-used. + +## Author + +team@openapitools.org + diff --git a/samples/client/echo_api/java/native/api/openapi.yaml b/samples/client/echo_api/java/native/api/openapi.yaml new file mode 100644 index 0000000000..5ea2d69650 --- /dev/null +++ b/samples/client/echo_api/java/native/api/openapi.yaml @@ -0,0 +1,129 @@ +openapi: 3.0.3 +info: + contact: + email: team@openapitools.org + description: Echo Server API + license: + name: Apache 2.0 + url: http://www.apache.org/licenses/LICENSE-2.0.html + title: Echo Server API + version: 0.1.0 +servers: +- url: http://localhost:3000/ +paths: + /query/style_form/explode_true/array_string: + get: + description: Test query parameter(s) + operationId: test/query/style_form/explode_true/array_string + parameters: + - explode: true + in: query + name: query_object + required: false + schema: + $ref: '#/components/schemas/test_query_style_form_explode_true_array_string_query_object_parameter' + style: form + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test query parameter(s) + tags: + - query + x-accepts: text/plain + /query/style_form/explode_true/object: + get: + description: Test query parameter(s) + operationId: test/query/style_form/explode_true/object + parameters: + - explode: true + in: query + name: query_object + required: false + schema: + $ref: '#/components/schemas/Pet' + style: form + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test query parameter(s) + tags: + - query + x-accepts: text/plain +components: + schemas: + Category: + properties: + id: + example: 1 + format: int64 + type: integer + name: + example: Dogs + type: string + type: object + xml: + name: category + Tag: + properties: + id: + format: int64 + type: integer + name: + type: string + type: object + xml: + name: tag + Pet: + properties: + id: + example: 10 + format: int64 + type: integer + name: + example: doggie + type: string + category: + $ref: '#/components/schemas/Category' + photoUrls: + items: + type: string + xml: + name: photoUrl + type: array + xml: + wrapped: true + tags: + items: + $ref: '#/components/schemas/Tag' + type: array + xml: + wrapped: true + status: + description: pet status in the store + enum: + - available + - pending + - sold + type: string + required: + - name + - photoUrls + type: object + xml: + name: pet + test_query_style_form_explode_true_array_string_query_object_parameter: + properties: + values: + items: + type: string + type: array + type: object + diff --git a/samples/client/echo_api/java/native/build.gradle b/samples/client/echo_api/java/native/build.gradle new file mode 100644 index 0000000000..11d6ec16c5 --- /dev/null +++ b/samples/client/echo_api/java/native/build.gradle @@ -0,0 +1,79 @@ +apply plugin: 'idea' +apply plugin: 'eclipse' + +group = 'org.openapitools' +version = '0.1.0' + +buildscript { + repositories { + mavenCentral() + } +} + +repositories { + mavenCentral() +} + +apply plugin: 'java' +apply plugin: 'maven-publish' + +sourceCompatibility = JavaVersion.VERSION_11 +targetCompatibility = JavaVersion.VERSION_11 + +// Some text from the schema is copy pasted into the source files as UTF-8 +// but the default still seems to be to use platform encoding +tasks.withType(JavaCompile) { + configure(options) { + options.encoding = 'UTF-8' + } +} +javadoc { + options.encoding = 'UTF-8' +} + +publishing { + publications { + maven(MavenPublication) { + artifactId = 'echo-api-native' + from components.java + } + } +} + +task execute(type:JavaExec) { + main = System.getProperty('mainClass') + classpath = sourceSets.main.runtimeClasspath +} + +task sourcesJar(type: Jar, dependsOn: classes) { + classifier = 'sources' + from sourceSets.main.allSource +} + +task javadocJar(type: Jar, dependsOn: javadoc) { + classifier = 'javadoc' + from javadoc.destinationDir +} + +artifacts { + archives sourcesJar + archives javadocJar +} + + +ext { + jackson_version = "2.14.1" + jakarta_annotation_version = "1.3.5" + junit_version = "4.13.2" +} + +dependencies { + implementation "com.google.code.findbugs:jsr305:3.0.2" + implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version" + implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" + implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_version" + implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" + implementation "org.openapitools:jackson-databind-nullable:0.2.1" + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + testImplementation "junit:junit:$junit_version" +} diff --git a/samples/client/echo_api/java/native/build.sbt b/samples/client/echo_api/java/native/build.sbt new file mode 100644 index 0000000000..464090415c --- /dev/null +++ b/samples/client/echo_api/java/native/build.sbt @@ -0,0 +1 @@ +# TODO diff --git a/samples/client/echo_api/java/native/docs/Category.md b/samples/client/echo_api/java/native/docs/Category.md new file mode 100644 index 0000000000..7289ebf585 --- /dev/null +++ b/samples/client/echo_api/java/native/docs/Category.md @@ -0,0 +1,14 @@ + + +# Category + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | [optional] | + + + diff --git a/samples/client/echo_api/java/native/docs/Pet.md b/samples/client/echo_api/java/native/docs/Pet.md new file mode 100644 index 0000000000..82aa8a25ed --- /dev/null +++ b/samples/client/echo_api/java/native/docs/Pet.md @@ -0,0 +1,28 @@ + + +# Pet + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | | +|**category** | [**Category**](Category.md) | | [optional] | +|**photoUrls** | **List<String>** | | | +|**tags** | [**List<Tag>**](Tag.md) | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] | + + + +## Enum: StatusEnum + +| Name | Value | +|---- | -----| +| AVAILABLE | "available" | +| PENDING | "pending" | +| SOLD | "sold" | + + + diff --git a/samples/client/echo_api/java/native/docs/QueryApi.md b/samples/client/echo_api/java/native/docs/QueryApi.md new file mode 100644 index 0000000000..0cc16db7c2 --- /dev/null +++ b/samples/client/echo_api/java/native/docs/QueryApi.md @@ -0,0 +1,280 @@ +# QueryApi + +All URIs are relative to *http://localhost:3000* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**testQueryStyleFormExplodeTrueArrayString**](QueryApi.md#testQueryStyleFormExplodeTrueArrayString) | **GET** /query/style_form/explode_true/array_string | Test query parameter(s) | +| [**testQueryStyleFormExplodeTrueArrayStringWithHttpInfo**](QueryApi.md#testQueryStyleFormExplodeTrueArrayStringWithHttpInfo) | **GET** /query/style_form/explode_true/array_string | Test query parameter(s) | +| [**testQueryStyleFormExplodeTrueObject**](QueryApi.md#testQueryStyleFormExplodeTrueObject) | **GET** /query/style_form/explode_true/object | Test query parameter(s) | +| [**testQueryStyleFormExplodeTrueObjectWithHttpInfo**](QueryApi.md#testQueryStyleFormExplodeTrueObjectWithHttpInfo) | **GET** /query/style_form/explode_true/object | Test query parameter(s) | + + + +## testQueryStyleFormExplodeTrueArrayString + +> String testQueryStyleFormExplodeTrueArrayString(queryObject) + +Test query parameter(s) + +Test query parameter(s) + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.QueryApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + QueryApi apiInstance = new QueryApi(defaultClient); + TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter queryObject = new HashMap(); // TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter | + try { + String result = apiInstance.testQueryStyleFormExplodeTrueArrayString(queryObject); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling QueryApi#testQueryStyleFormExplodeTrueArrayString"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queryObject** | [**TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter**](.md)| | [optional] | + +### Return type + +**String** + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + +## testQueryStyleFormExplodeTrueArrayStringWithHttpInfo + +> ApiResponse testQueryStyleFormExplodeTrueArrayString testQueryStyleFormExplodeTrueArrayStringWithHttpInfo(queryObject) + +Test query parameter(s) + +Test query parameter(s) + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.ApiResponse; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.QueryApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + QueryApi apiInstance = new QueryApi(defaultClient); + TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter queryObject = new HashMap(); // TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter | + try { + ApiResponse response = apiInstance.testQueryStyleFormExplodeTrueArrayStringWithHttpInfo(queryObject); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling QueryApi#testQueryStyleFormExplodeTrueArrayString"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queryObject** | [**TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter**](.md)| | [optional] | + +### Return type + +ApiResponse<**String**> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + + +## testQueryStyleFormExplodeTrueObject + +> String testQueryStyleFormExplodeTrueObject(queryObject) + +Test query parameter(s) + +Test query parameter(s) + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.QueryApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + QueryApi apiInstance = new QueryApi(defaultClient); + Pet queryObject = new HashMap(); // Pet | + try { + String result = apiInstance.testQueryStyleFormExplodeTrueObject(queryObject); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling QueryApi#testQueryStyleFormExplodeTrueObject"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queryObject** | [**Pet**](.md)| | [optional] | + +### Return type + +**String** + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + +## testQueryStyleFormExplodeTrueObjectWithHttpInfo + +> ApiResponse testQueryStyleFormExplodeTrueObject testQueryStyleFormExplodeTrueObjectWithHttpInfo(queryObject) + +Test query parameter(s) + +Test query parameter(s) + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.ApiResponse; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.QueryApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + QueryApi apiInstance = new QueryApi(defaultClient); + Pet queryObject = new HashMap(); // Pet | + try { + ApiResponse response = apiInstance.testQueryStyleFormExplodeTrueObjectWithHttpInfo(queryObject); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling QueryApi#testQueryStyleFormExplodeTrueObject"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queryObject** | [**Pet**](.md)| | [optional] | + +### Return type + +ApiResponse<**String**> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + diff --git a/samples/client/echo_api/java/native/docs/Tag.md b/samples/client/echo_api/java/native/docs/Tag.md new file mode 100644 index 0000000000..5088b2dd1c --- /dev/null +++ b/samples/client/echo_api/java/native/docs/Tag.md @@ -0,0 +1,14 @@ + + +# Tag + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | [optional] | + + + diff --git a/samples/client/echo_api/java/native/docs/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md b/samples/client/echo_api/java/native/docs/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md new file mode 100644 index 0000000000..9235e80fb8 --- /dev/null +++ b/samples/client/echo_api/java/native/docs/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md @@ -0,0 +1,13 @@ + + +# TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**values** | **List<String>** | | [optional] | + + + diff --git a/samples/client/echo_api/java/native/git_push.sh b/samples/client/echo_api/java/native/git_push.sh new file mode 100644 index 0000000000..f53a75d4fa --- /dev/null +++ b/samples/client/echo_api/java/native/git_push.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/samples/client/echo_api/java/native/gradle.properties b/samples/client/echo_api/java/native/gradle.properties new file mode 100644 index 0000000000..e69de29bb2 diff --git a/samples/client/echo_api/java/native/gradle/wrapper/gradle-wrapper.jar b/samples/client/echo_api/java/native/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000000000000000000000000000000000000..7454180f2ae8848c63b8b4dea2cb829da983f2fa GIT binary patch literal 59536 zcma&NbC71ylI~qywr$(CZQJHswz}-9F59+k+g;UV+cs{`J?GrGXYR~=-ydruB3JCa zB64N^cILAcWk5iofq)<(fq;O7{th4@;QxID0)qN`mJ?GIqLY#rX8-|G{5M0pdVW5^ zzXk$-2kQTAC?_N@B`&6-N-rmVFE=$QD?>*=4<|!MJu@}isLc4AW#{m2if&A5T5g&~ ziuMQeS*U5sL6J698wOd)K@oK@1{peP5&Esut<#VH^u)gp`9H4)`uE!2$>RTctN+^u z=ASkePDZA-X8)rp%D;p*~P?*a_=*Kwc<^>QSH|^<0>o37lt^+Mj1;4YvJ(JR-Y+?%Nu}JAYj5 z_Qc5%Ao#F?q32i?ZaN2OSNhWL;2oDEw_({7ZbgUjna!Fqn3NzLM@-EWFPZVmc>(fZ z0&bF-Ch#p9C{YJT9Rcr3+Y_uR^At1^BxZ#eo>$PLJF3=;t_$2|t+_6gg5(j{TmjYU zK12c&lE?Eh+2u2&6Gf*IdKS&6?rYbSEKBN!rv{YCm|Rt=UlPcW9j`0o6{66#y5t9C zruFA2iKd=H%jHf%ypOkxLnO8#H}#Zt{8p!oi6)7#NqoF({t6|J^?1e*oxqng9Q2Cc zg%5Vu!em)}Yuj?kaP!D?b?(C*w!1;>R=j90+RTkyEXz+9CufZ$C^umX^+4|JYaO<5 zmIM3#dv`DGM;@F6;(t!WngZSYzHx?9&$xEF70D1BvfVj<%+b#)vz)2iLCrTeYzUcL z(OBnNoG6Le%M+@2oo)&jdOg=iCszzv59e zDRCeaX8l1hC=8LbBt|k5?CXgep=3r9BXx1uR8!p%Z|0+4Xro=xi0G!e{c4U~1j6!) zH6adq0}#l{%*1U(Cb%4AJ}VLWKBPi0MoKFaQH6x?^hQ!6em@993xdtS%_dmevzeNl z(o?YlOI=jl(`L9^ z0O+H9k$_@`6L13eTT8ci-V0ljDMD|0ifUw|Q-Hep$xYj0hTO@0%IS^TD4b4n6EKDG z??uM;MEx`s98KYN(K0>c!C3HZdZ{+_53DO%9k5W%pr6yJusQAv_;IA}925Y%;+!tY z%2k!YQmLLOr{rF~!s<3-WEUs)`ix_mSU|cNRBIWxOox_Yb7Z=~Q45ZNe*u|m^|)d* zog=i>`=bTe!|;8F+#H>EjIMcgWcG2ORD`w0WD;YZAy5#s{65~qfI6o$+Ty&-hyMyJ z3Ra~t>R!p=5ZpxA;QkDAoPi4sYOP6>LT+}{xp}tk+<0k^CKCFdNYG(Es>p0gqD)jP zWOeX5G;9(m@?GOG7g;e74i_|SmE?`B2i;sLYwRWKLy0RLW!Hx`=!LH3&k=FuCsM=9M4|GqzA)anEHfxkB z?2iK-u(DC_T1};KaUT@3nP~LEcENT^UgPvp!QC@Dw&PVAhaEYrPey{nkcn(ro|r7XUz z%#(=$7D8uP_uU-oPHhd>>^adbCSQetgSG`e$U|7mr!`|bU0aHl_cmL)na-5x1#OsVE#m*+k84Y^+UMeSAa zbrVZHU=mFwXEaGHtXQq`2ZtjfS!B2H{5A<3(nb-6ARVV8kEmOkx6D2x7~-6hl;*-*}2Xz;J#a8Wn;_B5=m zl3dY;%krf?i-Ok^Pal-}4F`{F@TYPTwTEhxpZK5WCpfD^UmM_iYPe}wpE!Djai6_{ z*pGO=WB47#Xjb7!n2Ma)s^yeR*1rTxp`Mt4sfA+`HwZf%!7ZqGosPkw69`Ix5Ku6G z@Pa;pjzV&dn{M=QDx89t?p?d9gna*}jBly*#1!6}5K<*xDPJ{wv4& zM$17DFd~L*Te3A%yD;Dp9UGWTjRxAvMu!j^Tbc}2v~q^59d4bz zvu#!IJCy(BcWTc`;v$9tH;J%oiSJ_i7s;2`JXZF+qd4C)vY!hyCtl)sJIC{ebI*0> z@x>;EzyBv>AI-~{D6l6{ST=em*U( z(r$nuXY-#CCi^8Z2#v#UXOt`dbYN1z5jzNF2 z411?w)whZrfA20;nl&C1Gi+gk<`JSm+{|*2o<< zqM#@z_D`Cn|0H^9$|Tah)0M_X4c37|KQ*PmoT@%xHc3L1ZY6(p(sNXHa&49Frzto& zR`c~ClHpE~4Z=uKa5S(-?M8EJ$zt0&fJk~p$M#fGN1-y$7!37hld`Uw>Urri(DxLa;=#rK0g4J)pXMC zxzraOVw1+kNWpi#P=6(qxf`zSdUC?D$i`8ZI@F>k6k zz21?d+dw7b&i*>Kv5L(LH-?J%@WnqT7j#qZ9B>|Zl+=> z^U-pV@1y_ptHo4hl^cPRWewbLQ#g6XYQ@EkiP z;(=SU!yhjHp%1&MsU`FV1Z_#K1&(|5n(7IHbx&gG28HNT)*~-BQi372@|->2Aw5It z0CBpUcMA*QvsPy)#lr!lIdCi@1k4V2m!NH)%Px(vu-r(Q)HYc!p zJ^$|)j^E#q#QOgcb^pd74^JUi7fUmMiNP_o*lvx*q%_odv49Dsv$NV;6J z9GOXKomA{2Pb{w}&+yHtH?IkJJu~}Z?{Uk++2mB8zyvh*xhHKE``99>y#TdD z&(MH^^JHf;g(Tbb^&8P*;_i*2&fS$7${3WJtV7K&&(MBV2~)2KB3%cWg#1!VE~k#C z!;A;?p$s{ihyojEZz+$I1)L}&G~ml=udD9qh>Tu(ylv)?YcJT3ihapi!zgPtWb*CP zlLLJSRCj-^w?@;RU9aL2zDZY1`I3d<&OMuW=c3$o0#STpv_p3b9Wtbql>w^bBi~u4 z3D8KyF?YE?=HcKk!xcp@Cigvzy=lnFgc^9c%(^F22BWYNAYRSho@~*~S)4%AhEttv zvq>7X!!EWKG?mOd9&n>vvH1p4VzE?HCuxT-u+F&mnsfDI^}*-d00-KAauEaXqg3k@ zy#)MGX!X;&3&0s}F3q40ZmVM$(H3CLfpdL?hB6nVqMxX)q=1b}o_PG%r~hZ4gUfSp zOH4qlEOW4OMUc)_m)fMR_rl^pCfXc{$fQbI*E&mV77}kRF z&{<06AJyJ!e863o-V>FA1a9Eemx6>^F$~9ppt()ZbPGfg_NdRXBWoZnDy2;#ODgf! zgl?iOcF7Meo|{AF>KDwTgYrJLb$L2%%BEtO>T$C?|9bAB&}s;gI?lY#^tttY&hfr# zKhC+&b-rpg_?~uVK%S@mQleU#_xCsvIPK*<`E0fHE1&!J7!xD#IB|SSPW6-PyuqGn3^M^Rz%WT{e?OI^svARX&SAdU77V(C~ zM$H{Kg59op{<|8ry9ecfP%=kFm(-!W&?U0@<%z*+!*<e0XesMxRFu9QnGqun6R_%T+B%&9Dtk?*d$Q zb~>84jEAPi@&F@3wAa^Lzc(AJz5gsfZ7J53;@D<;Klpl?sK&u@gie`~vTsbOE~Cd4 z%kr56mI|#b(Jk&;p6plVwmNB0H@0SmgdmjIn5Ne@)}7Vty(yb2t3ev@22AE^s!KaN zyQ>j+F3w=wnx7w@FVCRe+`vUH)3gW%_72fxzqX!S&!dchdkRiHbXW1FMrIIBwjsai8`CB2r4mAbwp%rrO>3B$Zw;9=%fXI9B{d(UzVap7u z6piC-FQ)>}VOEuPpuqznpY`hN4dGa_1Xz9rVg(;H$5Te^F0dDv*gz9JS<|>>U0J^# z6)(4ICh+N_Q`Ft0hF|3fSHs*?a=XC;e`sJaU9&d>X4l?1W=|fr!5ShD|nv$GK;j46@BV6+{oRbWfqOBRb!ir88XD*SbC(LF}I1h#6@dvK%Toe%@ zhDyG$93H8Eu&gCYddP58iF3oQH*zLbNI;rN@E{T9%A8!=v#JLxKyUe}e}BJpB{~uN zqgxRgo0*-@-iaHPV8bTOH(rS(huwK1Xg0u+e!`(Irzu@Bld&s5&bWgVc@m7;JgELd zimVs`>vQ}B_1(2#rv#N9O`fJpVfPc7V2nv34PC);Dzbb;p!6pqHzvy?2pD&1NE)?A zt(t-ucqy@wn9`^MN5apa7K|L=9>ISC>xoc#>{@e}m#YAAa1*8-RUMKwbm|;5p>T`Z zNf*ph@tnF{gmDa3uwwN(g=`Rh)4!&)^oOy@VJaK4lMT&5#YbXkl`q?<*XtsqD z9PRK6bqb)fJw0g-^a@nu`^?71k|m3RPRjt;pIkCo1{*pdqbVs-Yl>4E>3fZx3Sv44grW=*qdSoiZ9?X0wWyO4`yDHh2E!9I!ZFi zVL8|VtW38}BOJHW(Ax#KL_KQzarbuE{(%TA)AY)@tY4%A%P%SqIU~8~-Lp3qY;U-} z`h_Gel7;K1h}7$_5ZZT0&%$Lxxr-<89V&&TCsu}LL#!xpQ1O31jaa{U34~^le*Y%L za?7$>Jk^k^pS^_M&cDs}NgXlR>16AHkSK-4TRaJSh#h&p!-!vQY%f+bmn6x`4fwTp z$727L^y`~!exvmE^W&#@uY!NxJi`g!i#(++!)?iJ(1)2Wk;RN zFK&O4eTkP$Xn~4bB|q8y(btx$R#D`O@epi4ofcETrx!IM(kWNEe42Qh(8*KqfP(c0 zouBl6>Fc_zM+V;F3znbo{x#%!?mH3`_ANJ?y7ppxS@glg#S9^MXu|FM&ynpz3o&Qh z2ujAHLF3($pH}0jXQsa#?t--TnF1P73b?4`KeJ9^qK-USHE)4!IYgMn-7z|=ALF5SNGkrtPG@Y~niUQV2?g$vzJN3nZ{7;HZHzWAeQ;5P|@Tl3YHpyznGG4-f4=XflwSJY+58-+wf?~Fg@1p1wkzuu-RF3j2JX37SQUc? zQ4v%`V8z9ZVZVqS8h|@@RpD?n0W<=hk=3Cf8R?d^9YK&e9ZybFY%jdnA)PeHvtBe- zhMLD+SSteHBq*q)d6x{)s1UrsO!byyLS$58WK;sqip$Mk{l)Y(_6hEIBsIjCr5t>( z7CdKUrJTrW%qZ#1z^n*Lb8#VdfzPw~OIL76aC+Rhr<~;4Tl!sw?Rj6hXj4XWa#6Tp z@)kJ~qOV)^Rh*-?aG>ic2*NlC2M7&LUzc9RT6WM%Cpe78`iAowe!>(T0jo&ivn8-7 zs{Qa@cGy$rE-3AY0V(l8wjI^uB8Lchj@?L}fYal^>T9z;8juH@?rG&g-t+R2dVDBe zq!K%{e-rT5jX19`(bP23LUN4+_zh2KD~EAYzhpEO3MUG8@}uBHH@4J zd`>_(K4q&>*k82(dDuC)X6JuPrBBubOg7qZ{?x!r@{%0);*`h*^F|%o?&1wX?Wr4b z1~&cy#PUuES{C#xJ84!z<1tp9sfrR(i%Tu^jnXy;4`Xk;AQCdFC@?V%|; zySdC7qS|uQRcH}EFZH%mMB~7gi}a0utE}ZE_}8PQH8f;H%PN41Cb9R%w5Oi5el^fd z$n{3SqLCnrF##x?4sa^r!O$7NX!}&}V;0ZGQ&K&i%6$3C_dR%I7%gdQ;KT6YZiQrW zk%q<74oVBV>@}CvJ4Wj!d^?#Zwq(b$E1ze4$99DuNg?6t9H}k_|D7KWD7i0-g*EO7 z;5{hSIYE4DMOK3H%|f5Edx+S0VI0Yw!tsaRS2&Il2)ea^8R5TG72BrJue|f_{2UHa z@w;^c|K3da#$TB0P3;MPlF7RuQeXT$ zS<<|C0OF(k)>fr&wOB=gP8!Qm>F41u;3esv7_0l%QHt(~+n; zf!G6%hp;Gfa9L9=AceiZs~tK+Tf*Wof=4!u{nIO90jH@iS0l+#%8=~%ASzFv7zqSB^?!@N7)kp0t&tCGLmzXSRMRyxCmCYUD2!B`? zhs$4%KO~m=VFk3Buv9osha{v+mAEq=ik3RdK@;WWTV_g&-$U4IM{1IhGX{pAu%Z&H zFfwCpUsX%RKg);B@7OUzZ{Hn{q6Vv!3#8fAg!P$IEx<0vAx;GU%}0{VIsmFBPq_mb zpe^BChDK>sc-WLKl<6 zwbW|e&d&dv9Wu0goueyu>(JyPx1mz0v4E?cJjFuKF71Q1)AL8jHO$!fYT3(;U3Re* zPPOe%*O+@JYt1bW`!W_1!mN&=w3G9ru1XsmwfS~BJ))PhD(+_J_^N6j)sx5VwbWK| zwRyC?W<`pOCY)b#AS?rluxuuGf-AJ=D!M36l{ua?@SJ5>e!IBr3CXIxWw5xUZ@Xrw z_R@%?{>d%Ld4p}nEsiA@v*nc6Ah!MUs?GA7e5Q5lPpp0@`%5xY$C;{%rz24$;vR#* zBP=a{)K#CwIY%p} zXVdxTQ^HS@O&~eIftU+Qt^~(DGxrdi3k}DdT^I7Iy5SMOp$QuD8s;+93YQ!OY{eB24%xY7ml@|M7I(Nb@K_-?F;2?et|CKkuZK_>+>Lvg!>JE~wN`BI|_h6$qi!P)+K-1Hh(1;a`os z55)4Q{oJiA(lQM#;w#Ta%T0jDNXIPM_bgESMCDEg6rM33anEr}=|Fn6)|jBP6Y}u{ zv9@%7*#RI9;fv;Yii5CI+KrRdr0DKh=L>)eO4q$1zmcSmglsV`*N(x=&Wx`*v!!hn6X-l0 zP_m;X??O(skcj+oS$cIdKhfT%ABAzz3w^la-Ucw?yBPEC+=Pe_vU8nd-HV5YX6X8r zZih&j^eLU=%*;VzhUyoLF;#8QsEfmByk+Y~caBqSvQaaWf2a{JKB9B>V&r?l^rXaC z8)6AdR@Qy_BxQrE2Fk?ewD!SwLuMj@&d_n5RZFf7=>O>hzVE*seW3U?_p|R^CfoY`?|#x9)-*yjv#lo&zP=uI`M?J zbzC<^3x7GfXA4{FZ72{PE*-mNHyy59Q;kYG@BB~NhTd6pm2Oj=_ zizmD?MKVRkT^KmXuhsk?eRQllPo2Ubk=uCKiZ&u3Xjj~<(!M94c)Tez@9M1Gfs5JV z->@II)CDJOXTtPrQudNjE}Eltbjq>6KiwAwqvAKd^|g!exgLG3;wP+#mZYr`cy3#39e653d=jrR-ulW|h#ddHu(m9mFoW~2yE zz5?dB%6vF}+`-&-W8vy^OCxm3_{02royjvmwjlp+eQDzFVEUiyO#gLv%QdDSI#3W* z?3!lL8clTaNo-DVJw@ynq?q!%6hTQi35&^>P85G$TqNt78%9_sSJt2RThO|JzM$iL zg|wjxdMC2|Icc5rX*qPL(coL!u>-xxz-rFiC!6hD1IR%|HSRsV3>Kq~&vJ=s3M5y8SG%YBQ|{^l#LGlg!D?E>2yR*eV%9m$_J6VGQ~AIh&P$_aFbh zULr0Z$QE!QpkP=aAeR4ny<#3Fwyw@rZf4?Ewq`;mCVv}xaz+3ni+}a=k~P+yaWt^L z@w67!DqVf7D%7XtXX5xBW;Co|HvQ8WR1k?r2cZD%U;2$bsM%u8{JUJ5Z0k= zZJARv^vFkmWx15CB=rb=D4${+#DVqy5$C%bf`!T0+epLJLnh1jwCdb*zuCL}eEFvE z{rO1%gxg>1!W(I!owu*mJZ0@6FM(?C+d*CeceZRW_4id*D9p5nzMY&{mWqrJomjIZ z97ZNnZ3_%Hx8dn;H>p8m7F#^2;T%yZ3H;a&N7tm=Lvs&lgJLW{V1@h&6Vy~!+Ffbb zv(n3+v)_D$}dqd!2>Y2B)#<+o}LH#%ogGi2-?xRIH)1!SD)u-L65B&bsJTC=LiaF+YOCif2dUX6uAA|#+vNR z>U+KQekVGon)Yi<93(d!(yw1h3&X0N(PxN2{%vn}cnV?rYw z$N^}_o!XUB!mckL`yO1rnUaI4wrOeQ(+&k?2mi47hzxSD`N#-byqd1IhEoh!PGq>t z_MRy{5B0eKY>;Ao3z$RUU7U+i?iX^&r739F)itdrTpAi-NN0=?^m%?{A9Ly2pVv>Lqs6moTP?T2-AHqFD-o_ znVr|7OAS#AEH}h8SRPQ@NGG47dO}l=t07__+iK8nHw^(AHx&Wb<%jPc$$jl6_p(b$ z)!pi(0fQodCHfM)KMEMUR&UID>}m^(!{C^U7sBDOA)$VThRCI0_+2=( zV8mMq0R(#z;C|7$m>$>`tX+T|xGt(+Y48@ZYu#z;0pCgYgmMVbFb!$?%yhZqP_nhn zy4<#3P1oQ#2b51NU1mGnHP$cf0j-YOgAA}A$QoL6JVLcmExs(kU{4z;PBHJD%_=0F z>+sQV`mzijSIT7xn%PiDKHOujX;n|M&qr1T@rOxTdxtZ!&u&3HHFLYD5$RLQ=heur zb>+AFokUVQeJy-#LP*^)spt{mb@Mqe=A~-4p0b+Bt|pZ+@CY+%x}9f}izU5;4&QFE zO1bhg&A4uC1)Zb67kuowWY4xbo&J=%yoXlFB)&$d*-}kjBu|w!^zbD1YPc0-#XTJr z)pm2RDy%J3jlqSMq|o%xGS$bPwn4AqitC6&e?pqWcjWPt{3I{>CBy;hg0Umh#c;hU3RhCUX=8aR>rmd` z7Orw(5tcM{|-^J?ZAA9KP|)X6n9$-kvr#j5YDecTM6n z&07(nD^qb8hpF0B^z^pQ*%5ePYkv&FabrlI61ntiVp!!C8y^}|<2xgAd#FY=8b*y( zuQOuvy2`Ii^`VBNJB&R!0{hABYX55ooCAJSSevl4RPqEGb)iy_0H}v@vFwFzD%>#I>)3PsouQ+_Kkbqy*kKdHdfkN7NBcq%V{x^fSxgXpg7$bF& zj!6AQbDY(1u#1_A#1UO9AxiZaCVN2F0wGXdY*g@x$ByvUA?ePdide0dmr#}udE%K| z3*k}Vv2Ew2u1FXBaVA6aerI36R&rzEZeDDCl5!t0J=ug6kuNZzH>3i_VN`%BsaVB3 zQYw|Xub_SGf{)F{$ZX5`Jc!X!;eybjP+o$I{Z^Hsj@D=E{MnnL+TbC@HEU2DjG{3-LDGIbq()U87x4eS;JXnSh;lRlJ z>EL3D>wHt-+wTjQF$fGyDO$>d+(fq@bPpLBS~xA~R=3JPbS{tzN(u~m#Po!?H;IYv zE;?8%^vle|%#oux(Lj!YzBKv+Fd}*Ur-dCBoX*t{KeNM*n~ZPYJ4NNKkI^MFbz9!v z4(Bvm*Kc!-$%VFEewYJKz-CQN{`2}KX4*CeJEs+Q(!kI%hN1!1P6iOq?ovz}X0IOi z)YfWpwW@pK08^69#wSyCZkX9?uZD?C^@rw^Y?gLS_xmFKkooyx$*^5#cPqntNTtSG zlP>XLMj2!VF^0k#ole7`-c~*~+_T5ls?x4)ah(j8vo_ zwb%S8qoaZqY0-$ZI+ViIA_1~~rAH7K_+yFS{0rT@eQtTAdz#8E5VpwnW!zJ_^{Utv zlW5Iar3V5t&H4D6A=>?mq;G92;1cg9a2sf;gY9pJDVKn$DYdQlvfXq}zz8#LyPGq@ z+`YUMD;^-6w&r-82JL7mA8&M~Pj@aK!m{0+^v<|t%APYf7`}jGEhdYLqsHW-Le9TL z_hZZ1gbrz7$f9^fAzVIP30^KIz!!#+DRLL+qMszvI_BpOSmjtl$hh;&UeM{ER@INV zcI}VbiVTPoN|iSna@=7XkP&-4#06C};8ajbxJ4Gcq8(vWv4*&X8bM^T$mBk75Q92j z1v&%a;OSKc8EIrodmIiw$lOES2hzGDcjjB`kEDfJe{r}yE6`eZL zEB`9u>Cl0IsQ+t}`-cx}{6jqcANucqIB>Qmga_&<+80E2Q|VHHQ$YlAt{6`Qu`HA3 z03s0-sSlwbvgi&_R8s={6<~M^pGvBNjKOa>tWenzS8s zR>L7R5aZ=mSU{f?ib4Grx$AeFvtO5N|D>9#)ChH#Fny2maHWHOf2G=#<9Myot#+4u zWVa6d^Vseq_0=#AYS(-m$Lp;*8nC_6jXIjEM`omUmtH@QDs3|G)i4j*#_?#UYVZvJ z?YjT-?!4Q{BNun;dKBWLEw2C-VeAz`%?A>p;)PL}TAZn5j~HK>v1W&anteARlE+~+ zj>c(F;?qO3pXBb|#OZdQnm<4xWmn~;DR5SDMxt0UK_F^&eD|KZ=O;tO3vy4@4h^;2 zUL~-z`-P1aOe?|ZC1BgVsL)2^J-&vIFI%q@40w0{jjEfeVl)i9(~bt2z#2Vm)p`V_ z1;6$Ae7=YXk#=Qkd24Y23t&GvRxaOoad~NbJ+6pxqzJ>FY#Td7@`N5xp!n(c!=RE& z&<<@^a$_Ys8jqz4|5Nk#FY$~|FPC0`*a5HH!|Gssa9=~66&xG9)|=pOOJ2KE5|YrR zw!w6K2aC=J$t?L-;}5hn6mHd%hC;p8P|Dgh6D>hGnXPgi;6r+eA=?f72y9(Cf_ho{ zH6#)uD&R=73^$$NE;5piWX2bzR67fQ)`b=85o0eOLGI4c-Tb@-KNi2pz=Ke@SDcPn za$AxXib84`!Sf;Z3B@TSo`Dz7GM5Kf(@PR>Ghzi=BBxK8wRp>YQoXm+iL>H*Jo9M3 z6w&E?BC8AFTFT&Tv8zf+m9<&S&%dIaZ)Aoqkak_$r-2{$d~0g2oLETx9Y`eOAf14QXEQw3tJne;fdzl@wV#TFXSLXM2428F-Q}t+n2g%vPRMUzYPvzQ9f# zu(liiJem9P*?0%V@RwA7F53r~|I!Ty)<*AsMX3J{_4&}{6pT%Tpw>)^|DJ)>gpS~1rNEh z0$D?uO8mG?H;2BwM5a*26^7YO$XjUm40XmBsb63MoR;bJh63J;OngS5sSI+o2HA;W zdZV#8pDpC9Oez&L8loZO)MClRz!_!WD&QRtQxnazhT%Vj6Wl4G11nUk8*vSeVab@N#oJ}`KyJv+8Mo@T1-pqZ1t|?cnaVOd;1(h9 z!$DrN=jcGsVYE-0-n?oCJ^4x)F}E;UaD-LZUIzcD?W^ficqJWM%QLy6QikrM1aKZC zi{?;oKwq^Vsr|&`i{jIphA8S6G4)$KGvpULjH%9u(Dq247;R#l&I0{IhcC|oBF*Al zvLo7Xte=C{aIt*otJD}BUq)|_pdR>{zBMT< z(^1RpZv*l*m*OV^8>9&asGBo8h*_4q*)-eCv*|Pq=XNGrZE)^(SF7^{QE_~4VDB(o zVcPA_!G+2CAtLbl+`=Q~9iW`4ZRLku!uB?;tWqVjB0lEOf}2RD7dJ=BExy=<9wkb- z9&7{XFA%n#JsHYN8t5d~=T~5DcW4$B%3M+nNvC2`0!#@sckqlzo5;hhGi(D9=*A4` z5ynobawSPRtWn&CDLEs3Xf`(8^zDP=NdF~F^s&={l7(aw&EG}KWpMjtmz7j_VLO;@ zM2NVLDxZ@GIv7*gzl1 zjq78tv*8#WSY`}Su0&C;2F$Ze(q>F(@Wm^Gw!)(j;dk9Ad{STaxn)IV9FZhm*n+U} zi;4y*3v%A`_c7a__DJ8D1b@dl0Std3F||4Wtvi)fCcBRh!X9$1x!_VzUh>*S5s!oq z;qd{J_r79EL2wIeiGAqFstWtkfIJpjVh%zFo*=55B9Zq~y0=^iqHWfQl@O!Ak;(o*m!pZqe9 z%U2oDOhR)BvW8&F70L;2TpkzIutIvNQaTjjs5V#8mV4!NQ}zN=i`i@WI1z0eN-iCS z;vL-Wxc^Vc_qK<5RPh(}*8dLT{~GzE{w2o$2kMFaEl&q zP{V=>&3kW7tWaK-Exy{~`v4J0U#OZBk{a9{&)&QG18L@6=bsZ1zC_d{{pKZ-Ey>I> z;8H0t4bwyQqgu4hmO`3|4K{R*5>qnQ&gOfdy?z`XD%e5+pTDzUt3`k^u~SaL&XMe= z9*h#kT(*Q9jO#w2Hd|Mr-%DV8i_1{J1MU~XJ3!WUplhXDYBpJH><0OU`**nIvPIof z|N8@I=wA)sf45SAvx||f?Z5uB$kz1qL3Ky_{%RPdP5iN-D2!p5scq}buuC00C@jom zhfGKm3|f?Z0iQ|K$Z~!`8{nmAS1r+fp6r#YDOS8V*;K&Gs7Lc&f^$RC66O|)28oh`NHy&vq zJh+hAw8+ybTB0@VhWN^0iiTnLsCWbS_y`^gs!LX!Lw{yE``!UVzrV24tP8o;I6-65 z1MUiHw^{bB15tmrVT*7-#sj6cs~z`wk52YQJ*TG{SE;KTm#Hf#a~|<(|ImHH17nNM z`Ub{+J3dMD!)mzC8b(2tZtokKW5pAwHa?NFiso~# z1*iaNh4lQ4TS)|@G)H4dZV@l*Vd;Rw;-;odDhW2&lJ%m@jz+Panv7LQm~2Js6rOW3 z0_&2cW^b^MYW3)@o;neZ<{B4c#m48dAl$GCc=$>ErDe|?y@z`$uq3xd(%aAsX)D%l z>y*SQ%My`yDP*zof|3@_w#cjaW_YW4BdA;#Glg1RQcJGY*CJ9`H{@|D+*e~*457kd z73p<%fB^PV!Ybw@)Dr%(ZJbX}xmCStCYv#K3O32ej{$9IzM^I{6FJ8!(=azt7RWf4 z7ib0UOPqN40X!wOnFOoddd8`!_IN~9O)#HRTyjfc#&MCZ zZAMzOVB=;qwt8gV?{Y2?b=iSZG~RF~uyx18K)IDFLl})G1v@$(s{O4@RJ%OTJyF+Cpcx4jmy|F3euCnMK!P2WTDu5j z{{gD$=M*pH!GGzL%P)V2*ROm>!$Y=z|D`!_yY6e7SU$~a5q8?hZGgaYqaiLnkK%?0 zs#oI%;zOxF@g*@(V4p!$7dS1rOr6GVs6uYCTt2h)eB4?(&w8{#o)s#%gN@BBosRUe z)@P@8_Zm89pr~)b>e{tbPC~&_MR--iB{=)y;INU5#)@Gix-YpgP<-c2Ms{9zuCX|3 z!p(?VaXww&(w&uBHzoT%!A2=3HAP>SDxcljrego7rY|%hxy3XlODWffO_%g|l+7Y_ zqV(xbu)s4lV=l7M;f>vJl{`6qBm>#ZeMA}kXb97Z)?R97EkoI?x6Lp0yu1Z>PS?2{ z0QQ(8D)|lc9CO3B~e(pQM&5(1y&y=e>C^X$`)_&XuaI!IgDTVqt31wX#n+@!a_A0ZQkA zCJ2@M_4Gb5MfCrm5UPggeyh)8 zO9?`B0J#rkoCx(R0I!ko_2?iO@|oRf1;3r+i)w-2&j?=;NVIdPFsB)`|IC0zk6r9c zRrkfxWsiJ(#8QndNJj@{@WP2Ackr|r1VxV{7S&rSU(^)-M8gV>@UzOLXu9K<{6e{T zXJ6b92r$!|lwjhmgqkdswY&}c)KW4A)-ac%sU;2^fvq7gfUW4Bw$b!i@duy1CAxSn z(pyh$^Z=&O-q<{bZUP+$U}=*#M9uVc>CQVgDs4swy5&8RAHZ~$)hrTF4W zPsSa~qYv_0mJnF89RnnJTH`3}w4?~epFl=D(35$ zWa07ON$`OMBOHgCmfO(9RFc<)?$x)N}Jd2A(<*Ll7+4jrRt9w zwGxExUXd9VB#I|DwfxvJ;HZ8Q{37^wDhaZ%O!oO(HpcqfLH%#a#!~;Jl7F5>EX_=8 z{()l2NqPz>La3qJR;_v+wlK>GsHl;uRA8%j`A|yH@k5r%55S9{*Cp%uw6t`qc1!*T za2OeqtQj7sAp#Q~=5Fs&aCR9v>5V+s&RdNvo&H~6FJOjvaj--2sYYBvMq;55%z8^o z|BJDA4vzfow#DO#ZQHh;Oq_{r+qP{R9ox2TOgwQiv7Ow!zjN+A@BN;0tA2lUb#+zO z(^b89eV)D7UVE+h{mcNc6&GtpOqDn_?VAQ)Vob$hlFwW%xh>D#wml{t&Ofmm_d_+; zKDxzdr}`n2Rw`DtyIjrG)eD0vut$}dJAZ0AohZ+ZQdWXn_Z@dI_y=7t3q8x#pDI-K z2VVc&EGq445Rq-j0=U=Zx`oBaBjsefY;%)Co>J3v4l8V(T8H?49_@;K6q#r~Wwppc z4XW0(4k}cP=5ex>-Xt3oATZ~bBWKv)aw|I|Lx=9C1s~&b77idz({&q3T(Y(KbWO?+ zmcZ6?WeUsGk6>km*~234YC+2e6Zxdl~<_g2J|IE`GH%n<%PRv-50; zH{tnVts*S5*_RxFT9eM0z-pksIb^drUq4>QSww=u;UFCv2AhOuXE*V4z?MM`|ABOC4P;OfhS(M{1|c%QZ=!%rQTDFx`+}?Kdx$&FU?Y<$x;j7z=(;Lyz+?EE>ov!8vvMtSzG!nMie zsBa9t8as#2nH}n8xzN%W%U$#MHNXmDUVr@GX{?(=yI=4vks|V)!-W5jHsU|h_&+kY zS_8^kd3jlYqOoiI`ZqBVY!(UfnAGny!FowZWY_@YR0z!nG7m{{)4OS$q&YDyw6vC$ zm4!$h>*|!2LbMbxS+VM6&DIrL*X4DeMO!@#EzMVfr)e4Tagn~AQHIU8?e61TuhcKD zr!F4(kEebk(Wdk-?4oXM(rJwanS>Jc%<>R(siF+>+5*CqJLecP_we33iTFTXr6W^G z7M?LPC-qFHK;E!fxCP)`8rkxZyFk{EV;G-|kwf4b$c1k0atD?85+|4V%YATWMG|?K zLyLrws36p%Qz6{}>7b>)$pe>mR+=IWuGrX{3ZPZXF3plvuv5Huax86}KX*lbPVr}L z{C#lDjdDeHr~?l|)Vp_}T|%$qF&q#U;ClHEPVuS+Jg~NjC1RP=17=aQKGOcJ6B3mp z8?4*-fAD~}sX*=E6!}^u8)+m2j<&FSW%pYr_d|p_{28DZ#Cz0@NF=gC-o$MY?8Ca8 zr5Y8DSR^*urS~rhpX^05r30Ik#2>*dIOGxRm0#0YX@YQ%Mg5b6dXlS!4{7O_kdaW8PFSdj1=ryI-=5$fiieGK{LZ+SX(1b=MNL!q#lN zv98?fqqTUH8r8C7v(cx#BQ5P9W>- zmW93;eH6T`vuJ~rqtIBg%A6>q>gnWb3X!r0wh_q;211+Om&?nvYzL1hhtjB zK_7G3!n7PL>d!kj){HQE zE8(%J%dWLh1_k%gVXTZt zEdT09XSKAx27Ncaq|(vzL3gm83q>6CAw<$fTnMU05*xAe&rDfCiu`u^1)CD<>sx0i z*hr^N_TeN89G(nunZoLBf^81#pmM}>JgD@Nn1l*lN#a=B=9pN%tmvYFjFIoKe_(GF z-26x{(KXdfsQL7Uv6UtDuYwV`;8V3w>oT_I<`Ccz3QqK9tYT5ZQzbop{=I=!pMOCb zCU68`n?^DT%^&m>A%+-~#lvF!7`L7a{z<3JqIlk1$<||_J}vW1U9Y&eX<}l8##6i( zZcTT@2`9(Mecptm@{3A_Y(X`w9K0EwtPq~O!16bq{7c0f7#(3wn-^)h zxV&M~iiF!{-6A@>o;$RzQ5A50kxXYj!tcgme=Qjrbje~;5X2xryU;vH|6bE(8z^<7 zQ>BG7_c*JG8~K7Oe68i#0~C$v?-t@~@r3t2inUnLT(c=URpA9kA8uq9PKU(Ps(LVH zqgcqW>Gm?6oV#AldDPKVRcEyQIdTT`Qa1j~vS{<;SwyTdr&3*t?J)y=M7q*CzucZ&B0M=joT zBbj@*SY;o2^_h*>R0e({!QHF0=)0hOj^B^d*m>SnRrwq>MolNSgl^~r8GR#mDWGYEIJA8B<|{{j?-7p zVnV$zancW3&JVDtVpIlI|5djKq0(w$KxEFzEiiL=h5Jw~4Le23@s(mYyXWL9SX6Ot zmb)sZaly_P%BeX_9 zw&{yBef8tFm+%=--m*J|o~+Xg3N+$IH)t)=fqD+|fEk4AAZ&!wcN5=mi~Vvo^i`}> z#_3ahR}Ju)(Px7kev#JGcSwPXJ2id9%Qd2A#Uc@t8~egZ8;iC{e! z%=CGJOD1}j!HW_sgbi_8suYnn4#Ou}%9u)dXd3huFIb!ytlX>Denx@pCS-Nj$`VO&j@(z!kKSP0hE4;YIP#w9ta=3DO$7f*x zc9M4&NK%IrVmZAe=r@skWD`AEWH=g+r|*13Ss$+{c_R!b?>?UaGXlw*8qDmY#xlR= z<0XFbs2t?8i^G~m?b|!Hal^ZjRjt<@a? z%({Gn14b4-a|#uY^=@iiKH+k?~~wTj5K1A&hU z2^9-HTC)7zpoWK|$JXaBL6C z#qSNYtY>65T@Zs&-0cHeu|RX(Pxz6vTITdzJdYippF zC-EB+n4}#lM7`2Ry~SO>FxhKboIAF#Z{1wqxaCb{#yEFhLuX;Rx(Lz%T`Xo1+a2M}7D+@wol2)OJs$TwtRNJ={( zD@#zTUEE}#Fz#&(EoD|SV#bayvr&E0vzmb%H?o~46|FAcx?r4$N z&67W3mdip-T1RIxwSm_&(%U|+WvtGBj*}t69XVd&ebn>KOuL(7Y8cV?THd-(+9>G7*Nt%T zcH;`p={`SOjaf7hNd(=37Lz3-51;58JffzIPgGs_7xIOsB5p2t&@v1mKS$2D$*GQ6 zM(IR*j4{nri7NMK9xlDy-hJW6sW|ZiDRaFiayj%;(%51DN!ZCCCXz+0Vm#};70nOx zJ#yA0P3p^1DED;jGdPbQWo0WATN=&2(QybbVdhd=Vq*liDk`c7iZ?*AKEYC#SY&2g z&Q(Ci)MJ{mEat$ZdSwTjf6h~roanYh2?9j$CF@4hjj_f35kTKuGHvIs9}Re@iKMxS-OI*`0S z6s)fOtz}O$T?PLFVSeOjSO26$@u`e<>k(OSP!&YstH3ANh>)mzmKGNOwOawq-MPXe zy4xbeUAl6tamnx))-`Gi2uV5>9n(73yS)Ukma4*7fI8PaEwa)dWHs6QA6>$}7?(L8 ztN8M}?{Tf!Zu22J5?2@95&rQ|F7=FK-hihT-vDp!5JCcWrVogEnp;CHenAZ)+E+K5 z$Cffk5sNwD_?4+ymgcHR(5xgt20Z8M`2*;MzOM#>yhk{r3x=EyM226wb&!+j`W<%* zSc&|`8!>dn9D@!pYow~(DsY_naSx7(Z4i>cu#hA5=;IuI88}7f%)bRkuY2B;+9Uep zpXcvFWkJ!mQai63BgNXG26$5kyhZ2&*3Q_tk)Ii4M>@p~_~q_cE!|^A;_MHB;7s#9 zKzMzK{lIxotjc};k67^Xsl-gS!^*m*m6kn|sbdun`O?dUkJ{0cmI0-_2y=lTAfn*Y zKg*A-2sJq)CCJgY0LF-VQvl&6HIXZyxo2#!O&6fOhbHXC?%1cMc6y^*dOS{f$=137Ds1m01qs`>iUQ49JijsaQ( zksqV9@&?il$|4Ua%4!O15>Zy&%gBY&wgqB>XA3!EldQ%1CRSM(pp#k~-pkcCg4LAT zXE=puHbgsw)!xtc@P4r~Z}nTF=D2~j(6D%gTBw$(`Fc=OOQ0kiW$_RDd=hcO0t97h zb86S5r=>(@VGy1&#S$Kg_H@7G^;8Ue)X5Y+IWUi`o;mpvoV)`fcVk4FpcT|;EG!;? zHG^zrVVZOm>1KFaHlaogcWj(v!S)O(Aa|Vo?S|P z5|6b{qkH(USa*Z7-y_Uvty_Z1|B{rTS^qmEMLEYUSk03_Fg&!O3BMo{b^*`3SHvl0 zhnLTe^_vVIdcSHe)SQE}r~2dq)VZJ!aSKR?RS<(9lzkYo&dQ?mubnWmgMM37Nudwo z3Vz@R{=m2gENUE3V4NbIzAA$H1z0pagz94-PTJyX{b$yndsdKptmlKQKaaHj@3=ED zc7L?p@%ui|RegVYutK$64q4pe9+5sv34QUpo)u{1ci?)_7gXQd{PL>b0l(LI#rJmN zGuO+%GO`xneFOOr4EU(Wg}_%bhzUf;d@TU+V*2#}!2OLwg~%D;1FAu=Un>OgjPb3S z7l(riiCwgghC=Lm5hWGf5NdGp#01xQ59`HJcLXbUR3&n%P(+W2q$h2Qd z*6+-QXJ*&Kvk9ht0f0*rO_|FMBALen{j7T1l%=Q>gf#kma zQlg#I9+HB+z*5BMxdesMND`_W;q5|FaEURFk|~&{@qY32N$G$2B=&Po{=!)x5b!#n zxLzblkq{yj05#O7(GRuT39(06FJlalyv<#K4m}+vs>9@q-&31@1(QBv82{}Zkns~K ze{eHC_RDX0#^A*JQTwF`a=IkE6Ze@j#-8Q`tTT?k9`^ZhA~3eCZJ-Jr{~7Cx;H4A3 zcZ+Zj{mzFZbVvQ6U~n>$U2ZotGsERZ@}VKrgGh0xM;Jzt29%TX6_&CWzg+YYMozrM z`nutuS)_0dCM8UVaKRj804J4i%z2BA_8A4OJRQ$N(P9Mfn-gF;4#q788C@9XR0O3< zsoS4wIoyt046d+LnSCJOy@B@Uz*#GGd#+Ln1ek5Dv>(ZtD@tgZlPnZZJGBLr^JK+!$$?A_fA3LOrkoDRH&l7 zcMcD$Hsjko3`-{bn)jPL6E9Ds{WskMrivsUu5apD z?grQO@W7i5+%X&E&p|RBaEZ(sGLR@~(y^BI@lDMot^Ll?!`90KT!JXUhYS`ZgX3jnu@Ja^seA*M5R@f`=`ynQV4rc$uT1mvE?@tz)TN<=&H1%Z?5yjxcpO+6y_R z6EPuPKM5uxKpmZfT(WKjRRNHs@ib)F5WAP7QCADvmCSD#hPz$V10wiD&{NXyEwx5S z6NE`3z!IS^$s7m}PCwQutVQ#~w+V z=+~->DI*bR2j0^@dMr9`p>q^Ny~NrAVxrJtX2DUveic5vM%#N*XO|?YAWwNI$Q)_) zvE|L(L1jP@F%gOGtnlXtIv2&1i8q<)Xfz8O3G^Ea~e*HJsQgBxWL(yuLY+jqUK zRE~`-zklrGog(X}$9@ZVUw!8*=l`6mzYLtsg`AvBYz(cxmAhr^j0~(rzXdiOEeu_p zE$sf2(w(BPAvO5DlaN&uQ$4@p-b?fRs}d7&2UQ4Fh?1Hzu*YVjcndqJLw0#q@fR4u zJCJ}>_7-|QbvOfylj+e^_L`5Ep9gqd>XI3-O?Wp z-gt*P29f$Tx(mtS`0d05nHH=gm~Po_^OxxUwV294BDKT>PHVlC5bndncxGR!n(OOm znsNt@Q&N{TLrmsoKFw0&_M9$&+C24`sIXGWgQaz=kY;S{?w`z^Q0JXXBKFLj0w0U6P*+jPKyZHX9F#b0D1$&(- zrm8PJd?+SrVf^JlfTM^qGDK&-p2Kdfg?f>^%>1n8bu&byH(huaocL>l@f%c*QkX2i znl}VZ4R1en4S&Bcqw?$=Zi7ohqB$Jw9x`aM#>pHc0x z0$!q7iFu zZ`tryM70qBI6JWWTF9EjgG@>6SRzsd}3h+4D8d~@CR07P$LJ}MFsYi-*O%XVvD@yT|rJ+Mk zDllJ7$n0V&A!0flbOf)HE6P_afPWZmbhpliqJuw=-h+r;WGk|ntkWN(8tKlYpq5Ow z(@%s>IN8nHRaYb*^d;M(D$zGCv5C|uqmsDjwy4g=Lz>*OhO3z=)VD}C<65;`89Ye} zSCxrv#ILzIpEx1KdLPlM&%Cctf@FqTKvNPXC&`*H9=l=D3r!GLM?UV zOxa(8ZsB`&+76S-_xuj?G#wXBfDY@Z_tMpXJS7^mp z@YX&u0jYw2A+Z+bD#6sgVK5ZgdPSJV3>{K^4~%HV?rn~4D)*2H!67Y>0aOmzup`{D zzDp3c9yEbGCY$U<8biJ_gB*`jluz1ShUd!QUIQJ$*1;MXCMApJ^m*Fiv88RZ zFopLViw}{$Tyhh_{MLGIE2~sZ)t0VvoW%=8qKZ>h=adTe3QM$&$PO2lfqH@brt!9j ziePM8$!CgE9iz6B<6_wyTQj?qYa;eC^{x_0wuwV~W+^fZmFco-o%wsKSnjXFEx02V zF5C2t)T6Gw$Kf^_c;Ei3G~uC8SM-xyycmXyC2hAVi-IfXqhu$$-C=*|X?R0~hu z8`J6TdgflslhrmDZq1f?GXF7*ALeMmOEpRDg(s*H`4>_NAr`2uqF;k;JQ+8>A|_6ZNsNLECC%NNEb1Y1dP zbIEmNpK)#XagtL4R6BC{C5T(+=yA-(Z|Ap}U-AfZM#gwVpus3(gPn}Q$CExObJ5AC z)ff9Yk?wZ}dZ-^)?cbb9Fw#EjqQ8jxF4G3=L?Ra zg_)0QDMV1y^A^>HRI$x?Op@t;oj&H@1xt4SZ9(kifQ zb59B*`M99Td7@aZ3UWvj1rD0sE)d=BsBuW*KwkCds7ay(7*01_+L}b~7)VHI>F_!{ zyxg-&nCO?v#KOUec0{OOKy+sjWA;8rTE|Lv6I9H?CI?H(mUm8VXGwU$49LGpz&{nQp2}dinE1@lZ1iox6{ghN&v^GZv9J${7WaXj)<0S4g_uiJ&JCZ zr8-hsu`U%N;+9N^@&Q0^kVPB3)wY(rr}p7{p0qFHb3NUUHJb672+wRZs`gd1UjKPX z4o6zljKKA+Kkj?H>Ew63o%QjyBk&1!P22;MkD>sM0=z_s-G{mTixJCT9@_|*(p^bz zJ8?ZZ&;pzV+7#6Mn`_U-)k8Pjg?a;|Oe^us^PoPY$Va~yi8|?+&=y$f+lABT<*pZr zP}D{~Pq1Qyni+@|aP;ixO~mbEW9#c0OU#YbDZIaw=_&$K%Ep2f%hO^&P67hApZe`x zv8b`Mz@?M_7-)b!lkQKk)JXXUuT|B8kJlvqRmRpxtQDgvrHMXC1B$M@Y%Me!BSx3P z#2Eawl$HleZhhTS6Txm>lN_+I`>eV$&v9fOg)%zVn3O5mI*lAl>QcHuW6!Kixmq`X zBCZ*Ck6OYtDiK!N47>jxI&O2a9x7M|i^IagRr-fmrmikEQGgw%J7bO|)*$2FW95O4 zeBs>KR)izRG1gRVL;F*sr8A}aRHO0gc$$j&ds8CIO1=Gwq1%_~E)CWNn9pCtBE}+`Jelk4{>S)M)`Ll=!~gnn1yq^EX(+y*ik@3Ou0qU`IgYi3*doM+5&dU!cho$pZ zn%lhKeZkS72P?Cf68<#kll_6OAO26bIbueZx**j6o;I0cS^XiL`y+>{cD}gd%lux} z)3N>MaE24WBZ}s0ApfdM;5J_Ny}rfUyxfkC``Awo2#sgLnGPewK};dORuT?@I6(5~ z?kE)Qh$L&fwJXzK){iYx!l5$Tt|^D~MkGZPA}(o6f7w~O2G6Vvzdo*a;iXzk$B66$ zwF#;wM7A+(;uFG4+UAY(2`*3XXx|V$K8AYu#ECJYSl@S=uZW$ksfC$~qrrbQj4??z-)uz0QL}>k^?fPnJTPw% zGz)~?B4}u0CzOf@l^um}HZzbaIwPmb<)< zi_3@E9lc)Qe2_`*Z^HH;1CXOceL=CHpHS{HySy3T%<^NrWQ}G0i4e1xm_K3(+~oi$ zoHl9wzb?Z4j#90DtURtjtgvi7uw8DzHYmtPb;?%8vb9n@bszT=1qr)V_>R%s!92_` zfnHQPANx z<#hIjIMm#*(v*!OXtF+w8kLu`o?VZ5k7{`vw{Yc^qYclpUGIM_PBN1+c{#Vxv&E*@ zxg=W2W~JuV{IuRYw3>LSI1)a!thID@R=bU+cU@DbR^_SXY`MC7HOsCN z!dO4OKV7(E_Z8T#8MA1H`99?Z!r0)qKW_#|29X3#Jb+5+>qUidbeP1NJ@)(qi2S-X zao|f0_tl(O+$R|Qwd$H{_ig|~I1fbp_$NkI!0E;Y z6JrnU{1Ra6^on{9gUUB0mwzP3S%B#h0fjo>JvV~#+X0P~JV=IG=yHG$O+p5O3NUgG zEQ}z6BTp^Fie)Sg<){Z&I8NwPR(=mO4joTLHkJ>|Tnk23E(Bo`FSbPc05lF2-+)X? z6vV3*m~IBHTy*^E!<0nA(tCOJW2G4DsH7)BxLV8kICn5lu6@U*R`w)o9;Ro$i8=Q^V%uH8n3q=+Yf;SFRZu z!+F&PKcH#8cG?aSK_Tl@K9P#8o+jry@gdexz&d(Q=47<7nw@e@FFfIRNL9^)1i@;A z28+$Z#rjv-wj#heI|<&J_DiJ*s}xd-f!{J8jfqOHE`TiHHZVIA8CjkNQ_u;Ery^^t zl1I75&u^`1_q)crO+JT4rx|z2ToSC>)Or@-D zy3S>jW*sNIZR-EBsfyaJ+Jq4BQE4?SePtD2+jY8*%FsSLZ9MY>+wk?}}}AFAw)vr{ml)8LUG-y9>^t!{~|sgpxYc0Gnkg`&~R z-pilJZjr@y5$>B=VMdZ73svct%##v%wdX~9fz6i3Q-zOKJ9wso+h?VME7}SjL=!NUG{J?M&i!>ma`eoEa@IX`5G>B1(7;%}M*%-# zfhJ(W{y;>MRz!Ic8=S}VaBKqh;~7KdnGEHxcL$kA-6E~=!hrN*zw9N+_=odt<$_H_8dbo;0=42wcAETPCVGUr~v(`Uai zb{=D!Qc!dOEU6v)2eHSZq%5iqK?B(JlCq%T6av$Cb4Rko6onlG&?CqaX7Y_C_cOC3 zYZ;_oI(}=>_07}Oep&Ws7x7-R)cc8zfe!SYxJYP``pi$FDS)4Fvw5HH=FiU6xfVqIM!hJ;Rx8c0cB7~aPtNH(Nmm5Vh{ibAoU#J6 zImRCr?(iyu_4W_6AWo3*vxTPUw@vPwy@E0`(>1Qi=%>5eSIrp^`` zK*Y?fK_6F1W>-7UsB)RPC4>>Ps9)f+^MqM}8AUm@tZ->j%&h1M8s*s!LX5&WxQcAh z8mciQej@RPm?660%>{_D+7er>%zX_{s|$Z+;G7_sfNfBgY(zLB4Ey}J9F>zX#K0f6 z?dVNIeEh?EIShmP6>M+d|0wMM85Sa4diw1hrg|ITJ}JDg@o8y>(rF9mXk5M z2@D|NA)-7>wD&wF;S_$KS=eE84`BGw3g0?6wGxu8ys4rwI?9U=*^VF22t3%mbGeOh z`!O-OpF7#Vceu~F`${bW0nYVU9ecmk31V{tF%iv&5hWofC>I~cqAt@u6|R+|HLMMX zVxuSlMFOK_EQ86#E8&KwxIr8S9tj_goWtLv4f@!&h8;Ov41{J~496vp9vX=(LK#j! zAwi*21RAV-LD>9Cw3bV_9X(X3)Kr0-UaB*7Y>t82EQ%!)(&(XuAYtTsYy-dz+w=$ir)VJpe!_$ z6SGpX^i(af3{o=VlFPC);|J8#(=_8#vdxDe|Cok+ANhYwbE*FO`Su2m1~w+&9<_9~ z-|tTU_ACGN`~CNW5WYYBn^B#SwZ(t4%3aPp z;o)|L6Rk569KGxFLUPx@!6OOa+5OjQLK5w&nAmwxkC5rZ|m&HT8G%GVZxB_@ME z>>{rnXUqyiJrT(8GMj_ap#yN_!9-lO5e8mR3cJiK3NE{_UM&=*vIU`YkiL$1%kf+1 z4=jk@7EEj`u(jy$HnzE33ZVW_J4bj}K;vT?T91YlO(|Y0FU4r+VdbmQ97%(J5 zkK*Bed8+C}FcZ@HIgdCMioV%A<*4pw_n}l*{Cr4}a(lq|injK#O?$tyvyE`S%(1`H z_wwRvk#13ElkZvij2MFGOj`fhy?nC^8`Zyo%yVcUAfEr8x&J#A{|moUBAV_^f$hpaUuyQeY3da^ zS9iRgf87YBwfe}>BO+T&Fl%rfpZh#+AM?Dq-k$Bq`vG6G_b4z%Kbd&v>qFjow*mBl z-OylnqOpLg}or7_VNwRg2za3VBK6FUfFX{|TD z`Wt0Vm2H$vdlRWYQJqDmM?JUbVqL*ZQY|5&sY*?!&%P8qhA~5+Af<{MaGo(dl&C5t zE%t!J0 zh6jqANt4ABdPxSTrVV}fLsRQal*)l&_*rFq(Ez}ClEH6LHv{J#v?+H-BZ2)Wy{K@9 z+ovXHq~DiDvm>O~r$LJo!cOuwL+Oa--6;UFE2q@g3N8Qkw5E>ytz^(&($!O47+i~$ zKM+tkAd-RbmP{s_rh+ugTD;lriL~`Xwkad#;_aM?nQ7L_muEFI}U_4$phjvYgleK~`Fo`;GiC07&Hq1F<%p;9Q;tv5b?*QnR%8DYJH3P>Svmv47Y>*LPZJy8_{9H`g6kQpyZU{oJ`m%&p~D=K#KpfoJ@ zn-3cqmHsdtN!f?~w+(t+I`*7GQA#EQC^lUA9(i6=i1PqSAc|ha91I%X&nXzjYaM{8$s&wEx@aVkQ6M{E2 zfzId#&r(XwUNtPcq4Ngze^+XaJA1EK-%&C9j>^9(secqe{}z>hR5CFNveMsVA)m#S zk)_%SidkY-XmMWlVnQ(mNJ>)ooszQ#vaK;!rPmGKXV7am^_F!Lz>;~{VrIO$;!#30XRhE1QqO_~#+Ux;B_D{Nk=grn z8Y0oR^4RqtcYM)7a%@B(XdbZCOqnX#fD{BQTeLvRHd(irHKq=4*jq34`6@VAQR8WG z^%)@5CXnD_T#f%@-l${>y$tfb>2LPmc{~5A82|16mH)R?&r#KKLs7xpN-D`=&Cm^R zvMA6#Ahr<3X>Q7|-qfTY)}32HkAz$_mibYV!I)u>bmjK`qwBe(>za^0Kt*HnFbSdO z1>+ryKCNxmm^)*$XfiDOF2|{-v3KKB?&!(S_Y=Ht@|ir^hLd978xuI&N{k>?(*f8H z=ClxVJK_%_z1TH0eUwm2J+2To7FK4o+n_na)&#VLn1m;!+CX+~WC+qg1?PA~KdOlC zW)C@pw75_xoe=w7i|r9KGIvQ$+3K?L{7TGHwrQM{dCp=Z*D}3kX7E-@sZnup!BImw z*T#a=+WcTwL78exTgBn|iNE3#EsOorO z*kt)gDzHiPt07fmisA2LWN?AymkdqTgr?=loT7z@d`wnlr6oN}@o|&JX!yPzC*Y8d zu6kWlTzE1)ckyBn+0Y^HMN+GA$wUO_LN6W>mxCo!0?oiQvT`z$jbSEu&{UHRU0E8# z%B^wOc@S!yhMT49Y)ww(Xta^8pmPCe@eI5C*ed96)AX9<>))nKx0(sci8gwob_1}4 z0DIL&vsJ1_s%<@y%U*-eX z5rN&(zef-5G~?@r79oZGW1d!WaTqQn0F6RIOa9tJ=0(kdd{d1{<*tHT#cCvl*i>YY zH+L7jq8xZNcTUBqj(S)ztTU!TM!RQ}In*n&Gn<>(60G7}4%WQL!o>hbJqNDSGwl#H z`4k+twp0cj%PsS+NKaxslAEu9!#U3xT1|_KB6`h=PI0SW`P9GTa7caD1}vKEglV8# zjKZR`pluCW19c2fM&ZG)c3T3Um;ir3y(tSCJ7Agl6|b524dy5El{^EQBG?E61H0XY z`bqg!;zhGhyMFl&(o=JWEJ8n~z)xI}A@C0d2hQGvw7nGv)?POU@(kS1m=%`|+^ika zXl8zjS?xqW$WlO?Ewa;vF~XbybHBor$f<%I&*t$F5fynwZlTGj|IjZtVfGa7l&tK} zW>I<69w(cZLu)QIVG|M2xzW@S+70NinQzk&Y0+3WT*cC)rx~04O-^<{JohU_&HL5XdUKW!uFy|i$FB|EMu0eUyW;gsf`XfIc!Z0V zeK&*hPL}f_cX=@iv>K%S5kL;cl_$v?n(Q9f_cChk8Lq$glT|=e+T*8O4H2n<=NGmn z+2*h+v;kBvF>}&0RDS>)B{1!_*XuE8A$Y=G8w^qGMtfudDBsD5>T5SB;Qo}fSkkiV ze^K^M(UthkwrD!&*tTsu>Dacdj_q`~V%r_twr$(Ct&_dKeeXE?fA&4&yASJWJ*}~- zel=@W)tusynfC_YqH4ll>4Eg`Xjs5F7Tj>tTLz<0N3)X<1px_d2yUY>X~y>>93*$) z5PuNMQLf9Bu?AAGO~a_|J2akO1M*@VYN^VxvP0F$2>;Zb9;d5Yfd8P%oFCCoZE$ z4#N$^J8rxYjUE_6{T%Y>MmWfHgScpuGv59#4u6fpTF%~KB^Ae`t1TD_^Ud#DhL+Dm zbY^VAM#MrAmFj{3-BpVSWph2b_Y6gCnCAombVa|1S@DU)2r9W<> zT5L8BB^er3zxKt1v(y&OYk!^aoQisqU zH(g@_o)D~BufUXcPt!Ydom)e|aW{XiMnes2z&rE?og>7|G+tp7&^;q?Qz5S5^yd$i z8lWr4g5nctBHtigX%0%XzIAB8U|T6&JsC4&^hZBw^*aIcuNO47de?|pGXJ4t}BB`L^d8tD`H`i zqrP8?#J@8T#;{^B!KO6J=@OWKhAerih(phML`(Rg7N1XWf1TN>=Z3Do{l_!d~DND&)O)D>ta20}@Lt77qSnVsA7>)uZAaT9bsB>u&aUQl+7GiY2|dAEg@%Al3i316y;&IhQL^8fw_nwS>f60M_-m+!5)S_6EPM7Y)(Nq^8gL7(3 zOiot`6Wy6%vw~a_H?1hLVzIT^i1;HedHgW9-P#)}Y6vF%C=P70X0Tk^z9Te@kPILI z_(gk!k+0%CG)%!WnBjjw*kAKs_lf#=5HXC00s-}oM-Q1aXYLj)(1d!_a7 z*Gg4Fe6F$*ujVjI|79Z5+Pr`us%zW@ln++2l+0hsngv<{mJ%?OfSo_3HJXOCys{Ug z00*YR-(fv<=&%Q!j%b-_ppA$JsTm^_L4x`$k{VpfLI(FMCap%LFAyq;#ns5bR7V+x zO!o;c5y~DyBPqdVQX)8G^G&jWkBy2|oWTw>)?5u}SAsI$RjT#)lTV&Rf8;>u*qXnb z8F%Xb=7#$m)83z%`E;49)t3fHInhtc#kx4wSLLms!*~Z$V?bTyUGiS&m>1P(952(H zuHdv=;o*{;5#X-uAyon`hP}d#U{uDlV?W?_5UjJvf%11hKwe&(&9_~{W)*y1nR5f_ z!N(R74nNK`y8>B!0Bt_Vr!;nc3W>~RiKtGSBkNlsR#-t^&;$W#)f9tTlZz>n*+Fjz z3zXZ;jf(sTM(oDzJt4FJS*8c&;PLTW(IQDFs_5QPy+7yhi1syPCarvqrHFcf&yTy)^O<1EBx;Ir`5W{TIM>{8w&PB>ro4;YD<5LF^TjTb0!zAP|QijA+1Vg>{Afv^% zmrkc4o6rvBI;Q8rj4*=AZacy*n8B{&G3VJc)so4$XUoie0)vr;qzPZVbb<#Fc=j+8CGBWe$n|3K& z_@%?{l|TzKSlUEO{U{{%Fz_pVDxs7i9H#bnbCw7@4DR=}r_qV!Zo~CvD4ZI*+j3kO zW6_=|S`)(*gM0Z;;}nj`73OigF4p6_NPZQ-Od~e$c_);;4-7sR>+2u$6m$Gf%T{aq zle>e3(*Rt(TPD}03n5)!Ca8Pu!V}m6v0o1;5<1h$*|7z|^(3$Y&;KHKTT}hV056wuF0Xo@mK-52~r=6^SI1NC%c~CC?n>yX6wPTgiWYVz!Sx^atLby9YNn1Rk{g?|pJaxD4|9cUf|V1_I*w zzxK)hRh9%zOl=*$?XUjly5z8?jPMy%vEN)f%T*|WO|bp5NWv@B(K3D6LMl!-6dQg0 zXNE&O>Oyf%K@`ngCvbGPR>HRg5!1IV$_}m@3dWB7x3t&KFyOJn9pxRXCAzFr&%37wXG;z^xaO$ekR=LJG ztIHpY8F5xBP{mtQidqNRoz= z@){+N3(VO5bD+VrmS^YjG@+JO{EOIW)9=F4v_$Ed8rZtHvjpiEp{r^c4F6Ic#ChlC zJX^DtSK+v(YdCW)^EFcs=XP7S>Y!4=xgmv>{S$~@h=xW-G4FF9?I@zYN$e5oF9g$# zb!eVU#J+NjLyX;yb)%SY)xJdvGhsnE*JEkuOVo^k5PyS=o#vq!KD46UTW_%R=Y&0G zFj6bV{`Y6)YoKgqnir2&+sl+i6foAn-**Zd1{_;Zb7Ki=u394C5J{l^H@XN`_6XTKY%X1AgQM6KycJ+= zYO=&t#5oSKB^pYhNdzPgH~aEGW2=ec1O#s-KG z71}LOg@4UEFtp3GY1PBemXpNs6UK-ax*)#$J^pC_me;Z$Je(OqLoh|ZrW*mAMBFn< zHttjwC&fkVfMnQeen8`Rvy^$pNRFVaiEN4Pih*Y3@jo!T0nsClN)pdrr9AYLcZxZ| zJ5Wlj+4q~($hbtuY zVQ7hl>4-+@6g1i`1a)rvtp-;b0>^`Dloy(#{z~ytgv=j4q^Kl}wD>K_Y!l~ zp(_&7sh`vfO(1*MO!B%<6E_bx1)&s+Ae`O)a|X=J9y~XDa@UB`m)`tSG4AUhoM=5& znWoHlA-(z@3n0=l{E)R-p8sB9XkV zZ#D8wietfHL?J5X0%&fGg@MH~(rNS2`GHS4xTo7L$>TPme+Is~!|79=^}QbPF>m%J zFMkGzSndiPO|E~hrhCeo@&Ea{M(ieIgRWMf)E}qeTxT8Q#g-!Lu*x$v8W^M^>?-g= zwMJ$dThI|~M06rG$Sv@C@tWR>_YgaG&!BAbkGggVQa#KdtDB)lMLNVLN|51C@F^y8 zCRvMB^{GO@j=cHfmy}_pCGbP%xb{pNN>? z?7tBz$1^zVaP|uaatYaIN+#xEN4jBzwZ|YI_)p(4CUAz1ZEbDk>J~Y|63SZaak~#0 zoYKruYsWHoOlC1(MhTnsdUOwQfz5p6-D0}4;DO$B;7#M{3lSE^jnTT;ns`>!G%i*F?@pR1JO{QTuD0U+~SlZxcc8~>IB{)@8p`P&+nDxNj`*gh|u?yrv$phpQcW)Us)bi`kT%qLj(fi{dWRZ%Es2!=3mI~UxiW0$-v3vUl?#g{p6eF zMEUAqo5-L0Ar(s{VlR9g=j7+lt!gP!UN2ICMokAZ5(Agd>})#gkA2w|5+<%-CuEP# zqgcM}u@3(QIC^Gx<2dbLj?cFSws_f3e%f4jeR?4M^M3cx1f+Qr6ydQ>n)kz1s##2w zk}UyQc+Z5G-d-1}{WzjkLXgS-2P7auWSJ%pSnD|Uivj5u!xk0 z_^-N9r9o;(rFDt~q1PvE#iJZ_f>J3gcP$)SOqhE~pD2|$=GvpL^d!r z6u=sp-CrMoF7;)}Zd7XO4XihC4ji?>V&(t^?@3Q&t9Mx=qex6C9d%{FE6dvU6%d94 zIE;hJ1J)cCqjv?F``7I*6bc#X)JW2b4f$L^>j{*$R`%5VHFi*+Q$2;nyieduE}qdS{L8y8F08yLs?w}{>8>$3236T-VMh@B zq-nujsb_1aUv_7g#)*rf9h%sFj*^mIcImRV*k~Vmw;%;YH(&ylYpy!&UjUVqqtfG` zox3esju?`unJJA_zKXRJP)rA3nXc$m^{S&-p|v|-0x9LHJm;XIww7C#R$?00l&Yyj z=e}gKUOpsImwW?N)+E(awoF@HyP^EhL+GlNB#k?R<2>95hz!h9sF@U20DHSB3~WMa zk90+858r@-+vWwkawJ)8ougd(i#1m3GLN{iSTylYz$brAsP%=&m$mQQrH$g%3-^VR zE%B`Vi&m8f3T~&myTEK28BDWCVzfWir1I?03;pX))|kY5ClO^+bae z*7E?g=3g7EiisYOrE+lA)2?Ln6q2*HLNpZEWMB|O-JI_oaHZB%CvYB(%=tU= zE*OY%QY58fW#RG5=gm0NR#iMB=EuNF@)%oZJ}nmm=tsJ?eGjia{e{yuU0l3{d^D@)kVDt=1PE)&tf_hHC%0MB znL|CRCPC}SeuVTdf>-QV70`0(EHizc21s^sU>y%hW0t!0&y<7}Wi-wGy>m%(-jsDj zP?mF|>p_K>liZ6ZP(w5(|9Ga%>tLgb$|doDDfkdW>Z z`)>V2XC?NJT26mL^@ zf+IKr27TfM!UbZ@?zRddC7#6ss1sw%CXJ4FWC+t3lHZupzM77m^=9 z&(a?-LxIq}*nvv)y?27lZ{j zifdl9hyJudyP2LpU$-kXctshbJDKS{WfulP5Dk~xU4Le4c#h^(YjJit4#R8_khheS z|8(>2ibaHES4+J|DBM7I#QF5u-*EdN{n=Kt@4Zt?@Tv{JZA{`4 zU#kYOv{#A&gGPwT+$Ud}AXlK3K7hYzo$(fBSFjrP{QQ zeaKg--L&jh$9N}`pu{Bs>?eDFPaWY4|9|foN%}i;3%;@4{dc+iw>m}{3rELqH21G! z`8@;w-zsJ1H(N3%|1B@#ioLOjib)j`EiJqPQVSbPSPVHCj6t5J&(NcWzBrzCiDt{4 zdlPAUKldz%6x5II1H_+jv)(xVL+a;P+-1hv_pM>gMRr%04@k;DTokASSKKhU1Qms| zrWh3a!b(J3n0>-tipg{a?UaKsP7?+|@A+1WPDiQIW1Sf@qDU~M_P65_s}7(gjTn0X zucyEm)o;f8UyshMy&>^SC3I|C6jR*R_GFwGranWZe*I>K+0k}pBuET&M~ z;Odo*ZcT?ZpduHyrf8E%IBFtv;JQ!N_m>!sV6ly$_1D{(&nO~w)G~Y`7sD3#hQk%^ zp}ucDF_$!6DAz*PM8yE(&~;%|=+h(Rn-=1Wykas_-@d&z#=S}rDf`4w(rVlcF&lF! z=1)M3YVz7orwk^BXhslJ8jR);sh^knJW(Qmm(QdSgIAIdlN4Te5KJisifjr?eB{FjAX1a0AB>d?qY4Wx>BZ8&}5K0fA+d{l8 z?^s&l8#j7pR&ijD?0b%;lL9l$P_mi2^*_OL+b}4kuLR$GAf85sOo02?Y#90}CCDiS zZ%rbCw>=H~CBO=C_JVV=xgDe%b4FaEFtuS7Q1##y686r%F6I)s-~2(}PWK|Z8M+Gu zl$y~5@#0Ka%$M<&Cv%L`a8X^@tY&T7<0|(6dNT=EsRe0%kp1Qyq!^43VAKYnr*A5~ zsI%lK1ewqO;0TpLrT9v}!@vJK{QoVa_+N4FYT#h?Y8rS1S&-G+m$FNMP?(8N`MZP zels(*?kK{{^g9DOzkuZXJ2;SrOQsp9T$hwRB1(phw1c7`!Q!by?Q#YsSM#I12RhU{$Q+{xj83axHcftEc$mNJ8_T7A-BQc*k(sZ+~NsO~xAA zxnbb%dam_fZlHvW7fKXrB~F&jS<4FD2FqY?VG?ix*r~MDXCE^WQ|W|WM;gsIA4lQP zJ2hAK@CF*3*VqPr2eeg6GzWFlICi8S>nO>5HvWzyZTE)hlkdC_>pBej*>o0EOHR|) z$?};&I4+_?wvL*g#PJ9)!bc#9BJu1(*RdNEn>#Oxta(VWeM40ola<0aOe2kSS~{^P zDJBd}0L-P#O-CzX*%+$#v;(x%<*SPgAje=F{Zh-@ucd2DA(yC|N_|ocs*|-!H%wEw z@Q!>siv2W;C^^j^59OAX03&}&D*W4EjCvfi(ygcL#~t8XGa#|NPO+*M@Y-)ctFA@I z-p7npT1#5zOLo>7q?aZpCZ=iecn3QYklP;gF0bq@>oyBq94f6C=;Csw3PkZ|5q=(c zfs`aw?II0e(h=|7o&T+hq&m$; zBrE09Twxd9BJ2P+QPN}*OdZ-JZV7%av@OM7v!!NL8R;%WFq*?{9T3{ct@2EKgc8h) zMxoM$SaF#p<`65BwIDfmXG6+OiK0e)`I=!A3E`+K@61f}0e z!2a*FOaDrOe>U`q%K!QN`&=&0C~)CaL3R4VY(NDt{Xz(Xpqru5=r#uQN1L$Je1*dkdqQ*=lofQaN%lO!<5z9ZlHgxt|`THd>2 zsWfU$9=p;yLyJyM^t zS2w9w?Bpto`@H^xJpZDKR1@~^30Il6oFGfk5%g6w*C+VM)+%R@gfIwNprOV5{F^M2 zO?n3DEzpT+EoSV-%OdvZvNF+pDd-ZVZ&d8 zKeIyrrfPN=EcFRCPEDCVflX#3-)Ik_HCkL(ejmY8vzcf-MTA{oHk!R2*36`O68$7J zf}zJC+bbQk--9Xm!u#lgLvx8TXx2J258E5^*IZ(FXMpq$2LUUvhWQPs((z1+2{Op% z?J}9k5^N=z;7ja~zi8a_-exIqWUBJwohe#4QJ`|FF*$C{lM18z^#hX6!5B8KAkLUX ziP=oti-gpV(BsLD{0(3*dw}4JxK23Y7M{BeFPucw!sHpY&l%Ws4pSm`+~V7;bZ%Dx zeI)MK=4vC&5#;2MT7fS?^ch9?2;%<8Jlu-IB&N~gg8t;6S-#C@!NU{`p7M8@2iGc& zg|JPg%@gCoCQ&s6JvDU&`X2S<57f(k8nJ1wvBu{8r?;q3_kpZZ${?|( z+^)UvR33sjSd)aT!UPkA;ylO6{aE3MQa{g%Mcf$1KONcjO@&g5zPHWtzM1rYC{_K> zgQNcs<{&X{OA=cEWw5JGqpr0O>x*Tfak2PE9?FuWtz^DDNI}rwAaT0(bdo-<+SJ6A z&}S%boGMWIS0L}=S>|-#kRX;e^sUsotry(MjE|3_9duvfc|nwF#NHuM-w7ZU!5ei8 z6Mkf>2)WunY2eU@C-Uj-A zG(z0Tz2YoBk>zCz_9-)4a>T46$(~kF+Y{#sA9MWH%5z#zNoz)sdXq7ZR_+`RZ%0(q zC7&GyS_|BGHNFl8Xa%@>iWh%Gr?=J5<(!OEjauj5jyrA-QXBjn0OAhJJ9+v=!LK`` z@g(`^*84Q4jcDL`OA&ZV60djgwG`|bcD*i50O}Q{9_noRg|~?dj%VtKOnyRs$Uzqg z191aWoR^rDX#@iSq0n z?9Sg$WSRPqSeI<}&n1T3!6%Wj@5iw5`*`Btni~G=&;J+4`7g#OQTa>u`{4ZZ(c@s$ zK0y;ySOGD-UTjREKbru{QaS>HjN<2)R%Nn-TZiQ(Twe4p@-saNa3~p{?^V9Nixz@a zykPv~<@lu6-Ng9i$Lrk(xi2Tri3q=RW`BJYOPC;S0Yly%77c727Yj-d1vF!Fuk{Xh z)lMbA69y7*5ufET>P*gXQrxsW+ zz)*MbHZv*eJPEXYE<6g6_M7N%#%mR{#awV3i^PafNv(zyI)&bH?F}2s8_rR(6%!V4SOWlup`TKAb@ee>!9JKPM=&8g#BeYRH9FpFybxBXQI2|g}FGJfJ+ zY-*2hB?o{TVL;Wt_ek;AP5PBqfDR4@Z->_182W z{P@Mc27j6jE*9xG{R$>6_;i=y{qf(c`5w9fa*`rEzX6t!KJ(p1H|>J1pC-2zqWENF zmm=Z5B4u{cY2XYl(PfrInB*~WGWik3@1oRhiMOS|D;acnf-Bs(QCm#wR;@Vf!hOPJ zgjhDCfDj$HcyVLJ=AaTbQ{@vIv14LWWF$=i-BDoC11}V;2V8A`S>_x)vIq44-VB-v z*w-d}$G+Ql?En8j!~ZkCpQ$|cA0|+rrY>tiCeWxkRGPoarxlGU2?7%k#F693RHT24 z-?JsiXlT2PTqZqNb&sSc>$d;O4V@|b6VKSWQb~bUaWn1Cf0+K%`Q&Wc<>mQ>*iEGB zbZ;aYOotBZ{vH3y<0A*L0QVM|#rf*LIsGx(O*-7)r@yyBIzJnBFSKBUSl1e|8lxU* zzFL+YDVVkIuzFWeJ8AbgN&w(4-7zbiaMn{5!JQXu)SELk*CNL+Fro|2v|YO)1l15t zs(0^&EB6DPMyaqvY>=KL>)tEpsn;N5Q#yJj<9}ImL((SqErWN3Q=;tBO~ExTCs9hB z2E$7eN#5wX4<3m^5pdjm#5o>s#eS_Q^P)tm$@SawTqF*1dj_i#)3};JslbLKHXl_N z)Fxzf>FN)EK&Rz&*|6&%Hs-^f{V|+_vL1S;-1K-l$5xiC@}%uDuwHYhmsV?YcOUlk zOYkG5v2+`+UWqpn0aaaqrD3lYdh0*!L`3FAsNKu=Q!vJu?Yc8n|CoYyDo_`r0mPoo z8>XCo$W4>l(==h?2~PoRR*kEe)&IH{1sM41mO#-36`02m#nTX{r*r`Q5rZ2-sE|nA zhnn5T#s#v`52T5|?GNS`%HgS2;R(*|^egNPDzzH_z^W)-Q98~$#YAe)cEZ%vge965AS_am#DK#pjPRr-!^za8>`kksCAUj(Xr*1NW5~e zpypt_eJpD&4_bl_y?G%>^L}=>xAaV>KR6;^aBytqpiHe%!j;&MzI_>Sx7O%F%D*8s zSN}cS^<{iiK)=Ji`FpO#^zY!_|D)qeRNAtgmH)m;qC|mq^j(|hL`7uBz+ULUj37gj zksdbnU+LSVo35riSX_4z{UX=%n&}7s0{WuZYoSfwAP`8aKN9P@%e=~1`~1ASL-z%# zw>DO&ixr}c9%4InGc*_y42bdEk)ZdG7-mTu0bD@_vGAr*NcFoMW;@r?@LUhRI zCUJgHb`O?M3!w)|CPu~ej%fddw20lod?Ufp8Dmt0PbnA0J%KE^2~AIcnKP()025V> zG>noSM3$5Btmc$GZoyP^v1@Poz0FD(6YSTH@aD0}BXva?LphAiSz9f&Y(aDAzBnUh z?d2m``~{z;{}kZJ>a^wYI?ry(V9hIoh;|EFc0*-#*`$T0DRQ1;WsqInG;YPS+I4{g zJGpKk%%Sdc5xBa$Q^_I~(F97eqDO7AN3EN0u)PNBAb+n+ zWBTxQx^;O9o0`=g+Zrt_{lP!sgWZHW?8bLYS$;1a@&7w9rD9|Ge;Gb?sEjFoF9-6v z#!2)t{DMHZ2@0W*fCx;62d#;jouz`R5Y(t{BT=$N4yr^^o$ON8d{PQ=!O zX17^CrdM~7D-;ZrC!||<+FEOxI_WI3CA<35va%4v>gc zEX-@h8esj=a4szW7x{0g$hwoWRQG$yK{@3mqd-jYiVofJE!Wok1* znV7Gm&Ssq#hFuvj1sRyHg(6PFA5U*Q8Rx>-blOs=lb`qa{zFy&n4xY;sd$fE+<3EI z##W$P9M{B3c3Si9gw^jlPU-JqD~Cye;wr=XkV7BSv#6}DrsXWFJ3eUNrc%7{=^sP> zrp)BWKA9<}^R9g!0q7yWlh;gr_TEOD|#BmGq<@IV;ueg+D2}cjpp+dPf&Q(36sFU&K8}hA85U61faW&{ zlB`9HUl-WWCG|<1XANN3JVAkRYvr5U4q6;!G*MTdSUt*Mi=z_y3B1A9j-@aK{lNvx zK%p23>M&=KTCgR!Ee8c?DAO2_R?B zkaqr6^BSP!8dHXxj%N1l+V$_%vzHjqvu7p@%Nl6;>y*S}M!B=pz=aqUV#`;h%M0rU zHfcog>kv3UZAEB*g7Er@t6CF8kHDmKTjO@rejA^ULqn!`LwrEwOVmHx^;g|5PHm#B zZ+jjWgjJ!043F+&#_;D*mz%Q60=L9Ove|$gU&~As5^uz@2-BfQ!bW)Khn}G+Wyjw- z19qI#oB(RSNydn0t~;tAmK!P-d{b-@@E5|cdgOS#!>%#Rj6ynkMvaW@37E>@hJP^8 z2zk8VXx|>#R^JCcWdBCy{0nPmYFOxN55#^-rlqobe0#L6)bi?E?SPymF*a5oDDeSd zO0gx?#KMoOd&G(2O@*W)HgX6y_aa6iMCl^~`{@UR`nMQE`>n_{_aY5nA}vqU8mt8H z`oa=g0SyiLd~BxAj2~l$zRSDHxvDs;I4>+M$W`HbJ|g&P+$!U7-PHX4RAcR0szJ*( ze-417=bO2q{492SWrqDK+L3#ChUHtz*@MP)e^%@>_&#Yk^1|tv@j4%3T)diEX zATx4K*hcO`sY$jk#jN5WD<=C3nvuVsRh||qDHnc~;Kf59zr0;c7VkVSUPD%NnnJC_ zl3F^#f_rDu8l}l8qcAz0FFa)EAt32IUy_JLIhU_J^l~FRH&6-ivSpG2PRqzDdMWft>Zc(c)#tb%wgmWN%>IOPm zZi-noqS!^Ftb81pRcQi`X#UhWK70hy4tGW1mz|+vI8c*h@ zfFGJtW3r>qV>1Z0r|L>7I3un^gcep$AAWfZHRvB|E*kktY$qQP_$YG60C@X~tTQjB3%@`uz!qxtxF+LE!+=nrS^07hn` zEgAp!h|r03h7B!$#OZW#ACD+M;-5J!W+{h|6I;5cNnE(Y863%1(oH}_FTW})8zYb$7czP zg~Szk1+_NTm6SJ0MS_|oSz%e(S~P-&SFp;!k?uFayytV$8HPwuyELSXOs^27XvK-D zOx-Dl!P|28DK6iX>p#Yb%3`A&CG0X2S43FjN%IB}q(!hC$fG}yl1y9W&W&I@KTg6@ zK^kpH8=yFuP+vI^+59|3%Zqnb5lTDAykf z9S#X`3N(X^SpdMyWQGOQRjhiwlj!0W-yD<3aEj^&X%=?`6lCy~?`&WSWt z?U~EKFcCG_RJ(Qp7j=$I%H8t)Z@6VjA#>1f@EYiS8MRHZphp zMA_5`znM=pzUpBPO)pXGYpQ6gkine{6u_o!P@Q+NKJ}k!_X7u|qfpAyIJb$_#3@wJ z<1SE2Edkfk9C!0t%}8Yio09^F`YGzpaJHGk*-ffsn85@)%4@`;Fv^8q(-Wk7r=Q8p zT&hD`5(f?M{gfzGbbwh8(}G#|#fDuk7v1W)5H9wkorE0ZZjL0Q1=NRGY>zwgfm81DdoaVwNH;or{{eSyybt)m<=zXoA^RALYG-2t zouH|L*BLvmm9cdMmn+KGopyR@4*=&0&4g|FLoreZOhRmh=)R0bg~ zT2(8V_q7~42-zvb)+y959OAv!V$u(O3)%Es0M@CRFmG{5sovIq4%8Ahjk#*5w{+)+ zMWQoJI_r$HxL5km1#6(e@{lK3Udc~n0@g`g$s?VrnQJ$!oPnb?IHh-1qA`Rz$)Ai< z6w$-MJW-gKNvOhL+XMbE7&mFt`x1KY>k4(!KbbpZ`>`K@1J<(#vVbjx@Z@(6Q}MF# zMnbr-f55(cTa^q4+#)=s+ThMaV~E`B8V=|W_fZWDwiso8tNMTNse)RNBGi=gVwgg% zbOg8>mbRN%7^Um-7oj4=6`$|(K7!+t^90a{$18Z>}<#!bm%ZEFQ{X(yBZMc>lCz0f1I2w9Sq zuGh<9<=AO&g6BZte6hn>Qmvv;Rt)*cJfTr2=~EnGD8P$v3R|&1RCl&7)b+`=QGapi zPbLg_pxm`+HZurtFZ;wZ=`Vk*do~$wB zxoW&=j0OTbQ=Q%S8XJ%~qoa3Ea|au5o}_(P;=!y-AjFrERh%8la!z6Fn@lR?^E~H12D?8#ht=1F;7@o4$Q8GDj;sSC%Jfn01xgL&%F2 zwG1|5ikb^qHv&9hT8w83+yv&BQXOQyMVJSBL(Ky~p)gU3#%|blG?IR9rP^zUbs7rOA0X52Ao=GRt@C&zlyjNLv-} z9?*x{y(`509qhCV*B47f2hLrGl^<@SuRGR!KwHei?!CM10Tq*YDIoBNyRuO*>3FU? zHjipIE#B~y3FSfOsMfj~F9PNr*H?0oHyYB^G(YyNh{SxcE(Y-`x5jFMKb~HO*m+R% zrq|ic4fzJ#USpTm;X7K+E%xsT_3VHKe?*uc4-FsILUH;kL>_okY(w`VU*8+l>o>Jm ziU#?2^`>arnsl#)*R&nf_%>A+qwl%o{l(u)M?DK1^mf260_oteV3#E_>6Y4!_hhVD zM8AI6MM2V*^_M^sQ0dmHu11fy^kOqXqzpr?K$`}BKWG`=Es(9&S@K@)ZjA{lj3ea7_MBP zk(|hBFRjHVMN!sNUkrB;(cTP)T97M$0Dtc&UXSec<+q?y>5=)}S~{Z@ua;1xt@=T5 zI7{`Z=z_X*no8s>mY;>BvEXK%b`a6(DTS6t&b!vf_z#HM{Uoy_5fiB(zpkF{})ruka$iX*~pq1ZxD?q68dIo zIZSVls9kFGsTwvr4{T_LidcWtt$u{kJlW7moRaH6+A5hW&;;2O#$oKyEN8kx`LmG)Wfq4ykh+q{I3|RfVpkR&QH_x;t41Uw z`P+tft^E2B$domKT@|nNW`EHwyj>&}K;eDpe z1bNOh=fvIfk`&B61+S8ND<(KC%>y&?>opCnY*r5M+!UrWKxv0_QvTlJc>X#AaI^xo zaRXL}t5Ej_Z$y*|w*$6D+A?Lw-CO-$itm^{2Ct82-<0IW)0KMNvJHgBrdsIR0v~=H z?n6^}l{D``Me90`^o|q!olsF?UX3YSq^6Vu>Ijm>>PaZI8G@<^NGw{Cx&%|PwYrfw zR!gX_%AR=L3BFsf8LxI|K^J}deh0ZdV?$3r--FEX`#INxsOG6_=!v)DI>0q|BxT)z z-G6kzA01M?rba+G_mwNMQD1mbVbNTWmBi*{s_v_Ft9m2Avg!^78(QFu&n6mbRJ2bA zv!b;%yo{g*9l2)>tsZJOOp}U~8VUH`}$ z8p_}t*XIOehezolNa-a2x0BS})Y9}&*TPgua{Ewn-=wVrmJUeU39EKx+%w%=ixQWK zDLpwaNJs65#6o7Ln7~~X+p_o2BR1g~VCfxLzxA{HlWAI6^H;`juI=&r1jQrUv_q0Z z1Ja-tjdktrrP>GOC*#p?*xfQU5MqjMsBe!9lh(u8)w$e@Z|>aUHI5o;MGw*|Myiz3 z-f0;pHg~Q#%*Kx8MxH%AluVXjG2C$)WL-K63@Q`#y9_k_+}eR(x4~dp7oV-ek0H>I zgy8p#i4GN{>#v=pFYUQT(g&b$OeTy-X_#FDgNF8XyfGY6R!>inYn8IR2RDa&O!(6< znXs{W!bkP|s_YI*Yx%4stI`=ZO45IK6rBs`g7sP40ic}GZ58s?Mc$&i`kq_tfci>N zIHrC0H+Qpam1bNa=(`SRKjixBTtm&e`j9porEci!zdlg1RI0Jw#b(_Tb@RQK1Zxr_ z%7SUeH6=TrXt3J@js`4iDD0=IoHhK~I7^W8^Rcp~Yaf>2wVe|Hh1bUpX9ATD#moByY57-f2Ef1TP^lBi&p5_s7WGG9|0T}dlfxOx zXvScJO1Cnq`c`~{Dp;{;l<-KkCDE+pmexJkd}zCgE{eF=)K``-qC~IT6GcRog_)!X z?fK^F8UDz$(zFUrwuR$qro5>qqn>+Z%<5>;_*3pZ8QM|yv9CAtrAx;($>4l^_$_-L z*&?(77!-=zvnCVW&kUcZMb6;2!83si518Y%R*A3JZ8Is|kUCMu`!vxDgaWjs7^0j( ziTaS4HhQ)ldR=r)_7vYFUr%THE}cPF{0H45FJ5MQW^+W>P+eEX2kLp3zzFe*-pFVA zdDZRybv?H|>`9f$AKVjFWJ=wegO7hOOIYCtd?Vj{EYLT*^gl35|HQ`R=ti+ADm{jyQE7K@kdjuqJhWVSks>b^ zxha88-h3s;%3_5b1TqFCPTxVjvuB5U>v=HyZ$?JSk+&I%)M7KE*wOg<)1-Iy)8-K! z^XpIt|0ibmk9RtMmlUd7#Ap3Q!q9N4atQy)TmrhrFhfx1DAN`^vq@Q_SRl|V z#lU<~n67$mT)NvHh`%als+G-)x1`Y%4Bp*6Un5Ri9h=_Db zA-AdP!f>f0m@~>7X#uBM?diI@)Egjuz@jXKvm zJo+==juc9_<;CqeRaU9_Mz@;3e=E4=6TK+c`|uu#pIqhSyNm`G(X)&)B`8q0RBv#> z`gGlw(Q=1Xmf55VHj%C#^1lpc>LY8kfA@|rlC1EA<1#`iuyNO z(=;irt{_&K=i4)^x%;U(Xv<)+o=dczC5H3W~+e|f~{*ucxj@{Yi-cw^MqYr3fN zF5D+~!wd$#al?UfMnz(@K#wn`_5na@rRr8XqN@&M&FGEC@`+OEv}sI1hw>Up0qAWf zL#e4~&oM;TVfjRE+10B_gFlLEP9?Q-dARr3xi6nQqnw>k-S;~b z;!0s2VS4}W8b&pGuK=7im+t(`nz@FnT#VD|!)eQNp-W6)@>aA+j~K*H{$G`y2|QHY z|Hmy+CR@#jWY4~)lr1qBJB_RfHJFfP<}pK5(#ZZGSqcpyS&}01LnTWk5fzmXMGHkJ zTP6L^B+uj;lmB_W<~4=${+v0>z31M!-_O@o-O9GyW)j_mjx}!0@br_LE-7SIuPP84 z;5=O(U*g_um0tyG|61N@d9lEuOeiRd+#NY^{nd5;-CVlw&Ap7J?qwM^?E29wvS}2d zbzar4Fz&RSR(-|s!Z6+za&Z zY#D<5q_JUktIzvL0)yq_kLWG6DO{ri=?c!y!f(Dk%G{8)k`Gym%j#!OgXVDD3;$&v@qy#ISJfp=Vm>pls@9-mapVQChAHHd-x+OGx)(*Yr zC1qDUTZ6mM(b_hi!TuFF2k#8uI2;kD70AQ&di$L*4P*Y-@p`jdm%_c3f)XhYD^6M8&#Y$ZpzQMcR|6nsH>b=*R_Von!$BTRj7yGCXokoAQ z&ANvx0-Epw`QIEPgI(^cS2f(Y85yV@ygI{ewyv5Frng)e}KCZF7JbR(&W618_dcEh(#+^zZFY;o<815<5sOHQdeax9_!PyM&;{P zkBa5xymca0#)c#tke@3KNEM8a_mT&1gm;p&&JlMGH(cL(b)BckgMQ^9&vRwj!~3@l zY?L5}=Jzr080OGKb|y`ee(+`flQg|!lo6>=H)X4`$Gz~hLmu2a%kYW_Uu8x09Pa0J zKZ`E$BKJ=2GPj_3l*TEcZ*uYRr<*J^#5pILTT;k_cgto1ZL-%slyc16J~OH-(RgDA z%;EjEnoUkZ&acS{Q8`{i6T5^nywgqQI5bDIymoa7CSZG|WWVk>GM9)zy*bNih|QIm z%0+(Nnc*a_xo;$=!HQYaapLms>J1ToyjtFByY`C2H1wT#178#4+|{H0BBqtCdd$L% z_3Hc60j@{t9~MjM@LBalR&6@>B;9?r<7J~F+WXyYu*y3?px*=8MAK@EA+jRX8{CG?GI-< z54?Dc9CAh>QTAvyOEm0^+x;r2BWX|{3$Y7)L5l*qVE*y0`7J>l2wCmW zL1?|a`pJ-l{fb_N;R(Z9UMiSj6pQjOvQ^%DvhIJF!+Th7jO2~1f1N+(-TyCFYQZYw z4)>7caf^Ki_KJ^Zx2JUb z&$3zJy!*+rCV4%jqwyuNY3j1ZEiltS0xTzd+=itTb;IPYpaf?8Y+RSdVdpacB(bVQ zC(JupLfFp8y43%PMj2}T|VS@%LVp>hv4Y!RPMF?pp8U_$xCJ)S zQx!69>bphNTIb9yn*_yfj{N%bY)t{L1cs8<8|!f$;UQ*}IN=2<6lA;x^(`8t?;+ST zh)z4qeYYgZkIy{$4x28O-pugO&gauRh3;lti9)9Pvw+^)0!h~%m&8Q!AKX%urEMnl z?yEz?g#ODn$UM`+Q#$Q!6|zsq_`dLO5YK-6bJM6ya>}H+vnW^h?o$z;V&wvuM$dR& zeEq;uUUh$XR`TWeC$$c&Jjau2it3#%J-y}Qm>nW*s?En?R&6w@sDXMEr#8~$=b(gk zwDC3)NtAP;M2BW_lL^5ShpK$D%@|BnD{=!Tq)o(5@z3i7Z){} zGr}Exom_qDO{kAVkZ*MbLNHE666Kina#D{&>Jy%~w7yX$oj;cYCd^p9zy z8*+wgSEcj$4{WxKmCF(5o7U4jqwEvO&dm1H#7z}%VXAbW&W24v-tS6N3}qrm1OnE)fUkoE8yMMn9S$?IswS88tQWm4#Oid#ckgr6 zRtHm!mfNl-`d>O*1~d7%;~n+{Rph6BBy^95zqI{K((E!iFQ+h*C3EsbxNo_aRm5gj zKYug($r*Q#W9`p%Bf{bi6;IY0v`pB^^qu)gbg9QHQ7 zWBj(a1YSu)~2RK8Pi#C>{DMlrqFb9e_RehEHyI{n?e3vL_}L>kYJC z_ly$$)zFi*SFyNrnOt(B*7E$??s67EO%DgoZL2XNk8iVx~X_)o++4oaK1M|ou73vA0K^503j@uuVmLcHH4ya-kOIDfM%5%(E z+Xpt~#7y2!KB&)PoyCA+$~DXqxPxxALy!g-O?<9+9KTk4Pgq4AIdUkl`1<1#j^cJg zgU3`0hkHj_jxV>`Y~%LAZl^3o0}`Sm@iw7kwff{M%VwtN)|~!p{AsfA6vB5UolF~d zHWS%*uBDt<9y!9v2Xe|au&1j&iR1HXCdyCjxSgG*L{wmTD4(NQ=mFjpa~xooc6kju z`~+d{j7$h-;HAB04H!Zscu^hZffL#9!p$)9>sRI|Yovm)g@F>ZnosF2EgkU3ln0bR zTA}|+E(tt)!SG)-bEJi_0m{l+(cAz^pi}`9=~n?y&;2eG;d9{M6nj>BHGn(KA2n|O zt}$=FPq!j`p&kQ8>cirSzkU0c08%8{^Qyqi-w2LoO8)^E7;;I1;HQ6B$u0nNaX2CY zSmfi)F`m94zL8>#zu;8|{aBui@RzRKBlP1&mfFxEC@%cjl?NBs`cr^nm){>;$g?rhKr$AO&6qV_Wbn^}5tfFBry^e1`%du2~o zs$~dN;S_#%iwwA_QvmMjh%Qo?0?rR~6liyN5Xmej8(*V9ym*T`xAhHih-v$7U}8=dfXi2i*aAB!xM(Xekg*ix@r|ymDw*{*s0?dlVys2e)z62u1 z+k3esbJE=-P5S$&KdFp+2H7_2e=}OKDrf( z9-207?6$@f4m4B+9E*e((Y89!q?zH|mz_vM>kp*HGXldO0Hg#!EtFhRuOm$u8e~a9 z5(roy7m$Kh+zjW6@zw{&20u?1f2uP&boD}$#Zy)4o&T;vyBoqFiF2t;*g=|1=)PxB z8eM3Mp=l_obbc?I^xyLz?4Y1YDWPa+nm;O<$Cn;@ane616`J9OO2r=rZr{I_Kizyc zP#^^WCdIEp*()rRT+*YZK>V@^Zs=ht32x>Kwe zab)@ZEffz;VM4{XA6e421^h~`ji5r%)B{wZu#hD}f3$y@L0JV9f3g{-RK!A?vBUA}${YF(vO4)@`6f1 z-A|}e#LN{)(eXloDnX4Vs7eH|<@{r#LodP@Nz--$Dg_Par%DCpu2>2jUnqy~|J?eZ zBG4FVsz_A+ibdwv>mLp>P!(t}E>$JGaK$R~;fb{O3($y1ssQQo|5M;^JqC?7qe|hg zu0ZOqeFcp?qVn&Qu7FQJ4hcFi&|nR!*j)MF#b}QO^lN%5)4p*D^H+B){n8%VPUzi! zDihoGcP71a6!ab`l^hK&*dYrVYzJ0)#}xVrp!e;lI!+x+bfCN0KXwUAPU9@#l7@0& QuEJmfE|#`Dqx|px0L@K;Y5)KL literal 0 HcmV?d00001 diff --git a/samples/client/echo_api/java/native/gradle/wrapper/gradle-wrapper.properties b/samples/client/echo_api/java/native/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000000..ffed3a254e --- /dev/null +++ b/samples/client/echo_api/java/native/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/samples/client/echo_api/java/native/gradlew b/samples/client/echo_api/java/native/gradlew new file mode 100644 index 0000000000..005bcde042 --- /dev/null +++ b/samples/client/echo_api/java/native/gradlew @@ -0,0 +1,234 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit + +APP_NAME="Gradle" +APP_BASE_NAME=${0##*/} + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='-Dfile.encoding=UTF-8 "-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/samples/client/echo_api/java/native/gradlew.bat b/samples/client/echo_api/java/native/gradlew.bat new file mode 100644 index 0000000000..6a68175eb7 --- /dev/null +++ b/samples/client/echo_api/java/native/gradlew.bat @@ -0,0 +1,89 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS=-Dfile.encoding=UTF-8 "-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/samples/client/echo_api/java/native/pom.xml b/samples/client/echo_api/java/native/pom.xml new file mode 100644 index 0000000000..2db524a900 --- /dev/null +++ b/samples/client/echo_api/java/native/pom.xml @@ -0,0 +1,216 @@ + + 4.0.0 + org.openapitools + echo-api-native + jar + echo-api-native + 0.1.0 + https://github.com/openapitools/openapi-generator + OpenAPI Java + + scm:git:git@github.com:openapitools/openapi-generator.git + scm:git:git@github.com:openapitools/openapi-generator.git + https://github.com/openapitools/openapi-generator + + + + + Unlicense + http://www.apache.org/licenses/LICENSE-2.0.html + repo + + + + + + OpenAPI-Generator Contributors + team@openapitools.org + OpenAPITools.org + http://openapitools.org + + + + + + + maven-enforcer-plugin + 3.1.0 + + + enforce-maven + + enforce + + + + + 3 + + + 11 + + + + + + + + maven-surefire-plugin + 3.0.0-M7 + + + conf/log4j.properties + + -Xms512m -Xmx1500m + methods + 10 + + + + maven-dependency-plugin + 3.3.0 + + + package + + copy-dependencies + + + ${project.build.directory}/lib + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.3.0 + + + + test-jar + + + + + + + + maven-compiler-plugin + 3.10.1 + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.4.1 + + + attach-javadocs + + jar + + + + + + maven-source-plugin + 3.2.1 + + + attach-sources + + jar-no-fork + + + + + + + + + + sign-artifacts + + + + maven-gpg-plugin + 3.0.1 + + + sign-artifacts + verify + + sign + + + + + + + + + + + + + + com.fasterxml.jackson.core + jackson-core + ${jackson-version} + + + com.fasterxml.jackson.core + jackson-annotations + ${jackson-version} + + + com.fasterxml.jackson.core + jackson-databind + ${jackson-version} + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + ${jackson-version} + + + org.openapitools + jackson-databind-nullable + ${jackson-databind-nullable-version} + + + + + com.google.code.findbugs + jsr305 + 3.0.2 + + + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} + provided + + + + + junit + junit + ${junit-version} + test + + + + + UTF-8 + 11 + 11 + 2.14.1 + 0.2.4 + 1.3.5 + 4.13.2 + + diff --git a/samples/client/echo_api/java/native/settings.gradle b/samples/client/echo_api/java/native/settings.gradle new file mode 100644 index 0000000000..8544855474 --- /dev/null +++ b/samples/client/echo_api/java/native/settings.gradle @@ -0,0 +1 @@ +rootProject.name = "echo-api-native" \ No newline at end of file diff --git a/samples/client/echo_api/java/native/src/main/AndroidManifest.xml b/samples/client/echo_api/java/native/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..54fbcb3da1 --- /dev/null +++ b/samples/client/echo_api/java/native/src/main/AndroidManifest.xml @@ -0,0 +1,3 @@ + + + diff --git a/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/ApiClient.java new file mode 100644 index 0000000000..b2534a1409 --- /dev/null +++ b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/ApiClient.java @@ -0,0 +1,456 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package org.openapitools.client; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +import org.openapitools.jackson.nullable.JsonNullableModule; + +import java.io.InputStream; +import java.net.URI; +import java.net.URLEncoder; +import java.net.http.HttpClient; +import java.net.http.HttpConnectTimeoutException; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.Collection; +import java.util.Collections; +import java.util.List; +import java.util.StringJoiner; +import java.util.function.Consumer; +import java.util.stream.Collectors; + +import static java.nio.charset.StandardCharsets.UTF_8; + +/** + * Configuration and utility class for API clients. + * + *

This class can be constructed and modified, then used to instantiate the + * various API classes. The API classes use the settings in this class to + * configure themselves, but otherwise do not store a link to this class.

+ * + *

This class is mutable and not synchronized, so it is not thread-safe. + * The API classes generated from this are immutable and thread-safe.

+ * + *

The setter methods of this class return the current object to facilitate + * a fluent style of configuration.

+ */ +@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ApiClient { + + private HttpClient.Builder builder; + private ObjectMapper mapper; + private String scheme; + private String host; + private int port; + private String basePath; + private Consumer interceptor; + private Consumer> responseInterceptor; + private Consumer> asyncResponseInterceptor; + private Duration readTimeout; + private Duration connectTimeout; + + private static String valueToString(Object value) { + if (value == null) { + return ""; + } + if (value instanceof OffsetDateTime) { + return ((OffsetDateTime) value).format(DateTimeFormatter.ISO_OFFSET_DATE_TIME); + } + return value.toString(); + } + + /** + * URL encode a string in the UTF-8 encoding. + * + * @param s String to encode. + * @return URL-encoded representation of the input string. + */ + public static String urlEncode(String s) { + return URLEncoder.encode(s, UTF_8).replaceAll("\\+", "%20"); + } + + /** + * Convert a URL query name/value parameter to a list of encoded {@link Pair} + * objects. + * + *

The value can be null, in which case an empty list is returned.

+ * + * @param name The query name parameter. + * @param value The query value, which may not be a collection but may be + * null. + * @return A singleton list of the {@link Pair} objects representing the input + * parameters, which is encoded for use in a URL. If the value is null, an + * empty list is returned. + */ + public static List parameterToPairs(String name, Object value) { + if (name == null || name.isEmpty() || value == null) { + return Collections.emptyList(); + } + return Collections.singletonList(new Pair(urlEncode(name), urlEncode(valueToString(value)))); + } + + /** + * Convert a URL query name/collection parameter to a list of encoded + * {@link Pair} objects. + * + * @param collectionFormat The swagger collectionFormat string (csv, tsv, etc). + * @param name The query name parameter. + * @param values A collection of values for the given query name, which may be + * null. + * @return A list of {@link Pair} objects representing the input parameters, + * which is encoded for use in a URL. If the values collection is null, an + * empty list is returned. + */ + public static List parameterToPairs( + String collectionFormat, String name, Collection values) { + if (name == null || name.isEmpty() || values == null || values.isEmpty()) { + return Collections.emptyList(); + } + + // get the collection format (default: csv) + String format = collectionFormat == null || collectionFormat.isEmpty() ? "csv" : collectionFormat; + + // create the params based on the collection format + if ("multi".equals(format)) { + return values.stream() + .map(value -> new Pair(urlEncode(name), urlEncode(valueToString(value)))) + .collect(Collectors.toList()); + } + + String delimiter; + switch(format) { + case "csv": + delimiter = urlEncode(","); + break; + case "ssv": + delimiter = urlEncode(" "); + break; + case "tsv": + delimiter = urlEncode("\t"); + break; + case "pipes": + delimiter = urlEncode("|"); + break; + default: + throw new IllegalArgumentException("Illegal collection format: " + collectionFormat); + } + + StringJoiner joiner = new StringJoiner(delimiter); + for (Object value : values) { + joiner.add(urlEncode(valueToString(value))); + } + + return Collections.singletonList(new Pair(urlEncode(name), joiner.toString())); + } + + /** + * Create an instance of ApiClient. + */ + public ApiClient() { + this.builder = createDefaultHttpClientBuilder(); + this.mapper = createDefaultObjectMapper(); + updateBaseUri(getDefaultBaseUri()); + interceptor = null; + readTimeout = null; + connectTimeout = null; + responseInterceptor = null; + asyncResponseInterceptor = null; + } + + /** + * Create an instance of ApiClient. + * + * @param builder Http client builder. + * @param mapper Object mapper. + * @param baseUri Base URI + */ + public ApiClient(HttpClient.Builder builder, ObjectMapper mapper, String baseUri) { + this.builder = builder; + this.mapper = mapper; + updateBaseUri(baseUri != null ? baseUri : getDefaultBaseUri()); + interceptor = null; + readTimeout = null; + connectTimeout = null; + responseInterceptor = null; + asyncResponseInterceptor = null; + } + + protected ObjectMapper createDefaultObjectMapper() { + ObjectMapper mapper = new ObjectMapper(); + mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); + mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + mapper.configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, false); + mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); + mapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); + mapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING); + mapper.disable(DeserializationFeature.ADJUST_DATES_TO_CONTEXT_TIME_ZONE); + mapper.registerModule(new JavaTimeModule()); + mapper.registerModule(new JsonNullableModule()); + return mapper; + } + + protected String getDefaultBaseUri() { + return "http://localhost:3000"; + } + + protected HttpClient.Builder createDefaultHttpClientBuilder() { + return HttpClient.newBuilder(); + } + + public void updateBaseUri(String baseUri) { + URI uri = URI.create(baseUri); + scheme = uri.getScheme(); + host = uri.getHost(); + port = uri.getPort(); + basePath = uri.getRawPath(); + } + + /** + * Set a custom {@link HttpClient.Builder} object to use when creating the + * {@link HttpClient} that is used by the API client. + * + * @param builder Custom client builder. + * @return This object. + */ + public ApiClient setHttpClientBuilder(HttpClient.Builder builder) { + this.builder = builder; + return this; + } + + /** + * Get an {@link HttpClient} based on the current {@link HttpClient.Builder}. + * + *

The returned object is immutable and thread-safe.

+ * + * @return The HTTP client. + */ + public HttpClient getHttpClient() { + return builder.build(); + } + + /** + * Set a custom {@link ObjectMapper} to serialize and deserialize the request + * and response bodies. + * + * @param mapper Custom object mapper. + * @return This object. + */ + public ApiClient setObjectMapper(ObjectMapper mapper) { + this.mapper = mapper; + return this; + } + + /** + * Get a copy of the current {@link ObjectMapper}. + * + * @return A copy of the current object mapper. + */ + public ObjectMapper getObjectMapper() { + return mapper.copy(); + } + + /** + * Set a custom host name for the target service. + * + * @param host The host name of the target service. + * @return This object. + */ + public ApiClient setHost(String host) { + this.host = host; + return this; + } + + /** + * Set a custom port number for the target service. + * + * @param port The port of the target service. Set this to -1 to reset the + * value to the default for the scheme. + * @return This object. + */ + public ApiClient setPort(int port) { + this.port = port; + return this; + } + + /** + * Set a custom base path for the target service, for example '/v2'. + * + * @param basePath The base path against which the rest of the path is + * resolved. + * @return This object. + */ + public ApiClient setBasePath(String basePath) { + this.basePath = basePath; + return this; + } + + /** + * Get the base URI to resolve the endpoint paths against. + * + * @return The complete base URI that the rest of the API parameters are + * resolved against. + */ + public String getBaseUri() { + return scheme + "://" + host + (port == -1 ? "" : ":" + port) + basePath; + } + + /** + * Set a custom scheme for the target service, for example 'https'. + * + * @param scheme The scheme of the target service + * @return This object. + */ + public ApiClient setScheme(String scheme){ + this.scheme = scheme; + return this; + } + + /** + * Set a custom request interceptor. + * + *

A request interceptor is a mechanism for altering each request before it + * is sent. After the request has been fully configured but not yet built, the + * request builder is passed into this function for further modification, + * after which it is sent out.

+ * + *

This is useful for altering the requests in a custom manner, such as + * adding headers. It could also be used for logging and monitoring.

+ * + * @param interceptor A function invoked before creating each request. A value + * of null resets the interceptor to a no-op. + * @return This object. + */ + public ApiClient setRequestInterceptor(Consumer interceptor) { + this.interceptor = interceptor; + return this; + } + + /** + * Get the custom interceptor. + * + * @return The custom interceptor that was set, or null if there isn't any. + */ + public Consumer getRequestInterceptor() { + return interceptor; + } + + /** + * Set a custom response interceptor. + * + *

This is useful for logging, monitoring or extraction of header variables

+ * + * @param interceptor A function invoked before creating each request. A value + * of null resets the interceptor to a no-op. + * @return This object. + */ + public ApiClient setResponseInterceptor(Consumer> interceptor) { + this.responseInterceptor = interceptor; + return this; + } + + /** + * Get the custom response interceptor. + * + * @return The custom interceptor that was set, or null if there isn't any. + */ + public Consumer> getResponseInterceptor() { + return responseInterceptor; + } + + /** + * Set a custom async response interceptor. Use this interceptor when asyncNative is set to 'true'. + * + *

This is useful for logging, monitoring or extraction of header variables

+ * + * @param interceptor A function invoked before creating each request. A value + * of null resets the interceptor to a no-op. + * @return This object. + */ + public ApiClient setAsyncResponseInterceptor(Consumer> interceptor) { + this.asyncResponseInterceptor = interceptor; + return this; + } + + /** + * Get the custom async response interceptor. Use this interceptor when asyncNative is set to 'true'. + * + * @return The custom interceptor that was set, or null if there isn't any. + */ + public Consumer> getAsyncResponseInterceptor() { + return asyncResponseInterceptor; + } + + /** + * Set the read timeout for the http client. + * + *

This is the value used by default for each request, though it can be + * overridden on a per-request basis with a request interceptor.

+ * + * @param readTimeout The read timeout used by default by the http client. + * Setting this value to null resets the timeout to an + * effectively infinite value. + * @return This object. + */ + public ApiClient setReadTimeout(Duration readTimeout) { + this.readTimeout = readTimeout; + return this; + } + + /** + * Get the read timeout that was set. + * + * @return The read timeout, or null if no timeout was set. Null represents + * an infinite wait time. + */ + public Duration getReadTimeout() { + return readTimeout; + } + /** + * Sets the connect timeout (in milliseconds) for the http client. + * + *

In the case where a new connection needs to be established, if + * the connection cannot be established within the given {@code + * duration}, then {@link HttpClient#send(HttpRequest,BodyHandler) + * HttpClient::send} throws an {@link HttpConnectTimeoutException}, or + * {@link HttpClient#sendAsync(HttpRequest,BodyHandler) + * HttpClient::sendAsync} completes exceptionally with an + * {@code HttpConnectTimeoutException}. If a new connection does not + * need to be established, for example if a connection can be reused + * from a previous request, then this timeout duration has no effect. + * + * @param connectTimeout connection timeout in milliseconds + * + * @return This object. + */ + public ApiClient setConnectTimeout(Duration connectTimeout) { + this.connectTimeout = connectTimeout; + this.builder.connectTimeout(connectTimeout); + return this; + } + + /** + * Get connection timeout (in milliseconds). + * + * @return Timeout in milliseconds + */ + public Duration getConnectTimeout() { + return connectTimeout; + } +} diff --git a/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/ApiException.java b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/ApiException.java new file mode 100644 index 0000000000..4aa7710088 --- /dev/null +++ b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/ApiException.java @@ -0,0 +1,90 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client; + +import java.net.http.HttpHeaders; + +@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ApiException extends Exception { + private int code = 0; + private HttpHeaders responseHeaders = null; + private String responseBody = null; + + public ApiException() {} + + public ApiException(Throwable throwable) { + super(throwable); + } + + public ApiException(String message) { + super(message); + } + + public ApiException(String message, Throwable throwable, int code, HttpHeaders responseHeaders, String responseBody) { + super(message, throwable); + this.code = code; + this.responseHeaders = responseHeaders; + this.responseBody = responseBody; + } + + public ApiException(String message, int code, HttpHeaders responseHeaders, String responseBody) { + this(message, (Throwable) null, code, responseHeaders, responseBody); + } + + public ApiException(String message, Throwable throwable, int code, HttpHeaders responseHeaders) { + this(message, throwable, code, responseHeaders, null); + } + + public ApiException(int code, HttpHeaders responseHeaders, String responseBody) { + this((String) null, (Throwable) null, code, responseHeaders, responseBody); + } + + public ApiException(int code, String message) { + super(message); + this.code = code; + } + + public ApiException(int code, String message, HttpHeaders responseHeaders, String responseBody) { + this(code, message); + this.responseHeaders = responseHeaders; + this.responseBody = responseBody; + } + + /** + * Get the HTTP status code. + * + * @return HTTP status code + */ + public int getCode() { + return code; + } + + /** + * Get the HTTP response headers. + * + * @return Headers as an HttpHeaders object + */ + public HttpHeaders getResponseHeaders() { + return responseHeaders; + } + + /** + * Get the HTTP response body. + * + * @return Response body in the form of string + */ + public String getResponseBody() { + return responseBody; + } +} diff --git a/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/ApiResponse.java b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/ApiResponse.java new file mode 100644 index 0000000000..e4cf1344b6 --- /dev/null +++ b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/ApiResponse.java @@ -0,0 +1,59 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client; + +import java.util.List; +import java.util.Map; + +/** + * API response returned by API call. + * + * @param The type of data that is deserialized from response body + */ +public class ApiResponse { + final private int statusCode; + final private Map> headers; + final private T data; + + /** + * @param statusCode The status code of HTTP response + * @param headers The headers of HTTP response + */ + public ApiResponse(int statusCode, Map> headers) { + this(statusCode, headers, null); + } + + /** + * @param statusCode The status code of HTTP response + * @param headers The headers of HTTP response + * @param data The object deserialized from response bod + */ + public ApiResponse(int statusCode, Map> headers, T data) { + this.statusCode = statusCode; + this.headers = headers; + this.data = data; + } + + public int getStatusCode() { + return statusCode; + } + + public Map> getHeaders() { + return headers; + } + + public T getData() { + return data; + } +} diff --git a/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/Configuration.java b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/Configuration.java new file mode 100644 index 0000000000..6fb589cf0c --- /dev/null +++ b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/Configuration.java @@ -0,0 +1,39 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * 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; + +@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Configuration { + private static ApiClient defaultApiClient = new ApiClient(); + + /** + * Get the default API client, which would be used when creating API + * instances without providing an API client. + * + * @return Default API client + */ + public static ApiClient getDefaultApiClient() { + return defaultApiClient; + } + + /** + * Set the default API client, which would be used when creating API + * instances without providing an API client. + * + * @param apiClient API client + */ + public static void setDefaultApiClient(ApiClient apiClient) { + defaultApiClient = apiClient; + } +} diff --git a/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/JSON.java b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/JSON.java new file mode 100644 index 0000000000..7a69ba9d61 --- /dev/null +++ b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/JSON.java @@ -0,0 +1,248 @@ +package org.openapitools.client; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.*; +import org.openapitools.jackson.nullable.JsonNullableModule; +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +import org.openapitools.client.model.*; + +import java.text.DateFormat; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; + +@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class JSON { + private ObjectMapper mapper; + + public JSON() { + mapper = new ObjectMapper(); + mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); + mapper.configure(MapperFeature.ALLOW_COERCION_OF_SCALARS, false); + mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, true); + mapper.configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, true); + mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); + mapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); + mapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING); + mapper.setDateFormat(new RFC3339DateFormat()); + mapper.registerModule(new JavaTimeModule()); + JsonNullableModule jnm = new JsonNullableModule(); + mapper.registerModule(jnm); + } + + /** + * Set the date format for JSON (de)serialization with Date properties. + * + * @param dateFormat Date format + */ + public void setDateFormat(DateFormat dateFormat) { + mapper.setDateFormat(dateFormat); + } + + /** + * Get the object mapper + * + * @return object mapper + */ + public ObjectMapper getMapper() { return mapper; } + + /** + * Returns the target model class that should be used to deserialize the input data. + * The discriminator mappings are used to determine the target model class. + * + * @param node The input data. + * @param modelClass The class that contains the discriminator mappings. + * + * @return the target model class. + */ + public static Class getClassForElement(JsonNode node, Class modelClass) { + ClassDiscriminatorMapping cdm = modelDiscriminators.get(modelClass); + if (cdm != null) { + return cdm.getClassForElement(node, new HashSet>()); + } + return null; + } + + /** + * Helper class to register the discriminator mappings. + */ + private static class ClassDiscriminatorMapping { + // The model class name. + Class modelClass; + // The name of the discriminator property. + String discriminatorName; + // The discriminator mappings for a model class. + Map> discriminatorMappings; + + // Constructs a new class discriminator. + ClassDiscriminatorMapping(Class cls, String propertyName, Map> mappings) { + modelClass = cls; + discriminatorName = propertyName; + discriminatorMappings = new HashMap>(); + if (mappings != null) { + discriminatorMappings.putAll(mappings); + } + } + + // Return the name of the discriminator property for this model class. + String getDiscriminatorPropertyName() { + return discriminatorName; + } + + // Return the discriminator value or null if the discriminator is not + // present in the payload. + String getDiscriminatorValue(JsonNode node) { + // Determine the value of the discriminator property in the input data. + if (discriminatorName != null) { + // Get the value of the discriminator property, if present in the input payload. + node = node.get(discriminatorName); + if (node != null && node.isValueNode()) { + String discrValue = node.asText(); + if (discrValue != null) { + return discrValue; + } + } + } + return null; + } + + /** + * Returns the target model class that should be used to deserialize the input data. + * This function can be invoked for anyOf/oneOf composed models with discriminator mappings. + * The discriminator mappings are used to determine the target model class. + * + * @param node The input data. + * @param visitedClasses The set of classes that have already been visited. + * + * @return the target model class. + */ + Class getClassForElement(JsonNode node, Set> visitedClasses) { + if (visitedClasses.contains(modelClass)) { + // Class has already been visited. + return null; + } + // Determine the value of the discriminator property in the input data. + String discrValue = getDiscriminatorValue(node); + if (discrValue == null) { + return null; + } + Class cls = discriminatorMappings.get(discrValue); + // It may not be sufficient to return this cls directly because that target class + // may itself be a composed schema, possibly with its own discriminator. + visitedClasses.add(modelClass); + for (Class childClass : discriminatorMappings.values()) { + ClassDiscriminatorMapping childCdm = modelDiscriminators.get(childClass); + if (childCdm == null) { + continue; + } + if (!discriminatorName.equals(childCdm.discriminatorName)) { + discrValue = getDiscriminatorValue(node); + if (discrValue == null) { + continue; + } + } + if (childCdm != null) { + // Recursively traverse the discriminator mappings. + Class childDiscr = childCdm.getClassForElement(node, visitedClasses); + if (childDiscr != null) { + return childDiscr; + } + } + } + return cls; + } + } + + /** + * Returns true if inst is an instance of modelClass in the OpenAPI model hierarchy. + * + * The Java class hierarchy is not implemented the same way as the OpenAPI model hierarchy, + * so it's not possible to use the instanceof keyword. + * + * @param modelClass A OpenAPI model class. + * @param inst The instance object. + * @param visitedClasses The set of classes that have already been visited. + * + * @return true if inst is an instance of modelClass in the OpenAPI model hierarchy. + */ + public static boolean isInstanceOf(Class modelClass, Object inst, Set> visitedClasses) { + if (modelClass.isInstance(inst)) { + // This handles the 'allOf' use case with single parent inheritance. + return true; + } + if (visitedClasses.contains(modelClass)) { + // This is to prevent infinite recursion when the composed schemas have + // a circular dependency. + return false; + } + visitedClasses.add(modelClass); + + // Traverse the oneOf/anyOf composed schemas. + Map> descendants = modelDescendants.get(modelClass); + if (descendants != null) { + for (Class childType : descendants.values()) { + if (isInstanceOf(childType, inst, visitedClasses)) { + return true; + } + } + } + return false; + } + + /** + * A map of discriminators for all model classes. + */ + private static Map, ClassDiscriminatorMapping> modelDiscriminators = new HashMap<>(); + + /** + * A map of oneOf/anyOf descendants for each model class. + */ + private static Map, Map>> modelDescendants = new HashMap<>(); + + /** + * Register a model class discriminator. + * + * @param modelClass the model class + * @param discriminatorPropertyName the name of the discriminator property + * @param mappings a map with the discriminator mappings. + */ + public static void registerDiscriminator(Class modelClass, String discriminatorPropertyName, Map> mappings) { + ClassDiscriminatorMapping m = new ClassDiscriminatorMapping(modelClass, discriminatorPropertyName, mappings); + modelDiscriminators.put(modelClass, m); + } + + /** + * Register the oneOf/anyOf descendants of the modelClass. + * + * @param modelClass the model class + * @param descendants a map of oneOf/anyOf descendants. + */ + public static void registerDescendants(Class modelClass, Map> descendants) { + modelDescendants.put(modelClass, descendants); + } + + private static JSON json; + + static { + json = new JSON(); + } + + /** + * Get the default JSON instance. + * + * @return the default JSON instance + */ + public static JSON getDefault() { + return json; + } + + /** + * Set the default JSON instance. + * + * @param json JSON instance to be used + */ + public static void setDefault(JSON json) { + JSON.json = json; + } +} diff --git a/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/Pair.java b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/Pair.java new file mode 100644 index 0000000000..337f82b46e --- /dev/null +++ b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/Pair.java @@ -0,0 +1,57 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * 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; + +@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Pair { + private String name = ""; + private String value = ""; + + public Pair (String name, String value) { + setName(name); + setValue(value); + } + + private void setName(String name) { + if (!isValidString(name)) { + return; + } + + this.name = name; + } + + private void setValue(String value) { + if (!isValidString(value)) { + return; + } + + this.value = value; + } + + public String getName() { + return this.name; + } + + public String getValue() { + return this.value; + } + + private boolean isValidString(String arg) { + if (arg == null) { + return false; + } + + return true; + } +} diff --git a/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/RFC3339DateFormat.java b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/RFC3339DateFormat.java new file mode 100644 index 0000000000..22bbe68c49 --- /dev/null +++ b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/RFC3339DateFormat.java @@ -0,0 +1,57 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package org.openapitools.client; + +import com.fasterxml.jackson.databind.util.StdDateFormat; + +import java.text.DateFormat; +import java.text.FieldPosition; +import java.text.ParsePosition; +import java.util.Date; +import java.text.DecimalFormat; +import java.util.GregorianCalendar; +import java.util.TimeZone; + +public class RFC3339DateFormat extends DateFormat { + private static final long serialVersionUID = 1L; + private static final TimeZone TIMEZONE_Z = TimeZone.getTimeZone("UTC"); + + private final StdDateFormat fmt = new StdDateFormat() + .withTimeZone(TIMEZONE_Z) + .withColonInTimeZone(true); + + public RFC3339DateFormat() { + this.calendar = new GregorianCalendar(); + this.numberFormat = new DecimalFormat(); + } + + @Override + public Date parse(String source) { + return parse(source, new ParsePosition(0)); + } + + @Override + public Date parse(String source, ParsePosition pos) { + return fmt.parse(source, pos); + } + + @Override + public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) { + return fmt.format(date, toAppendTo, fieldPosition); + } + + @Override + public Object clone() { + return super.clone(); + } +} \ No newline at end of file diff --git a/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/ServerConfiguration.java b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/ServerConfiguration.java new file mode 100644 index 0000000000..59edc528a4 --- /dev/null +++ b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/ServerConfiguration.java @@ -0,0 +1,58 @@ +package org.openapitools.client; + +import java.util.Map; + +/** + * Representing a Server configuration. + */ +public class ServerConfiguration { + public String URL; + public String description; + public Map variables; + + /** + * @param URL A URL to the target host. + * @param description A description of the host designated by the URL. + * @param variables A map between a variable name and its value. The value is used for substitution in the server's URL template. + */ + public ServerConfiguration(String URL, String description, Map variables) { + this.URL = URL; + this.description = description; + this.variables = variables; + } + + /** + * Format URL template using given variables. + * + * @param variables A map between a variable name and its value. + * @return Formatted URL. + */ + public String URL(Map variables) { + String url = this.URL; + + // go through variables and replace placeholders + for (Map.Entry variable: this.variables.entrySet()) { + String name = variable.getKey(); + ServerVariable serverVariable = variable.getValue(); + String value = serverVariable.defaultValue; + + if (variables != null && variables.containsKey(name)) { + value = variables.get(name); + if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { + throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + "."); + } + } + url = url.replace("{" + name + "}", value); + } + return url; + } + + /** + * Format URL template using default server variables. + * + * @return Formatted URL. + */ + public String URL() { + return URL(null); + } +} diff --git a/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/ServerVariable.java b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/ServerVariable.java new file mode 100644 index 0000000000..c2f13e2166 --- /dev/null +++ b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/ServerVariable.java @@ -0,0 +1,23 @@ +package org.openapitools.client; + +import java.util.HashSet; + +/** + * Representing a Server Variable for server URL template substitution. + */ +public class ServerVariable { + public String description; + public String defaultValue; + public HashSet enumValues = null; + + /** + * @param description A description for the server variable. + * @param defaultValue The default value to use for substitution. + * @param enumValues An enumeration of string values to be used if the substitution options are from a limited set. + */ + public ServerVariable(String description, String defaultValue, HashSet enumValues) { + this.description = description; + this.defaultValue = defaultValue; + this.enumValues = enumValues; + } +} diff --git a/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/QueryApi.java b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/QueryApi.java new file mode 100644 index 0000000000..8be80e81d2 --- /dev/null +++ b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/QueryApi.java @@ -0,0 +1,253 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * 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.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.ApiResponse; +import org.openapitools.client.Pair; + +import org.openapitools.client.model.Pet; +import org.openapitools.client.model.TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.IOException; +import java.io.InputStream; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class QueryApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public QueryApi() { + this(new ApiClient()); + } + + public QueryApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Test query parameter(s) + * Test query parameter(s) + * @param queryObject (optional) + * @return String + * @throws ApiException if fails to make API call + */ + public String testQueryStyleFormExplodeTrueArrayString(TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter queryObject) throws ApiException { + ApiResponse localVarResponse = testQueryStyleFormExplodeTrueArrayStringWithHttpInfo(queryObject); + return localVarResponse.getData(); + } + + /** + * Test query parameter(s) + * Test query parameter(s) + * @param queryObject (optional) + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse testQueryStyleFormExplodeTrueArrayStringWithHttpInfo(TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter queryObject) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = testQueryStyleFormExplodeTrueArrayStringRequestBuilder(queryObject); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("testQueryStyleFormExplodeTrueArrayString", localVarResponse); + } + // for plain text response + InputStream responseBody = localVarResponse.body(); + if (localVarResponse.headers().map().containsKey("Content-Type") && + "text/plain".equalsIgnoreCase(localVarResponse.headers().map().get("Content-Type").get(0))) { + java.util.Scanner s = new java.util.Scanner(responseBody).useDelimiter("\\A"); + String responseBodyText = s.hasNext() ? s.next() : ""; + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBodyText + ); + } else { + throw new RuntimeException("Error! The response Content-Type is supposed to be `text/plain` but it's not: " + localVarResponse); + } + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder testQueryStyleFormExplodeTrueArrayStringRequestBuilder(TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter queryObject) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/query/style_form/explode_true/array_string"; + + List localVarQueryParams = new ArrayList<>(); + localVarQueryParams.addAll(ApiClient.parameterToPairs("multi", "values", queryObject.getValues())); + + if (!localVarQueryParams.isEmpty()) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "text/plain"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } + /** + * Test query parameter(s) + * Test query parameter(s) + * @param queryObject (optional) + * @return String + * @throws ApiException if fails to make API call + */ + public String testQueryStyleFormExplodeTrueObject(Pet queryObject) throws ApiException { + ApiResponse localVarResponse = testQueryStyleFormExplodeTrueObjectWithHttpInfo(queryObject); + return localVarResponse.getData(); + } + + /** + * Test query parameter(s) + * Test query parameter(s) + * @param queryObject (optional) + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse testQueryStyleFormExplodeTrueObjectWithHttpInfo(Pet queryObject) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = testQueryStyleFormExplodeTrueObjectRequestBuilder(queryObject); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("testQueryStyleFormExplodeTrueObject", localVarResponse); + } + // for plain text response + InputStream responseBody = localVarResponse.body(); + if (localVarResponse.headers().map().containsKey("Content-Type") && + "text/plain".equalsIgnoreCase(localVarResponse.headers().map().get("Content-Type").get(0))) { + java.util.Scanner s = new java.util.Scanner(responseBody).useDelimiter("\\A"); + String responseBodyText = s.hasNext() ? s.next() : ""; + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBodyText + ); + } else { + throw new RuntimeException("Error! The response Content-Type is supposed to be `text/plain` but it's not: " + localVarResponse); + } + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder testQueryStyleFormExplodeTrueObjectRequestBuilder(Pet queryObject) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/query/style_form/explode_true/object"; + + List localVarQueryParams = new ArrayList<>(); + localVarQueryParams.addAll(ApiClient.parameterToPairs("id", queryObject.getId())); + localVarQueryParams.addAll(ApiClient.parameterToPairs("name", queryObject.getName())); + localVarQueryParams.addAll(ApiClient.parameterToPairs("category", queryObject.getCategory())); + localVarQueryParams.addAll(ApiClient.parameterToPairs("multi", "photoUrls", queryObject.getPhotoUrls())); + localVarQueryParams.addAll(ApiClient.parameterToPairs("multi", "tags", queryObject.getTags())); + localVarQueryParams.addAll(ApiClient.parameterToPairs("status", queryObject.getStatus())); + + if (!localVarQueryParams.isEmpty()) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "text/plain"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java new file mode 100644 index 0000000000..971a00090e --- /dev/null +++ b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java @@ -0,0 +1,147 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.lang.reflect.Type; +import java.util.Map; + +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec + */ +@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public abstract class AbstractOpenApiSchema { + + // store the actual instance of the schema/object + private Object instance; + + // is nullable + private Boolean isNullable; + + // schema type (e.g. oneOf, anyOf) + private final String schemaType; + + public AbstractOpenApiSchema(String schemaType, Boolean isNullable) { + this.schemaType = schemaType; + this.isNullable = isNullable; + } + + /** + * Get the list of oneOf/anyOf composed schemas allowed to be stored in this object + * + * @return an instance of the actual schema/object + */ + public abstract Map> getSchemas(); + + /** + * Get the actual instance + * + * @return an instance of the actual schema/object + */ + @JsonValue + public Object getActualInstance() {return instance;} + + /** + * Set the actual instance + * + * @param instance the actual instance of the schema/object + */ + public void setActualInstance(Object instance) {this.instance = instance;} + + /** + * Get the instant recursively when the schemas defined in oneOf/anyof happen to be oneOf/anyOf schema as well + * + * @return an instance of the actual schema/object + */ + public Object getActualInstanceRecursively() { + return getActualInstanceRecursively(this); + } + + private Object getActualInstanceRecursively(AbstractOpenApiSchema object) { + if (object.getActualInstance() == null) { + return null; + } else if (object.getActualInstance() instanceof AbstractOpenApiSchema) { + return getActualInstanceRecursively((AbstractOpenApiSchema)object.getActualInstance()); + } else { + return object.getActualInstance(); + } + } + + /** + * Get the schema type (e.g. anyOf, oneOf) + * + * @return the schema type + */ + public String getSchemaType() { + return schemaType; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ").append(getClass()).append(" {\n"); + sb.append(" instance: ").append(toIndentedString(instance)).append("\n"); + sb.append(" isNullable: ").append(toIndentedString(isNullable)).append("\n"); + sb.append(" schemaType: ").append(toIndentedString(schemaType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AbstractOpenApiSchema a = (AbstractOpenApiSchema) o; + return Objects.equals(this.instance, a.instance) && + Objects.equals(this.isNullable, a.isNullable) && + Objects.equals(this.schemaType, a.schemaType); + } + + @Override + public int hashCode() { + return Objects.hash(instance, isNullable, schemaType); + } + + /** + * Is nullable + * + * @return true if it's nullable + */ + public Boolean isNullable() { + if (Boolean.TRUE.equals(isNullable)) { + return Boolean.TRUE; + } else { + return Boolean.FALSE; + } + } + + + +} diff --git a/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/model/Category.java b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/model/Category.java new file mode 100644 index 0000000000..947387259b --- /dev/null +++ b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/model/Category.java @@ -0,0 +1,139 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Category + */ +@JsonPropertyOrder({ + Category.JSON_PROPERTY_ID, + Category.JSON_PROPERTY_NAME +}) +@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Category { + public static final String JSON_PROPERTY_ID = "id"; + private Long id; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public Category() { + } + + public Category id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(Long id) { + this.id = id; + } + + + public Category name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(String name) { + this.name = name; + } + + + /** + * Return true if this Category object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Category category = (Category) o; + return Objects.equals(this.id, category.id) && + Objects.equals(this.name, category.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Category {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/model/Pet.java new file mode 100644 index 0000000000..b7ad37bd30 --- /dev/null +++ b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/model/Pet.java @@ -0,0 +1,317 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.client.model.Category; +import org.openapitools.client.model.Tag; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Pet + */ +@JsonPropertyOrder({ + Pet.JSON_PROPERTY_ID, + Pet.JSON_PROPERTY_NAME, + Pet.JSON_PROPERTY_CATEGORY, + Pet.JSON_PROPERTY_PHOTO_URLS, + Pet.JSON_PROPERTY_TAGS, + Pet.JSON_PROPERTY_STATUS +}) +@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Pet { + public static final String JSON_PROPERTY_ID = "id"; + private Long id; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_CATEGORY = "category"; + private Category category; + + public static final String JSON_PROPERTY_PHOTO_URLS = "photoUrls"; + private List photoUrls = new ArrayList<>(); + + public static final String JSON_PROPERTY_TAGS = "tags"; + private List tags = null; + + /** + * pet status in the store + */ + public enum StatusEnum { + AVAILABLE("available"), + + PENDING("pending"), + + SOLD("sold"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + private StatusEnum status; + + public Pet() { + } + + public Pet id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(Long id) { + this.id = id; + } + + + public Pet name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(String name) { + this.name = name; + } + + + public Pet category(Category category) { + this.category = category; + return this; + } + + /** + * Get category + * @return category + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CATEGORY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Category getCategory() { + return category; + } + + + @JsonProperty(JSON_PROPERTY_CATEGORY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCategory(Category category) { + this.category = category; + } + + + public Pet photoUrls(List photoUrls) { + this.photoUrls = photoUrls; + return this; + } + + public Pet addPhotoUrlsItem(String photoUrlsItem) { + this.photoUrls.add(photoUrlsItem); + return this; + } + + /** + * Get photoUrls + * @return photoUrls + **/ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PHOTO_URLS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public List getPhotoUrls() { + return photoUrls; + } + + + @JsonProperty(JSON_PROPERTY_PHOTO_URLS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPhotoUrls(List photoUrls) { + this.photoUrls = photoUrls; + } + + + public Pet tags(List tags) { + this.tags = tags; + return this; + } + + public Pet addTagsItem(Tag tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Get tags + * @return tags + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(List tags) { + this.tags = tags; + } + + + public Pet status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * pet status in the store + * @return status + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public StatusEnum getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(StatusEnum status) { + this.status = status; + } + + + /** + * Return true if this Pet object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Pet pet = (Pet) o; + return Objects.equals(this.id, pet.id) && + Objects.equals(this.name, pet.name) && + Objects.equals(this.category, pet.category) && + Objects.equals(this.photoUrls, pet.photoUrls) && + Objects.equals(this.tags, pet.tags) && + Objects.equals(this.status, pet.status); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, category, photoUrls, tags, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Pet {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/model/Tag.java new file mode 100644 index 0000000000..7379d85cc8 --- /dev/null +++ b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/model/Tag.java @@ -0,0 +1,139 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * Tag + */ +@JsonPropertyOrder({ + Tag.JSON_PROPERTY_ID, + Tag.JSON_PROPERTY_NAME +}) +@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Tag { + public static final String JSON_PROPERTY_ID = "id"; + private Long id; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public Tag() { + } + + public Tag id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(Long id) { + this.id = id; + } + + + public Tag name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(String name) { + this.name = name; + } + + + /** + * Return true if this Tag object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Tag tag = (Tag) o; + return Objects.equals(this.id, tag.id) && + Objects.equals(this.name, tag.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Tag {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.java b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.java new file mode 100644 index 0000000000..7309c17b5e --- /dev/null +++ b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.java @@ -0,0 +1,118 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +/** + * TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter + */ +@JsonPropertyOrder({ + TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.JSON_PROPERTY_VALUES +}) +@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter { + public static final String JSON_PROPERTY_VALUES = "values"; + private List values = null; + + public TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter() { + } + + public TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter values(List values) { + this.values = values; + return this; + } + + public TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter addValuesItem(String valuesItem) { + if (this.values == null) { + this.values = new ArrayList<>(); + } + this.values.add(valuesItem); + return this; + } + + /** + * Get values + * @return values + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALUES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getValues() { + return values; + } + + + @JsonProperty(JSON_PROPERTY_VALUES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setValues(List values) { + this.values = values; + } + + + /** + * Return true if this test_query_style_form_explode_true_array_string_query_object_parameter object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter testQueryStyleFormExplodeTrueArrayStringQueryObjectParameter = (TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter) o; + return Objects.equals(this.values, testQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.values); + } + + @Override + public int hashCode() { + return Objects.hash(values); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter {\n"); + sb.append(" values: ").append(toIndentedString(values)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/echo_api/java/native/src/test/java/org/openapitools/client/CustomTest.java b/samples/client/echo_api/java/native/src/test/java/org/openapitools/client/CustomTest.java new file mode 100644 index 0000000000..affbfae04a --- /dev/null +++ b/samples/client/echo_api/java/native/src/test/java/org/openapitools/client/CustomTest.java @@ -0,0 +1,70 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.oprg + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client; + +import org.junit.Assert; +import org.openapitools.client.ApiException; +import org.openapitools.client.api.QueryApi; +import org.openapitools.client.model.Category; +import org.openapitools.client.model.Pet; +import org.openapitools.client.model.TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.*; + + +/** + * API tests for QueryApi + */ +public class CustomTest { + + private final QueryApi api = new QueryApi(); + + + /** + * Test query parameter(s) + *

+ * Test query parameter(s) + * + * @throws ApiException if the Api call fails + */ + @Test + public void testQueryStyleFormExplodeTrueObjectTest() throws ApiException { + Pet queryObject = new Pet().id(12345L).name("Hello World"). + photoUrls(Arrays.asList(new String[]{"http://a.com", "http://b.com"})).category(new Category().id(987L).name("new category")); + + String response = api.testQueryStyleFormExplodeTrueObject(queryObject); + org.openapitools.client.EchoServerResponseParser p = new org.openapitools.client.EchoServerResponseParser(response); + Assert.assertEquals("/query/style_form/explode_true/object?id=12345&name=Hello%20World&category=class%20Category%20%7B%0A%20%20%20%20id%3A%20987%0A%20%20%20%20name%3A%20new%20category%0A%7D&photoUrls=http%3A%2F%2Fa.com&photoUrls=http%3A%2F%2Fb.com", p.path); + } + + /** + * Test query parameter(s) + *

+ * Test query parameter(s) + * + * @throws ApiException if the Api call fails + */ + @Test + public void testQueryStyleFormExplodeTrueArrayString() throws ApiException { + TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter q = new TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter() + .values(Arrays.asList(new String[]{"hello world 1", "hello world 2"})); + + String response = api.testQueryStyleFormExplodeTrueArrayString(q); + org.openapitools.client.EchoServerResponseParser p = new org.openapitools.client.EchoServerResponseParser(response); + Assert.assertEquals("/query/style_form/explode_true/array_string?values=hello%20world%201&values=hello%20world%202", p.path); + } + +} diff --git a/samples/client/echo_api/java/native/src/test/java/org/openapitools/client/EchoServerResponseParser.java b/samples/client/echo_api/java/native/src/test/java/org/openapitools/client/EchoServerResponseParser.java new file mode 100644 index 0000000000..b68af6d4a7 --- /dev/null +++ b/samples/client/echo_api/java/native/src/test/java/org/openapitools/client/EchoServerResponseParser.java @@ -0,0 +1,51 @@ +/* + * Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.client; + +public class EchoServerResponseParser { + public String method; // e.g. GET + public String path; // e.g. /query/style_form/explode_true/object?id=12345 + public String protocol; // e.g. HTTP/1.1 + public java.util.HashMap headers = new java.util.HashMap<>(); + + public EchoServerResponseParser(String response) { + if (response == null) { + throw new RuntimeException("Echo server response cannot be null"); + } + + String[] lines = response.split("\n"); + boolean firstLine = true; + + for (String line : lines) { + if (firstLine) { + String[] items = line.split(" "); + this.method = items[0]; + this.path = items[1]; + this.protocol = items[2]; + firstLine = false; + continue; + } + + // store the header key-value pair in headers + String[] keyValue = line.split(": "); + if (keyValue.length == 2) { // skip blank line, non key-value pair + this.headers.put(keyValue[0], keyValue[1]); + } + } + + } +} diff --git a/samples/client/echo_api/java/native/src/test/java/org/openapitools/client/api/QueryApiTest.java b/samples/client/echo_api/java/native/src/test/java/org/openapitools/client/api/QueryApiTest.java new file mode 100644 index 0000000000..5ee9ec290b --- /dev/null +++ b/samples/client/echo_api/java/native/src/test/java/org/openapitools/client/api/QueryApiTest.java @@ -0,0 +1,54 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.oprg + * + * 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.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for QueryApi + */ +@Ignore +public class QueryApiTest { + + private final QueryApi api = new QueryApi(); + + + /** + * Test query parameter(s) + * + * Test query parameter(s) + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testQueryStyleFormExplodeTrueObjectTest() throws ApiException { + Pet queryObject = null; + String response = + api.testQueryStyleFormExplodeTrueObject(queryObject); + + // TODO: test validations + } + +} diff --git a/samples/client/echo_api/java/native/src/test/java/org/openapitools/client/model/CategoryTest.java b/samples/client/echo_api/java/native/src/test/java/org/openapitools/client/model/CategoryTest.java new file mode 100644 index 0000000000..34ead48f65 --- /dev/null +++ b/samples/client/echo_api/java/native/src/test/java/org/openapitools/client/model/CategoryTest.java @@ -0,0 +1,56 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.oprg + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for Category + */ +public class CategoryTest { + private final Category model = new Category(); + + /** + * Model tests for Category + */ + @Test + public void testCategory() { + // TODO: test Category + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + +} diff --git a/samples/client/echo_api/java/native/src/test/java/org/openapitools/client/model/PetTest.java b/samples/client/echo_api/java/native/src/test/java/org/openapitools/client/model/PetTest.java new file mode 100644 index 0000000000..918a3b1692 --- /dev/null +++ b/samples/client/echo_api/java/native/src/test/java/org/openapitools/client/model/PetTest.java @@ -0,0 +1,92 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.oprg + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.client.model.Category; +import org.openapitools.client.model.Tag; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for Pet + */ +public class PetTest { + private final Pet model = new Pet(); + + /** + * Model tests for Pet + */ + @Test + public void testPet() { + // TODO: test Pet + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'category' + */ + @Test + public void categoryTest() { + // TODO: test category + } + + /** + * Test the property 'photoUrls' + */ + @Test + public void photoUrlsTest() { + // TODO: test photoUrls + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + +} diff --git a/samples/client/echo_api/java/native/src/test/java/org/openapitools/client/model/TagTest.java b/samples/client/echo_api/java/native/src/test/java/org/openapitools/client/model/TagTest.java new file mode 100644 index 0000000000..342e15ae49 --- /dev/null +++ b/samples/client/echo_api/java/native/src/test/java/org/openapitools/client/model/TagTest.java @@ -0,0 +1,56 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.oprg + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for Tag + */ +public class TagTest { + private final Tag model = new Tag(); + + /** + * Model tests for Tag + */ + @Test + public void testTag() { + // TODO: test Tag + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + +} diff --git a/samples/client/echo_api/java/native/src/test/java/org/openapitools/client/model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameterTest.java b/samples/client/echo_api/java/native/src/test/java/org/openapitools/client/model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameterTest.java new file mode 100644 index 0000000000..4d1e8e89d4 --- /dev/null +++ b/samples/client/echo_api/java/native/src/test/java/org/openapitools/client/model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameterTest.java @@ -0,0 +1,50 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.oprg + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.List; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter + */ +public class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameterTest { + private final TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter model = new TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter(); + + /** + * Model tests for TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter + */ + @Test + public void testTestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter() { + // TODO: test TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter + } + + /** + * Test the property 'values' + */ + @Test + public void valuesTest() { + // TODO: test values + } + +} diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index 61d8857b92..3bff17c92d 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -111,7 +111,6 @@ public class AnotherFakeApi { localVarResponse.statusCode(), localVarResponse.headers().map(), responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) // closes the InputStream - ); } finally { } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/DefaultApi.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/DefaultApi.java index f5e4029c68..8b164954bc 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/DefaultApi.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/DefaultApi.java @@ -109,7 +109,6 @@ public class DefaultApi { localVarResponse.statusCode(), localVarResponse.headers().map(), responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) // closes the InputStream - ); } finally { } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/FakeApi.java index 4ae660f5b8..384d478bb3 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/FakeApi.java @@ -120,7 +120,6 @@ public class FakeApi { localVarResponse.statusCode(), localVarResponse.headers().map(), responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) // closes the InputStream - ); } finally { } @@ -189,7 +188,6 @@ public class FakeApi { return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - null ); } finally { @@ -286,7 +284,6 @@ public class FakeApi { localVarResponse.statusCode(), localVarResponse.headers().map(), responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) // closes the InputStream - ); } finally { } @@ -361,7 +358,6 @@ public class FakeApi { localVarResponse.statusCode(), localVarResponse.headers().map(), responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) // closes the InputStream - ); } finally { } @@ -436,7 +432,6 @@ public class FakeApi { localVarResponse.statusCode(), localVarResponse.headers().map(), responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) // closes the InputStream - ); } finally { } @@ -511,7 +506,6 @@ public class FakeApi { localVarResponse.statusCode(), localVarResponse.headers().map(), responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) // closes the InputStream - ); } finally { } @@ -581,7 +575,6 @@ public class FakeApi { localVarResponse.statusCode(), localVarResponse.headers().map(), responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) // closes the InputStream - ); } finally { } @@ -656,7 +649,6 @@ public class FakeApi { return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - null ); } finally { @@ -737,7 +729,6 @@ public class FakeApi { return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - null ); } finally { @@ -820,7 +811,6 @@ public class FakeApi { return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - null ); } finally { @@ -918,7 +908,6 @@ public class FakeApi { localVarResponse.statusCode(), localVarResponse.headers().map(), responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) // closes the InputStream - ); } finally { } @@ -1019,7 +1008,6 @@ public class FakeApi { return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - null ); } finally { @@ -1122,7 +1110,6 @@ public class FakeApi { return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - null ); } finally { @@ -1255,7 +1242,6 @@ public class FakeApi { return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - null ); } finally { @@ -1433,7 +1419,6 @@ public class FakeApi { return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - null ); } finally { @@ -1516,7 +1501,6 @@ public class FakeApi { return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - null ); } finally { @@ -1607,7 +1591,6 @@ public class FakeApi { return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - null ); } finally { diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index 2e4e339669..e6c8eab533 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -111,7 +111,6 @@ public class FakeClassnameTags123Api { localVarResponse.statusCode(), localVarResponse.headers().map(), responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) // closes the InputStream - ); } finally { } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/PetApi.java index 0da1da313a..c31d9a1a2c 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/PetApi.java @@ -110,7 +110,6 @@ public class PetApi { return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - null ); } finally { @@ -193,7 +192,6 @@ public class PetApi { return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - null ); } finally { @@ -276,7 +274,6 @@ public class PetApi { localVarResponse.statusCode(), localVarResponse.headers().map(), responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}) // closes the InputStream - ); } finally { } @@ -362,7 +359,6 @@ public class PetApi { localVarResponse.statusCode(), localVarResponse.headers().map(), responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}) // closes the InputStream - ); } finally { } @@ -444,7 +440,6 @@ public class PetApi { localVarResponse.statusCode(), localVarResponse.headers().map(), responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) // closes the InputStream - ); } finally { } @@ -514,7 +509,6 @@ public class PetApi { return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - null ); } finally { @@ -599,7 +593,6 @@ public class PetApi { return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - null ); } finally { @@ -683,7 +676,6 @@ public class PetApi { localVarResponse.statusCode(), localVarResponse.headers().map(), responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) // closes the InputStream - ); } finally { } @@ -761,7 +753,6 @@ public class PetApi { localVarResponse.statusCode(), localVarResponse.headers().map(), responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) // closes the InputStream - ); } finally { } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/StoreApi.java index 6180d1ba62..c54ddcb284 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/StoreApi.java @@ -107,7 +107,6 @@ public class StoreApi { return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - null ); } finally { @@ -185,7 +184,6 @@ public class StoreApi { localVarResponse.statusCode(), localVarResponse.headers().map(), responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}) // closes the InputStream - ); } finally { } @@ -254,7 +252,6 @@ public class StoreApi { localVarResponse.statusCode(), localVarResponse.headers().map(), responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) // closes the InputStream - ); } finally { } @@ -328,7 +325,6 @@ public class StoreApi { localVarResponse.statusCode(), localVarResponse.headers().map(), responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) // closes the InputStream - ); } finally { } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/UserApi.java index 7451afc649..00e4663174 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/UserApi.java @@ -108,7 +108,6 @@ public class UserApi { return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - null ); } finally { @@ -189,7 +188,6 @@ public class UserApi { return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - null ); } finally { @@ -270,7 +268,6 @@ public class UserApi { return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - null ); } finally { @@ -351,7 +348,6 @@ public class UserApi { return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - null ); } finally { @@ -431,7 +427,6 @@ public class UserApi { localVarResponse.statusCode(), localVarResponse.headers().map(), responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) // closes the InputStream - ); } finally { } @@ -507,7 +502,6 @@ public class UserApi { localVarResponse.statusCode(), localVarResponse.headers().map(), responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) // closes the InputStream - ); } finally { } @@ -588,7 +582,6 @@ public class UserApi { return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - null ); } finally { @@ -661,7 +654,6 @@ public class UserApi { return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - null ); } finally { From 61700fd42c5532deadda7af33cd42de88a215d71 Mon Sep 17 00:00:00 2001 From: "Jendrik A. Potyka" Date: Tue, 29 Nov 2022 07:34:32 +0100 Subject: [PATCH 058/189] [Python] Fix client legacy generator asyncio README code example (#13336) * fix missing asyncio keywords * update asyncio sample petstore --- .../src/main/resources/python-legacy/common_README.mustache | 4 ++-- samples/client/petstore/python-asyncio/README.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/python-legacy/common_README.mustache b/modules/openapi-generator/src/main/resources/python-legacy/common_README.mustache index cc7e939194..6052fe3d20 100644 --- a/modules/openapi-generator/src/main/resources/python-legacy/common_README.mustache +++ b/modules/openapi-generator/src/main/resources/python-legacy/common_README.mustache @@ -9,7 +9,7 @@ from pprint import pprint {{> python_doc_auth_partial}} # Enter a context with an instance of the API client -with {{{packageName}}}.ApiClient(configuration) as api_client: +{{#asyncio}}async {{/asyncio}}with {{{packageName}}}.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = {{{packageName}}}.{{{classname}}}(api_client) {{#allParams}}{{paramName}} = {{{example}}} # {{{dataType}}} | {{{description}}}{{^required}} (optional){{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} @@ -17,7 +17,7 @@ with {{{packageName}}}.ApiClient(configuration) as api_client: try: {{#summary}} # {{{.}}} - {{/summary}} {{#returnType}}api_response = {{/returnType}}api_instance.{{{operationId}}}({{#allParams}}{{#required}}{{paramName}}{{/required}}{{^required}}{{paramName}}={{paramName}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}){{#returnType}} + {{/summary}} {{#returnType}}api_response = {{/returnType}}{{#asyncio}}await {{/asyncio}}api_instance.{{{operationId}}}({{#allParams}}{{#required}}{{paramName}}{{/required}}{{^required}}{{paramName}}={{paramName}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}){{#returnType}} pprint(api_response){{/returnType}} except ApiException as e: print("Exception when calling {{classname}}->{{operationId}}: %s\n" % e) diff --git a/samples/client/petstore/python-asyncio/README.md b/samples/client/petstore/python-asyncio/README.md index 18a172f82c..24c9052d3d 100644 --- a/samples/client/petstore/python-asyncio/README.md +++ b/samples/client/petstore/python-asyncio/README.md @@ -61,14 +61,14 @@ configuration = petstore_api.Configuration( # Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: +async with petstore_api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = petstore_api.AnotherFakeApi(api_client) body = petstore_api.Client() # Client | client model try: # To test special tags - api_response = api_instance.call_123_test_special_tags(body) + api_response = await api_instance.call_123_test_special_tags(body) pprint(api_response) except ApiException as e: print("Exception when calling AnotherFakeApi->call_123_test_special_tags: %s\n" % e) From 12a6ea7bebc0d4a392d485b3b977a2954a90e1a5 Mon Sep 17 00:00:00 2001 From: Hui Yu Date: Tue, 29 Nov 2022 14:39:18 +0800 Subject: [PATCH 059/189] [C][Client] Always send integer or boolean query parameters to the API server (#14019) * [C][Client] Always send integer or boolean parameters to the API server * Add fake endpoint with integer and boolean parameters --- bin/configs/c.yaml | 2 +- .../resources/C-libcurl/api-body.mustache | 10 + .../src/test/resources/2_0/c/petstore.yaml | 717 ++++++++++++++++++ samples/client/petstore/c/README.md | 1 + samples/client/petstore/c/api/UserAPI.c | 77 ++ samples/client/petstore/c/api/UserAPI.h | 8 + samples/client/petstore/c/docs/UserAPI.md | 32 + 7 files changed, 846 insertions(+), 1 deletion(-) create mode 100644 modules/openapi-generator/src/test/resources/2_0/c/petstore.yaml diff --git a/bin/configs/c.yaml b/bin/configs/c.yaml index f622e7919a..378b5d1f36 100644 --- a/bin/configs/c.yaml +++ b/bin/configs/c.yaml @@ -1,4 +1,4 @@ generatorName: c outputDir: samples/client/petstore/c -inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +inputSpec: modules/openapi-generator/src/test/resources/2_0/c/petstore.yaml templateDir: modules/openapi-generator/src/main/resources/C-libcurl diff --git a/modules/openapi-generator/src/main/resources/C-libcurl/api-body.mustache b/modules/openapi-generator/src/main/resources/C-libcurl/api-body.mustache index 4a0c6c116b..74b98f4c04 100644 --- a/modules/openapi-generator/src/main/resources/C-libcurl/api-body.mustache +++ b/modules/openapi-generator/src/main/resources/C-libcurl/api-body.mustache @@ -212,7 +212,17 @@ end: {{#isPrimitiveType}}{{#isNumber}}{{{dataType}}}{{/isNumber}}{{#isLong}}{{{dataType}}}{{/isLong}}{{#isInteger}}char *{{/isInteger}}{{#isDouble}}{{{dataType}}}{{/isDouble}}{{#isFloat}}{{{dataType}}}{{/isFloat}}{{#isBoolean}}char *{{/isBoolean}}{{#isEnum}}{{#isString}}{{projectName}}_{{operationId}}_{{baseName}}_e{{/isString}}{{/isEnum}}{{^isEnum}}{{#isString}}{{{dataType}}} *{{/isString}}{{/isEnum}}{{#isByteArray}}{{{dataType}}} *{{/isByteArray}}{{#isDate}}{{{dataType}}}{{/isDate}}{{#isDateTime}}{{{dataType}}}{{/isDateTime}}{{#isFile}}{{{dataType}}}{{/isFile}}{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isModel}}{{#isEnum}}{{datatypeWithEnum}}_e{{/isEnum}}{{^isEnum}}{{{dataType}}}_t *{{/isEnum}}{{/isModel}}{{^isModel}}{{#isEnum}}{{datatypeWithEnum}}_e{{/isEnum}}{{/isModel}}{{#isUuid}}{{dataType}} *{{/isUuid}}{{#isEmail}}{{dataType}}{{/isEmail}}{{/isPrimitiveType}} valueQuery_{{{paramName}}} {{#isString}}{{^isEnum}}= NULL{{/isEnum}}{{/isString}}{{#isInteger}}= NULL{{/isInteger}}{{#isBoolean}}= NULL{{/isBoolean}}; keyValuePair_t *keyPairQuery_{{paramName}} = 0; {{/isArray}} + {{#isInteger}} + if (1) // Always send integer parameters to the API server + {{/isInteger}} + {{#isBoolean}} + if (1) // Always send boolean parameters to the API server + {{/isBoolean}} + {{^isInteger}} + {{^isBoolean}} if ({{paramName}}) + {{/isBoolean}} + {{/isInteger}} { {{#isArray}} list_addElement(localVarQueryParameters,{{paramName}}); diff --git a/modules/openapi-generator/src/test/resources/2_0/c/petstore.yaml b/modules/openapi-generator/src/test/resources/2_0/c/petstore.yaml new file mode 100644 index 0000000000..475f6cb678 --- /dev/null +++ b/modules/openapi-generator/src/test/resources/2_0/c/petstore.yaml @@ -0,0 +1,717 @@ +swagger: '2.0' +info: + description: 'This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.' + version: 1.0.0 + title: OpenAPI Petstore + license: + name: Apache-2.0 + url: 'https://www.apache.org/licenses/LICENSE-2.0.html' +host: petstore.swagger.io +basePath: /v2 +tags: + - name: pet + description: Everything about your Pets + - name: store + description: Access to Petstore orders + - name: user + description: Operations about user +schemes: + - http +paths: + /pet: + post: + tags: + - pet + summary: Add a new pet to the store + description: '' + operationId: addPet + consumes: + - application/json + - application/xml + produces: + - application/xml + - application/json + parameters: + - in: body + name: body + description: Pet object that needs to be added to the store + required: true + schema: + $ref: '#/definitions/Pet' + responses: + '405': + description: Invalid input + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + put: + tags: + - pet + summary: Update an existing pet + description: '' + operationId: updatePet + consumes: + - application/json + - application/xml + produces: + - application/xml + - application/json + parameters: + - in: body + name: body + description: Pet object that needs to be added to the store + required: true + schema: + $ref: '#/definitions/Pet' + responses: + '400': + description: Invalid ID supplied + '404': + description: Pet not found + '405': + description: Validation exception + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + /pet/findByStatus: + get: + tags: + - pet + summary: Finds Pets by status + description: Multiple status values can be provided with comma separated strings + operationId: findPetsByStatus + produces: + - application/xml + - application/json + parameters: + - name: status + in: query + description: Status values that need to be considered for filter + required: true + type: array + items: + type: string + enum: + - available + - pending + - sold + default: available + collectionFormat: csv + responses: + '200': + description: successful operation + schema: + type: array + items: + $ref: '#/definitions/Pet' + '400': + description: Invalid status value + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + /pet/findByTags: + get: + tags: + - pet + summary: Finds Pets by tags + description: 'Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.' + operationId: findPetsByTags + produces: + - application/xml + - application/json + parameters: + - name: tags + in: query + description: Tags to filter by + required: true + type: array + items: + type: string + collectionFormat: csv + responses: + '200': + description: successful operation + schema: + type: array + items: + $ref: '#/definitions/Pet' + '400': + description: Invalid tag value + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + deprecated: true + '/pet/{petId}': + get: + tags: + - pet + summary: Find pet by ID + description: Returns a single pet + operationId: getPetById + produces: + - application/xml + - application/json + parameters: + - name: petId + in: path + description: ID of pet to return + required: true + type: integer + format: int64 + responses: + '200': + description: successful operation + schema: + $ref: '#/definitions/Pet' + '400': + description: Invalid ID supplied + '404': + description: Pet not found + security: + - api_key: [] + post: + tags: + - pet + summary: Updates a pet in the store with form data + description: '' + operationId: updatePetWithForm + consumes: + - application/x-www-form-urlencoded + produces: + - application/xml + - application/json + parameters: + - name: petId + in: path + description: ID of pet that needs to be updated + required: true + type: integer + format: int64 + - name: name + in: formData + description: Updated name of the pet + required: false + type: string + - name: status + in: formData + description: Updated status of the pet + required: false + type: string + responses: + '405': + description: Invalid input + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + delete: + tags: + - pet + summary: Deletes a pet + description: '' + operationId: deletePet + produces: + - application/xml + - application/json + parameters: + - name: api_key + in: header + required: false + type: string + - name: petId + in: path + description: Pet id to delete + required: true + type: integer + format: int64 + responses: + '400': + description: Invalid pet value + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + '/pet/{petId}/uploadImage': + post: + tags: + - pet + summary: uploads an image + description: '' + operationId: uploadFile + consumes: + - multipart/form-data + produces: + - application/json + parameters: + - name: petId + in: path + description: ID of pet to update + required: true + type: integer + format: int64 + - name: additionalMetadata + in: formData + description: Additional data to pass to server + required: false + type: string + - name: file + in: formData + description: file to upload + required: false + type: file + responses: + '200': + description: successful operation + schema: + $ref: '#/definitions/ApiResponse' + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + /store/inventory: + get: + tags: + - store + summary: Returns pet inventories by status + description: Returns a map of status codes to quantities + operationId: getInventory + produces: + - application/json + parameters: [] + responses: + '200': + description: successful operation + schema: + type: object + additionalProperties: + type: integer + format: int32 + security: + - api_key: [] + /store/order: + post: + tags: + - store + summary: Place an order for a pet + description: '' + operationId: placeOrder + produces: + - application/xml + - application/json + parameters: + - in: body + name: body + description: order placed for purchasing the pet + required: true + schema: + $ref: '#/definitions/Order' + responses: + '200': + description: successful operation + schema: + $ref: '#/definitions/Order' + '400': + description: Invalid Order + '/store/order/{orderId}': + get: + tags: + - store + summary: Find purchase order by ID + description: 'For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions' + operationId: getOrderById + produces: + - application/xml + - application/json + parameters: + - name: orderId + in: path + description: ID of pet that needs to be fetched + required: true + type: integer + maximum: 5 + minimum: 1 + format: int64 + responses: + '200': + description: successful operation + schema: + $ref: '#/definitions/Order' + '400': + description: Invalid ID supplied + '404': + description: Order not found + delete: + tags: + - store + summary: Delete purchase order by ID + description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + operationId: deleteOrder + produces: + - application/xml + - application/json + parameters: + - name: orderId + in: path + description: ID of the order that needs to be deleted + required: true + type: string + responses: + '400': + description: Invalid ID supplied + '404': + description: Order not found + /user: + post: + tags: + - user + summary: Create user + description: This can only be done by the logged in user. + operationId: createUser + produces: + - application/xml + - application/json + parameters: + - in: body + name: body + description: Created user object + required: true + schema: + $ref: '#/definitions/User' + responses: + default: + description: successful operation + /user/createWithArray: + post: + tags: + - user + summary: Creates list of users with given input array + description: '' + operationId: createUsersWithArrayInput + produces: + - application/xml + - application/json + parameters: + - in: body + name: body + description: List of user object + required: true + schema: + type: array + items: + $ref: '#/definitions/User' + responses: + default: + description: successful operation + /user/createWithList: + post: + tags: + - user + summary: Creates list of users with given input array + description: '' + operationId: createUsersWithListInput + produces: + - application/xml + - application/json + parameters: + - in: body + name: body + description: List of user object + required: true + schema: + type: array + items: + $ref: '#/definitions/User' + responses: + default: + description: successful operation + /user/login: + get: + tags: + - user + summary: Logs user into the system + description: '' + operationId: loginUser + produces: + - application/xml + - application/json + parameters: + - name: username + in: query + description: The user name for login + required: true + type: string + - name: password + in: query + description: The password for login in clear text + required: true + type: string + responses: + '200': + description: successful operation + schema: + type: string + headers: + X-Rate-Limit: + type: integer + format: int32 + description: calls per hour allowed by the user + X-Expires-After: + type: string + format: date-time + description: date in UTC when token expires + '400': + description: Invalid username/password supplied + /user/logout: + get: + tags: + - user + summary: Logs out current logged in user session + description: '' + operationId: logoutUser + produces: + - application/xml + - application/json + parameters: [] + responses: + default: + description: successful operation + '/user/{username}': + get: + tags: + - user + summary: Get user by user name + description: '' + operationId: getUserByName + produces: + - application/xml + - application/json + parameters: + - name: username + in: path + description: 'The name that needs to be fetched. Use user1 for testing.' + required: true + type: string + responses: + '200': + description: successful operation + schema: + $ref: '#/definitions/User' + '400': + description: Invalid username supplied + '404': + description: User not found + put: + tags: + - user + summary: Updated user + description: This can only be done by the logged in user. + operationId: updateUser + produces: + - application/xml + - application/json + parameters: + - name: username + in: path + description: name that need to be deleted + required: true + type: string + - in: body + name: body + description: Updated user object + required: true + schema: + $ref: '#/definitions/User' + responses: + '400': + description: Invalid user supplied + '404': + description: User not found + delete: + tags: + - user + summary: Delete user + description: This can only be done by the logged in user. + operationId: deleteUser + produces: + - application/xml + - application/json + parameters: + - name: username + in: path + description: The name that needs to be deleted + required: true + type: string + responses: + '400': + description: Invalid username supplied + '404': + description: User not found + '/user/testIntAndBool': + get: + tags: + - user + summary: test integer and boolean query parameters in API + description: This can test integer and boolean query parameters in API. + operationId: testIntAndBool + produces: + - application/xml + - application/json + parameters: + - name: keep + in: query + description: Whether to keep user data after deletion + type: boolean + - name: keepDay + in: query + description: how many days user data is kept after deletion + type: integer + responses: + '200': + description: successful operation +securityDefinitions: + petstore_auth: + type: oauth2 + authorizationUrl: 'http://petstore.swagger.io/api/oauth/dialog' + flow: implicit + scopes: + 'write:pets': modify pets in your account + 'read:pets': read your pets + api_key: + type: apiKey + name: api_key + in: header +definitions: + Order: + title: Pet Order + description: An order for a pets from the pet store + type: object + properties: + id: + type: integer + format: int64 + petId: + type: integer + format: int64 + quantity: + type: integer + format: int32 + shipDate: + type: string + format: date-time + status: + type: string + description: Order Status + enum: + - placed + - approved + - delivered + complete: + type: boolean + default: false + xml: + name: Order + Category: + title: Pet category + description: A category for a pet + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + xml: + name: Category + User: + title: a User + description: A User who is purchasing from the pet store + type: object + properties: + id: + type: integer + format: int64 + username: + type: string + firstName: + type: string + lastName: + type: string + email: + type: string + password: + type: string + phone: + type: string + userStatus: + type: integer + format: int32 + description: User Status + xml: + name: User + Tag: + title: Pet Tag + description: A tag for a pet + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + xml: + name: Tag + Pet: + title: a Pet + description: A pet for sale in the pet store + type: object + required: + - name + - photoUrls + properties: + id: + type: integer + format: int64 + category: + $ref: '#/definitions/Category' + name: + type: string + example: doggie + photoUrls: + type: array + xml: + name: photoUrl + wrapped: true + items: + type: string + tags: + type: array + xml: + name: tag + wrapped: true + items: + $ref: '#/definitions/Tag' + status: + type: string + description: pet status in the store + enum: + - available + - pending + - sold + xml: + name: Pet + ApiResponse: + title: An uploaded response + description: Describes the result of uploading an image resource + type: object + properties: + code: + type: integer + format: int32 + type: + type: string + message: + type: string diff --git a/samples/client/petstore/c/README.md b/samples/client/petstore/c/README.md index 4564cd9738..4f6eda3829 100644 --- a/samples/client/petstore/c/README.md +++ b/samples/client/petstore/c/README.md @@ -83,6 +83,7 @@ Category | Method | HTTP request | Description *UserAPI* | [**UserAPI_getUserByName**](docs/UserAPI.md#UserAPI_getUserByName) | **GET** /user/{username} | Get user by user name *UserAPI* | [**UserAPI_loginUser**](docs/UserAPI.md#UserAPI_loginUser) | **GET** /user/login | Logs user into the system *UserAPI* | [**UserAPI_logoutUser**](docs/UserAPI.md#UserAPI_logoutUser) | **GET** /user/logout | Logs out current logged in user session +*UserAPI* | [**UserAPI_testIntAndBool**](docs/UserAPI.md#UserAPI_testIntAndBool) | **GET** /user/testIntAndBool | test integer and boolean query parameters in API *UserAPI* | [**UserAPI_updateUser**](docs/UserAPI.md#UserAPI_updateUser) | **PUT** /user/{username} | Updated user diff --git a/samples/client/petstore/c/api/UserAPI.c b/samples/client/petstore/c/api/UserAPI.c index dff8c09342..4eca7ca26c 100644 --- a/samples/client/petstore/c/api/UserAPI.c +++ b/samples/client/petstore/c/api/UserAPI.c @@ -559,6 +559,83 @@ end: + free(localVarPath); + +} + +// test integer and boolean query parameters in API +// +// This can test integer and boolean query parameters in API. +// +void +UserAPI_testIntAndBool(apiClient_t *apiClient, int keep , int keepDay ) +{ + list_t *localVarQueryParameters = list_createList(); + list_t *localVarHeaderParameters = NULL; + list_t *localVarFormParameters = NULL; + list_t *localVarHeaderType = NULL; + list_t *localVarContentType = NULL; + char *localVarBodyParameters = NULL; + + // create the path + long sizeOfPath = strlen("/user/testIntAndBool")+1; + char *localVarPath = malloc(sizeOfPath); + snprintf(localVarPath, sizeOfPath, "/user/testIntAndBool"); + + + + + // query parameters + char *keyQuery_keep = NULL; + char * valueQuery_keep = NULL; + keyValuePair_t *keyPairQuery_keep = 0; + if (1) // Always send boolean parameters to the API server + { + keyQuery_keep = strdup("keep"); + valueQuery_keep = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_keep, MAX_NUMBER_LENGTH, "%d", keep); + keyPairQuery_keep = keyValuePair_create(keyQuery_keep, valueQuery_keep); + list_addElement(localVarQueryParameters,keyPairQuery_keep); + } + + // query parameters + char *keyQuery_keepDay = NULL; + char * valueQuery_keepDay = NULL; + keyValuePair_t *keyPairQuery_keepDay = 0; + if (1) // Always send integer parameters to the API server + { + keyQuery_keepDay = strdup("keepDay"); + valueQuery_keepDay = calloc(1,MAX_NUMBER_LENGTH); + snprintf(valueQuery_keepDay, MAX_NUMBER_LENGTH, "%d", keepDay); + keyPairQuery_keepDay = keyValuePair_create(keyQuery_keepDay, valueQuery_keepDay); + list_addElement(localVarQueryParameters,keyPairQuery_keepDay); + } + apiClient_invoke(apiClient, + localVarPath, + localVarQueryParameters, + localVarHeaderParameters, + localVarFormParameters, + localVarHeaderType, + localVarContentType, + localVarBodyParameters, + "GET"); + + // uncomment below to debug the error response + //if (apiClient->response_code == 200) { + // printf("%s\n","successful operation"); + //} + //No return type +end: + if (apiClient->dataReceived) { + free(apiClient->dataReceived); + apiClient->dataReceived = NULL; + apiClient->dataReceivedLen = 0; + } + list_freeList(localVarQueryParameters); + + + + free(localVarPath); } diff --git a/samples/client/petstore/c/api/UserAPI.h b/samples/client/petstore/c/api/UserAPI.h index b0a60accda..1a061b9904 100644 --- a/samples/client/petstore/c/api/UserAPI.h +++ b/samples/client/petstore/c/api/UserAPI.h @@ -54,6 +54,14 @@ void UserAPI_logoutUser(apiClient_t *apiClient); +// test integer and boolean query parameters in API +// +// This can test integer and boolean query parameters in API. +// +void +UserAPI_testIntAndBool(apiClient_t *apiClient, int keep , int keepDay ); + + // Updated user // // This can only be done by the logged in user. diff --git a/samples/client/petstore/c/docs/UserAPI.md b/samples/client/petstore/c/docs/UserAPI.md index adf601fca2..11d1de4d7f 100644 --- a/samples/client/petstore/c/docs/UserAPI.md +++ b/samples/client/petstore/c/docs/UserAPI.md @@ -11,6 +11,7 @@ Method | HTTP request | Description [**UserAPI_getUserByName**](UserAPI.md#UserAPI_getUserByName) | **GET** /user/{username} | Get user by user name [**UserAPI_loginUser**](UserAPI.md#UserAPI_loginUser) | **GET** /user/login | Logs user into the system [**UserAPI_logoutUser**](UserAPI.md#UserAPI_logoutUser) | **GET** /user/logout | Logs out current logged in user session +[**UserAPI_testIntAndBool**](UserAPI.md#UserAPI_testIntAndBool) | **GET** /user/testIntAndBool | test integer and boolean query parameters in API [**UserAPI_updateUser**](UserAPI.md#UserAPI_updateUser) | **PUT** /user/{username} | Updated user @@ -217,6 +218,37 @@ 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) +# **UserAPI_testIntAndBool** +```c +// test integer and boolean query parameters in API +// +// This can test integer and boolean query parameters in API. +// +void UserAPI_testIntAndBool(apiClient_t *apiClient, int keep, int keepDay); +``` + +### Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**apiClient** | **apiClient_t \*** | context containing the client configuration | +**keep** | **int** | Whether to keep user data after deletion | [optional] +**keepDay** | **int** | how many days user data is kept after deletion | [optional] + +### Return type + +void + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **UserAPI_updateUser** ```c // Updated user From c5e79681c56ad900842c3aae8af24d9a8430dc85 Mon Sep 17 00:00:00 2001 From: Joe Longstreet Date: Tue, 29 Nov 2022 02:42:56 -0600 Subject: [PATCH 060/189] [typescript-nest] fixes query parameter append bug (#14139) Co-authored-by: Joe Longstreet --- .../resources/typescript-nestjs/api.service.mustache | 10 +++++----- .../builds/default/api/pet.service.ts | 8 ++++---- .../builds/default/api/user.service.ts | 6 +++--- .../builds/default/api/pet.service.ts | 6 +++--- .../builds/default/api/user.service.ts | 6 +++--- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/typescript-nestjs/api.service.mustache b/modules/openapi-generator/src/main/resources/typescript-nestjs/api.service.mustache index 066abea136..ea7d0b00ee 100644 --- a/modules/openapi-generator/src/main/resources/typescript-nestjs/api.service.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-nestjs/api.service.mustache @@ -76,7 +76,7 @@ export class {{classname}} { {{/allParams}} {{#hasQueryParams}} - let queryParameters = {}; + let queryParameters = new URLSearchParams(); {{#queryParams}} {{#isArray}} if ({{paramName}}) { @@ -93,10 +93,10 @@ export class {{classname}} { {{^isArray}} if ({{paramName}} !== undefined && {{paramName}} !== null) { {{#isDateTime}} - queryParameters['{{baseName}}'] = {{paramName}}.toISOString(); + queryParameters.append('{{baseName}}', {{paramName}}.toISOString()); {{/isDateTime}} {{^isDateTime}} - queryParameters['{{baseName}}'] = {{paramName}}; + queryParameters.append('{{baseName}}', {{paramName}}); {{/isDateTime}} } {{/isArray}} @@ -128,10 +128,10 @@ export class {{classname}} { {{/isKeyInHeader}} {{#isKeyInQuery}} {{^hasQueryParams}} - let queryParameters = {}; + let queryParameters = new URLSearchParams(); {{/hasQueryParams}} if (this.configuration.apiKeys["{{keyParamName}}"]) { - queryParameters['{{keyParamName}}'] = this.configuration.apiKeys["{{keyParamName}}"]; + queryParameters.append('{{keyParamName}}', this.configuration.apiKeys["{{keyParamName}}"]); } {{/isKeyInQuery}} diff --git a/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/api/pet.service.ts b/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/api/pet.service.ts index 5fa20c944d..0907707dae 100644 --- a/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/api/pet.service.ts +++ b/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/api/pet.service.ts @@ -152,9 +152,9 @@ export class PetService { throw new Error('Required parameter status was null or undefined when calling findPetsByStatus.'); } - let queryParameters = {}; + let queryParameters = new URLSearchParams(); if (status) { - queryParameters['status'] = status.join(COLLECTION_FORMATS['csv']); + queryParameters.append('status', status.join(COLLECTION_FORMATS['csv'])); } let headers = this.defaultHeaders; @@ -202,9 +202,9 @@ export class PetService { throw new Error('Required parameter tags was null or undefined when calling findPetsByTags.'); } - let queryParameters = {}; + let queryParameters = new URLSearchParams(); if (tags) { - queryParameters['tags'] = tags.join(COLLECTION_FORMATS['csv']); + queryParameters.append('tags', tags.join(COLLECTION_FORMATS['csv'])); } let headers = this.defaultHeaders; diff --git a/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/api/user.service.ts b/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/api/user.service.ts index 837873bc54..a9f4108418 100644 --- a/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/api/user.service.ts +++ b/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/api/user.service.ts @@ -268,12 +268,12 @@ export class UserService { throw new Error('Required parameter password was null or undefined when calling loginUser.'); } - let queryParameters = {}; + let queryParameters = new URLSearchParams(); if (username !== undefined && username !== null) { - queryParameters['username'] = username; + queryParameters.append('username', username); } if (password !== undefined && password !== null) { - queryParameters['password'] = password; + queryParameters.append('password', password); } let headers = this.defaultHeaders; diff --git a/samples/client/petstore/typescript-nestjs-v8-provided-in-root/builds/default/api/pet.service.ts b/samples/client/petstore/typescript-nestjs-v8-provided-in-root/builds/default/api/pet.service.ts index 115e76e75a..40d177f58f 100644 --- a/samples/client/petstore/typescript-nestjs-v8-provided-in-root/builds/default/api/pet.service.ts +++ b/samples/client/petstore/typescript-nestjs-v8-provided-in-root/builds/default/api/pet.service.ts @@ -153,7 +153,7 @@ export class PetService { throw new Error('Required parameter status was null or undefined when calling findPetsByStatus.'); } - let queryParameters = {}; + let queryParameters = new URLSearchParams(); if (status) { queryParameters['status'] = status.join(COLLECTION_FORMATS['csv']); } @@ -203,9 +203,9 @@ export class PetService { throw new Error('Required parameter tags was null or undefined when calling findPetsByTags.'); } - let queryParameters = {}; + let queryParameters = new URLSearchParams(); if (tags) { - queryParameters['tags'] = tags.join(COLLECTION_FORMATS['csv']); + queryParameters.append('tags', tags.join(COLLECTION_FORMATS['csv'])); } let headers = this.defaultHeaders; diff --git a/samples/client/petstore/typescript-nestjs-v8-provided-in-root/builds/default/api/user.service.ts b/samples/client/petstore/typescript-nestjs-v8-provided-in-root/builds/default/api/user.service.ts index 265fceafa2..6f3c97b86e 100644 --- a/samples/client/petstore/typescript-nestjs-v8-provided-in-root/builds/default/api/user.service.ts +++ b/samples/client/petstore/typescript-nestjs-v8-provided-in-root/builds/default/api/user.service.ts @@ -269,12 +269,12 @@ export class UserService { throw new Error('Required parameter password was null or undefined when calling loginUser.'); } - let queryParameters = {}; + let queryParameters = new URLSearchParams(); if (username !== undefined && username !== null) { - queryParameters['username'] = username; + queryParameters.append('username', username); } if (password !== undefined && password !== null) { - queryParameters['password'] = password; + queryParameters.append('password', password); } let headers = this.defaultHeaders; From 6c9246ca3d577f6b7008a8873c68c9ce51f359ea Mon Sep 17 00:00:00 2001 From: Reinhard-PTV <77726540+Reinhard-PTV@users.noreply.github.com> Date: Tue, 29 Nov 2022 10:11:30 +0100 Subject: [PATCH 061/189] [BUG] [client] [java] [native] [csharp-netcore] Multi use of schema params within deepobjects (#13662) * multiple use of parameters in deepobjects * fix java native * support camelCase * revert modifying baseName because it is not used anymore * remove commented line --- .../main/java/org/openapitools/codegen/DefaultCodegen.java | 1 - .../src/main/resources/Java/libraries/native/api.mustache | 4 ++-- .../src/main/resources/csharp-netcore/api.mustache | 2 +- .../csharpnetcore/CSharpNetCoreClientDeepObjectTest.java | 2 +- .../codegen/java/JavaClientDeepObjectTest.java | 2 +- .../src/test/resources/3_0/deepobject.yaml | 7 +++++++ 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index 06638d134c..0e580ae31d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java @@ -5071,7 +5071,6 @@ public class DefaultCodegen implements CodegenConfig { properties.entrySet().stream() .map(entry -> { CodegenProperty property = fromProperty(entry.getKey(), entry.getValue(), requiredVarNames.contains(entry.getKey())); - property.baseName = codegenParameter.baseName + "[" + entry.getKey() + "]"; return property; }).collect(Collectors.toList()); } else { diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/native/api.mustache index e5af481f06..141d144b70 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/native/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/native/api.mustache @@ -351,10 +351,10 @@ public class {{classname}} { if ({{paramName}} != null) { {{#items.vars}} {{#isArray}} - localVarQueryParams.addAll(ApiClient.parameterToPairs("csv", "{{baseName}}", {{paramName}}.{{getter}}())); + localVarQueryParams.addAll(ApiClient.parameterToPairs("csv", "{{paramName}}[{{name}}]", {{paramName}}.{{getter}}())); {{/isArray}} {{^isArray}} - localVarQueryParams.addAll(ApiClient.parameterToPairs("{{baseName}}", {{paramName}}.{{getter}}())); + localVarQueryParams.addAll(ApiClient.parameterToPairs("{{paramName}}[{{name}}]", {{paramName}}.{{getter}}())); {{/isArray}} {{/items.vars}} } diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/api.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/api.mustache index 99d24d2aaa..2f6c23598d 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/api.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/api.mustache @@ -333,7 +333,7 @@ namespace {{packageName}}.{{apiPackage}} {{#items.vars}} if ({{paramName}}.{{name}} != null) { - localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{baseName}}", {{paramName}}.{{name}})); + localVarRequestOptions.QueryParameters.Add({{packageName}}.Client.ClientUtils.ParameterToMultiMap("{{collectionFormat}}", "{{paramName}}[{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}]", {{paramName}}.{{name}})); } {{/items.vars}} {{^items}} diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharpnetcore/CSharpNetCoreClientDeepObjectTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharpnetcore/CSharpNetCoreClientDeepObjectTest.java index 44b44b5b73..a441a3f3d9 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharpnetcore/CSharpNetCoreClientDeepObjectTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharpnetcore/CSharpNetCoreClientDeepObjectTest.java @@ -59,6 +59,6 @@ public class CSharpNetCoreClientDeepObjectTest { generator.setGeneratorPropertyDefault(CodegenConstants.SUPPORTING_FILES, "false"); generator.opts(input).generate(); assertFileContains(Paths.get(outputPath + "/src/Org.OpenAPITools/Api/DefaultApi.cs"), - "options[a]", "options[b]"); + "options[a]", "options[b]","inputOptions[b]"); } } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientDeepObjectTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientDeepObjectTest.java index ec3908435d..93ebc9854f 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientDeepObjectTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientDeepObjectTest.java @@ -58,6 +58,6 @@ public class JavaClientDeepObjectTest { generator.opts(input).generate(); assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/client/api/DefaultApi.java"), - "options[a]", "options[b]", "\"csv\", \"options[c]\""); + "options[a]", "options[b]", "\"csv\", \"options[c]\"", "inputOptions[a]"); } } diff --git a/modules/openapi-generator/src/test/resources/3_0/deepobject.yaml b/modules/openapi-generator/src/test/resources/3_0/deepobject.yaml index 4fcac02b6d..7c2616f3a7 100644 --- a/modules/openapi-generator/src/test/resources/3_0/deepobject.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/deepobject.yaml @@ -14,6 +14,13 @@ paths: schema: $ref: '#/components/schemas/Options' explode: true + - name: inputOptions + in: query + required: false + style: deepObject + schema: + $ref: '#/components/schemas/Options' + explode: true responses: '200': description: OK From b8c8f4a03275fa6686c4bf04997295b14ddfbb90 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 29 Nov 2022 23:23:07 +0800 Subject: [PATCH 062/189] update typescript samples --- .../builds/default/api/pet.service.ts | 4 ++-- .../builds/default/api/pet.service.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/api/pet.service.ts b/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/api/pet.service.ts index 0907707dae..d05d59a3b0 100644 --- a/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/api/pet.service.ts +++ b/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/api/pet.service.ts @@ -154,7 +154,7 @@ export class PetService { let queryParameters = new URLSearchParams(); if (status) { - queryParameters.append('status', status.join(COLLECTION_FORMATS['csv'])); + queryParameters['status'] = status.join(COLLECTION_FORMATS['csv']); } let headers = this.defaultHeaders; @@ -204,7 +204,7 @@ export class PetService { let queryParameters = new URLSearchParams(); if (tags) { - queryParameters.append('tags', tags.join(COLLECTION_FORMATS['csv'])); + queryParameters['tags'] = tags.join(COLLECTION_FORMATS['csv']); } let headers = this.defaultHeaders; diff --git a/samples/client/petstore/typescript-nestjs-v8-provided-in-root/builds/default/api/pet.service.ts b/samples/client/petstore/typescript-nestjs-v8-provided-in-root/builds/default/api/pet.service.ts index 40d177f58f..a9edbe9d20 100644 --- a/samples/client/petstore/typescript-nestjs-v8-provided-in-root/builds/default/api/pet.service.ts +++ b/samples/client/petstore/typescript-nestjs-v8-provided-in-root/builds/default/api/pet.service.ts @@ -205,7 +205,7 @@ export class PetService { let queryParameters = new URLSearchParams(); if (tags) { - queryParameters.append('tags', tags.join(COLLECTION_FORMATS['csv'])); + queryParameters['tags'] = tags.join(COLLECTION_FORMATS['csv']); } let headers = this.defaultHeaders; From a92afd239fa6f5ee01b9e0c4b65e418d229ce69d Mon Sep 17 00:00:00 2001 From: William Cheng Date: Wed, 30 Nov 2022 00:55:03 +0800 Subject: [PATCH 063/189] Add tests to cover base name (deep object) bug (#14142) * better deepObject test * add tests to cover baseName (deep object) change --- .../CSharpNetCoreClientDeepObjectTest.java | 4 +- .../java/JavaClientDeepObjectTest.java | 5 +- .../src/test/resources/3_0/deepobject.yaml | 171 +++++++++++++----- 3 files changed, 131 insertions(+), 49 deletions(-) diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharpnetcore/CSharpNetCoreClientDeepObjectTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharpnetcore/CSharpNetCoreClientDeepObjectTest.java index a441a3f3d9..65f0c59e84 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharpnetcore/CSharpNetCoreClientDeepObjectTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharpnetcore/CSharpNetCoreClientDeepObjectTest.java @@ -59,6 +59,8 @@ public class CSharpNetCoreClientDeepObjectTest { generator.setGeneratorPropertyDefault(CodegenConstants.SUPPORTING_FILES, "false"); generator.opts(input).generate(); assertFileContains(Paths.get(outputPath + "/src/Org.OpenAPITools/Api/DefaultApi.cs"), - "options[a]", "options[b]","inputOptions[b]"); + "options[id]", "options[name]", "options[category]", "options[tags]", + "options[status]", "options[photoUrls]", + "inputOptions[a]", "inputOptions[b]", "inputOptions[c]"); } } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientDeepObjectTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientDeepObjectTest.java index 93ebc9854f..430bd231ec 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientDeepObjectTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientDeepObjectTest.java @@ -58,6 +58,9 @@ public class JavaClientDeepObjectTest { generator.opts(input).generate(); assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/client/api/DefaultApi.java"), - "options[a]", "options[b]", "\"csv\", \"options[c]\"", "inputOptions[a]"); + "options[id]", "options[name]", "options[status]", + "\"csv\", \"options[tags]\"", + "\"csv\", \"options[photoUrls]\"", + "inputOptions[a]", "inputOptions[b]", "\"csv\", \"inputOptions[c]\""); } } diff --git a/modules/openapi-generator/src/test/resources/3_0/deepobject.yaml b/modules/openapi-generator/src/test/resources/3_0/deepobject.yaml index 7c2616f3a7..a6c695e554 100644 --- a/modules/openapi-generator/src/test/resources/3_0/deepobject.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/deepobject.yaml @@ -1,47 +1,124 @@ -openapi: 3.0.3 -info: - title: deepobject-test - version: 1.0.0 -paths: - /test: - get: - operationId: test - parameters: - - name: options - in: query - required: false - style: deepObject - schema: - $ref: '#/components/schemas/Options' - explode: true - - name: inputOptions - in: query - required: false - style: deepObject - schema: - $ref: '#/components/schemas/Options' - explode: true - responses: - '200': - description: OK - content: - text/plain: - schema: - type: string -components: - schemas: - Options: - type: object - properties: - a: - nullable: true - type: string - format: date-time - b: - type: string - nullable: true - format: date-time - c: - type: array - items: - type: string +openapi: 3.0.3 +info: + title: deepobject-test + version: 1.0.0 +paths: + /test: + get: + operationId: test + parameters: + - name: options + in: query + required: false + style: deepObject + schema: + $ref: '#/components/schemas/Pet' + explode: true + - name: inputOptions + in: query + required: false + style: deepObject + schema: + $ref: '#/components/schemas/Options' + explode: true + responses: + '200': + description: OK + content: + text/plain: + schema: + type: string + post: + operationId: test_post + parameters: + - name: query_object + in: query + required: false + style: form + schema: + $ref: '#/components/schemas/Pet' + explode: true + responses: + '200': + description: OK + content: + text/plain: + schema: + type: string +components: + schemas: + Options: + type: object + properties: + a: + nullable: true + type: string + format: date-time + b: + type: string + nullable: true + format: date-time + c: + type: array + items: + type: string + Category: + type: object + properties: + id: + type: integer + format: int64 + example: 1 + name: + type: string + example: Dogs + xml: + name: category + Tag: + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + xml: + name: tag + Pet: + required: + - name + - photoUrls + type: object + properties: + id: + type: integer + format: int64 + example: 10 + name: + type: string + example: doggie + category: + $ref: '#/components/schemas/Category' + photoUrls: + type: array + xml: + wrapped: true + items: + type: string + xml: + name: photoUrl + tags: + type: array + xml: + wrapped: true + items: + $ref: '#/components/schemas/Tag' + status: + type: string + description: pet status in the store + enum: + - available + - pending + - sold + xml: + name: pet From 792d44d7974bc82c2d402b6e6e9152d998f178db Mon Sep 17 00:00:00 2001 From: Eric Haag Date: Tue, 29 Nov 2022 20:57:53 -0600 Subject: [PATCH 064/189] Use Gradle 7.6 to build Gradle plugin (#13860) * Upgrade Gradle plugin Gradle build to Gradle 7.5.1 * Update Travis workflow file to support new tasks * Update Maven POM with Gradle 7.5.1 * Capitalize many occurrences of "Gradle" in the Gradle plugin README * Update Gradle version in appveyor.yml and shippable.yml * Update comments * Update Gradle wrapper to 7.5.1 * Capitalize Gradle in shippable.yml * Leave Open API * Upgrade Gradle plugin build to Gradle 7.6 * Upgrade wrapper to Gradle 7.6 --- .travis.yml | 10 +- appveyor.yml | 6 +- .../README.adoc | 6 +- .../build.gradle | 290 +++++++----------- .../gradle/wrapper/gradle-wrapper.jar | Bin 55616 -> 61574 bytes .../gradle/wrapper/gradle-wrapper.properties | 3 +- .../openapi-generator-gradle-plugin/gradlew | 287 ++++++++++------- .../gradlew.bat | 17 +- .../openapi-generator-gradle-plugin/pom.xml | 10 +- .../settings.gradle | 4 +- .../test/kotlin/GenerateTaskFromCacheTest.kt | 2 +- .../test/kotlin/GenerateTaskUpToDateTest.kt | 2 +- shippable.yml | 8 +- 13 files changed, 324 insertions(+), 321 deletions(-) diff --git a/.travis.yml b/.travis.yml index ddec30b70b..10fc38a006 100644 --- a/.travis.yml +++ b/.travis.yml @@ -160,8 +160,8 @@ after_success: echo "Finished mvn clean deploy for $TRAVIS_BRANCH"; pushd .; cd modules/openapi-generator-gradle-plugin; - ./gradlew -Psigning.keyId="$SIGNING_KEY" -Psigning.password="$SIGNING_PASSPHRASE" -Psigning.secretKeyRingFile="${TRAVIS_BUILD_DIR}/sec.gpg" -PossrhUsername="${SONATYPE_USERNAME}" -PossrhPassword="${SONATYPE_PASSWORD}" publishMavenJavaPublicationToNexusRepository closeAndReleaseRepository --no-daemon; - echo "Finished ./gradlew publishPluginMavenPublicationToNexusRepository closeAndReleaseRepository"; + ./gradlew -Psigning.keyId="$SIGNING_KEY" -Psigning.password="$SIGNING_PASSPHRASE" -Psigning.secretKeyRingFile="${TRAVIS_BUILD_DIR}/sec.gpg" -PossrhUsername="${SONATYPE_USERNAME}" -PossrhPassword="${SONATYPE_PASSWORD}" publishPluginMavenPublicationToSonatypeRepository closeAndReleaseRepository; + echo "Finished ./gradlew publishPluginMavenPublicationToSonatypeRepository closeAndReleaseRepository"; popd; elif [ -z $TRAVIS_TAG ] && [[ "$TRAVIS_BRANCH" =~ ^[0-9]+\.[0-9]+\.x$ ]]; then echo "Publishing from branch $TRAVIS_BRANCH"; @@ -169,15 +169,15 @@ after_success: echo "Finished mvn clean deploy for $TRAVIS_BRANCH"; pushd .; cd modules/openapi-generator-gradle-plugin; - ./gradlew -PossrhUsername="${SONATYPE_USERNAME}" -PossrhPassword="${SONATYPE_PASSWORD}" publishPluginMavenPublicationToNexusRepository closeAndReleaseRepository --no-daemon; - echo "Finished ./gradlew publishPluginMavenPublicationToNexusRepository closeAndReleaseRepository"; + ./gradlew -PossrhUsername="${SONATYPE_USERNAME}" -PossrhPassword="${SONATYPE_PASSWORD}" publishPluginMavenPublicationToSonatypeRepository closeAndReleaseRepository; + echo "Finished ./gradlew publishPluginMavenPublicationToSonatypeRepository closeAndReleaseRepository"; popd; fi; if [ -n $TRAVIS_TAG ] && [[ "$TRAVIS_TAG" =~ ^[v][0-9]+\.[0-9]+\.[0-9]+$ ]]; then echo "Publishing the gradle plugin to Gradle Portal on tag $TRAVIS_TAG (only)"; pushd .; cd modules/openapi-generator-gradle-plugin; - ./gradlew -Psigning.keyId="$SIGNING_KEY" -Psigning.password="$SIGNING_PASSPHRASE" -Psigning.secretKeyRingFile="${TRAVIS_BUILD_DIR}/sec.gpg" publishPlugins -Dgradle.publish.key=$GRADLE_PUBLISH_KEY -Dgradle.publish.secret=$GRADLE_PUBLISH_SECRET --no-daemon; + ./gradlew -Psigning.keyId="$SIGNING_KEY" -Psigning.password="$SIGNING_PASSPHRASE" -Psigning.secretKeyRingFile="${TRAVIS_BUILD_DIR}/sec.gpg" publishPlugins -Dgradle.publish.key=$GRADLE_PUBLISH_KEY -Dgradle.publish.secret=$GRADLE_PUBLISH_SECRET; echo "Finished ./gradlew publishPlugins (plugin portal)"; popd; fi; diff --git a/appveyor.yml b/appveyor.yml index 2caeb5c400..492e9f5d68 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -15,14 +15,14 @@ install: # install gradle - ps: | Add-Type -AssemblyName System.IO.Compression.FileSystem - if (!(Test-Path -Path "C:\gradle\gradle-5.6.4" )) { + if (!(Test-Path -Path "C:\gradle\gradle-7.6" )) { (new-object System.Net.WebClient).DownloadFile( - 'https://services.gradle.org/distributions/gradle-5.6.4-bin.zip', + 'https://services.gradle.org/distributions/gradle-7.6-bin.zip', 'C:\gradle-bin.zip' ) [System.IO.Compression.ZipFile]::ExtractToDirectory("C:\gradle-bin.zip", "C:\gradle") } - - cmd: SET PATH=C:\maven\apache-maven-3.8.3\bin;C:\gradle\gradle-5.6.4\bin;%JAVA_HOME%\bin;%PATH% + - cmd: SET PATH=C:\maven\apache-maven-3.8.3\bin;C:\gradle\gradle-7.6\bin;%JAVA_HOME%\bin;%PATH% - cmd: SET MAVEN_OPTS=-Xmx4g - cmd: SET JAVA_OPTS=-Xmx4g - cmd: SET M2_HOME=C:\maven\apache-maven-3.8.3 diff --git a/modules/openapi-generator-gradle-plugin/README.adoc b/modules/openapi-generator-gradle-plugin/README.adoc index 3ffc65de9e..7e4a04f8dd 100644 --- a/modules/openapi-generator-gradle-plugin/README.adoc +++ b/modules/openapi-generator-gradle-plugin/README.adoc @@ -1,8 +1,8 @@ = OpenAPI Generator Gradle Plugin -This document describes the gradle plugin for OpenAPI Generator. +This document describes the Gradle plugin for OpenAPI Generator. -This gradle plugin offers a declarative DSL via _extensions_ (these are Gradle project extensions). +This Gradle plugin offers a declarative DSL via _extensions_ (these are Gradle project extensions). These map almost fully 1:1 with the options you'd pass to the CLI or Maven plugin. The plugin maps the extensions to a task of the same name to provide a clean API. If you're interested in the extension/task mapping concept from a high-level, you can https://docs.gradle.org/current/userguide/custom_plugins.html#sec:mapping_extension_properties_to_task_properties[check out Gradle's docs]. == Tasks @@ -37,7 +37,7 @@ compileJava.dependsOn tasks.openApiGenerate ``` ==== -All extensions can be rewritten as tasks. Where you can have only a single extension defined in your gradle file, you may have multiple tasks. +All extensions can be rewritten as tasks. Where you can have only a single extension defined in your Gradle file, you may have multiple tasks. .One Extension, multiple tasks [source,groovy] diff --git a/modules/openapi-generator-gradle-plugin/build.gradle b/modules/openapi-generator-gradle-plugin/build.gradle index 3edcd4db18..61be1d2540 100644 --- a/modules/openapi-generator-gradle-plugin/build.gradle +++ b/modules/openapi-generator-gradle-plugin/build.gradle @@ -1,84 +1,56 @@ -buildscript { - ext.kotlin_version = '1.3.30' - repositories { - mavenLocal() - maven { url "https://repo1.maven.org/maven2" } - maven { - url "https://plugins.gradle.org/m2/" - } - maven { - url "https://oss.sonatype.org/content/repositories/releases/" - } - maven { - url "https://oss.sonatype.org/content/repositories/snapshots/" - } - } - dependencies { - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - classpath "gradle.plugin.org.gradle.kotlin:gradle-kotlin-dsl-plugins:1.1.3" - classpath "com.gradle.publish:plugin-publish-plugin:0.11.0" - classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.20.0" - classpath "de.marcphilipp.gradle:nexus-publish-plugin:0.2.0" - } +import io.github.gradlenexus.publishplugin.CloseNexusStagingRepository +import io.github.gradlenexus.publishplugin.ReleaseNexusStagingRepository +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile + +plugins { + id("com.gradle.plugin-publish") version "1.0.0" + id("io.github.gradle-nexus.publish-plugin") version "1.1.0" + id("java-gradle-plugin") + id("maven-publish") + id("org.gradle.kotlin.kotlin-dsl") version "2.4.1" + id("org.jetbrains.kotlin.jvm") version "1.7.10" + id("signing") } -group 'org.openapitools' -// Shared OpenAPI Generator version be passed via command line arg as -PopenApiGeneratorVersion=VERSION -version "$openApiGeneratorVersion" +group = "org.openapitools" +version = "$openApiGeneratorVersion" +ext.isReleaseVersion = !version.endsWith("SNAPSHOT") + description = """ -This plugin supports common functionality found in Open API Generator CLI as a gradle plugin. +This plugin supports common functionality found in Open API Generator CLI as a Gradle plugin. This gives you the ability to generate client SDKs, documentation, new generators, and to validate Open API 2.0 and 3.x specifications as part of your build. Other tasks are available as command line tasks. """ -ext.isReleaseVersion = !version.endsWith("SNAPSHOT") -apply plugin: 'com.gradle.plugin-publish' -apply plugin: 'java-gradle-plugin' -apply plugin: 'signing' -apply plugin: 'kotlin' -apply plugin: "org.gradle.kotlin.kotlin-dsl" -apply plugin: 'io.codearte.nexus-staging' -apply plugin: "de.marcphilipp.nexus-publish" - -sourceCompatibility = 1.8 -targetCompatibility = 1.8 +java { + withSourcesJar() + withJavadocJar() + sourceCompatibility = 1.8 + targetCompatibility = 1.8 +} repositories { - mavenLocal() - maven { url "https://repo1.maven.org/maven2" } - maven { - url "https://oss.sonatype.org/content/repositories/releases/" - } + mavenCentral() maven { + name = "Sonatype Snapshots" url "https://oss.sonatype.org/content/repositories/snapshots/" } - jcenter() } dependencies { - compile gradleApi() - // Shared OpenAPI Generator version be passed via command line arg as -PopenApiGeneratorVersion=VERSION - compile "org.openapitools:openapi-generator:$openApiGeneratorVersion" - compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" - - testCompile 'org.testng:testng:6.9.6', - "org.jetbrains.kotlin:kotlin-test:$kotlin_version" - - testCompile "org.jetbrains.kotlin:kotlin-compiler-embeddable:$kotlin_version" + implementation("org.openapitools:openapi-generator:$openApiGeneratorVersion") + testImplementation("org.jetbrains.kotlin:kotlin-test-testng:1.7.10") } -test { +tasks.named("test", Test).configure { useTestNG() - testClassesDirs = files(project.tasks.compileTestKotlin.destinationDir) testLogging.showStandardStreams = false beforeTest { descriptor -> logger.lifecycle("Running test: " + descriptor) } - failFast = true - onOutput { descriptor, event -> // SLF4J may complain about multiple bindings depending on how this is run. // This is just a warning, but can make test output less readable. So we ignore it specifically. @@ -88,133 +60,105 @@ test { } } -task javadocJar(type: Jar) { - from javadoc - classifier = 'javadoc' +tasks.withType(KotlinCompile).configureEach { + kotlinOptions { + jvmTarget = "1.8" + } } -task sourcesJar(type: Jar) { - from sourceSets.main.allSource - classifier = 'sources' +tasks.withType(Javadoc).configureEach { + if (JavaVersion.current().isJava9Compatible()) { + options.addBooleanOption("html5", true) + } } -artifacts { - archives javadocJar, sourcesJar +tasks.withType(CloseNexusStagingRepository).configureEach { + onlyIf { nexusPublishing.useStaging.get() } } -publishing { - publications { - mavenJava(MavenPublication) { - from components.java - artifact sourcesJar - artifact javadocJar - pom { - name = 'OpenAPI-Generator Contributors' - description = project.description - url = 'https://openapi-generator.tech' - organization { - name = 'org.openapitools' - url = 'https://github.com/OpenAPITools' - } - licenses { - license { - name = "The Apache Software License, Version 2.0" - url = "https://www.apache.org/licenses/LICENSE-2.0.txt" - distribution = "repo" +tasks.withType(ReleaseNexusStagingRepository).configureEach { + onlyIf { nexusPublishing.useStaging.get() } +} + +gradlePlugin { + website = "https://openapi-generator.tech/" + vcsUrl = "https://github.com/OpenAPITools/openapi-generator" + plugins { + openApiGenerator { + id = "org.openapi.generator" + description = "OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)." + displayName = "OpenAPI Generator Gradle Plugin" + implementationClass = "org.openapitools.generator.gradle.plugin.OpenApiGeneratorPlugin" + tags.addAll("openapi-3.0", "openapi-2.0", "openapi", "swagger", "codegen", "sdk") + } + } +} + +nexusPublishing { + repositories { + sonatype { + username = project.properties["ossrhUsername"] + password = project.properties["ossrhPassword"] + + // To retrieve: ./gradlew -Psigning.keyId="$SIGNING_KEY" -Psigning.password="$SIGNING_PASSPHRASE" -Psigning.secretKeyRingFile="$SIGNING_SECRET" getStagingProfile + stagingProfileId = "456297f829bbbe" + } + } +} + +// Signing requires three keys to be defined: signing.keyId, signing.password, and signing.secretKeyRingFile. +// These can be passed to the Gradle command: +// ./gradlew -Psigning.keyId=yourid +// or stored as key=value pairs in ~/.gradle/gradle.properties +// You can also apply them in CI via environment variables. See Gradle's docs for details. +signing { + required { isReleaseVersion && gradle.taskGraph.hasTask("publishPluginMavenPublicationToSonatypeRepository") } + sign(publishing.publications) +} + +// afterEvaluate is necessary because java-gradle-plugin +// creates its publications in an afterEvaluate callback +afterEvaluate { + tasks.named("publishToSonatype").configure { + dependsOn("check") + } + + publishing { + publications { + pluginMaven { + pom { + name = "OpenAPI-Generator Contributors" + description = project.description + url = "https://openapi-generator.tech" + organization { + name = "org.openapitools" + url = "https://github.com/OpenAPITools" } - } - developers { - developer { - id = "openapitools" - name = "OpenAPI-Generator Contributors" - email = "team@openapitools.org" + licenses { + license { + name = "The Apache Software License, Version 2.0" + url = "https://www.apache.org/licenses/LICENSE-2.0.txt" + distribution = "repo" + } + } + developers { + developer { + id = "openapitools" + name = "OpenAPI-Generator Contributors" + email = "team@openapitools.org" + } + } + scm { + url = "https://github.com/OpenAPITools/openapi-generator" + connection = "scm:git:git://github.com/OpenAPITools/openapi-generator.git" + developerConnection = "scm:git:ssh://git@github.com:OpenAPITools/openapi-generator.git" + } + issueManagement { + system = "GitHub" + url = "https://github.com/OpenAPITools/openapi-generator/issues" } - } - scm { - url = 'https://github.com/OpenAPITools/openapi-generator' - connection = 'scm:git:git://github.com/OpenAPITools/openapi-generator.git' - developerConnection = 'scm:git:ssh://git@github.com:OpenAPITools/openapi-generator.git' - } - issueManagement { - system = 'GitHub' - url = 'https://github.com/OpenAPITools/openapi-generator/issues' } } } } } - -nexusStaging { - username = project.properties["ossrhUsername"] - password = project.properties["ossrhPassword"] -} - -nexusPublishing { - // To retrieve: ./gradlew -Psigning.keyId="$SIGNING_KEY" -Psigning.password="$SIGNING_PASSPHRASE" -Psigning.secretKeyRingFile="$SIGNING_SECRET" getStagingProfile --no-daemon - stagingProfileId = "456297f829bbbe" -} - -gradlePlugin { - plugins { - openApiGenerator { - id = 'org.openapi.generator' - implementationClass = 'org.openapitools.generator.gradle.plugin.OpenApiGeneratorPlugin' - } - } -} - -pluginBundle { - // These settings are set for the whole plugin bundle - website = 'https://openapi-generator.tech/' - vcsUrl = 'https://github.com/OpenAPITools/openapi-generator' - description = 'OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)' - - plugins { - // first plugin - openApiGenerator { - id = 'org.openapi.generator' - displayName = 'OpenAPI Generator Gradle Plugin' - tags = ['openapi-3.0', 'openapi-2.0', 'openapi', 'swagger', 'codegen', 'sdk'] - version = "$openApiGeneratorVersion" - group = "org.openapitools" - } - } -} - -// signing will require three keys to be defined: signing.keyId, signing.password, and signing.secretKeyRingFile. -// These can be passed to the gradle command: -// ./gradlew -Psigning.keyId=yourid -// or stored as key=value pairs in ~/.gradle/gradle.properties -// You can also apply them in CI via environment variables. See Gradle's docs for details. -signing { - required { isReleaseVersion && (gradle.taskGraph.hasTask("publishPluginMavenPublicationToNexusRepository") ) } - sign publishing.publications.mavenJava -} - -compileKotlin { - kotlinOptions { - jvmTarget = "1.8" - } -} -compileTestKotlin { - kotlinOptions { - jvmTarget = "1.8" - } -} - -javadoc { - if(JavaVersion.current().isJava9Compatible()) { - options.addBooleanOption('html5', true) - } -} - -tasks { - closeRepository { - onlyIf { nexusPublishing.useStaging.get() } - } - releaseRepository{ - onlyIf { nexusPublishing.useStaging.get() } - } -} - -publishToNexus.dependsOn 'check' diff --git a/modules/openapi-generator-gradle-plugin/gradle/wrapper/gradle-wrapper.jar b/modules/openapi-generator-gradle-plugin/gradle/wrapper/gradle-wrapper.jar index 5c2d1cf016b3885f6930543d57b744ea8c220a1a..943f0cbfa754578e88a3dae77fce6e3dea56edbf 100644 GIT binary patch delta 41329 zcmaI7Q*Td!I-v?`;`vDt%y5>m*3j$(*l^jdP2JpjMA^0+&|2TRW5uH`Rl*t)xVuObX z8is+1yIO~&Kuk+s4o%X#jAkG`%UPmPu(FoL%5_`#;kGEuRVc~{{IR+C!``~k7pe0l zFXh?Sv#G{;-2u>dboTrE^TlrtNyz)gAA~dd3D%(Ez-7BcWF-3N-lU^jY(Q3BP09(v z08qAf4D0ZGh!N1O0%}ltu;LX<)c$&>15vN4OoeiB>*M_jiP3(*3DI7ybrif?aUk#2 zZ1#cK(XGztsOk*$n=#$<^-e+Pcj5{+!C$eb zN~?2cjlp%m7T~9W%6~LA1S?1-B*cW&S8#yh*9dDkSPV;;oMD(o5Ay}vOPgL_`O4c{ zc#!>?7VKF4YmW~!y6b(Dmo!%rNrLYq&g13!f`8Mups(Ds?W3 z48Eq$A>}K@X%nJ+7A53jKO5ziu79Dlo2a#`KniJ`T<~DWx3*+QhUVcXjS@OJjaRtL z%jHp$NjJ1+5c_bN<3)n;D0{)AuFf67lPOR$ zHNRwEISZtoGb>zjEKL+DOt}ycwmuCce>^IekE8o38o7Esv(qZOzvTR~n8e|*DXSG8 zsx23%fasBiHT&(|kP%fK9)Q2>guZ6W9nFRtcL<-$tczpwDj4wd8w=q1gYrs`7eQ2b zSqIDBGz*?9u0ezSFS3xzEijzukZPERLMecjfXyz5;af7-_LU}}Z2#mnEZETI6(eAV zK1*TNL4aeB*ya@>pnA^}Hy~cfiaYYehC7x8!I@uifQaKS3}E#Z>u;+5kh)P!m43yZ zBkormKnm(h)u>YQZXEE29FNuMdVU+|5Z_X&A`whuCQbRBG=&BlOE~VkPNT}nwdg%9 zxYh|cl>WgWRB4qj+hN_gA=CD){EIp?qdbyTLg!VigOXN^CwqxQ4%IgHr@COIQfR(g zkqSx`WmRa|ueYoUOpd6E6|r1s>LLR)xM2~>HTYw(b~!33LtcRO7^=jz(!F6xo4M3d$AZYj*2<0`phJlRYN*R+YrfjFM^H>z9pLcHW> zEmv)@MZ)v=y3}Ij;FFOACiNIYUuKF%&mInXG!<7`F##I-Wn;RZO0GCJ2toHvFdqlb zH!OwhjfC+T38NjzfIzdn*)vvUS*BL3-&Cs+-|2W^njiNfskM_0FL=)x*14CKrp!xi zu4Cp5EfJO(KBYLyuxE*c-NgJ`xrduL$J1T}_q+^NXK^4SPW)3&_;)hqiYV9fxBL&d zU~xH+iU8GUrkfc;`sfoYu4Z0Frs}5{g|n-=_43k*>y%7~Msc9GR_0bSa+yrs?M}hC z*!;1&c5}=EkdcX9BkFZ)&=sbQYHqY6agmN=NvZt1t8B?CyEr6r)40>IXhn6h99xCX zBHx~7bc2OMArE!PJ>GAi1B*-WO9rTrpR}7)4&XKAqAZuXuFLL%=>nr@Dt77@TUWDR z!eJNBxHsq~-_`ykOXHzrYK!wUdo2nf3x7ypQ7C=lCTL+M+Rbg`%c`RU-BK2@+-vjo z`u+tKt9gX!GcO~*O_OEzXJRT?)lRL{Zr#a3xlmda^AB0FdjYyksXf~Vp*yR3aFnI7 zG+?gWkQ=W2Pf_`(+n55=Ys~{W7th)ZLb4(uZQdtYsOHNRtyjE++=H1^+lIAd>KyDa#5C>D|<_GKcm(3PYc~bzGZ@N7+!Mj!=bDV^^CMiVdv+$p{@93{c0Z z!5ur-V5s0!EDG8y;Edz|BPSf&bgs!3BlC`6v&woFBf@mDFF71)>490%iXT}I#903o z-3YS-O!xu(mA4sex(*ALz6am7zhN~ZzaE+02-j}JrrL>&BFBh5ZeWmE0-FX5X4r`UeKO|0 z%r}Ol7l*(PlVbb|b5e28ti)lg6nliGY+B!n*gYz-m0$zZI`4rYRXz&)E&Z-N$iaqi z9a&2V@!gG#;2LE0!G7_e85}#Dv5}F>BJWGgll8mU zT=N(1T;BM;&mWXatMH5ydyDXG`rcH3Bq4h)_AKCM^IAgG>+VC(;qlJ~` zqck?#sKZyK6&3>^E8I!-|cbPHHvkpP4Ds9-P-#Js$IgY(Nd~Ch}UtjkaKZ(-F z*-14NMe9Q;hslQ*PQ-<-o#CCfv9d^D@Q3h`xFyKF?v#Q!H1^6tUQJ1JY)$n;R z0>#YiFav|LtDPn_;}<+h;7L9@v$d1qw9gQQlJn+3?&n3d80nSq>?ytr2r0A~ zfMLv~DJ_;EJG{yq?KsK7@{jrY@BjmzwzIRj*WUw1#V(u+FMyObcse)T1>+^BIcgu_y=@!0)y= z^RN;rIpZMX*%-1J{z^e}i1||LsH3g&tZNhIZC*qAct~9jZTJsOA_2j)dZ1%%$uEse zBM(qzYYaz-S_qaBY{;+5(W=OaXYMvSJQ-`bRCIq!CfrH?6M9|_7(22_HlAFK`?ozM zCUa{5M%aRV`dM7%9}_k8qCpvOfZD9~h}kLqHFo6_0);(c9s{N`y~-{v%+-~2&ma8B zM&Oy6ZnvxYQ;*F;0Qat=^j99Fo|V)0g$b#pusGl6eD>+u+~0tOI;-PwSvRJ6#YB&# z7SE+ixG z)e;Qu?WjBgNkh7Vb-6@3t$?Gb;_Uv+R#@%3X!VTk$d6bZYyqI$19yjgiKPafw8OmL z64`!T;O*K%BsV0Ihvt+3;&t4__r+C zv|@_-!5!B0xJ6OZMZhsTc2oPBzpkL)Azz--c@lD)o||{Eak9--EPf;oIY~s(2hD|F zZl7VZrXS;HSz@7M%VSpGaoUvljLuytnazV~H9QQXEp11ecsQY=7&3s@0^29sg^iZs zU2Vt)$|XYUPQ0aY<;~al3rCUO_dt;&vyWBlR87~f+lrhZ9VZRZY3y$OtN^K{mWD%V z4S~Q6E~N3melp5`PT7B9_YYeo?KEjf4Q`#;0)pt6dU%J{J6a=2w`bAN3c_W3iOKXi zFm1$rnne!3>Icp!k}KdDo-M)=;oa|0G1a)_O5&xfUL=QTC_*9jiwKu;GvYhTL09kH z&%4#fb1J=idPm+jAFCh+R3P2jNAwIuNkCi$i+#n??2P0}&>D9JC;93pTeM-qI;Hv$ z3T`~HFkgOgbWh-b0jXr$R~g?uHzat{AnW@-w4ifKwY{w);{gmBQFccBgY!D@vGi1+ zqaX?qF;FcbMPx4o6PDr+Y^bzDb&9@$7e5;2-Ryt3k|;@AN-atWMn91Fkko7_Egxu> zOzT$_YOF&pPREwmw2Vt6=V*o*LVJ6TOO7aJju13l3E&9Enq}BHt6;;&$xCCgpqsJd zUv`UeL1efo@-oNv9Jwd`QI&qWu{^+^fq)nLDcR<|6Mh_$>sObpLuNICKX(RJpr|?P4}Py5>L{ThsOt#yhlsv|AZL z5^K+2+wz-vN$YZ7a;VF7;-v|>emyT*UD>MBT9w7eGqikDsiEKARMKOX5#BTHWV@*Q>5d@Ty;PK* zyJ?cJYQx7nghR4!rzYF!Zpff6g*v;!-r7{E6TZ$BmJ~R}+)^b}rTs2HRJ8>Nlc=;# z7Va?3>TK0ezHrZ7Ud$sd)<;k-5x!Dth2zO>WQJd!4zAVl_=>b&mWzwWf!t}mh(@$; zY8A-ztqCYDqpi|bz_6QQp4w2DNa1=!+zK72*D)8?j}UnG;E>Fha>2U(VgF#irB)w@ z1dr6FlTv_8Qp|~;QZ`!mC-Xig7_3S5?X_ex$-o%G7i~%Rg?A}j zZD60oNlX|b;9Uy#g*ag;GQvLLzGfp=9IgcZ{W*Xsxc{mqjIsrf!X${nKWqsfotH{DMM*Y;FRcNPVmhESGBfEG zWSK$cm0R^YYpmPAH>6QgMkVA3hnP#?jDxlUegrkhj+lJ)VMG{!bTDe>Ri*t#Jgo@n zNbd9SG5dYyV|M_QfyWb2FEJoWt+B~6sFz$~djv8*-R70+86s>|lvH5<8l0yrsM1)q z509>8-jVZmZ&!EwWuy!s#=e0V;Doxvu`_+ya;WJJT3pg;@I7XK{f6^O|M-sX9G0#j73o<*Zq=hlM;*!52zV7^fEwCr>5}&q znvtRZBJ*qXGC}&fvA!ANW6#61v?KJl`yre*+C`36#f8 zdR(Zv7Ns3UvqSRFZY0|C4f-0Ebs`E7B_@lN>N8!%$bU!N_a7hOwhv)h)XcjvEx;CJ z_>5r_2Q=M+77D9Hkqp$4O=(mz=y?_x zdI%Hz)MN>g4yFfasJ7gbNC{P9qnf#*b0rM3bCl9hN$u{AyGY>&HIpC*HP0wLl+Z0q z6I`#8czzBtcO7uYb=dlc#?*?8k9Z64fcjOT;Ya@|z`CL!7U2k}DKLhTL=>lQ#QYUv=LZ#~Xhb&cjFR z^SF64uO8q5vMlhW#=efVOf{U6D_Hd%Yu*n^mlt8#t~}fm!{F<**Td|MkvK)KJ!#>l zv{;0D1wVEHoSzl@J*#o=`yc1*P5b|-=WYlNM7sGUMX=NOI>eF-BpS;nq}0v*PS zSQ6@wGZe;F`KM+J6J_JnWs~{FenqiC^tINxW+y-eUpi1D81E=KU2H5m5h|KLbSrG+ zSrqK#{-#pRg++FNLP;F zBj2Ve#>SI{DY|QlOy_2TF>sUE0nn4+2tl$%xMzLZV@kA&ggy>i@Nt zbuw2oVGbt2VX;eYB=CHg5ny%b?}_m;1b<;W3S!;<1?BB6H8|w=32i8(6Fznu7&?~u z2m_-i<0bR65mIl6wM&1CITk!@FyNTmd3uq{Z<+HFDU3-EK-K+uE_Jk~UEB)X)dzRlULl>sytpTQ; zFW80jffMCSm18{N;}p} zoKi5tBpGe@umKBlZ|1?wy7D;N(o+#Pvc8HjpH(=&{-?XzOMq?H0F62BB7CW{%TiRP zV`^81cE$EJh|(f>ul;GiKP8F^Eg>}tw>hCF6y3zP58py3u%=88_f1w?Dh6qHi_=ps z1{zKT3L#)T-CHtS&YwCVV7i$hOXFt+doDFc<`MndcjpeR_V#?~+=e|BdnS5C#8DCu z@>*3!I9V90`#WJf((HL5H@8Cn}2785z<$gM>-9QzkIFpq?-y&ZG;z`CfJDo9A}G6 z^Ot5zx6dW7CS z%CI6TuW$9`)#F}}>ZZm?_H-DQXzUIAx*V~b340UbCu_t$Dyfn)d&||;<1z?7fkbQo zJ2kmSt9>cdDqfC-E2ZXN?z7Y6AEkZ^eIVyo1 zw;KO5iZg~7HCM5Jk&G}NQwK`~bXb=f#j!xIJJ#ETt7@1qhw9lR(hEuxbrv?Ct!{87 z(9=Xd%+o|ax*N?__cB*&7kQ_BKkH|g0C`v=ptGnr!Eh|tl=`ApNyN}p!_oQCHMFa* z|FW3-aBH1mgsnX zI9mTRZMe<`*tH~w>N9+i1#h^sZpf>kHavl=APRCt+>y+ojJc$-aUSf^8qCY4ef}f(#S6=tveiuU`=132nDf#KB)Cf3!4ggf(JETHuKO(IvTb(s6;Rk ztYFXlcsofjf#oh@u|;rIFWKDeg%l>%*I;u@iH7^D8QiG=N0e*#(CB<`4BYGtxViCH zK}_P>g0_%^NAkM28@J&eAN_e0N6bMm0POqgxLKQDf`=o{(*v@;Ga7?*IqTo1^w^?v zIcM@Q@~%nUD210hId^wYwE*;*WM5&f4n%ofbA0UbB8e0^2qWr8GUr#+{S!zLVlM4DyW|>h(t4HO*B1bmF_098 z4$HepU8YS-9gl<+Jt4+VCtJtvcUTT}1QYa=dtF@74d&Cn0)jpv1WUzjFfq8f{014v|G1;he z76hAgD&1IT-dQsl`jfn*ZmGI%JJ^~+NI?156SJJ}aqymBc2)EUtesH3bzUGkE>BOU zjiilBZdFgHdrbKru<~*cLcJxjI#t~}RB_zhRU&TJz&fD*F1e&^ zASpZ}3ppRY={cnp``a?AB|@w55$%pZ!_*FuGrqYzLh!y&70vS1j+=c~|zjkE7i4Y4E(NTKXd-je8>=6q<+#B7yc*NLp6XBE( zs>jG~xBpI-ljN3WLT@-~1>TEAk)dHU%i@jw-oY^D2AAbV59ve1769bo`!T=fs=;eSB?Ur}e23z;mmjG63^1VapT zJ^+%ZaOzE#rj%fn+b{m4>2adL5XUGah7hN9%pOioPhtS{_h27L+0G{>cCo|~9^z6m zR}TEt7)gP|V54=xHOWv{R&vfIF>ue4cUX%`vuBOLBv77PfvD%0)@wCB&U4w%YF!b^ zpa}ozLBfP;v#}!^mV5J)dZ^$J^ zv(Hyed#^O5=y({EIo9Z{OF9+iq{Ine$lY^BbK(F2Ig8F{L$rU~w+Dlx#0g}zEHdDx z&5pw?qc~)N29@e}L+~Lz+bUO_LyvddFBjqn%Y5<^!p&TO!8}&EPg#5QZF6j-yoX0S z-?-v5-}&Rjf`Rh7JDsZmJjGj9$Cl|nIgO6&D%o7z*=qGA_a#^F&XG*hZCRd1-S6Ws z!gc`Xg}x2d2`<7Y4cTMI@|h^^U_p)}ab^mdVjeR(ZqX0s9Fl6OU(B`AWLSu_F@vsB>y{Mq`)wzzv{<& zfNo`_G-R4&%8bV;CZaoB@3s17HMBWlrCK+##Fn(-5RVRm44J}Qv&=6O$U5r#Z&RZz zWEPzVa+hNL=u^l41{J<3*`Vtms8#QC2{sGHFPjy-O?`j)F@~l5qvQaL4vQri^;41ad$`%D#T%3N9 zkU84ckT z_3+LH{7IYY>1@RWK*VVp8cDs*jNb{UU=qwlreT-e=Q`)+4f2NQ+}U!9`fS`?rsj^8 z5p*AB*D=t(sbAMU^rLueRZ8e8j2qQV1~Xu@8hYmusOb@gbMEL&1t_(j|ETY1Q+Fq* zKH$RLu8u@?^hVwkzBUu&NT}LcfTObO{CffGsFXYPCekhefLbLr_2P*#-0EE$(pjvcDgV9tRl70x2=D#$2{f zBYGy%jl=p4xYOinzp`n)kZ1)!=(h>Uu z!u}9h+W0v!f592#lTRX^@m*2>QYApnMFyI_OqNgru6^c^*Pnwr`G(`&)Z{?F1xCv) zsvqbLV)_E?!c=(&SLqH*LCM{3Q#(QNh_k>60B8NI9v7B&fPo3QayiD3*xHAk&=3?sc3KByr z*8HY4^=sBurq?+vda~|8r(qXWjJ(DL3p_e zBn*I?YtG*$&&lZB_{U=;D( zxZ+Dj`A%#$CJkmf&T1BLGSl#$k97)AY1E<*U#MO-$vFR3oTqT6Z^yWnoC|l@H0xv2 zD)1~1F-|b3gk=mXwfaSxOiz}bApixCL>&8@~99w!b|jzLU9r zTOEW6^%I%%J5EvJkxL~%`#ti^dCz)p?E(V6K%D~9V%e)WSt~5=h9wXb87{Rd&{&xS z&cy4XD}4?_jXZ)2Wwow+76rPoU-X}ZAN^+mDV+m9U#UdAdGp9;PN(5uI!p^iG@nRO zoLRpOWHjCVP{JAe?A*aPTqI=R{nv0_^Oj&nO-Uj;MO8GjX&upEP47x?TuO?H;}fx@ z26cLT83kd+uw0HFNslL#yPRdlefBBHDVC+Ga|Tc}KzT+i3WcdDzc_ZvU9+aGyS#D$ zI1Z}`a7V_(Oe4LSTyu-Qut(@ewfH*g6qn0b5B!c7#hijdWXoSr@(sQNVYt8>e*g0e zwv4nqN+dY#V08ci=d-Rn+zkJ-QcHv4x~>H$;nl83-22HjF)2QMpNEM1ozq$th2#KR zj5s^@lA)tHN{IHpAsv{%HuEFwPv8h3aVTxQ%oEW6IvV#QJ0B;vgw^Hp1Px?Mz2A(2 zdQ^;}4MsY<8eV>fzO;AfuTO{tS(&yXF^v3Wsx#DZs4Wl=ZFh+B1m>lFnd30yCVR52 zEJayFdp-q;DvW6zH@VRwYD(2-QPXG9E3_6^gL+7G$hjq7@;bw*A(u_p);K`=92Ab# z1o-jasBEQv2krbr#TE(#MCgA|$zCN)9w_30sl_vd<8s(O#cBpCt^|cGdhfk9L|QytS{v+6Q(M+%1Hlofd~SQ8Vq4uNSlg>%xb@;Et66K0q5aPH&y}=D zijMp=z2$$)fLOS^q5p68lSW1#m3yq5Sk|@8ceL2rNmjk2J%f=$-}y#AAr@z7}J@q znC9s0tH!IM142|WcJIzvgeRMUrxSw*j0!Zj_bp5^psleDWe zDY$ccM9=xzR&NE;|Z?L-|)xilhIAhkZZWk#w6L6SSqli=BV@qsfaoHuDkj>&m z!zI_AX0#lYT5Y4TY+qAdr{Csm{#2zt#aM*~cuo7~3ldhG#z2W;C^xTcYc#SVm#gh} z1f!tnu8-(T6Ot`f*n$z1OjIJZg@fJAQgi5~@$k(BAV3V(VsM6ZOpz_DMy*;E@R(_^ zhXrH6?4&^rl`&jyLmct2BEyQetwOeE&cL|Bq?k);AL4u+OjlIW@)oUbEgI3!W3yTV z#OAtdpy+g1{qG$O)Z_fo3FExgDGRWHK@biXmlPbTt7 z>g?@cFRqmY1~$SjAkTG|^Fvx|cw&)wjyRusR0yCrLH#${DA{m$@gSPvmMUycnJ8Z8 z+t}!X(9$q+I4Y7Fm;>@IC^-}m$?K=_!4}T zgVd*|Ox+=pIq1u^VUaa-M0!1PBco=JVw#ey)H(Fm$Op865sBKWe5(CARTJjH$D#&; zkK zVb&kzzhhhnGBe2@!a-?puNTM*NJDT(nBpLG&J+zhC9C*&vFANdQ5a*SAl>5P#Ik3s zSS>G=DfA?l?HctG@F!%^9K4y!j%FOVx_+UiLy6>WFWZM7DnIp3JHWA$xK?r0Xo&M3 z(qa-&m<`?quG{UqQAWEa4VB;k@<`ajTqCT|+BUMmw!l^2w-#8E%AZwF$<17Imz@Ry zV=K*&LR|Q(){7O=$&}!}Yh_XiKe+0dV;7R7sLeRFf9#WDpchEoGx!W`RHO7}_kBJs8dd=lFv@uxIHs(zH(jHHlgHMJoAx zrK*{gP+3{iT6X6(IBeicuuzggq=XCFTNaPCIkg&jJSnMQlTqZ+JW*kugy|dQ9R@^a zF`SK@D!=$GK+0W4#`vB+FYj0 zs|)Pr36|g#TTz+~>F9Jl&;BA%gu6+XlW2~ohU-yi;&S);&nRL7v4 zKZ$n?B;XxWiaKb7zb4sn9bvvTk#w1rll+^Z5bY&39Bv|MpCX{I!8cMF z8Fj@8(8u7Ae^+-JMV>0^y$EH!$~|{ZCoxR!N|vE)VB2=!qymlC<`Mhz$;1+VnI?c! zr6yS%#27XWAF0v@2r@jd7rjo*24_CHaH%g?shSsM0d&tiK0x0|>imsu@#v<5D#GFckLxwAK|CD~2MAlXfVs$5_P&|wprbdUZGXzfpMNS!v# zQC3fOq)V&;zv z#fWE$XrJvk8SPnB8u;M8)HacogF=OUeW@|1wC;PhU6vL4{N0>$=}4W|Or z_w;hZkX*8V_@!oW43l2pZPgQjrbfj0%ei}{!Nw@UhbTaD{i<1CijYztB$G45Yj?$_35c-!{BK`IReuw{0Fl%hQ)Ov@uR z49L}NfcBAEChD3?J>v^=H{(QA@0@m?`IU<6?FFyd+u||ghy}~ z8%XR^Lrud&p55iLzZu1|En+p8=&RhAQ$uRp<&_Pq!eM~p;LBGCb1xG%bF&NC$rzID z^$-7=`QUvE*X+*Dt_qb{7t7dYn@$Kp4P01E0AI(ShwI#I?pPD73b;BdBXer!p~M&I zNr9%jQL;)~kHX^9A>A2nx^lrg_pWo;OxSXM61Htz$L7Hl$nn_F3)1}(um}3d65Od2 zzl~a09R<%Qf%5*@KNHh?*0B=2e5>Fqf^TQq^}W&++}VO&DpaIRL{{XA0=Bb5GgYF6 zfVrQTWf2MxDxU9&IA^v166I$do6)SIfg{T{#3vTxwvb6t_TciJ%O+%RuU#|ypEyIc z2eB3}I=dY7xJ>Pa_JFI~23yI9&z_>2sJ!caVGy3r>`|}s;j3s0PuU8#)ii$Ycbs^t zJ!DZfXW{&Z4zrmUZOPl>2={9Gn2p2~fQQid>tkMUZH2r4wP{OesX>o=I#(tRXH)vx zX7nFkr#kt2yu?xY&svdjD^AmaijADk@=EZVqtMmi(-y|f{KO?h0RA3(OEF;}UU@}T zdJnxjUc{cP#y94d7fbtldljc+PN(R-Ken}(?#Y8kFT+nx-yB9k5KU*MZ3L)2fH$o6 zM@_2dZDlir#X#5wFj-)zY)tE5w)k+x=PJ?&kQ$VOw%woc+U6jV0YquV>u)H0-z1U-BkI5=|$N(I4>DS0lIK z2P!;)DDD&y31fJnQzyKkiNQPffT;6hxV)hXTF=b6osfmDW959lz5*yy53+hJQ@rIx zXZIZ!rU-ulZgVaLlF~W(165z<-pRvs>YfpdV2ut6z@T*^F?NruWIrnN?D0oztWpyYso0d<@5THYPMl zbpj*b9OUri7{yC;8MBqw0RDaw+DNn1{@YQ=7>XatlP6)=5z)+HkxH@Z+(cLp9k@Sg zj9v7C8QG2aR#`DtS*}+Ph3)#2f#~1iv0e!2`P+J~70hgfLxml^5Ds9RJ*(p(9g%T@!MXOd2yKf_Oc~D3uyk!GV=}uwT}%za6sd}6{aM*iq%M6d4m35FCp|z@qI^m zQ4)s2aHr*ey)Z`3eA?Ul{RcYyVT9RXz{;-C#wS=uL?a7(fVBR`zKo_vX;;7g-sY4V zqtjf?eF~-P{WLxPptiPF^U@3u(Ef;Q0dqcShdj961P-ZAYesuDu(3n+o9R0Gc;XS& z3X92}H4(@aVo%}kNn&b>;NO$ht9hR%K0!q)v_Av)#upfJB+R3#)tMJeP5;D-mM6i) zq3}LW=p9Z5usNY|$~B_)VQ;bZ(ik!p4Eytntr}mo;4jIX7u~B^$&hR&G+B9 z9cFSYL}6$Yg*2t?gc%NraC67es|%{0MzsOxmV1~W0HY3ydE>+#v|N-sV!D&1(y`NM z?=dpM@AqFfB@zrlZxpXrK4b2(dO z02Gyy;^7o$Vk@#zRTw~wadmt#{nG5lqO=-pUZ;7I_OF*!pcf8Lg5gMrMmc4TNmcREY#=tRN238%O{m|?e`9yMnBO9r;m<<}3v zQAHFs0A;ZS#WM=a3)!^a&ZJvcG>)r~>mTOgTY}NmdK~?mL+!tbWRlptV|QQ+ccKU9 z4+lfhtb|Mxq<^*24$ZZL@{y+u5(!=_w?j0K0q)(5j(aEfvVRAop7gO5zGNd;#00M2 znFIQ*R)IHHuOtD(Rslq+cl?&Fz+LceqlMZM^qrK^A%A!{7LIEd8iV0@b-}5v34Y@n z^S_~mxn%YG7=Kf=_mfX<*{%~~GZ$kuBi9&Z{?gxhF+E&2ihXS)b>}4=oeXpPMi@Fx z1OD8}MUCOLR7|$vvHS(ELfv@2!L`tZd7)f_A3iakhf=VrXnA+k7L#Pj&+q{+M-`4Y z?hdOjZc?0=x(<;2F&mxQKYe73Dd>7NNtRJMuc=8?k9NE%X(wPecQc|BKGUhQ7Mz5& zKOqG0z9XqotS@F}P?l8hpt=-Rpb@nh0%WPUa~f9pY`}FYc8_3hu18oO!_rg7VmUg` zwbPvPg=QN*EC-~&J`>(uacPC_ny>^&ety%1IhNKS?hXJd*rHC}>VcpdH~Q}?#_J|^ zpNg{a;ztd1pD|6RfGG`W7Q{MJ>`LQW{4figAc^YlP?z=c*_&T4JKJlcAH@FU0D5O& zN!#OX@TH7qknNy>9Rq{YOpS{!@r^=?YOjIbY66i|Nq*NCF)mU;qaC^# zifF$*MeJCi2e&skxECbrj=m;Jz&oDKt*72d$Hgtom1n5;7tO*6b@8*-BwX==MJ}tu zEMoJ$R4!|TYWej3FimrGui9H0ziP|jtq#{`q9rXGLhS+WrSI5fL5(`TzYvWzOX8W^Km=_Me#_0M7r%iM4~9 zxr>AGzmWemu+ZIwVHNPN0UY~3U3dR~7j>+iRPC&t7)|YrU0uV}WIdN8(7z~~$VN20 zpj8HoD{%>>(Gzrt!^i>b5F%FA@?IIClqJ!TY}}&e6RD#mXJy%6k*`Q@Lq%@JE}N>I zH}U6Z1RLO3)56i29q}EzolFRxI;9wd>wAb1CbwCEb4(lbB||9 zVN*W&ZOp}=77Tg|_a{0T&9`A;)jGWv`<-Fla9s5C=uT*ch}7<|C;C`cPVgi$UIMq!83)Yl}0suK_y2m#Ac97 z1cf~X9t?*jQH&p6!@LK7@|}JtC`Aa9oKcK+!{CUcGr*$zF;wVSc)Zv~Nh30*su|6( z8k%bIZ>~YxKoj5~^~UkRCt}GslTqB!6ya%5$DG?Bl5E60<#$44MTORfP^x;J89odA z_+w!V=Rqwy9r7F2q%&FNuWS|5joe2+g3VDFKPyvwG_}Mvt@c4BHE%D5N=_S66*wUc zu^s|Hw@WwPKa%QC9V2p2TqS-?{@8`x~q^{!Gc~bvLk=cDa9_bMIy`Z zi_8x0FMHgx@PD{^$L`F+rE5F3Z9BPQ+qP}nPOgq^+qT*1I325_j&0j-Klk2W-aW?p z2j{3cYSlby)&(odZgI5SZMyW4&tHzqO+kUX;jxFv`#B>b`B{uQatg>+wz@~d9|9F( z#Dc|bLTX4uWlN5H%8@F6p`Fnxcr&z&E!$C@umga6IA7?a(J7OkVIR@EXC&*XobilY zIH%rRQW4DJ+M8@6L3uR+p)Iep4q~nRPR3~H=T5Mku_Bz~%?n&%PkwQ%jhI)*$OtL4 zxTFE8gcE=fQ%rv5x!@4X;#=NFJkWa1+3L{8%H{ZXxkFi_Pq{_03pwVJl`#E~6Zd4% zouTBN@)YH;mXhBw+akZk>%E(&BlC?T<{?-XwndIZ3t7fK@L~^VYMNkYN12Oc*{IYZXb5jMAIl}bIP1zmV%Hf z!2cJhRQ}jRXbRl}c1h30sQg{>;BYNUncM$&TOkc`9u3gwHPUUr8^USBkNKj@+QP%O z{B&`0)>2otKb&!9#Iy5LnG)GK z&x;#$j&WXBznxIPf8Ut^xUPn-h4W45w${iH$wC(u+$1Ukg3i>Y z*{B&uGY1I(b!h#|I8IvY=y_^cGG}{T_mlrQsN)OviE@>-Z85{M9GJ5Iz}F)qW7^w4 zwbruz_-w%SE%^D#@}uNMMiK;_)o=(B7F#Scm6_5E?|R}!B#oKeL{kzW!(4yVkM$@K zh&k39i-KjYKcL~#ODw9WTp#9aFbIvN%1YKrYDU0C>AxCf=uaU6Z=$j~5mQ2f#AqTj z8VE`fUL5+5yqRF{%42DD&C0+Hu5efLQe=BU8>dJ3iq+UbSl8G*Xh~Zj>o{(c2%#}q zny?$ioL(OBi#zd3_h?R12lQkz{?#1-?wt0tw>J-7KJZMsP9Xi9vhL3EU|-*T;ub4p zs7C;gIzIzk#;0?#w`9)nwmV{t2}C=VF`YmWd)-=lCh=d`lTVTOF;dr|nVdRmTAti= zE@ms7+^3)3XpAB1wY7p#oBmm3?n*JtRKwR6?GmpvKpTpO+GdpL#QMO!V$g#GhHHoX zn9e}R_gWxIpzz|Nc62Dq@0G4uQyZ#~>5Fkq`z26P*J+C8?#kJeeM}$km}LRmQOPUU zt)tu)on>^?j&B4kru3*ASB?d^z}dV%T0uUH+;=O?0sP|hE$gE5j)P^QY_%p+nG20U zLf{nl2`2_Mx!o`q=jA?ts|e^o+!|Aiz4F6h#EFQZf89!gkvly`gISDHL0-(cWuE@r zctxK!D%PG@$YBwN*lc==TucW{UFbR-LMjB>UCS{KWf=%Q4;(|S^ow>7;zU(RVK5)u zRkRsM4can>f3Onf#!$cnW1H8+dAT~F-2^x-TJa8>zhWJoZm{aQss<#`Xh#mxXxHwn z)OUd`T;r&?53X;(m{7kCk3B{m0rWr*a(g!@`1s@eTRV96cTLgJ1*D z=B`~E@$kYXPg0jcF5O_kx><=TKW}OD_VG;9Y5pi`Ye`b8Ht2^LU`iorTfEuDx?(iv zoL3`7y&y?F>^6Pk4<9*D^+3_H?&3!E-dCDJkJ{Z%AaTNC`iN>Ir`D;tyW-e7iW~2a z^OwC_9NI=&!|I^&r@+F&atYjx#g+MAh9>Pj$SYoi?v?gc%C3|L-F zB@h{e#S{~W5(~E zC0tjuqA87ryF($+Z|WOnz2u9|xA^NOo^H@A$eN@#rIeh<$XlyDdedycI?)G9>Lg%x zsq&lYp^5dzeQ0=7DjY(uP0_mZsAdowjJRU)!LG^>n1%)#Dr|A4PIU?#t zDYh_x+l5cuGt*CQpBWObpDuoGTB?0!9=X`;K!I`spIZ^wn{%+QkXsn~Q$sFoj8CSQ zrC7Z2684R9IDaoZG%++%+*7eD6L+h;K>XpdYH81^`1QocAH8YA+4~ymsft|Vq0a0F z(dYRI{@U=@2GpJgK_>1ezClUC=PzNrN5X*LMBQbWHj$_}%G`PCRWwVsiNY1IPb^?` zqVXvkB;795P*$}3uE$Vt$;9O#$mlqr{18tNV=&y~<{N$7N~hrFd)HoSVc#Grc2Kv7 zB$F6vtp8wv)qgIq$p0xQ5E>R*+``ht!`?mR9ES*4rm?MtuYvL9$eDwfqaZCNS~Lfy zYYUTFsEM(#+%C+{o+?WdshLOFrO
CzJPg&1&C#S}14UBT4n{?E;je=leIwEK80 zX7l8KMhkR@<0ecQ@8WviaO=D7IlkDmng#lU?Ew6X$fKTh=fYV`M#IKW&1WK9M8+g~ ziA8{L8N(A6gj&p~0~F=#2OR!|eo_W1_SQ%f3G7BLH1W-wZv(>3L@xHCkpE(-=;_A9me&l}Za=a0o2&t2qV2@Ssf z)2{fBn*tm3Zev!)kb^=_Jn6usUE4Ppum&ImPh&qyt~32`Tbnh{hpw4Lmf!tRvjTlo zu^#6oH&Vq?N|t& z2c=jz*{_3uUSontjGHMoE-W;I^8noFtuxu`M`Wh`N)kZFyb{4Jw>;ACT6~3=W z@4rHelELn8x}&zieuL|1`;trgEL5#n{Cs1X;dIZMH?u?E$`z7~g?YyRU{e%f+tZCe zJ}sGS{m0NS3b?kTm~{;G#KSnbS z-OJ49#;7n8YJ1H-u9u5Q#9DWo$}FZ$#k{XSDH0WVNNhG$S?iAHW_wt0$b`5J3l2TO z>Hb11wy{Qt>?>lC{&LKv@QeNeEOv{Uv9`db<8BC(u(g6xme`ZLNJ~B@Iz-4mX+?h` z0$vDNK18H}XhbK}`|}Ztcff81S$!%iFdkvIvuUcW4w!jtoNI@!Z;p72zKA>c2YDwy zXLP!?cVv{Z5n-|i@K%Z4FI*QEgyegcK~fmaXmbxZytQ8^&EGkVU!)$h^RqbN+8|~O zG;0=-Y(IJP=|e_*)__^x174=$2BsqIw`J#^*}4%H_myqmCL`C z*{Z}l2rTgBf1I3EofWI}=At}%zgfsY87x)l^7h19<7PjU} ztE!GOae|2`8R|ZdIIr=CL#kTboz+m~?doyEEyeoh{SsEZ1L^Ii0B5AAgyZB!}9{5jb*#E0EWIzoEH#G^2z$dB) zst$ZS(=zp1^{C8Jhh(z8IWlEcW#)h;CuQBB%V|a5TVJQ%uBHd%S6o5`6-xr4Qv~1- zTxjJnH>hGblo2V^T&?>sNB!Z@csW!Ivdlj&Yr@F&IMO?2hnMJt zS|0jlCwD7#wyd+v%I-g1>o1~`0dDyDmFlG#IqqBp>zHLOVEHWslR~r1nP-vmOe~@B zjxwwd7yv27l|KEHtzhjI8%h;-1rsLNSyf*%mRixmpE|QYJAgbY_bX-ldgV6;2|-34 z1gDtxDs{4h2YiHi8|Odvu9)P2=~G<#4S!m#x{!v()w{j5`~j}<4{q-vzr|{cKd$U+ zD8TUbxDPjauXPl&gi*m>>rek8%!B;WPQw7&Z($!{s}-XiRPU>W!{@!8XYN`HH+V8N zgsX(3Ll@%4`T#qQvhJeGGUG4pEi|AA8g{wISRUxBezSz(61ET&n8ceA!SiDAq&pjo zA;w#5n4j3qeyC12%Ps6{56}^&Zz|;NyIFY0>~mf*53eKQB3Z3_Lms*bb8tf}tG7~( z$xz@ne>V{0#9!slwX@76$%HG*st{K=W~Ue}nWx2KaRTY1|8NQ{ZKwkxDD)E5a}OqW zaFC{FrZ==LxgVPYbBZadv5%u${}5o-p+s|?BW#`(UvRoyBlWdSCwLi0oiWL)Y1WL- z^K)1~{aYJa518(_AlO8H9Ha>qbCgu|OW49!D0%#|dB2%g9^J-WR;{8cuHQ10)z-7{ zphv)&9ti~B2Gqhk4c-q^3CLGH$OdHx7C39dol+t!@NGyram0)*0mx_}6b$Ij4pwCN z#Ihw@l5pQZbuHnGoMaZ6h0U-{evEmCND}>qQrrP#4^_9|6MazvS!@R*Lla;ZQut-aq5Vif5S zQfJ;4@IRkvSGBI8VXKUl=CL7P@ zM%K+S$sPc`Vrb+!E~V0{p?~nI%1^&xT927M9_+urz!O5a32d2}WuQn$v@EUR?f=2l z9b%}66|#8cwvEDgBAk_?jEz(K3N+WG)f+f#HW-YbBjgx{#N|v+zy4=Z7SX8ww)qbU z`#}o=Li*oYh5`QP?|NDn*8l&JVSQ7sPE=f^xFpPx%ye>3Fl5GHDrjgh<^%FzQ0l!D zT;u)bR5KeUE_LvZ8Z}GHb@fXN%VpLUV3H$@#cg$a3krJgPkk#-I@@1wh7NB+$6IU3 zEDO(X?`=N=~&cbiX;)*hB8AC49oAbh;(Nr4Jf`a(J^n} z3{Q)=UK!HP`SoXOhKrWKnss-f!e*b8$@$a;rTkYSi&PG&ZVhT&TVAjt@%1nasaFk{ z!Zlg!QHCU0TBC{#5D4MC=z3)i-30y&0Yrg67}LOs@QxhQ{M5H<@324xl&o7<#6Ej9 z4jqWzC<_|yAmNN?gx59tq%91JGBCDwcLlGs)=<0V4`Vdqs|nQB)OqUf99^6f2K_L%#!B15ha_8ROUFzlV{N{4&4d#orrMGOc9ntR z*V`Cz2$FHywE!G8L=sjX(7!!S3L6BhgO-g-T;w2%=clWy^Ic_T??*@V!gf~BbALV0 zdLI8K5)suRX3iUXH|AG0(xSy@`L1r%M(l-8WH1A?*EgEWE9(6Gq}-metA)ZGOdXzavrW98z+OWd^#%h&fRZGaWdKn~W)@ z)cILuZqD?d{d4o3-CXR6kA_x3i*Ygj=2_BGIzoxHUB1C2-hmGcG&+u!81De5E;cn% zIJj{ae(*&PhIdh;Z7vZKaFV&87dOC#hggEEnXO?o7yN!a%*o1CND36YAws|>yxk>~ zY}MOFWetrY5Ad~aAwrC9Lv+s;6Os14Q=b5vRrofV(S@{Yc_Z81RCY8@F2~NWpke!| zVk9^Y#@OkC5wv65-pAI$f+Y=PzTqdwUCB7=Bdm@YV+{5n;f_@2Y6|`xdrpHcZToAQKsM=e{;I;%}a~<$1emQ{c0tY=Jhi{WG0BXk0};V#K4K zhRnILHmeSZR*rNm0sSXY;Z!FLb%wk27=5a{O0@oIgIe_d3UEBX*`0z-CaCGY4;X}v zjaL6WTiz02ucQw8#`!X=a?PVpxZwphCx^m&zp2`BCp7BXd6NVK+btuA*wUHoke(yeQQ_McAtEu%l8E7|f+%m);k2J^JE zYSl>y4+gWdgwiYzr`U@|5bt=Plee_UO*GKU+4wPDZ$T$Aei{?uzIY;Iv-f9Xc>+t% zmXTqd!~-IuIPV8LaI5y*oSS)?X3{4_s-F{oH*g*aOB=o?gHFb&%=k)r>a6>Yyh(m1 z+j=|EdgSd5g%LhIH;`9NVdf+KjFL+0q4y{EA*}e`yr9@HU$rG#kK~T6J9U8K?kAqn z*oxf)vq15@fV(on?COT@O5KW?Sf{Ez!NLnvpUQ3y`xpB*u=W<;yPjEoOmmF4 zJ=0Pdhw!qWKmp*)iXSx2ec%@rm&pUa&|8dg#L^PEgLv+MR2& zaK6PIMv%iio1BB3>>19@)*pL2ZiAw*i5=%HKl<+A$OxrJYS)jWFX30=?dQjjQDjlR z2e3HX2eG##;3)F#ko5OB!5^>N_v)QwxBl4;W&F(0} z9h*`waf z6lUENGPuIu!tAUUD=!j)bm18&VPBwxyr&KKIm>xptWEcb2lKnyT|1XKzs0gx>Tf$j zj|21&nBXx9&|9>IZ|Is;!2IqKC}+2&jRAnX_Q& z=IS?>-@g=n%YPB~5g}eh!sp_BmnR1KGsTYtD_05Sli^f~yuiCAS>K@b^mhWN*nJBE z>u;Z5-tm6TIFY=<7uku^tguhq72Uc7q6elk0^wjXVPCcOJ6;^tfo!vk(s?w^(V||% ztUU_UE$lQO@uNaJ#G*ifO~4X8#~121H$0P%yKlVjzybE$PY%BbF%G`q-LLGn?y4Mb zS9YCQ@>4VN&i+T z;Lwrh$)=q}5*}ZS_GuYAe&={S=U^GI__l|v-r}`#%>f&I+Hg(6G`o#JQ7l!ucC^}n zXsWrtn}M1d5WB<}`#Om=dUgmr#8r#i-Y+2IJCydVvs3$dGOl(wOnI`b>;l&U2U@Ds zpl1Shj!nttDzK2eYiIR~VmZ_isd{n~2xCFj>I~&;sc1dvns-%XZJzK*keAhx_xnlU zwLAO=Oo)8BRffg#R;^Vd9q|$<_@}507MAd%PIWT3Epu7n0>eY;o_Gsy=@@V9&vJiS zdkJ{L^q31ziY1$_fpbZ4!TRi~Mm5lub)T`wlWeVY1wmfiq!dmStEG=DWGb*o@esFtzCKxSo>VDBQYnX`7u4AEd4Yj*URb*An2FxL*M;V*U3j` zlvdyD5NE2Bi`nd2gYu|y!rwLX1cav}W5BUf@M4C!*GDFiR(X}`q;r(f+ygn2<6mYE zT_3(&r0!+mv`6vkc@jrmiPV=~r1Lm>U(E~x6Ga`atYN~4ih6EeMc6+Bo}v48t<|Z2 zLVOU2u%iMQYk5XINB-0&%a*EUy)xSsI{ii|lOFI7ps>_!QJ_h9lE+@gsyf-|B#m|k zEeEIsIBWOSODg{6aQonW`1X`{zLfMnDO!afmZ^5E8L6#B9GuIVNbdKYyl;t)aAM8= zln+Y|{a#%Gd_e3|!NQCHsR~w)54c+#7P6-Fs09960XK+JQ4y}=FM>a3CW>Mm)Os}O zgy6$CuGkKlqTOU@0>julYHjF#p&KRz4)s8j&6{lI_G=*R3N7!RpJLDzk+2wu5Z%pl zxC4&fqi7Q9hu(agzZDeyD>T$yH6BeS_~heNTm=Eh0iY$&M#XH-_PCn~I$>do z$a5ig4L*w$_zYITN&GzMwcHd%5%!`XrHL=^Mlw)ESu-lG3KVU@(KcliZBx97WE#o; z_nD@kv5^*_13UQT6O56?*MbNKuF6?lpW~AkG?PdkVGh~avS?j$5ICxC$M4p1Qo8X zbPuU*s?sI=JcLAJMHh$>Z9(6GF#?mIeN=TWbE*gikanGb7A=kUTtThzJ=1lpcmzH6 zfeX7b21G1h#TIzrq#Vx=@E!G4 z7oT*bH4)>T)_&Rs@AOr_1=Q>uXeRoknv}ycAdUiliO)|=e%X8E6d{0SlKHNFwj3y3 z3DJ0;MB|3#x65g&j~l$S_jzUA0+FjWRh8@anHX zJ2PQZ-7`Vl?!kRBjvCHAcJeTRUlHtW#I{>!$hm%6gpEir)^gXFwaPUP;0kiLS%vNz zc+-Whu5w&k`9KP)KIpIE5j}fa_e2X@ealmXWE5w+)^-F~~1?CNXf%Os71V@~d=?O@H>)id~o}DT8FYe?F&&lZ8L*X#A(J zc^tXG~=)m>DCgg?M+vF z(wQ6O$;FvjYaOr1F+t%KuLKG~iR3{h)%9Np4tQ9--gD*_bM0$~5q=ST{|OogeqAoW zb69le9M|Q^;v5i_umagS?&Z$k`W;+QA`sx!i5;luPWljt>aPH;NjzNwYMu-vtrm^b zk>yKD^Ca~ZyLmP_3omP*hq)|_*$q=M9gNn*SW zaHFZaFhaZ&D>KK6{Z1%JLQSZC324Z3VvNX_K&l}sX*c}S=Q%nTRG|1_KRDaK9JQzLz>c`%DILe%0hwIbz;`c^8( z$NAUKc@p`eNupG>6oCQRXU;3bee$24G=nQ39DZi7`$Fq|zYl3>CC7?jA&{~)^_r>-X z)A>~brtK*yTQC{)Ao#hlKpk<>>;wO&T|fl8P0QyI;_~K+$FLCi1%XSbu?5;hu$(g8~4`p9^JY6BK=&OnfvL(69ittxUVUQats{x7&Ox3$==!pi5Vo}3= zQP5id3;mnjhO!v2Vt(8B2*R8bt$%wUSZuBdvIlPI`1+KX`CPR471DB0%2DR@4XaA) zVON^$TlyPK6mK^iC*a=-& zh1N+6hOUcBUdj6;DWzrs7>=b&leLN1}P-Z?%+#=oZKx`Cmf>?@^%ekP|<)Lk;n1(|1DakT#w_mtm4$b zrMLpl5CKrNh6evatCRl?&B*>UFk?go`uJmL5q|ewuuPhR+0Yc>TjSHV%aQ1acA+7` z!;VKF-SthS#d3dG^3skn->N%aKEx!-a(T!N5M{{mL>z)V1ESK2+JSToq z8+m)5zM$&Kp`<*zANRZ8df)tYef_+Z|9&lo46YppoDqR%AX4S;&4kX0U`LJz#%h{V z5G0`vHink4nwxvO#Qt(b+@<9ImFi_UIyC9SJu~FMn(Q4G>)4wdv3|UR)EoWF5U|hD znIdzQ?80S;KX{(`@JQMlWbspFH0Q>0%SVp#YCtdR#-Z2WkJ8jzigM4J8kwAQV{-j@ z+#7ofP*PAQy(hrmt2Ov8>J5Ye62t6TWQlL=dOkxWH0V z`imC6McOiO)MnaVtf+CFg;OzixG4)1OM1{xoFjsz$)m3XFjkM#wEa zAXL^Y*ItfOK-%(KgxgXT3y2$2MUtK%oSc@?Lt?f;yD9Y-Re3QK0H&VA)X;H7R*oog zqugDx6T5-Zh4{Sn_|aB%#xYmbwg~oh@&;B8K)z!~xWbU?{%~hOW4b1?-DR1!8Ug)M z72!O>;6K0nQl`R<{I5(aMQ1y=`cGF}|aEBWezY{n4&Zr^o=7y~bR) zC**n(rA}BiMyv@iqkm8}(sBAkQojW=c0V>a!a4o!uQ?*^3qnK3ehVDYXlU^4?TydY zJ6K=kj@(OgaKlawT3`9jId{bl{!4kN6ox;10^JKI6@|alfY+@+kg%F;8zJQO81nB* zeh_Id0s4=kP-5B_7Pn6bp|l$|NTD$%jNCCM%n!H(+7}LBV98EL?YEaSisfGpF}KXT z8!6O|3p0unmk+~1VvG+|C7KuXui71^7kbnTP%6^u=?R=$-$mCmwxc@V>U_A$ttM+U z1+XGV1qD4zdYMmrz7MYtv4NCKl**iFL$6Wyhf+@3R5J<2ivtp-{3>l3KUzzO`dn0Y zuoVN-sG}5MzMa9J_L#|_?3q835hW`7%@_Wu`Y~|D>Rv8op?@>$s^ax}zyKC}4r@d_ zbwaOX8x%EY*)4Jw4L^AktvAc4+7{??yAie9WgJRbRLd_F*Cz&Yam3;e9bom*X;+@) z-o4859cRI(IWpcfm6iNFXUO?F9x4Fj`_?_`RzJXiC8MUg*^Jd`?i!Sq0g#wIEHN{= zYU@+BT2rO%nJGWV@9Rys?z$Le^|B|y%%2J5`0xx41*hBLnIa7ivc$e@Y@7Sf&UNm~ zb?g|!hd)?(VPt3xaYK(G4--XUkw&|Ulv%OURD?W?Wc;-*n>@PX$VZSvEy|oqdi81w zI0_GeZW}g~XpGu1{dqmcmSA2l#e+2H;c1zy4v0DJE>Gni2jI=SWC4zJ#zij&$4iu` z^iW9Dq~dK#kA3UK85S}+SfcKiEjb2*{GYcd3)J{V4y8Bz+bB_zc*=_ge^t&L0vGe{ zplZ#)@vO}HzwR!3^t~S5WOn^3cVxH-4bRtr={bx8>7v6%vXhha)+UhnU)NTx^w9)= zMVkLWU}_(#r(`=|yvEEQ%D$A(8yCiI zlq8XPa_%co#PKY8SMX!IBWn4}h2cyW$RAvUtDwzqBU&SLF&l-p-^nVa>xPNSZt22- zYN2vXC>Svk@oCjK9MQO);;G=Ywdca%;GtANKZgecJ+q@5glfOna1J5BBvv&%q#M$MBbA%-=nL;Sh88@(YCR?&V7fz$>iD=sBdYDEeUY|uFc z1aw)rB@KeLYuKaG_68=C5d2=>E%9ck2yJw8luhqkUhul))>IQ*KDbj^Id{zGjcE(` z@EE~aRuGO1A){4&DA~F;J$Ga%a)Boc-Nq7iqTcO@U~WrLURSb~ott6y+~M9m_Y_@~ z*$7=c87&ci#PM82@5ELzDbS7t3N{hFk7yF0tUJeWM~acb#<5ooO8)93W^qAsxrGs^ zn>7>WM>61#61inUh_W(PhcNDX5k$yhXCwpkz)n-cKKfNId{6*+o))wcO9@Hx-eLAb zZ}bVphtW?;)PhW0h?mwt_XHTP2By{X1oYVrr?LZ_Ho6F8rGAaviOAUrd`rrd%2nKOj%{pI-gGU(%f0NEg1 zp$9*(e?~m+Kh*s{;3SX{1}Nj`=5AtdFJ^6FX7?X6FD>=|5{|>SZ8{9PH%05VUo^_3 z_2Bg2vQb8GWFn~~m~69mHX9KvOl-y-Yre>xI_JcT=ZEE(K2%28TGo+e5!n@Hr`GbG zd9K&8Hva`UeSj$sn1Q=sSY#?G(~LKgEJ_es@G#;^7Z#gk0SBzT{l_qw^df>yn!9JW z-6m~x@Z;(8=fVuGIti8R;kJ(vb(3HP?xAI6gVOHXj8{h$~xZ zdp$DV`)+WT@2r->Y$xrsgJ91?#uDN~t-?|_NaD_{&+7>3ST#Jd_dJfB^}L;4+iUdO z?5~!)j(_v_0xO9<70v_4+G$O+rwgu}bI)!o6c=rT%rbFjW>4 zLgfjHj63R8HyD=7Hbw~v=@Hzp-Ocx) z94BrfNjIOLEd7jD9l}q)&Hhj=C6#f}i7**L;GX`l#I=bSg*ZGwau=o53zB5(e~Eg* zq7MxD(y3xpi=E`N$I`NPgsO4YU_n?rpb<@qBf(Ha1>-_pGnQU0W{};-NGqV3DG;Vl zS48<-01lZ~LTJO{=?Mn|Op|rsvJlNPM*+gq6uDJd_MDw&q~f> zdldr&1PA~DA^C3?4gFu+xlZT*+0IKs)GfW^H>+Tv;nOOx=9Cwc5JjXAu;D*K%YwRl zDVWB8Gq@ZfQY`$9UjEru*9KVLYQR`2+O5S)qOId{ z=ZKPB*qg26V-qct!$K&#?U)&@H+nMwZWigEF84#yx11@AD6-=H-qOQc1_F+Jb)NZN(?X;q1#R*%qae)x=p0 zN1yoq>>DjDKAL~kMYlYA--gn4Bol9`PejAqi)>tj>B70G%w(jvE$>vi!x@Jql`WYh zE6|223yj`YOVg=#+j%Csdld2fJl$zSxubnI*JBA^lLhlnft5WM9l2!f&*pjAP_s)7 z`60VKQ6@_VRx;YfF)cP9^4lj*wgL7k!F=lmdnKGY)D~B%!IKMi^t4A?G`@hkTf!#k z4Qq?+v(`pO317obcRWog4)It{sn9!GMIiq2Vf{dPl%QfKIA0tR8dplpd-rTh_Q*y5(+EuF8DjGKnpM{?4 z{_GGS(_Tixc#9xNiIzyZY?#&;2e{`-*tnEyYlp6V zKw{Hgie^&NGOT09_0v zRRw4zN0#6NN-Wm#O4N4c_wCrff+hXfzsMFlFD=P7mhl(bmv182!S~d)!rE4_*~4!-F$2!=mf1U zM0fgFpwHN&#eZpYZj8W)+-bnJAFq9b;Q%cBMvcQa;C!33~%4ygE--1>L&a)U=Tr)1R#Qk$CB4Se@k3 zfrX1}vEun=Qyx*BrH6-A&co%Q=xL(}1|)1pKb*C5;{I0GelNv$197yeRP&g9uab8; z6K(hAD^bNhPPH+VN=p>??MxP&UER3D%@De~qvhI#>%5x>P<9SGvQgC*90msjwJRyr z&b)(Cz3g$C!ngkBy2vDpaxjqK7l?ImrblP5FL-q8??=ET zD>k_0$^dBjvQNvYhW?DY!QE`Fu(wmE6T6)nkca!ab{VLLDb6Bp` zk-v0NuMrjTU{lj2iA&UZLWgQvVTweOXTPubO?3948Tl0qrO~3difO_{yYO zViZxM8cUcox$a+7K=>>&FHY)65zy{CqObOu?cM9M4}q`f8Lyk?q{iGyoH$_NJ@Tt! z-t(OS@AmYwbc@n4QJ=`Mp>NXZ#$sCUz=kS0cL@y-kbD)7D`h}?1Fm?lE!LUAdbqoZ zA!wh6k;mDxkuyLOy3V^1ky>Q#Vz7zm6lrFr{yaa5uFR;jZTi?m`}ose_}H&Y>6rM| zK;DW_Ba;1^LVGx5K7lG|=K1y$kND3kXkenvV-p9~3N9>Z_L9I!BYY}w3i;F>f3yC6 z=mR|uh&)ib(Ihib?i@3*H{hMKxNMvQdfc9`k3k>J0lE=yS1jq(IJD{rm7~Ch)f#JE zfq^Kv67GGt@YjIe;6#jl>q57sbt~yD4%q59qaz)GQ_CWfMRSfhr4z z3r|tzBV7)e)U%MAlNN4uCxYn4=y`ZD)*~YVh6U7$)6wQP#&l&BYcqEUBNg|-L&hXa zG|7u1%6ibLJvlFD08V+?N_)Xr2W&MMkh11pQTsq2RfPJMD@--HZ7t7nV7sMMG#;$B z&%_5$(lKi9%^r$p67JD?g=m$O27=tRO$WCL;>-56Vff?d_N*~iLENqS==cGI^Z!nS zQmqWW-g|t}nj)&_&%auI)XoTD_b0g3BV>UgMRW*M+%vsoh@NOIeE9xQU7Juj-j0;m zFjb0b-nL9ftOfB1R7_X+ydhKGKlb<{{8e~wGM={|ag^B#D{Hq`C0!FukUAbYAfHEY zalw=t;&3ZYL-Tqp5eICzCmv?e<>z4ohDWRHXSjcn|Ej$$a1RXouDv&UX~^6%S;^r2 zH33|FVmfsYv{AS_*x7WO7LJ~nZ*z`&;*Y)^DXjFyXHM4U0K3GMb-7yG@m^h{ds9( z^iyyfmttIn(!K0VbE~KLDfuP`Z1{Vdqp%BB!O$OxEL_tJH3-`YrH`{_0ggcc1(^ob zgk{aWzKd6UfU_d*SXirZ)8^q5wZUJ;tA{9O%Z#v^c;70%Cll+fw}`sS$e3hTH4olW z)-6eBIimHrO@)cI!ejb7=DOOmM$AOdJNoh<#aGp3dhT%zzVfcb?znXWXf?v-YQ1aj z(7HId($Jxhhj0dO3)5652DqRJZ1*exw7uKJn-YF|<@4e8fh>Crq=+%3Keni?G9`=w zLVwJ6K|$)2SWqzB_Dj>gpT(&ojEI=F1tnF@bntzuBrjPhzOB2?-R-Z8*ySg5i@WMK zg#Zpkhx?$LTGTw;ScznSI_1Ofg@CSGQ_nSAAtT0Lnt!!)OF#!mZ9`M&SveRlY+Auo zDu~{{P#GjeGV#c<5{e|_Ru^LFJv+Ts<`XgGVmiCx&wg1fc;cAAKSCpcW9IN=`THvd z<9Xxr4ZJ3czQmmt$Zn^PS1J{^8yZ9bct|ObyR=gZL7F*Cn z@K4rh8vzz@RF52f`a#)U&F}<|-JHg6qYFpzIooYvu!iNKOTykX&yzWj|Am{z`q7 z2b+|f&KoW~&)+OG2b89zUz0o8j0oa2X}P@c|BX73;KS#mw_%tLLU6O8n=Vna5i|(- zcUy-lAgE8eG+&%bQ;AF?-xsY*ALkRzAO{n}Tgk-%4TXoR`5nfQlJgHaz zrWhn?g1eb0&@dJm+56qvUd^T-|0Xp<<3ZH~InM9L=r)h^jKrJ^3yqe@G9`PIVu_k{ zR!hY|FGABOBu#%+Pqyb2%9<0_cT1YfWQmqN%W*U%!*Rfo z%X2GQ;HA9dakq!%XlTj<68%ZdSbniO1G&K=x&i6$98Nkl4gUeA9QSN}`ZC+`8PieU2c3@+|^{EKMgEp!I z1)8A(Y&$cUu+OPPx%8}T1E=o>&4b_B%X3EyNVc4-sLW*??lWLM8d+_Nv7K)SHpAcf zJMC=8Mz9Xs=>hJH4Qi`pe1Z2^P>DzdC_H^Ye4~m*2bp%7C(3L_pWO~G;`j@O5&+$@ z*L~hx-xc2nFGgM~eCX#Mk^HIpCin@$$~AWid=OK133*rTPI(I6GFW9xXeB2(U$U-{ z+~?^2cf&`!Bp}qOzKWjX>^4BSd*q2)eTwJFyk~5XRb9{7cn)Zc*9g zhb8k3b9>=x0C5_7*988v+G!wN4?5f7Z!IpfYSWw4bCBsNa$)tk-U2$}fnuEytnuLs zAYU57Ud(A~!jtaFr-ijYAtdOes&I33A5xuDVcUsbLrRA0N;$r@X5EjDLd<=z9?tOD*6Li7+MgbSGeuFN-F}R(md@xy#`d0v|Wv zTy{U5PA?0(kpo+xYbcBITzAr~U!N zZr=QSHDe%6Owj*V)>S}N(e!V)ba#5`?(XimBArswB_ST)G?SM!EzfB(Ahb zhbSN*NGty}F#=CVY_t zgD7Y=N|g(@C_D3DPB@O?%Y|j+M6@lQWQm*~qnR?J(Bw{er|SgPDg1ymN?psn((U%w z#Ze}^qnPihp-$}#0idgyS2A+jhDoOzdt8pK-a9`7NQ(Tw&!q~kq2*OD)|c~>sCiB{ z)v(DZGF2Drj(E&wo0hv9O55Uw%t2hmL~2-G?#4q*qZ`TU0+*?t)sIwIo`}>2#3{pe z(VIoIBs(!!I+Pj?yF!-7Q6FL${7N*B^vBXF7!up;gLdh>K8zvkWOx3~e%Zj^n&vCo zx?Bp1`_-qrjFKpMQK8d@>W6<2%-P!ZQhf6SPh^!-Ml&HGq%2L5vP#T@rXxhuy-z((WD;1v2hq=e(Yvv!U6Ep%Uuu^})eR-(ZWkri@`co-) zbHzCK5$DT0iEUC|E^D;Wl z@{IeZNRZ;EXueQKn1hIVYb5`?&yy+8*_@-Ie+2s~_q^w(cZdf&p{C&tU#XK0HzSW` z9t;Z38@^Xf8Iv7! zpiOs%B{iZ#)8pymGGmpRMQ!3p5&zf%TDGUpsh*537l484LLdkxXod;3PY> zHW?GLEZbrY7w#;Wnc(n4*8Y-beDmq2+Ocx}(XN%B`OanWi`ox+Yl&#EgOimuS5SXQ z;*?tbYA{jn0AYS1v`mYKGhZBl09p+hsP>}zTUmUm%%Zp|*sNbS$GKJoIsOW<9I+fL zJ8M|i8S`kKP z_$pD<#UeREd}}L#KbWoh@GzF6%tPc0qxXUpIe(LsNvTb1_K>L6A#Q={>!pM@CSfMR z>UHHPLIV}~=&mGg!V#G9{yHo9mn1m45ShqHoL~(`3*GIkz(*HXRmNWn4JV^})IJ%I zzz~BcUI~pIC-hcENw-jca5sC;2d%uZpvK^1m#3ZyD}17$M~K>-ZjJ=5SW1aV zN&leoXKWvmFaF1iDsQb>0vWyt!+{Iu8@ip&mL4O5CL4T#-kTwjvgTqK-9Q;otF0p% zz^LOKCRM{o5-n0}eon$E@k2QqVO*7R6i^kgO6mXd0K*xJ>qtW$1p*(Ki0z6lwKIiy;9=|#(r3uDf6_v)^AU7}}P)UrM;ng$61-v7o2=QzQ zD0y}zp=Hs2lCi>-hcUe=6k!9J60!Kz-@gk{&nlYY72aFH-gtQKL%#ATO0?@<-&xp3Zh29)<%~sd~ zV{HcC9Ba+{6spjl33AQ+aQwv4RESGqY$2uG844=;tyFHLCaf_)Tzj*(mwr_Cd@G{$ z`NGz4`d-QOe=gdSI7IVttr-)lg-V*2i)LtOAUiP_dOne)SB zQ@pU8V_R!yWm<`;-r!7ul?mw5j74{NG1AFQ)Amgl^NsAcwto`3!m%o zXc=|*mJH4{p7V_Z{Akl=hJm;N`rA04^1!IM`>SYJN{JY$ziso&3jWP?(Cdm zV$j^NcW-K6hpzmKfmd?5aJdu7VoaO2Kwq6qUgL1f^YU;?SG9ANQZwt8ozKNkjciwY zx8y@Q;nzkTC2B$=TkiboOl10FudB>pC(iNWHw8;L+X7;)X^Sb_9qXq9EgZPPy$7lC z{gFPTJ2_NwJp0q8zLk#o2VUDrYk{;`mhZ$Zo8&j=$S!XRZZH+@u-C z6f#7X)RazwyAUq1wc_-#b;>&}q#y3ay^ z_MYY}epWmlixa-)r3k(WbltE@C|qQ+S?`%*!zsHseYW7qx#R1Cipa$WsKP-Ei-Bh@ z$KI7T*1GOUOAx8h97~*lx!u+u^r{=QTO!1-%N7fvmgErTjsyWrOh53l2E`zW{nT`v_TmLezE3|GLIQeL3>3BPFDK5*iYx& zue=z@Qh(J#y5&UfYp!yGq_!ttv_JZKf=b06X3eKv;ww=Ce#&({afsfba^?3~wdgbH z(*|U}cV4e1FNG(&H(7MhoJ8lni(+=3`XC`e65o0ms7QOz(-bUzr;C|OI6$PFm^71) z<5mv}Nx&l#K5oxsM28mO35aT*KW2o@@j(Lc0I4W{mdr%)D*{f@J+fh3`Jw0GQ+-hD zmp^Pj4l~VVM}IONfL&cJ%hA^59RASf8=|~uPTCa{Z;3*;#oTY~)~;UiZgdTND@QbJ zjX{P!{Pri_$1lzOhKP7)7$1lE0@O;4gojl;PrPJ8S>}MBzaUV3Y@x|B?ZG@SQc|uW zg^%_Ff{}a=lTL5cPCw$81j+~jb$i5sA`O}6k(j9o-8C5jL24SVnS`YHgf2PhH$8g! z@K$pVtZ>1m*i?TbXnM4T@e z{VZtXI8VBYGA1Fo_aT9ZmPa-;#Au3haT;3A^-#bIR9Nh})j+>n&P9{_A`_WD`-j

y@x`+Tbra}}5^vb;M@BwAEuLYd4TN!#) zOGK*#`o*O&x5pXU>$RO0!ec+JMa=Ek*0$ngpnt4YCJd(C&~pTHlqlzRYUBo$7$ZaZ znch~8dh3=6>0Nx#?_wA_Uo=tLrs|6}TaGx?(8LO=%YY_DRaw(;VjOEdi2>Ml9HjFR zs}RB9Bl&Q2MJ3e_+XFY(O>|$!-0{jke=WoDJ#5F`P~qx9@a~^MDE58QH>$={3hj{G zw(ai$qsrG{ZU{>2d*oVnar{K4A3$AP1+0DvqmPTPRzB15;`)2tljfc&klG*#Wd_NuxRt-TJej=B0 zL5oOgLnhQJP0NO-xE+RUoFK(Lq#&)DfZ`vQArd4zD4C!l+GC!uR)akxC{1QVLVXr; z-#e(ETa`j6S(^3)?-_N+w!`e7ZOCw9G<5g_gCK|S#wg2w5d#6Ck_1RJ=Y`9+5O0y( zXw+veU;~!IjQHqnR!O$LbTQia_*>|n9yba;#k9oLnn$FZFe&Biab&@lJ~uc6g9fMWN1#$kEMTg z5SMyocoWUvM>O2`=o}xqOw||Q zC)t-9rQpZ&^1ynzP%=Pq@Jitvp~5RxJ5*` zVKiIGYD=64{1C+MSQL<) zUx7=^tt`$h$nY}Kee!N-e&{^muyAym^q6AdsEP2aaQZ?=mF@mxlaf4$kr8UGheG+( zGpz@Ei@dcn3Z`1h_a84oc{{$BS48PPTO!;(P(8&dMSXfD!9gIEq~4M<9=hN8Qv?@} zv0Wkn4Na1f$v$0dsUAm)Cx4+1zNa?*v};}3*uY}_qm|82Bb;25chO%1EaWI4VHXS6 z(Xut!*xyJI&VVhR8JWb7H@W!^YJ`^_Xtzr8vHOWVg6uF5<#!qfqTmxnpmK;hs4++;{ zH!KhvGry4g3lvLY?cc5wUYSOv$MQTbbo^M9o3cAQ&plS}4TbcxCfY2 zj(RjxnCT4~RSRfrt(KrKrKBo*G-u@*&E6n`Eib`FzMO;aJHIYw;x&GwC^@pL?YNM5oDkq(KCLFIz)QvhB zJ`L&xQdm54v?w0;$|){hPv0?w#Zi-V?&$LMwmFe&9|=JNv%_Pbe)TI%nbQwMTG8|1 za5X&QO3@pHl`asmca4Ep9$5jYX&I9{s1Oon{lK~2`I_~B_a)0tn>xfOONoa;C2*1A zRfL-a3>hnVsiu0Vk|yU6QwP$a6PgW{Sih*4+;w}s9_gwS$&O)88|4VH)^4TKbJ0)y zED>)FYgwSsYOAcEBP`Nu$hG=FjsNMrSgq81T)RCKq|nTmc8|pcnH@0XWXC|~Ar?2rT3o?GVxa$GcDb)1k@!aVNxBcef+DGVCgSHkn zGLqu{{6NEa*7x<5fy%{027XDNlxbwA9jlyamz%-${iz2e=OVSt-Egh%?QM>l@<@jZ zvtiRX5;DqCw&cKRLp|%|m#u_hL{Eil8rt*1-WZ80j^qMGlVw!O;{>Ifomf%pA??KW zFxez%PQ5yzd1=z)p@|aY0<}}+y)X9y`J}>koz&#nrSgwa^xn;pOPSR-Pg%d=H`};oqeV!{HH`4@<7T3*~p6mzG zur#F|7>SpLkq7uzYSPkoi|JwXHw7BJx?IL97PTb(u_;;FA^TMHyl2h3X~Ur-IB5sWkj2 zTL}-tjg_qLi8Xb;kPNyY%F;}Nyqgq_;Bc^K+L|V=mZao~5a*s9TA%o( zSpc~@-pf%XEoU_YUF~lXN%eWgToF|{HsNg9nGU9^)*PV?)CBp9RwBp#gQ3tzMgF|* z4I+vfVEXu%v1Z_c`x@FyYL~E$cU2R~g7w~XEL3xbvuDxokm%-+2=8xxI^O?wL7Q76 z>Eefr_9DtHAKN1^neJH__$r*?XPZ#y))DDQ>@E!(y%=ITBaJ=Vfkx>3S{D1Z6S@Dq zygE6`9w`OUAoX5x17=z0OE4*vRh(AN>#0l|YNcm`5S$PVk$qGB9;YU0WDKE#U(QZ- zES#RdF(RRyswkZ1gR3UKJ;Tx7g3l6tWmiT_N7EM!&C$poZAR7!9kY!-;#R43}9KcZcxM+H$; z!_Sb%9A|pZ`;Bp~10Tzs%=XKYV)r|uyygP#$4X`&O&R=sSh6<}xcXl>@X*#9%Ke}S zxBWy?$yD9`;?dW_%T?W~0*EVSo7ofA9*wO%DV?>{0I7UuuCE`yex+X<2)oI-0ReU6 z;D%@KC=hWXcjkOq;NOJiWC#fCK-mx@P{Ke4n2zFu7YDgLc;Fw30`P+Ye*6tZp|M!N zp*<6TJ^=>C#&JQ{Sb&xT2RzFTQo;rVCnP{#*nr1`8R!NV9#H@;&Wr%gBs-{<2!KU_ z0a|x5zy+RFCb`Y-IpD!-@qwvHN>B;uZ4nks7_yLu`zaUq}ThLC(z1!9fA0HAz;H@3N$uO1wqTq2+=m6_2@bH5W7`~oMHuakwo&c^0 zdk5sj0mw~hg8x^r{x7B|v;Z#03BSULDGub{BH+NUDN<0L5FnSq2ABV42LG?#^1p_~ zqCn`h+8>?e@o7>}lf$9f5i&I7sOB!tSWp{%sZ>7ll^J!a+R1rx{w5 zTis9qah3#>rEq(mnt233$P_;EZEa+VZyq;y-JIm-?HR}d0D5_ekUP=kZ$0kk<@ z(D*}uu7@6Y2v06r!;{?by8s^;oudTZ*a4sC>_AfvfaW{|IDCgq_nW`}Prygmmn(7l zFS+SIZ2kbj5Y;W0|G%i&|BvGN53|1(1QA4x^zXmV|1$gk?XD;k&-wp#_HQ$Hc>Zq( z^FPeu@LTHl)ABbIg~D8cLT2Ddz1!z#{>3GXHGePTIR+BuHi4DKfWpdxTf3zqLuywM92PbPZeNoh!lLsHQ?AE0c^SO5S3 delta 35491 zcmZ6SQ+uEd(4;f5lZkEHwryJz+kPgtolI=onAo;$+sW*^-|n95b@e~!gRZ`-Ds&I5 zw*jn<_6Kamn)xai1PI7EOwx@bJD{tHs)_a;n_*^z2Vp7{6dA;c!VuBCtWnn_(@pe) z{)esD2I3fTw1WBk*r4nUrq35t&vUV&ex)BwQ_cF)%6HUvlz`Ps#+VRFU?tsh2J6S= z#>h*H8(8PsCkU*nJ`*OgA z$h|w%v6n-3-Z_>V^IB zldB5M`mT?GV+$|%-Fn9g??9kkCwiKJx$D4qN5_G)#UEn5pSq!@5yg}EUpYA(Zk6fN z9kIsfBYqLarHt4VgfI7V*(Bnt8xk49ccKRMvdI(I=BA+v{~jx@m7cveoZrAa<`-#G zqN_2vU=DghhPEF2^-A`nu+pe(6bI`{iCZX9@`v8wJv6UCMGb=j2LMgE9FK)>Y^!Gu z)R#KEcuX5NAA8HdM~|PHZ=I~(YpO~0B7F=3qYn)>s~X}G2^EbdS|QN}&G(g?cehWJ zI%PKGqB_jMjq1*+&6Nr{aNNqXH8Rx3mHW`K6Rc!z9^bFT$0jCQ}0eHY*SeOX^|%daAdpdtxX z(bjO3@qY=CwRZ?hKCG8|OU^MUJ5n>`62?&cKxZQ6`ccoUgU!%#2ki zdN>^9Qma~L(GKA(NrW+X`eqK9)n?4&lJIr0 zhC6S$7*0%|ikghIf(+uRoK$CsD->F1&X2nNdzA-qc)lhb&(`$L6}K>5HrB+xNoW!~ zQ*ua2QJcwH9zc&0*8Qk5))B31B(wirCBZkOGs$jP+;AUak4Jue4E`d=FRkO9)Y<0b(=hmreM*A7w8vRw{78;F-!@quEzlw=Loc)uzYKXQao94Ad6vW{ zv}1mU35rS@zij%LT0&W9;c1C*skwgH>!d@P<0z;wTk#HyB^H>oSdB$O&teW%M41$g z6jNn9a)}!3JWm+!oIi)t&o0(*5pQ#_a!{FNzc-rEs6f8=#=`LG}8h-wAo(aZWJCU$5Vo zPH4ccUndVW;S*i3&->nlGx{eI@(7g*IGM;_-1#QBgdvDOgR*ExY}KW=ECCn-iU;WP zJgTMrf<7tJ2Bgx0t1hq<6Ik(c^o1)QNMomoXTS>_)A6qV{XZ`V|8f6tIW`m*%oA75X-UX$Ri zHGbGi-q%@*#_WP@IZPrOD8Edd;`}#!ABL-CQDHtVD!7)VyaO`p)m$H+Qs+?(bBXNKNJ<( zEO3u9oLfwf$3aQ5mQq3)SeR8Fn;Krg)!dw z2|SD-@OLPlZX(mDO$)~KuA{q?bP=})Re7*-lqRmF4R)%XQ0`n}wO}(e(Pyi<#Xejs zOueSq#L;lLUg;>jRVR>XC{pbyuf~%eMOgCAT(xXB|Ku(`MqlsvS&V-{EJMoJxb zG=#-m>+vDwjJ)+&?KUEppB<&|rxD+Y){FN#)x%d~XbSS5Squ)YMD_ zm~alNWH08*ka~Z+ViC2MinwaXxP1)gU{yUW3%V|bH>>QT?ulLQF$e=r2iSZ&sTF7m^HQ3>Oy$zcQ0T`v2f>f`p2=&T5}zhq{!jRtM;YBkZ-TVF-OPYr zDgcO*EEqT}2naMZ2ndKU2zv`(Rxct5$RGTqK7bO))`s!b8`1s;%wPAEE-mamwf8hA zTxu;_@y6m$M4-y{m`x;Br5ujC@AFA3&aYSMA6@Bg$jFGwAQY1a7qU&w6$xz!QSUZA zjmNB0fS(HmIIHFzQ7KI;U1M14ya+aixffSUT^O=C9A`Nkcm88-eA{d_c!&R;eZNe! ze6Rupp7vQ(u6E{UuBbg+RJ)C0vJ=)IXhPXa@=1w)mo+^p9qqV2f9YEy>TuMO|tZpbrx4uP+_ zzT)hFrnnX0uumBHD*2fd0C3!SBWK+)`U7Ra)9;8{$h+FtR_jmRZ_;p!yIhKIS>!6AWvDoevw$gLp}>wiYa5TtG+)q&YTz~uCj)iV zHVE1l193qBPmo3r`fmYNPoYaKHim{%=r+3A*1 z-u86N^@>Uh8FEE@yn6_1cTJ`;jX+*Y?cW!vfBBY=dMC>EB=I#eM>fK4BfEP8Ved2I zoeG2%;5bsSgGs2Uh)2~I3LU6+s5Sf;9_tM4&yP(9Ep8Xmk<47z^`&_4Y2Cyl@7HLZ#i=;RQtp2s1F)KH%;=in$W&;GCL`7UfzsLN04tIj_k*# z8m*d|%CMKnQqwk?O-g&!ivbE6c4s;iz4;S`(@mL&`|n+oHNhusFuV#!^Y*@dHCuWb zSqj|O0Wg$lxB#WK9LLP%m9O-cKVgfq$19| ziBu)AU8pUmSr{>Ixx+Yt2jo_|(E+HTgYKy!51IKWezJV7$7=cNX}_mEEpE+_L|HF{ zB%Eoe9(OY>a}HTa^eVN*OO0rRvi^@&&g8KwXAl*^JA;J_Reg zHST-eSo7%zoV9#iSU|Cx^rT%%Tz~HR(hX_Np0A`$1H%a&g?gr~G@Ln)bYl9v03C;= z^9j7LLAEYhoIf*mBZpP%cCh*gOvSq8Sxd+wAHB}NHmVC*UvSbRD3&5MZT5U}Tmv&cXP0+YY z@~dya3(jguZ;%{rCvN1lM|vj9K3l^mpN;cSLDv0%G;o=G*Xm*4CCu3@j@U!HL35pc zjnYHcIqtIcmZ58)U-7_#u3ht*ROslUNEEZ4RYOmnZop)cDo5pmP)Rt)9DA1?Kn&)A1U65M@@Z{swMZ6*`PckGeuE#+$$;N zx0sCgmn~o+(lRK!-4^+V>3^dqO}kVpvNWz#Nu5ypLegO&D~0!pA|G&GPh@r00Fk{; z`yor9WLy`CI+N&<-gqdyv???6a|u^{3Jdr8LTl7W1K8D^lhtNnKnitosGziw%sO63!V(AnlM#E2)Fn8IM6wBt)RZrLb5%;` zu1Vs3ACXy<3wb$~lwr@Ic4XTH9zW>!dp|0r7;PB1P`3q@5U zCk-xj5D0lws$FhTvF&OW9Y`jJF)oKZ=?fG3n>S6Lks9XQuGZ!5Vk~Zl;R~6l9pda9 zNj!?Yl9*f<`4t2frklQE)vnc_X4ugM&j3Rb>D~Txuh!*8mWpM=Z|T#*$$EvHeCFqe zL!WgFX`s=JNRV|6|I^jK(Vsx4p1Ra>=HsEg1nAPIU@9LiPUmbF+chnhA~_RRIXgQe zbHj>?=Meo2$HV2xe|SPkpwnfkZckKh9s(;%UQHX|M{k=*oh+kS6k7IXhO*JHPY$Z= zxOBA6F(Ff})<#2U&=hH5udCijwBAUJWV4mNTKH#2d#-a|$0tHZt-7ZV1?Q20AWOW8 z2xuHX`)(cGhKB23N0+`G#Vwi0NukwaV!C)p2g1vBjLELau5|22#!Zv)eK;$ZX{Pdb z$UHcNdWgzYno}dkS!Ht;&eV}lEo%mN`CxS62U3slo8zUTVajaYVZtJ3=RkZwt3ZP|AyE55as zVIoTVhRwSA_GFwaBa(K7cgv89{zI7D-B6=qzO-=C(XY|uTH>(EasB(`nZE}vK**fh z0Jyk4qroP(Rj2aN#$cJMvoTLzyLydkR>{qNwdmD7CGrln0gw342$)|N_Yg0QrX$JI z-?H|Trl2^FcA9AgYWG$$@0NTSDk~JjWIQ})R8`EYf|+t&YX*eEOe>A*Wpd97CHNr& z6=jH>&x6T5qw;^t^|a;A-nUb!0bJ0>a(qR4X!UFFs*3U>`K<*P$?A?)?~nn7wQ^ ziHo5C=_^9w3yb-xz~mg!=k1;D(kj^$ePcZ46GxooFl1tbw-ER5&dLLZ8E$mDY7;p`$Ekeq540kwv&PK<0?}VNKJYL^Mn#N>((j9 zTxPdWN)o;*A1*o8UYy!U-+Dp3?u`24edKjid5(hEVwON)K&2_h0WgLr6Q@`Mrv1G!a%WTEnVB#!hV?7XEGQr*a!RN zJFboz*{!Dab-4cn8X$egZ8?`L2d<5la?UIG*^PnKNuz_?>x#$|W;gs+Gh{DVTES5H zd|lQyJH)IoQC)MVkBLfa4GsPJm&K}z<(+f&CE7Z-igW&%{PH{0GI+a*yt`xy9-j(n zm`x!mzf29t+Nz2-vP@7*n5-1qN)}81z2nZO%v5-tfp1)ZY2X`vUB^BzA^D1Nx8=Fx z{vk9IX{GzKK%ryiz^&ub%~u_0B=%!mfL)z<^E+${yWW`rZ%^@1o!ygU9-PC9t$&YY&F;w9=7*PM%pn?C;EF&hAS5I|8Dajd=@i+ZcmT&0#JES- z6Ag8X{-+SYD7|x=-|p4^$w%b>Cy8d|AfH%=u>rz_CoKoV;)+Y=*>)d@kSr@x&t zodKy~8HfhdlixW$xqO7jeZd6-a>dx)x}sm|G(~L;1{CKsa%G}@W$M#psh=CD)rprp zQEo(w%bKQZZlfYfEt3o>Un@?cTeFv^@(@?-F5`tZKH6mT{Eb8_E=*sGgG{J&o4Y4B9P+7c?~4;~9> zYUN#4nK#q>6pUS<{<+`XD12WX@8oE2x-~1c{^;Hn`H5)TKQmwaKq4SDjkGtw{qt{n z(8?DOBj32Xv2c&$%NV+zMMWFrr#LV#?aP_e#_c+T_lz{Nzdh@Rjb}-Q=5d=POj+qd z5ZADpUPQ3qx+Lmq23r~7^0Q!@f3Vx@&$eN2!WRVIS{x>p5f6;V-U%B=kG`q<5N?@y zv<6!AsvJenO`{UE6D)$`u~Wx^5oDMGTNol>;YjA%biZ&qzN@9^a@vOD@xet<1D_q9 zxO#2#bNa<>cH8DB%s+v}P7rYn<3RU)4Q0kwjPNkFiK5d!~%BU`j`JRNDwV z_To5yf=;w1ZniR86Bgq>C%((R{*rJ^6queTFkP(O7k_?-K_N6%G=4sSFchr$8mEOm z0`PM4V#f#M%i5&xQg}GEVOP{-BpvSc?$D*kENRlrn6h|_a*m}STqG^i!xkfEty=h} zI33{(2S9e?9~J)#+3XB5b-DbMl?8wD&40slQ?xzQi|p7w-5 z+)v{j!Y}x;7Gr44C^W6vd}ufn+#{iGr1#HI9`*d6xB|(m-T(f4lRhtS8V?dHVG%M+ zIXFvUKtK>MKtO1cW_>V{6n@|Uo@gWJ-%#02rAs9Fs8^N(rb3j;!PJmZ=EN}4jzmJB zB#yt2nxvpST1_0{61n&l$cKv7BNkA3@l_NW(22Uax?j#8w?$D##soV{7g8Y3CSLN} zvpF5UHBY*+3A{e{XhAe0AYgOyO;~fvMTQy=Z*93Zt9Q9+Xvo?@XVh;2K8Tr@0|@^v zC6wt(&z}aDBeI{K<$*qGi!#GHdht<=s&~#^B7L;#ldfa6DtFeKw8l3{12%`ZI_NJ4 zZms#DKdwi>Uk)qa@WowK2Q>b(DQc!^!oXH?fK5}LDgYin){P7OC~&-Cu;*Vm9eavQZCR(yX(boIH6 zbBck|;I)Z8%s%u?CPhJdGR8B+E3{L`}Nk=D4Rg%V@zb9X>z+S+i8OP;CmFi zv^AU+)p8Et;FW_l`_iG6Zsfb1zlDImU6s(;*`SXTTqA@s);gj>m!kPhf>_OGvI(7i z^D#%;xkp1PKn@HkoZ~@`#s2&Y=ea;~05xIRh_rZ*>U3pRtW;!x^N#-g@2e6^7=_C% zHf)1}%UWtFOq*}KcHZ8`Yi!_+^(#S-VvZ{4QRzIuJbo@_2=*eee?kjt+@d1H z?Uzm#+=(uhmqKETAqWo4pnr-CFy7H3F!PBIAS+mL1(edfHiz!)wt~9wO`aznaS@#C zxnoW%9i`0Y|D}E0#rkKzMPMsk91Y$$oap;EZGaH`oIky_L8I7Kq3CbAV~sE{mtyql-9Txz{T^;#F9l^4#QWWb|Sg8(8IECd3HArC3O&nWQ`AnOXJ%3kR+5N)=|Hb++Ra`4ItdAXuWDMk`*O?n{a8&K8hMx z9Z>gIujSYnkgp`TM4hOYtU|;P#1Gk3Bw?eaX*Tkd91nVw%nv%N=(Kv`ZKZ1-AIo*r zKQeTY)0(XnPw=LiV~aZJZ(~-Wy{&{%qU$qGzK_`zYg!MND^$D5m(FoaumKn1S!X>U z7_rp3CQ{Yuel_Lk76V#mJq%$N1aAgTH{!nM$$7E0C=Sn0%UW;YXk+^1E|~JIo{}7B z7!S~J>2^Hg-QlVRycQ?Cl^(M!GowC*2l&`MIj4DhdK)pSR{RQ3Q==yyA8VnZL1w#i zil^|KR|MOFhxH@0&a8aTGJyPMY>L_O*zhGDM}-Q95trNF*&=4RhYT2es$vzZjme&# zKXNHW`#q{EhG&@1+4Tg6<;+|4b5R1uSJQ6g`Lw)GBtJ+`|-ANaiaQDqfQCsIZpWE zHO$9fyMoA%DTWfi47KwrN@p-aT##Yka`Wyqqg;_{7Q)+W#>|;~zWg`fl`o!(7 zlvu5)lPMjnHUx`$0!2~Q>tTsM7SRkwa5Z^LPFwL81bF?~3c#hr8y}CHhXzRy>1U=0 zOj@`r*01CTB3C@p6#}xK;)44A$$F5ntay;w0>6c+lHH(cW5cjV9v1h(6;Q4~pQ1?n z9LeyxK`H*eJ&#Io%T!U%v+y{h?ez=`4KU$I)+Gx}CZ--I4CAZF5B;_)6NO5h^|e}* z!-U01`TgLw$PCD&F!ogSHm@~Rn0%(T|6{-)Uy1EHtoTn9imY;nr_$}vN$$a?J~)Wy zQP;5q>4w!;VAb#<*=r!i*3Qvw7P@9Hc5>#K*YO0gV^>Y>w%{WfS(~9xMdwsPmK^5!<4-VF6z`kj!BwuLV<)+PUbe{E=5;wfSYnmsGLSV|;Dr zbbpL!WNS+QAtn9JenoH;+IupE0s(MySQX)z5#f@@cp+h znHQ#lO9CL%T9Aupr&7&)W|vE#=%r~B_qRV#iMl!e2N*M8&s3xJ+KOkdh_WZBt%8Sgy!@ZEg)_3U^&Hv@lfNq)eY~|MQqKsKf(6pG#(lv}mkOz|ga5*Py-u+zbbS@^sRpby~!;2#hLS_Cl zNR9q7o)Y)pl)tvAy@|oU>?JuLsZPDJ36Mfur!CBI954y2L_7H!a2P7xiMM|iWA#MW z4my^)ruJ$6diWh!TmIS+38n5UI>c#uI@o$R473(E-wb;G4nyOsGLq;c1+5-&v#CBZ zbG6x=yy2u5-Hm)?{%Xr%$xi-rgKU|~qTRUrlu^^0l9FMgfX2U2FR52qVTNm9ZB~{m zLtCUZTpyR&UQj8^9WdQ=aIC_uIin+S9$b0y5SoPp_r9&8d_Hoq1+RFX)nbd!pa9nd z0Zh|vO&5n!8=aIPKT%BeuOom~;(DF6!sXa&tJs%XWo_FBe4xt0Fmwe=G>&UCz9~g1 zd&I&9`()EO_<5~2#q{kz2JaEfQ<~we&$G}KcG!%2c`?%|Qs+Hwa7^iX=NmbCU!hQH zcP4}(E}#@HW}a3d*-vIoYl;$%k3+-70vZ}e??{)t8O--bb%P~t9^;N+cNiN?4Iu(2 z!FJr#cX0NM`M zR*!li1dw|kRagCiXO-?Qt+SdRIjeQ5uB;M{nmXKgTPo3e+ZGmdr9vq1SldNO>bFIq zH~T&~?gtnMx^?OU9BW;K8|;rpVWHWp#l}cIin`4;Y@Z-spqeX57s~}!zYsJBknTtk z6!+K$Hm>BXJawjDc1Ljh19PoC0SOMlBpbnzM%ZafPsABGv5tq13#-?VO@SzF?`rVO zVcw#l#6TCEV@HDlxVF6AG#vjBO!lteH1+{*`+k^Zk`=S(~SdNFn4w*l)c|G3ITb z#%@FIu0||~rp2;+lAopm$U&up(aW_|6Tg@+Zqz=lj2{S_$V6d>`!Rhq*zQrVt0g|e zRpyh_g~gx53|sYqtM#^!ray;^XZl^E!Op~Cc!{QcDxsIO#94nUd|Cy-6>5+9m=at` zM6@_z(OTm6q*zg=J=D4hV~syql`{=8T1R`>az{^(O9bF&hjmE<^ZRe$IvN%IoM$j-!doZH^n|)~SRCr6vI24A_-|EeWj3=L- zCjXg{<(oI02S(xWzx=DRSGwFdlBj6UoD?fFB4iGk;;Icc82M&=d{K@p1R3IF*m2V& znS4-3+%g>bX?Dr)y^xRfb|*OWMuY+&ucT)Ywdua)ZIXh3yaOr8S9mLf5dR;(s1lS^ zeWA-+ZZ;^^>fqEC+STN`PdvejHXIt`A^7Dg#(X=-D?Maq=G8W5M9pj%whe*+6oD8= zOU#o!?kYSz{-AR5uO`i}$KZoKlp2Dh<&)c-220&Pp!(!`qWLHq5LuPQZ=SDw%fZM< zP|G#=mA#q3fE)ieL+(wE6rVG}4SISX1Gjf>?}U<1ftx~2X_9BM1q)c1>;Oi_Qu&JlHZ3(+cp>U9sBb9wdCJzZ+eAn{S$EKFE-PCIwqmw2k7Ph4x z;8_$%Iyi;vbrDeOX@*Fhxy6JL_a^|k+e9k*_C_06wFrw*|IVEO*Y3!slTXT$9G#%! z=9bnFkWvs3)5sxLH6YjACX)OXp7NNbTsF$p3i~37*brm1#}ws~ny_LH{c#5ZIn>BS zlrs|V2{EwmhKJ%{vS_jQldf<}_g2_kI6Zawz&*BLu`}u$YV^N9dvY$=6EbKMor^?a z9|RFdEY?mK!570NNd!!w2cQ>5VDSp{z)2V9sR%D)<_EAe?SH=`&ciOI^6%?=iu7gQ zm=p&Nzz+Wl**1mc*`cWGq{2y^)_GwezeZF6r4|(L{iHEI$Oz3Sh5-GwsLpCDcsK!I zy}WkE!T^i|xZ5+z(JEP=dV|1^{}VJo|9?pXwK6(@9t{MJ}4g#QT~s4XoC zQZ{yt-L8TX!(W7hH-zECga?yJvB5}bMWgNgIwr@?AfN6chH18@*RW}>)}_~3sjw_o zS3)6*v{};Gtf*d>uWVVa$Zh$;_=+s~_pm)_mIx1ePx{jBk>)aUFF4Wtu!#wU^m7jH zdsKeItBsAc2%CC}%1XilC>%>LkM@mqQzbs3;hUEDJU6v>cFBp3NgF;mhT&7rl(x^A zRNZt1Q%o7Iyp^`cnOHFU9)nf%aO%k-*u{pOaa{msa9ki@NX{X#ibQ8{T2PyIbD>Ua zFHf8}a!F-tEY4t!M!eSxIcfLo>4!5L7U7&aR4oD$qG%7>wN~{364TNS>bSIyS2iz( ziDMaq>tmW4_k(JQJ#>4W@NOpe4mR52a&%Y==nz(YJxcy3SWc?0@u5n6-&EHsrv(=K zWb^7Qga61+t)^#CSI$+5j=l4OjDX}`jC}>>IqjPb!!{Y=i43dc-ju!dAw8^(y}fxZ zn?GlD62X?d{GSV8AH%CfhIM4h4$twg*$bZ{$6e8nQz9%H0EfaLwFZv#~EsmlmKI5Yt#@MCiSO0 zMKcH9a-q5~{eO5}wj*}kU6POr1X{jH<9xe^E9sIAfKOr$Qo=CjMvAXx0L zK8lfGL$=qSWb2|qiN)4g)vAR!=!jx8c7`OauJ%s0GSMen*V)Ed`V{W&BCTj{y_mb_ zaY3fl|CW;E!kYV(Q)Q8_s#b`eV7SVh(}2Mcof6LHqhAPII&-PB4BS408#WEFdyf=S zs(pNW)T#mu;A|)yjxwkg@!Wola;Jg!|1hOqXooN)SxJ+1wrzo1VO^^v@z1t0((^pgaXF)*l5&UkF8VRDjAH!sz#>{I*S6m_!h0iG$2MxbJ4bF~c!VK)R54>tJtA zPs|c1u9weZ1%yrc2HAM13N%X*Xg=v(R}ikvGd<+!6$u+)d1)J5+=wzwDh$n+Hb4Ie zb^3~?^+s$nOqjsl{MKeVje^SGW(zGvhc8k|AM>%b^QJ_Fy48e}ZAm|D6mg6gTYgNx zj*!67=pmd(niD`8QPut7+tp~20z+BzvgOx*Z{!HDaVgz_E47I5nJ4TDI%dFb z+n67MH4Hu4pnFEm(OxR~Xc-=~e}D^R@s$hMZIT&nKz^)zi*CbUQ;x@v8Y~pp8hmH! zZq$Fl?%2U|f}n2`=5a7Ddz7ubJtA7dvP7_v;HyAdy4yt;H47~^?NDBT;leH`S@H(h z(87nn`yC7V7Ks#6du@Cxc0@w14GV4jX>o?(0W$j{B1`*j5)=fhP-BHUsGr?JrQO&G zT=Ksv3x7sbP8N6erib_G7r_3g{+8XDIKfGMEdT>fZ4LDre3;u(-KO<yIRQ2)T^$X(X*ZnJ52hCC{}qHdJm48F_RUdp?&YSrH? z9wD8D|BbWX)%}D%D^H(lI&xJ-bnxci&CVdqI(w3QOy|U7?xGSzphteT-eZu9BFUE^ z%S`dIL0Ma}5$mFdJ~RNjQ6sokkFv8fSJXpQ3V?s=Qz!YlN4XDQ1*K4G+XF95c04qw z5#6S%B>M<{?1*aH6G#=Vv|AI>@tclJP32EEZs|s7%6e>F?+#X z`soBs;>77In-A%9C!06;=G5MyB{`{Erl$!ISaXkh|4e2pQ45#2H5K64e+Mq0 zNX$!EJ&6s{X?AsW+Z;kdC2k9MGNbv1d5f&%rE_HQs+|H*OW~!pfA%x;i%K*PtNF(Q zz*KG7X9aj?SAGI< zeqcd`6yGUlHdZs$A5!gT?~RX2Wd~U@oxPN@JKPYU^4{hX1m*5LuVx5b!GQZR@}jTB zu}UZkrWujmHhf`-S<)!gG1{&9)`J{{7OpT-_07#+bZ@8p)8{*A95@s-t{R|uRr62U zQF)vB1UO))qse1sZXS4P{?bCf!u?~n$|QD6AHR_<`pDWfoj1Cu#!iO`!fgWXg=qe(Z1< z>|F;d-W%>4S~(^DW)b>l#ZJAjD)+Px;=j@&4v^w6VLEgJ%(wU>=8v##R%u4E=a+<&slj=L>4+x7 zUr6h#wvY)uOrGY!w+fa6=`k_5MAqF1(==rRh+}YQFb4f9TcjUh!a}Nnbx0`F(~jGW ze8BKg6#nW1Tn`5WV-&NDd`YIIA;Z*pYswT#QBTG+X$Y$mM9E6A?1scxgDYz zyZ&JCXW5b^D>J=M#PlHuZ+)Ki>F45+{McOaINR1Qu|!|004@2ltzPYgHIrkw2Rydm z)#3cisZoD>3W>v5R*Y4KSXf>71pZ&trGUS{zOOBE%AvcnNGsxT>VXEw2uWXCeiSXd zT$_Fw%WgKuVa+3M$kJ}fKRrGQQO?CV21DWY$a!9{5@C9?#6qBb!r$~g3`J99{sQH18S9N->K|nD&`knqOB z=55#RJs3?ze|#A5`RN!TrFG3hz=>J0)Xs1_nUwI#B5Vk*tpQ6#+o}4Y&rAAg&B?s`=*Q! z;;aPQlb5YQK59v_z*}AksSgt5yRL5AicA0sm-J`~cJbF%DYvL@wU54{V05S+SW4*x z&u-0yrKj6#;Lo|lLNI0B(j-e>bd-c3KGz?9LFo*Gni%?G+|D8+KCyT!QvfC6`Y~#$ zJ>Q7Y_0c1KljiP)iBjDGcXwG>LzMT}Rx+zC8~=vrxd4uVT31|hL89Lw9nF>`>2o@- zFXk1vb3t}!iUE!+Wl-1|Tgd$#M^Me6RDyU?O~K9242OQyEQfye)He#>wb>89_aEND zSzm_~5HrO?TWk#kQ)QtAVSpvLfrREN|Fivgx#Os*TnOsd0ROZB&W75dlQ$muP%(e< zhWr6RVHXtSoi;Rflu$c(SL(bN4cJMeoPefIXYs3^jOGIS?x=9osZIx?+9q3EO_;x( zmadp!QFgp7$zfN5eSeh|TZDf!C*@Z3l6zGbgpK28^Wh%c?8)$GF~EKBl2qE0M!|;u zGCK&l0s3*O{8(4npI|f7kwTH;jkm>S6~MpZFS|oYP7p?qDWb5w^kOf~DPR6OSvAXh zR5yPWqs>{L;3S{da@q3yfy+hTg>h4nQr*m_q0=h!iv#CaSz_wEB#F}#?JTp$I4sKJ zse4zsgW7P>gmtMQ5RfR`0&kfqPH4iOT?Iw8W=qMmqIk=r63iBV#IWY-jR z{X>u&t}8yi zaZ+`WlVBflB;k-HO#fJQ#NK@0Kns{!syNK#+5*!`Kntpg`;QYtsC|Y!8c)l=4s1oq z3q~dpQ>}hVCIE&;O_BY1fb(;qCObMMKh!L#^=L^IDVu(NkSb*Osw@(vm@fLHb#t+V$fiFSx7;}ojcbn8ti zgpW!cHA}rO49BMMfYD-oI2FNQGWP9GyJrsQjyB}qav(HU&&oRq)sKcBv>Z>XJ{)mR zzNl7O+E6qub53@9FsWg(bwn<%b0^y2(*ap7?ZL^Lg!rV=GZIYmd0vETlp2K@W0yWZ~elWQbRq{*DW2Hj!?@jPslviTy`N0xcrd+wIwQuUjP~p~_ius(Ym&A1*`nXR zO8J!7GU=bx;Qr(AhJSl^79OL~OBzE>3vC|>Aukog;nx>rz2t|uWqnSYyzNhmf5}fv zmNkr}HsV1}l?QSgFP#q)RMhVu!w$-0Jw9eP6#!`(98W5CNxr#rq886e*<$J5RCW0x zKM|^}D;)Xdy$HxHnnOI|D(kbR*MEDG1(?YXFl3q~=tpUa9e*|TWN}E1tRei?BQ|NA zmzB@+RG1#Nf6pX>kF#H2ls_3anl|sc3t%TpNPQi;e=R)T zfeEl)gN?eYLhScBiv=Sn9b&8pjW%H_9}!pGKor|sRzf*mLNtFtZ$cTx1~F|6 zxu=% z7m%_+`1vKKEl~cX*DSk(4_QWF1YcV@ixGo#7)bM+3jRa?A-y3xwRKoYJALPol;cLp zec5T(sY>w2wBdtH3y2*4VRG<;NqLwnN<;)cMPl|wt`;p-KRBMpfNL}{7Zj!QIt(De z^JJjo;IDv>OZDEEA0r=?r$o;{!s~d`PY)Fd_%PHla&8g!;+Bh;@COlI_HUaOiIK;+Xp3LJsqgVYMLd{E8B$(xn z{3A5!$^|EXc7yMY6?rT%mjmVP?H6FnVDBc+*eqji-)Mv%U*(u%76M|>!a{`Fgh$ns zbT8J1@&+y1WgpqgXmD2S&b9O=4>s&gwJyq>OheG=icMgFG&I!La#gUGT50z{6?c8! zslag+uaNe3?8M&zC1Nj<857t^g?+q$kS7b_fnCu$p#p0QvI?E*B+6cx2MZu2GiPsy z-f!ot5}&bnBPDM`RU^fB2!aHEwV?iG2o|XU*$L?i@u+z)k$DoT>M!;W!fFr=hdOtG zDnvk|>8WANa1ty1%nt=8NTWh*y!)|lQtOX1P+WWs?W;7<+BQY9}z}KHl z_S}x#IV=;zcU-JiOPNLq!~2Y7i~}YoPV~dR3UoD6;B=+hzkeCnL6BL<(3Fy+pPJRv zqvC&DqZXN3NQz8V=BwhvL@|_Mhe2=TL?>4@Or;bYf|6G{ItkBc?CqPBVxKLrO~ZDw zWU|sea2VQ8XU$K-R5@~VvQh`JE(k=jP(_7}`D!Sa%fya~Ah&#P^(LK34mR%fbb%r` z*kk`}`2hlA1O@`a^*^|=w~qo)(Urv&M*E&NZ>&7iIH>4elPwS!d}k$F^B6EIe62-;7a@EHdoPrkkrQFofc8sgJ$cT)$r|{4|2m-j?Poh#7>-Hq zsl~c2YijW3c~B^FyI~y7t6xt6i@O>|nly0vxUiIocON%d5eKt(H>Ct;HGOx^9N9JP4>=Q))frf-aSMhG!6hi30^MgG?XM10i$~ScdudSDUb;MI9l< zdv{{4*y1dbZ?2)8!H%H*jZN?`15~6ipnDb?bo>|ToQ7wT=cIc;Ap>5UZ>`t{sgf%k zT4vfy;JZLAJ3sn&LV0IogDj(y<)dut@|`l?B(Rcc|)8ea@V*mgb#VKhA?) zN8}s=tR`T^m$m5b%4DA&O~L1fe7Ox}C;;MqJGp*Rg|$58S?kkv znqS7(MfF1QDvFheK=?%+pXx`gM3vkix~6Ygqy+Xg?O?*|VNSPJBe#L%ebZC=an0@F z^)e;+?_pRFF!DV{TZxG6s<>I!MH{b+oev1kZDz5$_)rp|{i49>k)FHRG(H>wva zG$g;)Lq1RvSq&Y#hx*f3P`9Frk32r#bc-BH~ z1F-H^WtnXW>esnYBhk1`EJukCDCjR|KQVhZ3(IE-NgjOULsauyaD5!qqd1sdFgujA zu1xB!EsJ}&-r6ZcZKF6wtgRc+!s29FL6;GARis5@>w{uX&sR~ltcQSZ)pe)P0FJ23HP@_JE%1e^^UlLX>8vs_fdY!< zrd7#y3u`iFPoMH1f6r1#m)2Zdbpu2QJD)VO*L7JV{Cq^nF$1CQV|v_33o$=LtXiX^ z`{hln7nrLOaG(4SC1j0UlGsd6Gy*XP{B{7S6Amho&ZnXxM7w%T_ss>{OC`4?6GB6X zXkwP`S<=p^^8gS3GfWa9?xVhcB5V4rrinwnwN(-a!9ZocvfTl$+PzR5ikk-D$Zaq% z)JaN+OdAY_p9ASd?^f6NL_-kD;}QGU3ZGgQhH6K ziZa$Y=_>iF88k_IQhq(1Oh2;8^z^>Qt4wv=$Xxk%a9OL2d4VP+J57Uz)c9@2CAHt+ zrUS@ZW?2@|=?=#5J#>;Sk#7(L2RA^WXrocHpF8`7NQ-CkKfb``Sh0W zi$R~d8u0PE8hV{tWn$`g!2!1odWIEQ)uLf^yJ)=$(|3_o*jpYyj`RKo>9QNeog-dq zQT{VQEy6n@@Fp1vZSxYe2ytdo4!O&y^a?NuW}OZFaWy1KWtD>>5WzfcY`DpJ!^AGm zNdkc~#%o!j!!4ry*Imt@O=tF6o9D{vEkz7PTf`V7v1jTFMf%W(Hy%)x*B&86!K^Co zK*5|E6OkZa3@BO}ol6#MXCacR|VrG=Dsagn?7&E^3ZGC0F5+eygOt zzC-~QX>E-Rt-%(B!*+iT^V{Z=GR5GZiT0gr5+Fw<0m;V)2T~7%dYg&FhR>5ob6#!^ zPTWEg-D(f6aHc8C^S9Zt>$}5eM>CILJrdS_Zsj`#2I-=);4Ur`(`!F>qVo3jZ zJE#IzjeOJ`0B@|)Hx|)^i~v|)Fv4|$Ggv;gz7N-j{RgZEW~nbWuT|mPf`|N^>KvRP z0={r`W3ai9(oLCpkM>~M#))F^@m^%Ld{}(H&KDQ`JZ$JqQx+ag;XU$T)Y?KTUTpb} zN`!XYx%^J78e>zPhT~Khx_N_$ry~NRF z6mbU0j+fqDj8pa!-SMPridwXd*{>gso#O=HFctjeh;`qo0fLagtv$C(|2-k*6O6FfzK=KmUj93>bEi3dqSd&uqbrGv95j`EQ= zmh~k-%wS>BJLG_qu&(vIL!=tS?P=-UqE#h&B$AWTE%q2nCy-?q!$(5uUCZB96a~{+RRunBk$Whg6k8jk>@$ORZ zy0%`e+H=eKQg!!A=5IhHgsEX#Uz$kA?(5Ir%~(a#EDy>5AWV%`{rS>C(ut*T;|i&N zef?7-8W|$B<%qfX_(5?~o6!HIf%j@jBHNg>$r&YOx*TqpQvlV_Mw(S979c_b51P$&=JfTSCWdx9;|I!J-x zRRNzSDD>qfK*s=vxfkGkYlnrohkkKYXz%=r_5h2mZ?io|Dt8g&ASxQ+GWIDxy+`g zVc6nu=A*8=Tz9`&94tI}Zu1r;a#4K|zg-;jci&xO8bH*6e6$;aKr{&L+xg>Y#0B9+pf;TP^3x=b!OQvG$fv0LOJ&K^dLmMK8_^( zyDMGd#}tfs`;M0Dlcu2z_OHh`sIu%jw0;)xn{SR*;co9I9b?cSrf2M6kXuq5M-gA@m3V9FR|%)w{x24 zNqKv8`rj2;Gh3Uhe5EGPT%e=Pe&D|)=n(`v85{5X6-IRQ#Afz%*cnZ++mK8U?M6w# zKUIh#gM5SRpg{)kC&6%$TcmSuHNf*T8kHA%^>MIVhVOBg_vQ_{{uzz?gvC=Bus!B? zTr8TrNMmL&5{I(6Cjb zdq;h`3qnBymz~?xycn)ef4p6}W?~BOT^sy}uKn6+KR^tPqF4D$Ccbi-l;g~gR7VNt zucX zlUplGd7M7qVzZLR6{xy86oya1z8O}pf-2v_WCy^3(N zlfd;w_+GzE!>eEs1!NkPlEqEZ=+l_7r8kN0b!!^91^&1R8h9>)XTHVu{Rsv@_mHX#Ik)mn{9U)dzq zcAc*k;^$w})JHc@ba}6#PQw^gN9PIYl=4fg6Y{*zY`z>DMaB z#4&iA+lmTEI2xd!r@lJfMqz%}%Y>=l@NRIpch)anslx4LlC9Tvq(9LU09Ac(ck+kz z8ax4cam~@v-I~@Y+Ira}LmpF+RB%o`pWSm(&&Pw(q?$j zQ#nevq(?8zsOQ~-2f-4I$_-5Adz1*nR_FjhGmb}M($pfVlbGOK=Eq|*Fvu57xfgQO zGoKD}&$t5AA3W>y#QuETwO_p|j!||W?4Vx|y=u3-`X2<6<;ukq8J0kF z3c}nFUsA2j80p$lPIo@vSn+q^A;Mcqbik1u)`&7TK>1eVU4D2+?H%+hsjhY=DhwbN zo5gYwJ__wS9_}GfS{lVHswf#%RZGq36qH~TqLF`~y1cC5{jPGnkT~JP#buOUn)O^c zxN$A4sj5|lvi#EX+iWY)%iJ|-1Sh`9v%a{aCjZz)rSZc%q_vYL{BpyhuXx%X`3c<97rby42{Rf^la}DLoYid^tiXn(Cv*Yk6{#2BhN!=l21h-yN z7BrMhX#Q^LM4phWyn_gO1XaR9v9aiJZjop!huljqU@Nx1dAiak&++0a(F?Fhc^Kd5 z@4(oJjerrY&-f&sECh%&TmI4ClBwswb2f3H;GL5;+ndbc0=?EZ;W-zF3U%sWrDQwKu{Z~cX*@&afU*eDKN*lYw|xY zoiox61&gk5hW?E-+l)m85(5y$Xj)!{6PYpohi4r+AoG`e61OIXyjCcC=)IDTPMx7p zdsI`16^S&8D`WO3e(5YD9<56SRsO+{N2K`eRK#DQ#H3ME=npKk$DA2mOtZcO7e;SX z2bYyIf#R@Et)cV!aY8egjMqr zkApYV2FxVVxn-GKhjMz^K*%K5VE|$T-qB5TgU(okG2s)LFT?`L6@NBBoXwuZW_k8& zXi8J$D;@U)(F|;Zs$?VF33135@@hmu&KQ$m$iAaD73t|O-_;N-+E=iHk^hsdBUEUJ zZ0YGR6OsCblynuBXayixHnreP5KKkBFHxC%p;tYl&}F=qFZ#PDVyd*XCq5qX9xbe1 z;r>l!!H{ncVdv5i?_>dSxp1o@H9*3W9o$Cv4m~G#hZ-X`?DPn;$H3>$nV?@K4>ezD znKE|8ImaMWN;>FURW=5?2S)<7dsBjK+k-%kvCS4qAA0QYTnEs!&mL+SpFAT+e^ru% zNn){St_;l7awSNI0i3k4Z9@Z2r z9;j9qE71{28zrbII+ISxALuTVlDO!cnse21F-0|j6-s%Es?HGay^KmZhdpEzbeKF8 zGD5Z@w9Za0hXArvH`TO8M)(Mz+6m&Aehzf+Tx}!XeT+}+=S=kN9qx1OzS4+7fO9`p z$2@Fxg4o?cj7RZfMoK9NDa6IHYRa`whUsMM4C%t7+NnrElfwQomBZrZlX6E_*&qo8 zk3a}R$rk9*1$}B;!-*Iw{(){=49~5I0gONqr3zyhmjY1g6@dn;UJ^CG60hYDZAT4O z{%Wc~Nh{TxJhsF{YZk+n3u*M!$Rl=uXNM0sUABR0QK;pMUDwP)@zSOtcVsmRU_z5q zcJ~PLaRkzFMIL&jC7dD`2p-*<$SS9%6fn@&Fmz>*fIXRzZp&Hxj5md;Fc8-qPB)}? z%%=BZ73Q;=Y|RiO?c_Y+XxRO+@)_NtzneP3Phd}THh*wNvP&QMwfhC~pV?50W|6Rj z-zib}iG{HIa0fIrQ?z4~^38`JKjLs2G2mv9q0?uFs};Tl*2Bare0hMGPM)f87pZ!1 z%PcGjQ5Z&2BpQsc^vzB~m23V*!X-&h;LI+pVSz9?^C#=AvJZqwR-;ayrXeix?F_fG z`H_$FTKd}k{mjbmAM~%mRFkSIL-m^H5A}KHhi*yWx@e3V?A zv7e#Ugu#(28wb}%t*0?nAE--LQM7b@W^zD<7r~l`XGsvBF%FQzI)nG^OOU5+HL?Ou zGY`)m%*IfoXa_$wuy)e)#-oC3%}`>{{aUyeP0nI)pP{WAgRHeZ65pe_Ihnw25#UzC z(5@NeJ>B5tArWdQsG1tZeJcIy(O>7rp!S!*X1oS%W}`?`#aNnEtfGB{h#o7mq#(wo zz(=BQidKOwH;ydi303(`iXDI?AG2!2ke(xh(s>VrW)bfZ1uHvcmXs zi{8R%)#o z5vDqT*HHs9>ZuFJA7KLc(UUR0vUKB+c@x1Jb^ z$n#qx|ESO@R2e?!)cI|=X||zY_}fCr+hR=7g+gVvZiVvzpSH&SVyutB3vW@3iwaXB z_u==S64el1aFXCP69=qmIdMs<1Poll)dj&V!cggO=$l7eXYQSlIGF!Z=7kK5Ahthl z+ZaCSGh3G&vjycJ)(&?Lddd`lb_W+5RpeAT3H1mmW)i#mafwL0{hK=Kl`pM?|2*;Y ze=WmeY_Y<`XkvLlQyGzf23P>CgMS3cu-FYT8M=I&gojZ>lLdG8Rr+QA3-UWdPn;O} z+#urLP?l-^8K?OKP?L;{>B;F&b8~n5xBHb=!XM_28~!oMpjJ_?iEK56mPFywpug%| zkU0jF#uC{pDLj{&t0T@e729oBmx_G>x!}M>d`YfPJz#vj$MY?V zsMA;_3STK4?Z%_Lj=+8dGd@+;bn*)x7k?DrcnEWDSpE1qlIiETVf`<=+uMS8 z7hMxgfqwiE6N^BBS+|lUAw5o?Bzm~vidK5sCsE1AA)(Bfqza};xCZOC9C1!Kd`_$* zlT(|$=9}$s1PxA))r1J<(tUG`R;C#y&ngJhG_GmD8tWuMFZ;=Tw4fSrt_7F>q6fy& z4~~$B{S{!DW=Z&I(_!a$dVjcd7KCqb$Ku|4DXQWY^koV zy=MZ5OeVoyjf4`lVPK!}LhbSGPhJhC8D1?uG@{Gk0=H|t{e)0tRF z`dE5is>ffJ*o(PpO=)pYqiE8%B42$KV}3Hc$hv7%A~8!N!~ntbc}#LhF@1=?ZVME< zMw~^inTr|@e59m^77Kv|2ii@)I1@y!gEE_KSm2IF^nR`A^_kT%{wNUSVBrDM(imj; z_kYqx(a6Z(pI|?JWWxUV!Ix-+j-QA~0GW8RhYJ`|KUdk1K>J+As3MIVY)cDnDMDcX z>C?BFV3`)s%ZgKv4XpRsswkpO=}=o* z&|Z?NUAAFg+8oC%@sn)E=}0DhNHD^ALI>g|Zr`jR$9Pu4r)I7j#;Kp{@C;BJY5raw z?{L+i*BC>YUSV(U$kzsHwnio7O(1E_5ds$JKRS%qFN_;E@5b^rS>(60t1F^`3U%U& z3H3EGCq=?`gzMs2(~V4Ui&F*F+HSk?c8l^cGguH??YNN~c6ZI(>3}l7+LFo&Eon@< z2`1Whg^482M}(chzFKW`V!cqoS2tHkMUr+@_n?#z&yqU3$RQPrZEtedoj`w8qIVA^>mD;Lfiqma{e7hC^Wp?G`32nQ)jc@9ntudW_er>wR=7)S=%C722v}tmYA%_(KD_drzX1B(8}{oK zamaAP-bQs}!d?)FWpARKYTF{GR*b9N);M0-(831V&3^fJ>=_a zPO1TdFX(H+{x5R-J1%|X;wu^vd2HAaG0)O;LILH=z8i*W`}uXnLKMY!5CgvW&44dT z?YA2Oe#HoWj#z;ff1*zRXTTVToOkdD)juF>p|var5Ye&c@R1R0R-*Cr(9af*Xde<=Yw(qV`dFg)f!)RK3L(;l=W4 zk93gkipPo9C*JWq!;_iihgEQ46=RQ7P8q<`5lPUKh|w!PavaL<1^h+XD6BOBNfgtW zEU`QiMam2#l@^ec&Os|Fca`UbeEbN)3mrtpf(a1Ivcqo`(hQflIvII-JjaY#%R=S4 z5_tk~woX#y4d6b)2OqNiiJ8UdGI#3;O*q>oVvV5O>XSmpj59($CvOp-SK=wr1_Msi zajF)k&mFlD969?^PIfS$!RALl_P;f|CYnlZ`EMcm`g_xm_@50!d!HOo{NGWw?r-%< zttu0t5hP)1mckew%q78P@^TrAu|>hp`S@pl-BKs*!vRBIe`J_ z#BKIOkEb`epEtb~ECc~xH^_e|IAH6PsSPLTxHs7+_;F<^x@`;1zXNP(hT994HjS7kZKL31XcM`oMFFdoTTLWWm+(OikvM3toXwgxQa7mKn1(W>BNLz&nngnohjtFFnT1YzE@LY_N77w?qg$r+DByuF?PzSf*C!ioA9#Ur31 z3%5w*O0G=-l$KBLLb40FOul`Y%#5b*aPpd1;xqQE?;(!p0B0@DVM+mRA17{<5#3Av zD)+8>r33cg2@l|@p4VhQdrksi=J zdBg*H`tk{xZRpG8w5IHFSRG4QYVM}@u<>*UT#wRiA}OWeg#YR1!k*suzEDtOlfmIdIq@d^7elHr?RMhGx`0zHaz&>*^Ja zd-{+(C}Z>o*nct=#0d*D*td_M5BbLr{{I2q^gbS7OY_YgZ3+Kt(=>6-76K{&3>8g6 zUaG+p-x@SY%?)**J`bPjplC>4M4T?&hT5NN5 zD4_88;X(0aw`}Kn^1?nrZ*`FH<8b=f@A}!bcc$}gX$A0s>#raeIt$humGVIxjGTys zNc;m3%^Z81@YgI1GdmSj4xl8$5@rM~0oB?MCp-)#8VhNZJOCUJD@Vd%8sA`s4i(W1 zp$zh%3C7^V?`QQ$QOtog;`AF27KGh9j`HlmL;Q=`)kU-`F7QcC_*H?|JA99#Z@ipJ z-bJ#j_Hzx-(PiPpoo-7?$|IYJ*TTqh!v+hGv6QH4r_%_&PFj*|si05 z%~yqU8)k3WsXDP-)v@;eJ@@g#0kdyMs2mYpJglc<5r~Y}l(Cg`W&2iNS}jBb zNx{}(Hh3a)%SpICIlx-WOnE)-8vMlXsY=!*P@9aj|I;zF2HCgcjym6fe zmYP;op)0UGliT;eQjm-;40Cz*cI*MvBO=XNWgJ&=)FAlLk<0CD`P>_-yxxg>!zGYg z6UfI>DkhA{ZPaqfhCHGf%?phDo`difUYUu8+;dNjBK?^t+X*)YJuUL5!E4_=;5*#vU&2<3Q{7vh zrg^2`oK%j#8qo(_&?NcGs4Mb|P`jhojXCDruLSdkMjLka@Hu{q3?t*AuWs5=t>1(> zQw@|vmA9}Mrx$wZM$*Qnr=S2jfoB}hBc@%E`z&rGB>P|mED9tvyY3*Zm@b~V_8UoR z`bV?LA1%tsm@^z-IYkmv*T!X0zqsgk`LVC}qoM@=mPH}niP?4tfGR>B@j8%+9xzf%tYz_>8f)f_X? z&ji`%sRkigYRS36R_SQ!6sBZXH|R??s*W^S%3#)52LSu+X0M4Cv#jWgH4!TpD>)C- zdAv#QVIv@vbBt7ye;e1|6q%D{5o>5LPKCDDqKH)9zVKZ&;bh<@vng~WN;}iBDqFtG zbaaQDKX+IiZv8U62FU`%^TuGF{c&Q)Sg`H1{}@I%8|H^yPR2g<t0vYcy}jTZ6q>r!iNHR zAR0%s<~^+C2!OjXV@#n|)}L;%Mr3k2LjF~dHlz)`0})%#df58QpP0tyvZEcDaaO!AAh|t=e zF=QB>tz~A2VZY)Atr|Xkt57Xw$pwUJUuL_7n@jnfg8)=5`Kh)W3JyQSZB~%FK#_OW zeS=XSswsW@s8!|jfb27Q+J+#q48}`Do&SK&&e59VF-U~SOWag@CK~k@(0Ay+-K|1I zq`XF7)_G1R#Dont*5qtuuoWX30t0)9`eqc|d}e@fff*Ee}WI#_q! zS5SWmipG!4Z^f0^gf$3@t$Q40ej#Cv^E4;gBRE3S4w{XRC{kDC?keAM4-aBKsD43G z45o5Xe1^#G?YxNiga9IFYkK<+5?iTZ-IcQ<9RcBd?!CF?8a{+>yK3)PAAT5BC6gTy z_$Y1$;_1PVpRwzeae9ACU?{ftLnjLAr10V#oMmm~^GZx{_TIbVx(_qzrV1y>vZHd9 z{=s14Jitl~2lZ&NJiUUG?Gv~9V|ii4wjF+!RT>el>!v2D#77sR6K_iFY=FK)j&u2m zq0xg@m3_BbO#qO0!YM9&*x(-U|71?G!JdNR@0RTW;{Sif<37LzWGCAxE-0ame7WOp zEu&-8gvH8Mf(teuRY!>~D zlNeqr7SQ13PL@Fr@T-Qd3OWP_fS@ z9yb#`bU&aN$RkA{TJ9w35PCcJ8%L&%Sw&3dVcLP*a=OMpGW2gE<&h%@=UK{`svcq< zxhbg)e}1BV(?R~Hq>{=qaNwwm^`KTt&N(%bvYs$U%E4NJ4FQZ(Pu+lU$zoxOWd=p3 z!)gnYg}5>V@WqG&|9z%}8NHHyn5FT1f?`v6wFViTVGTgzWY=wefX{ze{a!19`8A&7 zq2tnvUR^@X2b5#9Fg>|UE_%k{m$t?svkEJNo*QGbQk06E1<=eqA&p`Bk#vY!2Tuwg zDc^1O|L{i4md?s=ocn`kAsxs_O;@JQVOV&PwH7$O7-W^9(L1gq2e zrWyF?;%*$a^S`?iYW9H!b4l0f#Tfz6gO*(6Sj>;$v_@cOZ)*MM^OR^r*)Nd)iD*?Y zS%HdgL=S!=`v2<%ci72^iX8Xa$dWj8$H|MR<+o(lg{Zq7sL{pI^NGO4X@295B$9E^ z0|vXfP)5sVnP}WsRK23gM@@7?VxYkjY0%_osmj7k)PcCDolRoF1OuHG!NhidPENC2`Go0Ebg05Sz+8c?9_X$(Aj`EJh^4(1) zxs|D@sabjg{^9N<)XqnPt7}IaK;w3?n^TP~6GKA&OtA#vJQBpA4`_K(md9N%ay~K6 zj{)oknP8}ejCo48K9?tSVqYiBUByqWS*?ghI#rH9vI(OwAFGHtZ0#A)%j`uc_=tHf!&69FT zRw`JLop^Gf6r{z_BLDlEV-^qNs%9l~D%6Wy{a?~r8u{PJ&To)be1nwpdouIe$%4_s z$;i|;(GDH?|Hy1R>=21(T$12l!(|51jU3$3An*s~qG_eyPWZzA>lb1BN<3Ig@FHck)xXql5L_$;`G(zw9oz2#2z@bA;XV!>d?ODVS_l;^b85fcE^qB_4bU47nqV2LVPfN* zw3Y8_rK%agOViEQ!mPCCH2C*R z$#Ixmz*M&@L5Ik1>?MzhXsjr;^g3wKGuR#X{)myn(fnUF+)y^^^apA)^|mw3G{W7} z9~Dx!8KLp0M+(Egex7Ea3OW}8M+9qccn;gs7+q)pO#u3%r%;V9;#14EnYf6cqk14D z9OI0tySty+8t&mj6_Oe85tfrhxXHK=UlymFa0XC-EliDkZBXh zL@ENOD>N*G5hTLL#^evj%$N*EXBcmE0N5<$tBc9eAi@!Zm9U0+uJMYs2^AQs1yGm(iaN$R4QMMEi>`K(9 z7Uys6#h4Uk808f;^4(Mzty0nHOW3LHg7P9|)*-B*wIL@($tF*I%gh}KZ54qCV@&9V z4_;}3`YA#g6! z){JY|^pLZ?#t$cX*Nc4&LzHBt1OY>AV*{3ZEgrhXy%1)1)e?jh6j$Pr{^FGmav6|J zZn2d%B-oU33GzizW$zNS9?5qVAZu9+1R`s^_%S;yo3AH0d+dq2K2!2SU32iCg1Fu$!q4 z?YZQj-JYwz5kL6{C$Z#8-@6w^R0q|ne*a#w_Au0Ak`6z@0qsq;>AQB3egir&qi0Y) zna5rbmN9)`6S^ms7UPg<4ykoDjaK0@99fY}_Qvq%@QEZG3D3h%itFi45+Jmu%8wSU zp*ZNscbPoQ>m902O6P6?qXr*|+;&`7+>n&jt8X~^0h^KEYtN~N{4LF&1B@47>_*^7X5N4i#Q0 zemM+7NU>!cNg^F-W?J_TfF!~QQnhsY0nGdXF8&XD!(h6^yTMRF(R{u-HNMb-o`8~` zkP6$$51i_j{KJ z76=WE&mNXp*YATQ<75nDo?7gm4$pC~ny_frE)tQ8dm?EIcrLi<#pMuTz&tFlUl3z_;g-!xqEugsstc3GMNJR|nKJUa$VF`h)9B=G!i`bM z#G-0&)IB@@ntRKT1=*>Hm(2B1)iYEnBa9I=l@uM{H>yhrWf`}d^;VjzC(fjlkXkW@ zcM4Tx8JAYXF5H6+;WfUzlgd#udMZ+a`(u$?@a?jBm(559y92XkUh4kjN%_n!<-@PGR-9Hunkx4xO#=3A;1 z{2yj!lF)!o#x;QDwBI~oY>bmA2Z1-$&RoPm`SHV+`oHc){l82P@!$8NvbC%Xb%)|V zWirw^y}Vk?)*AQ?ZFfP>Q%?_H_K$hCY4LSPh_yQTgtbADxo|0>;8{PzMcu#&$I zi|_fOGGK&HdVB1H*Ei>LF~Yorw-St|5&1$cIf6B|G+1cTh#KosS+boL0#5L(JYA*n-KGm@TyOxWhj3N&#tLPx7 zDkEG*G4eXehmSFF^=}zPqU)kmJw@qR8tpH(^olVy{Cl&G7;SEO<>}cXu@Pf0VHwxO z@?@OvA*Akz6Zwr@`avp;mpILmOtL}65(BH6a|c7?0UUcq^;niqRSHgTR{5ANdsb;n z)#HRu@iPFVmrk`8)2cyJk`;Uc1@BPm%mZw^${f3POr@9ZmmB>`y_$O2oR%NAj^{C+ z-kDi3!|^yxFPjo-PAJ=1gZA>vAzyQwdLl)DGGTaHz1glIpZzfSzPdZP$eh$K5{!r@ z#>lG^nBl;1OSweXz_E!y$3_7ZPSRT?5|{9Fc`^W1UHihnX-qjT!3KVmE$n*C6)+P= z*5xE93OV^@=MiVcx)x!kb+cCxVP#P&g5%{UYrU#1?E-pNJ7`w(nPGM-jHqVwX_%qC z@RBRLMH@+`d6}QGQ!SR0lNl?fCgVR{d4rf)O?Ko1-=o5(Hkr0`0+}mUswxe(+M4TY zjE26Qx31^Q)tVbrP*rDe`Y2Ub3c>wL%#B-{YTXoRdFt{10+p3@){6P1u?y$Ra0B&< z#%y4kB?H5+u;_K;+dKYzVk1bbSK9r&*AO?kT)M0`v{|jPhYqd4-%t-BDXG4A7f<5m z!9tL9=LmL7ua4;i8-Hb9_8IncG@E2Y$7cqduiPo|wb9$ohxdTzOHtKJ#p$SwJ3r7x zwq(cvt`=9jO){}{N}<3*DhufQZe9)Piu`yJbHpUW5=wnSI$9dbt6F8F!7Ng2acqBE zwSYxdv&$opAGE@~7jZKfhe^}AHK&cuu92kaBuJ>u+^a+&{^lJ}S-q_?e2SA$z(oTb zC+)G4R!7+p$nggeWkj(ZDq%j7lg-)|ER5m0K25{ZK$~pI8KJqD(Ox@|*h8FQ6ehZ= ziDsr+t+q}2pPb4-gk+BBiRgmgK*89oO{3LmvbQVMS+8CU@C=TDQj3H+fKcgUVoRl2 zkq3dbht%3bYfrt~;M&7=hGTCfWRC$1vIP`cN(%yEFcDCYXTY*3ScQSCEEX7WkSc5! zbEcIMaN0>+f&{k5o)GhjMKzU?KkX=ycl*Q4g^pJ(tCph3oriPO#$AUdInJRHSi!Bv zt6_$cd)haq2nq(t`y4nqA2Z^`NSvutVami7rS%h+}68j`Q99Fo*S_d$+%IOgsaOeNCe4 zDhi0@04p;OMjr_rFpot4Vb6RCqM~2W!*l5Zrqf-WD1x@F6?wauZhGCv8lG9MGSFJx zSuKx09W0DX->kmqW_K1i(*+2C1Y@B3m7{fGAFqv9qHMrh{42d2Qb&8z!)HA!ofUjR z7AO&*qCdyoX^!A9t(Ij07wW8}6_3WO7=FV@l|Y-KMC-hjxLG(AUIVBoA0`4{|93w(3sB ztwh_nmbUS-uh~m!x?!Qjml5kZF(Z?|-N1!I4=|NB%*O@0z|w?nGI!so;_8X4R#$Dh z?Do?i0xy!W?Pq43Eg_lpsR`YTvOdx$k?3V!1_CF{z2G%YVRXb;)7 zg{VcbYP1(uL^c z>Gt?@u~_1_d&WbCqXRTU!|f*76yE3`0_tE^NfG*=U2 z7<@D+LO(>0&sUED)Xcgqe`@HcX07O9F}xgDIdBwx0?>+6q}b~F{5z_dIO|XH9x7QZ zb2?9HP!Y|EqdZ+CHVG$xP9P2k`UuS6stktf&kuyVKfAXWF0TNx;UI$*ZzOVA`RMQ; zObP7;ECe^f(G8A0S@7y+d>&GB)3(VUVIckcyb3gr1xN}NOqnm#6V2nakT_Wy9li&< zKP;J@0ls~0-5mUdGL8{7^L;~2Gc<)`-1$WhVy>Eh!PN39&PO^0Gus<{vCPJ25gYRf zGfQdvev?{8=VH*hXyVzD<8o(aiOye>;(WvM zjX9sK?)&TwD!&>px7R>*APT3hS#BOwAr^on!|OeztwNw-ORg>lTgjl+Ccm!SVH}g= zdv+X-Kr46Z|87~tj3Z587$Ba`W)d>b*s3QyVP#)`jIr9@m5$AKS#RmS0*qTPW#T_y zN(Di;UR-9P3QDDgh{ani_ zKXow^Lr=kW+!{wj4&p&0;e`+3Y9lxS9b3PB?dmMwH~qRl;QL4N@$sKDf&)UGU!f6y zj-DFeP;`)A3DJ3O^l#n991O)D@@@MMz{wx4@m<@TW?(ng{2f7Eu5MtmmsHVS%DENh z1J_|bSLP+M#Fp)*=r6^#VrKO*ZRA{)yVoP*Bs+|jNi6wX6CSl>-_K85%kbg{l!IL# z1uplWH0AUf#4j-9-aFFp)MNN#QkGYw7UDfh0RK|hyxV==w%bPkR`cxxdu-UhMlRaL z&A4>`XM^m-z2~&{(_{Q~*G}Na4(q6A|6W&6^)x{mDB{tcLJV9cf%~rglg4ekFCukP zRmcUpoxavTVax8DYenc=Ejd~`z|VbK5=noY%VC0=or(I;kLQ0QoP6kovzwfj#sWhg zukkCJh~4cMRtFEn1`a=le@0oJjEo*Nz;OF3M<4o9{e|sEy?HQdGHmUtkq8Ow?N8JG zZT4p)vcB`M-oLf340GSDFpqFQ6a74R*w=}$6ttVmic^8a?2qhTqBnE>G63`DaSshe zS0PXuLs;#PPF)>lqKyxS88USQdNsx@$opaY=pKKvoJFEl#E?sc`1vhQ5gP8ztBOlv z?%*On70Dx;%C)ecV97m|f_DHNS;ZrDBWRDnWib1VU-nye=PA5?#sZ>|}gXn0U=2OKD zedR2j#8t8=2Ssbi!!GB7_j6Bxu7n|>rlzq6aUpbG7Ws5Je#&;!-PYWUQK5GAw|H1Y zDW!7X6Q7(Rikvv=Ssencqrk=^lrd<_KFC8JwuUk3f+4Dj9V@{w27oUb_I718!eF1I zOLqLZ4nDUKd}NM>)NtIRX^h%3)!0Rfn&(i?HkBgS4Ao7FvS2=hp&bNsLOyIvfACQG z(+`68ko#eDqD^&skn=!Pmm2Vg{SLb(QE=aj8;I-dl$JvC^c}r)b~u3OAh^-Vg#B$k z#p91sUe1!3g7Z%90Ia&;xMv1J-Xgh#n=t!{#qe1-Pia3o@936P_JtUF?rmHc+Sg;$05MraPh@kn#oQGI5rUzr9eiPYs!jxwMw~4bSaoY5515 zP_4w3?pnjY#Tv!{nTHxJq67m`Vqyw%s)2fvWphS!Jd>910F=@rJYeiV6J2Y-8FWnU z;4cKcsof|MnCi)UIH!pxi~QMY)z20-w0S(%VA>iI)3`8RsyzivWDRDHoOw+G7}kzL|Bkm=*%+gi;%5vB?`@j(KU(|tgj?x?pNwFje^y!v?v z;;32|rZNd)z%Oye=}q_dpoRd=oc>=RAG?%C@_Xe|rUnCTT(QSp0mnV@79|ha@>7)g zv)ohnFDtTe4^;fWG&`^%>FFL>QD1N9=oNDE`4?ueU4g%Lxu=yLtWFkhvVg~HFk83a zCHTsXZ-^!&=?J^v8|3XX4!r$!?-hj3nG=YH1dgpK01v+2^qcm-KQK7dOZ?jrBTpjz z=t{0r7QJZb-4{{b@j}1XRg9!hOBxTkIrWexl1!Oq3R**!h&mDqn~sb=(M)`Uel(u# z3i_+6H^HAI{~h?OR|kxc%YlP{!-Bqvk!Oha5DUUV?#&RI|EH^Sk80w|<2cTmf=D1O zkB~5mJVGJiC6DrmfYhV1pde6L6$Qg9P_(>6l2V9S6!d^#xu7iw^w3z0t41DCDPUxy zL>?ljtI(AMLP9WrBv>n`lpSWFJ<~a7&b@Qz^ZR9zxw(Jb@9%f-Q(B{ojjX&w_rO?i zC<|h*=`d1pCaCYeFVV{uUyb;THuDXY>^Nh`|Mth4D8=5pQF#QsXG~X7TngOxxH4}4 zwf2D`PqQ}RLbvHD6}wjQ%fvz9fNiq+zAxEBV4d=4!Q;~DYn*10|jAyJxdSf+kg7dXK@$$2RRq)e|YMSjP+@t$I=TTuEuS63BP6YgjoA zl|wcTxjr+Lo(##((~lpy>E=YV)r}KNq(-iImrT#H+?s!0aQxYmH{1(rGAzZP2c2y@ zc=`h8OhJ|YvxJ!RUqjlv_Vfdy){9lMpKz{0OPf>0oqtj6wa=G*S^Js=_N#yEtaj+#C=T!WZ2oBR zq@LL)+lEwP=p*dX?eZU4364PJGCTr#QOjoIE8_9Lh7#GWkWVHg1Zn&Fhj% z@)HB9NNyGuTZ(&Pxq@`%l_viq!Gdbn5q|ZT9SzfgF*tF`>q7l(Vp{l*FSfrg6^Z9t z({;pGOuPs31EliWw8+66Jr|MEX))|xbIuv2Nc@TPW{B3MWogl*cJB@Hhn2N@&OnCqoC=7L73MG?1ptW;60l}!Ge6T2u`GJ4Co)aG*1iBNw| z2|xC3uF3W&4|m%Jvw7|8ypbyDdXm5}wAK6V;MH557hCAVy+>623BQMZxUfDe^f&Rp zYZgR@a?UfR`yRZndup6=MhLCdr{^}-5V=gtEv;dUFB$Wjj&H$bX`=ZjcFx_VI7{|f zU;Hp&y`UGqK6U5EVGRC03G*PaE}ht1wzaYDk$=B`=bdV~GeZO}whg^y9h*BYck3@> za(v#?hByUNHp8*qzgJHS<`kM1dItWbAd$1-Wt6c)j8?fA(A*zAVMtya3aB?lBqw9! zTuur?Wv4`^_#-Lc_WF$mN=$Z;Aq7j=8(0E&DY-digtP{KWjJZ*Z-~gGM$)vMK$+AQ z7^+PGN9_uwegqoTp0Gsuif@6;ckM#rK|K&hs|Sx8stYovcEEpbTCbyHwR#sRdEB;j zU@&(B&`h~PKbwQGa(9q3N&tz|WatVBaHnIT#!U!difr|VNLtgjFlG}#jHhgy6_5ye zqy%6!LxvKZ(58qPOBl1&48|_h8HJFYX8?c39LB7Aj{&uwDmctwQ{2BVkNuV5In zbQQ)%Z#N3v?W6$wECI%>gM(Cb+zw0xV=y$Rin;8_QA$>5xUJ1`ujLSCszl>|JDkWPWTxS~-qG?@m*>|r1p4TSPD(CWr9A4r;s zR;6YJfUF^acQCD4P#OpFcAL)3Tfmt92(9HHjSG?YfmAKL4Y$(fH9$_7)xOhYS};T zh(n`lz!G9Z98 z2L|cBK%^kxP#GB1DNP|t73zLj{Z%T>aHx`2K4A)3)vUDJ!KiM5{Ajn4f2teCBjE@1 z3;cK6$ID(}%oH{TOsGde*Bu*C5Hp310c$TIpf$))xkB@|fI8Y9^s1;3?k-Zb2BgW) zAO|rBpG<-l?}6E5`f~TN|Ld5w>W{}A=)#O(AIUbu%R|=c!Q)y>Fu*@#8%%JB=)T-H P+;zlAyf701baeg)J&AD9 diff --git a/modules/openapi-generator-gradle-plugin/gradle/wrapper/gradle-wrapper.properties b/modules/openapi-generator-gradle-plugin/gradle/wrapper/gradle-wrapper.properties index 0ebb3108e2..f398c33c4b 100644 --- a/modules/openapi-generator-gradle-plugin/gradle/wrapper/gradle-wrapper.properties +++ b/modules/openapi-generator-gradle-plugin/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip +networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/modules/openapi-generator-gradle-plugin/gradlew b/modules/openapi-generator-gradle-plugin/gradlew index dff5c7d940..65dcd68d65 100755 --- a/modules/openapi-generator-gradle-plugin/gradlew +++ b/modules/openapi-generator-gradle-plugin/gradlew @@ -1,7 +1,7 @@ -#!/usr/bin/env sh +#!/bin/sh # -# Copyright 2015 the original author or authors. +# Copyright © 2015-2021 the original authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -17,67 +17,101 @@ # ############################################################################## -## -## Gradle start up script for UN*X -## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# ############################################################################## # Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='-Dfile.encoding=UTF-8 "-Xmx64m" "-Xms64m"' +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" +MAX_FD=maximum warn () { echo "$*" -} +} >&2 die () { echo echo "$*" echo exit 1 -} +} >&2 # OS specific support (must be 'true' or 'false'). cygwin=false msys=false darwin=false nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; esac CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar @@ -87,9 +121,9 @@ CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" + JAVACMD=$JAVA_HOME/jre/sh/java else - JAVACMD="$JAVA_HOME/bin/java" + JAVACMD=$JAVA_HOME/bin/java fi if [ ! -x "$JAVACMD" ] ; then die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME @@ -98,7 +132,7 @@ Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi else - JAVACMD="java" + JAVACMD=java which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the @@ -106,80 +140,105 @@ location of your Java installation." fi # Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin or MSYS, switch paths to Windows format before running java -if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=`expr $i + 1` - done - case $i in - 0) set -- ;; - 1) set -- "$args0" ;; - 2) set -- "$args0" "$args1" ;; - 3) set -- "$args0" "$args1" "$args2" ;; - 4) set -- "$args0" "$args1" "$args2" "$args3" ;; - 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC3045 + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC3045 + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" esac fi -# Escape application args -save () { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " -} -APP_ARGS=`save "$@"` +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. -# Collect all arguments for the java command, following the shell quoting and substitution rules -eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' exec "$JAVACMD" "$@" diff --git a/modules/openapi-generator-gradle-plugin/gradlew.bat b/modules/openapi-generator-gradle-plugin/gradlew.bat index 6a68175eb7..93e3f59f13 100644 --- a/modules/openapi-generator-gradle-plugin/gradlew.bat +++ b/modules/openapi-generator-gradle-plugin/gradlew.bat @@ -14,7 +14,7 @@ @rem limitations under the License. @rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +25,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -33,14 +34,14 @@ set APP_HOME=%DIRNAME% for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS=-Dfile.encoding=UTF-8 "-Xmx64m" "-Xms64m" +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" @rem Find java.exe if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute echo. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. @@ -75,13 +76,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/modules/openapi-generator-gradle-plugin/pom.xml b/modules/openapi-generator-gradle-plugin/pom.xml index 8956856cc3..64b7f7d021 100644 --- a/modules/openapi-generator-gradle-plugin/pom.xml +++ b/modules/openapi-generator-gradle-plugin/pom.xml @@ -17,14 +17,14 @@ true - 5.6.4 + 7.6 Gradle Releases Gradle Releases repository - https://repo.gradle.org/gradle/libs-releases-local/ + https://repo.gradle.org/gradle/libs-releases/ true @@ -94,10 +94,8 @@ clean - check - assemble + build publishToMavenLocal - publishPluginMavenPublicationToMavenLocal @@ -106,7 +104,7 @@ org.gradle gradle-tooling-api - 5.6.4 + ${gradleVersion} diff --git a/modules/openapi-generator-gradle-plugin/settings.gradle b/modules/openapi-generator-gradle-plugin/settings.gradle index dfb2ecf250..3be0e4fe4a 100644 --- a/modules/openapi-generator-gradle-plugin/settings.gradle +++ b/modules/openapi-generator-gradle-plugin/settings.gradle @@ -1,3 +1 @@ -rootProject.name = 'openapi-generator-gradle-plugin' -enableFeaturePreview('STABLE_PUBLISHING') - +rootProject.name = "openapi-generator-gradle-plugin" diff --git a/modules/openapi-generator-gradle-plugin/src/test/kotlin/GenerateTaskFromCacheTest.kt b/modules/openapi-generator-gradle-plugin/src/test/kotlin/GenerateTaskFromCacheTest.kt index 2f573c94a1..8f13764b45 100644 --- a/modules/openapi-generator-gradle-plugin/src/test/kotlin/GenerateTaskFromCacheTest.kt +++ b/modules/openapi-generator-gradle-plugin/src/test/kotlin/GenerateTaskFromCacheTest.kt @@ -22,7 +22,7 @@ class GenerateTaskFromCacheTest : TestBase() { } @DataProvider(name = "gradle_version_provider") - private fun gradleVersionProvider(): Array> = arrayOf(arrayOf("6.9.2"), arrayOf("7.5.1")) + private fun gradleVersionProvider(): Array> = arrayOf(arrayOf("6.9.3"), arrayOf("7.6")) // inputSpec tests diff --git a/modules/openapi-generator-gradle-plugin/src/test/kotlin/GenerateTaskUpToDateTest.kt b/modules/openapi-generator-gradle-plugin/src/test/kotlin/GenerateTaskUpToDateTest.kt index 8510135b0d..24edd7602c 100644 --- a/modules/openapi-generator-gradle-plugin/src/test/kotlin/GenerateTaskUpToDateTest.kt +++ b/modules/openapi-generator-gradle-plugin/src/test/kotlin/GenerateTaskUpToDateTest.kt @@ -9,7 +9,7 @@ import kotlin.test.assertEquals class GenerateTaskUpToDateTest : TestBase() { @DataProvider(name = "gradle_version_provider") - private fun gradleVersionProvider(): Array> = arrayOf(arrayOf("6.9.2"), arrayOf("7.5.1")) + private fun gradleVersionProvider(): Array> = arrayOf(arrayOf("6.9.3"), arrayOf("7.6")) // inputSpec tests diff --git a/shippable.yml b/shippable.yml index 009806b31a..bc4c028a21 100644 --- a/shippable.yml +++ b/shippable.yml @@ -14,11 +14,11 @@ build: - apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 23E7166788B63E1E 6A030B21BA07F4FB 4B8EC3BAABDC4346 EB3E94ADBE1229CF 960B2B2623A0BD5D 6B05F25D762E3157 #- rm /etc/apt/sources.list.d/jonathonf-ubuntu-backports-xenial.list - rm /etc/apt/sources.list.d/basho_riak.list - # install gradle 5.6.4 - - wget https://services.gradle.org/distributions/gradle-5.6.4-bin.zip + # install Gradle 7.6 + - wget https://services.gradle.org/distributions/gradle-7.6-bin.zip - sudo mkdir /opt/gradle - - unzip -d /opt/gradle gradle-5.6.4-bin.zip - - export PATH=/opt/gradle/gradle-5.6.4/bin:$PATH + - unzip -d /opt/gradle gradle-7.6-bin.zip + - export PATH=/opt/gradle/gradle-7.6/bin:$PATH - gradle -v - java -version # ensure all modifications created by 'mature' generators are in the git repo From 77e06466dbfdd4cdc600e8dabca96ded69bc0535 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Wed, 30 Nov 2022 12:38:05 +0800 Subject: [PATCH 065/189] Cleanup Shippable CI config and file (#14145) * clean up shippable ci related config and files * comment out closeAndReleaseRepository * Revert "comment out closeAndReleaseRepository" This reverts commit 5a76e403b1419950b229e14199970b2e858da017. * remove closeAndReleaseRepository --- .travis.yml | 4 ---- pom.xml | 18 ------------------ shippable.yml | 50 -------------------------------------------------- 3 files changed, 72 deletions(-) delete mode 100644 shippable.yml diff --git a/.travis.yml b/.travis.yml index 10fc38a006..01635d62a2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -160,8 +160,6 @@ after_success: echo "Finished mvn clean deploy for $TRAVIS_BRANCH"; pushd .; cd modules/openapi-generator-gradle-plugin; - ./gradlew -Psigning.keyId="$SIGNING_KEY" -Psigning.password="$SIGNING_PASSPHRASE" -Psigning.secretKeyRingFile="${TRAVIS_BUILD_DIR}/sec.gpg" -PossrhUsername="${SONATYPE_USERNAME}" -PossrhPassword="${SONATYPE_PASSWORD}" publishPluginMavenPublicationToSonatypeRepository closeAndReleaseRepository; - echo "Finished ./gradlew publishPluginMavenPublicationToSonatypeRepository closeAndReleaseRepository"; popd; elif [ -z $TRAVIS_TAG ] && [[ "$TRAVIS_BRANCH" =~ ^[0-9]+\.[0-9]+\.x$ ]]; then echo "Publishing from branch $TRAVIS_BRANCH"; @@ -169,8 +167,6 @@ after_success: echo "Finished mvn clean deploy for $TRAVIS_BRANCH"; pushd .; cd modules/openapi-generator-gradle-plugin; - ./gradlew -PossrhUsername="${SONATYPE_USERNAME}" -PossrhPassword="${SONATYPE_PASSWORD}" publishPluginMavenPublicationToSonatypeRepository closeAndReleaseRepository; - echo "Finished ./gradlew publishPluginMavenPublicationToSonatypeRepository closeAndReleaseRepository"; popd; fi; if [ -n $TRAVIS_TAG ] && [[ "$TRAVIS_TAG" =~ ^[v][0-9]+\.[0-9]+\.[0-9]+$ ]]; then diff --git a/pom.xml b/pom.xml index fec9d30b50..fd1e378eff 100644 --- a/pom.xml +++ b/pom.xml @@ -1300,24 +1300,6 @@ samples/client/petstore/java-micronaut-client - - - samples.shippable - - - env - samples.shippable - - - - - samples/openapi3/client/elm - - samples/client/petstore/erlang-client - samples/client/petstore/erlang-proper - - - samples.misc diff --git a/shippable.yml b/shippable.yml deleted file mode 100644 index bc4c028a21..0000000000 --- a/shippable.yml +++ /dev/null @@ -1,50 +0,0 @@ -language: java - -jdk: -- openjdk11 - -build: - cache: true - cache_dir_list: - - $HOME/.m2 - - $HOME/.stack - - $SHIPPABLE_REPO_DIR/samples/client/petstore/elixir/deps - ci: - # fix shippable apt-get errors - - apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 23E7166788B63E1E 6A030B21BA07F4FB 4B8EC3BAABDC4346 EB3E94ADBE1229CF 960B2B2623A0BD5D 6B05F25D762E3157 - #- rm /etc/apt/sources.list.d/jonathonf-ubuntu-backports-xenial.list - - rm /etc/apt/sources.list.d/basho_riak.list - # install Gradle 7.6 - - wget https://services.gradle.org/distributions/gradle-7.6-bin.zip - - sudo mkdir /opt/gradle - - unzip -d /opt/gradle gradle-7.6-bin.zip - - export PATH=/opt/gradle/gradle-7.6/bin:$PATH - - gradle -v - - java -version - # ensure all modifications created by 'mature' generators are in the git repo - # below move to CircleCI ./bin/utils/ensure-up-to-date - # prepare environment for tests - #- sudo apt-get update -qq - # install stack - #- curl -sSL https://get.haskellstack.org/ | sh - #- stack upgrade - #- stack --version - # install elixir - #- sudo apt-get install erlang - - wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb && sudo dpkg -i erlang-solutions_1.0_all.deb - - sudo apt-get update - - sudo apt-get install elixir - # install elm - - curl -SL https://github.com/elm/compiler/releases/download/0.19.1/binary-for-linux-64-bit.gz | zcat > /usr/local/bin/elm - - chmod +x /usr/local/bin/elm - # install rebar3 - - wget https://s3.amazonaws.com/rebar3/rebar3 && chmod +x rebar3 && cp rebar3 /usr/bin - # install php - #- apt-get install php - # show version - #- php -v - - rebar3 -v - - elixir --version - - mix --version - # test samples defined in pom.xml - - mvn --no-snapshot-updates --quiet verify -P samples.shippable -Dmaven.javadoc.skip=true From 12fd115af3d72ff5cef59dacc6fab3f9d4c47b7e Mon Sep 17 00:00:00 2001 From: Ladd Van Tol Date: Wed, 30 Nov 2022 01:35:07 -0800 Subject: [PATCH 066/189] Support RawRepresentable enums (#14144) * Support raw representable enums * Update samples --- .../main/resources/swift5/APIHelper.mustache | 35 +++++++++---------- .../Classes/OpenAPIs/APIHelper.swift | 35 +++++++++---------- .../Classes/OpenAPIs/APIHelper.swift | 35 +++++++++---------- .../Classes/OpenAPIs/APIHelper.swift | 35 +++++++++---------- .../Classes/OpenAPIs/APIHelper.swift | 35 +++++++++---------- .../Classes/OpenAPIs/APIHelper.swift | 35 +++++++++---------- .../Classes/OpenAPIs/APIHelper.swift | 35 +++++++++---------- .../Classes/OpenAPIs/APIHelper.swift | 35 +++++++++---------- .../Classes/OpenAPIs/APIHelper.swift | 35 +++++++++---------- .../Classes/OpenAPIs/APIHelper.swift | 35 +++++++++---------- .../Classes/OpenAPIs/APIHelper.swift | 35 +++++++++---------- .../Classes/OpenAPIs/APIHelper.swift | 35 +++++++++---------- .../Classes/OpenAPIs/APIHelper.swift | 35 +++++++++---------- .../Classes/OpenAPIs/APIHelper.swift | 35 +++++++++---------- .../Sources/PetstoreClient/APIHelper.swift | 35 +++++++++---------- .../Classes/OpenAPIs/APIHelper.swift | 35 +++++++++---------- 16 files changed, 256 insertions(+), 304 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/swift5/APIHelper.mustache b/modules/openapi-generator/src/main/resources/swift5/APIHelper.mustache index 95cf790b28..f7c727964c 100644 --- a/modules/openapi-generator/src/main/resources/swift5/APIHelper.mustache +++ b/modules/openapi-generator/src/main/resources/swift5/APIHelper.mustache @@ -25,13 +25,10 @@ import Vapor{{/useVapor}} return source.reduce(into: [String: String]()) { result, item in if let collection = item.value as? [Any?] { result[item.key] = collection - .compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + .compactMap { value in convertAnyToString(value) } .joined(separator: ",") } else if let value: Any = item.value { - result[item.key] = "\(value)" + result[item.key] = convertAnyToString(value) } } } @@ -51,13 +48,19 @@ import Vapor{{/useVapor}} } } + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static func convertAnyToString(_ value: Any?) -> String? { + guard let value = value else { return nil } + if let value = value as? any RawRepresentable { + return "\(value.rawValue)" + } else { + return "\(value)" + } + } + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static func mapValueToPathItem(_ source: Any) -> Any { if let collection = source as? [Any?] { return collection - .compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + .compactMap { value in convertAnyToString(value) } .joined(separator: ",") } return source @@ -70,10 +73,7 @@ import Vapor{{/useVapor}} let destination = source.filter { $0.value.wrappedValue != nil }.reduce(into: [URLQueryItem]()) { result, item in if let collection = item.value.wrappedValue as? [Any?] { - let collectionValues: [String] = collection.compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + let collectionValues: [String] = collection.compactMap { value in convertAnyToString(value) } if !item.value.isExplode { result.append(URLQueryItem(name: item.key, value: collectionValues.joined(separator: ","))) @@ -85,7 +85,7 @@ import Vapor{{/useVapor}} } } else if let value = item.value.wrappedValue { - result.append(URLQueryItem(name: item.key, value: "\(value)")) + result.append(URLQueryItem(name: item.key, value: convertAnyToString(value))) } } @@ -102,16 +102,13 @@ import Vapor{{/useVapor}} let destination = source.filter { $0.value != nil }.reduce(into: [URLQueryItem]()) { result, item in if let collection = item.value as? [Any?] { collection - .compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + .compactMap { value in convertAnyToString(value) } .forEach { value in result.append(URLQueryItem(name: item.key, value: value)) } } else if let value = item.value { - result.append(URLQueryItem(name: item.key, value: "\(value)")) + result.append(URLQueryItem(name: item.key, value: convertAnyToString(value))) } } 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 03f3b1259b..93c5c76260 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -24,13 +24,10 @@ public struct APIHelper { return source.reduce(into: [String: String]()) { result, item in if let collection = item.value as? [Any?] { result[item.key] = collection - .compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + .compactMap { value in convertAnyToString(value) } .joined(separator: ",") } else if let value: Any = item.value { - result[item.key] = "\(value)" + result[item.key] = convertAnyToString(value) } } } @@ -50,13 +47,19 @@ public struct APIHelper { } } + public static func convertAnyToString(_ value: Any?) -> String? { + guard let value = value else { return nil } + if let value = value as? any RawRepresentable { + return "\(value.rawValue)" + } else { + return "\(value)" + } + } + public static func mapValueToPathItem(_ source: Any) -> Any { if let collection = source as? [Any?] { return collection - .compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + .compactMap { value in convertAnyToString(value) } .joined(separator: ",") } return source @@ -69,10 +72,7 @@ public struct APIHelper { let destination = source.filter { $0.value.wrappedValue != nil }.reduce(into: [URLQueryItem]()) { result, item in if let collection = item.value.wrappedValue as? [Any?] { - let collectionValues: [String] = collection.compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + let collectionValues: [String] = collection.compactMap { value in convertAnyToString(value) } if !item.value.isExplode { result.append(URLQueryItem(name: item.key, value: collectionValues.joined(separator: ","))) @@ -84,7 +84,7 @@ public struct APIHelper { } } else if let value = item.value.wrappedValue { - result.append(URLQueryItem(name: item.key, value: "\(value)")) + result.append(URLQueryItem(name: item.key, value: convertAnyToString(value))) } } @@ -101,16 +101,13 @@ public struct APIHelper { let destination = source.filter { $0.value != nil }.reduce(into: [URLQueryItem]()) { result, item in if let collection = item.value as? [Any?] { collection - .compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + .compactMap { value in convertAnyToString(value) } .forEach { value in result.append(URLQueryItem(name: item.key, value: value)) } } else if let value = item.value { - result.append(URLQueryItem(name: item.key, value: "\(value)")) + result.append(URLQueryItem(name: item.key, value: convertAnyToString(value))) } } diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift index 03f3b1259b..93c5c76260 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -24,13 +24,10 @@ public struct APIHelper { return source.reduce(into: [String: String]()) { result, item in if let collection = item.value as? [Any?] { result[item.key] = collection - .compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + .compactMap { value in convertAnyToString(value) } .joined(separator: ",") } else if let value: Any = item.value { - result[item.key] = "\(value)" + result[item.key] = convertAnyToString(value) } } } @@ -50,13 +47,19 @@ public struct APIHelper { } } + public static func convertAnyToString(_ value: Any?) -> String? { + guard let value = value else { return nil } + if let value = value as? any RawRepresentable { + return "\(value.rawValue)" + } else { + return "\(value)" + } + } + public static func mapValueToPathItem(_ source: Any) -> Any { if let collection = source as? [Any?] { return collection - .compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + .compactMap { value in convertAnyToString(value) } .joined(separator: ",") } return source @@ -69,10 +72,7 @@ public struct APIHelper { let destination = source.filter { $0.value.wrappedValue != nil }.reduce(into: [URLQueryItem]()) { result, item in if let collection = item.value.wrappedValue as? [Any?] { - let collectionValues: [String] = collection.compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + let collectionValues: [String] = collection.compactMap { value in convertAnyToString(value) } if !item.value.isExplode { result.append(URLQueryItem(name: item.key, value: collectionValues.joined(separator: ","))) @@ -84,7 +84,7 @@ public struct APIHelper { } } else if let value = item.value.wrappedValue { - result.append(URLQueryItem(name: item.key, value: "\(value)")) + result.append(URLQueryItem(name: item.key, value: convertAnyToString(value))) } } @@ -101,16 +101,13 @@ public struct APIHelper { let destination = source.filter { $0.value != nil }.reduce(into: [URLQueryItem]()) { result, item in if let collection = item.value as? [Any?] { collection - .compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + .compactMap { value in convertAnyToString(value) } .forEach { value in result.append(URLQueryItem(name: item.key, value: value)) } } else if let value = item.value { - result.append(URLQueryItem(name: item.key, value: "\(value)")) + result.append(URLQueryItem(name: item.key, value: convertAnyToString(value))) } } 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 03f3b1259b..93c5c76260 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -24,13 +24,10 @@ public struct APIHelper { return source.reduce(into: [String: String]()) { result, item in if let collection = item.value as? [Any?] { result[item.key] = collection - .compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + .compactMap { value in convertAnyToString(value) } .joined(separator: ",") } else if let value: Any = item.value { - result[item.key] = "\(value)" + result[item.key] = convertAnyToString(value) } } } @@ -50,13 +47,19 @@ public struct APIHelper { } } + public static func convertAnyToString(_ value: Any?) -> String? { + guard let value = value else { return nil } + if let value = value as? any RawRepresentable { + return "\(value.rawValue)" + } else { + return "\(value)" + } + } + public static func mapValueToPathItem(_ source: Any) -> Any { if let collection = source as? [Any?] { return collection - .compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + .compactMap { value in convertAnyToString(value) } .joined(separator: ",") } return source @@ -69,10 +72,7 @@ public struct APIHelper { let destination = source.filter { $0.value.wrappedValue != nil }.reduce(into: [URLQueryItem]()) { result, item in if let collection = item.value.wrappedValue as? [Any?] { - let collectionValues: [String] = collection.compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + let collectionValues: [String] = collection.compactMap { value in convertAnyToString(value) } if !item.value.isExplode { result.append(URLQueryItem(name: item.key, value: collectionValues.joined(separator: ","))) @@ -84,7 +84,7 @@ public struct APIHelper { } } else if let value = item.value.wrappedValue { - result.append(URLQueryItem(name: item.key, value: "\(value)")) + result.append(URLQueryItem(name: item.key, value: convertAnyToString(value))) } } @@ -101,16 +101,13 @@ public struct APIHelper { let destination = source.filter { $0.value != nil }.reduce(into: [URLQueryItem]()) { result, item in if let collection = item.value as? [Any?] { collection - .compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + .compactMap { value in convertAnyToString(value) } .forEach { value in result.append(URLQueryItem(name: item.key, value: value)) } } else if let value = item.value { - result.append(URLQueryItem(name: item.key, value: "\(value)")) + result.append(URLQueryItem(name: item.key, value: convertAnyToString(value))) } } 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 03f3b1259b..93c5c76260 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIHelper.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -24,13 +24,10 @@ public struct APIHelper { return source.reduce(into: [String: String]()) { result, item in if let collection = item.value as? [Any?] { result[item.key] = collection - .compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + .compactMap { value in convertAnyToString(value) } .joined(separator: ",") } else if let value: Any = item.value { - result[item.key] = "\(value)" + result[item.key] = convertAnyToString(value) } } } @@ -50,13 +47,19 @@ public struct APIHelper { } } + public static func convertAnyToString(_ value: Any?) -> String? { + guard let value = value else { return nil } + if let value = value as? any RawRepresentable { + return "\(value.rawValue)" + } else { + return "\(value)" + } + } + public static func mapValueToPathItem(_ source: Any) -> Any { if let collection = source as? [Any?] { return collection - .compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + .compactMap { value in convertAnyToString(value) } .joined(separator: ",") } return source @@ -69,10 +72,7 @@ public struct APIHelper { let destination = source.filter { $0.value.wrappedValue != nil }.reduce(into: [URLQueryItem]()) { result, item in if let collection = item.value.wrappedValue as? [Any?] { - let collectionValues: [String] = collection.compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + let collectionValues: [String] = collection.compactMap { value in convertAnyToString(value) } if !item.value.isExplode { result.append(URLQueryItem(name: item.key, value: collectionValues.joined(separator: ","))) @@ -84,7 +84,7 @@ public struct APIHelper { } } else if let value = item.value.wrappedValue { - result.append(URLQueryItem(name: item.key, value: "\(value)")) + result.append(URLQueryItem(name: item.key, value: convertAnyToString(value))) } } @@ -101,16 +101,13 @@ public struct APIHelper { let destination = source.filter { $0.value != nil }.reduce(into: [URLQueryItem]()) { result, item in if let collection = item.value as? [Any?] { collection - .compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + .compactMap { value in convertAnyToString(value) } .forEach { value in result.append(URLQueryItem(name: item.key, value: value)) } } else if let value = item.value { - result.append(URLQueryItem(name: item.key, value: "\(value)")) + result.append(URLQueryItem(name: item.key, value: convertAnyToString(value))) } } 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 03f3b1259b..93c5c76260 100644 --- a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/APIHelper.swift +++ b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -24,13 +24,10 @@ public struct APIHelper { return source.reduce(into: [String: String]()) { result, item in if let collection = item.value as? [Any?] { result[item.key] = collection - .compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + .compactMap { value in convertAnyToString(value) } .joined(separator: ",") } else if let value: Any = item.value { - result[item.key] = "\(value)" + result[item.key] = convertAnyToString(value) } } } @@ -50,13 +47,19 @@ public struct APIHelper { } } + public static func convertAnyToString(_ value: Any?) -> String? { + guard let value = value else { return nil } + if let value = value as? any RawRepresentable { + return "\(value.rawValue)" + } else { + return "\(value)" + } + } + public static func mapValueToPathItem(_ source: Any) -> Any { if let collection = source as? [Any?] { return collection - .compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + .compactMap { value in convertAnyToString(value) } .joined(separator: ",") } return source @@ -69,10 +72,7 @@ public struct APIHelper { let destination = source.filter { $0.value.wrappedValue != nil }.reduce(into: [URLQueryItem]()) { result, item in if let collection = item.value.wrappedValue as? [Any?] { - let collectionValues: [String] = collection.compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + let collectionValues: [String] = collection.compactMap { value in convertAnyToString(value) } if !item.value.isExplode { result.append(URLQueryItem(name: item.key, value: collectionValues.joined(separator: ","))) @@ -84,7 +84,7 @@ public struct APIHelper { } } else if let value = item.value.wrappedValue { - result.append(URLQueryItem(name: item.key, value: "\(value)")) + result.append(URLQueryItem(name: item.key, value: convertAnyToString(value))) } } @@ -101,16 +101,13 @@ public struct APIHelper { let destination = source.filter { $0.value != nil }.reduce(into: [URLQueryItem]()) { result, item in if let collection = item.value as? [Any?] { collection - .compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + .compactMap { value in convertAnyToString(value) } .forEach { value in result.append(URLQueryItem(name: item.key, value: value)) } } else if let value = item.value { - result.append(URLQueryItem(name: item.key, value: "\(value)")) + result.append(URLQueryItem(name: item.key, value: convertAnyToString(value))) } } diff --git a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/APIHelper.swift index 03f3b1259b..93c5c76260 100644 --- a/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/APIHelper.swift +++ b/samples/client/petstore/swift5/frozenEnums/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -24,13 +24,10 @@ public struct APIHelper { return source.reduce(into: [String: String]()) { result, item in if let collection = item.value as? [Any?] { result[item.key] = collection - .compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + .compactMap { value in convertAnyToString(value) } .joined(separator: ",") } else if let value: Any = item.value { - result[item.key] = "\(value)" + result[item.key] = convertAnyToString(value) } } } @@ -50,13 +47,19 @@ public struct APIHelper { } } + public static func convertAnyToString(_ value: Any?) -> String? { + guard let value = value else { return nil } + if let value = value as? any RawRepresentable { + return "\(value.rawValue)" + } else { + return "\(value)" + } + } + public static func mapValueToPathItem(_ source: Any) -> Any { if let collection = source as? [Any?] { return collection - .compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + .compactMap { value in convertAnyToString(value) } .joined(separator: ",") } return source @@ -69,10 +72,7 @@ public struct APIHelper { let destination = source.filter { $0.value.wrappedValue != nil }.reduce(into: [URLQueryItem]()) { result, item in if let collection = item.value.wrappedValue as? [Any?] { - let collectionValues: [String] = collection.compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + let collectionValues: [String] = collection.compactMap { value in convertAnyToString(value) } if !item.value.isExplode { result.append(URLQueryItem(name: item.key, value: collectionValues.joined(separator: ","))) @@ -84,7 +84,7 @@ public struct APIHelper { } } else if let value = item.value.wrappedValue { - result.append(URLQueryItem(name: item.key, value: "\(value)")) + result.append(URLQueryItem(name: item.key, value: convertAnyToString(value))) } } @@ -101,16 +101,13 @@ public struct APIHelper { let destination = source.filter { $0.value != nil }.reduce(into: [URLQueryItem]()) { result, item in if let collection = item.value as? [Any?] { collection - .compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + .compactMap { value in convertAnyToString(value) } .forEach { value in result.append(URLQueryItem(name: item.key, value: value)) } } else if let value = item.value { - result.append(URLQueryItem(name: item.key, value: "\(value)")) + result.append(URLQueryItem(name: item.key, value: convertAnyToString(value))) } } 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 b265c06f0f..84d22f4133 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIHelper.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -24,13 +24,10 @@ internal struct APIHelper { return source.reduce(into: [String: String]()) { result, item in if let collection = item.value as? [Any?] { result[item.key] = collection - .compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + .compactMap { value in convertAnyToString(value) } .joined(separator: ",") } else if let value: Any = item.value { - result[item.key] = "\(value)" + result[item.key] = convertAnyToString(value) } } } @@ -50,13 +47,19 @@ internal struct APIHelper { } } + internal static func convertAnyToString(_ value: Any?) -> String? { + guard let value = value else { return nil } + if let value = value as? any RawRepresentable { + return "\(value.rawValue)" + } else { + return "\(value)" + } + } + internal static func mapValueToPathItem(_ source: Any) -> Any { if let collection = source as? [Any?] { return collection - .compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + .compactMap { value in convertAnyToString(value) } .joined(separator: ",") } return source @@ -69,10 +72,7 @@ internal struct APIHelper { let destination = source.filter { $0.value.wrappedValue != nil }.reduce(into: [URLQueryItem]()) { result, item in if let collection = item.value.wrappedValue as? [Any?] { - let collectionValues: [String] = collection.compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + let collectionValues: [String] = collection.compactMap { value in convertAnyToString(value) } if !item.value.isExplode { result.append(URLQueryItem(name: item.key, value: collectionValues.joined(separator: ","))) @@ -84,7 +84,7 @@ internal struct APIHelper { } } else if let value = item.value.wrappedValue { - result.append(URLQueryItem(name: item.key, value: "\(value)")) + result.append(URLQueryItem(name: item.key, value: convertAnyToString(value))) } } @@ -101,16 +101,13 @@ internal struct APIHelper { let destination = source.filter { $0.value != nil }.reduce(into: [URLQueryItem]()) { result, item in if let collection = item.value as? [Any?] { collection - .compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + .compactMap { value in convertAnyToString(value) } .forEach { value in result.append(URLQueryItem(name: item.key, value: value)) } } else if let value = item.value { - result.append(URLQueryItem(name: item.key, value: "\(value)")) + result.append(URLQueryItem(name: item.key, value: convertAnyToString(value))) } } 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 03f3b1259b..93c5c76260 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIHelper.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -24,13 +24,10 @@ public struct APIHelper { return source.reduce(into: [String: String]()) { result, item in if let collection = item.value as? [Any?] { result[item.key] = collection - .compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + .compactMap { value in convertAnyToString(value) } .joined(separator: ",") } else if let value: Any = item.value { - result[item.key] = "\(value)" + result[item.key] = convertAnyToString(value) } } } @@ -50,13 +47,19 @@ public struct APIHelper { } } + public static func convertAnyToString(_ value: Any?) -> String? { + guard let value = value else { return nil } + if let value = value as? any RawRepresentable { + return "\(value.rawValue)" + } else { + return "\(value)" + } + } + public static func mapValueToPathItem(_ source: Any) -> Any { if let collection = source as? [Any?] { return collection - .compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + .compactMap { value in convertAnyToString(value) } .joined(separator: ",") } return source @@ -69,10 +72,7 @@ public struct APIHelper { let destination = source.filter { $0.value.wrappedValue != nil }.reduce(into: [URLQueryItem]()) { result, item in if let collection = item.value.wrappedValue as? [Any?] { - let collectionValues: [String] = collection.compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + let collectionValues: [String] = collection.compactMap { value in convertAnyToString(value) } if !item.value.isExplode { result.append(URLQueryItem(name: item.key, value: collectionValues.joined(separator: ","))) @@ -84,7 +84,7 @@ public struct APIHelper { } } else if let value = item.value.wrappedValue { - result.append(URLQueryItem(name: item.key, value: "\(value)")) + result.append(URLQueryItem(name: item.key, value: convertAnyToString(value))) } } @@ -101,16 +101,13 @@ public struct APIHelper { let destination = source.filter { $0.value != nil }.reduce(into: [URLQueryItem]()) { result, item in if let collection = item.value as? [Any?] { collection - .compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + .compactMap { value in convertAnyToString(value) } .forEach { value in result.append(URLQueryItem(name: item.key, value: value)) } } else if let value = item.value { - result.append(URLQueryItem(name: item.key, value: "\(value)")) + result.append(URLQueryItem(name: item.key, value: convertAnyToString(value))) } } diff --git a/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/APIHelper.swift index 03f3b1259b..93c5c76260 100644 --- a/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/APIHelper.swift +++ b/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -24,13 +24,10 @@ public struct APIHelper { return source.reduce(into: [String: String]()) { result, item in if let collection = item.value as? [Any?] { result[item.key] = collection - .compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + .compactMap { value in convertAnyToString(value) } .joined(separator: ",") } else if let value: Any = item.value { - result[item.key] = "\(value)" + result[item.key] = convertAnyToString(value) } } } @@ -50,13 +47,19 @@ public struct APIHelper { } } + public static func convertAnyToString(_ value: Any?) -> String? { + guard let value = value else { return nil } + if let value = value as? any RawRepresentable { + return "\(value.rawValue)" + } else { + return "\(value)" + } + } + public static func mapValueToPathItem(_ source: Any) -> Any { if let collection = source as? [Any?] { return collection - .compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + .compactMap { value in convertAnyToString(value) } .joined(separator: ",") } return source @@ -69,10 +72,7 @@ public struct APIHelper { let destination = source.filter { $0.value.wrappedValue != nil }.reduce(into: [URLQueryItem]()) { result, item in if let collection = item.value.wrappedValue as? [Any?] { - let collectionValues: [String] = collection.compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + let collectionValues: [String] = collection.compactMap { value in convertAnyToString(value) } if !item.value.isExplode { result.append(URLQueryItem(name: item.key, value: collectionValues.joined(separator: ","))) @@ -84,7 +84,7 @@ public struct APIHelper { } } else if let value = item.value.wrappedValue { - result.append(URLQueryItem(name: item.key, value: "\(value)")) + result.append(URLQueryItem(name: item.key, value: convertAnyToString(value))) } } @@ -101,16 +101,13 @@ public struct APIHelper { let destination = source.filter { $0.value != nil }.reduce(into: [URLQueryItem]()) { result, item in if let collection = item.value as? [Any?] { collection - .compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + .compactMap { value in convertAnyToString(value) } .forEach { value in result.append(URLQueryItem(name: item.key, value: value)) } } else if let value = item.value { - result.append(URLQueryItem(name: item.key, value: "\(value)")) + result.append(URLQueryItem(name: item.key, value: convertAnyToString(value))) } } 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 03f3b1259b..93c5c76260 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -24,13 +24,10 @@ public struct APIHelper { return source.reduce(into: [String: String]()) { result, item in if let collection = item.value as? [Any?] { result[item.key] = collection - .compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + .compactMap { value in convertAnyToString(value) } .joined(separator: ",") } else if let value: Any = item.value { - result[item.key] = "\(value)" + result[item.key] = convertAnyToString(value) } } } @@ -50,13 +47,19 @@ public struct APIHelper { } } + public static func convertAnyToString(_ value: Any?) -> String? { + guard let value = value else { return nil } + if let value = value as? any RawRepresentable { + return "\(value.rawValue)" + } else { + return "\(value)" + } + } + public static func mapValueToPathItem(_ source: Any) -> Any { if let collection = source as? [Any?] { return collection - .compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + .compactMap { value in convertAnyToString(value) } .joined(separator: ",") } return source @@ -69,10 +72,7 @@ public struct APIHelper { let destination = source.filter { $0.value.wrappedValue != nil }.reduce(into: [URLQueryItem]()) { result, item in if let collection = item.value.wrappedValue as? [Any?] { - let collectionValues: [String] = collection.compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + let collectionValues: [String] = collection.compactMap { value in convertAnyToString(value) } if !item.value.isExplode { result.append(URLQueryItem(name: item.key, value: collectionValues.joined(separator: ","))) @@ -84,7 +84,7 @@ public struct APIHelper { } } else if let value = item.value.wrappedValue { - result.append(URLQueryItem(name: item.key, value: "\(value)")) + result.append(URLQueryItem(name: item.key, value: convertAnyToString(value))) } } @@ -101,16 +101,13 @@ public struct APIHelper { let destination = source.filter { $0.value != nil }.reduce(into: [URLQueryItem]()) { result, item in if let collection = item.value as? [Any?] { collection - .compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + .compactMap { value in convertAnyToString(value) } .forEach { value in result.append(URLQueryItem(name: item.key, value: value)) } } else if let value = item.value { - result.append(URLQueryItem(name: item.key, value: "\(value)")) + result.append(URLQueryItem(name: item.key, value: convertAnyToString(value))) } } 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 03f3b1259b..93c5c76260 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIHelper.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -24,13 +24,10 @@ public struct APIHelper { return source.reduce(into: [String: String]()) { result, item in if let collection = item.value as? [Any?] { result[item.key] = collection - .compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + .compactMap { value in convertAnyToString(value) } .joined(separator: ",") } else if let value: Any = item.value { - result[item.key] = "\(value)" + result[item.key] = convertAnyToString(value) } } } @@ -50,13 +47,19 @@ public struct APIHelper { } } + public static func convertAnyToString(_ value: Any?) -> String? { + guard let value = value else { return nil } + if let value = value as? any RawRepresentable { + return "\(value.rawValue)" + } else { + return "\(value)" + } + } + public static func mapValueToPathItem(_ source: Any) -> Any { if let collection = source as? [Any?] { return collection - .compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + .compactMap { value in convertAnyToString(value) } .joined(separator: ",") } return source @@ -69,10 +72,7 @@ public struct APIHelper { let destination = source.filter { $0.value.wrappedValue != nil }.reduce(into: [URLQueryItem]()) { result, item in if let collection = item.value.wrappedValue as? [Any?] { - let collectionValues: [String] = collection.compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + let collectionValues: [String] = collection.compactMap { value in convertAnyToString(value) } if !item.value.isExplode { result.append(URLQueryItem(name: item.key, value: collectionValues.joined(separator: ","))) @@ -84,7 +84,7 @@ public struct APIHelper { } } else if let value = item.value.wrappedValue { - result.append(URLQueryItem(name: item.key, value: "\(value)")) + result.append(URLQueryItem(name: item.key, value: convertAnyToString(value))) } } @@ -101,16 +101,13 @@ public struct APIHelper { let destination = source.filter { $0.value != nil }.reduce(into: [URLQueryItem]()) { result, item in if let collection = item.value as? [Any?] { collection - .compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + .compactMap { value in convertAnyToString(value) } .forEach { value in result.append(URLQueryItem(name: item.key, value: value)) } } else if let value = item.value { - result.append(URLQueryItem(name: item.key, value: "\(value)")) + result.append(URLQueryItem(name: item.key, value: convertAnyToString(value))) } } 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 03f3b1259b..93c5c76260 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -24,13 +24,10 @@ public struct APIHelper { return source.reduce(into: [String: String]()) { result, item in if let collection = item.value as? [Any?] { result[item.key] = collection - .compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + .compactMap { value in convertAnyToString(value) } .joined(separator: ",") } else if let value: Any = item.value { - result[item.key] = "\(value)" + result[item.key] = convertAnyToString(value) } } } @@ -50,13 +47,19 @@ public struct APIHelper { } } + public static func convertAnyToString(_ value: Any?) -> String? { + guard let value = value else { return nil } + if let value = value as? any RawRepresentable { + return "\(value.rawValue)" + } else { + return "\(value)" + } + } + public static func mapValueToPathItem(_ source: Any) -> Any { if let collection = source as? [Any?] { return collection - .compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + .compactMap { value in convertAnyToString(value) } .joined(separator: ",") } return source @@ -69,10 +72,7 @@ public struct APIHelper { let destination = source.filter { $0.value.wrappedValue != nil }.reduce(into: [URLQueryItem]()) { result, item in if let collection = item.value.wrappedValue as? [Any?] { - let collectionValues: [String] = collection.compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + let collectionValues: [String] = collection.compactMap { value in convertAnyToString(value) } if !item.value.isExplode { result.append(URLQueryItem(name: item.key, value: collectionValues.joined(separator: ","))) @@ -84,7 +84,7 @@ public struct APIHelper { } } else if let value = item.value.wrappedValue { - result.append(URLQueryItem(name: item.key, value: "\(value)")) + result.append(URLQueryItem(name: item.key, value: convertAnyToString(value))) } } @@ -101,16 +101,13 @@ public struct APIHelper { let destination = source.filter { $0.value != nil }.reduce(into: [URLQueryItem]()) { result, item in if let collection = item.value as? [Any?] { collection - .compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + .compactMap { value in convertAnyToString(value) } .forEach { value in result.append(URLQueryItem(name: item.key, value: value)) } } else if let value = item.value { - result.append(URLQueryItem(name: item.key, value: "\(value)")) + result.append(URLQueryItem(name: item.key, value: convertAnyToString(value))) } } 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 03f3b1259b..93c5c76260 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -24,13 +24,10 @@ public struct APIHelper { return source.reduce(into: [String: String]()) { result, item in if let collection = item.value as? [Any?] { result[item.key] = collection - .compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + .compactMap { value in convertAnyToString(value) } .joined(separator: ",") } else if let value: Any = item.value { - result[item.key] = "\(value)" + result[item.key] = convertAnyToString(value) } } } @@ -50,13 +47,19 @@ public struct APIHelper { } } + public static func convertAnyToString(_ value: Any?) -> String? { + guard let value = value else { return nil } + if let value = value as? any RawRepresentable { + return "\(value.rawValue)" + } else { + return "\(value)" + } + } + public static func mapValueToPathItem(_ source: Any) -> Any { if let collection = source as? [Any?] { return collection - .compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + .compactMap { value in convertAnyToString(value) } .joined(separator: ",") } return source @@ -69,10 +72,7 @@ public struct APIHelper { let destination = source.filter { $0.value.wrappedValue != nil }.reduce(into: [URLQueryItem]()) { result, item in if let collection = item.value.wrappedValue as? [Any?] { - let collectionValues: [String] = collection.compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + let collectionValues: [String] = collection.compactMap { value in convertAnyToString(value) } if !item.value.isExplode { result.append(URLQueryItem(name: item.key, value: collectionValues.joined(separator: ","))) @@ -84,7 +84,7 @@ public struct APIHelper { } } else if let value = item.value.wrappedValue { - result.append(URLQueryItem(name: item.key, value: "\(value)")) + result.append(URLQueryItem(name: item.key, value: convertAnyToString(value))) } } @@ -101,16 +101,13 @@ public struct APIHelper { let destination = source.filter { $0.value != nil }.reduce(into: [URLQueryItem]()) { result, item in if let collection = item.value as? [Any?] { collection - .compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + .compactMap { value in convertAnyToString(value) } .forEach { value in result.append(URLQueryItem(name: item.key, value: value)) } } else if let value = item.value { - result.append(URLQueryItem(name: item.key, value: "\(value)")) + result.append(URLQueryItem(name: item.key, value: convertAnyToString(value))) } } diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIHelper.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIHelper.swift index 03f3b1259b..93c5c76260 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIHelper.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/APIHelper.swift @@ -24,13 +24,10 @@ public struct APIHelper { return source.reduce(into: [String: String]()) { result, item in if let collection = item.value as? [Any?] { result[item.key] = collection - .compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + .compactMap { value in convertAnyToString(value) } .joined(separator: ",") } else if let value: Any = item.value { - result[item.key] = "\(value)" + result[item.key] = convertAnyToString(value) } } } @@ -50,13 +47,19 @@ public struct APIHelper { } } + public static func convertAnyToString(_ value: Any?) -> String? { + guard let value = value else { return nil } + if let value = value as? any RawRepresentable { + return "\(value.rawValue)" + } else { + return "\(value)" + } + } + public static func mapValueToPathItem(_ source: Any) -> Any { if let collection = source as? [Any?] { return collection - .compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + .compactMap { value in convertAnyToString(value) } .joined(separator: ",") } return source @@ -69,10 +72,7 @@ public struct APIHelper { let destination = source.filter { $0.value.wrappedValue != nil }.reduce(into: [URLQueryItem]()) { result, item in if let collection = item.value.wrappedValue as? [Any?] { - let collectionValues: [String] = collection.compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + let collectionValues: [String] = collection.compactMap { value in convertAnyToString(value) } if !item.value.isExplode { result.append(URLQueryItem(name: item.key, value: collectionValues.joined(separator: ","))) @@ -84,7 +84,7 @@ public struct APIHelper { } } else if let value = item.value.wrappedValue { - result.append(URLQueryItem(name: item.key, value: "\(value)")) + result.append(URLQueryItem(name: item.key, value: convertAnyToString(value))) } } @@ -101,16 +101,13 @@ public struct APIHelper { let destination = source.filter { $0.value != nil }.reduce(into: [URLQueryItem]()) { result, item in if let collection = item.value as? [Any?] { collection - .compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + .compactMap { value in convertAnyToString(value) } .forEach { value in result.append(URLQueryItem(name: item.key, value: value)) } } else if let value = item.value { - result.append(URLQueryItem(name: item.key, value: "\(value)")) + result.append(URLQueryItem(name: item.key, value: convertAnyToString(value))) } } diff --git a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/APIHelper.swift index 03f3b1259b..93c5c76260 100644 --- a/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/APIHelper.swift +++ b/samples/client/petstore/swift5/x-swift-hashable/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -24,13 +24,10 @@ public struct APIHelper { return source.reduce(into: [String: String]()) { result, item in if let collection = item.value as? [Any?] { result[item.key] = collection - .compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + .compactMap { value in convertAnyToString(value) } .joined(separator: ",") } else if let value: Any = item.value { - result[item.key] = "\(value)" + result[item.key] = convertAnyToString(value) } } } @@ -50,13 +47,19 @@ public struct APIHelper { } } + public static func convertAnyToString(_ value: Any?) -> String? { + guard let value = value else { return nil } + if let value = value as? any RawRepresentable { + return "\(value.rawValue)" + } else { + return "\(value)" + } + } + public static func mapValueToPathItem(_ source: Any) -> Any { if let collection = source as? [Any?] { return collection - .compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + .compactMap { value in convertAnyToString(value) } .joined(separator: ",") } return source @@ -69,10 +72,7 @@ public struct APIHelper { let destination = source.filter { $0.value.wrappedValue != nil }.reduce(into: [URLQueryItem]()) { result, item in if let collection = item.value.wrappedValue as? [Any?] { - let collectionValues: [String] = collection.compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + let collectionValues: [String] = collection.compactMap { value in convertAnyToString(value) } if !item.value.isExplode { result.append(URLQueryItem(name: item.key, value: collectionValues.joined(separator: ","))) @@ -84,7 +84,7 @@ public struct APIHelper { } } else if let value = item.value.wrappedValue { - result.append(URLQueryItem(name: item.key, value: "\(value)")) + result.append(URLQueryItem(name: item.key, value: convertAnyToString(value))) } } @@ -101,16 +101,13 @@ public struct APIHelper { let destination = source.filter { $0.value != nil }.reduce(into: [URLQueryItem]()) { result, item in if let collection = item.value as? [Any?] { collection - .compactMap { value in - guard let value = value else { return nil } - return "\(value)" - } + .compactMap { value in convertAnyToString(value) } .forEach { value in result.append(URLQueryItem(name: item.key, value: value)) } } else if let value = item.value { - result.append(URLQueryItem(name: item.key, value: "\(value)")) + result.append(URLQueryItem(name: item.key, value: convertAnyToString(value))) } } From bd79231d6bb3b42d74db838139b833507ed6e616 Mon Sep 17 00:00:00 2001 From: Eric Haag Date: Wed, 30 Nov 2022 08:43:33 -0600 Subject: [PATCH 067/189] Fix Gradle plugin publishing (#14150) --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index 01635d62a2..82fc997d09 100644 --- a/.travis.yml +++ b/.travis.yml @@ -160,6 +160,8 @@ after_success: echo "Finished mvn clean deploy for $TRAVIS_BRANCH"; pushd .; cd modules/openapi-generator-gradle-plugin; + ./gradlew -Psigning.keyId="$SIGNING_KEY" -Psigning.password="$SIGNING_PASSPHRASE" -Psigning.secretKeyRingFile="${TRAVIS_BUILD_DIR}/sec.gpg" -PossrhUsername="${SONATYPE_USERNAME}" -PossrhPassword="${SONATYPE_PASSWORD}" publishPluginMavenPublicationToSonatypeRepository closeAndReleaseSonatypeStagingRepository; + echo "Finished ./gradlew publishPluginMavenPublicationToSonatypeRepository closeAndReleaseSonatypeStagingRepository"; popd; elif [ -z $TRAVIS_TAG ] && [[ "$TRAVIS_BRANCH" =~ ^[0-9]+\.[0-9]+\.x$ ]]; then echo "Publishing from branch $TRAVIS_BRANCH"; @@ -167,6 +169,8 @@ after_success: echo "Finished mvn clean deploy for $TRAVIS_BRANCH"; pushd .; cd modules/openapi-generator-gradle-plugin; + ./gradlew -PossrhUsername="${SONATYPE_USERNAME}" -PossrhPassword="${SONATYPE_PASSWORD}" publishPluginMavenPublicationToSonatypeRepository closeAndReleaseSonatypeStagingRepository; + echo "Finished ./gradlew publishPluginMavenPublicationToSonatypeRepository closeAndReleaseSonatypeStagingRepository"; popd; fi; if [ -n $TRAVIS_TAG ] && [[ "$TRAVIS_TAG" =~ ^[v][0-9]+\.[0-9]+\.[0-9]+$ ]]; then From 28ae689615d8dd13dd6280b384d119204de54c6e Mon Sep 17 00:00:00 2001 From: Justin Black Date: Wed, 30 Nov 2022 11:09:31 -0800 Subject: [PATCH 068/189] [python] Fixes Configuration w/ access_token at initialization (#14153) * Fixes templates * Samples regenerated * Adds discard_unknown_keys back in, regenerates samples --- .../resources/python/configuration.handlebars | 48 +++++++++++-------- .../python/doc_auth_partial.handlebars | 4 +- .../python/unit_test_api/configuration.py | 38 ++++----------- .../python/dynamic_servers/configuration.py | 38 ++++----------- .../petstore/python/docs/apis/tags/PetApi.md | 32 ++++++------- .../python/petstore_api/configuration.py | 25 ++++++---- 6 files changed, 83 insertions(+), 102 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/python/configuration.handlebars b/modules/openapi-generator/src/main/resources/python/configuration.handlebars index 26f940dde1..c66365cefd 100644 --- a/modules/openapi-generator/src/main/resources/python/configuration.handlebars +++ b/modules/openapi-generator/src/main/resources/python/configuration.handlebars @@ -162,17 +162,30 @@ conf = {{{packageName}}}.Configuration( _default = None - def __init__(self, host=None, - api_key=None, api_key_prefix=None, - username=None, password=None, - discard_unknown_keys=False, - disabled_client_side_validations="", -{{#if hasHttpSignatureMethods}} - signing_info=None, + def __init__( + self, + host=None, +{{#if hasApiKeyMethods}} + api_key=None, + api_key_prefix=None, {{/if}} - server_index=None, server_variables=None, - server_operation_index=None, server_operation_variables=None, - ): +{{#if hasHttpBasicMethods}} + username=None, + password=None, +{{/if}} + discard_unknown_keys=False, + disabled_client_side_validations="", +{{#if hasHttpSignatureMethods}} + signing_info=None, +{{/if}} + server_index=None, + server_variables=None, + server_operation_index=None, + server_operation_variables=None, +{{#or hasOAuthMethods hasBearerMethods}} + access_token=None, +{{/or}} + ): """Constructor """ self._base_path = "{{{basePath}}}" if host is None else host @@ -190,6 +203,7 @@ conf = {{{packageName}}}.Configuration( """Temp file folder for downloading files """ # Authentication Settings +{{#if hasApiKeyMethods}} self.api_key = {} if api_key: self.api_key = api_key @@ -203,6 +217,8 @@ conf = {{{packageName}}}.Configuration( self.refresh_api_key_hook = None """function hook to refresh API key if expired """ +{{/if}} +{{#if hasHttpBasicMethods}} self.username = username """Username for HTTP basic authentication """ @@ -210,6 +226,7 @@ conf = {{{packageName}}}.Configuration( """Password for HTTP basic authentication """ self.discard_unknown_keys = discard_unknown_keys +{{/if}} self.disabled_client_side_validations = disabled_client_side_validations {{#if hasHttpSignatureMethods}} if signing_info is not None: @@ -218,18 +235,11 @@ conf = {{{packageName}}}.Configuration( """The HTTP signing configuration """ {{/if}} -{{#if hasOAuthMethods}} +{{#or hasOAuthMethods hasBearerMethods}} self.access_token = None """access token for OAuth/Bearer """ -{{/if}} -{{#unless hasOAuthMethods}} -{{#if hasBearerMethods}} - self.access_token = None - """access token for OAuth/Bearer - """ -{{/if}} -{{/unless}} +{{/or}} self.logger = {} """Logging Settings """ diff --git a/modules/openapi-generator/src/main/resources/python/doc_auth_partial.handlebars b/modules/openapi-generator/src/main/resources/python/doc_auth_partial.handlebars index b16451d867..f5d61321c3 100644 --- a/modules/openapi-generator/src/main/resources/python/doc_auth_partial.handlebars +++ b/modules/openapi-generator/src/main/resources/python/doc_auth_partial.handlebars @@ -101,9 +101,9 @@ configuration.api_key['{{{name}}}'] = 'YOUR_API_KEY' # Configure OAuth2 access token for authorization: {{{name}}} configuration = {{{packageName}}}.Configuration( - host = "{{{basePath}}}" + host = "{{{basePath}}}", + access_token = 'YOUR_ACCESS_TOKEN' ) -configuration.access_token = 'YOUR_ACCESS_TOKEN' {{/if}} {{/each}} {{/if}} diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/configuration.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/configuration.py index ee4ca7e842..8c4ccaeb62 100644 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/configuration.py +++ b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/configuration.py @@ -80,14 +80,16 @@ class Configuration(object): _default = None - def __init__(self, host=None, - api_key=None, api_key_prefix=None, - username=None, password=None, - discard_unknown_keys=False, - disabled_client_side_validations="", - server_index=None, server_variables=None, - server_operation_index=None, server_operation_variables=None, - ): + def __init__( + self, + host=None, + discard_unknown_keys=False, + disabled_client_side_validations="", + server_index=None, + server_variables=None, + server_operation_index=None, + server_operation_variables=None, + ): """Constructor """ self._base_path = "https://someserver.com/v1" if host is None else host @@ -105,26 +107,6 @@ class Configuration(object): """Temp file folder for downloading files """ # Authentication Settings - self.api_key = {} - if api_key: - self.api_key = api_key - """dict to store API key(s) - """ - self.api_key_prefix = {} - if api_key_prefix: - self.api_key_prefix = api_key_prefix - """dict to store API prefix (e.g. Bearer) - """ - self.refresh_api_key_hook = None - """function hook to refresh API key if expired - """ - self.username = username - """Username for HTTP basic authentication - """ - self.password = password - """Password for HTTP basic authentication - """ - self.discard_unknown_keys = discard_unknown_keys self.disabled_client_side_validations = disabled_client_side_validations self.logger = {} """Logging Settings diff --git a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/configuration.py b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/configuration.py index 226e3f7a6e..2a76b9c6db 100644 --- a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/configuration.py +++ b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/configuration.py @@ -80,14 +80,16 @@ class Configuration(object): _default = None - def __init__(self, host=None, - api_key=None, api_key_prefix=None, - username=None, password=None, - discard_unknown_keys=False, - disabled_client_side_validations="", - server_index=None, server_variables=None, - server_operation_index=None, server_operation_variables=None, - ): + def __init__( + self, + host=None, + discard_unknown_keys=False, + disabled_client_side_validations="", + server_index=None, + server_variables=None, + server_operation_index=None, + server_operation_variables=None, + ): """Constructor """ self._base_path = "http://petstore.swagger.io:80/v2" if host is None else host @@ -105,26 +107,6 @@ class Configuration(object): """Temp file folder for downloading files """ # Authentication Settings - self.api_key = {} - if api_key: - self.api_key = api_key - """dict to store API key(s) - """ - self.api_key_prefix = {} - if api_key_prefix: - self.api_key_prefix = api_key_prefix - """dict to store API prefix (e.g. Bearer) - """ - self.refresh_api_key_hook = None - """function hook to refresh API key if expired - """ - self.username = username - """Username for HTTP basic authentication - """ - self.password = password - """Password for HTTP basic authentication - """ - self.discard_unknown_keys = discard_unknown_keys self.disabled_client_side_validations = disabled_client_side_validations self.logger = {} """Logging Settings diff --git a/samples/openapi3/client/petstore/python/docs/apis/tags/PetApi.md b/samples/openapi3/client/petstore/python/docs/apis/tags/PetApi.md index a295a0d499..28787e08d3 100644 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/PetApi.md +++ b/samples/openapi3/client/petstore/python/docs/apis/tags/PetApi.md @@ -104,9 +104,9 @@ configuration = petstore_api.Configuration( # Configure OAuth2 access token for authorization: petstore_auth configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" + host = "http://petstore.swagger.io:80/v2", + access_token = 'YOUR_ACCESS_TOKEN' ) -configuration.access_token = 'YOUR_ACCESS_TOKEN' # Enter a context with an instance of the API client with petstore_api.ApiClient(configuration) as api_client: # Create an instance of the API class @@ -218,9 +218,9 @@ configuration = petstore_api.Configuration( # Configure OAuth2 access token for authorization: petstore_auth configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" + host = "http://petstore.swagger.io:80/v2", + access_token = 'YOUR_ACCESS_TOKEN' ) -configuration.access_token = 'YOUR_ACCESS_TOKEN' # Enter a context with an instance of the API client with petstore_api.ApiClient(configuration) as api_client: # Create an instance of the API class @@ -404,9 +404,9 @@ configuration = petstore_api.Configuration( # Configure OAuth2 access token for authorization: petstore_auth configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" + host = "http://petstore.swagger.io:80/v2", + access_token = 'YOUR_ACCESS_TOKEN' ) -configuration.access_token = 'YOUR_ACCESS_TOKEN' # Enter a context with an instance of the API client with petstore_api.ApiClient(configuration) as api_client: # Create an instance of the API class @@ -598,9 +598,9 @@ configuration = petstore_api.Configuration( # Configure OAuth2 access token for authorization: petstore_auth configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" + host = "http://petstore.swagger.io:80/v2", + access_token = 'YOUR_ACCESS_TOKEN' ) -configuration.access_token = 'YOUR_ACCESS_TOKEN' # Enter a context with an instance of the API client with petstore_api.ApiClient(configuration) as api_client: # Create an instance of the API class @@ -912,9 +912,9 @@ configuration = petstore_api.Configuration( # Configure OAuth2 access token for authorization: petstore_auth configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" + host = "http://petstore.swagger.io:80/v2", + access_token = 'YOUR_ACCESS_TOKEN' ) -configuration.access_token = 'YOUR_ACCESS_TOKEN' # Enter a context with an instance of the API client with petstore_api.ApiClient(configuration) as api_client: # Create an instance of the API class @@ -1034,9 +1034,9 @@ configuration = petstore_api.Configuration( # Configure OAuth2 access token for authorization: petstore_auth configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" + host = "http://petstore.swagger.io:80/v2", + access_token = 'YOUR_ACCESS_TOKEN' ) -configuration.access_token = 'YOUR_ACCESS_TOKEN' # Enter a context with an instance of the API client with petstore_api.ApiClient(configuration) as api_client: # Create an instance of the API class @@ -1159,9 +1159,9 @@ configuration = petstore_api.Configuration( # Configure OAuth2 access token for authorization: petstore_auth configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" + host = "http://petstore.swagger.io:80/v2", + access_token = 'YOUR_ACCESS_TOKEN' ) -configuration.access_token = 'YOUR_ACCESS_TOKEN' # Enter a context with an instance of the API client with petstore_api.ApiClient(configuration) as api_client: # Create an instance of the API class @@ -1293,9 +1293,9 @@ configuration = petstore_api.Configuration( # Configure OAuth2 access token for authorization: petstore_auth configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" + host = "http://petstore.swagger.io:80/v2", + access_token = 'YOUR_ACCESS_TOKEN' ) -configuration.access_token = 'YOUR_ACCESS_TOKEN' # Enter a context with an instance of the API client with petstore_api.ApiClient(configuration) as api_client: # Create an instance of the API class diff --git a/samples/openapi3/client/petstore/python/petstore_api/configuration.py b/samples/openapi3/client/petstore/python/petstore_api/configuration.py index 2fe7662d50..e783d4cf3c 100644 --- a/samples/openapi3/client/petstore/python/petstore_api/configuration.py +++ b/samples/openapi3/client/petstore/python/petstore_api/configuration.py @@ -157,15 +157,22 @@ conf = petstore_api.Configuration( _default = None - def __init__(self, host=None, - api_key=None, api_key_prefix=None, - username=None, password=None, - discard_unknown_keys=False, - disabled_client_side_validations="", - signing_info=None, - server_index=None, server_variables=None, - server_operation_index=None, server_operation_variables=None, - ): + def __init__( + self, + host=None, + api_key=None, + api_key_prefix=None, + username=None, + password=None, + discard_unknown_keys=False, + disabled_client_side_validations="", + signing_info=None, + server_index=None, + server_variables=None, + server_operation_index=None, + server_operation_variables=None, + access_token=None, + ): """Constructor """ self._base_path = "http://petstore.swagger.io:80/v2" if host is None else host From e2e28a7e0eb40948a0af454411ec3b86568c0bd3 Mon Sep 17 00:00:00 2001 From: Lazzaretti Date: Thu, 1 Dec 2022 08:05:05 +0100 Subject: [PATCH 069/189] [tyescript-axios] fix description for config options: withSeparateModelsAndAp, modelPackage, apiPackage (#14103) * fix: tyescript-axios description describe withSeparateModelsAndApi, modelPackage, apiPackage as mentioned in #5008 * Update modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAxiosClientCodegen.java * Update docs/generators/typescript-axios.md Co-authored-by: Fabrizio Lazzaretti Co-authored-by: Esteban Gehring --- docs/generators/typescript-axios.md | 4 +++- .../codegen/languages/TypeScriptAxiosClientCodegen.java | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/generators/typescript-axios.md b/docs/generators/typescript-axios.md index 0850810c4d..1d381196f0 100644 --- a/docs/generators/typescript-axios.md +++ b/docs/generators/typescript-axios.md @@ -19,12 +19,14 @@ These options may be applied as additional-properties (cli) or configOptions (pl | Option | Description | Values | Default | | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| +|apiPackage|package for generated api classes| |null| |disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|

**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
|true| |ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| |enumNameSuffix|Suffix that will be appended to all enum names.| |Enum| |enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase| |enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
**false**
No changes to the enum's are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
|false| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| +|modelPackage|package for generated models| |null| |npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| |npmRepository|Use this property to set an url of your private npmRepo in the package.json| |null| |npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0| @@ -39,7 +41,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |useSingleRequestParameter|Setting this property to true will generate functions with a single argument containing all API endpoint parameters instead of one argument per parameter.| |false| |withInterfaces|Setting this property to true will generate interfaces next to the default class implementations.| |false| |withNodeImports|Setting this property to true adds imports for NodeJS| |false| -|withSeparateModelsAndApi|Put the model and api in separate folders and in separate classes| |false| +|withSeparateModelsAndApi|Put the model and api in separate folders and in separate classes. This requires in addition a value for 'apiPackage' and 'modelPackage'| |false| |withoutPrefixEnums|Don't prefix enum names with class names| |false| ## IMPORT MAPPING diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAxiosClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAxiosClientCodegen.java index 2b81536995..bd42a79069 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAxiosClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAxiosClientCodegen.java @@ -61,7 +61,9 @@ public class TypeScriptAxiosClientCodegen extends AbstractTypeScriptClientCodege this.cliOptions.add(new CliOption(NPM_REPOSITORY, "Use this property to set an url of your private npmRepo in the package.json")); this.cliOptions.add(new CliOption(WITH_INTERFACES, "Setting this property to true will generate interfaces next to the default class implementations.", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.FALSE.toString())); - this.cliOptions.add(new CliOption(SEPARATE_MODELS_AND_API, "Put the model and api in separate folders and in separate classes", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.FALSE.toString())); + this.cliOptions.add(new CliOption(SEPARATE_MODELS_AND_API, "Put the model and api in separate folders and in separate classes. This requires in addition a value for 'apiPackage' and 'modelPackage'", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.FALSE.toString())); + this.cliOptions.add(new CliOption(CodegenConstants.MODEL_PACKAGE, CodegenConstants.MODEL_PACKAGE_DESC)); + this.cliOptions.add(new CliOption(CodegenConstants.API_PACKAGE, CodegenConstants.API_PACKAGE_DESC)); this.cliOptions.add(new CliOption(WITHOUT_PREFIX_ENUMS, "Don't prefix enum names with class names", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.FALSE.toString())); this.cliOptions.add(new CliOption(USE_SINGLE_REQUEST_PARAMETER, "Setting this property to true will generate functions with a single argument containing all API endpoint parameters instead of one argument per parameter.", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.FALSE.toString())); this.cliOptions.add(new CliOption(WITH_NODE_IMPORTS, "Setting this property to true adds imports for NodeJS", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.FALSE.toString())); From c62ebc377ea267105a7048be77409bc9ff487c9d Mon Sep 17 00:00:00 2001 From: Andrei Matei <29061011+AndreiMatei2206@users.noreply.github.com> Date: Thu, 1 Dec 2022 07:29:59 +0000 Subject: [PATCH 070/189] [Go] Add authentication methods only if referenced in input spec (#14138) * Add conditions for auth methods * Add extra auth method validations * Regenerate example SDK * Clean-up tests * Fix indentation and go.sum --- .../codegen/languages/GoClientCodegen.java | 2 +- .../src/main/resources/go/README.mustache | 2 + .../src/main/resources/go/client.mustache | 8 +++ .../main/resources/go/configuration.mustache | 14 +++- .../src/main/resources/go/go.mod.mustache | 2 + .../resources/go/{go.sum => go.sum.mustache} | 2 + .../main/resources/go/model_simple.mustache | 14 ++-- samples/client/petstore/go/auth_test.go | 64 ------------------- .../client/petstore/go/go-petstore/client.go | 5 -- .../petstore/go/go-petstore/configuration.go | 6 -- samples/client/petstore/go/go.mod | 6 +- samples/client/petstore/go/go.sum | 40 ++++++++++++ .../x-auth-id-alias/go-experimental/README.md | 1 - .../x-auth-id-alias/go-experimental/client.go | 22 ------- .../go-experimental/configuration.go | 12 ---- .../x-auth-id-alias/go-experimental/go.mod | 1 - .../x-auth-id-alias/go-experimental/go.sum | 2 - 17 files changed, 77 insertions(+), 126 deletions(-) rename modules/openapi-generator/src/main/resources/go/{go.sum => go.sum.mustache} (96%) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientCodegen.java index 6f3dae4915..e89bd06e4a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoClientCodegen.java @@ -267,7 +267,7 @@ public class GoClientCodegen extends AbstractGoCodegen { supportingFiles.add(new SupportingFile("client.mustache", "", "client.go")); supportingFiles.add(new SupportingFile("response.mustache", "", "response.go")); supportingFiles.add(new SupportingFile("go.mod.mustache", "", "go.mod")); - supportingFiles.add(new SupportingFile("go.sum", "", "go.sum")); + supportingFiles.add(new SupportingFile("go.sum.mustache", "", "go.sum")); supportingFiles.add(new SupportingFile(".travis.yml", "", ".travis.yml")); supportingFiles.add(new SupportingFile("utils.mustache", "", "utils.go")); } diff --git a/modules/openapi-generator/src/main/resources/go/README.mustache b/modules/openapi-generator/src/main/resources/go/README.mustache index f13136a8f3..cf9c353f01 100644 --- a/modules/openapi-generator/src/main/resources/go/README.mustache +++ b/modules/openapi-generator/src/main/resources/go/README.mustache @@ -23,7 +23,9 @@ Install the following dependencies: ```shell go get github.com/stretchr/testify/assert +{{#hasOAuthMethods}} go get golang.org/x/oauth2 +{{/hasOAuthMethods}} go get golang.org/x/net/context ``` diff --git a/modules/openapi-generator/src/main/resources/go/client.mustache b/modules/openapi-generator/src/main/resources/go/client.mustache index 06d61f8866..80bffb795c 100644 --- a/modules/openapi-generator/src/main/resources/go/client.mustache +++ b/modules/openapi-generator/src/main/resources/go/client.mustache @@ -24,7 +24,9 @@ import ( "time" "unicode/utf8" + {{#hasOAuthMethods}} "golang.org/x/oauth2" + {{/hasOAuthMethods}} {{#withAWSV4Signature}} awsv4 "github.com/aws/aws-sdk-go/aws/signer/v4" awscredentials "github.com/aws/aws-sdk-go/aws/credentials" @@ -414,6 +416,7 @@ func (c *APIClient) prepareRequest( // Walk through any authentication. + {{#hasOAuthMethods}} // OAuth2 authentication if tok, ok := ctx.Value(ContextOAuth2).(oauth2.TokenSource); ok { // We were able to grab an oauth2 token from the context @@ -425,16 +428,21 @@ func (c *APIClient) prepareRequest( latestToken.SetAuthHeader(localVarRequest) } + {{/hasOAuthMethods}} + {{#hasHttpBasicMethods}} // Basic HTTP Authentication if auth, ok := ctx.Value(ContextBasicAuth).(BasicAuth); ok { localVarRequest.SetBasicAuth(auth.UserName, auth.Password) } + {{/hasHttpBasicMethods}} + {{#hasHttpBearerMethods}} // AccessToken Authentication if auth, ok := ctx.Value(ContextAccessToken).(string); ok { localVarRequest.Header.Add("Authorization", "Bearer "+auth) } + {{/hasHttpBearerMethods}} {{#withAWSV4Signature}} // AWS Signature v4 Authentication if auth, ok := ctx.Value(ContextAWSv4).(AWSv4); ok { diff --git a/modules/openapi-generator/src/main/resources/go/configuration.mustache b/modules/openapi-generator/src/main/resources/go/configuration.mustache index 088e9202cf..419035d03d 100644 --- a/modules/openapi-generator/src/main/resources/go/configuration.mustache +++ b/modules/openapi-generator/src/main/resources/go/configuration.mustache @@ -19,26 +19,36 @@ func (c contextKey) String() string { } var ( + {{#hasOAuthMethods}} // ContextOAuth2 takes an oauth2.TokenSource as authentication for the request. ContextOAuth2 = contextKey("token") + {{/hasOAuthMethods}} + {{#hasHttpBasicMethods}} // ContextBasicAuth takes BasicAuth as authentication for the request. ContextBasicAuth = contextKey("basic") + {{/hasHttpBasicMethods}} + {{#hasHttpBearerMethods}} // ContextAccessToken takes a string oauth2 access token as authentication for the request. ContextAccessToken = contextKey("accesstoken") + {{/hasHttpBearerMethods}} + {{#hasApiKeyMethods}} // ContextAPIKeys takes a string apikey as authentication for the request ContextAPIKeys = contextKey("apiKeys") + {{/hasApiKeyMethods}} {{#withAWSV4Signature}} // ContextAWSv4 takes an Access Key and a Secret Key for signing AWS Signature v4 ContextAWSv4 = contextKey("awsv4") {{/withAWSV4Signature}} + {{#hasHttpSignatureMethods}} // ContextHttpSignatureAuth takes HttpSignatureAuth as authentication for the request. ContextHttpSignatureAuth = contextKey("httpsignature") + {{/hasHttpSignatureMethods}} // ContextServerIndex uses a server configuration from the index. ContextServerIndex = contextKey("serverIndex") @@ -108,9 +118,9 @@ type Configuration struct { Servers ServerConfigurations OperationServers map[string]ServerConfigurations HTTPClient *http.Client - {{#withCustomMiddlewareFunction}} + {{#withCustomMiddlewareFunction}} Middleware MiddlewareFunction - {{/withCustomMiddlewareFunction}} + {{/withCustomMiddlewareFunction}} } // NewConfiguration returns a new Configuration object diff --git a/modules/openapi-generator/src/main/resources/go/go.mod.mustache b/modules/openapi-generator/src/main/resources/go/go.mod.mustache index c7e0fe117e..31843f5f3d 100644 --- a/modules/openapi-generator/src/main/resources/go/go.mod.mustache +++ b/modules/openapi-generator/src/main/resources/go/go.mod.mustache @@ -3,7 +3,9 @@ module {{gitHost}}/{{gitUserId}}/{{gitRepoId}}{{#isGoSubmodule}}/{{packageName}} go 1.13 require ( + {{#hasOAuthMethods}} golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558 + {{/hasOAuthMethods}} {{#withAWSV4Signature}} github.com/aws/aws-sdk-go v1.34.14 {{/withAWSV4Signature}} diff --git a/modules/openapi-generator/src/main/resources/go/go.sum b/modules/openapi-generator/src/main/resources/go/go.sum.mustache similarity index 96% rename from modules/openapi-generator/src/main/resources/go/go.sum rename to modules/openapi-generator/src/main/resources/go/go.sum.mustache index 734252e681..d25a7530fd 100644 --- a/modules/openapi-generator/src/main/resources/go/go.sum +++ b/modules/openapi-generator/src/main/resources/go/go.sum.mustache @@ -4,8 +4,10 @@ github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5y golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +{{#hasOAuthMethods}} golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +{{/hasOAuthMethods}} golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= diff --git a/modules/openapi-generator/src/main/resources/go/model_simple.mustache b/modules/openapi-generator/src/main/resources/go/model_simple.mustache index 9cb1c03633..179a57b716 100644 --- a/modules/openapi-generator/src/main/resources/go/model_simple.mustache +++ b/modules/openapi-generator/src/main/resources/go/model_simple.mustache @@ -128,10 +128,10 @@ func (o *{{classname}}) Get{{name}}Ok() ({{^isArray}}{{^isFreeFormObject}}*{{/is if o == nil{{#isNullable}}{{#vendorExtensions.x-golang-is-container}} || isNil(o.{{name}}){{/vendorExtensions.x-golang-is-container}}{{/isNullable}} { {{^isFreeFormObject}} return nil, false - {{/isFreeFormObject}} - {{#isFreeFormObject}} + {{/isFreeFormObject}} + {{#isFreeFormObject}} return {{vendorExtensions.x-go-base-type}}{}, false - {{/isFreeFormObject}} + {{/isFreeFormObject}} } {{#isNullable}} {{#vendorExtensions.x-golang-is-container}} @@ -198,12 +198,12 @@ func (o *{{classname}}) Get{{name}}() {{vendorExtensions.x-go-base-type}} { {{/deprecated}} func (o *{{classname}}) Get{{name}}Ok() ({{^isArray}}{{^isFreeFormObject}}*{{/isFreeFormObject}}{{/isArray}}{{vendorExtensions.x-go-base-type}}, bool) { if o == nil{{^isNullable}} || isNil(o.{{name}}){{/isNullable}}{{#isNullable}}{{#vendorExtensions.x-golang-is-container}} || isNil(o.{{name}}){{/vendorExtensions.x-golang-is-container}}{{/isNullable}} { - {{^isFreeFormObject}} + {{^isFreeFormObject}} return nil, false - {{/isFreeFormObject}} - {{#isFreeFormObject}} + {{/isFreeFormObject}} + {{#isFreeFormObject}} return {{vendorExtensions.x-go-base-type}}{}, false - {{/isFreeFormObject}} + {{/isFreeFormObject}} } {{#isNullable}} {{#vendorExtensions.x-golang-is-container}} diff --git a/samples/client/petstore/go/auth_test.go b/samples/client/petstore/go/auth_test.go index 94ba6a1526..3c6b7c821a 100644 --- a/samples/client/petstore/go/auth_test.go +++ b/samples/client/petstore/go/auth_test.go @@ -65,70 +65,6 @@ func TestOAuth2(t *testing.T) { } } -func TestBasicAuth(t *testing.T) { - - auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "fakeUser", - Password: "f4k3p455", - }) - - newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: "gopher", - PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), - Tags: []sw.Tag{{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) - - r, err := client.PetApi.AddPet(auth).Body(newPet).Execute() - - if err != nil { - t.Fatalf("Error while adding pet: %v", err) - } - if r.StatusCode != 200 { - t.Log(r) - } - - r, err = client.PetApi.DeletePet(auth, 12992).Execute() - - if err != nil { - t.Fatalf("Error while deleting pet by id: %v", err) - } - if r.StatusCode != 200 { - t.Log(r) - } - reqb, _ := httputil.DumpRequest(r.Request, true) - if !strings.Contains((string)(reqb), "Authorization: Basic ZmFrZVVzZXI6ZjRrM3A0NTU") { - t.Errorf("Basic Authentication is missing") - } -} - -func TestAccessToken(t *testing.T) { - auth := context.WithValue(context.Background(), sw.ContextAccessToken, "TESTFAKEACCESSTOKENISFAKE") - - newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: "gopher", - PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"), - Tags: []sw.Tag{{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}}) - - r, err := client.PetApi.AddPet(nil).Body(newPet).Execute() - - if err != nil { - t.Fatalf("Error while adding pet: %v", err) - } - if r.StatusCode != 200 { - t.Log(r) - } - - r, err = client.PetApi.DeletePet(auth, 12992).Execute() - - if err != nil { - t.Fatalf("Error while deleting pet by id: %v", err) - } - if r.StatusCode != 200 { - t.Log(r) - } - reqb, _ := httputil.DumpRequest(r.Request, true) - if !strings.Contains((string)(reqb), "Authorization: Bearer TESTFAKEACCESSTOKENISFAKE") { - t.Errorf("AccessToken Authentication is missing") - } -} - func TestAPIKeyNoPrefix(t *testing.T) { auth := context.WithValue(context.Background(), sw.ContextAPIKeys, map[string]sw.APIKey{"api_key": {Key: "TEST123"}}) diff --git a/samples/client/petstore/go/go-petstore/client.go b/samples/client/petstore/go/go-petstore/client.go index 4cca066940..d40abef003 100644 --- a/samples/client/petstore/go/go-petstore/client.go +++ b/samples/client/petstore/go/go-petstore/client.go @@ -438,11 +438,6 @@ func (c *APIClient) prepareRequest( localVarRequest.SetBasicAuth(auth.UserName, auth.Password) } - // AccessToken Authentication - if auth, ok := ctx.Value(ContextAccessToken).(string); ok { - localVarRequest.Header.Add("Authorization", "Bearer "+auth) - } - } for header, value := range c.cfg.DefaultHeader { diff --git a/samples/client/petstore/go/go-petstore/configuration.go b/samples/client/petstore/go/go-petstore/configuration.go index 94d3b3bc4f..ad220e607f 100644 --- a/samples/client/petstore/go/go-petstore/configuration.go +++ b/samples/client/petstore/go/go-petstore/configuration.go @@ -34,15 +34,9 @@ var ( // ContextBasicAuth takes BasicAuth as authentication for the request. ContextBasicAuth = contextKey("basic") - // ContextAccessToken takes a string oauth2 access token as authentication for the request. - ContextAccessToken = contextKey("accesstoken") - // ContextAPIKeys takes a string apikey as authentication for the request ContextAPIKeys = contextKey("apiKeys") - // ContextHttpSignatureAuth takes HttpSignatureAuth as authentication for the request. - ContextHttpSignatureAuth = contextKey("httpsignature") - // ContextServerIndex uses a server configuration from the index. ContextServerIndex = contextKey("serverIndex") diff --git a/samples/client/petstore/go/go.mod b/samples/client/petstore/go/go.mod index 6c1005e64a..38f545b415 100644 --- a/samples/client/petstore/go/go.mod +++ b/samples/client/petstore/go/go.mod @@ -6,7 +6,7 @@ go 1.13 require ( github.com/OpenAPITools/openapi-generator/samples/client/petstore/go/go-petstore v0.0.0-00010101000000-000000000000 - github.com/stretchr/testify v1.7.0 - golang.org/x/net v0.0.0-20220225172249-27dd8689420f // indirect - golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a + github.com/stretchr/testify v1.8.1 + golang.org/x/net v0.2.0 // indirect + golang.org/x/oauth2 v0.2.0 ) diff --git a/samples/client/petstore/go/go.sum b/samples/client/petstore/go/go.sum index bf7b32fe9a..c69d361a60 100644 --- a/samples/client/petstore/go/go.sum +++ b/samples/client/petstore/go/go.sum @@ -19,6 +19,7 @@ cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvf cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= @@ -41,6 +42,8 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -73,6 +76,9 @@ github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvq github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -83,6 +89,8 @@ github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -111,12 +119,19 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -127,6 +142,7 @@ golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -157,6 +173,7 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -184,10 +201,14 @@ golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202 h1:VvcQYSHwXgi7W+TpUR6A9g6Up98WAHf3f/ulnJ62IyA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd h1:O7DYs+zxREGLKzKoMQrtrEacpb0ZVXA5rIwylE2Xchk= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f h1:oA4XRj0qtSt8Yo1Zms0CUlsT3KG69V2UGQWPBxujDmc= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.2.0 h1:sZfSu1wtKLGlWI4ZZayP0ck9Y73K1ynO6gqzTdBVdPU= +golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -199,6 +220,8 @@ golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 h1:RerP+noqYHUQ8CMRcPlC2n golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a h1:qfl7ob3DIEs3Ml9oLuPwY2N04gymzAW04WsUQHIClgM= golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.2.0 h1:GtQkldQ9m7yvzCL1V+LrYow3Khe0eJH0w7RbX/VbaIU= +golang.org/x/oauth2 v0.2.0/go.mod h1:Cwn6afJ8jrQwYMxQDTpISoXmXW9I6qF6vDeuuoX3Ibs= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -207,6 +230,7 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -232,15 +256,22 @@ golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -284,6 +315,7 @@ golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -312,6 +344,8 @@ google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6 h1:lMO5rYAqUxkmaj76jAkRUvt5JZgFymx/+Q5Mzfivuhc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -364,6 +398,10 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -371,6 +409,8 @@ gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/README.md b/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/README.md index 21f35abad1..fa8c6b06f2 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/README.md +++ b/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/README.md @@ -15,7 +15,6 @@ Install the following dependencies: ```shell go get github.com/stretchr/testify/assert -go get golang.org/x/oauth2 go get golang.org/x/net/context ``` diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/client.go b/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/client.go index b641ac83f2..fe43aa3be8 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/client.go +++ b/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/client.go @@ -33,7 +33,6 @@ import ( "time" "unicode/utf8" - "golang.org/x/oauth2" ) var ( @@ -407,27 +406,6 @@ func (c *APIClient) prepareRequest( // Walk through any authentication. - // OAuth2 authentication - if tok, ok := ctx.Value(ContextOAuth2).(oauth2.TokenSource); ok { - // We were able to grab an oauth2 token from the context - var latestToken *oauth2.Token - if latestToken, err = tok.Token(); err != nil { - return nil, err - } - - latestToken.SetAuthHeader(localVarRequest) - } - - // Basic HTTP Authentication - if auth, ok := ctx.Value(ContextBasicAuth).(BasicAuth); ok { - localVarRequest.SetBasicAuth(auth.UserName, auth.Password) - } - - // AccessToken Authentication - if auth, ok := ctx.Value(ContextAccessToken).(string); ok { - localVarRequest.Header.Add("Authorization", "Bearer "+auth) - } - } for header, value := range c.cfg.DefaultHeader { diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/configuration.go b/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/configuration.go index a8b3ade6ec..b898228ba9 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/configuration.go +++ b/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/configuration.go @@ -28,21 +28,9 @@ func (c contextKey) String() string { } var ( - // ContextOAuth2 takes an oauth2.TokenSource as authentication for the request. - ContextOAuth2 = contextKey("token") - - // ContextBasicAuth takes BasicAuth as authentication for the request. - ContextBasicAuth = contextKey("basic") - - // ContextAccessToken takes a string oauth2 access token as authentication for the request. - ContextAccessToken = contextKey("accesstoken") - // ContextAPIKeys takes a string apikey as authentication for the request ContextAPIKeys = contextKey("apiKeys") - // ContextHttpSignatureAuth takes HttpSignatureAuth as authentication for the request. - ContextHttpSignatureAuth = contextKey("httpsignature") - // ContextServerIndex uses a server configuration from the index. ContextServerIndex = contextKey("serverIndex") diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/go.mod b/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/go.mod index ead32606c7..1e446f2663 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/go.mod +++ b/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/go.mod @@ -3,5 +3,4 @@ module github.com/GIT_USER_ID/GIT_REPO_ID go 1.13 require ( - golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558 ) diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/go.sum b/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/go.sum index 734252e681..c966c8ddfd 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/go.sum +++ b/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/go.sum @@ -4,8 +4,6 @@ github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5y golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e h1:bRhVy7zSSasaqNksaRZiA5EEI+Ei4I1nO5Jh72wfHlg= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= From 22bd3e31dce729d652602252f106e857d2a7ab6f Mon Sep 17 00:00:00 2001 From: William Cheng Date: Fri, 2 Dec 2022 17:12:40 +0800 Subject: [PATCH 071/189] add Bump.sh as bronzer sponsor (#14162) --- README.md | 1 + website/src/dynamic/sponsors.yml | 5 +++++ website/static/img/companies/bumpsh.png | Bin 0 -> 3552 bytes 3 files changed, 6 insertions(+) create mode 100644 website/static/img/companies/bumpsh.png diff --git a/README.md b/README.md index 44f309a193..764162fe59 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,7 @@ If you find OpenAPI Generator useful for work, please consider asking your compa [](https://www.merge.dev/?utm_source=openapi_generator&utm_medium=github_webpage&utm_campaign=sponsor) [](https://www.burkert.com/?utm_source=openapi_generator&utm_medium=github_webpage&utm_campaign=sponsor) [](https://www.finbourne.com/?utm_source=openapi_generator&utm_medium=github_webpage&utm_campaign=sponsor) +[](https://bump.sh/?utm_source=openapi_generator&utm_medium=github_webpage&utm_campaign=sponsor) #### Thank you GoDaddy for sponsoring the domain names, Linode for sponsoring the VPS and Checkly for sponsoring the API monitoring diff --git a/website/src/dynamic/sponsors.yml b/website/src/dynamic/sponsors.yml index d2a273c6d8..51129dca1a 100644 --- a/website/src/dynamic/sponsors.yml +++ b/website/src/dynamic/sponsors.yml @@ -63,3 +63,8 @@ image: "img/companies/finbourne.png" infoLink: "https://www.finbourne.com/?utm_source=openapi_generator&utm_medium=official_website&utm_campaign=sponsor" bronze: true +- + caption: "Bump.sh" + image: "img/companies/bumpsh.png" + infoLink: "https://bump.sh/?utm_source=openapi_generator&utm_medium=official_website&utm_campaign=sponsor" + bronze: true diff --git a/website/static/img/companies/bumpsh.png b/website/static/img/companies/bumpsh.png new file mode 100644 index 0000000000000000000000000000000000000000..61e52eee64d317316226656166a8e34150d32fa0 GIT binary patch literal 3552 zcmdT{=Q|s07uVLP9n`87it^ahj1jXnYtIs|z14~tTWeLR+C+_{RE*f9s#Z}-t=Qu! z4Qf>s6(w(;=O1`KzaQ@VcU|W?<9E(=pX;1E&D7)}Jh7Fx^Kj;q?w}Ap5P;(xD}_>8}Vt>gEs}i z;^3SAC!qCi`NqOx%Uizz!f6&?drM18U0oge*m8BWo8`XA?CdN99i7s(WRQUQj9p)t zKw!lPq~^)1N!bux14@g+oxN{8>rIUsn>_R%LdpqC#Gw>l&8(bimW$jIsgc1V9huL=#JSg2{Gl~NfFf&5eOb5KY4669jr6qXWgVFLeu-x z__Jpq0faB^Y9M1bA z+)a)>tz7L({`#=T_@=10k@QvhMvlWom5)qcr?V>Fv(H?P5;?&LX)_sxA6$0l#1Z-M zz_Lx3Npt`Nb9OX*D?D&n?>BGluHToy#ntbqjinlcsq&Hfcg!=qx}o1nLr!Z)c$i?; zsXt3gE(0Wvh>&eLaurD^n!`1=H*UV+Aw(lW8U$LtsM?;uEsHHq8;=)MI=GG8F&hQv ziBFr!Oi;`h>$+#GAgfc@j&>Z*G7BFpUI3}%ZSN|sS_c2>Iro?--QCjM{u94`DO_@` zF%_FCcd8KeIIxd?sxoetAUhy-nzPg;GeL=uU5GvzGw^`tYEF}(jc90T*OY>lq$Vqf z?TZ;P%V#a)hE?`ERS-)cjC^a_ROHlciq3GaCRtc;-pWE4vWVHY6LKw<(|mOUEk0f> zzc&ZFoSvB(j(RiJ@XP=Dp5aTA%+4hZ`n$J_Hu4!VX*Va03=i6pGlJTNr;FVk*D${r z`wJAXK+yzSD4Rq#A#IqCZ-(D|237*uu)w44t!+peXpc2iY6VHU+aO>25D~@fW=371 zYbkYn92VJwU=)YnLR0KeI%`#|G9-wxyeGA2Mng@18lZ}+Yi-x+FfC-Py2=wqDAaFV zwb;NkTz6}dswrKDJm#x277;_qwF< zYo5yzx^>oYw7W9ytiDP`BN&Ly_FD|LF)%Q2X&i;)9Ada;>dKA6412%hfcLl7#>~Gk z_Y=Uyyv1p~i^8@~F&osB%93Cdzo@vlxTvW9j?f3h-lCvCnH7dxGR!=&sH*Vw2yIW+ z&^Xi{ipa{Gdd7A&erbSZ{oC8{Qv~u381=VpOH`QF0gM=zaRKJI$X2gl>2Dq0M~~z3 zE8pV^vmJILi?YS)D&D(Omvg8Ae3c9g^6!6*GT<$5`&yaNBxIx4A8>onAI2m%tk-~W z&@*v=ujA$P?%=Cy+@OztOi7ZY!Qf*OmpH?kh8t^4>i~oSYbRaZN!(XO1Ulh*3a3 zPv?VSw{(r&dAAL8cW5Z=46;e&h7`NB+#b^4Fla)HpfrO{+JYVlgywK@YVzP+=D?RYN@ zLw_pV2!e4nw`OP#bCYwjKe12nuooH=M+AFM*BoW0cHwtaNW4`rDw}?y0xr9G!TwZv zSj}2FRW%BBf|uw1rQFNDR$X8~fU))8I4OUrw;0gmHTJKGLy~G-_tbPij1!>8F z%R*n?P3w9sxCoN2xGEG=)mjp+@OY}{#CJf9fo%`RR5IKm*?jn*K9O&*T+2cIGRIoR zk*cqn*U)x5YP?zM>&oc3|Kub2^i)q#waq9d2UXIO@CpnJ^jG8ZbPYmU7Y`LhvveW~ zovl&TykgeZU%Kqd0iSfHVwRMEjA01!Dc8vKA3uJO+s8#`mH9W#AzYBy={c5|pRZoD zy4Al-T5*D8mpmr?;Hy%S_W@#`a;pamR-73)3Kh)wd9T_nf&c0Z8ydF9emldn7JxKh zdLqgSwe>!&+YfIK-hGvol?C32(2_D!k8-3-E_$y!E5coq*1k0lU=`s%+L0p)pZaQ9 zh|4Mv5*>3@_Lw!4|LLIpHAgm@6y|7S&pP~Z`8`;s^bgzq;2xkN_Iiu?WUyu8TO;SgL=a>^G-yjO$-{1B^hi@{TdT z_{tXW`%Mbp1Y(&Mf`DCrDxAorOJyx71M%s1V$3fHCkgMiU-(3!R>}-VF&w3t4&may z(Z+2>$fispr8=2Zl;3NPS*aM5uWDcE%E3_)z*+^r2ka&TSqYz?S(;`lz?&Yd2)^y=SjcqD+`Y z68dqr!`VuWn)Oi^>SN<8D8MqoR#-wpqGPSSy{&DoXrS!+QDl%D?P(Ev$tOuPtwWC! zq|v&=iPJ7GA9u3WjyjJkO3p}90Oo%}yYl^U`))9dGWRB!s-C(Yf3X`g9pUVF5sicG z!PS@5gv}@8O2a~Z@eUMd0rI52_5GE|;qEXV9*A<>uL-FI7NPyY8^RL04wn+qQpmhE zKXzt@UvJ~g^N+8gkft%x*y>yuifXC+_UzlYZFn^Nr}pase&`neS^vTQlO%vPb_D^e z)>`d%x3snBRVubaOV%I9KUdeeaJiUu<62!^4Yam=otG!C7^iL$xJVFv)XpASxHSFk8yK1~Jtz;zh8Y+i`PLCGA)`u_y0+F4zgEW*${@W96?X9!3SjwBj zw-VyT%1`J^4fX#t5j+7^R)y5`?GxOG)zIDf@ z?Cwe1CdS=j&p(oHkX8UPCID?V8Jdjxe?WF9hKo(|2?udF)t?MhA9wWm>bZ}v?<#}mYiAK7mFDK=hAxleD+D4g z`mOnuKq%FR!jP2&TYY0Qv#AEhm$3x>gHJEGRM+8gCtN*vt7%|8#e{kg zPp8p+P3X9`H+%AA9|{b*fqt(O8+%>O@V-4JQUJp9of$CZ`upnos_{@v@P?P=6@2ec5b~FbI^+0T!QZ3I6_9hj!|X zLAA;Fd<;m@DyIuA`$+Q%)_Xuxx4 zDwi9~K&%dsn*qa<$dfA1w6kx}%^3Hbq>00MbZ9r-LJQwKJw5$bH4=_QA|>fkJ_fDD zVx|uOE@Wuc$GW;H%l!Y6DlRVW&b_~yB|r%nTi%xx3jrlBfW;Y4{sT0%yT~Fjr*w(T zbC&-7Q=1XPGn5S$Z)^_PzIRGbAMj8{kW`xeb>fm?^m#YW&{MGZk(rg%)gBdJC@7sN z-j;V$>Nz9PWd>;~vIPa+%MLBqquo8m? z(BhJk@|YjBc)a!+Au}K~uR1h5+{Vg=?=KBYE5`!~gyky}6e%Ata07Zr62R~r6CI_p z1S&RBoSUDYpPh}Gx_=7}3M*cgiKo8(nLeI8mEuvn?f(rV6Di5ah{TWdg+Iy1Ro{|+ PZe;qpCOQpT&WZm8tm&aE literal 0 HcmV?d00001 From 94dccae82d9d394e7a8744247e40557f90411501 Mon Sep 17 00:00:00 2001 From: Glenn Olsson Date: Sat, 3 Dec 2022 19:27:58 +0100 Subject: [PATCH 072/189] [typescript-fetch] Fix response type to be Response or undefined (#13825) * Fix response type to be Response or undefined Current generated code produces a `response` variable set to undefined, and TS does not like you changing the type of the variable later. Therefore, set the type of the variable to be `Response` or `undefined` Solves OpenAPITools/openapi-generator#12007 * Update samples --- .../src/main/resources/typescript-fetch/runtime.mustache | 2 +- .../petstore/typescript-fetch/builds/allOf-readonly/runtime.ts | 2 +- .../petstore/typescript-fetch/builds/default-v3.0/runtime.ts | 2 +- .../client/petstore/typescript-fetch/builds/default/runtime.ts | 2 +- samples/client/petstore/typescript-fetch/builds/enum/runtime.ts | 2 +- .../petstore/typescript-fetch/builds/es6-target/src/runtime.ts | 2 +- .../typescript-fetch/builds/multiple-parameters/runtime.ts | 2 +- .../builds/prefix-parameter-interfaces/src/runtime.ts | 2 +- .../typescript-fetch/builds/sagas-and-records/src/runtime.ts | 2 +- .../petstore/typescript-fetch/builds/with-interfaces/runtime.ts | 2 +- .../typescript-fetch/builds/with-npm-version/src/runtime.ts | 2 +- .../typescript-fetch/builds/with-string-enums/runtime.ts | 2 +- .../builds/without-runtime-checks/src/runtime.ts | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/typescript-fetch/runtime.mustache b/modules/openapi-generator/src/main/resources/typescript-fetch/runtime.mustache index b47cf55c45..fb105057e3 100644 --- a/modules/openapi-generator/src/main/resources/typescript-fetch/runtime.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-fetch/runtime.mustache @@ -166,7 +166,7 @@ export class BaseAPI { }) || fetchParams; } } - let response = undefined; + let response: Response | undefined = undefined; try { response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); } catch (e) { diff --git a/samples/client/petstore/typescript-fetch/builds/allOf-readonly/runtime.ts b/samples/client/petstore/typescript-fetch/builds/allOf-readonly/runtime.ts index 8e0b06dca6..18b2f64813 100644 --- a/samples/client/petstore/typescript-fetch/builds/allOf-readonly/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/allOf-readonly/runtime.ts @@ -177,7 +177,7 @@ export class BaseAPI { }) || fetchParams; } } - let response = undefined; + let response: Response | undefined = undefined; try { response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); } catch (e) { diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/runtime.ts b/samples/client/petstore/typescript-fetch/builds/default-v3.0/runtime.ts index 2c942d95a3..85e8df80b7 100644 --- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/runtime.ts @@ -177,7 +177,7 @@ export class BaseAPI { }) || fetchParams; } } - let response = undefined; + let response: Response | undefined = undefined; try { response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); } catch (e) { diff --git a/samples/client/petstore/typescript-fetch/builds/default/runtime.ts b/samples/client/petstore/typescript-fetch/builds/default/runtime.ts index 166da7c38d..353b30125b 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/default/runtime.ts @@ -177,7 +177,7 @@ export class BaseAPI { }) || fetchParams; } } - let response = undefined; + let response: Response | undefined = undefined; try { response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); } catch (e) { diff --git a/samples/client/petstore/typescript-fetch/builds/enum/runtime.ts b/samples/client/petstore/typescript-fetch/builds/enum/runtime.ts index 7ceb9c463d..65f8058af3 100644 --- a/samples/client/petstore/typescript-fetch/builds/enum/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/enum/runtime.ts @@ -177,7 +177,7 @@ export class BaseAPI { }) || fetchParams; } } - let response = undefined; + let response: Response | undefined = undefined; try { response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); } catch (e) { diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/src/runtime.ts b/samples/client/petstore/typescript-fetch/builds/es6-target/src/runtime.ts index 166da7c38d..353b30125b 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/src/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/src/runtime.ts @@ -177,7 +177,7 @@ export class BaseAPI { }) || fetchParams; } } - let response = undefined; + let response: Response | undefined = undefined; try { response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); } catch (e) { diff --git a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/runtime.ts b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/runtime.ts index 166da7c38d..353b30125b 100644 --- a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/runtime.ts @@ -177,7 +177,7 @@ export class BaseAPI { }) || fetchParams; } } - let response = undefined; + let response: Response | undefined = undefined; try { response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); } catch (e) { diff --git a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/runtime.ts b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/runtime.ts index 166da7c38d..353b30125b 100644 --- a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/src/runtime.ts @@ -177,7 +177,7 @@ export class BaseAPI { }) || fetchParams; } } - let response = undefined; + let response: Response | undefined = undefined; try { response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); } catch (e) { diff --git a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/runtime.ts b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/runtime.ts index 166da7c38d..353b30125b 100644 --- a/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/sagas-and-records/src/runtime.ts @@ -177,7 +177,7 @@ export class BaseAPI { }) || fetchParams; } } - let response = undefined; + let response: Response | undefined = undefined; try { response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); } catch (e) { diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/runtime.ts b/samples/client/petstore/typescript-fetch/builds/with-interfaces/runtime.ts index 166da7c38d..353b30125b 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/runtime.ts @@ -177,7 +177,7 @@ export class BaseAPI { }) || fetchParams; } } - let response = undefined; + let response: Response | undefined = undefined; try { response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); } catch (e) { diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/runtime.ts b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/runtime.ts index 166da7c38d..353b30125b 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/src/runtime.ts @@ -177,7 +177,7 @@ export class BaseAPI { }) || fetchParams; } } - let response = undefined; + let response: Response | undefined = undefined; try { response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); } catch (e) { diff --git a/samples/client/petstore/typescript-fetch/builds/with-string-enums/runtime.ts b/samples/client/petstore/typescript-fetch/builds/with-string-enums/runtime.ts index 7ceb9c463d..65f8058af3 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-string-enums/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-string-enums/runtime.ts @@ -177,7 +177,7 @@ export class BaseAPI { }) || fetchParams; } } - let response = undefined; + let response: Response | undefined = undefined; try { response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); } catch (e) { diff --git a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/runtime.ts b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/runtime.ts index 6da1edbcb7..3dfb66ac7b 100644 --- a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/src/runtime.ts @@ -177,7 +177,7 @@ export class BaseAPI { }) || fetchParams; } } - let response = undefined; + let response: Response | undefined = undefined; try { response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); } catch (e) { From d6e7f70cb474eeb3f3922ec6eadc41aa30e5ecd5 Mon Sep 17 00:00:00 2001 From: Brendan Burns Date: Sun, 4 Dec 2022 22:16:50 -0800 Subject: [PATCH 073/189] Modify Java ApiException to have a more informative message. (#14154) * Modify ApiException to have a more informative message. * Address comments. --- .../src/main/resources/Java/apiException.mustache | 2 +- .../resources/Java/libraries/okhttp-gson/apiException.mustache | 2 +- .../src/main/java/org/openapitools/client/ApiException.java | 2 +- .../src/main/java/org/openapitools/client/ApiException.java | 2 +- .../src/main/java/org/openapitools/client/ApiException.java | 2 +- .../src/main/java/org/openapitools/client/ApiException.java | 2 +- .../src/main/java/org/openapitools/client/ApiException.java | 2 +- .../src/main/java/org/openapitools/client/ApiException.java | 2 +- .../src/main/java/org/openapitools/client/ApiException.java | 2 +- .../src/main/java/org/openapitools/client/ApiException.java | 2 +- .../src/main/java/org/openapitools/client/ApiException.java | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/Java/apiException.mustache b/modules/openapi-generator/src/main/resources/Java/apiException.mustache index 966663f805..31d2a807e2 100644 --- a/modules/openapi-generator/src/main/resources/Java/apiException.mustache +++ b/modules/openapi-generator/src/main/resources/Java/apiException.mustache @@ -37,7 +37,7 @@ public class ApiException extends{{#useRuntimeException}} RuntimeException {{/us } public ApiException(int code, Map> responseHeaders, String responseBody) { - this((String) null, (Throwable) null, code, responseHeaders, responseBody); + this("Response Code: " + code + " Response Body: " + responseBody, (Throwable) null, code, responseHeaders, responseBody); } public ApiException(int code, String message) { diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/apiException.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/apiException.mustache index 3050315676..dd224d5822 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/apiException.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/okhttp-gson/apiException.mustache @@ -101,7 +101,7 @@ public class ApiException extends{{#useRuntimeException}} RuntimeException {{/us * @param responseBody the response body */ public ApiException(int code, Map> responseHeaders, String responseBody) { - this((String) null, (Throwable) null, code, responseHeaders, responseBody); + this("Response Code: " + code + " Response Body: " + responseBody, (Throwable) null, code, responseHeaders, responseBody); } /** diff --git a/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/ApiException.java b/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/ApiException.java index a5343e43d5..f8f5fb86aa 100644 --- a/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/ApiException.java +++ b/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/ApiException.java @@ -99,7 +99,7 @@ public class ApiException extends Exception { * @param responseBody the response body */ public ApiException(int code, Map> responseHeaders, String responseBody) { - this((String) null, (Throwable) null, code, responseHeaders, responseBody); + this(code + " " + responseBody, (Throwable) null, code, responseHeaders, responseBody); } /** diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/ApiException.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/ApiException.java index aad89dd6bd..e37e389642 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/ApiException.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/ApiException.java @@ -48,7 +48,7 @@ public class ApiException extends Exception { } public ApiException(int code, Map> responseHeaders, String responseBody) { - this((String) null, (Throwable) null, code, responseHeaders, responseBody); + this(code + " " + responseBody, (Throwable) null, code, responseHeaders, responseBody); } public ApiException(int code, String message) { diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/ApiException.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/ApiException.java index aad89dd6bd..e37e389642 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/ApiException.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/ApiException.java @@ -48,7 +48,7 @@ public class ApiException extends Exception { } public ApiException(int code, Map> responseHeaders, String responseBody) { - this((String) null, (Throwable) null, code, responseHeaders, responseBody); + this(code + " " + responseBody, (Throwable) null, code, responseHeaders, responseBody); } public ApiException(int code, String message) { diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/ApiException.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/ApiException.java index d181c0ff40..a7e1544a7b 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/ApiException.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/ApiException.java @@ -99,7 +99,7 @@ public class ApiException extends Exception { * @param responseBody the response body */ public ApiException(int code, Map> responseHeaders, String responseBody) { - this((String) null, (Throwable) null, code, responseHeaders, responseBody); + this(code + " " + responseBody, (Throwable) null, code, responseHeaders, responseBody); } /** diff --git a/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/ApiException.java b/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/ApiException.java index 326973a682..7f86ca9ae6 100644 --- a/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/ApiException.java +++ b/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/ApiException.java @@ -99,7 +99,7 @@ public class ApiException extends Exception { * @param responseBody the response body */ public ApiException(int code, Map> responseHeaders, String responseBody) { - this((String) null, (Throwable) null, code, responseHeaders, responseBody); + this(code + " " + responseBody, (Throwable) null, code, responseHeaders, responseBody); } /** diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ApiException.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ApiException.java index d181c0ff40..a7e1544a7b 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ApiException.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ApiException.java @@ -99,7 +99,7 @@ public class ApiException extends Exception { * @param responseBody the response body */ public ApiException(int code, Map> responseHeaders, String responseBody) { - this((String) null, (Throwable) null, code, responseHeaders, responseBody); + this(code + " " + responseBody, (Throwable) null, code, responseHeaders, responseBody); } /** diff --git a/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/ApiException.java b/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/ApiException.java index 326973a682..7f86ca9ae6 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/ApiException.java +++ b/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/ApiException.java @@ -99,7 +99,7 @@ public class ApiException extends Exception { * @param responseBody the response body */ public ApiException(int code, Map> responseHeaders, String responseBody) { - this((String) null, (Throwable) null, code, responseHeaders, responseBody); + this(code + " " + responseBody, (Throwable) null, code, responseHeaders, responseBody); } /** diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiException.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiException.java index d181c0ff40..a7e1544a7b 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiException.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiException.java @@ -99,7 +99,7 @@ public class ApiException extends Exception { * @param responseBody the response body */ public ApiException(int code, Map> responseHeaders, String responseBody) { - this((String) null, (Throwable) null, code, responseHeaders, responseBody); + this(code + " " + responseBody, (Throwable) null, code, responseHeaders, responseBody); } /** diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/ApiException.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/ApiException.java index aad89dd6bd..e37e389642 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/ApiException.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/ApiException.java @@ -48,7 +48,7 @@ public class ApiException extends Exception { } public ApiException(int code, Map> responseHeaders, String responseBody) { - this((String) null, (Throwable) null, code, responseHeaders, responseBody); + this(code + " " + responseBody, (Throwable) null, code, responseHeaders, responseBody); } public ApiException(int code, String message) { From 0103d400c23d80e8e5d46bb0caed69194b05763d Mon Sep 17 00:00:00 2001 From: William Cheng Date: Mon, 5 Dec 2022 14:33:04 +0800 Subject: [PATCH 074/189] update java samples --- .../src/main/java/org/openapitools/client/ApiException.java | 2 +- .../src/main/java/org/openapitools/client/ApiException.java | 2 +- .../src/main/java/org/openapitools/client/ApiException.java | 2 +- .../src/main/java/org/openapitools/client/ApiException.java | 2 +- .../src/main/java/org/openapitools/client/ApiException.java | 2 +- .../src/main/java/org/openapitools/client/ApiException.java | 2 +- .../src/main/java/org/openapitools/client/ApiException.java | 2 +- .../src/main/java/org/openapitools/client/ApiException.java | 2 +- .../src/main/java/org/openapitools/client/ApiException.java | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/ApiException.java b/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/ApiException.java index f8f5fb86aa..c7fd509b05 100644 --- a/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/ApiException.java +++ b/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/ApiException.java @@ -99,7 +99,7 @@ public class ApiException extends Exception { * @param responseBody the response body */ public ApiException(int code, Map> responseHeaders, String responseBody) { - this(code + " " + responseBody, (Throwable) null, code, responseHeaders, responseBody); + this("Response Code: " + code + " Response Body: " + responseBody, (Throwable) null, code, responseHeaders, responseBody); } /** diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/ApiException.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/ApiException.java index e37e389642..942dacc1d3 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/ApiException.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/ApiException.java @@ -48,7 +48,7 @@ public class ApiException extends Exception { } public ApiException(int code, Map> responseHeaders, String responseBody) { - this(code + " " + responseBody, (Throwable) null, code, responseHeaders, responseBody); + this("Response Code: " + code + " Response Body: " + responseBody, (Throwable) null, code, responseHeaders, responseBody); } public ApiException(int code, String message) { diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/ApiException.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/ApiException.java index e37e389642..942dacc1d3 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/ApiException.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/ApiException.java @@ -48,7 +48,7 @@ public class ApiException extends Exception { } public ApiException(int code, Map> responseHeaders, String responseBody) { - this(code + " " + responseBody, (Throwable) null, code, responseHeaders, responseBody); + this("Response Code: " + code + " Response Body: " + responseBody, (Throwable) null, code, responseHeaders, responseBody); } public ApiException(int code, String message) { diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/ApiException.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/ApiException.java index a7e1544a7b..00dea9e4a0 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/ApiException.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/ApiException.java @@ -99,7 +99,7 @@ public class ApiException extends Exception { * @param responseBody the response body */ public ApiException(int code, Map> responseHeaders, String responseBody) { - this(code + " " + responseBody, (Throwable) null, code, responseHeaders, responseBody); + this("Response Code: " + code + " Response Body: " + responseBody, (Throwable) null, code, responseHeaders, responseBody); } /** diff --git a/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/ApiException.java b/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/ApiException.java index 7f86ca9ae6..dafc87ad74 100644 --- a/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/ApiException.java +++ b/samples/client/petstore/java/okhttp-gson-group-parameter/src/main/java/org/openapitools/client/ApiException.java @@ -99,7 +99,7 @@ public class ApiException extends Exception { * @param responseBody the response body */ public ApiException(int code, Map> responseHeaders, String responseBody) { - this(code + " " + responseBody, (Throwable) null, code, responseHeaders, responseBody); + this("Response Code: " + code + " Response Body: " + responseBody, (Throwable) null, code, responseHeaders, responseBody); } /** diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ApiException.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ApiException.java index a7e1544a7b..00dea9e4a0 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ApiException.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ApiException.java @@ -99,7 +99,7 @@ public class ApiException extends Exception { * @param responseBody the response body */ public ApiException(int code, Map> responseHeaders, String responseBody) { - this(code + " " + responseBody, (Throwable) null, code, responseHeaders, responseBody); + this("Response Code: " + code + " Response Body: " + responseBody, (Throwable) null, code, responseHeaders, responseBody); } /** diff --git a/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/ApiException.java b/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/ApiException.java index 7f86ca9ae6..dafc87ad74 100644 --- a/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/ApiException.java +++ b/samples/client/petstore/java/okhttp-gson-swagger1/src/main/java/org/openapitools/client/ApiException.java @@ -99,7 +99,7 @@ public class ApiException extends Exception { * @param responseBody the response body */ public ApiException(int code, Map> responseHeaders, String responseBody) { - this(code + " " + responseBody, (Throwable) null, code, responseHeaders, responseBody); + this("Response Code: " + code + " Response Body: " + responseBody, (Throwable) null, code, responseHeaders, responseBody); } /** diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiException.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiException.java index a7e1544a7b..00dea9e4a0 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiException.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiException.java @@ -99,7 +99,7 @@ public class ApiException extends Exception { * @param responseBody the response body */ public ApiException(int code, Map> responseHeaders, String responseBody) { - this(code + " " + responseBody, (Throwable) null, code, responseHeaders, responseBody); + this("Response Code: " + code + " Response Body: " + responseBody, (Throwable) null, code, responseHeaders, responseBody); } /** diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/ApiException.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/ApiException.java index e37e389642..942dacc1d3 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/ApiException.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/ApiException.java @@ -48,7 +48,7 @@ public class ApiException extends Exception { } public ApiException(int code, Map> responseHeaders, String responseBody) { - this(code + " " + responseBody, (Throwable) null, code, responseHeaders, responseBody); + this("Response Code: " + code + " Response Body: " + responseBody, (Throwable) null, code, responseHeaders, responseBody); } public ApiException(int code, String message) { From 4e387cad5390105938665b4fa08eed5fc2d813bf Mon Sep 17 00:00:00 2001 From: Ahmed Fwela <63286031+ahmednfwela@users.noreply.github.com> Date: Mon, 5 Dec 2022 09:00:44 +0200 Subject: [PATCH 075/189] [dart-dio] Add `r` before '{{MappingName}}' to handle special characters in discriminators (#14167) * Add `r` before '{{MappingName}}' to handle special characters * Update samples * use propertyBaseName instead of propertyName * update samples --- .../built_value/class_members.mustache | 2 +- .../built_value/class_serializer.mustache | 6 +++--- .../lib/src/model/bar.dart | 2 +- .../lib/src/model/bar_create.dart | 2 +- .../lib/src/model/bar_ref.dart | 2 +- .../lib/src/model/bar_ref_or_value.dart | 6 +++--- .../lib/src/model/entity.dart | 14 +++++++------- .../lib/src/model/entity_ref.dart | 6 +++--- .../lib/src/model/foo.dart | 2 +- .../lib/src/model/foo_ref.dart | 2 +- .../lib/src/model/foo_ref_or_value.dart | 6 +++--- .../lib/src/model/pasta.dart | 2 +- .../lib/src/model/pizza.dart | 4 ++-- .../lib/src/model/pizza_speziale.dart | 2 +- .../lib/src/model/animal.dart | 4 ++-- 15 files changed, 31 insertions(+), 31 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/class_members.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/class_members.mustache index ad2e2b0650..d814b9ee9d 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/class_members.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/class_members.mustache @@ -15,7 +15,7 @@ {{/-first}}{{/anyOf}}{{#oneOf}}{{#-first}} /// One Of {{#oneOf}}[{{{.}}}]{{^-last}}, {{/-last}}{{/oneOf}} OneOf get oneOf; -{{/-first}}{{/oneOf}}{{#discriminator}} static const String discriminatorFieldName = r'{{propertyName}}';{{#hasDiscriminatorWithNonEmptyMapping}} +{{/-first}}{{/oneOf}}{{#discriminator}} static const String discriminatorFieldName = r'{{propertyBaseName}}';{{#hasDiscriminatorWithNonEmptyMapping}} static const Map discriminatorMapping = { {{#mappedModels}} diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/class_serializer.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/class_serializer.mustache index a0528cd149..6edb8a019d 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/class_serializer.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/class_serializer.mustache @@ -127,7 +127,7 @@ class _${{classname}}Serializer implements PrimitiveSerializer<{{classname}}> { Type oneOfType; switch (discValue) { {{#mappedModels}} - case '{{mappingName}}': + case r'{{mappingName}}': oneOfResult = serializers.deserialize( oneOfDataSrc, specifiedType: FullType({{modelName}}), @@ -210,7 +210,7 @@ class _${{classname}}Serializer implements PrimitiveSerializer<{{classname}}> { Type anyOfType; switch (discValue) { {{#mappedModels}} - case '{{mappingName}}': + case r'{{mappingName}}': anyOfResult = serializers.deserialize(anyOfDataSrc, specifiedType: FullType({{modelName}})) as {{modelName}}; anyOfType = {{modelName}}; break; @@ -271,7 +271,7 @@ class _${{classname}}Serializer implements PrimitiveSerializer<{{classname}}> { final discValue = serializers.deserialize(serializedList[discIndex], specifiedType: FullType(String)) as String; switch (discValue) { {{#mappedModels}} - case '{{mappingName}}': + case r'{{mappingName}}': return serializers.deserialize(serialized, specifiedType: FullType({{modelName}})) as {{modelName}}; {{/mappedModels}} default: diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar.dart index 9c52802b84..ee5c3ec5be 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar.dart @@ -32,7 +32,7 @@ abstract class Bar implements Entity, Built { @BuiltValueField(wireName: r'barPropA') String? get barPropA; - static const String discriminatorFieldName = r'atType'; + static const String discriminatorFieldName = r'@type'; Bar._(); diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar_create.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar_create.dart index ebbce35778..2cd7603faa 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar_create.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar_create.dart @@ -32,7 +32,7 @@ abstract class BarCreate implements Entity, Built { @BuiltValueField(wireName: r'barPropA') String? get barPropA; - static const String discriminatorFieldName = r'atType'; + static const String discriminatorFieldName = r'@type'; BarCreate._(); diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar_ref.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar_ref.dart index bb4965bea8..eec9b1ce51 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar_ref.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar_ref.dart @@ -19,7 +19,7 @@ part 'bar_ref.g.dart'; /// * [atType] - When sub-classing, this defines the sub-class Extensible name @BuiltValue() abstract class BarRef implements EntityRef, Built { - static const String discriminatorFieldName = r'atType'; + static const String discriminatorFieldName = r'@type'; BarRef._(); diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar_ref_or_value.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar_ref_or_value.dart index 09d7b0b99c..9f73e2131d 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar_ref_or_value.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar_ref_or_value.dart @@ -24,7 +24,7 @@ abstract class BarRefOrValue implements Built discriminatorMapping = { r'Bar': Bar, @@ -82,14 +82,14 @@ class _$BarRefOrValueSerializer implements PrimitiveSerializer { Object oneOfResult; Type oneOfType; switch (discValue) { - case 'Bar': + case r'Bar': oneOfResult = serializers.deserialize( oneOfDataSrc, specifiedType: FullType(Bar), ) as Bar; oneOfType = Bar; break; - case 'BarRef': + case r'BarRef': oneOfResult = serializers.deserialize( oneOfDataSrc, specifiedType: FullType(BarRef), diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/entity.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/entity.dart index 1a83a5d6b5..040a825e09 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/entity.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/entity.dart @@ -26,7 +26,7 @@ part 'entity.g.dart'; /// * [atType] - When sub-classing, this defines the sub-class Extensible name @BuiltValue(instantiable: false) abstract class Entity implements Addressable, Extensible { - static const String discriminatorFieldName = r'atType'; + static const String discriminatorFieldName = r'@type'; static const Map discriminatorMapping = { r'Bar': Bar, @@ -125,17 +125,17 @@ class _$EntitySerializer implements PrimitiveSerializer { final discIndex = serializedList.indexOf(Entity.discriminatorFieldName) + 1; final discValue = serializers.deserialize(serializedList[discIndex], specifiedType: FullType(String)) as String; switch (discValue) { - case 'Bar': + case r'Bar': return serializers.deserialize(serialized, specifiedType: FullType(Bar)) as Bar; - case 'Bar_Create': + case r'Bar_Create': return serializers.deserialize(serialized, specifiedType: FullType(BarCreate)) as BarCreate; - case 'Foo': + case r'Foo': return serializers.deserialize(serialized, specifiedType: FullType(Foo)) as Foo; - case 'Pasta': + case r'Pasta': return serializers.deserialize(serialized, specifiedType: FullType(Pasta)) as Pasta; - case 'Pizza': + case r'Pizza': return serializers.deserialize(serialized, specifiedType: FullType(Pizza)) as Pizza; - case 'PizzaSpeziale': + case r'PizzaSpeziale': return serializers.deserialize(serialized, specifiedType: FullType(PizzaSpeziale)) as PizzaSpeziale; default: return serializers.deserialize(serialized, specifiedType: FullType($Entity)) as $Entity; diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/entity_ref.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/entity_ref.dart index 278aa92276..872209eab5 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/entity_ref.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/entity_ref.dart @@ -32,7 +32,7 @@ abstract class EntityRef implements Addressable, Extensible { @BuiltValueField(wireName: r'name') String? get name; - static const String discriminatorFieldName = r'atType'; + static const String discriminatorFieldName = r'@type'; static const Map discriminatorMapping = { r'BarRef': BarRef, @@ -129,9 +129,9 @@ class _$EntityRefSerializer implements PrimitiveSerializer { final discIndex = serializedList.indexOf(EntityRef.discriminatorFieldName) + 1; final discValue = serializers.deserialize(serializedList[discIndex], specifiedType: FullType(String)) as String; switch (discValue) { - case 'BarRef': + case r'BarRef': return serializers.deserialize(serialized, specifiedType: FullType(BarRef)) as BarRef; - case 'FooRef': + case r'FooRef': return serializers.deserialize(serialized, specifiedType: FullType(FooRef)) as FooRef; default: return serializers.deserialize(serialized, specifiedType: FullType($EntityRef)) as $EntityRef; diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/foo.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/foo.dart index efb327dd66..bd5e339c46 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/foo.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/foo.dart @@ -27,7 +27,7 @@ abstract class Foo implements Entity, Built { @BuiltValueField(wireName: r'fooPropB') String? get fooPropB; - static const String discriminatorFieldName = r'atType'; + static const String discriminatorFieldName = r'@type'; Foo._(); diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/foo_ref.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/foo_ref.dart index dd05a2d478..7e92a709f6 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/foo_ref.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/foo_ref.dart @@ -23,7 +23,7 @@ abstract class FooRef implements EntityRef, Built { @BuiltValueField(wireName: r'foorefPropA') String? get foorefPropA; - static const String discriminatorFieldName = r'atType'; + static const String discriminatorFieldName = r'@type'; FooRef._(); diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/foo_ref_or_value.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/foo_ref_or_value.dart index f512292196..115d11d8f6 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/foo_ref_or_value.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/foo_ref_or_value.dart @@ -24,7 +24,7 @@ abstract class FooRefOrValue implements Built discriminatorMapping = { r'Foo': Foo, @@ -82,14 +82,14 @@ class _$FooRefOrValueSerializer implements PrimitiveSerializer { Object oneOfResult; Type oneOfType; switch (discValue) { - case 'Foo': + case r'Foo': oneOfResult = serializers.deserialize( oneOfDataSrc, specifiedType: FullType(Foo), ) as Foo; oneOfType = Foo; break; - case 'FooRef': + case r'FooRef': oneOfResult = serializers.deserialize( oneOfDataSrc, specifiedType: FullType(FooRef), diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/pasta.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/pasta.dart index 5c5ef72537..5af34ea176 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/pasta.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/pasta.dart @@ -23,7 +23,7 @@ abstract class Pasta implements Entity, Built { @BuiltValueField(wireName: r'vendor') String? get vendor; - static const String discriminatorFieldName = r'atType'; + static const String discriminatorFieldName = r'@type'; Pasta._(); diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/pizza.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/pizza.dart index 866daab885..2948323c9e 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/pizza.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/pizza.dart @@ -24,7 +24,7 @@ abstract class Pizza implements Entity { @BuiltValueField(wireName: r'pizzaSize') num? get pizzaSize; - static const String discriminatorFieldName = r'atType'; + static const String discriminatorFieldName = r'@type'; static const Map discriminatorMapping = { r'PizzaSpeziale': PizzaSpeziale, @@ -110,7 +110,7 @@ class _$PizzaSerializer implements PrimitiveSerializer { final discIndex = serializedList.indexOf(Pizza.discriminatorFieldName) + 1; final discValue = serializers.deserialize(serializedList[discIndex], specifiedType: FullType(String)) as String; switch (discValue) { - case 'PizzaSpeziale': + case r'PizzaSpeziale': return serializers.deserialize(serialized, specifiedType: FullType(PizzaSpeziale)) as PizzaSpeziale; default: return serializers.deserialize(serialized, specifiedType: FullType($Pizza)) as $Pizza; diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/pizza_speziale.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/pizza_speziale.dart index 7f17257e50..dd911e1a11 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/pizza_speziale.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/pizza_speziale.dart @@ -23,7 +23,7 @@ abstract class PizzaSpeziale implements Pizza, Built { final discIndex = serializedList.indexOf(Animal.discriminatorFieldName) + 1; final discValue = serializers.deserialize(serializedList[discIndex], specifiedType: FullType(String)) as String; switch (discValue) { - case 'Cat': + case r'Cat': return serializers.deserialize(serialized, specifiedType: FullType(Cat)) as Cat; - case 'Dog': + case r'Dog': return serializers.deserialize(serialized, specifiedType: FullType(Dog)) as Dog; default: return serializers.deserialize(serialized, specifiedType: FullType($Animal)) as $Animal; From ffaf173db1ab2c1052ae704164fd378438e9cc47 Mon Sep 17 00:00:00 2001 From: Manon Grivot <14910727+zodiia@users.noreply.github.com> Date: Mon, 5 Dec 2022 18:44:16 +0100 Subject: [PATCH 076/189] Fixed typescript codegen pattern compiler (#14180) Co-authored-by: Manon Grivot --- .../languages/TypeScriptClientCodegen.java | 36 ++----------------- .../TypeScriptClientCodegenTest.java | 17 +++++++++ 2 files changed, 19 insertions(+), 34 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptClientCodegen.java index 93ef3994ec..2e4f34c646 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptClientCodegen.java @@ -1144,43 +1144,11 @@ public class TypeScriptClientCodegen extends DefaultCodegen implements CodegenCo return fullPrefix + example + closeChars; } else if (StringUtils.isNotBlank(schema.getPattern())) { String pattern = schema.getPattern(); - /* - RxGen does not support our ECMA dialect https://github.com/curious-odd-man/RgxGen/issues/56 - So strip off the leading / and trailing / and turn on ignore case if we have it - */ - Pattern valueExtractor = Pattern.compile("^/?(.+?)/?(.?)$"); - Matcher m = valueExtractor.matcher(pattern); - RgxGen rgxGen = null; - if (m.find()) { - int groupCount = m.groupCount(); - if (groupCount == 1) { - // only pattern found - String isolatedPattern = m.group(1); - rgxGen = new RgxGen(isolatedPattern); - } else if (groupCount == 2) { - // patterns and flag found - String isolatedPattern = m.group(1); - String flags = m.group(2); - if (flags.contains("i")) { - rgxGen = new RgxGen(isolatedPattern); - RgxGenProperties properties = new RgxGenProperties(); - RgxGenOption.CASE_INSENSITIVE.setInProperties(properties, true); - rgxGen.setProperties(properties); - } else { - rgxGen = new RgxGen(isolatedPattern); - } - } - } else { - rgxGen = new RgxGen(pattern); - } + RgxGen rgxGen = new RgxGen(pattern); // this seed makes it so if we have [a-z] we pick a Random random = new Random(18); - if (rgxGen != null){ - example = rgxGen.generate(random); - } else { - throw new RuntimeException("rgxGen cannot be null. Please open an issue in the openapi-generator github repo."); - } + example = rgxGen.generate(random); } else if (schema.getMinLength() != null) { example = ""; int len = schema.getMinLength().intValue(); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/TypeScriptClientCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/TypeScriptClientCodegenTest.java index 925a6adcbc..0e352a7547 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/TypeScriptClientCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/TypeScriptClientCodegenTest.java @@ -141,4 +141,21 @@ public class TypeScriptClientCodegenTest { Assert.assertEquals(tsImports.get(0).get("filename"), mappedName); Assert.assertEquals(tsImports.get(0).get("classname"), "ApiResponse"); } + + @Test + public void testCompilePattern() { + final DefaultCodegen codegen = new TypeScriptClientCodegen(); + final StringSchema prop = new StringSchema(); + prop.setPattern("[A-Z]{3}"); + final Schema root = new ObjectSchema().addProperty("stringPattern", prop); + final OpenAPI openApi = TestUtils.createOpenAPIWithOneSchema("sample", root); + codegen.setOpenAPI(openApi); + + try { + final CodegenModel model = codegen.fromModel("sample", root); + Assert.assertEquals(model.getAllVars().get(0).getPattern(), "/[A-Z]{3}/"); + } catch (Exception ex) { + Assert.fail("Exception was thrown."); + } + } } From f32bf510c0c3784d7af916ab8771abee4a353483 Mon Sep 17 00:00:00 2001 From: caption <101684156+chncaption@users.noreply.github.com> Date: Tue, 6 Dec 2022 12:02:56 +0800 Subject: [PATCH 077/189] update urllib3 1.26.4 to 1.26.5 (#14183) --- samples/server/petstore/python-fastapi/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/server/petstore/python-fastapi/requirements.txt b/samples/server/petstore/python-fastapi/requirements.txt index ce66f96d42..ddef1affcc 100644 --- a/samples/server/petstore/python-fastapi/requirements.txt +++ b/samples/server/petstore/python-fastapi/requirements.txt @@ -29,7 +29,7 @@ six==1.16.0 starlette==0.14.2 typing-extensions==3.10.0.0 ujson==4.0.2 -urllib3==1.26.4 +urllib3==1.26.5 uvicorn==0.13.4 uvloop==0.14.0 watchgod==0.7 From cbbe243bde8bc7ddc28c27835ef0b8bf85cea3da Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 6 Dec 2022 12:12:11 +0800 Subject: [PATCH 078/189] update python fastapi dep to newer versions (#14188) --- .../src/main/resources/python-fastapi/requirements.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/resources/python-fastapi/requirements.mustache b/modules/openapi-generator/src/main/resources/python-fastapi/requirements.mustache index ce66f96d42..ddef1affcc 100644 --- a/modules/openapi-generator/src/main/resources/python-fastapi/requirements.mustache +++ b/modules/openapi-generator/src/main/resources/python-fastapi/requirements.mustache @@ -29,7 +29,7 @@ six==1.16.0 starlette==0.14.2 typing-extensions==3.10.0.0 ujson==4.0.2 -urllib3==1.26.4 +urllib3==1.26.5 uvicorn==0.13.4 uvloop==0.14.0 watchgod==0.7 From 63629ad51cf504ac7300bc06d3af235c74b6ff88 Mon Sep 17 00:00:00 2001 From: Ian Cubbon Date: Mon, 5 Dec 2022 21:21:39 -0700 Subject: [PATCH 079/189] [Go] File Download Fix Return Type (#14046) * Changes manually cherry-picked (for the most part) from https://github.com/OpenAPITools/openapi-generator/pull/12685/files * Examples updated post changes * Missed a change in the mustache template * Update examples after last fix * Missed dereference for required files * Update unit tests * Missed another test case update * `f := *f` isn't quite the same as `*f, err = ...` --- .../codegen/languages/AbstractGoCodegen.java | 14 +++++++------- .../codegen/languages/GoServerCodegen.java | 2 +- .../main/resources/go-server/routers.mustache | 18 +++++++++--------- .../src/main/resources/go/api.mustache | 15 ++++++++++----- .../src/main/resources/go/client.mustache | 18 +++++++++++++++--- .../openapitools/codegen/go/GoModelTest.java | 4 ++-- .../client/petstore/go/go-petstore/api_fake.go | 8 ++++---- .../client/petstore/go/go-petstore/api_pet.go | 18 ++++++++---------- .../client/petstore/go/go-petstore/client.go | 18 +++++++++++++++--- .../petstore/go/go-petstore/docs/FakeApi.md | 4 ++-- .../petstore/go/go-petstore/docs/FormatTest.md | 8 ++++---- .../petstore/go/go-petstore/docs/PetApi.md | 8 ++++---- .../go/go-petstore/model_format_test_.go | 12 ++++++------ samples/client/petstore/go/pet_api_test.go | 4 ++-- .../x-auth-id-alias/go-experimental/client.go | 18 +++++++++++++++--- .../client/petstore/go/go-petstore/api_fake.go | 8 ++++---- .../client/petstore/go/go-petstore/api_pet.go | 18 ++++++++---------- .../client/petstore/go/go-petstore/client.go | 18 +++++++++++++++--- .../petstore/go/go-petstore/docs/FakeApi.md | 4 ++-- .../petstore/go/go-petstore/docs/FormatTest.md | 8 ++++---- .../go/go-petstore/docs/MapOfFileTest.md | 8 ++++---- .../petstore/go/go-petstore/docs/PetApi.md | 8 ++++---- .../go/go-petstore/model_format_test_.go | 12 ++++++------ .../go/go-petstore/model_map_of_file_test_.go | 12 ++++++------ .../client/petstore/go/pet_api_test.go | 4 ++-- .../server/petstore/go-api-server/go/api.go | 2 +- .../go-api-server/go/api_pet_service.go | 2 +- .../petstore/go-api-server/go/routers.go | 18 +++++++++--------- .../server/petstore/go-chi-server/go/api.go | 2 +- .../go-chi-server/go/api_pet_service.go | 2 +- .../petstore/go-chi-server/go/routers.go | 18 +++++++++--------- .../petstore/go-server-required/go/api.go | 2 +- .../go-server-required/go/api_pet_service.go | 2 +- .../petstore/go-server-required/go/routers.go | 18 +++++++++--------- 34 files changed, 192 insertions(+), 143 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java index d436a01c42..d9231a5878 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java @@ -121,9 +121,9 @@ public abstract class AbstractGoCodegen extends DefaultCodegen implements Codege typeMapping.put("date", "string"); typeMapping.put("DateTime", "time.Time"); typeMapping.put("password", "string"); - typeMapping.put("File", "*os.File"); - typeMapping.put("file", "*os.File"); - typeMapping.put("binary", "*os.File"); + typeMapping.put("File", "os.File"); + typeMapping.put("file", "os.File"); + typeMapping.put("binary", "os.File"); typeMapping.put("ByteArray", "string"); typeMapping.put("null", "nil"); // A 'type: object' OAS schema without any declared property is @@ -505,13 +505,13 @@ public abstract class AbstractGoCodegen extends DefaultCodegen implements Codege boolean addedReflectImport = false; for (CodegenOperation operation : operations) { // import "os" if the operation uses files - if (!addedOSImport && "*os.File".equals(operation.returnType)) { + if (!addedOSImport && "os.File".equals(operation.returnType)) { imports.add(createMapping("import", "os")); addedOSImport = true; } for (CodegenParameter param : operation.allParams) { // import "os" if the operation uses files - if (!addedOSImport && "*os.File".equals(param.dataType)) { + if (!addedOSImport && "os.File".equals(param.dataType)) { imports.add(createMapping("import", "os")); addedOSImport = true; } @@ -665,8 +665,8 @@ public abstract class AbstractGoCodegen extends DefaultCodegen implements Codege imports.add(createMapping("import", "time")); addedTimeImport = true; } - if (!addedOSImport && ("*os.File".equals(cp.dataType) || - (cp.items != null && "*os.File".equals(cp.items.dataType)))) { + if (!addedOSImport && ("os.File".equals(cp.dataType) || + (cp.items != null && "os.File".equals(cp.items.dataType)))) { imports.add(createMapping("import", "os")); addedOSImport = true; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoServerCodegen.java index 2a8acd9c23..8fc8d24654 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoServerCodegen.java @@ -305,7 +305,7 @@ public class GoServerCodegen extends AbstractGoCodegen { for (CodegenOperation operation : operations) { for (CodegenParameter param : operation.allParams) { // import "os" if the operation uses files - if (!addedOSImport && ("*os.File".equals(param.dataType) || ("[]*os.File".equals(param.dataType)))) { + if (!addedOSImport && ("os.File".equals(param.dataType) || ("[]os.File".equals(param.dataType)))) { imports.add(createMapping("import", "os")); addedOSImport = true; } diff --git a/modules/openapi-generator/src/main/resources/go-server/routers.mustache b/modules/openapi-generator/src/main/resources/go-server/routers.mustache index b26f8febb4..f87e7bcd5f 100644 --- a/modules/openapi-generator/src/main/resources/go-server/routers.mustache +++ b/modules/openapi-generator/src/main/resources/go-server/routers.mustache @@ -112,22 +112,22 @@ func EncodeJSONResponse(i interface{}, status *int,{{#addResponseHeaders}} heade } // ReadFormFileToTempFile reads file data from a request form and writes it to a temporary file -func ReadFormFileToTempFile(r *http.Request, key string) (*os.File, error) { +func ReadFormFileToTempFile(r *http.Request, key string) (os.File, error) { _, fileHeader, err := r.FormFile(key) if err != nil { - return nil, err + return os.File{}, err } return readFileHeaderToTempFile(fileHeader) } // ReadFormFilesToTempFiles reads files array data from a request form and writes it to a temporary files -func ReadFormFilesToTempFiles(r *http.Request, key string) ([]*os.File, error) { +func ReadFormFilesToTempFiles(r *http.Request, key string) ([]os.File, error) { if err := r.ParseMultipartForm(32 << 20); err != nil { return nil, err } - files := make([]*os.File, 0, len(r.MultipartForm.File[key])) + files := make([]os.File, 0, len(r.MultipartForm.File[key])) for _, fileHeader := range r.MultipartForm.File[key] { file, err := readFileHeaderToTempFile(fileHeader) @@ -142,29 +142,29 @@ func ReadFormFilesToTempFiles(r *http.Request, key string) ([]*os.File, error) { } // readFileHeaderToTempFile reads multipart.FileHeader and writes it to a temporary file -func readFileHeaderToTempFile(fileHeader *multipart.FileHeader) (*os.File, error) { +func readFileHeaderToTempFile(fileHeader *multipart.FileHeader) (os.File, error) { formFile, err := fileHeader.Open() if err != nil { - return nil, err + return os.File{}, err } defer formFile.Close() fileBytes, err := ioutil.ReadAll(formFile) if err != nil { - return nil, err + return os.File{}, err } file, err := ioutil.TempFile("", fileHeader.Filename) if err != nil { - return nil, err + return os.File{}, err } defer file.Close() file.Write(fileBytes) - return file, nil + return *file, nil } // parseInt64Parameter parses a string parameter to an int64. diff --git a/modules/openapi-generator/src/main/resources/go/api.mustache b/modules/openapi-generator/src/main/resources/go/api.mustache index c7840ffe56..d66cd939d3 100644 --- a/modules/openapi-generator/src/main/resources/go/api.mustache +++ b/modules/openapi-generator/src/main/resources/go/api.mustache @@ -259,20 +259,25 @@ func (a *{{{classname}}}Service) {{nickname}}Execute(r {{#structPrefix}}{{&class {{paramName}}LocalVarFormFileName = "{{baseName}}" {{#required}} - {{paramName}}LocalVarFile := *r.{{paramName}} + {{paramName}}LocalVarFile := r.{{paramName}} {{/required}} {{^required}} - var {{paramName}}LocalVarFile {{dataType}} + var {{paramName}}LocalVarFile *{{dataType}} if r.{{paramName}} != nil { - {{paramName}}LocalVarFile = *r.{{paramName}} + {{paramName}}LocalVarFile = r.{{paramName}} } -{{/required}} if {{paramName}}LocalVarFile != nil { fbs, _ := ioutil.ReadAll({{paramName}}LocalVarFile) + {{/required}} + {{#required}} + fbs, _ := ioutil.ReadAll({{paramName}}LocalVarFile) + {{/required}} {{paramName}}LocalVarFileBytes = fbs {{paramName}}LocalVarFileName = {{paramName}}LocalVarFile.Name() {{paramName}}LocalVarFile.Close() - } + {{^required}} + } + {{/required}} formFiles = append(formFiles, formFile{fileBytes: {{paramName}}LocalVarFileBytes, fileName: {{paramName}}LocalVarFileName, formFileName: {{paramName}}LocalVarFormFileName}) {{/isFile}} {{^isFile}} diff --git a/modules/openapi-generator/src/main/resources/go/client.mustache b/modules/openapi-generator/src/main/resources/go/client.mustache index 80bffb795c..3d3bfe8e86 100644 --- a/modules/openapi-generator/src/main/resources/go/client.mustache +++ b/modules/openapi-generator/src/main/resources/go/client.mustache @@ -507,8 +507,20 @@ func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err err *s = string(b) return nil } + if f, ok := v.(*os.File); ok { + f, err = ioutil.TempFile("", "HttpClientFile") + if err != nil { + return + } + _, err = f.Write(b) + if err != nil { + return + } + _, err = f.Seek(0, io.SeekStart) + return + } if f, ok := v.(**os.File); ok { - *f, err = ioutil.TempFile("", "HttpClientFile") + *f, err = ioutil.TempFile("", "HttpClientFile") if err != nil { return } @@ -582,8 +594,8 @@ func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err e if reader, ok := body.(io.Reader); ok { _, err = bodyBuf.ReadFrom(reader) - } else if fp, ok := body.(**os.File); ok { - _, err = bodyBuf.ReadFrom(*fp) + } else if fp, ok := body.(*os.File); ok { + _, err = bodyBuf.ReadFrom(fp) } else if b, ok := body.([]byte); ok { _, err = bodyBuf.Write(b) } else if s, ok := body.(string); ok { diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/go/GoModelTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/go/GoModelTest.java index f27115bc83..44cdd302f1 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/go/GoModelTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/go/GoModelTest.java @@ -262,8 +262,8 @@ public class GoModelTest { public void filePropertyTest() { final DefaultCodegen codegen = new GoClientCodegen(); final Schema model1 = new Schema().type("file"); - Assert.assertEquals(codegen.getSchemaType(model1), "*os.File"); - Assert.assertEquals(codegen.getTypeDeclaration(model1), "*os.File"); + Assert.assertEquals(codegen.getSchemaType(model1), "os.File"); + Assert.assertEquals(codegen.getTypeDeclaration(model1), "os.File"); final Schema model2 = new Schema().$ref("#/definitions/File"); Assert.assertEquals(codegen.getSchemaType(model2), "File"); diff --git a/samples/client/petstore/go/go-petstore/api_fake.go b/samples/client/petstore/go/go-petstore/api_fake.go index 85e843d7c3..2132d4dba7 100644 --- a/samples/client/petstore/go/go-petstore/api_fake.go +++ b/samples/client/petstore/go/go-petstore/api_fake.go @@ -1073,7 +1073,7 @@ type ApiTestEndpointParametersRequest struct { int64_ *int64 float *float32 string_ *string - binary **os.File + binary *os.File date *string dateTime *time.Time password *string @@ -1135,7 +1135,7 @@ func (r ApiTestEndpointParametersRequest) String_(string_ string) ApiTestEndpoin } // None -func (r ApiTestEndpointParametersRequest) Binary(binary *os.File) ApiTestEndpointParametersRequest { +func (r ApiTestEndpointParametersRequest) Binary(binary os.File) ApiTestEndpointParametersRequest { r.binary = &binary return r } @@ -1273,14 +1273,14 @@ func (a *FakeApiService) TestEndpointParametersExecute(r ApiTestEndpointParamete var binaryLocalVarFile *os.File if r.binary != nil { - binaryLocalVarFile = *r.binary + binaryLocalVarFile = r.binary } if binaryLocalVarFile != nil { fbs, _ := ioutil.ReadAll(binaryLocalVarFile) binaryLocalVarFileBytes = fbs binaryLocalVarFileName = binaryLocalVarFile.Name() binaryLocalVarFile.Close() - } + } formFiles = append(formFiles, formFile{fileBytes: binaryLocalVarFileBytes, fileName: binaryLocalVarFileName, formFileName: binaryLocalVarFormFileName}) if r.date != nil { parameterAddToQuery(localVarFormParams, "date", r.date, "") diff --git a/samples/client/petstore/go/go-petstore/api_pet.go b/samples/client/petstore/go/go-petstore/api_pet.go index 7800d85d68..5c5f6861c0 100644 --- a/samples/client/petstore/go/go-petstore/api_pet.go +++ b/samples/client/petstore/go/go-petstore/api_pet.go @@ -895,7 +895,7 @@ type ApiUploadFileRequest struct { ApiService PetApi petId int64 additionalMetadata *string - file **os.File + file *os.File } // Additional data to pass to server @@ -905,7 +905,7 @@ func (r ApiUploadFileRequest) AdditionalMetadata(additionalMetadata string) ApiU } // file to upload -func (r ApiUploadFileRequest) File(file *os.File) ApiUploadFileRequest { +func (r ApiUploadFileRequest) File(file os.File) ApiUploadFileRequest { r.file = &file return r } @@ -979,14 +979,14 @@ func (a *PetApiService) UploadFileExecute(r ApiUploadFileRequest) (*ApiResponse, var fileLocalVarFile *os.File if r.file != nil { - fileLocalVarFile = *r.file + fileLocalVarFile = r.file } if fileLocalVarFile != nil { fbs, _ := ioutil.ReadAll(fileLocalVarFile) fileLocalVarFileBytes = fbs fileLocalVarFileName = fileLocalVarFile.Name() fileLocalVarFile.Close() - } + } formFiles = append(formFiles, formFile{fileBytes: fileLocalVarFileBytes, fileName: fileLocalVarFileName, formFileName: fileLocalVarFormFileName}) req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { @@ -1029,12 +1029,12 @@ type ApiUploadFileWithRequiredFileRequest struct { ctx context.Context ApiService PetApi petId int64 - requiredFile **os.File + requiredFile *os.File additionalMetadata *string } // file to upload -func (r ApiUploadFileWithRequiredFileRequest) RequiredFile(requiredFile *os.File) ApiUploadFileWithRequiredFileRequest { +func (r ApiUploadFileWithRequiredFileRequest) RequiredFile(requiredFile os.File) ApiUploadFileWithRequiredFileRequest { r.requiredFile = &requiredFile return r } @@ -1115,13 +1115,11 @@ func (a *PetApiService) UploadFileWithRequiredFileExecute(r ApiUploadFileWithReq requiredFileLocalVarFormFileName = "requiredFile" - requiredFileLocalVarFile := *r.requiredFile - if requiredFileLocalVarFile != nil { - fbs, _ := ioutil.ReadAll(requiredFileLocalVarFile) + requiredFileLocalVarFile := r.requiredFile + fbs, _ := ioutil.ReadAll(requiredFileLocalVarFile) requiredFileLocalVarFileBytes = fbs requiredFileLocalVarFileName = requiredFileLocalVarFile.Name() requiredFileLocalVarFile.Close() - } formFiles = append(formFiles, formFile{fileBytes: requiredFileLocalVarFileBytes, fileName: requiredFileLocalVarFileName, formFileName: requiredFileLocalVarFormFileName}) req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { diff --git a/samples/client/petstore/go/go-petstore/client.go b/samples/client/petstore/go/go-petstore/client.go index d40abef003..e5a53c851f 100644 --- a/samples/client/petstore/go/go-petstore/client.go +++ b/samples/client/petstore/go/go-petstore/client.go @@ -454,8 +454,20 @@ func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err err *s = string(b) return nil } + if f, ok := v.(*os.File); ok { + f, err = ioutil.TempFile("", "HttpClientFile") + if err != nil { + return + } + _, err = f.Write(b) + if err != nil { + return + } + _, err = f.Seek(0, io.SeekStart) + return + } if f, ok := v.(**os.File); ok { - *f, err = ioutil.TempFile("", "HttpClientFile") + *f, err = ioutil.TempFile("", "HttpClientFile") if err != nil { return } @@ -529,8 +541,8 @@ func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err e if reader, ok := body.(io.Reader); ok { _, err = bodyBuf.ReadFrom(reader) - } else if fp, ok := body.(**os.File); ok { - _, err = bodyBuf.ReadFrom(*fp) + } else if fp, ok := body.(*os.File); ok { + _, err = bodyBuf.ReadFrom(fp) } else if b, ok := body.([]byte); ok { _, err = bodyBuf.Write(b) } else if s, ok := body.(string); ok { diff --git a/samples/client/petstore/go/go-petstore/docs/FakeApi.md b/samples/client/petstore/go/go-petstore/docs/FakeApi.md index e51cddca5b..8c4af68e45 100644 --- a/samples/client/petstore/go/go-petstore/docs/FakeApi.md +++ b/samples/client/petstore/go/go-petstore/docs/FakeApi.md @@ -574,7 +574,7 @@ func main() { int64_ := int64(789) // int64 | None (optional) float := float32(3.4) // float32 | None (optional) string_ := "string__example" // string | None (optional) - binary := os.NewFile(1234, "some_file") // *os.File | None (optional) + binary := os.NewFile(1234, "some_file") // os.File | None (optional) date := time.Now() // string | None (optional) dateTime := time.Now() // time.Time | None (optional) password := "password_example" // string | None (optional) @@ -610,7 +610,7 @@ Name | Type | Description | Notes **int64_** | **int64** | None | **float** | **float32** | None | **string_** | **string** | None | - **binary** | ***os.File** | None | + **binary** | **os.File** | None | **date** | **string** | None | **dateTime** | **time.Time** | None | **password** | **string** | None | diff --git a/samples/client/petstore/go/go-petstore/docs/FormatTest.md b/samples/client/petstore/go/go-petstore/docs/FormatTest.md index e726c1ee93..2c486b4b6b 100644 --- a/samples/client/petstore/go/go-petstore/docs/FormatTest.md +++ b/samples/client/petstore/go/go-petstore/docs/FormatTest.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes **Double** | Pointer to **float64** | | [optional] **String** | Pointer to **string** | | [optional] **Byte** | **string** | | -**Binary** | Pointer to ***os.File** | | [optional] +**Binary** | Pointer to **os.File** | | [optional] **Date** | **string** | | **DateTime** | Pointer to **time.Time** | | [optional] **Uuid** | Pointer to **string** | | [optional] @@ -230,20 +230,20 @@ SetByte sets Byte field to given value. ### GetBinary -`func (o *FormatTest) GetBinary() *os.File` +`func (o *FormatTest) GetBinary() os.File` GetBinary returns the Binary field if non-nil, zero value otherwise. ### GetBinaryOk -`func (o *FormatTest) GetBinaryOk() (**os.File, bool)` +`func (o *FormatTest) GetBinaryOk() (*os.File, bool)` GetBinaryOk returns a tuple with the Binary field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetBinary -`func (o *FormatTest) SetBinary(v *os.File)` +`func (o *FormatTest) SetBinary(v os.File)` SetBinary sets Binary field to given value. diff --git a/samples/client/petstore/go/go-petstore/docs/PetApi.md b/samples/client/petstore/go/go-petstore/docs/PetApi.md index 81c7e187ac..519c51b244 100644 --- a/samples/client/petstore/go/go-petstore/docs/PetApi.md +++ b/samples/client/petstore/go/go-petstore/docs/PetApi.md @@ -501,7 +501,7 @@ import ( func main() { petId := int64(789) // int64 | ID of pet to update additionalMetadata := "additionalMetadata_example" // string | Additional data to pass to server (optional) - file := os.NewFile(1234, "some_file") // *os.File | file to upload (optional) + file := os.NewFile(1234, "some_file") // os.File | file to upload (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) @@ -532,7 +532,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **additionalMetadata** | **string** | Additional data to pass to server | - **file** | ***os.File** | file to upload | + **file** | **os.File** | file to upload | ### Return type @@ -572,7 +572,7 @@ import ( func main() { petId := int64(789) // int64 | ID of pet to update - requiredFile := os.NewFile(1234, "some_file") // *os.File | file to upload + requiredFile := os.NewFile(1234, "some_file") // os.File | file to upload additionalMetadata := "additionalMetadata_example" // string | Additional data to pass to server (optional) configuration := openapiclient.NewConfiguration() @@ -603,7 +603,7 @@ Other parameters are passed through a pointer to a apiUploadFileWithRequiredFile Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **requiredFile** | ***os.File** | file to upload | + **requiredFile** | **os.File** | file to upload | **additionalMetadata** | **string** | Additional data to pass to server | ### Return type diff --git a/samples/client/petstore/go/go-petstore/model_format_test_.go b/samples/client/petstore/go/go-petstore/model_format_test_.go index 0cfe962744..48acbc1441 100644 --- a/samples/client/petstore/go/go-petstore/model_format_test_.go +++ b/samples/client/petstore/go/go-petstore/model_format_test_.go @@ -29,7 +29,7 @@ type FormatTest struct { Double *float64 `json:"double,omitempty"` String *string `json:"string,omitempty"` Byte string `json:"byte"` - Binary **os.File `json:"binary,omitempty"` + Binary *os.File `json:"binary,omitempty"` Date string `json:"date"` DateTime *time.Time `json:"dateTime,omitempty"` Uuid *string `json:"uuid,omitempty"` @@ -299,9 +299,9 @@ func (o *FormatTest) SetByte(v string) { } // GetBinary returns the Binary field value if set, zero value otherwise. -func (o *FormatTest) GetBinary() *os.File { +func (o *FormatTest) GetBinary() os.File { if o == nil || isNil(o.Binary) { - var ret *os.File + var ret os.File return ret } return *o.Binary @@ -309,7 +309,7 @@ func (o *FormatTest) GetBinary() *os.File { // GetBinaryOk returns a tuple with the Binary field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *FormatTest) GetBinaryOk() (**os.File, bool) { +func (o *FormatTest) GetBinaryOk() (*os.File, bool) { if o == nil || isNil(o.Binary) { return nil, false } @@ -325,8 +325,8 @@ func (o *FormatTest) HasBinary() bool { return false } -// SetBinary gets a reference to the given *os.File and assigns it to the Binary field. -func (o *FormatTest) SetBinary(v *os.File) { +// SetBinary gets a reference to the given os.File and assigns it to the Binary field. +func (o *FormatTest) SetBinary(v os.File) { o.Binary = &v } diff --git a/samples/client/petstore/go/pet_api_test.go b/samples/client/petstore/go/pet_api_test.go index a4b35d0127..b1aec43ef2 100644 --- a/samples/client/petstore/go/pet_api_test.go +++ b/samples/client/petstore/go/pet_api_test.go @@ -154,7 +154,7 @@ func TestUploadFile(t *testing.T) { t.Fatalf("Error opening file: %v", err1) } - _, r, err := client.PetApi.UploadFile(context.Background(), 12830).AdditionalMetadata("golang").File(file).Execute() + _, r, err := client.PetApi.UploadFile(context.Background(), 12830).AdditionalMetadata("golang").File(*file).Execute() if err != nil { t.Fatalf("Error while uploading file: %v", err) @@ -172,7 +172,7 @@ func TestUploadFileRequired(t *testing.T) { t.Fatalf("Error opening file: %v", err1) } - _, r, err := client.PetApi.UploadFileWithRequiredFile(context.Background(), 12830).RequiredFile(file).AdditionalMetadata("golang").Execute() + _, r, err := client.PetApi.UploadFileWithRequiredFile(context.Background(), 12830).RequiredFile(*file).AdditionalMetadata("golang").Execute() if err != nil { t.Fatalf("Error while uploading file: %v", err) diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/client.go b/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/client.go index fe43aa3be8..ded348c485 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/client.go +++ b/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/client.go @@ -422,8 +422,20 @@ func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err err *s = string(b) return nil } + if f, ok := v.(*os.File); ok { + f, err = ioutil.TempFile("", "HttpClientFile") + if err != nil { + return + } + _, err = f.Write(b) + if err != nil { + return + } + _, err = f.Seek(0, io.SeekStart) + return + } if f, ok := v.(**os.File); ok { - *f, err = ioutil.TempFile("", "HttpClientFile") + *f, err = ioutil.TempFile("", "HttpClientFile") if err != nil { return } @@ -497,8 +509,8 @@ func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err e if reader, ok := body.(io.Reader); ok { _, err = bodyBuf.ReadFrom(reader) - } else if fp, ok := body.(**os.File); ok { - _, err = bodyBuf.ReadFrom(*fp) + } else if fp, ok := body.(*os.File); ok { + _, err = bodyBuf.ReadFrom(fp) } else if b, ok := body.([]byte); ok { _, err = bodyBuf.Write(b) } else if s, ok := body.(string); ok { diff --git a/samples/openapi3/client/petstore/go/go-petstore/api_fake.go b/samples/openapi3/client/petstore/go/go-petstore/api_fake.go index 8e22ba9930..8c1c89ed64 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/api_fake.go +++ b/samples/openapi3/client/petstore/go/go-petstore/api_fake.go @@ -1099,7 +1099,7 @@ type ApiTestEndpointParametersRequest struct { int64_ *int64 float *float32 string_ *string - binary **os.File + binary *os.File date *string dateTime *time.Time password *string @@ -1161,7 +1161,7 @@ func (r ApiTestEndpointParametersRequest) String_(string_ string) ApiTestEndpoin } // None -func (r ApiTestEndpointParametersRequest) Binary(binary *os.File) ApiTestEndpointParametersRequest { +func (r ApiTestEndpointParametersRequest) Binary(binary os.File) ApiTestEndpointParametersRequest { r.binary = &binary return r } @@ -1300,14 +1300,14 @@ func (a *FakeApiService) TestEndpointParametersExecute(r ApiTestEndpointParamete var binaryLocalVarFile *os.File if r.binary != nil { - binaryLocalVarFile = *r.binary + binaryLocalVarFile = r.binary } if binaryLocalVarFile != nil { fbs, _ := ioutil.ReadAll(binaryLocalVarFile) binaryLocalVarFileBytes = fbs binaryLocalVarFileName = binaryLocalVarFile.Name() binaryLocalVarFile.Close() - } + } formFiles = append(formFiles, formFile{fileBytes: binaryLocalVarFileBytes, fileName: binaryLocalVarFileName, formFileName: binaryLocalVarFormFileName}) if r.date != nil { parameterAddToQuery(localVarFormParams, "date", r.date, "") diff --git a/samples/openapi3/client/petstore/go/go-petstore/api_pet.go b/samples/openapi3/client/petstore/go/go-petstore/api_pet.go index 3d780fd172..af2faaf073 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/api_pet.go +++ b/samples/openapi3/client/petstore/go/go-petstore/api_pet.go @@ -916,7 +916,7 @@ type ApiUploadFileRequest struct { ApiService PetApi petId int64 additionalMetadata *string - file **os.File + file *os.File } // Additional data to pass to server @@ -926,7 +926,7 @@ func (r ApiUploadFileRequest) AdditionalMetadata(additionalMetadata string) ApiU } // file to upload -func (r ApiUploadFileRequest) File(file *os.File) ApiUploadFileRequest { +func (r ApiUploadFileRequest) File(file os.File) ApiUploadFileRequest { r.file = &file return r } @@ -1002,14 +1002,14 @@ func (a *PetApiService) UploadFileExecute(r ApiUploadFileRequest) (*ApiResponse, var fileLocalVarFile *os.File if r.file != nil { - fileLocalVarFile = *r.file + fileLocalVarFile = r.file } if fileLocalVarFile != nil { fbs, _ := ioutil.ReadAll(fileLocalVarFile) fileLocalVarFileBytes = fbs fileLocalVarFileName = fileLocalVarFile.Name() fileLocalVarFile.Close() - } + } formFiles = append(formFiles, formFile{fileBytes: fileLocalVarFileBytes, fileName: fileLocalVarFileName, formFileName: fileLocalVarFormFileName}) req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { @@ -1052,12 +1052,12 @@ type ApiUploadFileWithRequiredFileRequest struct { ctx context.Context ApiService PetApi petId int64 - requiredFile **os.File + requiredFile *os.File additionalMetadata *string } // file to upload -func (r ApiUploadFileWithRequiredFileRequest) RequiredFile(requiredFile *os.File) ApiUploadFileWithRequiredFileRequest { +func (r ApiUploadFileWithRequiredFileRequest) RequiredFile(requiredFile os.File) ApiUploadFileWithRequiredFileRequest { r.requiredFile = &requiredFile return r } @@ -1140,13 +1140,11 @@ func (a *PetApiService) UploadFileWithRequiredFileExecute(r ApiUploadFileWithReq requiredFileLocalVarFormFileName = "requiredFile" - requiredFileLocalVarFile := *r.requiredFile - if requiredFileLocalVarFile != nil { - fbs, _ := ioutil.ReadAll(requiredFileLocalVarFile) + requiredFileLocalVarFile := r.requiredFile + fbs, _ := ioutil.ReadAll(requiredFileLocalVarFile) requiredFileLocalVarFileBytes = fbs requiredFileLocalVarFileName = requiredFileLocalVarFile.Name() requiredFileLocalVarFile.Close() - } formFiles = append(formFiles, formFile{fileBytes: requiredFileLocalVarFileBytes, fileName: requiredFileLocalVarFileName, formFileName: requiredFileLocalVarFormFileName}) req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { diff --git a/samples/openapi3/client/petstore/go/go-petstore/client.go b/samples/openapi3/client/petstore/go/go-petstore/client.go index 0c80456c12..3c443e0ecf 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/client.go +++ b/samples/openapi3/client/petstore/go/go-petstore/client.go @@ -472,8 +472,20 @@ func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err err *s = string(b) return nil } + if f, ok := v.(*os.File); ok { + f, err = ioutil.TempFile("", "HttpClientFile") + if err != nil { + return + } + _, err = f.Write(b) + if err != nil { + return + } + _, err = f.Seek(0, io.SeekStart) + return + } if f, ok := v.(**os.File); ok { - *f, err = ioutil.TempFile("", "HttpClientFile") + *f, err = ioutil.TempFile("", "HttpClientFile") if err != nil { return } @@ -547,8 +559,8 @@ func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err e if reader, ok := body.(io.Reader); ok { _, err = bodyBuf.ReadFrom(reader) - } else if fp, ok := body.(**os.File); ok { - _, err = bodyBuf.ReadFrom(*fp) + } else if fp, ok := body.(*os.File); ok { + _, err = bodyBuf.ReadFrom(fp) } else if b, ok := body.([]byte); ok { _, err = bodyBuf.Write(b) } else if s, ok := body.(string); ok { diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/FakeApi.md b/samples/openapi3/client/petstore/go/go-petstore/docs/FakeApi.md index 7f9d080e73..050416eabd 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/FakeApi.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/FakeApi.md @@ -571,7 +571,7 @@ func main() { int64_ := int64(789) // int64 | None (optional) float := float32(3.4) // float32 | None (optional) string_ := "string__example" // string | None (optional) - binary := os.NewFile(1234, "some_file") // *os.File | None (optional) + binary := os.NewFile(1234, "some_file") // os.File | None (optional) date := time.Now() // string | None (optional) dateTime := time.Now() // time.Time | None (optional) password := "password_example" // string | None (optional) @@ -607,7 +607,7 @@ Name | Type | Description | Notes **int64_** | **int64** | None | **float** | **float32** | None | **string_** | **string** | None | - **binary** | ***os.File** | None | + **binary** | **os.File** | None | **date** | **string** | None | **dateTime** | **time.Time** | None | **password** | **string** | None | diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/FormatTest.md b/samples/openapi3/client/petstore/go/go-petstore/docs/FormatTest.md index 2e2ed88992..392cf79236 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/FormatTest.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/FormatTest.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes **Double** | Pointer to **float64** | | [optional] **String** | Pointer to **string** | | [optional] **Byte** | **string** | | -**Binary** | Pointer to ***os.File** | | [optional] +**Binary** | Pointer to **os.File** | | [optional] **Date** | **string** | | **DateTime** | Pointer to **time.Time** | | [optional] **Uuid** | Pointer to **string** | | [optional] @@ -231,20 +231,20 @@ SetByte sets Byte field to given value. ### GetBinary -`func (o *FormatTest) GetBinary() *os.File` +`func (o *FormatTest) GetBinary() os.File` GetBinary returns the Binary field if non-nil, zero value otherwise. ### GetBinaryOk -`func (o *FormatTest) GetBinaryOk() (**os.File, bool)` +`func (o *FormatTest) GetBinaryOk() (*os.File, bool)` GetBinaryOk returns a tuple with the Binary field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetBinary -`func (o *FormatTest) SetBinary(v *os.File)` +`func (o *FormatTest) SetBinary(v os.File)` SetBinary sets Binary field to given value. diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/MapOfFileTest.md b/samples/openapi3/client/petstore/go/go-petstore/docs/MapOfFileTest.md index 245df44f8d..6514a699f0 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/MapOfFileTest.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/MapOfFileTest.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**PropTest** | Pointer to **map[string]*os.File** | a property to test map of file | [optional] +**PropTest** | Pointer to **map[string]os.File** | a property to test map of file | [optional] ## Methods @@ -27,20 +27,20 @@ but it doesn't guarantee that properties required by API are set ### GetPropTest -`func (o *MapOfFileTest) GetPropTest() map[string]*os.File` +`func (o *MapOfFileTest) GetPropTest() map[string]os.File` GetPropTest returns the PropTest field if non-nil, zero value otherwise. ### GetPropTestOk -`func (o *MapOfFileTest) GetPropTestOk() (*map[string]*os.File, bool)` +`func (o *MapOfFileTest) GetPropTestOk() (*map[string]os.File, bool)` GetPropTestOk returns a tuple with the PropTest field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetPropTest -`func (o *MapOfFileTest) SetPropTest(v map[string]*os.File)` +`func (o *MapOfFileTest) SetPropTest(v map[string]os.File)` SetPropTest sets PropTest field to given value. diff --git a/samples/openapi3/client/petstore/go/go-petstore/docs/PetApi.md b/samples/openapi3/client/petstore/go/go-petstore/docs/PetApi.md index 24b558097a..7bf269f893 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/docs/PetApi.md +++ b/samples/openapi3/client/petstore/go/go-petstore/docs/PetApi.md @@ -511,7 +511,7 @@ import ( func main() { petId := int64(789) // int64 | ID of pet to update additionalMetadata := "additionalMetadata_example" // string | Additional data to pass to server (optional) - file := os.NewFile(1234, "some_file") // *os.File | file to upload (optional) + file := os.NewFile(1234, "some_file") // os.File | file to upload (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) @@ -542,7 +542,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **additionalMetadata** | **string** | Additional data to pass to server | - **file** | ***os.File** | file to upload | + **file** | **os.File** | file to upload | ### Return type @@ -584,7 +584,7 @@ import ( func main() { petId := int64(789) // int64 | ID of pet to update - requiredFile := os.NewFile(1234, "some_file") // *os.File | file to upload + requiredFile := os.NewFile(1234, "some_file") // os.File | file to upload additionalMetadata := "additionalMetadata_example" // string | Additional data to pass to server (optional) configuration := openapiclient.NewConfiguration() @@ -615,7 +615,7 @@ Other parameters are passed through a pointer to a apiUploadFileWithRequiredFile Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **requiredFile** | ***os.File** | file to upload | + **requiredFile** | **os.File** | file to upload | **additionalMetadata** | **string** | Additional data to pass to server | ### Return type diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_format_test_.go b/samples/openapi3/client/petstore/go/go-petstore/model_format_test_.go index fe95d07ffa..0086958677 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_format_test_.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_format_test_.go @@ -29,7 +29,7 @@ type FormatTest struct { Double *float64 `json:"double,omitempty"` String *string `json:"string,omitempty"` Byte string `json:"byte"` - Binary **os.File `json:"binary,omitempty"` + Binary *os.File `json:"binary,omitempty"` Date string `json:"date"` DateTime *time.Time `json:"dateTime,omitempty"` Uuid *string `json:"uuid,omitempty"` @@ -305,9 +305,9 @@ func (o *FormatTest) SetByte(v string) { } // GetBinary returns the Binary field value if set, zero value otherwise. -func (o *FormatTest) GetBinary() *os.File { +func (o *FormatTest) GetBinary() os.File { if o == nil || isNil(o.Binary) { - var ret *os.File + var ret os.File return ret } return *o.Binary @@ -315,7 +315,7 @@ func (o *FormatTest) GetBinary() *os.File { // GetBinaryOk returns a tuple with the Binary field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *FormatTest) GetBinaryOk() (**os.File, bool) { +func (o *FormatTest) GetBinaryOk() (*os.File, bool) { if o == nil || isNil(o.Binary) { return nil, false } @@ -331,8 +331,8 @@ func (o *FormatTest) HasBinary() bool { return false } -// SetBinary gets a reference to the given *os.File and assigns it to the Binary field. -func (o *FormatTest) SetBinary(v *os.File) { +// SetBinary gets a reference to the given os.File and assigns it to the Binary field. +func (o *FormatTest) SetBinary(v os.File) { o.Binary = &v } diff --git a/samples/openapi3/client/petstore/go/go-petstore/model_map_of_file_test_.go b/samples/openapi3/client/petstore/go/go-petstore/model_map_of_file_test_.go index a96502e084..f696a624be 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/model_map_of_file_test_.go +++ b/samples/openapi3/client/petstore/go/go-petstore/model_map_of_file_test_.go @@ -21,7 +21,7 @@ var _ MappedNullable = &MapOfFileTest{} // MapOfFileTest test map of file in a property type MapOfFileTest struct { // a property to test map of file - PropTest *map[string]*os.File `json:"prop_test,omitempty"` + PropTest *map[string]os.File `json:"prop_test,omitempty"` AdditionalProperties map[string]interface{} } @@ -45,9 +45,9 @@ func NewMapOfFileTestWithDefaults() *MapOfFileTest { } // GetPropTest returns the PropTest field value if set, zero value otherwise. -func (o *MapOfFileTest) GetPropTest() map[string]*os.File { +func (o *MapOfFileTest) GetPropTest() map[string]os.File { if o == nil || isNil(o.PropTest) { - var ret map[string]*os.File + var ret map[string]os.File return ret } return *o.PropTest @@ -55,7 +55,7 @@ func (o *MapOfFileTest) GetPropTest() map[string]*os.File { // GetPropTestOk returns a tuple with the PropTest field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *MapOfFileTest) GetPropTestOk() (*map[string]*os.File, bool) { +func (o *MapOfFileTest) GetPropTestOk() (*map[string]os.File, bool) { if o == nil || isNil(o.PropTest) { return nil, false } @@ -71,8 +71,8 @@ func (o *MapOfFileTest) HasPropTest() bool { return false } -// SetPropTest gets a reference to the given map[string]*os.File and assigns it to the PropTest field. -func (o *MapOfFileTest) SetPropTest(v map[string]*os.File) { +// SetPropTest gets a reference to the given map[string]os.File and assigns it to the PropTest field. +func (o *MapOfFileTest) SetPropTest(v map[string]os.File) { o.PropTest = &v } diff --git a/samples/openapi3/client/petstore/go/pet_api_test.go b/samples/openapi3/client/petstore/go/pet_api_test.go index 49896698b6..863996d656 100644 --- a/samples/openapi3/client/petstore/go/pet_api_test.go +++ b/samples/openapi3/client/petstore/go/pet_api_test.go @@ -144,7 +144,7 @@ func TestUploadFile(t *testing.T) { t.Fatalf("Error opening file: %v", err1) } - _, r, err := client.PetApi.UploadFile(context.Background(), 12830).AdditionalMetadata("golang").File(file).Execute() + _, r, err := client.PetApi.UploadFile(context.Background(), 12830).AdditionalMetadata("golang").File(*file).Execute() if err != nil { t.Fatalf("Error while uploading file: %v", err) @@ -162,7 +162,7 @@ func TestUploadFileRequired(t *testing.T) { t.Fatalf("Error opening file: %v", err1) } - _, r, err := client.PetApi.UploadFileWithRequiredFile(context.Background(), 12830).RequiredFile(file).AdditionalMetadata("golang").Execute() + _, r, err := client.PetApi.UploadFileWithRequiredFile(context.Background(), 12830).RequiredFile(*file).AdditionalMetadata("golang").Execute() if err != nil { t.Fatalf("Error while uploading file: %v", err) diff --git a/samples/server/petstore/go-api-server/go/api.go b/samples/server/petstore/go-api-server/go/api.go index bedb0f7985..cac28b4f04 100644 --- a/samples/server/petstore/go-api-server/go/api.go +++ b/samples/server/petstore/go-api-server/go/api.go @@ -68,7 +68,7 @@ type PetApiServicer interface { GetPetById(context.Context, int64) (ImplResponse, error) UpdatePet(context.Context, Pet) (ImplResponse, error) UpdatePetWithForm(context.Context, int64, string, string) (ImplResponse, error) - UploadFile(context.Context, int64, string, *os.File) (ImplResponse, error) + UploadFile(context.Context, int64, string, os.File) (ImplResponse, error) } diff --git a/samples/server/petstore/go-api-server/go/api_pet_service.go b/samples/server/petstore/go-api-server/go/api_pet_service.go index 9a390ecef3..7a77914caf 100644 --- a/samples/server/petstore/go-api-server/go/api_pet_service.go +++ b/samples/server/petstore/go-api-server/go/api_pet_service.go @@ -130,7 +130,7 @@ func (s *PetApiService) UpdatePetWithForm(ctx context.Context, petId int64, name } // UploadFile - uploads an image -func (s *PetApiService) UploadFile(ctx context.Context, petId int64, additionalMetadata string, file *os.File) (ImplResponse, error) { +func (s *PetApiService) UploadFile(ctx context.Context, petId int64, additionalMetadata string, file os.File) (ImplResponse, error) { // TODO - update UploadFile with the required logic for this service method. // Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. diff --git a/samples/server/petstore/go-api-server/go/routers.go b/samples/server/petstore/go-api-server/go/routers.go index 2b34778c5a..a23df8660d 100644 --- a/samples/server/petstore/go-api-server/go/routers.go +++ b/samples/server/petstore/go-api-server/go/routers.go @@ -80,22 +80,22 @@ func EncodeJSONResponse(i interface{}, status *int, headers map[string][]string, } // ReadFormFileToTempFile reads file data from a request form and writes it to a temporary file -func ReadFormFileToTempFile(r *http.Request, key string) (*os.File, error) { +func ReadFormFileToTempFile(r *http.Request, key string) (os.File, error) { _, fileHeader, err := r.FormFile(key) if err != nil { - return nil, err + return os.File{}, err } return readFileHeaderToTempFile(fileHeader) } // ReadFormFilesToTempFiles reads files array data from a request form and writes it to a temporary files -func ReadFormFilesToTempFiles(r *http.Request, key string) ([]*os.File, error) { +func ReadFormFilesToTempFiles(r *http.Request, key string) ([]os.File, error) { if err := r.ParseMultipartForm(32 << 20); err != nil { return nil, err } - files := make([]*os.File, 0, len(r.MultipartForm.File[key])) + files := make([]os.File, 0, len(r.MultipartForm.File[key])) for _, fileHeader := range r.MultipartForm.File[key] { file, err := readFileHeaderToTempFile(fileHeader) @@ -110,29 +110,29 @@ func ReadFormFilesToTempFiles(r *http.Request, key string) ([]*os.File, error) { } // readFileHeaderToTempFile reads multipart.FileHeader and writes it to a temporary file -func readFileHeaderToTempFile(fileHeader *multipart.FileHeader) (*os.File, error) { +func readFileHeaderToTempFile(fileHeader *multipart.FileHeader) (os.File, error) { formFile, err := fileHeader.Open() if err != nil { - return nil, err + return os.File{}, err } defer formFile.Close() fileBytes, err := ioutil.ReadAll(formFile) if err != nil { - return nil, err + return os.File{}, err } file, err := ioutil.TempFile("", fileHeader.Filename) if err != nil { - return nil, err + return os.File{}, err } defer file.Close() file.Write(fileBytes) - return file, nil + return *file, nil } // parseInt64Parameter parses a string parameter to an int64. diff --git a/samples/server/petstore/go-chi-server/go/api.go b/samples/server/petstore/go-chi-server/go/api.go index bedb0f7985..cac28b4f04 100644 --- a/samples/server/petstore/go-chi-server/go/api.go +++ b/samples/server/petstore/go-chi-server/go/api.go @@ -68,7 +68,7 @@ type PetApiServicer interface { GetPetById(context.Context, int64) (ImplResponse, error) UpdatePet(context.Context, Pet) (ImplResponse, error) UpdatePetWithForm(context.Context, int64, string, string) (ImplResponse, error) - UploadFile(context.Context, int64, string, *os.File) (ImplResponse, error) + UploadFile(context.Context, int64, string, os.File) (ImplResponse, error) } diff --git a/samples/server/petstore/go-chi-server/go/api_pet_service.go b/samples/server/petstore/go-chi-server/go/api_pet_service.go index 9a390ecef3..7a77914caf 100644 --- a/samples/server/petstore/go-chi-server/go/api_pet_service.go +++ b/samples/server/petstore/go-chi-server/go/api_pet_service.go @@ -130,7 +130,7 @@ func (s *PetApiService) UpdatePetWithForm(ctx context.Context, petId int64, name } // UploadFile - uploads an image -func (s *PetApiService) UploadFile(ctx context.Context, petId int64, additionalMetadata string, file *os.File) (ImplResponse, error) { +func (s *PetApiService) UploadFile(ctx context.Context, petId int64, additionalMetadata string, file os.File) (ImplResponse, error) { // TODO - update UploadFile with the required logic for this service method. // Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. diff --git a/samples/server/petstore/go-chi-server/go/routers.go b/samples/server/petstore/go-chi-server/go/routers.go index 3213d5dde2..5716699965 100644 --- a/samples/server/petstore/go-chi-server/go/routers.go +++ b/samples/server/petstore/go-chi-server/go/routers.go @@ -76,22 +76,22 @@ func EncodeJSONResponse(i interface{}, status *int, headers map[string][]string, } // ReadFormFileToTempFile reads file data from a request form and writes it to a temporary file -func ReadFormFileToTempFile(r *http.Request, key string) (*os.File, error) { +func ReadFormFileToTempFile(r *http.Request, key string) (os.File, error) { _, fileHeader, err := r.FormFile(key) if err != nil { - return nil, err + return os.File{}, err } return readFileHeaderToTempFile(fileHeader) } // ReadFormFilesToTempFiles reads files array data from a request form and writes it to a temporary files -func ReadFormFilesToTempFiles(r *http.Request, key string) ([]*os.File, error) { +func ReadFormFilesToTempFiles(r *http.Request, key string) ([]os.File, error) { if err := r.ParseMultipartForm(32 << 20); err != nil { return nil, err } - files := make([]*os.File, 0, len(r.MultipartForm.File[key])) + files := make([]os.File, 0, len(r.MultipartForm.File[key])) for _, fileHeader := range r.MultipartForm.File[key] { file, err := readFileHeaderToTempFile(fileHeader) @@ -106,29 +106,29 @@ func ReadFormFilesToTempFiles(r *http.Request, key string) ([]*os.File, error) { } // readFileHeaderToTempFile reads multipart.FileHeader and writes it to a temporary file -func readFileHeaderToTempFile(fileHeader *multipart.FileHeader) (*os.File, error) { +func readFileHeaderToTempFile(fileHeader *multipart.FileHeader) (os.File, error) { formFile, err := fileHeader.Open() if err != nil { - return nil, err + return os.File{}, err } defer formFile.Close() fileBytes, err := ioutil.ReadAll(formFile) if err != nil { - return nil, err + return os.File{}, err } file, err := ioutil.TempFile("", fileHeader.Filename) if err != nil { - return nil, err + return os.File{}, err } defer file.Close() file.Write(fileBytes) - return file, nil + return *file, nil } // parseInt64Parameter parses a string parameter to an int64. diff --git a/samples/server/petstore/go-server-required/go/api.go b/samples/server/petstore/go-server-required/go/api.go index bedb0f7985..cac28b4f04 100644 --- a/samples/server/petstore/go-server-required/go/api.go +++ b/samples/server/petstore/go-server-required/go/api.go @@ -68,7 +68,7 @@ type PetApiServicer interface { GetPetById(context.Context, int64) (ImplResponse, error) UpdatePet(context.Context, Pet) (ImplResponse, error) UpdatePetWithForm(context.Context, int64, string, string) (ImplResponse, error) - UploadFile(context.Context, int64, string, *os.File) (ImplResponse, error) + UploadFile(context.Context, int64, string, os.File) (ImplResponse, error) } diff --git a/samples/server/petstore/go-server-required/go/api_pet_service.go b/samples/server/petstore/go-server-required/go/api_pet_service.go index 9a390ecef3..7a77914caf 100644 --- a/samples/server/petstore/go-server-required/go/api_pet_service.go +++ b/samples/server/petstore/go-server-required/go/api_pet_service.go @@ -130,7 +130,7 @@ func (s *PetApiService) UpdatePetWithForm(ctx context.Context, petId int64, name } // UploadFile - uploads an image -func (s *PetApiService) UploadFile(ctx context.Context, petId int64, additionalMetadata string, file *os.File) (ImplResponse, error) { +func (s *PetApiService) UploadFile(ctx context.Context, petId int64, additionalMetadata string, file os.File) (ImplResponse, error) { // TODO - update UploadFile with the required logic for this service method. // Add api_pet_service.go to the .openapi-generator-ignore to avoid overwriting this service implementation when updating open api generation. diff --git a/samples/server/petstore/go-server-required/go/routers.go b/samples/server/petstore/go-server-required/go/routers.go index 3213d5dde2..5716699965 100644 --- a/samples/server/petstore/go-server-required/go/routers.go +++ b/samples/server/petstore/go-server-required/go/routers.go @@ -76,22 +76,22 @@ func EncodeJSONResponse(i interface{}, status *int, headers map[string][]string, } // ReadFormFileToTempFile reads file data from a request form and writes it to a temporary file -func ReadFormFileToTempFile(r *http.Request, key string) (*os.File, error) { +func ReadFormFileToTempFile(r *http.Request, key string) (os.File, error) { _, fileHeader, err := r.FormFile(key) if err != nil { - return nil, err + return os.File{}, err } return readFileHeaderToTempFile(fileHeader) } // ReadFormFilesToTempFiles reads files array data from a request form and writes it to a temporary files -func ReadFormFilesToTempFiles(r *http.Request, key string) ([]*os.File, error) { +func ReadFormFilesToTempFiles(r *http.Request, key string) ([]os.File, error) { if err := r.ParseMultipartForm(32 << 20); err != nil { return nil, err } - files := make([]*os.File, 0, len(r.MultipartForm.File[key])) + files := make([]os.File, 0, len(r.MultipartForm.File[key])) for _, fileHeader := range r.MultipartForm.File[key] { file, err := readFileHeaderToTempFile(fileHeader) @@ -106,29 +106,29 @@ func ReadFormFilesToTempFiles(r *http.Request, key string) ([]*os.File, error) { } // readFileHeaderToTempFile reads multipart.FileHeader and writes it to a temporary file -func readFileHeaderToTempFile(fileHeader *multipart.FileHeader) (*os.File, error) { +func readFileHeaderToTempFile(fileHeader *multipart.FileHeader) (os.File, error) { formFile, err := fileHeader.Open() if err != nil { - return nil, err + return os.File{}, err } defer formFile.Close() fileBytes, err := ioutil.ReadAll(formFile) if err != nil { - return nil, err + return os.File{}, err } file, err := ioutil.TempFile("", fileHeader.Filename) if err != nil { - return nil, err + return os.File{}, err } defer file.Close() file.Write(fileBytes) - return file, nil + return *file, nil } // parseInt64Parameter parses a string parameter to an int64. From 811e0de1be3d18bf44782f575e4f6b2e4e9bd9a8 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 6 Dec 2022 13:04:58 +0800 Subject: [PATCH 080/189] replace spaces with tabs in go client (#14189) --- .../src/main/resources/go/api.mustache | 16 +-- .../src/main/resources/go/client.mustache | 126 +++++++++--------- .../petstore/go/go-petstore/api_fake.go | 14 +- .../client/petstore/go/go-petstore/api_pet.go | 4 +- .../client/petstore/go/go-petstore/client.go | 126 +++++++++--------- .../x-auth-id-alias/go-experimental/client.go | 126 +++++++++--------- .../petstore/go/go-petstore/api_default.go | 12 +- .../petstore/go/go-petstore/api_fake.go | 20 +-- .../client/petstore/go/go-petstore/api_pet.go | 4 +- .../client/petstore/go/go-petstore/client.go | 126 +++++++++--------- 10 files changed, 287 insertions(+), 287 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/go/api.mustache b/modules/openapi-generator/src/main/resources/go/api.mustache index d66cd939d3..a13c1a56a5 100644 --- a/modules/openapi-generator/src/main/resources/go/api.mustache +++ b/modules/openapi-generator/src/main/resources/go/api.mustache @@ -214,7 +214,7 @@ func (a *{{{classname}}}Service) {{nickname}}Execute(r {{#structPrefix}}{{&class } {{/isCollectionFormatMulti}} {{^isCollectionFormatMulti}} - parameterAddToQuery(localVarQueryParams, "{{baseName}}", r.{{paramName}}, "{{collectionFormat}}") + parameterAddToQuery(localVarQueryParams, "{{baseName}}", r.{{paramName}}, "{{collectionFormat}}") {{/isCollectionFormatMulti}} } {{/required}} @@ -269,15 +269,15 @@ func (a *{{{classname}}}Service) {{nickname}}Execute(r {{#structPrefix}}{{&class if {{paramName}}LocalVarFile != nil { fbs, _ := ioutil.ReadAll({{paramName}}LocalVarFile) {{/required}} - {{#required}} - fbs, _ := ioutil.ReadAll({{paramName}}LocalVarFile) - {{/required}} + {{#required}} + fbs, _ := ioutil.ReadAll({{paramName}}LocalVarFile) + {{/required}} {{paramName}}LocalVarFileBytes = fbs {{paramName}}LocalVarFileName = {{paramName}}LocalVarFile.Name() {{paramName}}LocalVarFile.Close() {{^required}} - } - {{/required}} + } + {{/required}} formFiles = append(formFiles, formFile{fileBytes: {{paramName}}LocalVarFileBytes, fileName: {{paramName}}LocalVarFileName, formFileName: {{paramName}}LocalVarFormFileName}) {{/isFile}} {{^isFile}} @@ -390,8 +390,8 @@ func (a *{{{classname}}}Service) {{nickname}}Execute(r {{#structPrefix}}{{&class newErr.error = err.Error() return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, newErr } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v {{^-last}} return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, newErr {{/-last}} diff --git a/modules/openapi-generator/src/main/resources/go/client.mustache b/modules/openapi-generator/src/main/resources/go/client.mustache index 3d3bfe8e86..49fbd071ff 100644 --- a/modules/openapi-generator/src/main/resources/go/client.mustache +++ b/modules/openapi-generator/src/main/resources/go/client.mustache @@ -36,8 +36,8 @@ import ( var ( jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) - queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) - queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" ) + queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) + queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" ) ) // APIClient manages communication with the {{appName}} API v{{version}} @@ -137,28 +137,28 @@ func typeCheckParameter(obj interface{}, expected string, name string) error { } func parameterValueToString( obj interface{}, key string ) string { - if reflect.TypeOf(obj).Kind() != reflect.Ptr { - return fmt.Sprintf("%v", obj) - } - var param,ok = obj.(MappedNullable) - if !ok { - return "" - } - dataMap,err := param.ToMap() - if err != nil { - return "" - } - return fmt.Sprintf("%v", dataMap[key]) + if reflect.TypeOf(obj).Kind() != reflect.Ptr { + return fmt.Sprintf("%v", obj) + } + var param,ok = obj.(MappedNullable) + if !ok { + return "" + } + dataMap,err := param.ToMap() + if err != nil { + return "" + } + return fmt.Sprintf("%v", dataMap[key]) } // parameterAddToQuery adds the provided object to the url query supporting deep object syntax func parameterAddToQuery(queryParams interface{}, keyPrefix string, obj interface{}, collectionType string) { - var v = reflect.ValueOf(obj) - var value = "" - if v == reflect.ValueOf(nil) { - value = "null" - } else { - switch v.Kind() { + var v = reflect.ValueOf(obj) + var value = "" + if v == reflect.ValueOf(nil) { + value = "null" + } else { + switch v.Kind() { case reflect.Invalid: value = "invalid" @@ -202,35 +202,35 @@ func parameterAddToQuery(queryParams interface{}, keyPrefix string, obj interfac case reflect.Interface: fallthrough - case reflect.Ptr: + case reflect.Ptr: parameterAddToQuery(queryParams, keyPrefix, v.Elem().Interface(), collectionType) - return + return - case reflect.Int, reflect.Int8, reflect.Int16, - reflect.Int32, reflect.Int64: - value = strconv.FormatInt(v.Int(), 10) - case reflect.Uint, reflect.Uint8, reflect.Uint16, - reflect.Uint32, reflect.Uint64, reflect.Uintptr: - value = strconv.FormatUint(v.Uint(), 10) - case reflect.Float32, reflect.Float64: - value = strconv.FormatFloat(v.Float(), 'g', -1, 32) - case reflect.Bool: - value = strconv.FormatBool(v.Bool()) - case reflect.String: - value = v.String() - default: - value = v.Type().String() + " value" - } - } + case reflect.Int, reflect.Int8, reflect.Int16, + reflect.Int32, reflect.Int64: + value = strconv.FormatInt(v.Int(), 10) + case reflect.Uint, reflect.Uint8, reflect.Uint16, + reflect.Uint32, reflect.Uint64, reflect.Uintptr: + value = strconv.FormatUint(v.Uint(), 10) + case reflect.Float32, reflect.Float64: + value = strconv.FormatFloat(v.Float(), 'g', -1, 32) + case reflect.Bool: + value = strconv.FormatBool(v.Bool()) + case reflect.String: + value = v.String() + default: + value = v.Type().String() + " value" + } + } - switch valuesMap := queryParams.(type) { - case url.Values: - valuesMap.Add( keyPrefix, value ) - break - case map[string]string: - valuesMap[keyPrefix] = value - break - } + switch valuesMap := queryParams.(type) { + case url.Values: + valuesMap.Add( keyPrefix, value ) + break + case map[string]string: + valuesMap[keyPrefix] = value + break + } } // helper for converting interface{} parameters to json strings @@ -382,11 +382,11 @@ func (c *APIClient) prepareRequest( } // Encode the parameters. - url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { - pieces := strings.Split(s, "=") - pieces[0] = queryDescape.Replace(pieces[0]) - return strings.Join(pieces, "=") - }) + url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { + pieces := strings.Split(s, "=") + pieces[0] = queryDescape.Replace(pieces[0]) + return strings.Join(pieces, "=") + }) // Generate a new request if body != nil { @@ -508,19 +508,19 @@ func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err err return nil } if f, ok := v.(*os.File); ok { - f, err = ioutil.TempFile("", "HttpClientFile") - if err != nil { - return - } - _, err = f.Write(b) - if err != nil { - return - } - _, err = f.Seek(0, io.SeekStart) - return - } + f, err = ioutil.TempFile("", "HttpClientFile") + if err != nil { + return + } + _, err = f.Write(b) + if err != nil { + return + } + _, err = f.Seek(0, io.SeekStart) + return + } if f, ok := v.(**os.File); ok { - *f, err = ioutil.TempFile("", "HttpClientFile") + *f, err = ioutil.TempFile("", "HttpClientFile") if err != nil { return } diff --git a/samples/client/petstore/go/go-petstore/api_fake.go b/samples/client/petstore/go/go-petstore/api_fake.go index 2132d4dba7..d3bf38961f 100644 --- a/samples/client/petstore/go/go-petstore/api_fake.go +++ b/samples/client/petstore/go/go-petstore/api_fake.go @@ -1280,7 +1280,7 @@ func (a *FakeApiService) TestEndpointParametersExecute(r ApiTestEndpointParamete binaryLocalVarFileBytes = fbs binaryLocalVarFileName = binaryLocalVarFile.Name() binaryLocalVarFile.Close() - } + } formFiles = append(formFiles, formFile{fileBytes: binaryLocalVarFileBytes, fileName: binaryLocalVarFileName, formFileName: binaryLocalVarFormFileName}) if r.date != nil { parameterAddToQuery(localVarFormParams, "date", r.date, "") @@ -1422,16 +1422,16 @@ func (a *FakeApiService) TestEnumParametersExecute(r ApiTestEnumParametersReques localVarFormParams := url.Values{} if r.enumQueryStringArray != nil { - parameterAddToQuery(localVarQueryParams, "enum_query_string_array", r.enumQueryStringArray, "csv") + parameterAddToQuery(localVarQueryParams, "enum_query_string_array", r.enumQueryStringArray, "csv") } if r.enumQueryString != nil { - parameterAddToQuery(localVarQueryParams, "enum_query_string", r.enumQueryString, "") + parameterAddToQuery(localVarQueryParams, "enum_query_string", r.enumQueryString, "") } if r.enumQueryInteger != nil { - parameterAddToQuery(localVarQueryParams, "enum_query_integer", r.enumQueryInteger, "") + parameterAddToQuery(localVarQueryParams, "enum_query_integer", r.enumQueryInteger, "") } if r.enumQueryDouble != nil { - parameterAddToQuery(localVarQueryParams, "enum_query_double", r.enumQueryDouble, "") + parameterAddToQuery(localVarQueryParams, "enum_query_double", r.enumQueryDouble, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/x-www-form-urlencoded"} @@ -1587,10 +1587,10 @@ func (a *FakeApiService) TestGroupParametersExecute(r ApiTestGroupParametersRequ parameterAddToQuery(localVarQueryParams, "required_string_group", r.requiredStringGroup, "") parameterAddToQuery(localVarQueryParams, "required_int64_group", r.requiredInt64Group, "") if r.stringGroup != nil { - parameterAddToQuery(localVarQueryParams, "string_group", r.stringGroup, "") + parameterAddToQuery(localVarQueryParams, "string_group", r.stringGroup, "") } if r.int64Group != nil { - parameterAddToQuery(localVarQueryParams, "int64_group", r.int64Group, "") + parameterAddToQuery(localVarQueryParams, "int64_group", r.int64Group, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} diff --git a/samples/client/petstore/go/go-petstore/api_pet.go b/samples/client/petstore/go/go-petstore/api_pet.go index 5c5f6861c0..57f4495a1e 100644 --- a/samples/client/petstore/go/go-petstore/api_pet.go +++ b/samples/client/petstore/go/go-petstore/api_pet.go @@ -986,7 +986,7 @@ func (a *PetApiService) UploadFileExecute(r ApiUploadFileRequest) (*ApiResponse, fileLocalVarFileBytes = fbs fileLocalVarFileName = fileLocalVarFile.Name() fileLocalVarFile.Close() - } + } formFiles = append(formFiles, formFile{fileBytes: fileLocalVarFileBytes, fileName: fileLocalVarFileName, formFileName: fileLocalVarFormFileName}) req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { @@ -1116,7 +1116,7 @@ func (a *PetApiService) UploadFileWithRequiredFileExecute(r ApiUploadFileWithReq requiredFileLocalVarFormFileName = "requiredFile" requiredFileLocalVarFile := r.requiredFile - fbs, _ := ioutil.ReadAll(requiredFileLocalVarFile) + fbs, _ := ioutil.ReadAll(requiredFileLocalVarFile) requiredFileLocalVarFileBytes = fbs requiredFileLocalVarFileName = requiredFileLocalVarFile.Name() requiredFileLocalVarFile.Close() diff --git a/samples/client/petstore/go/go-petstore/client.go b/samples/client/petstore/go/go-petstore/client.go index e5a53c851f..02aeed0b0f 100644 --- a/samples/client/petstore/go/go-petstore/client.go +++ b/samples/client/petstore/go/go-petstore/client.go @@ -39,8 +39,8 @@ import ( var ( jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) - queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) - queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" ) + queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) + queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" ) ) // APIClient manages communication with the OpenAPI Petstore API v1.0.0 @@ -143,28 +143,28 @@ func typeCheckParameter(obj interface{}, expected string, name string) error { } func parameterValueToString( obj interface{}, key string ) string { - if reflect.TypeOf(obj).Kind() != reflect.Ptr { - return fmt.Sprintf("%v", obj) - } - var param,ok = obj.(MappedNullable) - if !ok { - return "" - } - dataMap,err := param.ToMap() - if err != nil { - return "" - } - return fmt.Sprintf("%v", dataMap[key]) + if reflect.TypeOf(obj).Kind() != reflect.Ptr { + return fmt.Sprintf("%v", obj) + } + var param,ok = obj.(MappedNullable) + if !ok { + return "" + } + dataMap,err := param.ToMap() + if err != nil { + return "" + } + return fmt.Sprintf("%v", dataMap[key]) } // parameterAddToQuery adds the provided object to the url query supporting deep object syntax func parameterAddToQuery(queryParams interface{}, keyPrefix string, obj interface{}, collectionType string) { - var v = reflect.ValueOf(obj) - var value = "" - if v == reflect.ValueOf(nil) { - value = "null" - } else { - switch v.Kind() { + var v = reflect.ValueOf(obj) + var value = "" + if v == reflect.ValueOf(nil) { + value = "null" + } else { + switch v.Kind() { case reflect.Invalid: value = "invalid" @@ -208,35 +208,35 @@ func parameterAddToQuery(queryParams interface{}, keyPrefix string, obj interfac case reflect.Interface: fallthrough - case reflect.Ptr: + case reflect.Ptr: parameterAddToQuery(queryParams, keyPrefix, v.Elem().Interface(), collectionType) - return + return - case reflect.Int, reflect.Int8, reflect.Int16, - reflect.Int32, reflect.Int64: - value = strconv.FormatInt(v.Int(), 10) - case reflect.Uint, reflect.Uint8, reflect.Uint16, - reflect.Uint32, reflect.Uint64, reflect.Uintptr: - value = strconv.FormatUint(v.Uint(), 10) - case reflect.Float32, reflect.Float64: - value = strconv.FormatFloat(v.Float(), 'g', -1, 32) - case reflect.Bool: - value = strconv.FormatBool(v.Bool()) - case reflect.String: - value = v.String() - default: - value = v.Type().String() + " value" - } - } + case reflect.Int, reflect.Int8, reflect.Int16, + reflect.Int32, reflect.Int64: + value = strconv.FormatInt(v.Int(), 10) + case reflect.Uint, reflect.Uint8, reflect.Uint16, + reflect.Uint32, reflect.Uint64, reflect.Uintptr: + value = strconv.FormatUint(v.Uint(), 10) + case reflect.Float32, reflect.Float64: + value = strconv.FormatFloat(v.Float(), 'g', -1, 32) + case reflect.Bool: + value = strconv.FormatBool(v.Bool()) + case reflect.String: + value = v.String() + default: + value = v.Type().String() + " value" + } + } - switch valuesMap := queryParams.(type) { - case url.Values: - valuesMap.Add( keyPrefix, value ) - break - case map[string]string: - valuesMap[keyPrefix] = value - break - } + switch valuesMap := queryParams.(type) { + case url.Values: + valuesMap.Add( keyPrefix, value ) + break + case map[string]string: + valuesMap[keyPrefix] = value + break + } } // helper for converting interface{} parameters to json strings @@ -388,11 +388,11 @@ func (c *APIClient) prepareRequest( } // Encode the parameters. - url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { - pieces := strings.Split(s, "=") - pieces[0] = queryDescape.Replace(pieces[0]) - return strings.Join(pieces, "=") - }) + url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { + pieces := strings.Split(s, "=") + pieces[0] = queryDescape.Replace(pieces[0]) + return strings.Join(pieces, "=") + }) // Generate a new request if body != nil { @@ -455,19 +455,19 @@ func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err err return nil } if f, ok := v.(*os.File); ok { - f, err = ioutil.TempFile("", "HttpClientFile") - if err != nil { - return - } - _, err = f.Write(b) - if err != nil { - return - } - _, err = f.Seek(0, io.SeekStart) - return - } + f, err = ioutil.TempFile("", "HttpClientFile") + if err != nil { + return + } + _, err = f.Write(b) + if err != nil { + return + } + _, err = f.Seek(0, io.SeekStart) + return + } if f, ok := v.(**os.File); ok { - *f, err = ioutil.TempFile("", "HttpClientFile") + *f, err = ioutil.TempFile("", "HttpClientFile") if err != nil { return } diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/client.go b/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/client.go index ded348c485..17aa6861b0 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/client.go +++ b/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/client.go @@ -38,8 +38,8 @@ import ( var ( jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) - queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) - queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" ) + queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) + queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" ) ) // APIClient manages communication with the OpenAPI Extension x-auth-id-alias API v1.0.0 @@ -127,28 +127,28 @@ func typeCheckParameter(obj interface{}, expected string, name string) error { } func parameterValueToString( obj interface{}, key string ) string { - if reflect.TypeOf(obj).Kind() != reflect.Ptr { - return fmt.Sprintf("%v", obj) - } - var param,ok = obj.(MappedNullable) - if !ok { - return "" - } - dataMap,err := param.ToMap() - if err != nil { - return "" - } - return fmt.Sprintf("%v", dataMap[key]) + if reflect.TypeOf(obj).Kind() != reflect.Ptr { + return fmt.Sprintf("%v", obj) + } + var param,ok = obj.(MappedNullable) + if !ok { + return "" + } + dataMap,err := param.ToMap() + if err != nil { + return "" + } + return fmt.Sprintf("%v", dataMap[key]) } // parameterAddToQuery adds the provided object to the url query supporting deep object syntax func parameterAddToQuery(queryParams interface{}, keyPrefix string, obj interface{}, collectionType string) { - var v = reflect.ValueOf(obj) - var value = "" - if v == reflect.ValueOf(nil) { - value = "null" - } else { - switch v.Kind() { + var v = reflect.ValueOf(obj) + var value = "" + if v == reflect.ValueOf(nil) { + value = "null" + } else { + switch v.Kind() { case reflect.Invalid: value = "invalid" @@ -192,35 +192,35 @@ func parameterAddToQuery(queryParams interface{}, keyPrefix string, obj interfac case reflect.Interface: fallthrough - case reflect.Ptr: + case reflect.Ptr: parameterAddToQuery(queryParams, keyPrefix, v.Elem().Interface(), collectionType) - return + return - case reflect.Int, reflect.Int8, reflect.Int16, - reflect.Int32, reflect.Int64: - value = strconv.FormatInt(v.Int(), 10) - case reflect.Uint, reflect.Uint8, reflect.Uint16, - reflect.Uint32, reflect.Uint64, reflect.Uintptr: - value = strconv.FormatUint(v.Uint(), 10) - case reflect.Float32, reflect.Float64: - value = strconv.FormatFloat(v.Float(), 'g', -1, 32) - case reflect.Bool: - value = strconv.FormatBool(v.Bool()) - case reflect.String: - value = v.String() - default: - value = v.Type().String() + " value" - } - } + case reflect.Int, reflect.Int8, reflect.Int16, + reflect.Int32, reflect.Int64: + value = strconv.FormatInt(v.Int(), 10) + case reflect.Uint, reflect.Uint8, reflect.Uint16, + reflect.Uint32, reflect.Uint64, reflect.Uintptr: + value = strconv.FormatUint(v.Uint(), 10) + case reflect.Float32, reflect.Float64: + value = strconv.FormatFloat(v.Float(), 'g', -1, 32) + case reflect.Bool: + value = strconv.FormatBool(v.Bool()) + case reflect.String: + value = v.String() + default: + value = v.Type().String() + " value" + } + } - switch valuesMap := queryParams.(type) { - case url.Values: - valuesMap.Add( keyPrefix, value ) - break - case map[string]string: - valuesMap[keyPrefix] = value - break - } + switch valuesMap := queryParams.(type) { + case url.Values: + valuesMap.Add( keyPrefix, value ) + break + case map[string]string: + valuesMap[keyPrefix] = value + break + } } // helper for converting interface{} parameters to json strings @@ -372,11 +372,11 @@ func (c *APIClient) prepareRequest( } // Encode the parameters. - url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { - pieces := strings.Split(s, "=") - pieces[0] = queryDescape.Replace(pieces[0]) - return strings.Join(pieces, "=") - }) + url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { + pieces := strings.Split(s, "=") + pieces[0] = queryDescape.Replace(pieces[0]) + return strings.Join(pieces, "=") + }) // Generate a new request if body != nil { @@ -423,19 +423,19 @@ func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err err return nil } if f, ok := v.(*os.File); ok { - f, err = ioutil.TempFile("", "HttpClientFile") - if err != nil { - return - } - _, err = f.Write(b) - if err != nil { - return - } - _, err = f.Seek(0, io.SeekStart) - return - } + f, err = ioutil.TempFile("", "HttpClientFile") + if err != nil { + return + } + _, err = f.Write(b) + if err != nil { + return + } + _, err = f.Seek(0, io.SeekStart) + return + } if f, ok := v.(**os.File); ok { - *f, err = ioutil.TempFile("", "HttpClientFile") + *f, err = ioutil.TempFile("", "HttpClientFile") if err != nil { return } diff --git a/samples/openapi3/client/petstore/go/go-petstore/api_default.go b/samples/openapi3/client/petstore/go/go-petstore/api_default.go index 0a54d9522f..92b78cac5a 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/api_default.go +++ b/samples/openapi3/client/petstore/go/go-petstore/api_default.go @@ -126,8 +126,8 @@ func (a *DefaultApiService) FooGetExecute(r ApiFooGetRequest) (*FooGetDefaultRes newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } if localVarHTTPResponse.StatusCode >= 400 && localVarHTTPResponse.StatusCode < 500 { @@ -137,8 +137,8 @@ func (a *DefaultApiService) FooGetExecute(r ApiFooGetRequest) (*FooGetDefaultRes newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } var v FooGetDefaultResponse @@ -147,8 +147,8 @@ func (a *DefaultApiService) FooGetExecute(r ApiFooGetRequest) (*FooGetDefaultRes newErr.error = err.Error() return localVarReturnValue, localVarHTTPResponse, newErr } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } diff --git a/samples/openapi3/client/petstore/go/go-petstore/api_fake.go b/samples/openapi3/client/petstore/go/go-petstore/api_fake.go index 8c1c89ed64..5a183d8488 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/api_fake.go +++ b/samples/openapi3/client/petstore/go/go-petstore/api_fake.go @@ -1307,7 +1307,7 @@ func (a *FakeApiService) TestEndpointParametersExecute(r ApiTestEndpointParamete binaryLocalVarFileBytes = fbs binaryLocalVarFileName = binaryLocalVarFile.Name() binaryLocalVarFile.Close() - } + } formFiles = append(formFiles, formFile{fileBytes: binaryLocalVarFileBytes, fileName: binaryLocalVarFileName, formFileName: binaryLocalVarFormFileName}) if r.date != nil { parameterAddToQuery(localVarFormParams, "date", r.date, "") @@ -1460,13 +1460,13 @@ func (a *FakeApiService) TestEnumParametersExecute(r ApiTestEnumParametersReques } } if r.enumQueryString != nil { - parameterAddToQuery(localVarQueryParams, "enum_query_string", r.enumQueryString, "") + parameterAddToQuery(localVarQueryParams, "enum_query_string", r.enumQueryString, "") } if r.enumQueryInteger != nil { - parameterAddToQuery(localVarQueryParams, "enum_query_integer", r.enumQueryInteger, "") + parameterAddToQuery(localVarQueryParams, "enum_query_integer", r.enumQueryInteger, "") } if r.enumQueryDouble != nil { - parameterAddToQuery(localVarQueryParams, "enum_query_double", r.enumQueryDouble, "") + parameterAddToQuery(localVarQueryParams, "enum_query_double", r.enumQueryDouble, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/x-www-form-urlencoded"} @@ -1622,10 +1622,10 @@ func (a *FakeApiService) TestGroupParametersExecute(r ApiTestGroupParametersRequ parameterAddToQuery(localVarQueryParams, "required_string_group", r.requiredStringGroup, "") parameterAddToQuery(localVarQueryParams, "required_int64_group", r.requiredInt64Group, "") if r.stringGroup != nil { - parameterAddToQuery(localVarQueryParams, "string_group", r.stringGroup, "") + parameterAddToQuery(localVarQueryParams, "string_group", r.stringGroup, "") } if r.int64Group != nil { - parameterAddToQuery(localVarQueryParams, "int64_group", r.int64Group, "") + parameterAddToQuery(localVarQueryParams, "int64_group", r.int64Group, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1677,8 +1677,8 @@ func (a *FakeApiService) TestGroupParametersExecute(r ApiTestGroupParametersRequ newErr.error = err.Error() return localVarHTTPResponse, newErr } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v } return localVarHTTPResponse, newErr } @@ -1950,10 +1950,10 @@ func (a *FakeApiService) TestQueryDeepObjectExecute(r ApiTestQueryDeepObjectRequ localVarFormParams := url.Values{} if r.testPet != nil { - parameterAddToQuery(localVarQueryParams, "test_pet", r.testPet, "") + parameterAddToQuery(localVarQueryParams, "test_pet", r.testPet, "") } if r.inputOptions != nil { - parameterAddToQuery(localVarQueryParams, "inputOptions", r.inputOptions, "") + parameterAddToQuery(localVarQueryParams, "inputOptions", r.inputOptions, "") } // to determine the Content-Type header localVarHTTPContentTypes := []string{} diff --git a/samples/openapi3/client/petstore/go/go-petstore/api_pet.go b/samples/openapi3/client/petstore/go/go-petstore/api_pet.go index af2faaf073..34f0b0be00 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/api_pet.go +++ b/samples/openapi3/client/petstore/go/go-petstore/api_pet.go @@ -1009,7 +1009,7 @@ func (a *PetApiService) UploadFileExecute(r ApiUploadFileRequest) (*ApiResponse, fileLocalVarFileBytes = fbs fileLocalVarFileName = fileLocalVarFile.Name() fileLocalVarFile.Close() - } + } formFiles = append(formFiles, formFile{fileBytes: fileLocalVarFileBytes, fileName: fileLocalVarFileName, formFileName: fileLocalVarFormFileName}) req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { @@ -1141,7 +1141,7 @@ func (a *PetApiService) UploadFileWithRequiredFileExecute(r ApiUploadFileWithReq requiredFileLocalVarFormFileName = "requiredFile" requiredFileLocalVarFile := r.requiredFile - fbs, _ := ioutil.ReadAll(requiredFileLocalVarFile) + fbs, _ := ioutil.ReadAll(requiredFileLocalVarFile) requiredFileLocalVarFileBytes = fbs requiredFileLocalVarFileName = requiredFileLocalVarFile.Name() requiredFileLocalVarFile.Close() diff --git a/samples/openapi3/client/petstore/go/go-petstore/client.go b/samples/openapi3/client/petstore/go/go-petstore/client.go index 3c443e0ecf..8db7aa62f1 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/client.go +++ b/samples/openapi3/client/petstore/go/go-petstore/client.go @@ -39,8 +39,8 @@ import ( var ( jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) - queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) - queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" ) + queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) + queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" ) ) // APIClient manages communication with the OpenAPI Petstore API v1.0.0 @@ -146,28 +146,28 @@ func typeCheckParameter(obj interface{}, expected string, name string) error { } func parameterValueToString( obj interface{}, key string ) string { - if reflect.TypeOf(obj).Kind() != reflect.Ptr { - return fmt.Sprintf("%v", obj) - } - var param,ok = obj.(MappedNullable) - if !ok { - return "" - } - dataMap,err := param.ToMap() - if err != nil { - return "" - } - return fmt.Sprintf("%v", dataMap[key]) + if reflect.TypeOf(obj).Kind() != reflect.Ptr { + return fmt.Sprintf("%v", obj) + } + var param,ok = obj.(MappedNullable) + if !ok { + return "" + } + dataMap,err := param.ToMap() + if err != nil { + return "" + } + return fmt.Sprintf("%v", dataMap[key]) } // parameterAddToQuery adds the provided object to the url query supporting deep object syntax func parameterAddToQuery(queryParams interface{}, keyPrefix string, obj interface{}, collectionType string) { - var v = reflect.ValueOf(obj) - var value = "" - if v == reflect.ValueOf(nil) { - value = "null" - } else { - switch v.Kind() { + var v = reflect.ValueOf(obj) + var value = "" + if v == reflect.ValueOf(nil) { + value = "null" + } else { + switch v.Kind() { case reflect.Invalid: value = "invalid" @@ -211,35 +211,35 @@ func parameterAddToQuery(queryParams interface{}, keyPrefix string, obj interfac case reflect.Interface: fallthrough - case reflect.Ptr: + case reflect.Ptr: parameterAddToQuery(queryParams, keyPrefix, v.Elem().Interface(), collectionType) - return + return - case reflect.Int, reflect.Int8, reflect.Int16, - reflect.Int32, reflect.Int64: - value = strconv.FormatInt(v.Int(), 10) - case reflect.Uint, reflect.Uint8, reflect.Uint16, - reflect.Uint32, reflect.Uint64, reflect.Uintptr: - value = strconv.FormatUint(v.Uint(), 10) - case reflect.Float32, reflect.Float64: - value = strconv.FormatFloat(v.Float(), 'g', -1, 32) - case reflect.Bool: - value = strconv.FormatBool(v.Bool()) - case reflect.String: - value = v.String() - default: - value = v.Type().String() + " value" - } - } + case reflect.Int, reflect.Int8, reflect.Int16, + reflect.Int32, reflect.Int64: + value = strconv.FormatInt(v.Int(), 10) + case reflect.Uint, reflect.Uint8, reflect.Uint16, + reflect.Uint32, reflect.Uint64, reflect.Uintptr: + value = strconv.FormatUint(v.Uint(), 10) + case reflect.Float32, reflect.Float64: + value = strconv.FormatFloat(v.Float(), 'g', -1, 32) + case reflect.Bool: + value = strconv.FormatBool(v.Bool()) + case reflect.String: + value = v.String() + default: + value = v.Type().String() + " value" + } + } - switch valuesMap := queryParams.(type) { - case url.Values: - valuesMap.Add( keyPrefix, value ) - break - case map[string]string: - valuesMap[keyPrefix] = value - break - } + switch valuesMap := queryParams.(type) { + case url.Values: + valuesMap.Add( keyPrefix, value ) + break + case map[string]string: + valuesMap[keyPrefix] = value + break + } } // helper for converting interface{} parameters to json strings @@ -391,11 +391,11 @@ func (c *APIClient) prepareRequest( } // Encode the parameters. - url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { - pieces := strings.Split(s, "=") - pieces[0] = queryDescape.Replace(pieces[0]) - return strings.Join(pieces, "=") - }) + url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { + pieces := strings.Split(s, "=") + pieces[0] = queryDescape.Replace(pieces[0]) + return strings.Join(pieces, "=") + }) // Generate a new request if body != nil { @@ -473,19 +473,19 @@ func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err err return nil } if f, ok := v.(*os.File); ok { - f, err = ioutil.TempFile("", "HttpClientFile") - if err != nil { - return - } - _, err = f.Write(b) - if err != nil { - return - } - _, err = f.Seek(0, io.SeekStart) - return - } + f, err = ioutil.TempFile("", "HttpClientFile") + if err != nil { + return + } + _, err = f.Write(b) + if err != nil { + return + } + _, err = f.Seek(0, io.SeekStart) + return + } if f, ok := v.(**os.File); ok { - *f, err = ioutil.TempFile("", "HttpClientFile") + *f, err = ioutil.TempFile("", "HttpClientFile") if err != nil { return } From 2524e8fb0abeb81ec16adc1f92e197275539f2d2 Mon Sep 17 00:00:00 2001 From: Oleh Kurpiak Date: Tue, 6 Dec 2022 07:30:47 +0200 Subject: [PATCH 081/189] [Java][WebClient] global blocking operations config (#14076) * [Java][WebClient] global blocking operations config * update samples --- docs/generators/java.md | 1 + .../codegen/languages/JavaClientCodegen.java | 18 ++++++++++++ .../codegen/java/JavaClientCodegenTest.java | 29 +++++++++++++++++++ ...ith-fake-endpoints-models-for-testing.yaml | 1 + .../java/apache-httpclient/api/openapi.yaml | 1 + .../petstore/java/feign/api/openapi.yaml | 1 + .../java/native-async/api/openapi.yaml | 1 + .../petstore/java/native/api/openapi.yaml | 1 + .../petstore/java/webclient/api/openapi.yaml | 1 + .../src/main/resources/META-INF/openapi.yml | 1 + .../src/main/resources/META-INF/openapi.yml | 1 + 11 files changed, 56 insertions(+) diff --git a/docs/generators/java.md b/docs/generators/java.md index 63e46d8ed3..43a723d2ed 100644 --- a/docs/generators/java.md +++ b/docs/generators/java.md @@ -90,6 +90,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |useRxJava2|Whether to use the RxJava2 adapter with the retrofit2 library. IMPORTANT: This option has been deprecated.| |false| |useRxJava3|Whether to use the RxJava3 adapter with the retrofit2 library. IMPORTANT: This option has been deprecated.| |false| |useSingleRequestParameter|Setting this property to true will generate functions with a single argument containing all API endpoint parameters instead of one argument per parameter. ONLY jersey2, jersey3, okhttp-gson support this option.| |false| +|webclientBlockingOperations|Making all WebClient operations blocking(sync). Note that if on operation 'x-webclient-blocking: false' then such operation won't be sync| |false| |withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false| ## SUPPORTED VENDOR EXTENSIONS diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java index fe59a2216c..fba5de02c1 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java @@ -91,6 +91,7 @@ public class JavaClientCodegen extends AbstractJavaCodegen public static final String MICROPROFILE_REST_CLIENT_DEFAULT_ROOT_PACKAGE = "javax"; public static final String MICROPROFILE_DEFAULT = "default"; public static final String MICROPROFILE_KUMULUZEE = "kumuluzee"; + public static final String WEBCLIENT_BLOCKING_OPERATIONS = "webclientBlockingOperations"; public static final String SERIALIZATION_LIBRARY_GSON = "gson"; public static final String SERIALIZATION_LIBRARY_JACKSON = "jackson"; @@ -126,6 +127,7 @@ public class JavaClientCodegen extends AbstractJavaCodegen protected String rootJavaEEPackage; protected Map mpRestClientVersions = new HashMap<>(); protected boolean useSingleRequestParameter = false; + protected boolean webclientBlockingOperations = false; private static class MpRestClientVersion { public final String rootPackage; @@ -204,6 +206,7 @@ public class JavaClientCodegen extends AbstractJavaCodegen cliOptions.add(CliOption.newBoolean(CodegenConstants.USE_ONEOF_DISCRIMINATOR_LOOKUP, CodegenConstants.USE_ONEOF_DISCRIMINATOR_LOOKUP_DESC + " Only jersey2, jersey3, native, okhttp-gson support this option.")); cliOptions.add(CliOption.newString(MICROPROFILE_REST_CLIENT_VERSION, "Version of MicroProfile Rest Client API.")); cliOptions.add(CliOption.newBoolean(CodegenConstants.USE_SINGLE_REQUEST_PARAMETER, "Setting this property to true will generate functions with a single argument containing all API endpoint parameters instead of one argument per parameter. ONLY jersey2, jersey3, okhttp-gson support this option.")); + cliOptions.add(CliOption.newBoolean(WEBCLIENT_BLOCKING_OPERATIONS, "Making all WebClient operations blocking(sync). Note that if on operation 'x-webclient-blocking: false' then such operation won't be sync", this.webclientBlockingOperations)); supportedLibraries.put(JERSEY1, "HTTP client: Jersey client 1.19.x. JSON processing: Jackson 2.9.x. Enable gzip request encoding using '-DuseGzipFeature=true'. IMPORTANT NOTE: jersey 1.x is no longer actively maintained so please upgrade to 'jersey3' or other HTTP libraries instead."); supportedLibraries.put(JERSEY2, "HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.9.x"); @@ -413,6 +416,9 @@ public class JavaClientCodegen extends AbstractJavaCodegen this.setErrorObjectType(additionalProperties.get(ERROR_OBJECT_TYPE).toString()); } additionalProperties.put(ERROR_OBJECT_TYPE, errorObjectType); + if (additionalProperties.containsKey(WEBCLIENT_BLOCKING_OPERATIONS)) { + this.webclientBlockingOperations = Boolean.parseBoolean(additionalProperties.get(WEBCLIENT_BLOCKING_OPERATIONS).toString()); + } final String invokerFolder = (sourceFolder + '/' + invokerPackage).replace(".", "/"); final String apiFolder = (sourceFolder + '/' + apiPackage).replace(".", "/"); @@ -817,6 +823,18 @@ public class JavaClientCodegen extends AbstractJavaCodegen objs = AbstractJavaJAXRSServerCodegen.jaxrsPostProcessOperations(objs); } + if (WEBCLIENT.equals(getLibrary())) { + OperationMap operations = objs.getOperations(); + if (operations != null) { + List ops = operations.getOperation(); + for (CodegenOperation operation : ops) { + if (!operation.vendorExtensions.containsKey(VendorExtension.X_WEBCLIENT_BLOCKING.getName()) && webclientBlockingOperations) { + operation.vendorExtensions.put(VendorExtension.X_WEBCLIENT_BLOCKING.getName(), true); + } + } + } + } + return objs; } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java index 81bdccd09a..9efb392203 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/JavaClientCodegenTest.java @@ -993,6 +993,35 @@ public class JavaClientCodegenTest { ); } + @Test + public void shouldGenerateBlockingAndNoBlockingOperationsForWebClient() throws IOException { + Map properties = new HashMap<>(); + properties.put(CodegenConstants.API_PACKAGE, "xyz.abcdef.api"); + properties.put(JavaClientCodegen.WEBCLIENT_BLOCKING_OPERATIONS, true); + + File output = Files.createTempDirectory("test").toFile(); + output.deleteOnExit(); + + final CodegenConfigurator configurator = new CodegenConfigurator() + .setGeneratorName("java") + .setLibrary(JavaClientCodegen.WEBCLIENT) + .setAdditionalProperties(properties) + .setInputSpec("src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml") + .setOutputDir(output.getAbsolutePath().replace("\\", "/")); + + DefaultGenerator generator = new DefaultGenerator(); + Map files = generator.opts(configurator.toClientOptInput()).generate().stream() + .collect(Collectors.toMap(File::getName, Function.identity())); + + JavaFileAssert.assertThat(files.get("StoreApi.java")) + .assertMethod("getInventory").hasReturnType("Mono>") //explicit 'x-webclient-blocking: false' which overrides global config + .toFileAssert() + .assertMethod("placeOrder").hasReturnType("Order"); // use global config + + JavaFileAssert.assertThat(files.get("PetApi.java")) + .assertMethod("findPetsByStatus").hasReturnType("List"); // explicit 'x-webclient-blocking: true' which overrides global config + } + @Test public void testAllowModelWithNoProperties() throws Exception { File output = Files.createTempDirectory("test").toFile(); diff --git a/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml b/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml index 2401e56127..6ec5b66e0e 100644 --- a/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml @@ -318,6 +318,7 @@ paths: summary: Returns pet inventories by status description: Returns a map of status codes to quantities operationId: getInventory + x-webclient-blocking: false responses: '200': description: successful operation diff --git a/samples/client/petstore/java/apache-httpclient/api/openapi.yaml b/samples/client/petstore/java/apache-httpclient/api/openapi.yaml index f9cbedf1e4..2828944e55 100644 --- a/samples/client/petstore/java/apache-httpclient/api/openapi.yaml +++ b/samples/client/petstore/java/apache-httpclient/api/openapi.yaml @@ -358,6 +358,7 @@ paths: summary: Returns pet inventories by status tags: - store + x-webclient-blocking: false x-accepts: application/json /store/order: post: diff --git a/samples/client/petstore/java/feign/api/openapi.yaml b/samples/client/petstore/java/feign/api/openapi.yaml index f9cbedf1e4..2828944e55 100644 --- a/samples/client/petstore/java/feign/api/openapi.yaml +++ b/samples/client/petstore/java/feign/api/openapi.yaml @@ -358,6 +358,7 @@ paths: summary: Returns pet inventories by status tags: - store + x-webclient-blocking: false x-accepts: application/json /store/order: post: diff --git a/samples/client/petstore/java/native-async/api/openapi.yaml b/samples/client/petstore/java/native-async/api/openapi.yaml index f9cbedf1e4..2828944e55 100644 --- a/samples/client/petstore/java/native-async/api/openapi.yaml +++ b/samples/client/petstore/java/native-async/api/openapi.yaml @@ -358,6 +358,7 @@ paths: summary: Returns pet inventories by status tags: - store + x-webclient-blocking: false x-accepts: application/json /store/order: post: diff --git a/samples/client/petstore/java/native/api/openapi.yaml b/samples/client/petstore/java/native/api/openapi.yaml index f9cbedf1e4..2828944e55 100644 --- a/samples/client/petstore/java/native/api/openapi.yaml +++ b/samples/client/petstore/java/native/api/openapi.yaml @@ -358,6 +358,7 @@ paths: summary: Returns pet inventories by status tags: - store + x-webclient-blocking: false x-accepts: application/json /store/order: post: diff --git a/samples/client/petstore/java/webclient/api/openapi.yaml b/samples/client/petstore/java/webclient/api/openapi.yaml index f9cbedf1e4..2828944e55 100644 --- a/samples/client/petstore/java/webclient/api/openapi.yaml +++ b/samples/client/petstore/java/webclient/api/openapi.yaml @@ -358,6 +358,7 @@ paths: summary: Returns pet inventories by status tags: - store + x-webclient-blocking: false x-accepts: application/json /store/order: post: diff --git a/samples/server/petstore/java-helidon-server/mp/src/main/resources/META-INF/openapi.yml b/samples/server/petstore/java-helidon-server/mp/src/main/resources/META-INF/openapi.yml index 7a9042f14f..6667e32d34 100644 --- a/samples/server/petstore/java-helidon-server/mp/src/main/resources/META-INF/openapi.yml +++ b/samples/server/petstore/java-helidon-server/mp/src/main/resources/META-INF/openapi.yml @@ -358,6 +358,7 @@ paths: summary: Returns pet inventories by status tags: - store + x-webclient-blocking: false x-accepts: application/json /store/order: post: diff --git a/samples/server/petstore/java-helidon-server/se/src/main/resources/META-INF/openapi.yml b/samples/server/petstore/java-helidon-server/se/src/main/resources/META-INF/openapi.yml index 7a9042f14f..6667e32d34 100644 --- a/samples/server/petstore/java-helidon-server/se/src/main/resources/META-INF/openapi.yml +++ b/samples/server/petstore/java-helidon-server/se/src/main/resources/META-INF/openapi.yml @@ -358,6 +358,7 @@ paths: summary: Returns pet inventories by status tags: - store + x-webclient-blocking: false x-accepts: application/json /store/order: post: From d06ab43dd6e0d3765d8138f23127050cb19f30c1 Mon Sep 17 00:00:00 2001 From: yannizhou05 <61256379+yannizhou05@users.noreply.github.com> Date: Tue, 6 Dec 2022 00:27:05 -0600 Subject: [PATCH 082/189] Update SharedTypeScriptTest.java (#13956) --- .../codegen/typescript/SharedTypeScriptTest.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/SharedTypeScriptTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/SharedTypeScriptTest.java index 7a769cc8d1..3b2169950d 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/SharedTypeScriptTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/SharedTypeScriptTest.java @@ -15,6 +15,7 @@ import java.nio.charset.StandardCharsets; import java.util.List; import java.util.Map; import java.util.HashMap; +import java.util.Arrays; import static org.openapitools.codegen.typescript.TypeScriptGroups.*; @@ -85,14 +86,15 @@ public class SharedTypeScriptTest { TypeScriptAxiosClientCodegen codegen = new TypeScriptAxiosClientCodegen(); Map types = new HashMap() {{ - put("Schema & AnotherSchema", new String[]{ "Schema", "AnotherSchema" }); - put("Schema | AnotherSchema", new String[]{ "Schema", "AnotherSchema" }); + put("Schema & AnotherSchema", new String[]{ "AnotherSchema", "Schema" }); + put("Schema | AnotherSchema", new String[]{ "AnotherSchema", "Schema" }); put("Schema & object", new String[]{ "Schema" }); put("Schema | object", new String[]{ "Schema" }); }}; for (Map.Entry entry : types.entrySet()) { String[] mapped = codegen.toModelImportMap(entry.getKey()).values().toArray(new String[0]); + Arrays.sort(mapped); Assert.assertEquals(mapped, entry.getValue()); } } From f2321a61d305923a7293a44bd3c9805a0aed08b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20B=C3=A4rwinkel?= Date: Tue, 6 Dec 2022 16:48:29 +0100 Subject: [PATCH 083/189] Include response headers in the API type (#13565) --- .../languages/HaskellServantCodegen.java | 19 +++++++++++++++++++ .../lib/OpenAPIPetstore/API.hs | 4 ++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellServantCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellServantCodegen.java index 4296074ddd..96397b796f 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellServantCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/HaskellServantCodegen.java @@ -578,6 +578,25 @@ public class HaskellServantCodegen extends DefaultCodegen implements CodegenConf returnType = "(" + returnType + ")"; } + List headers = new ArrayList<>(); + for (CodegenResponse r : op.responses) { + headers.addAll(r.headers); + } + if (!headers.isEmpty()) { + List headerContents = new ArrayList<>(); + for (CodegenProperty h : headers) { + // Because headers is a Map multiple Set-Cookie headers are currently not possible. If someone + // uses the workaround with null bytes, remove them and add add each header to the list: + // https://github.com/OAI/OpenAPI-Specification/issues/1237#issuecomment-906603675 + String headerName = h.baseName.replaceAll("\0", ""); + String headerType = h.dataType; + headerContents.add("Header \"" + headerName + "\" " + headerType); + } + String headerContent = String.join(", ", headerContents); + + returnType = "(Headers '[" + headerContent + "] " + returnType + ")"; + } + String code = "200"; for (CodegenResponse r : op.responses) { if (r.code.matches("2[0-9][0-9]")) { diff --git a/samples/server/petstore/haskell-servant/lib/OpenAPIPetstore/API.hs b/samples/server/petstore/haskell-servant/lib/OpenAPIPetstore/API.hs index 5a0b734dba..88e7aaa876 100644 --- a/samples/server/petstore/haskell-servant/lib/OpenAPIPetstore/API.hs +++ b/samples/server/petstore/haskell-servant/lib/OpenAPIPetstore/API.hs @@ -163,7 +163,7 @@ type OpenAPIPetstoreAPI :<|> "user" :> "createWithList" :> ReqBody '[JSON] [User] :> Verb 'POST 200 '[JSON] NoContent -- 'createUsersWithListInput' route :<|> "user" :> Capture "username" Text :> Verb 'DELETE 200 '[JSON] NoContent -- 'deleteUser' route :<|> "user" :> Capture "username" Text :> Verb 'GET 200 '[JSON] User -- 'getUserByName' route - :<|> "user" :> "login" :> QueryParam "username" Text :> QueryParam "password" Text :> Verb 'GET 200 '[JSON] Text -- 'loginUser' route + :<|> "user" :> "login" :> QueryParam "username" Text :> QueryParam "password" Text :> Verb 'GET 200 '[JSON] (Headers '[Header "X-Rate-Limit" Int, Header "X-Expires-After" UTCTime] Text) -- 'loginUser' route :<|> "user" :> "logout" :> Verb 'GET 200 '[JSON] NoContent -- 'logoutUser' route :<|> "user" :> Capture "username" Text :> ReqBody '[JSON] User :> Verb 'PUT 200 '[JSON] NoContent -- 'updateUser' route :<|> Raw @@ -203,7 +203,7 @@ data OpenAPIPetstoreBackend a m = OpenAPIPetstoreBackend , createUsersWithListInput :: [User] -> m NoContent{- ^ -} , deleteUser :: Text -> m NoContent{- ^ This can only be done by the logged in user. -} , getUserByName :: Text -> m User{- ^ -} - , loginUser :: Maybe Text -> Maybe Text -> m Text{- ^ -} + , loginUser :: Maybe Text -> Maybe Text -> m (Headers '[Header "X-Rate-Limit" Int, Header "X-Expires-After" UTCTime] Text){- ^ -} , logoutUser :: m NoContent{- ^ -} , updateUser :: Text -> User -> m NoContent{- ^ This can only be done by the logged in user. -} } From 6686ba2dc709b67b2865c3875a53a6aeef38ad9e Mon Sep 17 00:00:00 2001 From: Dillen Meijboom Date: Tue, 6 Dec 2022 17:15:36 +0100 Subject: [PATCH 084/189] Add support for style=deepObject with query parameters in the Rust generator (#13381) * Add support for style deepObject in the Rust generator * Add support for arrays in deepObject query parameters and fixed issue with strings --- .../main/resources/rust/reqwest/api.mustache | 14 +++++++++ .../resources/rust/reqwest/api_mod.mustache | 29 +++++++++++++++++++ .../reqwest/petstore-async/src/apis/mod.rs | 29 +++++++++++++++++++ .../petstore-awsv4signature/src/apis/mod.rs | 29 +++++++++++++++++++ .../rust/reqwest/petstore/src/apis/mod.rs | 29 +++++++++++++++++++ 5 files changed, 130 insertions(+) diff --git a/modules/openapi-generator/src/main/resources/rust/reqwest/api.mustache b/modules/openapi-generator/src/main/resources/rust/reqwest/api.mustache index e718dec2b3..40691696ab 100644 --- a/modules/openapi-generator/src/main/resources/rust/reqwest/api.mustache +++ b/modules/openapi-generator/src/main/resources/rust/reqwest/api.mustache @@ -112,9 +112,17 @@ pub {{#supportAsync}}async {{/supportAsync}}fn {{{operationId}}}(configuration: local_var_req_builder = local_var_req_builder.query(&[("{{{baseName}}}", &{{{paramName}}}.to_string())]); {{/isNullable}} {{#isNullable}} + {{#isDeepObject}} + if let Some(ref local_var_str) = {{{paramName}}} { + let params = crate::apis::parse_deep_object("{{{baseName}}}", local_var_str); + local_var_req_builder = local_var_req_builder.query(¶ms); + }; + {{/isDeepObject}} + {{^isDeepObject}} if let Some(ref local_var_str) = {{{paramName}}} { local_var_req_builder = local_var_req_builder.query(&[("{{{baseName}}}", &local_var_str.to_string())]); }; + {{/isDeepObject}} {{/isNullable}} {{/isArray}} {{/required}} @@ -127,7 +135,13 @@ pub {{#supportAsync}}async {{/supportAsync}}fn {{{operationId}}}(configuration: }; {{/isArray}} {{^isArray}} + {{#isDeepObject}} + let params = crate::apis::parse_deep_object("{{{baseName}}}", local_var_str); + local_var_req_builder = local_var_req_builder.query(¶ms); + {{/isDeepObject}} + {{^isDeepObject}} local_var_req_builder = local_var_req_builder.query(&[("{{{baseName}}}", &local_var_str.to_string())]); + {{/isDeepObject}} {{/isArray}} } {{/required}} diff --git a/modules/openapi-generator/src/main/resources/rust/reqwest/api_mod.mustache b/modules/openapi-generator/src/main/resources/rust/reqwest/api_mod.mustache index 807162b922..f00eb124cd 100644 --- a/modules/openapi-generator/src/main/resources/rust/reqwest/api_mod.mustache +++ b/modules/openapi-generator/src/main/resources/rust/reqwest/api_mod.mustache @@ -90,6 +90,35 @@ pub fn urlencode>(s: T) -> String { ::url::form_urlencoded::byte_serialize(s.as_ref().as_bytes()).collect() } +pub fn parse_deep_object(prefix: &str, value: &serde_json::Value) -> Vec<(String, String)> { + if let serde_json::Value::Object(object) = value { + let mut params = vec![]; + + for (key, value) in object { + match value { + serde_json::Value::Object(_) => params.append(&mut parse_deep_object( + &format!("{}[{}]", prefix, key), + value, + )), + serde_json::Value::Array(array) => { + for (i, value) in array.iter().enumerate() { + params.append(&mut parse_deep_object( + &format!("{}[{}][{}]", prefix, key, i), + value, + )); + } + }, + serde_json::Value::String(s) => params.push((format!("{}[{}]", prefix, key), s.clone())), + _ => params.push((format!("{}[{}]", prefix, key), value.to_string())), + } + } + + return params; + } + + unimplemented!("Only objects are supported with style=deepObject") +} + {{#apiInfo}} {{#apis}} pub mod {{{classFilename}}}; diff --git a/samples/client/petstore/rust/reqwest/petstore-async/src/apis/mod.rs b/samples/client/petstore/rust/reqwest/petstore-async/src/apis/mod.rs index 34085cdedf..d791dfb5a8 100644 --- a/samples/client/petstore/rust/reqwest/petstore-async/src/apis/mod.rs +++ b/samples/client/petstore/rust/reqwest/petstore-async/src/apis/mod.rs @@ -61,6 +61,35 @@ pub fn urlencode>(s: T) -> String { ::url::form_urlencoded::byte_serialize(s.as_ref().as_bytes()).collect() } +pub fn parse_deep_object(prefix: &str, value: &serde_json::Value) -> Vec<(String, String)> { + if let serde_json::Value::Object(object) = value { + let mut params = vec![]; + + for (key, value) in object { + match value { + serde_json::Value::Object(_) => params.append(&mut parse_deep_object( + &format!("{}[{}]", prefix, key), + value, + )), + serde_json::Value::Array(array) => { + for (i, value) in array.iter().enumerate() { + params.append(&mut parse_deep_object( + &format!("{}[{}][{}]", prefix, key, i), + value, + )); + } + }, + serde_json::Value::String(s) => params.push((format!("{}[{}]", prefix, key), s.clone())), + _ => params.push((format!("{}[{}]", prefix, key), value.to_string())), + } + } + + return params; + } + + unimplemented!("Only objects are supported with style=deepObject") +} + pub mod fake_api; pub mod pet_api; pub mod store_api; diff --git a/samples/client/petstore/rust/reqwest/petstore-awsv4signature/src/apis/mod.rs b/samples/client/petstore/rust/reqwest/petstore-awsv4signature/src/apis/mod.rs index 32344f36b0..5f23a08cdf 100644 --- a/samples/client/petstore/rust/reqwest/petstore-awsv4signature/src/apis/mod.rs +++ b/samples/client/petstore/rust/reqwest/petstore-awsv4signature/src/apis/mod.rs @@ -65,6 +65,35 @@ pub fn urlencode>(s: T) -> String { ::url::form_urlencoded::byte_serialize(s.as_ref().as_bytes()).collect() } +pub fn parse_deep_object(prefix: &str, value: &serde_json::Value) -> Vec<(String, String)> { + if let serde_json::Value::Object(object) = value { + let mut params = vec![]; + + for (key, value) in object { + match value { + serde_json::Value::Object(_) => params.append(&mut parse_deep_object( + &format!("{}[{}]", prefix, key), + value, + )), + serde_json::Value::Array(array) => { + for (i, value) in array.iter().enumerate() { + params.append(&mut parse_deep_object( + &format!("{}[{}][{}]", prefix, key, i), + value, + )); + } + }, + serde_json::Value::String(s) => params.push((format!("{}[{}]", prefix, key), s.clone())), + _ => params.push((format!("{}[{}]", prefix, key), value.to_string())), + } + } + + return params; + } + + unimplemented!("Only objects are supported with style=deepObject") +} + pub mod fake_api; pub mod pet_api; pub mod store_api; diff --git a/samples/client/petstore/rust/reqwest/petstore/src/apis/mod.rs b/samples/client/petstore/rust/reqwest/petstore/src/apis/mod.rs index 34085cdedf..d791dfb5a8 100644 --- a/samples/client/petstore/rust/reqwest/petstore/src/apis/mod.rs +++ b/samples/client/petstore/rust/reqwest/petstore/src/apis/mod.rs @@ -61,6 +61,35 @@ pub fn urlencode>(s: T) -> String { ::url::form_urlencoded::byte_serialize(s.as_ref().as_bytes()).collect() } +pub fn parse_deep_object(prefix: &str, value: &serde_json::Value) -> Vec<(String, String)> { + if let serde_json::Value::Object(object) = value { + let mut params = vec![]; + + for (key, value) in object { + match value { + serde_json::Value::Object(_) => params.append(&mut parse_deep_object( + &format!("{}[{}]", prefix, key), + value, + )), + serde_json::Value::Array(array) => { + for (i, value) in array.iter().enumerate() { + params.append(&mut parse_deep_object( + &format!("{}[{}][{}]", prefix, key, i), + value, + )); + } + }, + serde_json::Value::String(s) => params.push((format!("{}[{}]", prefix, key), s.clone())), + _ => params.push((format!("{}[{}]", prefix, key), value.to_string())), + } + } + + return params; + } + + unimplemented!("Only objects are supported with style=deepObject") +} + pub mod fake_api; pub mod pet_api; pub mod store_api; From fdf1ce6c51e4481ccfa656cf87e84d65305397b6 Mon Sep 17 00:00:00 2001 From: Sorin Florea <30589784+sorin-florea@users.noreply.github.com> Date: Wed, 7 Dec 2022 06:57:00 +0100 Subject: [PATCH 085/189] Fix apache http client query parameters (#14193) --- .../libraries/apache-httpclient/api.mustache | 2 +- .../ApacheHttpClientCodegenTest.java | 2 +- .../petstore-async-middleware/src/apis/mod.rs | 29 +++++++++++++++++++ 3 files changed, 31 insertions(+), 2 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/api.mustache index 5e6ec0b0b2..7728787106 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/api.mustache @@ -91,7 +91,7 @@ public class {{classname}} { {{#hasVars}} {{#vars}} {{#isArray}} - localVarQueryParams.addAll(apiClient.parameterToPair("multi", "{{baseName}}", {{paramName}}.{{getter}}())); + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "{{baseName}}", {{paramName}}.{{getter}}())); {{/isArray}} {{^isArray}} localVarQueryParams.addAll(apiClient.parameterToPair("{{baseName}}", {{paramName}}.{{getter}}())); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/apachehttpclient/ApacheHttpClientCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/apachehttpclient/ApacheHttpClientCodegenTest.java index 8315833d46..8deb5f7e10 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/apachehttpclient/ApacheHttpClientCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/apachehttpclient/ApacheHttpClientCodegenTest.java @@ -87,7 +87,7 @@ public class ApacheHttpClientCodegenTest { generator.opts(clientOptInput).generate(); TestUtils.assertFileContains(Paths.get(output + "/src/main/java/xyz/abcdef/api/DefaultApi.java"), - "localVarQueryParams.addAll(apiClient.parameterToPair(\"multi\", \"values\", queryObject.getValues()))" + "localVarQueryParams.addAll(apiClient.parameterToPairs(\"multi\", \"values\", queryObject.getValues()))" ); } } diff --git a/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/apis/mod.rs b/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/apis/mod.rs index 80399c6060..33b8ca9e64 100644 --- a/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/apis/mod.rs +++ b/samples/client/petstore/rust/reqwest/petstore-async-middleware/src/apis/mod.rs @@ -70,6 +70,35 @@ pub fn urlencode>(s: T) -> String { ::url::form_urlencoded::byte_serialize(s.as_ref().as_bytes()).collect() } +pub fn parse_deep_object(prefix: &str, value: &serde_json::Value) -> Vec<(String, String)> { + if let serde_json::Value::Object(object) = value { + let mut params = vec![]; + + for (key, value) in object { + match value { + serde_json::Value::Object(_) => params.append(&mut parse_deep_object( + &format!("{}[{}]", prefix, key), + value, + )), + serde_json::Value::Array(array) => { + for (i, value) in array.iter().enumerate() { + params.append(&mut parse_deep_object( + &format!("{}[{}][{}]", prefix, key, i), + value, + )); + } + }, + serde_json::Value::String(s) => params.push((format!("{}[{}]", prefix, key), s.clone())), + _ => params.push((format!("{}[{}]", prefix, key), value.to_string())), + } + } + + return params; + } + + unimplemented!("Only objects are supported with style=deepObject") +} + pub mod fake_api; pub mod pet_api; pub mod store_api; From 1b344597bf642108c95bf98ad8f9f44b7dd568e0 Mon Sep 17 00:00:00 2001 From: teddy-s-song <118232533+teddy-s-song@users.noreply.github.com> Date: Wed, 7 Dec 2022 18:20:22 +0900 Subject: [PATCH 086/189] [typescript-axios] add temination condition for flattening url parameters (#14018) --- .../src/main/resources/typescript-axios/common.mustache | 1 + .../petstore/typescript-axios/builds/composed-schemas/common.ts | 1 + .../client/petstore/typescript-axios/builds/default/common.ts | 1 + .../client/petstore/typescript-axios/builds/es6-target/common.ts | 1 + .../petstore/typescript-axios/builds/test-petstore/common.ts | 1 + .../typescript-axios/builds/with-complex-headers/common.ts | 1 + .../common.ts | 1 + .../petstore/typescript-axios/builds/with-interfaces/common.ts | 1 + .../petstore/typescript-axios/builds/with-node-imports/common.ts | 1 + .../with-npm-version-and-separate-models-and-api/common.ts | 1 + .../petstore/typescript-axios/builds/with-npm-version/common.ts | 1 + .../builds/with-single-request-parameters/common.ts | 1 + .../petstore/typescript-axios/builds/with-string-enums/common.ts | 1 + 13 files changed, 13 insertions(+) diff --git a/modules/openapi-generator/src/main/resources/typescript-axios/common.mustache b/modules/openapi-generator/src/main/resources/typescript-axios/common.mustache index 2d1c8dc8e4..74e309f6a1 100755 --- a/modules/openapi-generator/src/main/resources/typescript-axios/common.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-axios/common.mustache @@ -77,6 +77,7 @@ export const setOAuthToObject = async function (object: any, name: string, scope } function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { + if (parameter == null) return; if (typeof parameter === "object") { if (Array.isArray(parameter)) { (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); diff --git a/samples/client/petstore/typescript-axios/builds/composed-schemas/common.ts b/samples/client/petstore/typescript-axios/builds/composed-schemas/common.ts index 3c485ae19a..55e3222c11 100644 --- a/samples/client/petstore/typescript-axios/builds/composed-schemas/common.ts +++ b/samples/client/petstore/typescript-axios/builds/composed-schemas/common.ts @@ -85,6 +85,7 @@ export const setOAuthToObject = async function (object: any, name: string, scope } function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { + if (parameter == null) return; if (typeof parameter === "object") { if (Array.isArray(parameter)) { (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); diff --git a/samples/client/petstore/typescript-axios/builds/default/common.ts b/samples/client/petstore/typescript-axios/builds/default/common.ts index be9b7df624..fee87ee2a1 100644 --- a/samples/client/petstore/typescript-axios/builds/default/common.ts +++ b/samples/client/petstore/typescript-axios/builds/default/common.ts @@ -85,6 +85,7 @@ export const setOAuthToObject = async function (object: any, name: string, scope } function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { + if (parameter == null) return; if (typeof parameter === "object") { if (Array.isArray(parameter)) { (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); diff --git a/samples/client/petstore/typescript-axios/builds/es6-target/common.ts b/samples/client/petstore/typescript-axios/builds/es6-target/common.ts index be9b7df624..fee87ee2a1 100644 --- a/samples/client/petstore/typescript-axios/builds/es6-target/common.ts +++ b/samples/client/petstore/typescript-axios/builds/es6-target/common.ts @@ -85,6 +85,7 @@ export const setOAuthToObject = async function (object: any, name: string, scope } function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { + if (parameter == null) return; if (typeof parameter === "object") { if (Array.isArray(parameter)) { (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); diff --git a/samples/client/petstore/typescript-axios/builds/test-petstore/common.ts b/samples/client/petstore/typescript-axios/builds/test-petstore/common.ts index 9e9ca0742f..4d9401c2c9 100644 --- a/samples/client/petstore/typescript-axios/builds/test-petstore/common.ts +++ b/samples/client/petstore/typescript-axios/builds/test-petstore/common.ts @@ -85,6 +85,7 @@ export const setOAuthToObject = async function (object: any, name: string, scope } function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { + if (parameter == null) return; if (typeof parameter === "object") { if (Array.isArray(parameter)) { (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); diff --git a/samples/client/petstore/typescript-axios/builds/with-complex-headers/common.ts b/samples/client/petstore/typescript-axios/builds/with-complex-headers/common.ts index be9b7df624..fee87ee2a1 100644 --- a/samples/client/petstore/typescript-axios/builds/with-complex-headers/common.ts +++ b/samples/client/petstore/typescript-axios/builds/with-complex-headers/common.ts @@ -85,6 +85,7 @@ export const setOAuthToObject = async function (object: any, name: string, scope } function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { + if (parameter == null) return; if (typeof parameter === "object") { if (Array.isArray(parameter)) { (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); diff --git a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/common.ts b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/common.ts index 9e9ca0742f..4d9401c2c9 100644 --- a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/common.ts +++ b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/common.ts @@ -85,6 +85,7 @@ export const setOAuthToObject = async function (object: any, name: string, scope } function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { + if (parameter == null) return; if (typeof parameter === "object") { if (Array.isArray(parameter)) { (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); diff --git a/samples/client/petstore/typescript-axios/builds/with-interfaces/common.ts b/samples/client/petstore/typescript-axios/builds/with-interfaces/common.ts index be9b7df624..fee87ee2a1 100644 --- a/samples/client/petstore/typescript-axios/builds/with-interfaces/common.ts +++ b/samples/client/petstore/typescript-axios/builds/with-interfaces/common.ts @@ -85,6 +85,7 @@ export const setOAuthToObject = async function (object: any, name: string, scope } function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { + if (parameter == null) return; if (typeof parameter === "object") { if (Array.isArray(parameter)) { (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); diff --git a/samples/client/petstore/typescript-axios/builds/with-node-imports/common.ts b/samples/client/petstore/typescript-axios/builds/with-node-imports/common.ts index cbb8723f77..7ced836b0f 100644 --- a/samples/client/petstore/typescript-axios/builds/with-node-imports/common.ts +++ b/samples/client/petstore/typescript-axios/builds/with-node-imports/common.ts @@ -86,6 +86,7 @@ export const setOAuthToObject = async function (object: any, name: string, scope } function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { + if (parameter == null) return; if (typeof parameter === "object") { if (Array.isArray(parameter)) { (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/common.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/common.ts index be9b7df624..fee87ee2a1 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/common.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/common.ts @@ -85,6 +85,7 @@ export const setOAuthToObject = async function (object: any, name: string, scope } function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { + if (parameter == null) return; if (typeof parameter === "object") { if (Array.isArray(parameter)) { (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version/common.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version/common.ts index be9b7df624..fee87ee2a1 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version/common.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version/common.ts @@ -85,6 +85,7 @@ export const setOAuthToObject = async function (object: any, name: string, scope } function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { + if (parameter == null) return; if (typeof parameter === "object") { if (Array.isArray(parameter)) { (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); diff --git a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/common.ts b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/common.ts index be9b7df624..fee87ee2a1 100644 --- a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/common.ts +++ b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/common.ts @@ -85,6 +85,7 @@ export const setOAuthToObject = async function (object: any, name: string, scope } function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { + if (parameter == null) return; if (typeof parameter === "object") { if (Array.isArray(parameter)) { (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); diff --git a/samples/client/petstore/typescript-axios/builds/with-string-enums/common.ts b/samples/client/petstore/typescript-axios/builds/with-string-enums/common.ts index be9b7df624..fee87ee2a1 100644 --- a/samples/client/petstore/typescript-axios/builds/with-string-enums/common.ts +++ b/samples/client/petstore/typescript-axios/builds/with-string-enums/common.ts @@ -85,6 +85,7 @@ export const setOAuthToObject = async function (object: any, name: string, scope } function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { + if (parameter == null) return; if (typeof parameter === "object") { if (Array.isArray(parameter)) { (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); From b8b25e8ae066ce0179f0d5a21118d99f253d2fd3 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Thu, 8 Dec 2022 00:30:07 +0800 Subject: [PATCH 087/189] Fix query parameters encoding in Java apache-httpclient (#14195) * fix query parameters encoding in java apache-httpclient * rearrange tests * add new files --- .../samples-java-client-echo-api-jdk11.yaml | 1 + .../java-apache-httpclient-echo-api.yaml | 8 + .../apache-httpclient/ApiClient.mustache | 13 +- .../src/test/resources/3_0/echo_api.yaml | 60 ++ .../.github/workflows/maven.yml | 30 + .../java/apache-httpclient/.gitignore | 21 + .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 41 + .../.openapi-generator/VERSION | 1 + .../java/apache-httpclient/.travis.yml | 22 + .../echo_api/java/apache-httpclient/README.md | 136 +++ .../java/apache-httpclient/api/openapi.yaml | 196 ++++ .../java/apache-httpclient/build.gradle | 139 +++ .../echo_api/java/apache-httpclient/build.sbt | 1 + .../java/apache-httpclient/docs/Category.md | 14 + .../java/apache-httpclient/docs/PathApi.md | 77 ++ .../java/apache-httpclient/docs/Pet.md | 28 + .../java/apache-httpclient/docs/QueryApi.md | 213 ++++ .../java/apache-httpclient/docs/Tag.md | 14 + ...lodeTrueArrayStringQueryObjectParameter.md | 13 + .../java/apache-httpclient/git_push.sh | 57 ++ .../java/apache-httpclient/gradle.properties | 6 + .../gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 59536 bytes .../gradle/wrapper/gradle-wrapper.properties | 5 + .../echo_api/java/apache-httpclient/gradlew | 234 +++++ .../java/apache-httpclient/gradlew.bat | 89 ++ .../echo_api/java/apache-httpclient/pom.xml | 285 ++++++ .../java/apache-httpclient/settings.gradle | 1 + .../src/main/AndroidManifest.xml | 3 + .../org/openapitools/client/ApiClient.java | 959 ++++++++++++++++++ .../org/openapitools/client/ApiException.java | 100 ++ .../openapitools/client/Configuration.java | 39 + .../client/JavaTimeFormatter.java | 64 ++ .../java/org/openapitools/client/Pair.java | 57 ++ .../client/RFC3339DateFormat.java | 57 ++ .../client/ServerConfiguration.java | 58 ++ .../openapitools/client/ServerVariable.java | 23 + .../org/openapitools/client/StringUtil.java | 83 ++ .../org/openapitools/client/api/PathApi.java | 114 +++ .../org/openapitools/client/api/QueryApi.java | 217 ++++ .../openapitools/client/auth/ApiKeyAuth.java | 77 ++ .../client/auth/Authentication.java | 30 + .../client/auth/HttpBasicAuth.java | 53 + .../client/auth/HttpBearerAuth.java | 60 ++ .../openapitools/client/model/Category.java | 136 +++ .../org/openapitools/client/model/Pet.java | 318 ++++++ .../org/openapitools/client/model/Tag.java | 136 +++ ...deTrueArrayStringQueryObjectParameter.java | 115 +++ .../org/openapitools/client/CustomTest.java | 85 ++ .../client/EchoServerResponseParser.java | 51 + .../openapitools/client/api/PathApiTest.java | 52 + .../openapitools/client/api/QueryApiTest.java | 85 ++ .../client/model/CategoryTest.java | 56 + .../openapitools/client/model/PetTest.java | 92 ++ .../openapitools/client/model/TagTest.java | 56 + ...ueArrayStringQueryObjectParameterTest.java | 50 + .../java/native/.openapi-generator/FILES | 2 + samples/client/echo_api/java/native/README.md | 17 +- .../echo_api/java/native/api/openapi.yaml | 67 ++ .../echo_api/java/native/docs/PathApi.md | 148 +++ .../echo_api/java/native/docs/QueryApi.md | 144 +++ .../org/openapitools/client/api/PathApi.java | 164 +++ .../org/openapitools/client/api/QueryApi.java | 91 ++ .../openapitools/client/api/PathApiTest.java | 54 + .../org/openapitools/client/ApiClient.java | 13 +- 65 files changed, 5642 insertions(+), 12 deletions(-) create mode 100644 bin/configs/java-apache-httpclient-echo-api.yaml create mode 100644 samples/client/echo_api/java/apache-httpclient/.github/workflows/maven.yml create mode 100644 samples/client/echo_api/java/apache-httpclient/.gitignore create mode 100644 samples/client/echo_api/java/apache-httpclient/.openapi-generator-ignore create mode 100644 samples/client/echo_api/java/apache-httpclient/.openapi-generator/FILES create mode 100644 samples/client/echo_api/java/apache-httpclient/.openapi-generator/VERSION create mode 100644 samples/client/echo_api/java/apache-httpclient/.travis.yml create mode 100644 samples/client/echo_api/java/apache-httpclient/README.md create mode 100644 samples/client/echo_api/java/apache-httpclient/api/openapi.yaml create mode 100644 samples/client/echo_api/java/apache-httpclient/build.gradle create mode 100644 samples/client/echo_api/java/apache-httpclient/build.sbt create mode 100644 samples/client/echo_api/java/apache-httpclient/docs/Category.md create mode 100644 samples/client/echo_api/java/apache-httpclient/docs/PathApi.md create mode 100644 samples/client/echo_api/java/apache-httpclient/docs/Pet.md create mode 100644 samples/client/echo_api/java/apache-httpclient/docs/QueryApi.md create mode 100644 samples/client/echo_api/java/apache-httpclient/docs/Tag.md create mode 100644 samples/client/echo_api/java/apache-httpclient/docs/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md create mode 100644 samples/client/echo_api/java/apache-httpclient/git_push.sh create mode 100644 samples/client/echo_api/java/apache-httpclient/gradle.properties create mode 100644 samples/client/echo_api/java/apache-httpclient/gradle/wrapper/gradle-wrapper.jar create mode 100644 samples/client/echo_api/java/apache-httpclient/gradle/wrapper/gradle-wrapper.properties create mode 100644 samples/client/echo_api/java/apache-httpclient/gradlew create mode 100644 samples/client/echo_api/java/apache-httpclient/gradlew.bat create mode 100644 samples/client/echo_api/java/apache-httpclient/pom.xml create mode 100644 samples/client/echo_api/java/apache-httpclient/settings.gradle create mode 100644 samples/client/echo_api/java/apache-httpclient/src/main/AndroidManifest.xml create mode 100644 samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/ApiClient.java create mode 100644 samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/ApiException.java create mode 100644 samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/Configuration.java create mode 100644 samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/JavaTimeFormatter.java create mode 100644 samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/Pair.java create mode 100644 samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/RFC3339DateFormat.java create mode 100644 samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/ServerConfiguration.java create mode 100644 samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/ServerVariable.java create mode 100644 samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/StringUtil.java create mode 100644 samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/api/PathApi.java create mode 100644 samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/api/QueryApi.java create mode 100644 samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java create mode 100644 samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/auth/Authentication.java create mode 100644 samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java create mode 100644 samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java create mode 100644 samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/Category.java create mode 100644 samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/Pet.java create mode 100644 samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/Tag.java create mode 100644 samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.java create mode 100644 samples/client/echo_api/java/apache-httpclient/src/test/java/org/openapitools/client/CustomTest.java create mode 100644 samples/client/echo_api/java/apache-httpclient/src/test/java/org/openapitools/client/EchoServerResponseParser.java create mode 100644 samples/client/echo_api/java/apache-httpclient/src/test/java/org/openapitools/client/api/PathApiTest.java create mode 100644 samples/client/echo_api/java/apache-httpclient/src/test/java/org/openapitools/client/api/QueryApiTest.java create mode 100644 samples/client/echo_api/java/apache-httpclient/src/test/java/org/openapitools/client/model/CategoryTest.java create mode 100644 samples/client/echo_api/java/apache-httpclient/src/test/java/org/openapitools/client/model/PetTest.java create mode 100644 samples/client/echo_api/java/apache-httpclient/src/test/java/org/openapitools/client/model/TagTest.java create mode 100644 samples/client/echo_api/java/apache-httpclient/src/test/java/org/openapitools/client/model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameterTest.java create mode 100644 samples/client/echo_api/java/native/docs/PathApi.md create mode 100644 samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/PathApi.java create mode 100644 samples/client/echo_api/java/native/src/test/java/org/openapitools/client/api/PathApiTest.java diff --git a/.github/workflows/samples-java-client-echo-api-jdk11.yaml b/.github/workflows/samples-java-client-echo-api-jdk11.yaml index 6f088440bb..b165d677d5 100644 --- a/.github/workflows/samples-java-client-echo-api-jdk11.yaml +++ b/.github/workflows/samples-java-client-echo-api-jdk11.yaml @@ -16,6 +16,7 @@ jobs: matrix: sample: # clients + - samples/client/echo_api/java/apache-httpclient - samples/client/echo_api/java/native steps: - uses: actions/checkout@v3 diff --git a/bin/configs/java-apache-httpclient-echo-api.yaml b/bin/configs/java-apache-httpclient-echo-api.yaml new file mode 100644 index 0000000000..618117777c --- /dev/null +++ b/bin/configs/java-apache-httpclient-echo-api.yaml @@ -0,0 +1,8 @@ +generatorName: java +outputDir: samples/client/echo_api/java/apache-httpclient +library: apache-httpclient +inputSpec: modules/openapi-generator/src/test/resources/3_0/echo_api.yaml +templateDir: modules/openapi-generator/src/main/resources/Java +additionalProperties: + artifactId: echo-api-apache-httpclient + hideGenerationTimestamp: "true" diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/ApiClient.mustache index 499619f022..f3bc56b7a1 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/ApiClient.mustache @@ -580,9 +580,11 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { List params = new ArrayList(); // preconditions - if (name == null || name.isEmpty() || value == null || value instanceof Collection) return params; + if (name == null || name.isEmpty() || value == null || value instanceof Collection) { + return params; + } - params.add(new Pair(name, parameterToString(value))); + params.add(new Pair(name, escapeString(parameterToString(value)))); return params; } @@ -829,6 +831,10 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { if (mimeType == null || isJsonMime(mimeType)) { // Assume json if no mime type return objectMapper.readValue(entity.getContent(), valueType); + } else if ("text/plain".equalsIgnoreCase(mimeType)) { + // convert input stream to string + java.util.Scanner s = new java.util.Scanner(entity.getContent()).useDelimiter("\\A"); + return (T) (s.hasNext() ? s.next() : ""); } else { throw new ApiException( "Deserialization for content type '" + mimeType + "' not supported for type '" + valueType + "'", @@ -917,7 +923,8 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { url.append("&"); } String value = parameterToString(param.getValue()); - url.append(escapeString(param.getName())).append("=").append(escapeString(value)); + // query parameter value already escaped as part of parameterToPair + url.append(escapeString(param.getName())).append("=").append(value); } } } diff --git a/modules/openapi-generator/src/test/resources/3_0/echo_api.yaml b/modules/openapi-generator/src/test/resources/3_0/echo_api.yaml index 968f890cd3..34ef848a50 100644 --- a/modules/openapi-generator/src/test/resources/3_0/echo_api.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/echo_api.yaml @@ -26,6 +26,66 @@ info: servers: - url: http://localhost:3000/ paths: + # path parameter tests + /path/string/{path_string}/integer/{path_integer}: + get: + tags: + - path + summary: Test path parameter(s) + description: Test path parameter(s) + operationId: tests/path/string/{path_string}/integer/{path_integer} + parameters: + - in: path + name: path_string + required: true + schema: + type: string + - in: path + name: path_integer + required: true + schema: + type: integer + responses: + '200': + description: Successful operation + content: + text/plain: + schema: + type: string + # query parameter tests + /query/integer/boolean/string: + get: + tags: + - query + summary: Test query parameter(s) + description: Test query parameter(s) + operationId: test/query/integer/boolean/string + parameters: + - in: query + name: integer_query + style: form #default + explode: true #default + schema: + type: integer + - in: query + name: boolean_query + style: form #default + explode: true #default + schema: + type: boolean + - in: query + name: string_query + style: form #default + explode: true #default + schema: + type: string + responses: + '200': + description: Successful operation + content: + text/plain: + schema: + type: string /query/style_form/explode_true/array_string: get: tags: diff --git a/samples/client/echo_api/java/apache-httpclient/.github/workflows/maven.yml b/samples/client/echo_api/java/apache-httpclient/.github/workflows/maven.yml new file mode 100644 index 0000000000..aa75c11642 --- /dev/null +++ b/samples/client/echo_api/java/apache-httpclient/.github/workflows/maven.yml @@ -0,0 +1,30 @@ +# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven +# +# This file is auto-generated by OpenAPI Generator (https://openapi-generator.tech) + +name: Java CI with Maven + +on: + push: + branches: [ main, master ] + pull_request: + branches: [ main, master ] + +jobs: + build: + name: Build Echo Server API + runs-on: ubuntu-latest + strategy: + matrix: + java: [ '8' ] + steps: + - uses: actions/checkout@v2 + - name: Set up JDK + uses: actions/setup-java@v2 + with: + java-version: ${{ matrix.java }} + distribution: 'temurin' + cache: maven + - name: Build with Maven + run: mvn -B package --no-transfer-progress --file pom.xml diff --git a/samples/client/echo_api/java/apache-httpclient/.gitignore b/samples/client/echo_api/java/apache-httpclient/.gitignore new file mode 100644 index 0000000000..a530464afa --- /dev/null +++ b/samples/client/echo_api/java/apache-httpclient/.gitignore @@ -0,0 +1,21 @@ +*.class + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.ear + +# exclude jar for gradle wrapper +!gradle/wrapper/*.jar + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* + +# build files +**/target +target +.gradle +build diff --git a/samples/client/echo_api/java/apache-httpclient/.openapi-generator-ignore b/samples/client/echo_api/java/apache-httpclient/.openapi-generator-ignore new file mode 100644 index 0000000000..7484ee590a --- /dev/null +++ b/samples/client/echo_api/java/apache-httpclient/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/samples/client/echo_api/java/apache-httpclient/.openapi-generator/FILES b/samples/client/echo_api/java/apache-httpclient/.openapi-generator/FILES new file mode 100644 index 0000000000..c62abc624a --- /dev/null +++ b/samples/client/echo_api/java/apache-httpclient/.openapi-generator/FILES @@ -0,0 +1,41 @@ +.github/workflows/maven.yml +.gitignore +.travis.yml +README.md +api/openapi.yaml +build.gradle +build.sbt +docs/Category.md +docs/PathApi.md +docs/Pet.md +docs/QueryApi.md +docs/Tag.md +docs/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md +git_push.sh +gradle.properties +gradle/wrapper/gradle-wrapper.jar +gradle/wrapper/gradle-wrapper.properties +gradlew +gradlew.bat +pom.xml +settings.gradle +src/main/AndroidManifest.xml +src/main/java/org/openapitools/client/ApiClient.java +src/main/java/org/openapitools/client/ApiException.java +src/main/java/org/openapitools/client/Configuration.java +src/main/java/org/openapitools/client/JavaTimeFormatter.java +src/main/java/org/openapitools/client/Pair.java +src/main/java/org/openapitools/client/RFC3339DateFormat.java +src/main/java/org/openapitools/client/ServerConfiguration.java +src/main/java/org/openapitools/client/ServerVariable.java +src/main/java/org/openapitools/client/StringUtil.java +src/main/java/org/openapitools/client/api/PathApi.java +src/main/java/org/openapitools/client/api/QueryApi.java +src/main/java/org/openapitools/client/auth/ApiKeyAuth.java +src/main/java/org/openapitools/client/auth/Authentication.java +src/main/java/org/openapitools/client/auth/HttpBasicAuth.java +src/main/java/org/openapitools/client/auth/HttpBearerAuth.java +src/main/java/org/openapitools/client/model/Category.java +src/main/java/org/openapitools/client/model/Pet.java +src/main/java/org/openapitools/client/model/Tag.java +src/main/java/org/openapitools/client/model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.java diff --git a/samples/client/echo_api/java/apache-httpclient/.openapi-generator/VERSION b/samples/client/echo_api/java/apache-httpclient/.openapi-generator/VERSION new file mode 100644 index 0000000000..d6b4ec4aa7 --- /dev/null +++ b/samples/client/echo_api/java/apache-httpclient/.openapi-generator/VERSION @@ -0,0 +1 @@ +6.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/echo_api/java/apache-httpclient/.travis.yml b/samples/client/echo_api/java/apache-httpclient/.travis.yml new file mode 100644 index 0000000000..1b6741c083 --- /dev/null +++ b/samples/client/echo_api/java/apache-httpclient/.travis.yml @@ -0,0 +1,22 @@ +# +# Generated by OpenAPI Generator: https://openapi-generator.tech +# +# Ref: https://docs.travis-ci.com/user/languages/java/ +# +language: java +jdk: + - openjdk12 + - openjdk11 + - openjdk10 + - openjdk9 + - openjdk8 +before_install: + # ensure gradlew has proper permission + - chmod a+x ./gradlew +script: + # test using maven + #- mvn test + # test using gradle + - gradle test + # test using sbt + # - sbt test diff --git a/samples/client/echo_api/java/apache-httpclient/README.md b/samples/client/echo_api/java/apache-httpclient/README.md new file mode 100644 index 0000000000..4b27be4f2b --- /dev/null +++ b/samples/client/echo_api/java/apache-httpclient/README.md @@ -0,0 +1,136 @@ +# echo-api-apache-httpclient + +Echo Server API + +- API version: 0.1.0 + +Echo Server API + + +*Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech)* + +## Requirements + +Building the API client library requires: + +1. Java 1.8+ +2. Maven/Gradle + +## Installation + +To install the API client library to your local Maven repository, simply execute: + +```shell +mvn clean install +``` + +To deploy it to a remote Maven repository instead, configure the settings of the repository and execute: + +```shell +mvn clean deploy +``` + +Refer to the [OSSRH Guide](http://central.sonatype.org/pages/ossrh-guide.html) for more information. + +### Maven users + +Add this dependency to your project's POM: + +```xml + + org.openapitools + echo-api-apache-httpclient + 0.1.0 + compile + +``` + +### Gradle users + +Add this dependency to your project's build file: + +```groovy +compile "org.openapitools:echo-api-apache-httpclient:0.1.0" +``` + +### Others + +At first generate the JAR by executing: + +```shell +mvn clean package +``` + +Then manually install the following JARs: + +- `target/echo-api-apache-httpclient-0.1.0.jar` +- `target/lib/*.jar` + +## Getting Started + +Please follow the [installation](#installation) instruction and execute the following Java code: + +```java + +import org.openapitools.client.*; +import org.openapitools.client.auth.*; +import org.openapitools.client.model.*; +import org.openapitools.client.api.PathApi; + +public class PathApiExample { + + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + PathApi apiInstance = new PathApi(defaultClient); + String pathString = "pathString_example"; // String | + Integer pathInteger = 56; // Integer | + try { + String result = apiInstance.testsPathStringPathStringIntegerPathInteger(pathString, pathInteger); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PathApi#testsPathStringPathStringIntegerPathInteger"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} + +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://localhost:3000* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*PathApi* | [**testsPathStringPathStringIntegerPathInteger**](docs/PathApi.md#testsPathStringPathStringIntegerPathInteger) | **GET** /path/string/{path_string}/integer/{path_integer} | Test path parameter(s) +*QueryApi* | [**testQueryIntegerBooleanString**](docs/QueryApi.md#testQueryIntegerBooleanString) | **GET** /query/integer/boolean/string | Test query parameter(s) +*QueryApi* | [**testQueryStyleFormExplodeTrueArrayString**](docs/QueryApi.md#testQueryStyleFormExplodeTrueArrayString) | **GET** /query/style_form/explode_true/array_string | Test query parameter(s) +*QueryApi* | [**testQueryStyleFormExplodeTrueObject**](docs/QueryApi.md#testQueryStyleFormExplodeTrueObject) | **GET** /query/style_form/explode_true/object | Test query parameter(s) + + +## Documentation for Models + + - [Category](docs/Category.md) + - [Pet](docs/Pet.md) + - [Tag](docs/Tag.md) + - [TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter](docs/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md) + + +## Documentation for Authorization + +All endpoints do not require authorization. +Authentication schemes defined for the API: + +## Recommendation + +It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues. + +## Author + +team@openapitools.org + diff --git a/samples/client/echo_api/java/apache-httpclient/api/openapi.yaml b/samples/client/echo_api/java/apache-httpclient/api/openapi.yaml new file mode 100644 index 0000000000..b782a803da --- /dev/null +++ b/samples/client/echo_api/java/apache-httpclient/api/openapi.yaml @@ -0,0 +1,196 @@ +openapi: 3.0.3 +info: + contact: + email: team@openapitools.org + description: Echo Server API + license: + name: Apache 2.0 + url: http://www.apache.org/licenses/LICENSE-2.0.html + title: Echo Server API + version: 0.1.0 +servers: +- url: http://localhost:3000/ +paths: + /path/string/{path_string}/integer/{path_integer}: + get: + description: Test path parameter(s) + operationId: "tests/path/string/{path_string}/integer/{path_integer}" + parameters: + - explode: false + in: path + name: path_string + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: path_integer + required: true + schema: + type: integer + style: simple + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test path parameter(s) + tags: + - path + x-accepts: text/plain + /query/integer/boolean/string: + get: + description: Test query parameter(s) + operationId: test/query/integer/boolean/string + parameters: + - explode: true + in: query + name: integer_query + required: false + schema: + type: integer + style: form + - explode: true + in: query + name: boolean_query + required: false + schema: + type: boolean + style: form + - explode: true + in: query + name: string_query + required: false + schema: + type: string + style: form + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test query parameter(s) + tags: + - query + x-accepts: text/plain + /query/style_form/explode_true/array_string: + get: + description: Test query parameter(s) + operationId: test/query/style_form/explode_true/array_string + parameters: + - explode: true + in: query + name: query_object + required: false + schema: + $ref: '#/components/schemas/test_query_style_form_explode_true_array_string_query_object_parameter' + style: form + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test query parameter(s) + tags: + - query + x-accepts: text/plain + /query/style_form/explode_true/object: + get: + description: Test query parameter(s) + operationId: test/query/style_form/explode_true/object + parameters: + - explode: true + in: query + name: query_object + required: false + schema: + $ref: '#/components/schemas/Pet' + style: form + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test query parameter(s) + tags: + - query + x-accepts: text/plain +components: + schemas: + Category: + properties: + id: + example: 1 + format: int64 + type: integer + name: + example: Dogs + type: string + type: object + xml: + name: category + Tag: + properties: + id: + format: int64 + type: integer + name: + type: string + type: object + xml: + name: tag + Pet: + properties: + id: + example: 10 + format: int64 + type: integer + name: + example: doggie + type: string + category: + $ref: '#/components/schemas/Category' + photoUrls: + items: + type: string + xml: + name: photoUrl + type: array + xml: + wrapped: true + tags: + items: + $ref: '#/components/schemas/Tag' + type: array + xml: + wrapped: true + status: + description: pet status in the store + enum: + - available + - pending + - sold + type: string + required: + - name + - photoUrls + type: object + xml: + name: pet + test_query_style_form_explode_true_array_string_query_object_parameter: + properties: + values: + items: + type: string + type: array + type: object + diff --git a/samples/client/echo_api/java/apache-httpclient/build.gradle b/samples/client/echo_api/java/apache-httpclient/build.gradle new file mode 100644 index 0000000000..0f232470e1 --- /dev/null +++ b/samples/client/echo_api/java/apache-httpclient/build.gradle @@ -0,0 +1,139 @@ +apply plugin: 'idea' +apply plugin: 'eclipse' + +group = 'org.openapitools' +version = '0.1.0' + +buildscript { + repositories { + mavenCentral() + } + dependencies { + classpath 'com.android.tools.build:gradle:2.3.+' + classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' + } +} + +repositories { + mavenCentral() +} + +if(hasProperty('target') && target == 'android') { + + apply plugin: 'com.android.library' + apply plugin: 'com.github.dcendents.android-maven' + + android { + compileSdkVersion 25 + buildToolsVersion '25.0.2' + defaultConfig { + minSdkVersion 14 + targetSdkVersion 25 + } + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + // Rename the aar correctly + libraryVariants.all { variant -> + variant.outputs.each { output -> + def outputFile = output.outputFile + if (outputFile != null && outputFile.name.endsWith('.aar')) { + def fileName = "${project.name}-${variant.baseName}-${version}.aar" + output.outputFile = new File(outputFile.parent, fileName) + } + } + } + + dependencies { + provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + } + } + + 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-publish' + + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + + publishing { + publications { + maven(MavenPublication) { + artifactId = 'echo-api-apache-httpclient' + + from components.java + } + } + } + + task execute(type:JavaExec) { + main = System.getProperty('mainClass') + classpath = sourceSets.main.runtimeClasspath + } + + task sourcesJar(type: Jar, dependsOn: classes) { + classifier = 'sources' + from sourceSets.main.allSource + } + + task javadocJar(type: Jar, dependsOn: javadoc) { + classifier = 'javadoc' + from javadoc.destinationDir + } + + artifacts { + archives sourcesJar + archives javadocJar + } +} + +ext { + swagger_annotations_version = "1.6.6" + jackson_version = "2.14.1" + jackson_databind_version = "2.14.1" + jackson_databind_nullable_version = "0.2.4" + jakarta_annotation_version = "1.3.5" + httpclient_version = "4.5.13" + jodatime_version = "2.9.9" + junit_version = "4.13.2" +} + +dependencies { + implementation "io.swagger:swagger-annotations:$swagger_annotations_version" + implementation "com.google.code.findbugs:jsr305:3.0.2" + implementation "org.apache.httpcomponents:httpclient:$httpclient_version" + implementation "org.apache.httpcomponents:httpmime:$httpclient_version" + implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version" + implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" + implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" + implementation "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version" + implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" + implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + testImplementation "junit:junit:$junit_version" +} diff --git a/samples/client/echo_api/java/apache-httpclient/build.sbt b/samples/client/echo_api/java/apache-httpclient/build.sbt new file mode 100644 index 0000000000..464090415c --- /dev/null +++ b/samples/client/echo_api/java/apache-httpclient/build.sbt @@ -0,0 +1 @@ +# TODO diff --git a/samples/client/echo_api/java/apache-httpclient/docs/Category.md b/samples/client/echo_api/java/apache-httpclient/docs/Category.md new file mode 100644 index 0000000000..7289ebf585 --- /dev/null +++ b/samples/client/echo_api/java/apache-httpclient/docs/Category.md @@ -0,0 +1,14 @@ + + +# Category + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | [optional] | + + + diff --git a/samples/client/echo_api/java/apache-httpclient/docs/PathApi.md b/samples/client/echo_api/java/apache-httpclient/docs/PathApi.md new file mode 100644 index 0000000000..a4122aa3d4 --- /dev/null +++ b/samples/client/echo_api/java/apache-httpclient/docs/PathApi.md @@ -0,0 +1,77 @@ +# PathApi + +All URIs are relative to *http://localhost:3000* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**testsPathStringPathStringIntegerPathInteger**](PathApi.md#testsPathStringPathStringIntegerPathInteger) | **GET** /path/string/{path_string}/integer/{path_integer} | Test path parameter(s) | + + + +## testsPathStringPathStringIntegerPathInteger + +> String testsPathStringPathStringIntegerPathInteger(pathString, pathInteger) + +Test path parameter(s) + +Test path parameter(s) + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PathApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + PathApi apiInstance = new PathApi(defaultClient); + String pathString = "pathString_example"; // String | + Integer pathInteger = 56; // Integer | + try { + String result = apiInstance.testsPathStringPathStringIntegerPathInteger(pathString, pathInteger); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PathApi#testsPathStringPathStringIntegerPathInteger"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pathString** | **String**| | | +| **pathInteger** | **Integer**| | | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + diff --git a/samples/client/echo_api/java/apache-httpclient/docs/Pet.md b/samples/client/echo_api/java/apache-httpclient/docs/Pet.md new file mode 100644 index 0000000000..82aa8a25ed --- /dev/null +++ b/samples/client/echo_api/java/apache-httpclient/docs/Pet.md @@ -0,0 +1,28 @@ + + +# Pet + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | | +|**category** | [**Category**](Category.md) | | [optional] | +|**photoUrls** | **List<String>** | | | +|**tags** | [**List<Tag>**](Tag.md) | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] | + + + +## Enum: StatusEnum + +| Name | Value | +|---- | -----| +| AVAILABLE | "available" | +| PENDING | "pending" | +| SOLD | "sold" | + + + diff --git a/samples/client/echo_api/java/apache-httpclient/docs/QueryApi.md b/samples/client/echo_api/java/apache-httpclient/docs/QueryApi.md new file mode 100644 index 0000000000..45183a18b4 --- /dev/null +++ b/samples/client/echo_api/java/apache-httpclient/docs/QueryApi.md @@ -0,0 +1,213 @@ +# QueryApi + +All URIs are relative to *http://localhost:3000* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**testQueryIntegerBooleanString**](QueryApi.md#testQueryIntegerBooleanString) | **GET** /query/integer/boolean/string | Test query parameter(s) | +| [**testQueryStyleFormExplodeTrueArrayString**](QueryApi.md#testQueryStyleFormExplodeTrueArrayString) | **GET** /query/style_form/explode_true/array_string | Test query parameter(s) | +| [**testQueryStyleFormExplodeTrueObject**](QueryApi.md#testQueryStyleFormExplodeTrueObject) | **GET** /query/style_form/explode_true/object | Test query parameter(s) | + + + +## testQueryIntegerBooleanString + +> String testQueryIntegerBooleanString(integerQuery, booleanQuery, stringQuery) + +Test query parameter(s) + +Test query parameter(s) + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.QueryApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + QueryApi apiInstance = new QueryApi(defaultClient); + Integer integerQuery = 56; // Integer | + Boolean booleanQuery = true; // Boolean | + String stringQuery = "stringQuery_example"; // String | + try { + String result = apiInstance.testQueryIntegerBooleanString(integerQuery, booleanQuery, stringQuery); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling QueryApi#testQueryIntegerBooleanString"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **integerQuery** | **Integer**| | [optional] | +| **booleanQuery** | **Boolean**| | [optional] | +| **stringQuery** | **String**| | [optional] | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + + +## testQueryStyleFormExplodeTrueArrayString + +> String testQueryStyleFormExplodeTrueArrayString(queryObject) + +Test query parameter(s) + +Test query parameter(s) + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.QueryApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + QueryApi apiInstance = new QueryApi(defaultClient); + TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter queryObject = new HashMap(); // TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter | + try { + String result = apiInstance.testQueryStyleFormExplodeTrueArrayString(queryObject); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling QueryApi#testQueryStyleFormExplodeTrueArrayString"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queryObject** | [**TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter**](.md)| | [optional] | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + + +## testQueryStyleFormExplodeTrueObject + +> String testQueryStyleFormExplodeTrueObject(queryObject) + +Test query parameter(s) + +Test query parameter(s) + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.QueryApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + QueryApi apiInstance = new QueryApi(defaultClient); + Pet queryObject = new HashMap(); // Pet | + try { + String result = apiInstance.testQueryStyleFormExplodeTrueObject(queryObject); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling QueryApi#testQueryStyleFormExplodeTrueObject"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queryObject** | [**Pet**](.md)| | [optional] | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + diff --git a/samples/client/echo_api/java/apache-httpclient/docs/Tag.md b/samples/client/echo_api/java/apache-httpclient/docs/Tag.md new file mode 100644 index 0000000000..5088b2dd1c --- /dev/null +++ b/samples/client/echo_api/java/apache-httpclient/docs/Tag.md @@ -0,0 +1,14 @@ + + +# Tag + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | | [optional] | +|**name** | **String** | | [optional] | + + + diff --git a/samples/client/echo_api/java/apache-httpclient/docs/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md b/samples/client/echo_api/java/apache-httpclient/docs/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md new file mode 100644 index 0000000000..9235e80fb8 --- /dev/null +++ b/samples/client/echo_api/java/apache-httpclient/docs/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md @@ -0,0 +1,13 @@ + + +# TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**values** | **List<String>** | | [optional] | + + + diff --git a/samples/client/echo_api/java/apache-httpclient/git_push.sh b/samples/client/echo_api/java/apache-httpclient/git_push.sh new file mode 100644 index 0000000000..f53a75d4fa --- /dev/null +++ b/samples/client/echo_api/java/apache-httpclient/git_push.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/samples/client/echo_api/java/apache-httpclient/gradle.properties b/samples/client/echo_api/java/apache-httpclient/gradle.properties new file mode 100644 index 0000000000..a340857827 --- /dev/null +++ b/samples/client/echo_api/java/apache-httpclient/gradle.properties @@ -0,0 +1,6 @@ +# This file is automatically generated by OpenAPI Generator (https://github.com/openAPITools/openapi-generator). +# To include other gradle properties as part of the code generation process, please use the `gradleProperties` option. +# +# Gradle properties reference: https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_configuration_properties +# For example, uncomment below to build for Android +#target = android diff --git a/samples/client/echo_api/java/apache-httpclient/gradle/wrapper/gradle-wrapper.jar b/samples/client/echo_api/java/apache-httpclient/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000000000000000000000000000000000000..7454180f2ae8848c63b8b4dea2cb829da983f2fa GIT binary patch literal 59536 zcma&NbC71ylI~qywr$(CZQJHswz}-9F59+k+g;UV+cs{`J?GrGXYR~=-ydruB3JCa zB64N^cILAcWk5iofq)<(fq;O7{th4@;QxID0)qN`mJ?GIqLY#rX8-|G{5M0pdVW5^ zzXk$-2kQTAC?_N@B`&6-N-rmVFE=$QD?>*=4<|!MJu@}isLc4AW#{m2if&A5T5g&~ ziuMQeS*U5sL6J698wOd)K@oK@1{peP5&Esut<#VH^u)gp`9H4)`uE!2$>RTctN+^u z=ASkePDZA-X8)rp%D;p*~P?*a_=*Kwc<^>QSH|^<0>o37lt^+Mj1;4YvJ(JR-Y+?%Nu}JAYj5 z_Qc5%Ao#F?q32i?ZaN2OSNhWL;2oDEw_({7ZbgUjna!Fqn3NzLM@-EWFPZVmc>(fZ z0&bF-Ch#p9C{YJT9Rcr3+Y_uR^At1^BxZ#eo>$PLJF3=;t_$2|t+_6gg5(j{TmjYU zK12c&lE?Eh+2u2&6Gf*IdKS&6?rYbSEKBN!rv{YCm|Rt=UlPcW9j`0o6{66#y5t9C zruFA2iKd=H%jHf%ypOkxLnO8#H}#Zt{8p!oi6)7#NqoF({t6|J^?1e*oxqng9Q2Cc zg%5Vu!em)}Yuj?kaP!D?b?(C*w!1;>R=j90+RTkyEXz+9CufZ$C^umX^+4|JYaO<5 zmIM3#dv`DGM;@F6;(t!WngZSYzHx?9&$xEF70D1BvfVj<%+b#)vz)2iLCrTeYzUcL z(OBnNoG6Le%M+@2oo)&jdOg=iCszzv59e zDRCeaX8l1hC=8LbBt|k5?CXgep=3r9BXx1uR8!p%Z|0+4Xro=xi0G!e{c4U~1j6!) zH6adq0}#l{%*1U(Cb%4AJ}VLWKBPi0MoKFaQH6x?^hQ!6em@993xdtS%_dmevzeNl z(o?YlOI=jl(`L9^ z0O+H9k$_@`6L13eTT8ci-V0ljDMD|0ifUw|Q-Hep$xYj0hTO@0%IS^TD4b4n6EKDG z??uM;MEx`s98KYN(K0>c!C3HZdZ{+_53DO%9k5W%pr6yJusQAv_;IA}925Y%;+!tY z%2k!YQmLLOr{rF~!s<3-WEUs)`ix_mSU|cNRBIWxOox_Yb7Z=~Q45ZNe*u|m^|)d* zog=i>`=bTe!|;8F+#H>EjIMcgWcG2ORD`w0WD;YZAy5#s{65~qfI6o$+Ty&-hyMyJ z3Ra~t>R!p=5ZpxA;QkDAoPi4sYOP6>LT+}{xp}tk+<0k^CKCFdNYG(Es>p0gqD)jP zWOeX5G;9(m@?GOG7g;e74i_|SmE?`B2i;sLYwRWKLy0RLW!Hx`=!LH3&k=FuCsM=9M4|GqzA)anEHfxkB z?2iK-u(DC_T1};KaUT@3nP~LEcENT^UgPvp!QC@Dw&PVAhaEYrPey{nkcn(ro|r7XUz z%#(=$7D8uP_uU-oPHhd>>^adbCSQetgSG`e$U|7mr!`|bU0aHl_cmL)na-5x1#OsVE#m*+k84Y^+UMeSAa zbrVZHU=mFwXEaGHtXQq`2ZtjfS!B2H{5A<3(nb-6ARVV8kEmOkx6D2x7~-6hl;*-*}2Xz;J#a8Wn;_B5=m zl3dY;%krf?i-Ok^Pal-}4F`{F@TYPTwTEhxpZK5WCpfD^UmM_iYPe}wpE!Djai6_{ z*pGO=WB47#Xjb7!n2Ma)s^yeR*1rTxp`Mt4sfA+`HwZf%!7ZqGosPkw69`Ix5Ku6G z@Pa;pjzV&dn{M=QDx89t?p?d9gna*}jBly*#1!6}5K<*xDPJ{wv4& zM$17DFd~L*Te3A%yD;Dp9UGWTjRxAvMu!j^Tbc}2v~q^59d4bz zvu#!IJCy(BcWTc`;v$9tH;J%oiSJ_i7s;2`JXZF+qd4C)vY!hyCtl)sJIC{ebI*0> z@x>;EzyBv>AI-~{D6l6{ST=em*U( z(r$nuXY-#CCi^8Z2#v#UXOt`dbYN1z5jzNF2 z411?w)whZrfA20;nl&C1Gi+gk<`JSm+{|*2o<< zqM#@z_D`Cn|0H^9$|Tah)0M_X4c37|KQ*PmoT@%xHc3L1ZY6(p(sNXHa&49Frzto& zR`c~ClHpE~4Z=uKa5S(-?M8EJ$zt0&fJk~p$M#fGN1-y$7!37hld`Uw>Urri(DxLa;=#rK0g4J)pXMC zxzraOVw1+kNWpi#P=6(qxf`zSdUC?D$i`8ZI@F>k6k zz21?d+dw7b&i*>Kv5L(LH-?J%@WnqT7j#qZ9B>|Zl+=> z^U-pV@1y_ptHo4hl^cPRWewbLQ#g6XYQ@EkiP z;(=SU!yhjHp%1&MsU`FV1Z_#K1&(|5n(7IHbx&gG28HNT)*~-BQi372@|->2Aw5It z0CBpUcMA*QvsPy)#lr!lIdCi@1k4V2m!NH)%Px(vu-r(Q)HYc!p zJ^$|)j^E#q#QOgcb^pd74^JUi7fUmMiNP_o*lvx*q%_odv49Dsv$NV;6J z9GOXKomA{2Pb{w}&+yHtH?IkJJu~}Z?{Uk++2mB8zyvh*xhHKE``99>y#TdD z&(MH^^JHf;g(Tbb^&8P*;_i*2&fS$7${3WJtV7K&&(MBV2~)2KB3%cWg#1!VE~k#C z!;A;?p$s{ihyojEZz+$I1)L}&G~ml=udD9qh>Tu(ylv)?YcJT3ihapi!zgPtWb*CP zlLLJSRCj-^w?@;RU9aL2zDZY1`I3d<&OMuW=c3$o0#STpv_p3b9Wtbql>w^bBi~u4 z3D8KyF?YE?=HcKk!xcp@Cigvzy=lnFgc^9c%(^F22BWYNAYRSho@~*~S)4%AhEttv zvq>7X!!EWKG?mOd9&n>vvH1p4VzE?HCuxT-u+F&mnsfDI^}*-d00-KAauEaXqg3k@ zy#)MGX!X;&3&0s}F3q40ZmVM$(H3CLfpdL?hB6nVqMxX)q=1b}o_PG%r~hZ4gUfSp zOH4qlEOW4OMUc)_m)fMR_rl^pCfXc{$fQbI*E&mV77}kRF z&{<06AJyJ!e863o-V>FA1a9Eemx6>^F$~9ppt()ZbPGfg_NdRXBWoZnDy2;#ODgf! zgl?iOcF7Meo|{AF>KDwTgYrJLb$L2%%BEtO>T$C?|9bAB&}s;gI?lY#^tttY&hfr# zKhC+&b-rpg_?~uVK%S@mQleU#_xCsvIPK*<`E0fHE1&!J7!xD#IB|SSPW6-PyuqGn3^M^Rz%WT{e?OI^svARX&SAdU77V(C~ zM$H{Kg59op{<|8ry9ecfP%=kFm(-!W&?U0@<%z*+!*<e0XesMxRFu9QnGqun6R_%T+B%&9Dtk?*d$Q zb~>84jEAPi@&F@3wAa^Lzc(AJz5gsfZ7J53;@D<;Klpl?sK&u@gie`~vTsbOE~Cd4 z%kr56mI|#b(Jk&;p6plVwmNB0H@0SmgdmjIn5Ne@)}7Vty(yb2t3ev@22AE^s!KaN zyQ>j+F3w=wnx7w@FVCRe+`vUH)3gW%_72fxzqX!S&!dchdkRiHbXW1FMrIIBwjsai8`CB2r4mAbwp%rrO>3B$Zw;9=%fXI9B{d(UzVap7u z6piC-FQ)>}VOEuPpuqznpY`hN4dGa_1Xz9rVg(;H$5Te^F0dDv*gz9JS<|>>U0J^# z6)(4ICh+N_Q`Ft0hF|3fSHs*?a=XC;e`sJaU9&d>X4l?1W=|fr!5ShD|nv$GK;j46@BV6+{oRbWfqOBRb!ir88XD*SbC(LF}I1h#6@dvK%Toe%@ zhDyG$93H8Eu&gCYddP58iF3oQH*zLbNI;rN@E{T9%A8!=v#JLxKyUe}e}BJpB{~uN zqgxRgo0*-@-iaHPV8bTOH(rS(huwK1Xg0u+e!`(Irzu@Bld&s5&bWgVc@m7;JgELd zimVs`>vQ}B_1(2#rv#N9O`fJpVfPc7V2nv34PC);Dzbb;p!6pqHzvy?2pD&1NE)?A zt(t-ucqy@wn9`^MN5apa7K|L=9>ISC>xoc#>{@e}m#YAAa1*8-RUMKwbm|;5p>T`Z zNf*ph@tnF{gmDa3uwwN(g=`Rh)4!&)^oOy@VJaK4lMT&5#YbXkl`q?<*XtsqD z9PRK6bqb)fJw0g-^a@nu`^?71k|m3RPRjt;pIkCo1{*pdqbVs-Yl>4E>3fZx3Sv44grW=*qdSoiZ9?X0wWyO4`yDHh2E!9I!ZFi zVL8|VtW38}BOJHW(Ax#KL_KQzarbuE{(%TA)AY)@tY4%A%P%SqIU~8~-Lp3qY;U-} z`h_Gel7;K1h}7$_5ZZT0&%$Lxxr-<89V&&TCsu}LL#!xpQ1O31jaa{U34~^le*Y%L za?7$>Jk^k^pS^_M&cDs}NgXlR>16AHkSK-4TRaJSh#h&p!-!vQY%f+bmn6x`4fwTp z$727L^y`~!exvmE^W&#@uY!NxJi`g!i#(++!)?iJ(1)2Wk;RN zFK&O4eTkP$Xn~4bB|q8y(btx$R#D`O@epi4ofcETrx!IM(kWNEe42Qh(8*KqfP(c0 zouBl6>Fc_zM+V;F3znbo{x#%!?mH3`_ANJ?y7ppxS@glg#S9^MXu|FM&ynpz3o&Qh z2ujAHLF3($pH}0jXQsa#?t--TnF1P73b?4`KeJ9^qK-USHE)4!IYgMn-7z|=ALF5SNGkrtPG@Y~niUQV2?g$vzJN3nZ{7;HZHzWAeQ;5P|@Tl3YHpyznGG4-f4=XflwSJY+58-+wf?~Fg@1p1wkzuu-RF3j2JX37SQUc? zQ4v%`V8z9ZVZVqS8h|@@RpD?n0W<=hk=3Cf8R?d^9YK&e9ZybFY%jdnA)PeHvtBe- zhMLD+SSteHBq*q)d6x{)s1UrsO!byyLS$58WK;sqip$Mk{l)Y(_6hEIBsIjCr5t>( z7CdKUrJTrW%qZ#1z^n*Lb8#VdfzPw~OIL76aC+Rhr<~;4Tl!sw?Rj6hXj4XWa#6Tp z@)kJ~qOV)^Rh*-?aG>ic2*NlC2M7&LUzc9RT6WM%Cpe78`iAowe!>(T0jo&ivn8-7 zs{Qa@cGy$rE-3AY0V(l8wjI^uB8Lchj@?L}fYal^>T9z;8juH@?rG&g-t+R2dVDBe zq!K%{e-rT5jX19`(bP23LUN4+_zh2KD~EAYzhpEO3MUG8@}uBHH@4J zd`>_(K4q&>*k82(dDuC)X6JuPrBBubOg7qZ{?x!r@{%0);*`h*^F|%o?&1wX?Wr4b z1~&cy#PUuES{C#xJ84!z<1tp9sfrR(i%Tu^jnXy;4`Xk;AQCdFC@?V%|; zySdC7qS|uQRcH}EFZH%mMB~7gi}a0utE}ZE_}8PQH8f;H%PN41Cb9R%w5Oi5el^fd z$n{3SqLCnrF##x?4sa^r!O$7NX!}&}V;0ZGQ&K&i%6$3C_dR%I7%gdQ;KT6YZiQrW zk%q<74oVBV>@}CvJ4Wj!d^?#Zwq(b$E1ze4$99DuNg?6t9H}k_|D7KWD7i0-g*EO7 z;5{hSIYE4DMOK3H%|f5Edx+S0VI0Yw!tsaRS2&Il2)ea^8R5TG72BrJue|f_{2UHa z@w;^c|K3da#$TB0P3;MPlF7RuQeXT$ zS<<|C0OF(k)>fr&wOB=gP8!Qm>F41u;3esv7_0l%QHt(~+n; zf!G6%hp;Gfa9L9=AceiZs~tK+Tf*Wof=4!u{nIO90jH@iS0l+#%8=~%ASzFv7zqSB^?!@N7)kp0t&tCGLmzXSRMRyxCmCYUD2!B`? zhs$4%KO~m=VFk3Buv9osha{v+mAEq=ik3RdK@;WWTV_g&-$U4IM{1IhGX{pAu%Z&H zFfwCpUsX%RKg);B@7OUzZ{Hn{q6Vv!3#8fAg!P$IEx<0vAx;GU%}0{VIsmFBPq_mb zpe^BChDK>sc-WLKl<6 zwbW|e&d&dv9Wu0goueyu>(JyPx1mz0v4E?cJjFuKF71Q1)AL8jHO$!fYT3(;U3Re* zPPOe%*O+@JYt1bW`!W_1!mN&=w3G9ru1XsmwfS~BJ))PhD(+_J_^N6j)sx5VwbWK| zwRyC?W<`pOCY)b#AS?rluxuuGf-AJ=D!M36l{ua?@SJ5>e!IBr3CXIxWw5xUZ@Xrw z_R@%?{>d%Ld4p}nEsiA@v*nc6Ah!MUs?GA7e5Q5lPpp0@`%5xY$C;{%rz24$;vR#* zBP=a{)K#CwIY%p} zXVdxTQ^HS@O&~eIftU+Qt^~(DGxrdi3k}DdT^I7Iy5SMOp$QuD8s;+93YQ!OY{eB24%xY7ml@|M7I(Nb@K_-?F;2?et|CKkuZK_>+>Lvg!>JE~wN`BI|_h6$qi!P)+K-1Hh(1;a`os z55)4Q{oJiA(lQM#;w#Ta%T0jDNXIPM_bgESMCDEg6rM33anEr}=|Fn6)|jBP6Y}u{ zv9@%7*#RI9;fv;Yii5CI+KrRdr0DKh=L>)eO4q$1zmcSmglsV`*N(x=&Wx`*v!!hn6X-l0 zP_m;X??O(skcj+oS$cIdKhfT%ABAzz3w^la-Ucw?yBPEC+=Pe_vU8nd-HV5YX6X8r zZih&j^eLU=%*;VzhUyoLF;#8QsEfmByk+Y~caBqSvQaaWf2a{JKB9B>V&r?l^rXaC z8)6AdR@Qy_BxQrE2Fk?ewD!SwLuMj@&d_n5RZFf7=>O>hzVE*seW3U?_p|R^CfoY`?|#x9)-*yjv#lo&zP=uI`M?J zbzC<^3x7GfXA4{FZ72{PE*-mNHyy59Q;kYG@BB~NhTd6pm2Oj=_ zizmD?MKVRkT^KmXuhsk?eRQllPo2Ubk=uCKiZ&u3Xjj~<(!M94c)Tez@9M1Gfs5JV z->@II)CDJOXTtPrQudNjE}Eltbjq>6KiwAwqvAKd^|g!exgLG3;wP+#mZYr`cy3#39e653d=jrR-ulW|h#ddHu(m9mFoW~2yE zz5?dB%6vF}+`-&-W8vy^OCxm3_{02royjvmwjlp+eQDzFVEUiyO#gLv%QdDSI#3W* z?3!lL8clTaNo-DVJw@ynq?q!%6hTQi35&^>P85G$TqNt78%9_sSJt2RThO|JzM$iL zg|wjxdMC2|Icc5rX*qPL(coL!u>-xxz-rFiC!6hD1IR%|HSRsV3>Kq~&vJ=s3M5y8SG%YBQ|{^l#LGlg!D?E>2yR*eV%9m$_J6VGQ~AIh&P$_aFbh zULr0Z$QE!QpkP=aAeR4ny<#3Fwyw@rZf4?Ewq`;mCVv}xaz+3ni+}a=k~P+yaWt^L z@w67!DqVf7D%7XtXX5xBW;Co|HvQ8WR1k?r2cZD%U;2$bsM%u8{JUJ5Z0k= zZJARv^vFkmWx15CB=rb=D4${+#DVqy5$C%bf`!T0+epLJLnh1jwCdb*zuCL}eEFvE z{rO1%gxg>1!W(I!owu*mJZ0@6FM(?C+d*CeceZRW_4id*D9p5nzMY&{mWqrJomjIZ z97ZNnZ3_%Hx8dn;H>p8m7F#^2;T%yZ3H;a&N7tm=Lvs&lgJLW{V1@h&6Vy~!+Ffbb zv(n3+v)_D$}dqd!2>Y2B)#<+o}LH#%ogGi2-?xRIH)1!SD)u-L65B&bsJTC=LiaF+YOCif2dUX6uAA|#+vNR z>U+KQekVGon)Yi<93(d!(yw1h3&X0N(PxN2{%vn}cnV?rYw z$N^}_o!XUB!mckL`yO1rnUaI4wrOeQ(+&k?2mi47hzxSD`N#-byqd1IhEoh!PGq>t z_MRy{5B0eKY>;Ao3z$RUU7U+i?iX^&r739F)itdrTpAi-NN0=?^m%?{A9Ly2pVv>Lqs6moTP?T2-AHqFD-o_ znVr|7OAS#AEH}h8SRPQ@NGG47dO}l=t07__+iK8nHw^(AHx&Wb<%jPc$$jl6_p(b$ z)!pi(0fQodCHfM)KMEMUR&UID>}m^(!{C^U7sBDOA)$VThRCI0_+2=( zV8mMq0R(#z;C|7$m>$>`tX+T|xGt(+Y48@ZYu#z;0pCgYgmMVbFb!$?%yhZqP_nhn zy4<#3P1oQ#2b51NU1mGnHP$cf0j-YOgAA}A$QoL6JVLcmExs(kU{4z;PBHJD%_=0F z>+sQV`mzijSIT7xn%PiDKHOujX;n|M&qr1T@rOxTdxtZ!&u&3HHFLYD5$RLQ=heur zb>+AFokUVQeJy-#LP*^)spt{mb@Mqe=A~-4p0b+Bt|pZ+@CY+%x}9f}izU5;4&QFE zO1bhg&A4uC1)Zb67kuowWY4xbo&J=%yoXlFB)&$d*-}kjBu|w!^zbD1YPc0-#XTJr z)pm2RDy%J3jlqSMq|o%xGS$bPwn4AqitC6&e?pqWcjWPt{3I{>CBy;hg0Umh#c;hU3RhCUX=8aR>rmd` z7Orw(5tcM{|-^J?ZAA9KP|)X6n9$-kvr#j5YDecTM6n z&07(nD^qb8hpF0B^z^pQ*%5ePYkv&FabrlI61ntiVp!!C8y^}|<2xgAd#FY=8b*y( zuQOuvy2`Ii^`VBNJB&R!0{hABYX55ooCAJSSevl4RPqEGb)iy_0H}v@vFwFzD%>#I>)3PsouQ+_Kkbqy*kKdHdfkN7NBcq%V{x^fSxgXpg7$bF& zj!6AQbDY(1u#1_A#1UO9AxiZaCVN2F0wGXdY*g@x$ByvUA?ePdide0dmr#}udE%K| z3*k}Vv2Ew2u1FXBaVA6aerI36R&rzEZeDDCl5!t0J=ug6kuNZzH>3i_VN`%BsaVB3 zQYw|Xub_SGf{)F{$ZX5`Jc!X!;eybjP+o$I{Z^Hsj@D=E{MnnL+TbC@HEU2DjG{3-LDGIbq()U87x4eS;JXnSh;lRlJ z>EL3D>wHt-+wTjQF$fGyDO$>d+(fq@bPpLBS~xA~R=3JPbS{tzN(u~m#Po!?H;IYv zE;?8%^vle|%#oux(Lj!YzBKv+Fd}*Ur-dCBoX*t{KeNM*n~ZPYJ4NNKkI^MFbz9!v z4(Bvm*Kc!-$%VFEewYJKz-CQN{`2}KX4*CeJEs+Q(!kI%hN1!1P6iOq?ovz}X0IOi z)YfWpwW@pK08^69#wSyCZkX9?uZD?C^@rw^Y?gLS_xmFKkooyx$*^5#cPqntNTtSG zlP>XLMj2!VF^0k#ole7`-c~*~+_T5ls?x4)ah(j8vo_ zwb%S8qoaZqY0-$ZI+ViIA_1~~rAH7K_+yFS{0rT@eQtTAdz#8E5VpwnW!zJ_^{Utv zlW5Iar3V5t&H4D6A=>?mq;G92;1cg9a2sf;gY9pJDVKn$DYdQlvfXq}zz8#LyPGq@ z+`YUMD;^-6w&r-82JL7mA8&M~Pj@aK!m{0+^v<|t%APYf7`}jGEhdYLqsHW-Le9TL z_hZZ1gbrz7$f9^fAzVIP30^KIz!!#+DRLL+qMszvI_BpOSmjtl$hh;&UeM{ER@INV zcI}VbiVTPoN|iSna@=7XkP&-4#06C};8ajbxJ4Gcq8(vWv4*&X8bM^T$mBk75Q92j z1v&%a;OSKc8EIrodmIiw$lOES2hzGDcjjB`kEDfJe{r}yE6`eZL zEB`9u>Cl0IsQ+t}`-cx}{6jqcANucqIB>Qmga_&<+80E2Q|VHHQ$YlAt{6`Qu`HA3 z03s0-sSlwbvgi&_R8s={6<~M^pGvBNjKOa>tWenzS8s zR>L7R5aZ=mSU{f?ib4Grx$AeFvtO5N|D>9#)ChH#Fny2maHWHOf2G=#<9Myot#+4u zWVa6d^Vseq_0=#AYS(-m$Lp;*8nC_6jXIjEM`omUmtH@QDs3|G)i4j*#_?#UYVZvJ z?YjT-?!4Q{BNun;dKBWLEw2C-VeAz`%?A>p;)PL}TAZn5j~HK>v1W&anteARlE+~+ zj>c(F;?qO3pXBb|#OZdQnm<4xWmn~;DR5SDMxt0UK_F^&eD|KZ=O;tO3vy4@4h^;2 zUL~-z`-P1aOe?|ZC1BgVsL)2^J-&vIFI%q@40w0{jjEfeVl)i9(~bt2z#2Vm)p`V_ z1;6$Ae7=YXk#=Qkd24Y23t&GvRxaOoad~NbJ+6pxqzJ>FY#Td7@`N5xp!n(c!=RE& z&<<@^a$_Ys8jqz4|5Nk#FY$~|FPC0`*a5HH!|Gssa9=~66&xG9)|=pOOJ2KE5|YrR zw!w6K2aC=J$t?L-;}5hn6mHd%hC;p8P|Dgh6D>hGnXPgi;6r+eA=?f72y9(Cf_ho{ zH6#)uD&R=73^$$NE;5piWX2bzR67fQ)`b=85o0eOLGI4c-Tb@-KNi2pz=Ke@SDcPn za$AxXib84`!Sf;Z3B@TSo`Dz7GM5Kf(@PR>Ghzi=BBxK8wRp>YQoXm+iL>H*Jo9M3 z6w&E?BC8AFTFT&Tv8zf+m9<&S&%dIaZ)Aoqkak_$r-2{$d~0g2oLETx9Y`eOAf14QXEQw3tJne;fdzl@wV#TFXSLXM2428F-Q}t+n2g%vPRMUzYPvzQ9f# zu(liiJem9P*?0%V@RwA7F53r~|I!Ty)<*AsMX3J{_4&}{6pT%Tpw>)^|DJ)>gpS~1rNEh z0$D?uO8mG?H;2BwM5a*26^7YO$XjUm40XmBsb63MoR;bJh63J;OngS5sSI+o2HA;W zdZV#8pDpC9Oez&L8loZO)MClRz!_!WD&QRtQxnazhT%Vj6Wl4G11nUk8*vSeVab@N#oJ}`KyJv+8Mo@T1-pqZ1t|?cnaVOd;1(h9 z!$DrN=jcGsVYE-0-n?oCJ^4x)F}E;UaD-LZUIzcD?W^ficqJWM%QLy6QikrM1aKZC zi{?;oKwq^Vsr|&`i{jIphA8S6G4)$KGvpULjH%9u(Dq247;R#l&I0{IhcC|oBF*Al zvLo7Xte=C{aIt*otJD}BUq)|_pdR>{zBMT< z(^1RpZv*l*m*OV^8>9&asGBo8h*_4q*)-eCv*|Pq=XNGrZE)^(SF7^{QE_~4VDB(o zVcPA_!G+2CAtLbl+`=Q~9iW`4ZRLku!uB?;tWqVjB0lEOf}2RD7dJ=BExy=<9wkb- z9&7{XFA%n#JsHYN8t5d~=T~5DcW4$B%3M+nNvC2`0!#@sckqlzo5;hhGi(D9=*A4` z5ynobawSPRtWn&CDLEs3Xf`(8^zDP=NdF~F^s&={l7(aw&EG}KWpMjtmz7j_VLO;@ zM2NVLDxZ@GIv7*gzl1 zjq78tv*8#WSY`}Su0&C;2F$Ze(q>F(@Wm^Gw!)(j;dk9Ad{STaxn)IV9FZhm*n+U} zi;4y*3v%A`_c7a__DJ8D1b@dl0Std3F||4Wtvi)fCcBRh!X9$1x!_VzUh>*S5s!oq z;qd{J_r79EL2wIeiGAqFstWtkfIJpjVh%zFo*=55B9Zq~y0=^iqHWfQl@O!Ak;(o*m!pZqe9 z%U2oDOhR)BvW8&F70L;2TpkzIutIvNQaTjjs5V#8mV4!NQ}zN=i`i@WI1z0eN-iCS z;vL-Wxc^Vc_qK<5RPh(}*8dLT{~GzE{w2o$2kMFaEl&q zP{V=>&3kW7tWaK-Exy{~`v4J0U#OZBk{a9{&)&QG18L@6=bsZ1zC_d{{pKZ-Ey>I> z;8H0t4bwyQqgu4hmO`3|4K{R*5>qnQ&gOfdy?z`XD%e5+pTDzUt3`k^u~SaL&XMe= z9*h#kT(*Q9jO#w2Hd|Mr-%DV8i_1{J1MU~XJ3!WUplhXDYBpJH><0OU`**nIvPIof z|N8@I=wA)sf45SAvx||f?Z5uB$kz1qL3Ky_{%RPdP5iN-D2!p5scq}buuC00C@jom zhfGKm3|f?Z0iQ|K$Z~!`8{nmAS1r+fp6r#YDOS8V*;K&Gs7Lc&f^$RC66O|)28oh`NHy&vq zJh+hAw8+ybTB0@VhWN^0iiTnLsCWbS_y`^gs!LX!Lw{yE``!UVzrV24tP8o;I6-65 z1MUiHw^{bB15tmrVT*7-#sj6cs~z`wk52YQJ*TG{SE;KTm#Hf#a~|<(|ImHH17nNM z`Ub{+J3dMD!)mzC8b(2tZtokKW5pAwHa?NFiso~# z1*iaNh4lQ4TS)|@G)H4dZV@l*Vd;Rw;-;odDhW2&lJ%m@jz+Panv7LQm~2Js6rOW3 z0_&2cW^b^MYW3)@o;neZ<{B4c#m48dAl$GCc=$>ErDe|?y@z`$uq3xd(%aAsX)D%l z>y*SQ%My`yDP*zof|3@_w#cjaW_YW4BdA;#Glg1RQcJGY*CJ9`H{@|D+*e~*457kd z73p<%fB^PV!Ybw@)Dr%(ZJbX}xmCStCYv#K3O32ej{$9IzM^I{6FJ8!(=azt7RWf4 z7ib0UOPqN40X!wOnFOoddd8`!_IN~9O)#HRTyjfc#&MCZ zZAMzOVB=;qwt8gV?{Y2?b=iSZG~RF~uyx18K)IDFLl})G1v@$(s{O4@RJ%OTJyF+Cpcx4jmy|F3euCnMK!P2WTDu5j z{{gD$=M*pH!GGzL%P)V2*ROm>!$Y=z|D`!_yY6e7SU$~a5q8?hZGgaYqaiLnkK%?0 zs#oI%;zOxF@g*@(V4p!$7dS1rOr6GVs6uYCTt2h)eB4?(&w8{#o)s#%gN@BBosRUe z)@P@8_Zm89pr~)b>e{tbPC~&_MR--iB{=)y;INU5#)@Gix-YpgP<-c2Ms{9zuCX|3 z!p(?VaXww&(w&uBHzoT%!A2=3HAP>SDxcljrego7rY|%hxy3XlODWffO_%g|l+7Y_ zqV(xbu)s4lV=l7M;f>vJl{`6qBm>#ZeMA}kXb97Z)?R97EkoI?x6Lp0yu1Z>PS?2{ z0QQ(8D)|lc9CO3B~e(pQM&5(1y&y=e>C^X$`)_&XuaI!IgDTVqt31wX#n+@!a_A0ZQkA zCJ2@M_4Gb5MfCrm5UPggeyh)8 zO9?`B0J#rkoCx(R0I!ko_2?iO@|oRf1;3r+i)w-2&j?=;NVIdPFsB)`|IC0zk6r9c zRrkfxWsiJ(#8QndNJj@{@WP2Ackr|r1VxV{7S&rSU(^)-M8gV>@UzOLXu9K<{6e{T zXJ6b92r$!|lwjhmgqkdswY&}c)KW4A)-ac%sU;2^fvq7gfUW4Bw$b!i@duy1CAxSn z(pyh$^Z=&O-q<{bZUP+$U}=*#M9uVc>CQVgDs4swy5&8RAHZ~$)hrTF4W zPsSa~qYv_0mJnF89RnnJTH`3}w4?~epFl=D(35$ zWa07ON$`OMBOHgCmfO(9RFc<)?$x)N}Jd2A(<*Ll7+4jrRt9w zwGxExUXd9VB#I|DwfxvJ;HZ8Q{37^wDhaZ%O!oO(HpcqfLH%#a#!~;Jl7F5>EX_=8 z{()l2NqPz>La3qJR;_v+wlK>GsHl;uRA8%j`A|yH@k5r%55S9{*Cp%uw6t`qc1!*T za2OeqtQj7sAp#Q~=5Fs&aCR9v>5V+s&RdNvo&H~6FJOjvaj--2sYYBvMq;55%z8^o z|BJDA4vzfow#DO#ZQHh;Oq_{r+qP{R9ox2TOgwQiv7Ow!zjN+A@BN;0tA2lUb#+zO z(^b89eV)D7UVE+h{mcNc6&GtpOqDn_?VAQ)Vob$hlFwW%xh>D#wml{t&Ofmm_d_+; zKDxzdr}`n2Rw`DtyIjrG)eD0vut$}dJAZ0AohZ+ZQdWXn_Z@dI_y=7t3q8x#pDI-K z2VVc&EGq445Rq-j0=U=Zx`oBaBjsefY;%)Co>J3v4l8V(T8H?49_@;K6q#r~Wwppc z4XW0(4k}cP=5ex>-Xt3oATZ~bBWKv)aw|I|Lx=9C1s~&b77idz({&q3T(Y(KbWO?+ zmcZ6?WeUsGk6>km*~234YC+2e6Zxdl~<_g2J|IE`GH%n<%PRv-50; zH{tnVts*S5*_RxFT9eM0z-pksIb^drUq4>QSww=u;UFCv2AhOuXE*V4z?MM`|ABOC4P;OfhS(M{1|c%QZ=!%rQTDFx`+}?Kdx$&FU?Y<$x;j7z=(;Lyz+?EE>ov!8vvMtSzG!nMie zsBa9t8as#2nH}n8xzN%W%U$#MHNXmDUVr@GX{?(=yI=4vks|V)!-W5jHsU|h_&+kY zS_8^kd3jlYqOoiI`ZqBVY!(UfnAGny!FowZWY_@YR0z!nG7m{{)4OS$q&YDyw6vC$ zm4!$h>*|!2LbMbxS+VM6&DIrL*X4DeMO!@#EzMVfr)e4Tagn~AQHIU8?e61TuhcKD zr!F4(kEebk(Wdk-?4oXM(rJwanS>Jc%<>R(siF+>+5*CqJLecP_we33iTFTXr6W^G z7M?LPC-qFHK;E!fxCP)`8rkxZyFk{EV;G-|kwf4b$c1k0atD?85+|4V%YATWMG|?K zLyLrws36p%Qz6{}>7b>)$pe>mR+=IWuGrX{3ZPZXF3plvuv5Huax86}KX*lbPVr}L z{C#lDjdDeHr~?l|)Vp_}T|%$qF&q#U;ClHEPVuS+Jg~NjC1RP=17=aQKGOcJ6B3mp z8?4*-fAD~}sX*=E6!}^u8)+m2j<&FSW%pYr_d|p_{28DZ#Cz0@NF=gC-o$MY?8Ca8 zr5Y8DSR^*urS~rhpX^05r30Ik#2>*dIOGxRm0#0YX@YQ%Mg5b6dXlS!4{7O_kdaW8PFSdj1=ryI-=5$fiieGK{LZ+SX(1b=MNL!q#lN zv98?fqqTUH8r8C7v(cx#BQ5P9W>- zmW93;eH6T`vuJ~rqtIBg%A6>q>gnWb3X!r0wh_q;211+Om&?nvYzL1hhtjB zK_7G3!n7PL>d!kj){HQE zE8(%J%dWLh1_k%gVXTZt zEdT09XSKAx27Ncaq|(vzL3gm83q>6CAw<$fTnMU05*xAe&rDfCiu`u^1)CD<>sx0i z*hr^N_TeN89G(nunZoLBf^81#pmM}>JgD@Nn1l*lN#a=B=9pN%tmvYFjFIoKe_(GF z-26x{(KXdfsQL7Uv6UtDuYwV`;8V3w>oT_I<`Ccz3QqK9tYT5ZQzbop{=I=!pMOCb zCU68`n?^DT%^&m>A%+-~#lvF!7`L7a{z<3JqIlk1$<||_J}vW1U9Y&eX<}l8##6i( zZcTT@2`9(Mecptm@{3A_Y(X`w9K0EwtPq~O!16bq{7c0f7#(3wn-^)h zxV&M~iiF!{-6A@>o;$RzQ5A50kxXYj!tcgme=Qjrbje~;5X2xryU;vH|6bE(8z^<7 zQ>BG7_c*JG8~K7Oe68i#0~C$v?-t@~@r3t2inUnLT(c=URpA9kA8uq9PKU(Ps(LVH zqgcqW>Gm?6oV#AldDPKVRcEyQIdTT`Qa1j~vS{<;SwyTdr&3*t?J)y=M7q*CzucZ&B0M=joT zBbj@*SY;o2^_h*>R0e({!QHF0=)0hOj^B^d*m>SnRrwq>MolNSgl^~r8GR#mDWGYEIJA8B<|{{j?-7p zVnV$zancW3&JVDtVpIlI|5djKq0(w$KxEFzEiiL=h5Jw~4Le23@s(mYyXWL9SX6Ot zmb)sZaly_P%BeX_9 zw&{yBef8tFm+%=--m*J|o~+Xg3N+$IH)t)=fqD+|fEk4AAZ&!wcN5=mi~Vvo^i`}> z#_3ahR}Ju)(Px7kev#JGcSwPXJ2id9%Qd2A#Uc@t8~egZ8;iC{e! z%=CGJOD1}j!HW_sgbi_8suYnn4#Ou}%9u)dXd3huFIb!ytlX>Denx@pCS-Nj$`VO&j@(z!kKSP0hE4;YIP#w9ta=3DO$7f*x zc9M4&NK%IrVmZAe=r@skWD`AEWH=g+r|*13Ss$+{c_R!b?>?UaGXlw*8qDmY#xlR= z<0XFbs2t?8i^G~m?b|!Hal^ZjRjt<@a? z%({Gn14b4-a|#uY^=@iiKH+k?~~wTj5K1A&hU z2^9-HTC)7zpoWK|$JXaBL6C z#qSNYtY>65T@Zs&-0cHeu|RX(Pxz6vTITdzJdYippF zC-EB+n4}#lM7`2Ry~SO>FxhKboIAF#Z{1wqxaCb{#yEFhLuX;Rx(Lz%T`Xo1+a2M}7D+@wol2)OJs$TwtRNJ={( zD@#zTUEE}#Fz#&(EoD|SV#bayvr&E0vzmb%H?o~46|FAcx?r4$N z&67W3mdip-T1RIxwSm_&(%U|+WvtGBj*}t69XVd&ebn>KOuL(7Y8cV?THd-(+9>G7*Nt%T zcH;`p={`SOjaf7hNd(=37Lz3-51;58JffzIPgGs_7xIOsB5p2t&@v1mKS$2D$*GQ6 zM(IR*j4{nri7NMK9xlDy-hJW6sW|ZiDRaFiayj%;(%51DN!ZCCCXz+0Vm#};70nOx zJ#yA0P3p^1DED;jGdPbQWo0WATN=&2(QybbVdhd=Vq*liDk`c7iZ?*AKEYC#SY&2g z&Q(Ci)MJ{mEat$ZdSwTjf6h~roanYh2?9j$CF@4hjj_f35kTKuGHvIs9}Re@iKMxS-OI*`0S z6s)fOtz}O$T?PLFVSeOjSO26$@u`e<>k(OSP!&YstH3ANh>)mzmKGNOwOawq-MPXe zy4xbeUAl6tamnx))-`Gi2uV5>9n(73yS)Ukma4*7fI8PaEwa)dWHs6QA6>$}7?(L8 ztN8M}?{Tf!Zu22J5?2@95&rQ|F7=FK-hihT-vDp!5JCcWrVogEnp;CHenAZ)+E+K5 z$Cffk5sNwD_?4+ymgcHR(5xgt20Z8M`2*;MzOM#>yhk{r3x=EyM226wb&!+j`W<%* zSc&|`8!>dn9D@!pYow~(DsY_naSx7(Z4i>cu#hA5=;IuI88}7f%)bRkuY2B;+9Uep zpXcvFWkJ!mQai63BgNXG26$5kyhZ2&*3Q_tk)Ii4M>@p~_~q_cE!|^A;_MHB;7s#9 zKzMzK{lIxotjc};k67^Xsl-gS!^*m*m6kn|sbdun`O?dUkJ{0cmI0-_2y=lTAfn*Y zKg*A-2sJq)CCJgY0LF-VQvl&6HIXZyxo2#!O&6fOhbHXC?%1cMc6y^*dOS{f$=137Ds1m01qs`>iUQ49JijsaQ( zksqV9@&?il$|4Ua%4!O15>Zy&%gBY&wgqB>XA3!EldQ%1CRSM(pp#k~-pkcCg4LAT zXE=puHbgsw)!xtc@P4r~Z}nTF=D2~j(6D%gTBw$(`Fc=OOQ0kiW$_RDd=hcO0t97h zb86S5r=>(@VGy1&#S$Kg_H@7G^;8Ue)X5Y+IWUi`o;mpvoV)`fcVk4FpcT|;EG!;? zHG^zrVVZOm>1KFaHlaogcWj(v!S)O(Aa|Vo?S|P z5|6b{qkH(USa*Z7-y_Uvty_Z1|B{rTS^qmEMLEYUSk03_Fg&!O3BMo{b^*`3SHvl0 zhnLTe^_vVIdcSHe)SQE}r~2dq)VZJ!aSKR?RS<(9lzkYo&dQ?mubnWmgMM37Nudwo z3Vz@R{=m2gENUE3V4NbIzAA$H1z0pagz94-PTJyX{b$yndsdKptmlKQKaaHj@3=ED zc7L?p@%ui|RegVYutK$64q4pe9+5sv34QUpo)u{1ci?)_7gXQd{PL>b0l(LI#rJmN zGuO+%GO`xneFOOr4EU(Wg}_%bhzUf;d@TU+V*2#}!2OLwg~%D;1FAu=Un>OgjPb3S z7l(riiCwgghC=Lm5hWGf5NdGp#01xQ59`HJcLXbUR3&n%P(+W2q$h2Qd z*6+-QXJ*&Kvk9ht0f0*rO_|FMBALen{j7T1l%=Q>gf#kma zQlg#I9+HB+z*5BMxdesMND`_W;q5|FaEURFk|~&{@qY32N$G$2B=&Po{=!)x5b!#n zxLzblkq{yj05#O7(GRuT39(06FJlalyv<#K4m}+vs>9@q-&31@1(QBv82{}Zkns~K ze{eHC_RDX0#^A*JQTwF`a=IkE6Ze@j#-8Q`tTT?k9`^ZhA~3eCZJ-Jr{~7Cx;H4A3 zcZ+Zj{mzFZbVvQ6U~n>$U2ZotGsERZ@}VKrgGh0xM;Jzt29%TX6_&CWzg+YYMozrM z`nutuS)_0dCM8UVaKRj804J4i%z2BA_8A4OJRQ$N(P9Mfn-gF;4#q788C@9XR0O3< zsoS4wIoyt046d+LnSCJOy@B@Uz*#GGd#+Ln1ek5Dv>(ZtD@tgZlPnZZJGBLr^JK+!$$?A_fA3LOrkoDRH&l7 zcMcD$Hsjko3`-{bn)jPL6E9Ds{WskMrivsUu5apD z?grQO@W7i5+%X&E&p|RBaEZ(sGLR@~(y^BI@lDMot^Ll?!`90KT!JXUhYS`ZgX3jnu@Ja^seA*M5R@f`=`ynQV4rc$uT1mvE?@tz)TN<=&H1%Z?5yjxcpO+6y_R z6EPuPKM5uxKpmZfT(WKjRRNHs@ib)F5WAP7QCADvmCSD#hPz$V10wiD&{NXyEwx5S z6NE`3z!IS^$s7m}PCwQutVQ#~w+V z=+~->DI*bR2j0^@dMr9`p>q^Ny~NrAVxrJtX2DUveic5vM%#N*XO|?YAWwNI$Q)_) zvE|L(L1jP@F%gOGtnlXtIv2&1i8q<)Xfz8O3G^Ea~e*HJsQgBxWL(yuLY+jqUK zRE~`-zklrGog(X}$9@ZVUw!8*=l`6mzYLtsg`AvBYz(cxmAhr^j0~(rzXdiOEeu_p zE$sf2(w(BPAvO5DlaN&uQ$4@p-b?fRs}d7&2UQ4Fh?1Hzu*YVjcndqJLw0#q@fR4u zJCJ}>_7-|QbvOfylj+e^_L`5Ep9gqd>XI3-O?Wp z-gt*P29f$Tx(mtS`0d05nHH=gm~Po_^OxxUwV294BDKT>PHVlC5bndncxGR!n(OOm znsNt@Q&N{TLrmsoKFw0&_M9$&+C24`sIXGWgQaz=kY;S{?w`z^Q0JXXBKFLj0w0U6P*+jPKyZHX9F#b0D1$&(- zrm8PJd?+SrVf^JlfTM^qGDK&-p2Kdfg?f>^%>1n8bu&byH(huaocL>l@f%c*QkX2i znl}VZ4R1en4S&Bcqw?$=Zi7ohqB$Jw9x`aM#>pHc0x z0$!q7iFu zZ`tryM70qBI6JWWTF9EjgG@>6SRzsd}3h+4D8d~@CR07P$LJ}MFsYi-*O%XVvD@yT|rJ+Mk zDllJ7$n0V&A!0flbOf)HE6P_afPWZmbhpliqJuw=-h+r;WGk|ntkWN(8tKlYpq5Ow z(@%s>IN8nHRaYb*^d;M(D$zGCv5C|uqmsDjwy4g=Lz>*OhO3z=)VD}C<65;`89Ye} zSCxrv#ILzIpEx1KdLPlM&%Cctf@FqTKvNPXC&`*H9=l=D3r!GLM?UV zOxa(8ZsB`&+76S-_xuj?G#wXBfDY@Z_tMpXJS7^mp z@YX&u0jYw2A+Z+bD#6sgVK5ZgdPSJV3>{K^4~%HV?rn~4D)*2H!67Y>0aOmzup`{D zzDp3c9yEbGCY$U<8biJ_gB*`jluz1ShUd!QUIQJ$*1;MXCMApJ^m*Fiv88RZ zFopLViw}{$Tyhh_{MLGIE2~sZ)t0VvoW%=8qKZ>h=adTe3QM$&$PO2lfqH@brt!9j ziePM8$!CgE9iz6B<6_wyTQj?qYa;eC^{x_0wuwV~W+^fZmFco-o%wsKSnjXFEx02V zF5C2t)T6Gw$Kf^_c;Ei3G~uC8SM-xyycmXyC2hAVi-IfXqhu$$-C=*|X?R0~hu z8`J6TdgflslhrmDZq1f?GXF7*ALeMmOEpRDg(s*H`4>_NAr`2uqF;k;JQ+8>A|_6ZNsNLECC%NNEb1Y1dP zbIEmNpK)#XagtL4R6BC{C5T(+=yA-(Z|Ap}U-AfZM#gwVpus3(gPn}Q$CExObJ5AC z)ff9Yk?wZ}dZ-^)?cbb9Fw#EjqQ8jxF4G3=L?Ra zg_)0QDMV1y^A^>HRI$x?Op@t;oj&H@1xt4SZ9(kifQ zb59B*`M99Td7@aZ3UWvj1rD0sE)d=BsBuW*KwkCds7ay(7*01_+L}b~7)VHI>F_!{ zyxg-&nCO?v#KOUec0{OOKy+sjWA;8rTE|Lv6I9H?CI?H(mUm8VXGwU$49LGpz&{nQp2}dinE1@lZ1iox6{ghN&v^GZv9J${7WaXj)<0S4g_uiJ&JCZ zr8-hsu`U%N;+9N^@&Q0^kVPB3)wY(rr}p7{p0qFHb3NUUHJb672+wRZs`gd1UjKPX z4o6zljKKA+Kkj?H>Ew63o%QjyBk&1!P22;MkD>sM0=z_s-G{mTixJCT9@_|*(p^bz zJ8?ZZ&;pzV+7#6Mn`_U-)k8Pjg?a;|Oe^us^PoPY$Va~yi8|?+&=y$f+lABT<*pZr zP}D{~Pq1Qyni+@|aP;ixO~mbEW9#c0OU#YbDZIaw=_&$K%Ep2f%hO^&P67hApZe`x zv8b`Mz@?M_7-)b!lkQKk)JXXUuT|B8kJlvqRmRpxtQDgvrHMXC1B$M@Y%Me!BSx3P z#2Eawl$HleZhhTS6Txm>lN_+I`>eV$&v9fOg)%zVn3O5mI*lAl>QcHuW6!Kixmq`X zBCZ*Ck6OYtDiK!N47>jxI&O2a9x7M|i^IagRr-fmrmikEQGgw%J7bO|)*$2FW95O4 zeBs>KR)izRG1gRVL;F*sr8A}aRHO0gc$$j&ds8CIO1=Gwq1%_~E)CWNn9pCtBE}+`Jelk4{>S)M)`Ll=!~gnn1yq^EX(+y*ik@3Ou0qU`IgYi3*doM+5&dU!cho$pZ zn%lhKeZkS72P?Cf68<#kll_6OAO26bIbueZx**j6o;I0cS^XiL`y+>{cD}gd%lux} z)3N>MaE24WBZ}s0ApfdM;5J_Ny}rfUyxfkC``Awo2#sgLnGPewK};dORuT?@I6(5~ z?kE)Qh$L&fwJXzK){iYx!l5$Tt|^D~MkGZPA}(o6f7w~O2G6Vvzdo*a;iXzk$B66$ zwF#;wM7A+(;uFG4+UAY(2`*3XXx|V$K8AYu#ECJYSl@S=uZW$ksfC$~qrrbQj4??z-)uz0QL}>k^?fPnJTPw% zGz)~?B4}u0CzOf@l^um}HZzbaIwPmb<)< zi_3@E9lc)Qe2_`*Z^HH;1CXOceL=CHpHS{HySy3T%<^NrWQ}G0i4e1xm_K3(+~oi$ zoHl9wzb?Z4j#90DtURtjtgvi7uw8DzHYmtPb;?%8vb9n@bszT=1qr)V_>R%s!92_` zfnHQPANx z<#hIjIMm#*(v*!OXtF+w8kLu`o?VZ5k7{`vw{Yc^qYclpUGIM_PBN1+c{#Vxv&E*@ zxg=W2W~JuV{IuRYw3>LSI1)a!thID@R=bU+cU@DbR^_SXY`MC7HOsCN z!dO4OKV7(E_Z8T#8MA1H`99?Z!r0)qKW_#|29X3#Jb+5+>qUidbeP1NJ@)(qi2S-X zao|f0_tl(O+$R|Qwd$H{_ig|~I1fbp_$NkI!0E;Y z6JrnU{1Ra6^on{9gUUB0mwzP3S%B#h0fjo>JvV~#+X0P~JV=IG=yHG$O+p5O3NUgG zEQ}z6BTp^Fie)Sg<){Z&I8NwPR(=mO4joTLHkJ>|Tnk23E(Bo`FSbPc05lF2-+)X? z6vV3*m~IBHTy*^E!<0nA(tCOJW2G4DsH7)BxLV8kICn5lu6@U*R`w)o9;Ro$i8=Q^V%uH8n3q=+Yf;SFRZu z!+F&PKcH#8cG?aSK_Tl@K9P#8o+jry@gdexz&d(Q=47<7nw@e@FFfIRNL9^)1i@;A z28+$Z#rjv-wj#heI|<&J_DiJ*s}xd-f!{J8jfqOHE`TiHHZVIA8CjkNQ_u;Ery^^t zl1I75&u^`1_q)crO+JT4rx|z2ToSC>)Or@-D zy3S>jW*sNIZR-EBsfyaJ+Jq4BQE4?SePtD2+jY8*%FsSLZ9MY>+wk?}}}AFAw)vr{ml)8LUG-y9>^t!{~|sgpxYc0Gnkg`&~R z-pilJZjr@y5$>B=VMdZ73svct%##v%wdX~9fz6i3Q-zOKJ9wso+h?VME7}SjL=!NUG{J?M&i!>ma`eoEa@IX`5G>B1(7;%}M*%-# zfhJ(W{y;>MRz!Ic8=S}VaBKqh;~7KdnGEHxcL$kA-6E~=!hrN*zw9N+_=odt<$_H_8dbo;0=42wcAETPCVGUr~v(`Uai zb{=D!Qc!dOEU6v)2eHSZq%5iqK?B(JlCq%T6av$Cb4Rko6onlG&?CqaX7Y_C_cOC3 zYZ;_oI(}=>_07}Oep&Ws7x7-R)cc8zfe!SYxJYP``pi$FDS)4Fvw5HH=FiU6xfVqIM!hJ;Rx8c0cB7~aPtNH(Nmm5Vh{ibAoU#J6 zImRCr?(iyu_4W_6AWo3*vxTPUw@vPwy@E0`(>1Qi=%>5eSIrp^`` zK*Y?fK_6F1W>-7UsB)RPC4>>Ps9)f+^MqM}8AUm@tZ->j%&h1M8s*s!LX5&WxQcAh z8mciQej@RPm?660%>{_D+7er>%zX_{s|$Z+;G7_sfNfBgY(zLB4Ey}J9F>zX#K0f6 z?dVNIeEh?EIShmP6>M+d|0wMM85Sa4diw1hrg|ITJ}JDg@o8y>(rF9mXk5M z2@D|NA)-7>wD&wF;S_$KS=eE84`BGw3g0?6wGxu8ys4rwI?9U=*^VF22t3%mbGeOh z`!O-OpF7#Vceu~F`${bW0nYVU9ecmk31V{tF%iv&5hWofC>I~cqAt@u6|R+|HLMMX zVxuSlMFOK_EQ86#E8&KwxIr8S9tj_goWtLv4f@!&h8;Ov41{J~496vp9vX=(LK#j! zAwi*21RAV-LD>9Cw3bV_9X(X3)Kr0-UaB*7Y>t82EQ%!)(&(XuAYtTsYy-dz+w=$ir)VJpe!_$ z6SGpX^i(af3{o=VlFPC);|J8#(=_8#vdxDe|Cok+ANhYwbE*FO`Su2m1~w+&9<_9~ z-|tTU_ACGN`~CNW5WYYBn^B#SwZ(t4%3aPp z;o)|L6Rk569KGxFLUPx@!6OOa+5OjQLK5w&nAmwxkC5rZ|m&HT8G%GVZxB_@ME z>>{rnXUqyiJrT(8GMj_ap#yN_!9-lO5e8mR3cJiK3NE{_UM&=*vIU`YkiL$1%kf+1 z4=jk@7EEj`u(jy$HnzE33ZVW_J4bj}K;vT?T91YlO(|Y0FU4r+VdbmQ97%(J5 zkK*Bed8+C}FcZ@HIgdCMioV%A<*4pw_n}l*{Cr4}a(lq|injK#O?$tyvyE`S%(1`H z_wwRvk#13ElkZvij2MFGOj`fhy?nC^8`Zyo%yVcUAfEr8x&J#A{|moUBAV_^f$hpaUuyQeY3da^ zS9iRgf87YBwfe}>BO+T&Fl%rfpZh#+AM?Dq-k$Bq`vG6G_b4z%Kbd&v>qFjow*mBl z-OylnqOpLg}or7_VNwRg2za3VBK6FUfFX{|TD z`Wt0Vm2H$vdlRWYQJqDmM?JUbVqL*ZQY|5&sY*?!&%P8qhA~5+Af<{MaGo(dl&C5t zE%t!J0 zh6jqANt4ABdPxSTrVV}fLsRQal*)l&_*rFq(Ez}ClEH6LHv{J#v?+H-BZ2)Wy{K@9 z+ovXHq~DiDvm>O~r$LJo!cOuwL+Oa--6;UFE2q@g3N8Qkw5E>ytz^(&($!O47+i~$ zKM+tkAd-RbmP{s_rh+ugTD;lriL~`Xwkad#;_aM?nQ7L_muEFI}U_4$phjvYgleK~`Fo`;GiC07&Hq1F<%p;9Q;tv5b?*QnR%8DYJH3P>Svmv47Y>*LPZJy8_{9H`g6kQpyZU{oJ`m%&p~D=K#KpfoJ@ zn-3cqmHsdtN!f?~w+(t+I`*7GQA#EQC^lUA9(i6=i1PqSAc|ha91I%X&nXzjYaM{8$s&wEx@aVkQ6M{E2 zfzId#&r(XwUNtPcq4Ngze^+XaJA1EK-%&C9j>^9(secqe{}z>hR5CFNveMsVA)m#S zk)_%SidkY-XmMWlVnQ(mNJ>)ooszQ#vaK;!rPmGKXV7am^_F!Lz>;~{VrIO$;!#30XRhE1QqO_~#+Ux;B_D{Nk=grn z8Y0oR^4RqtcYM)7a%@B(XdbZCOqnX#fD{BQTeLvRHd(irHKq=4*jq34`6@VAQR8WG z^%)@5CXnD_T#f%@-l${>y$tfb>2LPmc{~5A82|16mH)R?&r#KKLs7xpN-D`=&Cm^R zvMA6#Ahr<3X>Q7|-qfTY)}32HkAz$_mibYV!I)u>bmjK`qwBe(>za^0Kt*HnFbSdO z1>+ryKCNxmm^)*$XfiDOF2|{-v3KKB?&!(S_Y=Ht@|ir^hLd978xuI&N{k>?(*f8H z=ClxVJK_%_z1TH0eUwm2J+2To7FK4o+n_na)&#VLn1m;!+CX+~WC+qg1?PA~KdOlC zW)C@pw75_xoe=w7i|r9KGIvQ$+3K?L{7TGHwrQM{dCp=Z*D}3kX7E-@sZnup!BImw z*T#a=+WcTwL78exTgBn|iNE3#EsOorO z*kt)gDzHiPt07fmisA2LWN?AymkdqTgr?=loT7z@d`wnlr6oN}@o|&JX!yPzC*Y8d zu6kWlTzE1)ckyBn+0Y^HMN+GA$wUO_LN6W>mxCo!0?oiQvT`z$jbSEu&{UHRU0E8# z%B^wOc@S!yhMT49Y)ww(Xta^8pmPCe@eI5C*ed96)AX9<>))nKx0(sci8gwob_1}4 z0DIL&vsJ1_s%<@y%U*-eX z5rN&(zef-5G~?@r79oZGW1d!WaTqQn0F6RIOa9tJ=0(kdd{d1{<*tHT#cCvl*i>YY zH+L7jq8xZNcTUBqj(S)ztTU!TM!RQ}In*n&Gn<>(60G7}4%WQL!o>hbJqNDSGwl#H z`4k+twp0cj%PsS+NKaxslAEu9!#U3xT1|_KB6`h=PI0SW`P9GTa7caD1}vKEglV8# zjKZR`pluCW19c2fM&ZG)c3T3Um;ir3y(tSCJ7Agl6|b524dy5El{^EQBG?E61H0XY z`bqg!;zhGhyMFl&(o=JWEJ8n~z)xI}A@C0d2hQGvw7nGv)?POU@(kS1m=%`|+^ika zXl8zjS?xqW$WlO?Ewa;vF~XbybHBor$f<%I&*t$F5fynwZlTGj|IjZtVfGa7l&tK} zW>I<69w(cZLu)QIVG|M2xzW@S+70NinQzk&Y0+3WT*cC)rx~04O-^<{JohU_&HL5XdUKW!uFy|i$FB|EMu0eUyW;gsf`XfIc!Z0V zeK&*hPL}f_cX=@iv>K%S5kL;cl_$v?n(Q9f_cChk8Lq$glT|=e+T*8O4H2n<=NGmn z+2*h+v;kBvF>}&0RDS>)B{1!_*XuE8A$Y=G8w^qGMtfudDBsD5>T5SB;Qo}fSkkiV ze^K^M(UthkwrD!&*tTsu>Dacdj_q`~V%r_twr$(Ct&_dKeeXE?fA&4&yASJWJ*}~- zel=@W)tusynfC_YqH4ll>4Eg`Xjs5F7Tj>tTLz<0N3)X<1px_d2yUY>X~y>>93*$) z5PuNMQLf9Bu?AAGO~a_|J2akO1M*@VYN^VxvP0F$2>;Zb9;d5Yfd8P%oFCCoZE$ z4#N$^J8rxYjUE_6{T%Y>MmWfHgScpuGv59#4u6fpTF%~KB^Ae`t1TD_^Ud#DhL+Dm zbY^VAM#MrAmFj{3-BpVSWph2b_Y6gCnCAombVa|1S@DU)2r9W<> zT5L8BB^er3zxKt1v(y&OYk!^aoQisqU zH(g@_o)D~BufUXcPt!Ydom)e|aW{XiMnes2z&rE?og>7|G+tp7&^;q?Qz5S5^yd$i z8lWr4g5nctBHtigX%0%XzIAB8U|T6&JsC4&^hZBw^*aIcuNO47de?|pGXJ4t}BB`L^d8tD`H`i zqrP8?#J@8T#;{^B!KO6J=@OWKhAerih(phML`(Rg7N1XWf1TN>=Z3Do{l_!d~DND&)O)D>ta20}@Lt77qSnVsA7>)uZAaT9bsB>u&aUQl+7GiY2|dAEg@%Al3i316y;&IhQL^8fw_nwS>f60M_-m+!5)S_6EPM7Y)(Nq^8gL7(3 zOiot`6Wy6%vw~a_H?1hLVzIT^i1;HedHgW9-P#)}Y6vF%C=P70X0Tk^z9Te@kPILI z_(gk!k+0%CG)%!WnBjjw*kAKs_lf#=5HXC00s-}oM-Q1aXYLj)(1d!_a7 z*Gg4Fe6F$*ujVjI|79Z5+Pr`us%zW@ln++2l+0hsngv<{mJ%?OfSo_3HJXOCys{Ug z00*YR-(fv<=&%Q!j%b-_ppA$JsTm^_L4x`$k{VpfLI(FMCap%LFAyq;#ns5bR7V+x zO!o;c5y~DyBPqdVQX)8G^G&jWkBy2|oWTw>)?5u}SAsI$RjT#)lTV&Rf8;>u*qXnb z8F%Xb=7#$m)83z%`E;49)t3fHInhtc#kx4wSLLms!*~Z$V?bTyUGiS&m>1P(952(H zuHdv=;o*{;5#X-uAyon`hP}d#U{uDlV?W?_5UjJvf%11hKwe&(&9_~{W)*y1nR5f_ z!N(R74nNK`y8>B!0Bt_Vr!;nc3W>~RiKtGSBkNlsR#-t^&;$W#)f9tTlZz>n*+Fjz z3zXZ;jf(sTM(oDzJt4FJS*8c&;PLTW(IQDFs_5QPy+7yhi1syPCarvqrHFcf&yTy)^O<1EBx;Ir`5W{TIM>{8w&PB>ro4;YD<5LF^TjTb0!zAP|QijA+1Vg>{Afv^% zmrkc4o6rvBI;Q8rj4*=AZacy*n8B{&G3VJc)so4$XUoie0)vr;qzPZVbb<#Fc=j+8CGBWe$n|3K& z_@%?{l|TzKSlUEO{U{{%Fz_pVDxs7i9H#bnbCw7@4DR=}r_qV!Zo~CvD4ZI*+j3kO zW6_=|S`)(*gM0Z;;}nj`73OigF4p6_NPZQ-Od~e$c_);;4-7sR>+2u$6m$Gf%T{aq zle>e3(*Rt(TPD}03n5)!Ca8Pu!V}m6v0o1;5<1h$*|7z|^(3$Y&;KHKTT}hV056wuF0Xo@mK-52~r=6^SI1NC%c~CC?n>yX6wPTgiWYVz!Sx^atLby9YNn1Rk{g?|pJaxD4|9cUf|V1_I*w zzxK)hRh9%zOl=*$?XUjly5z8?jPMy%vEN)f%T*|WO|bp5NWv@B(K3D6LMl!-6dQg0 zXNE&O>Oyf%K@`ngCvbGPR>HRg5!1IV$_}m@3dWB7x3t&KFyOJn9pxRXCAzFr&%37wXG;z^xaO$ekR=LJG ztIHpY8F5xBP{mtQidqNRoz= z@){+N3(VO5bD+VrmS^YjG@+JO{EOIW)9=F4v_$Ed8rZtHvjpiEp{r^c4F6Ic#ChlC zJX^DtSK+v(YdCW)^EFcs=XP7S>Y!4=xgmv>{S$~@h=xW-G4FF9?I@zYN$e5oF9g$# zb!eVU#J+NjLyX;yb)%SY)xJdvGhsnE*JEkuOVo^k5PyS=o#vq!KD46UTW_%R=Y&0G zFj6bV{`Y6)YoKgqnir2&+sl+i6foAn-**Zd1{_;Zb7Ki=u394C5J{l^H@XN`_6XTKY%X1AgQM6KycJ+= zYO=&t#5oSKB^pYhNdzPgH~aEGW2=ec1O#s-KG z71}LOg@4UEFtp3GY1PBemXpNs6UK-ax*)#$J^pC_me;Z$Je(OqLoh|ZrW*mAMBFn< zHttjwC&fkVfMnQeen8`Rvy^$pNRFVaiEN4Pih*Y3@jo!T0nsClN)pdrr9AYLcZxZ| zJ5Wlj+4q~($hbtuY zVQ7hl>4-+@6g1i`1a)rvtp-;b0>^`Dloy(#{z~ytgv=j4q^Kl}wD>K_Y!l~ zp(_&7sh`vfO(1*MO!B%<6E_bx1)&s+Ae`O)a|X=J9y~XDa@UB`m)`tSG4AUhoM=5& znWoHlA-(z@3n0=l{E)R-p8sB9XkV zZ#D8wietfHL?J5X0%&fGg@MH~(rNS2`GHS4xTo7L$>TPme+Is~!|79=^}QbPF>m%J zFMkGzSndiPO|E~hrhCeo@&Ea{M(ieIgRWMf)E}qeTxT8Q#g-!Lu*x$v8W^M^>?-g= zwMJ$dThI|~M06rG$Sv@C@tWR>_YgaG&!BAbkGggVQa#KdtDB)lMLNVLN|51C@F^y8 zCRvMB^{GO@j=cHfmy}_pCGbP%xb{pNN>? z?7tBz$1^zVaP|uaatYaIN+#xEN4jBzwZ|YI_)p(4CUAz1ZEbDk>J~Y|63SZaak~#0 zoYKruYsWHoOlC1(MhTnsdUOwQfz5p6-D0}4;DO$B;7#M{3lSE^jnTT;ns`>!G%i*F?@pR1JO{QTuD0U+~SlZxcc8~>IB{)@8p`P&+nDxNj`*gh|u?yrv$phpQcW)Us)bi`kT%qLj(fi{dWRZ%Es2!=3mI~UxiW0$-v3vUl?#g{p6eF zMEUAqo5-L0Ar(s{VlR9g=j7+lt!gP!UN2ICMokAZ5(Agd>})#gkA2w|5+<%-CuEP# zqgcM}u@3(QIC^Gx<2dbLj?cFSws_f3e%f4jeR?4M^M3cx1f+Qr6ydQ>n)kz1s##2w zk}UyQc+Z5G-d-1}{WzjkLXgS-2P7auWSJ%pSnD|Uivj5u!xk0 z_^-N9r9o;(rFDt~q1PvE#iJZ_f>J3gcP$)SOqhE~pD2|$=GvpL^d!r z6u=sp-CrMoF7;)}Zd7XO4XihC4ji?>V&(t^?@3Q&t9Mx=qex6C9d%{FE6dvU6%d94 zIE;hJ1J)cCqjv?F``7I*6bc#X)JW2b4f$L^>j{*$R`%5VHFi*+Q$2;nyieduE}qdS{L8y8F08yLs?w}{>8>$3236T-VMh@B zq-nujsb_1aUv_7g#)*rf9h%sFj*^mIcImRV*k~Vmw;%;YH(&ylYpy!&UjUVqqtfG` zox3esju?`unJJA_zKXRJP)rA3nXc$m^{S&-p|v|-0x9LHJm;XIww7C#R$?00l&Yyj z=e}gKUOpsImwW?N)+E(awoF@HyP^EhL+GlNB#k?R<2>95hz!h9sF@U20DHSB3~WMa zk90+858r@-+vWwkawJ)8ougd(i#1m3GLN{iSTylYz$brAsP%=&m$mQQrH$g%3-^VR zE%B`Vi&m8f3T~&myTEK28BDWCVzfWir1I?03;pX))|kY5ClO^+bae z*7E?g=3g7EiisYOrE+lA)2?Ln6q2*HLNpZEWMB|O-JI_oaHZB%CvYB(%=tU= zE*OY%QY58fW#RG5=gm0NR#iMB=EuNF@)%oZJ}nmm=tsJ?eGjia{e{yuU0l3{d^D@)kVDt=1PE)&tf_hHC%0MB znL|CRCPC}SeuVTdf>-QV70`0(EHizc21s^sU>y%hW0t!0&y<7}Wi-wGy>m%(-jsDj zP?mF|>p_K>liZ6ZP(w5(|9Ga%>tLgb$|doDDfkdW>Z z`)>V2XC?NJT26mL^@ zf+IKr27TfM!UbZ@?zRddC7#6ss1sw%CXJ4FWC+t3lHZupzM77m^=9 z&(a?-LxIq}*nvv)y?27lZ{j zifdl9hyJudyP2LpU$-kXctshbJDKS{WfulP5Dk~xU4Le4c#h^(YjJit4#R8_khheS z|8(>2ibaHES4+J|DBM7I#QF5u-*EdN{n=Kt@4Zt?@Tv{JZA{`4 zU#kYOv{#A&gGPwT+$Ud}AXlK3K7hYzo$(fBSFjrP{QQ zeaKg--L&jh$9N}`pu{Bs>?eDFPaWY4|9|foN%}i;3%;@4{dc+iw>m}{3rELqH21G! z`8@;w-zsJ1H(N3%|1B@#ioLOjib)j`EiJqPQVSbPSPVHCj6t5J&(NcWzBrzCiDt{4 zdlPAUKldz%6x5II1H_+jv)(xVL+a;P+-1hv_pM>gMRr%04@k;DTokASSKKhU1Qms| zrWh3a!b(J3n0>-tipg{a?UaKsP7?+|@A+1WPDiQIW1Sf@qDU~M_P65_s}7(gjTn0X zucyEm)o;f8UyshMy&>^SC3I|C6jR*R_GFwGranWZe*I>K+0k}pBuET&M~ z;Odo*ZcT?ZpduHyrf8E%IBFtv;JQ!N_m>!sV6ly$_1D{(&nO~w)G~Y`7sD3#hQk%^ zp}ucDF_$!6DAz*PM8yE(&~;%|=+h(Rn-=1Wykas_-@d&z#=S}rDf`4w(rVlcF&lF! z=1)M3YVz7orwk^BXhslJ8jR);sh^knJW(Qmm(QdSgIAIdlN4Te5KJisifjr?eB{FjAX1a0AB>d?qY4Wx>BZ8&}5K0fA+d{l8 z?^s&l8#j7pR&ijD?0b%;lL9l$P_mi2^*_OL+b}4kuLR$GAf85sOo02?Y#90}CCDiS zZ%rbCw>=H~CBO=C_JVV=xgDe%b4FaEFtuS7Q1##y686r%F6I)s-~2(}PWK|Z8M+Gu zl$y~5@#0Ka%$M<&Cv%L`a8X^@tY&T7<0|(6dNT=EsRe0%kp1Qyq!^43VAKYnr*A5~ zsI%lK1ewqO;0TpLrT9v}!@vJK{QoVa_+N4FYT#h?Y8rS1S&-G+m$FNMP?(8N`MZP zels(*?kK{{^g9DOzkuZXJ2;SrOQsp9T$hwRB1(phw1c7`!Q!by?Q#YsSM#I12RhU{$Q+{xj83axHcftEc$mNJ8_T7A-BQc*k(sZ+~NsO~xAA zxnbb%dam_fZlHvW7fKXrB~F&jS<4FD2FqY?VG?ix*r~MDXCE^WQ|W|WM;gsIA4lQP zJ2hAK@CF*3*VqPr2eeg6GzWFlICi8S>nO>5HvWzyZTE)hlkdC_>pBej*>o0EOHR|) z$?};&I4+_?wvL*g#PJ9)!bc#9BJu1(*RdNEn>#Oxta(VWeM40ola<0aOe2kSS~{^P zDJBd}0L-P#O-CzX*%+$#v;(x%<*SPgAje=F{Zh-@ucd2DA(yC|N_|ocs*|-!H%wEw z@Q!>siv2W;C^^j^59OAX03&}&D*W4EjCvfi(ygcL#~t8XGa#|NPO+*M@Y-)ctFA@I z-p7npT1#5zOLo>7q?aZpCZ=iecn3QYklP;gF0bq@>oyBq94f6C=;Csw3PkZ|5q=(c zfs`aw?II0e(h=|7o&T+hq&m$; zBrE09Twxd9BJ2P+QPN}*OdZ-JZV7%av@OM7v!!NL8R;%WFq*?{9T3{ct@2EKgc8h) zMxoM$SaF#p<`65BwIDfmXG6+OiK0e)`I=!A3E`+K@61f}0e z!2a*FOaDrOe>U`q%K!QN`&=&0C~)CaL3R4VY(NDt{Xz(Xpqru5=r#uQN1L$Je1*dkdqQ*=lofQaN%lO!<5z9ZlHgxt|`THd>2 zsWfU$9=p;yLyJyM^t zS2w9w?Bpto`@H^xJpZDKR1@~^30Il6oFGfk5%g6w*C+VM)+%R@gfIwNprOV5{F^M2 zO?n3DEzpT+EoSV-%OdvZvNF+pDd-ZVZ&d8 zKeIyrrfPN=EcFRCPEDCVflX#3-)Ik_HCkL(ejmY8vzcf-MTA{oHk!R2*36`O68$7J zf}zJC+bbQk--9Xm!u#lgLvx8TXx2J258E5^*IZ(FXMpq$2LUUvhWQPs((z1+2{Op% z?J}9k5^N=z;7ja~zi8a_-exIqWUBJwohe#4QJ`|FF*$C{lM18z^#hX6!5B8KAkLUX ziP=oti-gpV(BsLD{0(3*dw}4JxK23Y7M{BeFPucw!sHpY&l%Ws4pSm`+~V7;bZ%Dx zeI)MK=4vC&5#;2MT7fS?^ch9?2;%<8Jlu-IB&N~gg8t;6S-#C@!NU{`p7M8@2iGc& zg|JPg%@gCoCQ&s6JvDU&`X2S<57f(k8nJ1wvBu{8r?;q3_kpZZ${?|( z+^)UvR33sjSd)aT!UPkA;ylO6{aE3MQa{g%Mcf$1KONcjO@&g5zPHWtzM1rYC{_K> zgQNcs<{&X{OA=cEWw5JGqpr0O>x*Tfak2PE9?FuWtz^DDNI}rwAaT0(bdo-<+SJ6A z&}S%boGMWIS0L}=S>|-#kRX;e^sUsotry(MjE|3_9duvfc|nwF#NHuM-w7ZU!5ei8 z6Mkf>2)WunY2eU@C-Uj-A zG(z0Tz2YoBk>zCz_9-)4a>T46$(~kF+Y{#sA9MWH%5z#zNoz)sdXq7ZR_+`RZ%0(q zC7&GyS_|BGHNFl8Xa%@>iWh%Gr?=J5<(!OEjauj5jyrA-QXBjn0OAhJJ9+v=!LK`` z@g(`^*84Q4jcDL`OA&ZV60djgwG`|bcD*i50O}Q{9_noRg|~?dj%VtKOnyRs$Uzqg z191aWoR^rDX#@iSq0n z?9Sg$WSRPqSeI<}&n1T3!6%Wj@5iw5`*`Btni~G=&;J+4`7g#OQTa>u`{4ZZ(c@s$ zK0y;ySOGD-UTjREKbru{QaS>HjN<2)R%Nn-TZiQ(Twe4p@-saNa3~p{?^V9Nixz@a zykPv~<@lu6-Ng9i$Lrk(xi2Tri3q=RW`BJYOPC;S0Yly%77c727Yj-d1vF!Fuk{Xh z)lMbA69y7*5ufET>P*gXQrxsW+ zz)*MbHZv*eJPEXYE<6g6_M7N%#%mR{#awV3i^PafNv(zyI)&bH?F}2s8_rR(6%!V4SOWlup`TKAb@ee>!9JKPM=&8g#BeYRH9FpFybxBXQI2|g}FGJfJ+ zY-*2hB?o{TVL;Wt_ek;AP5PBqfDR4@Z->_182W z{P@Mc27j6jE*9xG{R$>6_;i=y{qf(c`5w9fa*`rEzX6t!KJ(p1H|>J1pC-2zqWENF zmm=Z5B4u{cY2XYl(PfrInB*~WGWik3@1oRhiMOS|D;acnf-Bs(QCm#wR;@Vf!hOPJ zgjhDCfDj$HcyVLJ=AaTbQ{@vIv14LWWF$=i-BDoC11}V;2V8A`S>_x)vIq44-VB-v z*w-d}$G+Ql?En8j!~ZkCpQ$|cA0|+rrY>tiCeWxkRGPoarxlGU2?7%k#F693RHT24 z-?JsiXlT2PTqZqNb&sSc>$d;O4V@|b6VKSWQb~bUaWn1Cf0+K%`Q&Wc<>mQ>*iEGB zbZ;aYOotBZ{vH3y<0A*L0QVM|#rf*LIsGx(O*-7)r@yyBIzJnBFSKBUSl1e|8lxU* zzFL+YDVVkIuzFWeJ8AbgN&w(4-7zbiaMn{5!JQXu)SELk*CNL+Fro|2v|YO)1l15t zs(0^&EB6DPMyaqvY>=KL>)tEpsn;N5Q#yJj<9}ImL((SqErWN3Q=;tBO~ExTCs9hB z2E$7eN#5wX4<3m^5pdjm#5o>s#eS_Q^P)tm$@SawTqF*1dj_i#)3};JslbLKHXl_N z)Fxzf>FN)EK&Rz&*|6&%Hs-^f{V|+_vL1S;-1K-l$5xiC@}%uDuwHYhmsV?YcOUlk zOYkG5v2+`+UWqpn0aaaqrD3lYdh0*!L`3FAsNKu=Q!vJu?Yc8n|CoYyDo_`r0mPoo z8>XCo$W4>l(==h?2~PoRR*kEe)&IH{1sM41mO#-36`02m#nTX{r*r`Q5rZ2-sE|nA zhnn5T#s#v`52T5|?GNS`%HgS2;R(*|^egNPDzzH_z^W)-Q98~$#YAe)cEZ%vge965AS_am#DK#pjPRr-!^za8>`kksCAUj(Xr*1NW5~e zpypt_eJpD&4_bl_y?G%>^L}=>xAaV>KR6;^aBytqpiHe%!j;&MzI_>Sx7O%F%D*8s zSN}cS^<{iiK)=Ji`FpO#^zY!_|D)qeRNAtgmH)m;qC|mq^j(|hL`7uBz+ULUj37gj zksdbnU+LSVo35riSX_4z{UX=%n&}7s0{WuZYoSfwAP`8aKN9P@%e=~1`~1ASL-z%# zw>DO&ixr}c9%4InGc*_y42bdEk)ZdG7-mTu0bD@_vGAr*NcFoMW;@r?@LUhRI zCUJgHb`O?M3!w)|CPu~ej%fddw20lod?Ufp8Dmt0PbnA0J%KE^2~AIcnKP()025V> zG>noSM3$5Btmc$GZoyP^v1@Poz0FD(6YSTH@aD0}BXva?LphAiSz9f&Y(aDAzBnUh z?d2m``~{z;{}kZJ>a^wYI?ry(V9hIoh;|EFc0*-#*`$T0DRQ1;WsqInG;YPS+I4{g zJGpKk%%Sdc5xBa$Q^_I~(F97eqDO7AN3EN0u)PNBAb+n+ zWBTxQx^;O9o0`=g+Zrt_{lP!sgWZHW?8bLYS$;1a@&7w9rD9|Ge;Gb?sEjFoF9-6v z#!2)t{DMHZ2@0W*fCx;62d#;jouz`R5Y(t{BT=$N4yr^^o$ON8d{PQ=!O zX17^CrdM~7D-;ZrC!||<+FEOxI_WI3CA<35va%4v>gc zEX-@h8esj=a4szW7x{0g$hwoWRQG$yK{@3mqd-jYiVofJE!Wok1* znV7Gm&Ssq#hFuvj1sRyHg(6PFA5U*Q8Rx>-blOs=lb`qa{zFy&n4xY;sd$fE+<3EI z##W$P9M{B3c3Si9gw^jlPU-JqD~Cye;wr=XkV7BSv#6}DrsXWFJ3eUNrc%7{=^sP> zrp)BWKA9<}^R9g!0q7yWlh;gr_TEOD|#BmGq<@IV;ueg+D2}cjpp+dPf&Q(36sFU&K8}hA85U61faW&{ zlB`9HUl-WWCG|<1XANN3JVAkRYvr5U4q6;!G*MTdSUt*Mi=z_y3B1A9j-@aK{lNvx zK%p23>M&=KTCgR!Ee8c?DAO2_R?B zkaqr6^BSP!8dHXxj%N1l+V$_%vzHjqvu7p@%Nl6;>y*S}M!B=pz=aqUV#`;h%M0rU zHfcog>kv3UZAEB*g7Er@t6CF8kHDmKTjO@rejA^ULqn!`LwrEwOVmHx^;g|5PHm#B zZ+jjWgjJ!043F+&#_;D*mz%Q60=L9Ove|$gU&~As5^uz@2-BfQ!bW)Khn}G+Wyjw- z19qI#oB(RSNydn0t~;tAmK!P-d{b-@@E5|cdgOS#!>%#Rj6ynkMvaW@37E>@hJP^8 z2zk8VXx|>#R^JCcWdBCy{0nPmYFOxN55#^-rlqobe0#L6)bi?E?SPymF*a5oDDeSd zO0gx?#KMoOd&G(2O@*W)HgX6y_aa6iMCl^~`{@UR`nMQE`>n_{_aY5nA}vqU8mt8H z`oa=g0SyiLd~BxAj2~l$zRSDHxvDs;I4>+M$W`HbJ|g&P+$!U7-PHX4RAcR0szJ*( ze-417=bO2q{492SWrqDK+L3#ChUHtz*@MP)e^%@>_&#Yk^1|tv@j4%3T)diEX zATx4K*hcO`sY$jk#jN5WD<=C3nvuVsRh||qDHnc~;Kf59zr0;c7VkVSUPD%NnnJC_ zl3F^#f_rDu8l}l8qcAz0FFa)EAt32IUy_JLIhU_J^l~FRH&6-ivSpG2PRqzDdMWft>Zc(c)#tb%wgmWN%>IOPm zZi-noqS!^Ftb81pRcQi`X#UhWK70hy4tGW1mz|+vI8c*h@ zfFGJtW3r>qV>1Z0r|L>7I3un^gcep$AAWfZHRvB|E*kktY$qQP_$YG60C@X~tTQjB3%@`uz!qxtxF+LE!+=nrS^07hn` zEgAp!h|r03h7B!$#OZW#ACD+M;-5J!W+{h|6I;5cNnE(Y863%1(oH}_FTW})8zYb$7czP zg~Szk1+_NTm6SJ0MS_|oSz%e(S~P-&SFp;!k?uFayytV$8HPwuyELSXOs^27XvK-D zOx-Dl!P|28DK6iX>p#Yb%3`A&CG0X2S43FjN%IB}q(!hC$fG}yl1y9W&W&I@KTg6@ zK^kpH8=yFuP+vI^+59|3%Zqnb5lTDAykf z9S#X`3N(X^SpdMyWQGOQRjhiwlj!0W-yD<3aEj^&X%=?`6lCy~?`&WSWt z?U~EKFcCG_RJ(Qp7j=$I%H8t)Z@6VjA#>1f@EYiS8MRHZphp zMA_5`znM=pzUpBPO)pXGYpQ6gkine{6u_o!P@Q+NKJ}k!_X7u|qfpAyIJb$_#3@wJ z<1SE2Edkfk9C!0t%}8Yio09^F`YGzpaJHGk*-ffsn85@)%4@`;Fv^8q(-Wk7r=Q8p zT&hD`5(f?M{gfzGbbwh8(}G#|#fDuk7v1W)5H9wkorE0ZZjL0Q1=NRGY>zwgfm81DdoaVwNH;or{{eSyybt)m<=zXoA^RALYG-2t zouH|L*BLvmm9cdMmn+KGopyR@4*=&0&4g|FLoreZOhRmh=)R0bg~ zT2(8V_q7~42-zvb)+y959OAv!V$u(O3)%Es0M@CRFmG{5sovIq4%8Ahjk#*5w{+)+ zMWQoJI_r$HxL5km1#6(e@{lK3Udc~n0@g`g$s?VrnQJ$!oPnb?IHh-1qA`Rz$)Ai< z6w$-MJW-gKNvOhL+XMbE7&mFt`x1KY>k4(!KbbpZ`>`K@1J<(#vVbjx@Z@(6Q}MF# zMnbr-f55(cTa^q4+#)=s+ThMaV~E`B8V=|W_fZWDwiso8tNMTNse)RNBGi=gVwgg% zbOg8>mbRN%7^Um-7oj4=6`$|(K7!+t^90a{$18Z>}<#!bm%ZEFQ{X(yBZMc>lCz0f1I2w9Sq zuGh<9<=AO&g6BZte6hn>Qmvv;Rt)*cJfTr2=~EnGD8P$v3R|&1RCl&7)b+`=QGapi zPbLg_pxm`+HZurtFZ;wZ=`Vk*do~$wB zxoW&=j0OTbQ=Q%S8XJ%~qoa3Ea|au5o}_(P;=!y-AjFrERh%8la!z6Fn@lR?^E~H12D?8#ht=1F;7@o4$Q8GDj;sSC%Jfn01xgL&%F2 zwG1|5ikb^qHv&9hT8w83+yv&BQXOQyMVJSBL(Ky~p)gU3#%|blG?IR9rP^zUbs7rOA0X52Ao=GRt@C&zlyjNLv-} z9?*x{y(`509qhCV*B47f2hLrGl^<@SuRGR!KwHei?!CM10Tq*YDIoBNyRuO*>3FU? zHjipIE#B~y3FSfOsMfj~F9PNr*H?0oHyYB^G(YyNh{SxcE(Y-`x5jFMKb~HO*m+R% zrq|ic4fzJ#USpTm;X7K+E%xsT_3VHKe?*uc4-FsILUH;kL>_okY(w`VU*8+l>o>Jm ziU#?2^`>arnsl#)*R&nf_%>A+qwl%o{l(u)M?DK1^mf260_oteV3#E_>6Y4!_hhVD zM8AI6MM2V*^_M^sQ0dmHu11fy^kOqXqzpr?K$`}BKWG`=Es(9&S@K@)ZjA{lj3ea7_MBP zk(|hBFRjHVMN!sNUkrB;(cTP)T97M$0Dtc&UXSec<+q?y>5=)}S~{Z@ua;1xt@=T5 zI7{`Z=z_X*no8s>mY;>BvEXK%b`a6(DTS6t&b!vf_z#HM{Uoy_5fiB(zpkF{})ruka$iX*~pq1ZxD?q68dIo zIZSVls9kFGsTwvr4{T_LidcWtt$u{kJlW7moRaH6+A5hW&;;2O#$oKyEN8kx`LmG)Wfq4ykh+q{I3|RfVpkR&QH_x;t41Uw z`P+tft^E2B$domKT@|nNW`EHwyj>&}K;eDpe z1bNOh=fvIfk`&B61+S8ND<(KC%>y&?>opCnY*r5M+!UrWKxv0_QvTlJc>X#AaI^xo zaRXL}t5Ej_Z$y*|w*$6D+A?Lw-CO-$itm^{2Ct82-<0IW)0KMNvJHgBrdsIR0v~=H z?n6^}l{D``Me90`^o|q!olsF?UX3YSq^6Vu>Ijm>>PaZI8G@<^NGw{Cx&%|PwYrfw zR!gX_%AR=L3BFsf8LxI|K^J}deh0ZdV?$3r--FEX`#INxsOG6_=!v)DI>0q|BxT)z z-G6kzA01M?rba+G_mwNMQD1mbVbNTWmBi*{s_v_Ft9m2Avg!^78(QFu&n6mbRJ2bA zv!b;%yo{g*9l2)>tsZJOOp}U~8VUH`}$ z8p_}t*XIOehezolNa-a2x0BS})Y9}&*TPgua{Ewn-=wVrmJUeU39EKx+%w%=ixQWK zDLpwaNJs65#6o7Ln7~~X+p_o2BR1g~VCfxLzxA{HlWAI6^H;`juI=&r1jQrUv_q0Z z1Ja-tjdktrrP>GOC*#p?*xfQU5MqjMsBe!9lh(u8)w$e@Z|>aUHI5o;MGw*|Myiz3 z-f0;pHg~Q#%*Kx8MxH%AluVXjG2C$)WL-K63@Q`#y9_k_+}eR(x4~dp7oV-ek0H>I zgy8p#i4GN{>#v=pFYUQT(g&b$OeTy-X_#FDgNF8XyfGY6R!>inYn8IR2RDa&O!(6< znXs{W!bkP|s_YI*Yx%4stI`=ZO45IK6rBs`g7sP40ic}GZ58s?Mc$&i`kq_tfci>N zIHrC0H+Qpam1bNa=(`SRKjixBTtm&e`j9porEci!zdlg1RI0Jw#b(_Tb@RQK1Zxr_ z%7SUeH6=TrXt3J@js`4iDD0=IoHhK~I7^W8^Rcp~Yaf>2wVe|Hh1bUpX9A
TD#moByY57-f2Ef1TP^lBi&p5_s7WGG9|0T}dlfxOx zXvScJO1Cnq`c`~{Dp;{;l<-KkCDE+pmexJkd}zCgE{eF=)K``-qC~IT6GcRog_)!X z?fK^F8UDz$(zFUrwuR$qro5>qqn>+Z%<5>;_*3pZ8QM|yv9CAtrAx;($>4l^_$_-L z*&?(77!-=zvnCVW&kUcZMb6;2!83si518Y%R*A3JZ8Is|kUCMu`!vxDgaWjs7^0j( ziTaS4HhQ)ldR=r)_7vYFUr%THE}cPF{0H45FJ5MQW^+W>P+eEX2kLp3zzFe*-pFVA zdDZRybv?H|>`9f$AKVjFWJ=wegO7hOOIYCtd?Vj{EYLT*^gl35|HQ`R=ti+ADm{jyQE7K@kdjuqJhWVSks>b^ zxha88-h3s;%3_5b1TqFCPTxVjvuB5U>v=HyZ$?JSk+&I%)M7KE*wOg<)1-Iy)8-K! z^XpIt|0ibmk9RtMmlUd7#Ap3Q!q9N4atQy)TmrhrFhfx1DAN`^vq@Q_SRl|V z#lU<~n67$mT)NvHh`%als+G-)x1`Y%4Bp*6Un5Ri9h=_Db zA-AdP!f>f0m@~>7X#uBM?diI@)Egjuz@jXKvm zJo+==juc9_<;CqeRaU9_Mz@;3e=E4=6TK+c`|uu#pIqhSyNm`G(X)&)B`8q0RBv#> z`gGlw(Q=1Xmf55VHj%C#^1lpc>LY8kfA@|rlC1EA<1#`iuyNO z(=;irt{_&K=i4)^x%;U(Xv<)+o=dczC5H3W~+e|f~{*ucxj@{Yi-cw^MqYr3fN zF5D+~!wd$#al?UfMnz(@K#wn`_5na@rRr8XqN@&M&FGEC@`+OEv}sI1hw>Up0qAWf zL#e4~&oM;TVfjRE+10B_gFlLEP9?Q-dARr3xi6nQqnw>k-S;~b z;!0s2VS4}W8b&pGuK=7im+t(`nz@FnT#VD|!)eQNp-W6)@>aA+j~K*H{$G`y2|QHY z|Hmy+CR@#jWY4~)lr1qBJB_RfHJFfP<}pK5(#ZZGSqcpyS&}01LnTWk5fzmXMGHkJ zTP6L^B+uj;lmB_W<~4=${+v0>z31M!-_O@o-O9GyW)j_mjx}!0@br_LE-7SIuPP84 z;5=O(U*g_um0tyG|61N@d9lEuOeiRd+#NY^{nd5;-CVlw&Ap7J?qwM^?E29wvS}2d zbzar4Fz&RSR(-|s!Z6+za&Z zY#D<5q_JUktIzvL0)yq_kLWG6DO{ri=?c!y!f(Dk%G{8)k`Gym%j#!OgXVDD3;$&v@qy#ISJfp=Vm>pls@9-mapVQChAHHd-x+OGx)(*Yr zC1qDUTZ6mM(b_hi!TuFF2k#8uI2;kD70AQ&di$L*4P*Y-@p`jdm%_c3f)XhYD^6M8&#Y$ZpzQMcR|6nsH>b=*R_Von!$BTRj7yGCXokoAQ z&ANvx0-Epw`QIEPgI(^cS2f(Y85yV@ygI{ewyv5Frng)e}KCZF7JbR(&W618_dcEh(#+^zZFY;o<815<5sOHQdeax9_!PyM&;{P zkBa5xymca0#)c#tke@3KNEM8a_mT&1gm;p&&JlMGH(cL(b)BckgMQ^9&vRwj!~3@l zY?L5}=Jzr080OGKb|y`ee(+`flQg|!lo6>=H)X4`$Gz~hLmu2a%kYW_Uu8x09Pa0J zKZ`E$BKJ=2GPj_3l*TEcZ*uYRr<*J^#5pILTT;k_cgto1ZL-%slyc16J~OH-(RgDA z%;EjEnoUkZ&acS{Q8`{i6T5^nywgqQI5bDIymoa7CSZG|WWVk>GM9)zy*bNih|QIm z%0+(Nnc*a_xo;$=!HQYaapLms>J1ToyjtFByY`C2H1wT#178#4+|{H0BBqtCdd$L% z_3Hc60j@{t9~MjM@LBalR&6@>B;9?r<7J~F+WXyYu*y3?px*=8MAK@EA+jRX8{CG?GI-< z54?Dc9CAh>QTAvyOEm0^+x;r2BWX|{3$Y7)L5l*qVE*y0`7J>l2wCmW zL1?|a`pJ-l{fb_N;R(Z9UMiSj6pQjOvQ^%DvhIJF!+Th7jO2~1f1N+(-TyCFYQZYw z4)>7caf^Ki_KJ^Zx2JUb z&$3zJy!*+rCV4%jqwyuNY3j1ZEiltS0xTzd+=itTb;IPYpaf?8Y+RSdVdpacB(bVQ zC(JupLfFp8y43%PMj2}T|VS@%LVp>hv4Y!RPMF?pp8U_$xCJ)S zQx!69>bphNTIb9yn*_yfj{N%bY)t{L1cs8<8|!f$;UQ*}IN=2<6lA;x^(`8t?;+ST zh)z4qeYYgZkIy{$4x28O-pugO&gauRh3;lti9)9Pvw+^)0!h~%m&8Q!AKX%urEMnl z?yEz?g#ODn$UM`+Q#$Q!6|zsq_`dLO5YK-6bJM6ya>}H+vnW^h?o$z;V&wvuM$dR& zeEq;uUUh$XR`TWeC$$c&Jjau2it3#%J-y}Qm>nW*s?En?R&6w@sDXMEr#8~$=b(gk zwDC3)NtAP;M2BW_lL^5ShpK$D%@|BnD{=!Tq)o(5@z3i7Z){} zGr}Exom_qDO{kAVkZ*MbLNHE666Kina#D{&>Jy%~w7yX$oj;cYCd^p9zy z8*+wgSEcj$4{WxKmCF(5o7U4jqwEvO&dm1H#7z}%VXAbW&W24v-tS6N3}qrm1OnE)fUkoE8yMMn9S$?IswS88tQWm4#Oid#ckgr6 zRtHm!mfNl-`d>O*1~d7%;~n+{Rph6BBy^95zqI{K((E!iFQ+h*C3EsbxNo_aRm5gj zKYug($r*Q#W9`p%Bf{bi6;IY0v`pB^^qu)gbg9QHQ7 zWBj(a1YSu)~2RK8Pi#C>{DMlrqFb9e_RehEHyI{n?e3vL_}L>kYJC z_ly$$)zFi*SFyNrnOt(B*7E$??s67EO%DgoZL2XNk8iVx~X_)o++4oaK1M|ou73vA0K^503j@uuVmLcHH4ya-kOIDfM%5%(E z+Xpt~#7y2!KB&)PoyCA+$~DXqxPxxALy!g-O?<9+9KTk4Pgq4AIdUkl`1<1#j^cJg zgU3`0hkHj_jxV>`Y~%LAZl^3o0}`Sm@iw7kwff{M%VwtN)|~!p{AsfA6vB5UolF~d zHWS%*uBDt<9y!9v2Xe|au&1j&iR1HXCdyCjxSgG*L{wmTD4(NQ=mFjpa~xooc6kju z`~+d{j7$h-;HAB04H!Zscu^hZffL#9!p$)9>sRI|Yovm)g@F>ZnosF2EgkU3ln0bR zTA}|+E(tt)!SG)-bEJi_0m{l+(cAz^pi}`9=~n?y&;2eG;d9{M6nj>BHGn(KA2n|O zt}$=FPq!j`p&kQ8>cirSzkU0c08%8{^Qyqi-w2LoO8)^E7;;I1;HQ6B$u0nNaX2CY zSmfi)F`m94zL8>#zu;8|{aBui@RzRKBlP1&mfFxEC@%cjl?NBs`cr^nm){>;$g?rhKr$AO&6qV_Wbn^}5tfFBry^e1`%du2~o zs$~dN;S_#%iwwA_QvmMjh%Qo?0?rR~6liyN5Xmej8(*V9ym*T`xAhHih-v$7U}8=dfXi2i*aAB!xM(Xekg*ix@r|ymDw*{*s0?dlVys2e)z62u1 z+k3esbJE=-P5S$&KdFp+2H7_2e=}OKDrf( z9-207?6$@f4m4B+9E*e((Y89!q?zH|mz_vM>kp*HGXldO0Hg#!EtFhRuOm$u8e~a9 z5(roy7m$Kh+zjW6@zw{&20u?1f2uP&boD}$#Zy)4o&T;vyBoqFiF2t;*g=|1=)PxB z8eM3Mp=l_obbc?I^xyLz?4Y1YDWPa+nm;O<$Cn;@ane616`J9OO2r=rZr{I_Kizyc zP#^^WCdIEp*()rRT+*YZK>V@^Zs=ht32x>Kwe zab)@ZEffz;VM4{XA6e421^h~`ji5r%)B{wZu#hD}f3$y@L0JV9f3g{-RK!A?vBUA}${YF(vO4)@`6f1 z-A|}e#LN{)(eXloDnX4Vs7eH|<@{r#LodP@Nz--$Dg_Par%DCpu2>2jUnqy~|J?eZ zBG4FVsz_A+ibdwv>mLp>P!(t}E>$JGaK$R~;fb{O3($y1ssQQo|5M;^JqC?7qe|hg zu0ZOqeFcp?qVn&Qu7FQJ4hcFi&|nR!*j)MF#b}QO^lN%5)4p*D^H+B){n8%VPUzi! zDihoGcP71a6!ab`l^hK&*dYrVYzJ0)#}xVrp!e;lI!+x+bfCN0KXwUAPU9@#l7@0& QuEJmfE|#`Dqx|px0L@K;Y5)KL literal 0 HcmV?d00001 diff --git a/samples/client/echo_api/java/apache-httpclient/gradle/wrapper/gradle-wrapper.properties b/samples/client/echo_api/java/apache-httpclient/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000000..ffed3a254e --- /dev/null +++ b/samples/client/echo_api/java/apache-httpclient/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/samples/client/echo_api/java/apache-httpclient/gradlew b/samples/client/echo_api/java/apache-httpclient/gradlew new file mode 100644 index 0000000000..005bcde042 --- /dev/null +++ b/samples/client/echo_api/java/apache-httpclient/gradlew @@ -0,0 +1,234 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit + +APP_NAME="Gradle" +APP_BASE_NAME=${0##*/} + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='-Dfile.encoding=UTF-8 "-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/samples/client/echo_api/java/apache-httpclient/gradlew.bat b/samples/client/echo_api/java/apache-httpclient/gradlew.bat new file mode 100644 index 0000000000..6a68175eb7 --- /dev/null +++ b/samples/client/echo_api/java/apache-httpclient/gradlew.bat @@ -0,0 +1,89 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS=-Dfile.encoding=UTF-8 "-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/samples/client/echo_api/java/apache-httpclient/pom.xml b/samples/client/echo_api/java/apache-httpclient/pom.xml new file mode 100644 index 0000000000..ff221f1c1b --- /dev/null +++ b/samples/client/echo_api/java/apache-httpclient/pom.xml @@ -0,0 +1,285 @@ + + 4.0.0 + org.openapitools + echo-api-apache-httpclient + jar + echo-api-apache-httpclient + 0.1.0 + https://github.com/openapitools/openapi-generator + OpenAPI Java + + scm:git:git@github.com:openapitools/openapi-generator.git + scm:git:git@github.com:openapitools/openapi-generator.git + https://github.com/openapitools/openapi-generator + + + + + Unlicense + http://www.apache.org/licenses/LICENSE-2.0.html + repo + + + + + + OpenAPI-Generator Contributors + team@openapitools.org + OpenAPITools.org + http://openapitools.org + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.10.1 + + 1.8 + 1.8 + true + 128m + 512m + + -Xlint:all + -J-Xss4m + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.1.0 + + + enforce-maven + + enforce + + + + + 2.2.0 + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.0.0-M7 + + + + loggerPath + conf/log4j.properties + + + -Xms512m -Xmx1500m + methods + 10 + pertest + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory}/lib + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.3.0 + + + + test-jar + + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.3.0 + + + add_sources + generate-sources + + add-source + + + + src/main/java + + + + + add_test_sources + generate-test-sources + + add-test-source + + + + src/test/java + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.4.1 + + none + 1.8 + + + + attach-javadocs + + jar + + + + + + org.apache.maven.plugins + maven-source-plugin + 3.2.1 + + + attach-sources + + jar-no-fork + + + + + + + + + + sign-artifacts + + + + org.apache.maven.plugins + maven-gpg-plugin + 3.0.1 + + + sign-artifacts + verify + + sign + + + + + + + + + + + + + + com.google.code.findbugs + jsr305 + 3.0.2 + + + + + + org.apache.httpcomponents + httpclient + ${httpclient-version} + + + org.apache.httpcomponents + httpmime + ${httpclient-version} + + + + + com.fasterxml.jackson.core + jackson-core + ${jackson-version} + + + com.fasterxml.jackson.core + jackson-annotations + ${jackson-version} + + + com.fasterxml.jackson.core + jackson-databind + ${jackson-databind-version} + + + com.fasterxml.jackson.jaxrs + jackson-jaxrs-json-provider + ${jackson-version} + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + ${jackson-version} + + + org.openapitools + jackson-databind-nullable + ${jackson-databind-nullable-version} + + + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} + provided + + + + junit + junit + ${junit-version} + test + + + + UTF-8 + 4.5.13 + 2.14.1 + 2.14.1 + 0.2.4 + 1.3.5 + 4.13.2 + + diff --git a/samples/client/echo_api/java/apache-httpclient/settings.gradle b/samples/client/echo_api/java/apache-httpclient/settings.gradle new file mode 100644 index 0000000000..390288a4e0 --- /dev/null +++ b/samples/client/echo_api/java/apache-httpclient/settings.gradle @@ -0,0 +1 @@ +rootProject.name = "echo-api-apache-httpclient" \ No newline at end of file diff --git a/samples/client/echo_api/java/apache-httpclient/src/main/AndroidManifest.xml b/samples/client/echo_api/java/apache-httpclient/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..54fbcb3da1 --- /dev/null +++ b/samples/client/echo_api/java/apache-httpclient/src/main/AndroidManifest.xml @@ -0,0 +1,3 @@ + + + diff --git a/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/ApiClient.java new file mode 100644 index 0000000000..8a028457e1 --- /dev/null +++ b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/ApiClient.java @@ -0,0 +1,959 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package org.openapitools.client; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.*; +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +import java.time.OffsetDateTime; +import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JavaType; + +import org.apache.http.Header; +import org.apache.http.HttpEntity; +import org.apache.http.HttpResponse; +import org.apache.http.HttpStatus; +import org.apache.http.NameValuePair; +import org.apache.http.ParseException; +import org.apache.http.client.config.RequestConfig; +import org.apache.http.client.entity.UrlEncodedFormEntity; +import org.apache.http.client.methods.CloseableHttpResponse; +import org.apache.http.client.methods.RequestBuilder; +import org.apache.http.client.protocol.HttpClientContext; +import org.apache.http.entity.ByteArrayEntity; +import org.apache.http.entity.ContentType; +import org.apache.http.entity.FileEntity; +import org.apache.http.entity.StringEntity; +import org.apache.http.entity.mime.MultipartEntityBuilder; +import org.apache.http.impl.client.BasicCookieStore; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.impl.client.HttpClients; +import org.apache.http.impl.cookie.BasicClientCookie; +import org.apache.http.message.BasicNameValuePair; +import org.apache.http.util.EntityUtils; +import org.apache.http.cookie.Cookie; + +import java.util.Collection; +import java.util.Collections; +import java.util.Map; +import java.util.Map.Entry; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Arrays; +import java.util.ArrayList; +import java.util.Date; +import java.util.TimeZone; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import java.net.URLEncoder; + +import java.io.File; +import java.io.InputStream; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.nio.charset.Charset; +import java.nio.file.Files; +import java.nio.file.StandardCopyOption; +import java.nio.file.Paths; +import java.lang.reflect.Type; +import java.net.URI; + +import java.text.DateFormat; + +import org.openapitools.client.auth.Authentication; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ApiClient extends JavaTimeFormatter { + private Map defaultHeaderMap = new HashMap(); + private Map defaultCookieMap = new HashMap(); + private String basePath = "http://localhost:3000"; + protected List servers = new ArrayList(Arrays.asList( + new ServerConfiguration( + "http://localhost:3000", + "No description provided", + new HashMap() + ) + )); + protected Integer serverIndex = 0; + protected Map serverVariables = null; + private boolean debugging = false; + private int connectionTimeout = 0; + + private CloseableHttpClient httpClient; + private ObjectMapper objectMapper; + protected String tempFolderPath = null; + + private Map authentications; + + private int statusCode; + private Map> responseHeaders; + + private DateFormat dateFormat; + + // Methods that can have a request body + private static List bodyMethods = Arrays.asList("POST", "PUT", "DELETE", "PATCH"); + + public ApiClient(CloseableHttpClient httpClient) { + objectMapper = new ObjectMapper(); + objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); + objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + objectMapper.configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, false); + objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); + objectMapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); + objectMapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING); + objectMapper.registerModule(new JavaTimeModule()); + objectMapper.setDateFormat(ApiClient.buildDefaultDateFormat()); + + dateFormat = ApiClient.buildDefaultDateFormat(); + + // Set default User-Agent. + setUserAgent("OpenAPI-Generator/0.1.0/java"); + + // Setup authentications (key: authentication name, value: authentication). + authentications = new HashMap(); + // Prevent the authentications from being modified. + authentications = Collections.unmodifiableMap(authentications); + + this.httpClient = httpClient; + } + + public ApiClient() { + this(HttpClients.createDefault()); + } + + public static DateFormat buildDefaultDateFormat() { + return new RFC3339DateFormat(); + } + + /** + * Returns the current object mapper used for JSON serialization/deserialization. + *

+ * Note: If you make changes to the object mapper, remember to set it back via + * setObjectMapper in order to trigger HTTP client rebuilding. + *

+ * @return Object mapper + */ + public ObjectMapper getObjectMapper() { + return objectMapper; + } + + /** + * Sets the object mapper. + * + * @param objectMapper object mapper + * @return API client + */ + public ApiClient setObjectMapper(ObjectMapper objectMapper) { + this.objectMapper = objectMapper; + return this; + } + + public CloseableHttpClient getHttpClient() { + return httpClient; + } + + /** + * Sets the HTTP client. + * + * @param httpClient HTTP client + * @return API client + */ + public ApiClient setHttpClient(CloseableHttpClient httpClient) { + this.httpClient = httpClient; + return this; + } + + public String getBasePath() { + return basePath; + } + + /** + * Sets the base path. + * + * @param basePath base path + * @return API client + */ + public ApiClient setBasePath(String basePath) { + this.basePath = basePath; + this.serverIndex = null; + return this; + } + + public List getServers() { + return servers; + } + + /** + * Sets the server. + * + * @param servers a list of server configuration + * @return API client + */ + public ApiClient setServers(List servers) { + this.servers = servers; + return this; + } + + public Integer getServerIndex() { + return serverIndex; + } + + /** + * Sets the server index. + * + * @param serverIndex server index + * @return API client + */ + public ApiClient setServerIndex(Integer serverIndex) { + this.serverIndex = serverIndex; + return this; + } + + public Map getServerVariables() { + return serverVariables; + } + + /** + * Sets the server variables. + * + * @param serverVariables server variables + * @return API client + */ + public ApiClient setServerVariables(Map serverVariables) { + this.serverVariables = serverVariables; + return this; + } + + /** + * Gets the status code of the previous request + * + * @return Status code + */ + public int getStatusCode() { + return statusCode; + } + + /** + * Gets the response headers of the previous request + * @return Response headers + */ + public Map> getResponseHeaders() { + return responseHeaders; + } + + /** + * Get authentications (key: authentication name, value: authentication). + * @return Map of authentication + */ + public Map getAuthentications() { + return authentications; + } + + /** + * Get authentication for the given name. + * + * @param authName The authentication name + * @return The authentication, null if not found + */ + public Authentication getAuthentication(String authName) { + return authentications.get(authName); + } + + /** + * The path of temporary folder used to store downloaded files from endpoints + * with file response. The default value is null, i.e. using + * the system's default temporary folder. + * + * @return Temp folder path + */ + public String getTempFolderPath() { + return tempFolderPath; + } + + + + + + /** + * Set the User-Agent header's value (by adding to the default header map). + * @param userAgent User agent + * @return API client + */ + public ApiClient setUserAgent(String userAgent) { + addDefaultHeader("User-Agent", userAgent); + return this; + } + + /** + * Set temp folder path + * @param tempFolderPath Temp folder path + * @return API client + */ + public ApiClient setTempFolderPath(String tempFolderPath) { + this.tempFolderPath = tempFolderPath; + return this; + } + + /** + * Add a default header. + * + * @param key The header's key + * @param value The header's value + * @return API client + */ + public ApiClient addDefaultHeader(String key, String value) { + defaultHeaderMap.put(key, value); + return this; + } + + /** + * Add a default cookie. + * + * @param key The cookie's key + * @param value The cookie's value + * @return API client + */ + public ApiClient addDefaultCookie(String key, String value) { + defaultCookieMap.put(key, value); + return this; + } + + /** + * Check that whether debugging is enabled for this API client. + * @return True if debugging is on + */ + public boolean isDebugging() { + return debugging; + } + + /** + * Enable/disable debugging for this API client. + * + * @param debugging To enable (true) or disable (false) debugging + * @return API client + */ + public ApiClient setDebugging(boolean debugging) { + // TODO: implement debugging mode + this.debugging = debugging; + return this; + } + + /** + * Connect timeout (in milliseconds). + * @return Connection timeout + */ + public int getConnectTimeout() { + return connectionTimeout; + } + + /** + * Set the connect timeout (in milliseconds). + * A value of 0 means no timeout, otherwise values must be between 1 and + * {@link Integer#MAX_VALUE}. + * @param connectionTimeout Connection timeout in milliseconds + * @return API client + */ + public ApiClient setConnectTimeout(int connectionTimeout) { + this.connectionTimeout = connectionTimeout; + return this; + } + + /** + * Get the date format used to parse/format date parameters. + * @return Date format + */ + public DateFormat getDateFormat() { + return dateFormat; + } + + /** + * Set the date format used to parse/format date parameters. + * @param dateFormat Date format + * @return API client + */ + public ApiClient setDateFormat(DateFormat dateFormat) { + this.dateFormat = dateFormat; + // Also set the date format for model (de)serialization with Date properties. + this.objectMapper.setDateFormat((DateFormat) dateFormat.clone()); + return this; + } + + /** + * Parse the given string into Date object. + * @param str String + * @return Date + */ + public Date parseDate(String str) { + try { + return dateFormat.parse(str); + } catch (java.text.ParseException e) { + throw new RuntimeException(e); + } + } + + /** + * Format the given Date object into string. + * @param date Date + * @return Date in string format + */ + public String formatDate(Date date) { + return dateFormat.format(date); + } + + /** + * Format the given parameter object into string. + * @param param Object + * @return Object in string format + */ + public String parameterToString(Object param) { + if (param == null) { + return ""; + } else if (param instanceof Date) { + return formatDate((Date) param); + } else if (param instanceof OffsetDateTime) { + return formatOffsetDateTime((OffsetDateTime) param); + } else if (param instanceof Collection) { + StringBuilder b = new StringBuilder(); + for(Object o : (Collection)param) { + if(b.length() > 0) { + b.append(','); + } + b.append(String.valueOf(o)); + } + return b.toString(); + } else { + return String.valueOf(param); + } + } + + /** + * Formats the specified query parameter to a list containing a single {@code Pair} object. + * + * Note that {@code value} must not be a collection. + * + * @param name The name of the parameter. + * @param value The value of the parameter. + * @return A list containing a single {@code Pair} object. + */ + public List parameterToPair(String name, Object value) { + List params = new ArrayList(); + + // preconditions + if (name == null || name.isEmpty() || value == null || value instanceof Collection) { + return params; + } + + params.add(new Pair(name, escapeString(parameterToString(value)))); + return params; + } + + /** + * Formats the specified collection query parameters to a list of {@code Pair} objects. + * + * Note that the values of each of the returned Pair objects are percent-encoded. + * + * @param collectionFormat The collection format of the parameter. + * @param name The name of the parameter. + * @param value The value of the parameter. + * @return A list of {@code Pair} objects. + */ + public List parameterToPairs(String collectionFormat, String name, Collection value) { + List params = new ArrayList(); + + // preconditions + if (name == null || name.isEmpty() || value == null) { + return params; + } + + // create the params based on the collection format + if ("multi".equals(collectionFormat)) { + for (Object item : value) { + params.add(new Pair(name, escapeString(parameterToString(item)))); + } + return params; + } + + // collectionFormat is assumed to be "csv" by default + String delimiter = ","; + + // escape all delimiters except commas, which are URI reserved + // characters + if ("ssv".equals(collectionFormat)) { + delimiter = escapeString(" "); + } else if ("tsv".equals(collectionFormat)) { + delimiter = escapeString("\t"); + } else if ("pipes".equals(collectionFormat)) { + delimiter = escapeString("|"); + } + + StringBuilder sb = new StringBuilder() ; + for (Object item : value) { + sb.append(delimiter); + sb.append(escapeString(parameterToString(item))); + } + + params.add(new Pair(name, sb.substring(delimiter.length()))); + + return params; + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime MIME + * @return True if MIME type is boolean + */ + public boolean isJsonMime(String mime) { + String jsonMime = "(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$"; + return mime != null && (mime.matches(jsonMime) || mime.equals("*/*")); + } + + /** + * Select the Accept header's value from the given accepts array: + * if JSON exists in the given array, use it; + * otherwise use all of them (joining into a string) + * + * @param accepts The accepts array to select from + * @return The Accept header to use. If the given array is empty, + * null will be returned (not to set the Accept header explicitly). + */ + public String selectHeaderAccept(String[] accepts) { + if (accepts.length == 0) { + return null; + } + for (String accept : accepts) { + if (isJsonMime(accept)) { + return accept; + } + } + return StringUtil.join(accepts, ","); + } + + /** + * Select the Content-Type header's value from the given array: + * if JSON exists in the given array, use it; + * otherwise use the first one of the array. + * + * @param contentTypes The Content-Type array to select from + * @return The Content-Type header to use. If the given array is empty, + * or matches "any", JSON will be used. + */ + public String selectHeaderContentType(String[] contentTypes) { + if (contentTypes.length == 0 || contentTypes[0].equals("*/*")) { + return "application/json"; + } + for (String contentType : contentTypes) { + if (isJsonMime(contentType)) { + return contentType; + } + } + return contentTypes[0]; + } + + /** + * Escape the given string to be used as URL query value. + * @param str String + * @return Escaped string + */ + public String escapeString(String str) { + try { + return URLEncoder.encode(str, "utf8").replaceAll("\\+", "%20"); + } catch (UnsupportedEncodingException e) { + return str; + } + } + + /** + * Transforms response headers into map. + * + * @param headers HTTP headers + * @return a map of string array + */ + protected Map> transformResponseHeaders(Header[] headers) { + Map> headersMap = new HashMap<>(); + for (Header header : headers) { + List valuesList = headersMap.get(header.getName()); + if (valuesList != null) { + valuesList.add(header.getValue()); + } else { + valuesList = new ArrayList<>(); + valuesList.add(header.getValue()); + headersMap.put(header.getName(), valuesList); + } + } + return headersMap; + } + + /** + * Parse content type object from header value + */ + private ContentType getContentType(String headerValue) throws ApiException { + try { + return ContentType.parse(headerValue); + } catch (ParseException e) { + throw new ApiException("Could not parse content type " + headerValue); + } + } + + /** + * Get content type of a response or null if one was not provided + */ + private String getResponseMimeType(HttpResponse response) throws ApiException { + Header contentTypeHeader = response.getFirstHeader("Content-Type"); + if (contentTypeHeader != null) { + return getContentType(contentTypeHeader.getValue()).getMimeType(); + } + return null; + } + + /** + * Serialize the given Java object into string according the given + * Content-Type (only JSON is supported for now). + * @param obj Object + * @param contentType Content type + * @param formParams Form parameters + * @return Object + * @throws ApiException API exception + */ + public HttpEntity serialize(Object obj, Map formParams, ContentType contentType) throws ApiException { + String mimeType = contentType.getMimeType(); + if (isJsonMime(mimeType)) { + try { + return new StringEntity(objectMapper.writeValueAsString(obj), contentType); + } catch (JsonProcessingException e) { + throw new ApiException(e); + } + } else if (mimeType.equals(ContentType.MULTIPART_FORM_DATA.getMimeType())) { + MultipartEntityBuilder multiPartBuilder = MultipartEntityBuilder.create(); + for (Entry paramEntry : formParams.entrySet()) { + Object value = paramEntry.getValue(); + if (value instanceof File) { + multiPartBuilder.addBinaryBody(paramEntry.getKey(), (File) value); + } else if (value instanceof byte[]) { + multiPartBuilder.addBinaryBody(paramEntry.getKey(), (byte[]) value); + } else { + Charset charset = contentType.getCharset(); + if (charset != null) { + ContentType customContentType = ContentType.create(ContentType.TEXT_PLAIN.getMimeType(), charset); + multiPartBuilder.addTextBody(paramEntry.getKey(), parameterToString(paramEntry.getValue()), + customContentType); + } else { + multiPartBuilder.addTextBody(paramEntry.getKey(), parameterToString(paramEntry.getValue())); + } + } + } + return multiPartBuilder.build(); + } else if (mimeType.equals(ContentType.APPLICATION_FORM_URLENCODED.getMimeType())) { + List formValues = new ArrayList<>(); + for (Entry paramEntry : formParams.entrySet()) { + formValues.add(new BasicNameValuePair(paramEntry.getKey(), parameterToString(paramEntry.getValue()))); + } + return new UrlEncodedFormEntity(formValues, contentType.getCharset()); + } else { + // Handle files with unknown content type + if (obj instanceof File) { + return new FileEntity((File) obj, contentType); + } else if (obj instanceof byte[]) { + return new ByteArrayEntity((byte[]) obj, contentType); + } + throw new ApiException("Serialization for content type '" + contentType + "' not supported"); + } + } + + /** + * Deserialize response body to Java object according to the Content-Type. + * + * @param Type + * @param response Response + * @param valueType Return type + * @return Deserialized object + * @throws ApiException API exception + * @throws IOException IO exception + */ + @SuppressWarnings("unchecked") + public T deserialize(HttpResponse response, TypeReference valueType) throws ApiException, IOException { + if (valueType == null) { + return null; + } + HttpEntity entity = response.getEntity(); + Type valueRawType = valueType.getType(); + if (valueRawType.equals(byte[].class)) { + return (T) EntityUtils.toByteArray(entity); + } else if (valueRawType.equals(File.class)) { + return (T) downloadFileFromResponse(response); + } + String mimeType = getResponseMimeType(response); + if (mimeType == null || isJsonMime(mimeType)) { + // Assume json if no mime type + return objectMapper.readValue(entity.getContent(), valueType); + } else if ("text/plain".equalsIgnoreCase(mimeType)) { + // convert input stream to string + java.util.Scanner s = new java.util.Scanner(entity.getContent()).useDelimiter("\\A"); + return (T) (s.hasNext() ? s.next() : ""); + } else { + throw new ApiException( + "Deserialization for content type '" + mimeType + "' not supported for type '" + valueType + "'", + response.getStatusLine().getStatusCode(), + responseHeaders, + EntityUtils.toString(entity) + ); + } + } + + private File downloadFileFromResponse(HttpResponse response) throws IOException { + Header contentDispositionHeader = response.getFirstHeader("Content-Disposition"); + String contentDisposition = contentDispositionHeader == null ? null : contentDispositionHeader.getValue(); + File file = prepareDownloadFile(contentDisposition); + Files.copy(response.getEntity().getContent(), file.toPath(), StandardCopyOption.REPLACE_EXISTING); + return file; + } + + protected File prepareDownloadFile(String contentDisposition) throws IOException { + String filename = null; + if (contentDisposition != null && !"".equals(contentDisposition)) { + // Get filename from the Content-Disposition header. + Pattern pattern = Pattern.compile("filename=['\"]?([^'\"\\s]+)['\"]?"); + Matcher matcher = pattern.matcher(contentDisposition); + if (matcher.find()) + filename = matcher.group(1); + } + + String prefix; + String suffix = null; + if (filename == null) { + prefix = "download-"; + suffix = ""; + } else { + int pos = filename.lastIndexOf('.'); + if (pos == -1) { + prefix = filename + "-"; + } else { + prefix = filename.substring(0, pos) + "-"; + suffix = filename.substring(pos); + } + // Files.createTempFile requires the prefix to be at least three characters long + if (prefix.length() < 3) + prefix = "download-"; + } + + if (tempFolderPath == null) + return Files.createTempFile(prefix, suffix).toFile(); + else + return Files.createTempFile(Paths.get(tempFolderPath), prefix, suffix).toFile(); + } + + /** + * Build full URL by concatenating base path, the given sub path and query parameters. + * + * @param path The sub path + * @param queryParams The query parameters + * @param collectionQueryParams The collection query parameters + * @return The full URL + */ + private String buildUrl(String path, List queryParams, List collectionQueryParams) { + String baseURL; + if (serverIndex != null) { + if (serverIndex < 0 || serverIndex >= servers.size()) { + throw new ArrayIndexOutOfBoundsException(String.format( + "Invalid index %d when selecting the host settings. Must be less than %d", serverIndex, servers.size() + )); + } + baseURL = servers.get(serverIndex).URL(serverVariables); + } else { + baseURL = basePath; + } + + final StringBuilder url = new StringBuilder(); + url.append(baseURL).append(path); + + if (queryParams != null && !queryParams.isEmpty()) { + // support (constant) query string in `path`, e.g. "/posts?draft=1" + String prefix = path.contains("?") ? "&" : "?"; + for (Pair param : queryParams) { + if (param.getValue() != null) { + if (prefix != null) { + url.append(prefix); + prefix = null; + } else { + url.append("&"); + } + String value = parameterToString(param.getValue()); + // query parameter value already escaped as part of parameterToPair + url.append(escapeString(param.getName())).append("=").append(value); + } + } + } + + if (collectionQueryParams != null && !collectionQueryParams.isEmpty()) { + String prefix = url.toString().contains("?") ? "&" : "?"; + for (Pair param : collectionQueryParams) { + if (param.getValue() != null) { + if (prefix != null) { + url.append(prefix); + prefix = null; + } else { + url.append("&"); + } + String value = parameterToString(param.getValue()); + // collection query parameter value already escaped as part of parameterToPairs + url.append(escapeString(param.getName())).append("=").append(value); + } + } + } + + return url.toString(); + } + + protected boolean isSuccessfulStatus(int statusCode) { + return statusCode >= 200 && statusCode < 300; + } + + protected boolean isBodyAllowed(String method) { + return bodyMethods.contains(method); + } + + protected Cookie buildCookie(String key, String value, URI uri) { + BasicClientCookie cookie = new BasicClientCookie(key, value); + cookie.setDomain(uri.getHost()); + cookie.setPath("/"); + return cookie; + } + + protected T processResponse(CloseableHttpResponse response, TypeReference returnType) throws ApiException, IOException { + statusCode = response.getStatusLine().getStatusCode(); + if (statusCode == HttpStatus.SC_NO_CONTENT) { + return null; + } + + responseHeaders = transformResponseHeaders(response.getAllHeaders()); + if (isSuccessfulStatus(statusCode)) { + return this.deserialize(response, returnType); + } else { + String message = EntityUtils.toString(response.getEntity()); + throw new ApiException(message, statusCode, responseHeaders, message); + } + } + + /** + * Invoke API by sending HTTP request with the given options. + * + * @param Type + * @param path The sub-path of the HTTP URL + * @param method The request method, one of "GET", "POST", "PUT", and "DELETE" + * @param queryParams The query parameters + * @param collectionQueryParams The collection query parameters + * @param body The request body object - if it is not binary, otherwise null + * @param headerParams The header parameters + * @param cookieParams The cookie parameters + * @param formParams The form parameters + * @param accept The request's Accept header + * @param contentType The request's Content-Type header + * @param authNames The authentications to apply + * @param returnType Return type + * @return The response body in type of string + * @throws ApiException API exception + */ + public T invokeAPI( + String path, + String method, + List queryParams, + List collectionQueryParams, + Object body, + Map headerParams, + Map cookieParams, + Map formParams, + String accept, + String contentType, + String[] authNames, + TypeReference returnType) throws ApiException { + if (body != null && !formParams.isEmpty()) { + throw new ApiException("Cannot have body and form params"); + } + + updateParamsForAuth(authNames, queryParams, headerParams, cookieParams); + final String url = buildUrl(path, queryParams, collectionQueryParams); + + RequestBuilder builder = RequestBuilder.create(method); + builder.setUri(url); + + RequestConfig config = RequestConfig.custom() + .setConnectionRequestTimeout(connectionTimeout) + .build(); + builder.setConfig(config); + + if (accept != null) { + builder.addHeader("Accept", accept); + } + for (Entry keyValue : headerParams.entrySet()) { + builder.addHeader(keyValue.getKey(), keyValue.getValue()); + } + for (Map.Entry keyValue : defaultHeaderMap.entrySet()) { + if (!headerParams.containsKey(keyValue.getKey())) { + builder.addHeader(keyValue.getKey(), keyValue.getValue()); + } + } + + BasicCookieStore store = new BasicCookieStore(); + for (Entry keyValue : cookieParams.entrySet()) { + store.addCookie(buildCookie(keyValue.getKey(), keyValue.getValue(), builder.getUri())); + } + for (Entry keyValue : defaultCookieMap.entrySet()) { + if (!cookieParams.containsKey(keyValue.getKey())) { + store.addCookie(buildCookie(keyValue.getKey(), keyValue.getValue(), builder.getUri())); + } + } + + HttpClientContext context = HttpClientContext.create(); + context.setCookieStore(store); + + ContentType contentTypeObj = getContentType(contentType); + if (body != null || !formParams.isEmpty()) { + if (isBodyAllowed(method)) { + // Add entity if we have content and a valid method + builder.setEntity(serialize(body, formParams, contentTypeObj)); + } else { + throw new ApiException("method " + method + " does not support a request body"); + } + } + + try (CloseableHttpResponse response = httpClient.execute(builder.build(), context)) { + return processResponse(response, returnType); + } catch (IOException e) { + throw new ApiException(e); + } + } + + /** + * Update query and header parameters based on authentication settings. + * + * @param authNames The authentications to apply + * @param queryParams Query parameters + * @param headerParams Header parameters + * @param cookieParams Cookie parameters + */ + private void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams, Map cookieParams) { + for (String authName : authNames) { + Authentication auth = authentications.get(authName); + if (auth == null) throw new RuntimeException("Authentication undefined: " + authName); + auth.applyToParams(queryParams, headerParams, cookieParams); + } + } +} diff --git a/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/ApiException.java b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/ApiException.java new file mode 100644 index 0000000000..53d011b4ce --- /dev/null +++ b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/ApiException.java @@ -0,0 +1,100 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client; + +import java.util.Map; +import java.util.List; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ApiException extends Exception { + private int code = 0; + private Map> responseHeaders = null; + private String responseBody = null; + + public ApiException() {} + + public ApiException(Throwable throwable) { + super(throwable); + } + + public ApiException(String message) { + super(message); + } + + public ApiException(String message, Throwable throwable, int code, Map> responseHeaders, String responseBody) { + super(message, throwable); + this.code = code; + this.responseHeaders = responseHeaders; + this.responseBody = responseBody; + } + + public ApiException(String message, int code, Map> responseHeaders, String responseBody) { + this(message, (Throwable) null, code, responseHeaders, responseBody); + } + + public ApiException(String message, Throwable throwable, int code, Map> responseHeaders) { + this(message, throwable, code, responseHeaders, null); + } + + public ApiException(int code, Map> responseHeaders, String responseBody) { + this("Response Code: " + code + " Response Body: " + responseBody, (Throwable) null, code, responseHeaders, responseBody); + } + + public ApiException(int code, String message) { + super(message); + this.code = code; + } + + public ApiException(int code, String message, Map> responseHeaders, String responseBody) { + this(code, message); + this.responseHeaders = responseHeaders; + this.responseBody = responseBody; + } + + /** + * Get the HTTP status code. + * + * @return HTTP status code + */ + public int getCode() { + return code; + } + + /** + * Get the HTTP response headers. + * + * @return A map of list of string + */ + public Map> getResponseHeaders() { + return responseHeaders; + } + + /** + * Get the HTTP response body. + * + * @return Response body in the form of string + */ + public String getResponseBody() { + return responseBody; + } + + @Override + public String toString() { + return "ApiException{" + + "code=" + code + + ", responseHeaders=" + responseHeaders + + ", responseBody='" + responseBody + '\'' + + '}'; + } +} diff --git a/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/Configuration.java b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/Configuration.java new file mode 100644 index 0000000000..494ef32ff5 --- /dev/null +++ b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/Configuration.java @@ -0,0 +1,39 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * 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; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Configuration { + private static ApiClient defaultApiClient = new ApiClient(); + + /** + * Get the default API client, which would be used when creating API + * instances without providing an API client. + * + * @return Default API client + */ + public static ApiClient getDefaultApiClient() { + return defaultApiClient; + } + + /** + * Set the default API client, which would be used when creating API + * instances without providing an API client. + * + * @param apiClient API client + */ + public static void setDefaultApiClient(ApiClient apiClient) { + defaultApiClient = apiClient; + } +} diff --git a/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/JavaTimeFormatter.java b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/JavaTimeFormatter.java new file mode 100644 index 0000000000..b51199a21b --- /dev/null +++ b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/JavaTimeFormatter.java @@ -0,0 +1,64 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package org.openapitools.client; + +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.time.format.DateTimeParseException; + +/** + * Class that add parsing/formatting support for Java 8+ {@code OffsetDateTime} class. + * It's generated for java clients when {@code AbstractJavaCodegen#dateLibrary} specified as {@code java8}. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class JavaTimeFormatter { + + private DateTimeFormatter offsetDateTimeFormatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME; + + /** + * Get the date format used to parse/format {@code OffsetDateTime} parameters. + * @return DateTimeFormatter + */ + public DateTimeFormatter getOffsetDateTimeFormatter() { + return offsetDateTimeFormatter; + } + + /** + * Set the date format used to parse/format {@code OffsetDateTime} parameters. + * @param offsetDateTimeFormatter {@code DateTimeFormatter} + */ + public void setOffsetDateTimeFormatter(DateTimeFormatter offsetDateTimeFormatter) { + this.offsetDateTimeFormatter = offsetDateTimeFormatter; + } + + /** + * Parse the given string into {@code OffsetDateTime} object. + * @param str String + * @return {@code OffsetDateTime} + */ + public OffsetDateTime parseOffsetDateTime(String str) { + try { + return OffsetDateTime.parse(str, offsetDateTimeFormatter); + } catch (DateTimeParseException e) { + throw new RuntimeException(e); + } + } + /** + * Format the given {@code OffsetDateTime} object into string. + * @param offsetDateTime {@code OffsetDateTime} + * @return {@code OffsetDateTime} in string format + */ + public String formatOffsetDateTime(OffsetDateTime offsetDateTime) { + return offsetDateTimeFormatter.format(offsetDateTime); + } +} diff --git a/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/Pair.java b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/Pair.java new file mode 100644 index 0000000000..6518a0948d --- /dev/null +++ b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/Pair.java @@ -0,0 +1,57 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * 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; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Pair { + private String name = ""; + private String value = ""; + + public Pair (String name, String value) { + setName(name); + setValue(value); + } + + private void setName(String name) { + if (!isValidString(name)) { + return; + } + + this.name = name; + } + + private void setValue(String value) { + if (!isValidString(value)) { + return; + } + + this.value = value; + } + + public String getName() { + return this.name; + } + + public String getValue() { + return this.value; + } + + private boolean isValidString(String arg) { + if (arg == null) { + return false; + } + + return true; + } +} diff --git a/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/RFC3339DateFormat.java b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/RFC3339DateFormat.java new file mode 100644 index 0000000000..22bbe68c49 --- /dev/null +++ b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/RFC3339DateFormat.java @@ -0,0 +1,57 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package org.openapitools.client; + +import com.fasterxml.jackson.databind.util.StdDateFormat; + +import java.text.DateFormat; +import java.text.FieldPosition; +import java.text.ParsePosition; +import java.util.Date; +import java.text.DecimalFormat; +import java.util.GregorianCalendar; +import java.util.TimeZone; + +public class RFC3339DateFormat extends DateFormat { + private static final long serialVersionUID = 1L; + private static final TimeZone TIMEZONE_Z = TimeZone.getTimeZone("UTC"); + + private final StdDateFormat fmt = new StdDateFormat() + .withTimeZone(TIMEZONE_Z) + .withColonInTimeZone(true); + + public RFC3339DateFormat() { + this.calendar = new GregorianCalendar(); + this.numberFormat = new DecimalFormat(); + } + + @Override + public Date parse(String source) { + return parse(source, new ParsePosition(0)); + } + + @Override + public Date parse(String source, ParsePosition pos) { + return fmt.parse(source, pos); + } + + @Override + public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) { + return fmt.format(date, toAppendTo, fieldPosition); + } + + @Override + public Object clone() { + return super.clone(); + } +} \ No newline at end of file diff --git a/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/ServerConfiguration.java b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/ServerConfiguration.java new file mode 100644 index 0000000000..59edc528a4 --- /dev/null +++ b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/ServerConfiguration.java @@ -0,0 +1,58 @@ +package org.openapitools.client; + +import java.util.Map; + +/** + * Representing a Server configuration. + */ +public class ServerConfiguration { + public String URL; + public String description; + public Map variables; + + /** + * @param URL A URL to the target host. + * @param description A description of the host designated by the URL. + * @param variables A map between a variable name and its value. The value is used for substitution in the server's URL template. + */ + public ServerConfiguration(String URL, String description, Map variables) { + this.URL = URL; + this.description = description; + this.variables = variables; + } + + /** + * Format URL template using given variables. + * + * @param variables A map between a variable name and its value. + * @return Formatted URL. + */ + public String URL(Map variables) { + String url = this.URL; + + // go through variables and replace placeholders + for (Map.Entry variable: this.variables.entrySet()) { + String name = variable.getKey(); + ServerVariable serverVariable = variable.getValue(); + String value = serverVariable.defaultValue; + + if (variables != null && variables.containsKey(name)) { + value = variables.get(name); + if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { + throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + "."); + } + } + url = url.replace("{" + name + "}", value); + } + return url; + } + + /** + * Format URL template using default server variables. + * + * @return Formatted URL. + */ + public String URL() { + return URL(null); + } +} diff --git a/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/ServerVariable.java b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/ServerVariable.java new file mode 100644 index 0000000000..c2f13e2166 --- /dev/null +++ b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/ServerVariable.java @@ -0,0 +1,23 @@ +package org.openapitools.client; + +import java.util.HashSet; + +/** + * Representing a Server Variable for server URL template substitution. + */ +public class ServerVariable { + public String description; + public String defaultValue; + public HashSet enumValues = null; + + /** + * @param description A description for the server variable. + * @param defaultValue The default value to use for substitution. + * @param enumValues An enumeration of string values to be used if the substitution options are from a limited set. + */ + public ServerVariable(String description, String defaultValue, HashSet enumValues) { + this.description = description; + this.defaultValue = defaultValue; + this.enumValues = enumValues; + } +} diff --git a/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/StringUtil.java b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/StringUtil.java new file mode 100644 index 0000000000..d6c3fc8a96 --- /dev/null +++ b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/StringUtil.java @@ -0,0 +1,83 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client; + +import java.util.Collection; +import java.util.Iterator; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class StringUtil { + /** + * Check if the given array contains the given value (with case-insensitive comparison). + * + * @param array The array + * @param value The value to search + * @return true if the array contains the value + */ + public static boolean containsIgnoreCase(String[] array, String value) { + for (String str : array) { + if (value == null && str == null) { + return true; + } + if (value != null && value.equalsIgnoreCase(str)) { + return true; + } + } + return false; + } + + /** + * Join an array of strings with the given separator. + *

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

+ * + * @param array The array of strings + * @param separator The separator + * @return the resulting string + */ + public static String join(String[] array, String separator) { + int len = array.length; + if (len == 0) { + return ""; + } + + StringBuilder out = new StringBuilder(); + out.append(array[0]); + for (int i = 1; i < len; i++) { + out.append(separator).append(array[i]); + } + return out.toString(); + } + + /** + * Join a list of strings with the given separator. + * + * @param list The list of strings + * @param separator The separator + * @return the resulting string + */ + public static String join(Collection list, String separator) { + Iterator iterator = list.iterator(); + StringBuilder out = new StringBuilder(); + if (iterator.hasNext()) { + out.append(iterator.next()); + } + while (iterator.hasNext()) { + out.append(separator).append(iterator.next()); + } + return out.toString(); + } +} diff --git a/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/api/PathApi.java b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/api/PathApi.java new file mode 100644 index 0000000000..4d45512164 --- /dev/null +++ b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/api/PathApi.java @@ -0,0 +1,114 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * 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 com.fasterxml.jackson.core.type.TypeReference; + +import org.openapitools.client.ApiException; +import org.openapitools.client.ApiClient; +import org.openapitools.client.Configuration; +import org.openapitools.client.model.*; +import org.openapitools.client.Pair; + + + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PathApi { + private ApiClient apiClient; + + public PathApi() { + this(Configuration.getDefaultApiClient()); + } + + public PathApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Test path parameter(s) + * Test path parameter(s) + * @param pathString (required) + * @param pathInteger (required) + * @return String + * @throws ApiException if fails to make API call + */ + public String testsPathStringPathStringIntegerPathInteger(String pathString, Integer pathInteger) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'pathString' is set + if (pathString == null) { + throw new ApiException(400, "Missing the required parameter 'pathString' when calling testsPathStringPathStringIntegerPathInteger"); + } + + // verify the required parameter 'pathInteger' is set + if (pathInteger == null) { + throw new ApiException(400, "Missing the required parameter 'pathInteger' when calling testsPathStringPathStringIntegerPathInteger"); + } + + // create path and map variables + String localVarPath = "/path/string/{path_string}/integer/{path_integer}" + .replaceAll("\\{" + "path_string" + "\\}", apiClient.escapeString(pathString.toString())) + .replaceAll("\\{" + "path_integer" + "\\}", apiClient.escapeString(pathInteger.toString())); + + // query params + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + final String[] localVarAccepts = { + "text/plain" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + TypeReference localVarReturnType = new TypeReference() {}; + return apiClient.invokeAPI( + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + localVarReturnType + ); + } +} diff --git a/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/api/QueryApi.java b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/api/QueryApi.java new file mode 100644 index 0000000000..0fc6966af1 --- /dev/null +++ b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/api/QueryApi.java @@ -0,0 +1,217 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * 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 com.fasterxml.jackson.core.type.TypeReference; + +import org.openapitools.client.ApiException; +import org.openapitools.client.ApiClient; +import org.openapitools.client.Configuration; +import org.openapitools.client.model.*; +import org.openapitools.client.Pair; + +import org.openapitools.client.model.Pet; +import org.openapitools.client.model.TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter; + + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class QueryApi { + private ApiClient apiClient; + + public QueryApi() { + this(Configuration.getDefaultApiClient()); + } + + public QueryApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Test query parameter(s) + * Test query parameter(s) + * @param integerQuery (optional) + * @param booleanQuery (optional) + * @param stringQuery (optional) + * @return String + * @throws ApiException if fails to make API call + */ + public String testQueryIntegerBooleanString(Integer integerQuery, Boolean booleanQuery, String stringQuery) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/query/integer/boolean/string"; + + // query params + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPair("integer_query", integerQuery)); + localVarQueryParams.addAll(apiClient.parameterToPair("boolean_query", booleanQuery)); + localVarQueryParams.addAll(apiClient.parameterToPair("string_query", stringQuery)); + + + + final String[] localVarAccepts = { + "text/plain" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + TypeReference localVarReturnType = new TypeReference() {}; + return apiClient.invokeAPI( + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + localVarReturnType + ); + } + /** + * Test query parameter(s) + * Test query parameter(s) + * @param queryObject (optional) + * @return String + * @throws ApiException if fails to make API call + */ + public String testQueryStyleFormExplodeTrueArrayString(TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter queryObject) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/query/style_form/explode_true/array_string"; + + // query params + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "values", queryObject.getValues())); + + + + final String[] localVarAccepts = { + "text/plain" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + TypeReference localVarReturnType = new TypeReference() {}; + return apiClient.invokeAPI( + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + localVarReturnType + ); + } + /** + * Test query parameter(s) + * Test query parameter(s) + * @param queryObject (optional) + * @return String + * @throws ApiException if fails to make API call + */ + public String testQueryStyleFormExplodeTrueObject(Pet queryObject) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/query/style_form/explode_true/object"; + + // query params + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPair("id", queryObject.getId())); + localVarQueryParams.addAll(apiClient.parameterToPair("name", queryObject.getName())); + localVarQueryParams.addAll(apiClient.parameterToPair("category", queryObject.getCategory())); + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "photoUrls", queryObject.getPhotoUrls())); + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "tags", queryObject.getTags())); + localVarQueryParams.addAll(apiClient.parameterToPair("status", queryObject.getStatus())); + + + + final String[] localVarAccepts = { + "text/plain" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + TypeReference localVarReturnType = new TypeReference() {}; + return apiClient.invokeAPI( + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + localVarReturnType + ); + } +} diff --git a/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java new file mode 100644 index 0000000000..3e77c69480 --- /dev/null +++ b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java @@ -0,0 +1,77 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.auth; + +import org.openapitools.client.Pair; + +import java.util.Map; +import java.util.List; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ApiKeyAuth implements Authentication { + private final String location; + private final String paramName; + + private String apiKey; + private String apiKeyPrefix; + + public ApiKeyAuth(String location, String paramName) { + this.location = location; + this.paramName = paramName; + } + + public String getLocation() { + return location; + } + + public String getParamName() { + return paramName; + } + + public String getApiKey() { + return apiKey; + } + + public void setApiKey(String apiKey) { + this.apiKey = apiKey; + } + + public String getApiKeyPrefix() { + return apiKeyPrefix; + } + + public void setApiKeyPrefix(String apiKeyPrefix) { + this.apiKeyPrefix = apiKeyPrefix; + } + + @Override + public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { + if (apiKey == null) { + return; + } + String value; + if (apiKeyPrefix != null) { + value = apiKeyPrefix + " " + apiKey; + } else { + value = apiKey; + } + if ("query".equals(location)) { + queryParams.add(new Pair(paramName, value)); + } else if ("header".equals(location)) { + headerParams.put(paramName, value); + } else if ("cookie".equals(location)) { + cookieParams.put(paramName, value); + } + } +} diff --git a/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/auth/Authentication.java b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/auth/Authentication.java new file mode 100644 index 0000000000..4df1c67232 --- /dev/null +++ b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/auth/Authentication.java @@ -0,0 +1,30 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.auth; + +import org.openapitools.client.Pair; + +import java.util.Map; +import java.util.List; + +public interface Authentication { + /** + * Apply authentication settings to header and query params. + * + * @param queryParams List of query parameters + * @param headerParams Map of header parameters + * @param cookieParams Map of cookie parameters + */ + void applyToParams(List queryParams, Map headerParams, Map cookieParams); +} diff --git a/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java new file mode 100644 index 0000000000..09f92fecfb --- /dev/null +++ b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java @@ -0,0 +1,53 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.auth; + +import org.openapitools.client.Pair; + +import java.util.Base64; +import java.nio.charset.StandardCharsets; + +import java.util.Map; +import java.util.List; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class HttpBasicAuth implements Authentication { + private String username; + private String password; + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + @Override + public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { + if (username == null && password == null) { + return; + } + String str = (username == null ? "" : username) + ":" + (password == null ? "" : password); + headerParams.put("Authorization", "Basic " + Base64.getEncoder().encodeToString(str.getBytes(StandardCharsets.UTF_8))); + } +} diff --git a/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java new file mode 100644 index 0000000000..8c7cdd743e --- /dev/null +++ b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java @@ -0,0 +1,60 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.auth; + +import org.openapitools.client.Pair; + +import java.util.Map; +import java.util.List; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class HttpBearerAuth implements Authentication { + private final String scheme; + private String bearerToken; + + public HttpBearerAuth(String scheme) { + this.scheme = scheme; + } + + /** + * Gets the token, which together with the scheme, will be sent as the value of the Authorization header. + * + * @return The bearer token + */ + public String getBearerToken() { + return bearerToken; + } + + /** + * Sets the token, which together with the scheme, will be sent as the value of the Authorization header. + * + * @param bearerToken The bearer token to send in the Authorization header + */ + public void setBearerToken(String bearerToken) { + this.bearerToken = bearerToken; + } + + @Override + public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { + if(bearerToken == null) { + return; + } + + headerParams.put("Authorization", (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken); + } + + private static String upperCaseBearer(String scheme) { + return ("bearer".equalsIgnoreCase(scheme)) ? "Bearer" : scheme; + } +} diff --git a/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/Category.java b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/Category.java new file mode 100644 index 0000000000..b2a52c12a2 --- /dev/null +++ b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/Category.java @@ -0,0 +1,136 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Category + */ +@JsonPropertyOrder({ + Category.JSON_PROPERTY_ID, + Category.JSON_PROPERTY_NAME +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Category { + public static final String JSON_PROPERTY_ID = "id"; + private Long id; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public Category() { + } + + public Category id(Long id) { + + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(Long id) { + this.id = id; + } + + + public Category name(String name) { + + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(String name) { + this.name = name; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Category category = (Category) o; + return Objects.equals(this.id, category.id) && + Objects.equals(this.name, category.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Category {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/Pet.java new file mode 100644 index 0000000000..3484a3d0c6 --- /dev/null +++ b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/Pet.java @@ -0,0 +1,318 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.client.model.Category; +import org.openapitools.client.model.Tag; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Pet + */ +@JsonPropertyOrder({ + Pet.JSON_PROPERTY_ID, + Pet.JSON_PROPERTY_NAME, + Pet.JSON_PROPERTY_CATEGORY, + Pet.JSON_PROPERTY_PHOTO_URLS, + Pet.JSON_PROPERTY_TAGS, + Pet.JSON_PROPERTY_STATUS +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Pet { + public static final String JSON_PROPERTY_ID = "id"; + private Long id; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_CATEGORY = "category"; + private Category category; + + public static final String JSON_PROPERTY_PHOTO_URLS = "photoUrls"; + private List photoUrls = new ArrayList<>(); + + public static final String JSON_PROPERTY_TAGS = "tags"; + private List tags = null; + + /** + * pet status in the store + */ + public enum StatusEnum { + AVAILABLE("available"), + + PENDING("pending"), + + SOLD("sold"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_STATUS = "status"; + private StatusEnum status; + + public Pet() { + } + + public Pet id(Long id) { + + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(Long id) { + this.id = id; + } + + + public Pet name(String name) { + + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setName(String name) { + this.name = name; + } + + + public Pet category(Category category) { + + this.category = category; + return this; + } + + /** + * Get category + * @return category + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CATEGORY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Category getCategory() { + return category; + } + + + @JsonProperty(JSON_PROPERTY_CATEGORY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCategory(Category category) { + this.category = category; + } + + + public Pet photoUrls(List photoUrls) { + + this.photoUrls = photoUrls; + return this; + } + + public Pet addPhotoUrlsItem(String photoUrlsItem) { + this.photoUrls.add(photoUrlsItem); + return this; + } + + /** + * Get photoUrls + * @return photoUrls + **/ + @javax.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_PHOTO_URLS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public List getPhotoUrls() { + return photoUrls; + } + + + @JsonProperty(JSON_PROPERTY_PHOTO_URLS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setPhotoUrls(List photoUrls) { + this.photoUrls = photoUrls; + } + + + public Pet tags(List tags) { + + this.tags = tags; + return this; + } + + public Pet addTagsItem(Tag tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Get tags + * @return tags + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getTags() { + return tags; + } + + + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTags(List tags) { + this.tags = tags; + } + + + public Pet status(StatusEnum status) { + + this.status = status; + return this; + } + + /** + * pet status in the store + * @return status + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public StatusEnum getStatus() { + return status; + } + + + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setStatus(StatusEnum status) { + this.status = status; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Pet pet = (Pet) o; + return Objects.equals(this.id, pet.id) && + Objects.equals(this.name, pet.name) && + Objects.equals(this.category, pet.category) && + Objects.equals(this.photoUrls, pet.photoUrls) && + Objects.equals(this.tags, pet.tags) && + Objects.equals(this.status, pet.status); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, category, photoUrls, tags, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Pet {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/Tag.java new file mode 100644 index 0000000000..2da4a88b52 --- /dev/null +++ b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/Tag.java @@ -0,0 +1,136 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Tag + */ +@JsonPropertyOrder({ + Tag.JSON_PROPERTY_ID, + Tag.JSON_PROPERTY_NAME +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Tag { + public static final String JSON_PROPERTY_ID = "id"; + private Long id; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public Tag() { + } + + public Tag id(Long id) { + + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(Long id) { + this.id = id; + } + + + public Tag name(String name) { + + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(String name) { + this.name = name; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Tag tag = (Tag) o; + return Objects.equals(this.id, tag.id) && + Objects.equals(this.name, tag.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Tag {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.java b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.java new file mode 100644 index 0000000000..4fc23acdc7 --- /dev/null +++ b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.java @@ -0,0 +1,115 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter + */ +@JsonPropertyOrder({ + TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.JSON_PROPERTY_VALUES +}) +@JsonTypeName("test_query_style_form_explode_true_array_string_query_object_parameter") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter { + public static final String JSON_PROPERTY_VALUES = "values"; + private List values = null; + + public TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter() { + } + + public TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter values(List values) { + + this.values = values; + return this; + } + + public TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter addValuesItem(String valuesItem) { + if (this.values == null) { + this.values = new ArrayList<>(); + } + this.values.add(valuesItem); + return this; + } + + /** + * Get values + * @return values + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALUES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getValues() { + return values; + } + + + @JsonProperty(JSON_PROPERTY_VALUES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setValues(List values) { + this.values = values; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter testQueryStyleFormExplodeTrueArrayStringQueryObjectParameter = (TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter) o; + return Objects.equals(this.values, testQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.values); + } + + @Override + public int hashCode() { + return Objects.hash(values); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter {\n"); + sb.append(" values: ").append(toIndentedString(values)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/echo_api/java/apache-httpclient/src/test/java/org/openapitools/client/CustomTest.java b/samples/client/echo_api/java/apache-httpclient/src/test/java/org/openapitools/client/CustomTest.java new file mode 100644 index 0000000000..3d0eee0cf5 --- /dev/null +++ b/samples/client/echo_api/java/apache-httpclient/src/test/java/org/openapitools/client/CustomTest.java @@ -0,0 +1,85 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.oprg + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client; + +import org.junit.Assert; +import org.openapitools.client.ApiException; +import org.openapitools.client.api.QueryApi; +import org.openapitools.client.model.Category; +import org.openapitools.client.model.Pet; +import org.openapitools.client.model.TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.*; + + +/** + * API tests for QueryApi + */ +public class CustomTest { + + private final QueryApi api = new QueryApi(); + + + /** + * Test query parameter(s) + *

+ * Test query parameter(s) + * + * @throws ApiException if the Api call fails + */ + @Test + public void testQueryStyleFormExplodeTrueObjectTest() throws ApiException { + Pet queryObject = new Pet().id(12345L).name("Hello World"). + photoUrls(Arrays.asList(new String[]{"http://a.com", "http://b.com"})).category(new Category().id(987L).name("new category")); + + // TODO uncomment below to test deepObject + //String response = api.testQueryStyleFormExplodeTrueObject(queryObject); + //org.openapitools.client.EchoServerResponseParser p = new org.openapitools.client.EchoServerResponseParser(response); + //Assert.assertEquals("/query/style_form/explode_true/object?id=12345&name=Hello%20World&category=class%20Category%20%7B%0A%20%20%20%20id%3A%20987%0A%20%20%20%20name%3A%20new%20category%0A%7D&photoUrls=http%3A%2F%2Fa.com&photoUrls=http%3A%2F%2Fb.com", p.path); + } + + /** + * Test query parameter(s) + *

+ * Test query parameter(s) + * + * @throws ApiException if the Api call fails + */ + @Test + public void testQueryStyleFormExplodeTrueArrayString() throws ApiException { + TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter q = new TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter() + .values(Arrays.asList(new String[]{"hello world 1", "hello world 2"})); + + String response = api.testQueryStyleFormExplodeTrueArrayString(q); + org.openapitools.client.EchoServerResponseParser p = new org.openapitools.client.EchoServerResponseParser(response); + Assert.assertEquals("/query/style_form/explode_true/array_string?values=hello%20world%201&values=hello%20world%202", p.path); + } + + /** + * Test query parameter(s) + *

+ * Test query parameter(s) + * + * @throws ApiException if the Api call fails + */ + @Test + public void testQueryIntegerBooleanString() throws ApiException { + String response = api.testQueryIntegerBooleanString(1, true, "Hello World"); + org.openapitools.client.EchoServerResponseParser p = new org.openapitools.client.EchoServerResponseParser(response); + Assert.assertEquals("/query/integer/boolean/string?integer_query=1&boolean_query=true&string_query=Hello%20World", p.path); + } + +} diff --git a/samples/client/echo_api/java/apache-httpclient/src/test/java/org/openapitools/client/EchoServerResponseParser.java b/samples/client/echo_api/java/apache-httpclient/src/test/java/org/openapitools/client/EchoServerResponseParser.java new file mode 100644 index 0000000000..b68af6d4a7 --- /dev/null +++ b/samples/client/echo_api/java/apache-httpclient/src/test/java/org/openapitools/client/EchoServerResponseParser.java @@ -0,0 +1,51 @@ +/* + * Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.client; + +public class EchoServerResponseParser { + public String method; // e.g. GET + public String path; // e.g. /query/style_form/explode_true/object?id=12345 + public String protocol; // e.g. HTTP/1.1 + public java.util.HashMap headers = new java.util.HashMap<>(); + + public EchoServerResponseParser(String response) { + if (response == null) { + throw new RuntimeException("Echo server response cannot be null"); + } + + String[] lines = response.split("\n"); + boolean firstLine = true; + + for (String line : lines) { + if (firstLine) { + String[] items = line.split(" "); + this.method = items[0]; + this.path = items[1]; + this.protocol = items[2]; + firstLine = false; + continue; + } + + // store the header key-value pair in headers + String[] keyValue = line.split(": "); + if (keyValue.length == 2) { // skip blank line, non key-value pair + this.headers.put(keyValue[0], keyValue[1]); + } + } + + } +} diff --git a/samples/client/echo_api/java/apache-httpclient/src/test/java/org/openapitools/client/api/PathApiTest.java b/samples/client/echo_api/java/apache-httpclient/src/test/java/org/openapitools/client/api/PathApiTest.java new file mode 100644 index 0000000000..abb4fd0429 --- /dev/null +++ b/samples/client/echo_api/java/apache-httpclient/src/test/java/org/openapitools/client/api/PathApiTest.java @@ -0,0 +1,52 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * 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.junit.Test; +import org.junit.Ignore; +import org.junit.Assert; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for PathApi + */ +@Ignore +public class PathApiTest { + + private final PathApi api = new PathApi(); + + /** + * Test path parameter(s) + * + * Test path parameter(s) + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testsPathStringPathStringIntegerPathIntegerTest() throws ApiException { + String pathString = null; + Integer pathInteger = null; + String response = api.testsPathStringPathStringIntegerPathInteger(pathString, pathInteger); + + // TODO: test validations + } +} diff --git a/samples/client/echo_api/java/apache-httpclient/src/test/java/org/openapitools/client/api/QueryApiTest.java b/samples/client/echo_api/java/apache-httpclient/src/test/java/org/openapitools/client/api/QueryApiTest.java new file mode 100644 index 0000000000..69ae8a2216 --- /dev/null +++ b/samples/client/echo_api/java/apache-httpclient/src/test/java/org/openapitools/client/api/QueryApiTest.java @@ -0,0 +1,85 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * 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.model.TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter; +import org.junit.Test; +import org.junit.Ignore; +import org.junit.Assert; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for QueryApi + */ +@Ignore +public class QueryApiTest { + + private final QueryApi api = new QueryApi(); + + /** + * Test query parameter(s) + * + * Test query parameter(s) + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testQueryIntegerBooleanStringTest() throws ApiException { + Integer integerQuery = null; + Boolean booleanQuery = null; + String stringQuery = null; + String response = api.testQueryIntegerBooleanString(integerQuery, booleanQuery, stringQuery); + + // TODO: test validations + } + /** + * Test query parameter(s) + * + * Test query parameter(s) + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testQueryStyleFormExplodeTrueArrayStringTest() throws ApiException { + TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter queryObject = null; + String response = api.testQueryStyleFormExplodeTrueArrayString(queryObject); + + // TODO: test validations + } + /** + * Test query parameter(s) + * + * Test query parameter(s) + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testQueryStyleFormExplodeTrueObjectTest() throws ApiException { + Pet queryObject = null; + String response = api.testQueryStyleFormExplodeTrueObject(queryObject); + + // TODO: test validations + } +} diff --git a/samples/client/echo_api/java/apache-httpclient/src/test/java/org/openapitools/client/model/CategoryTest.java b/samples/client/echo_api/java/apache-httpclient/src/test/java/org/openapitools/client/model/CategoryTest.java new file mode 100644 index 0000000000..51804e0c14 --- /dev/null +++ b/samples/client/echo_api/java/apache-httpclient/src/test/java/org/openapitools/client/model/CategoryTest.java @@ -0,0 +1,56 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for Category + */ +public class CategoryTest { + private final Category model = new Category(); + + /** + * Model tests for Category + */ + @Test + public void testCategory() { + // TODO: test Category + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + +} diff --git a/samples/client/echo_api/java/apache-httpclient/src/test/java/org/openapitools/client/model/PetTest.java b/samples/client/echo_api/java/apache-httpclient/src/test/java/org/openapitools/client/model/PetTest.java new file mode 100644 index 0000000000..2002d08bf8 --- /dev/null +++ b/samples/client/echo_api/java/apache-httpclient/src/test/java/org/openapitools/client/model/PetTest.java @@ -0,0 +1,92 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.client.model.Category; +import org.openapitools.client.model.Tag; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for Pet + */ +public class PetTest { + private final Pet model = new Pet(); + + /** + * Model tests for Pet + */ + @Test + public void testPet() { + // TODO: test Pet + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'category' + */ + @Test + public void categoryTest() { + // TODO: test category + } + + /** + * Test the property 'photoUrls' + */ + @Test + public void photoUrlsTest() { + // TODO: test photoUrls + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + +} diff --git a/samples/client/echo_api/java/apache-httpclient/src/test/java/org/openapitools/client/model/TagTest.java b/samples/client/echo_api/java/apache-httpclient/src/test/java/org/openapitools/client/model/TagTest.java new file mode 100644 index 0000000000..d1d4b9de0d --- /dev/null +++ b/samples/client/echo_api/java/apache-httpclient/src/test/java/org/openapitools/client/model/TagTest.java @@ -0,0 +1,56 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for Tag + */ +public class TagTest { + private final Tag model = new Tag(); + + /** + * Model tests for Tag + */ + @Test + public void testTag() { + // TODO: test Tag + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + +} diff --git a/samples/client/echo_api/java/apache-httpclient/src/test/java/org/openapitools/client/model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameterTest.java b/samples/client/echo_api/java/apache-httpclient/src/test/java/org/openapitools/client/model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameterTest.java new file mode 100644 index 0000000000..82e7035a25 --- /dev/null +++ b/samples/client/echo_api/java/apache-httpclient/src/test/java/org/openapitools/client/model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameterTest.java @@ -0,0 +1,50 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.List; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter + */ +public class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameterTest { + private final TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter model = new TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter(); + + /** + * Model tests for TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter + */ + @Test + public void testTestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter() { + // TODO: test TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter + } + + /** + * Test the property 'values' + */ + @Test + public void valuesTest() { + // TODO: test values + } + +} diff --git a/samples/client/echo_api/java/native/.openapi-generator/FILES b/samples/client/echo_api/java/native/.openapi-generator/FILES index 47b38d17c7..de036ed7e7 100644 --- a/samples/client/echo_api/java/native/.openapi-generator/FILES +++ b/samples/client/echo_api/java/native/.openapi-generator/FILES @@ -6,6 +6,7 @@ api/openapi.yaml build.gradle build.sbt docs/Category.md +docs/PathApi.md docs/Pet.md docs/QueryApi.md docs/Tag.md @@ -28,6 +29,7 @@ src/main/java/org/openapitools/client/Pair.java src/main/java/org/openapitools/client/RFC3339DateFormat.java src/main/java/org/openapitools/client/ServerConfiguration.java src/main/java/org/openapitools/client/ServerVariable.java +src/main/java/org/openapitools/client/api/PathApi.java src/main/java/org/openapitools/client/api/QueryApi.java src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java src/main/java/org/openapitools/client/model/Category.java diff --git a/samples/client/echo_api/java/native/README.md b/samples/client/echo_api/java/native/README.md index ffea3d084c..b31d16de14 100644 --- a/samples/client/echo_api/java/native/README.md +++ b/samples/client/echo_api/java/native/README.md @@ -74,21 +74,22 @@ Please follow the [installation](#installation) instruction and execute the foll import org.openapitools.client.*; import org.openapitools.client.model.*; -import org.openapitools.client.api.QueryApi; +import org.openapitools.client.api.PathApi; -public class QueryApiExample { +public class PathApiExample { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); // Configure clients using the `defaultClient` object, such as // overriding the host and port, timeout, etc. - QueryApi apiInstance = new QueryApi(defaultClient); - TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter queryObject = new HashMap(); // TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter | + PathApi apiInstance = new PathApi(defaultClient); + String pathString = "pathString_example"; // String | + Integer pathInteger = 56; // Integer | try { - String result = apiInstance.testQueryStyleFormExplodeTrueArrayString(queryObject); + String result = apiInstance.testsPathStringPathStringIntegerPathInteger(pathString, pathInteger); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling QueryApi#testQueryStyleFormExplodeTrueArrayString"); + System.err.println("Exception when calling PathApi#testsPathStringPathStringIntegerPathInteger"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -105,6 +106,10 @@ All URIs are relative to *http://localhost:3000* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- +*PathApi* | [**testsPathStringPathStringIntegerPathInteger**](docs/PathApi.md#testsPathStringPathStringIntegerPathInteger) | **GET** /path/string/{path_string}/integer/{path_integer} | Test path parameter(s) +*PathApi* | [**testsPathStringPathStringIntegerPathIntegerWithHttpInfo**](docs/PathApi.md#testsPathStringPathStringIntegerPathIntegerWithHttpInfo) | **GET** /path/string/{path_string}/integer/{path_integer} | Test path parameter(s) +*QueryApi* | [**testQueryIntegerBooleanString**](docs/QueryApi.md#testQueryIntegerBooleanString) | **GET** /query/integer/boolean/string | Test query parameter(s) +*QueryApi* | [**testQueryIntegerBooleanStringWithHttpInfo**](docs/QueryApi.md#testQueryIntegerBooleanStringWithHttpInfo) | **GET** /query/integer/boolean/string | Test query parameter(s) *QueryApi* | [**testQueryStyleFormExplodeTrueArrayString**](docs/QueryApi.md#testQueryStyleFormExplodeTrueArrayString) | **GET** /query/style_form/explode_true/array_string | Test query parameter(s) *QueryApi* | [**testQueryStyleFormExplodeTrueArrayStringWithHttpInfo**](docs/QueryApi.md#testQueryStyleFormExplodeTrueArrayStringWithHttpInfo) | **GET** /query/style_form/explode_true/array_string | Test query parameter(s) *QueryApi* | [**testQueryStyleFormExplodeTrueObject**](docs/QueryApi.md#testQueryStyleFormExplodeTrueObject) | **GET** /query/style_form/explode_true/object | Test query parameter(s) diff --git a/samples/client/echo_api/java/native/api/openapi.yaml b/samples/client/echo_api/java/native/api/openapi.yaml index 5ea2d69650..b782a803da 100644 --- a/samples/client/echo_api/java/native/api/openapi.yaml +++ b/samples/client/echo_api/java/native/api/openapi.yaml @@ -11,6 +11,73 @@ info: servers: - url: http://localhost:3000/ paths: + /path/string/{path_string}/integer/{path_integer}: + get: + description: Test path parameter(s) + operationId: "tests/path/string/{path_string}/integer/{path_integer}" + parameters: + - explode: false + in: path + name: path_string + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: path_integer + required: true + schema: + type: integer + style: simple + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test path parameter(s) + tags: + - path + x-accepts: text/plain + /query/integer/boolean/string: + get: + description: Test query parameter(s) + operationId: test/query/integer/boolean/string + parameters: + - explode: true + in: query + name: integer_query + required: false + schema: + type: integer + style: form + - explode: true + in: query + name: boolean_query + required: false + schema: + type: boolean + style: form + - explode: true + in: query + name: string_query + required: false + schema: + type: string + style: form + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test query parameter(s) + tags: + - query + x-accepts: text/plain /query/style_form/explode_true/array_string: get: description: Test query parameter(s) diff --git a/samples/client/echo_api/java/native/docs/PathApi.md b/samples/client/echo_api/java/native/docs/PathApi.md new file mode 100644 index 0000000000..de5e2f72e6 --- /dev/null +++ b/samples/client/echo_api/java/native/docs/PathApi.md @@ -0,0 +1,148 @@ +# PathApi + +All URIs are relative to *http://localhost:3000* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**testsPathStringPathStringIntegerPathInteger**](PathApi.md#testsPathStringPathStringIntegerPathInteger) | **GET** /path/string/{path_string}/integer/{path_integer} | Test path parameter(s) | +| [**testsPathStringPathStringIntegerPathIntegerWithHttpInfo**](PathApi.md#testsPathStringPathStringIntegerPathIntegerWithHttpInfo) | **GET** /path/string/{path_string}/integer/{path_integer} | Test path parameter(s) | + + + +## testsPathStringPathStringIntegerPathInteger + +> String testsPathStringPathStringIntegerPathInteger(pathString, pathInteger) + +Test path parameter(s) + +Test path parameter(s) + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PathApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + PathApi apiInstance = new PathApi(defaultClient); + String pathString = "pathString_example"; // String | + Integer pathInteger = 56; // Integer | + try { + String result = apiInstance.testsPathStringPathStringIntegerPathInteger(pathString, pathInteger); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PathApi#testsPathStringPathStringIntegerPathInteger"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pathString** | **String**| | | +| **pathInteger** | **Integer**| | | + +### Return type + +**String** + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + +## testsPathStringPathStringIntegerPathIntegerWithHttpInfo + +> ApiResponse testsPathStringPathStringIntegerPathInteger testsPathStringPathStringIntegerPathIntegerWithHttpInfo(pathString, pathInteger) + +Test path parameter(s) + +Test path parameter(s) + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.ApiResponse; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PathApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + PathApi apiInstance = new PathApi(defaultClient); + String pathString = "pathString_example"; // String | + Integer pathInteger = 56; // Integer | + try { + ApiResponse response = apiInstance.testsPathStringPathStringIntegerPathIntegerWithHttpInfo(pathString, pathInteger); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling PathApi#testsPathStringPathStringIntegerPathInteger"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pathString** | **String**| | | +| **pathInteger** | **Integer**| | | + +### Return type + +ApiResponse<**String**> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + diff --git a/samples/client/echo_api/java/native/docs/QueryApi.md b/samples/client/echo_api/java/native/docs/QueryApi.md index 0cc16db7c2..f5bf265a04 100644 --- a/samples/client/echo_api/java/native/docs/QueryApi.md +++ b/samples/client/echo_api/java/native/docs/QueryApi.md @@ -4,6 +4,8 @@ All URIs are relative to *http://localhost:3000* | Method | HTTP request | Description | |------------- | ------------- | -------------| +| [**testQueryIntegerBooleanString**](QueryApi.md#testQueryIntegerBooleanString) | **GET** /query/integer/boolean/string | Test query parameter(s) | +| [**testQueryIntegerBooleanStringWithHttpInfo**](QueryApi.md#testQueryIntegerBooleanStringWithHttpInfo) | **GET** /query/integer/boolean/string | Test query parameter(s) | | [**testQueryStyleFormExplodeTrueArrayString**](QueryApi.md#testQueryStyleFormExplodeTrueArrayString) | **GET** /query/style_form/explode_true/array_string | Test query parameter(s) | | [**testQueryStyleFormExplodeTrueArrayStringWithHttpInfo**](QueryApi.md#testQueryStyleFormExplodeTrueArrayStringWithHttpInfo) | **GET** /query/style_form/explode_true/array_string | Test query parameter(s) | | [**testQueryStyleFormExplodeTrueObject**](QueryApi.md#testQueryStyleFormExplodeTrueObject) | **GET** /query/style_form/explode_true/object | Test query parameter(s) | @@ -11,6 +13,148 @@ All URIs are relative to *http://localhost:3000* +## testQueryIntegerBooleanString + +> String testQueryIntegerBooleanString(integerQuery, booleanQuery, stringQuery) + +Test query parameter(s) + +Test query parameter(s) + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.QueryApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + QueryApi apiInstance = new QueryApi(defaultClient); + Integer integerQuery = 56; // Integer | + Boolean booleanQuery = true; // Boolean | + String stringQuery = "stringQuery_example"; // String | + try { + String result = apiInstance.testQueryIntegerBooleanString(integerQuery, booleanQuery, stringQuery); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling QueryApi#testQueryIntegerBooleanString"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **integerQuery** | **Integer**| | [optional] | +| **booleanQuery** | **Boolean**| | [optional] | +| **stringQuery** | **String**| | [optional] | + +### Return type + +**String** + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + +## testQueryIntegerBooleanStringWithHttpInfo + +> ApiResponse testQueryIntegerBooleanString testQueryIntegerBooleanStringWithHttpInfo(integerQuery, booleanQuery, stringQuery) + +Test query parameter(s) + +Test query parameter(s) + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.ApiResponse; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.QueryApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + QueryApi apiInstance = new QueryApi(defaultClient); + Integer integerQuery = 56; // Integer | + Boolean booleanQuery = true; // Boolean | + String stringQuery = "stringQuery_example"; // String | + try { + ApiResponse response = apiInstance.testQueryIntegerBooleanStringWithHttpInfo(integerQuery, booleanQuery, stringQuery); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling QueryApi#testQueryIntegerBooleanString"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **integerQuery** | **Integer**| | [optional] | +| **booleanQuery** | **Boolean**| | [optional] | +| **stringQuery** | **String**| | [optional] | + +### Return type + +ApiResponse<**String**> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + + ## testQueryStyleFormExplodeTrueArrayString > String testQueryStyleFormExplodeTrueArrayString(queryObject) diff --git a/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/PathApi.java b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/PathApi.java new file mode 100644 index 0000000000..dacf46dd26 --- /dev/null +++ b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/PathApi.java @@ -0,0 +1,164 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * 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.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.ApiResponse; +import org.openapitools.client.Pair; + + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.IOException; +import java.io.InputStream; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PathApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public PathApi() { + this(new ApiClient()); + } + + public PathApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Test path parameter(s) + * Test path parameter(s) + * @param pathString (required) + * @param pathInteger (required) + * @return String + * @throws ApiException if fails to make API call + */ + public String testsPathStringPathStringIntegerPathInteger(String pathString, Integer pathInteger) throws ApiException { + ApiResponse localVarResponse = testsPathStringPathStringIntegerPathIntegerWithHttpInfo(pathString, pathInteger); + return localVarResponse.getData(); + } + + /** + * Test path parameter(s) + * Test path parameter(s) + * @param pathString (required) + * @param pathInteger (required) + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse testsPathStringPathStringIntegerPathIntegerWithHttpInfo(String pathString, Integer pathInteger) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = testsPathStringPathStringIntegerPathIntegerRequestBuilder(pathString, pathInteger); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("testsPathStringPathStringIntegerPathInteger", localVarResponse); + } + // for plain text response + InputStream responseBody = localVarResponse.body(); + if (localVarResponse.headers().map().containsKey("Content-Type") && + "text/plain".equalsIgnoreCase(localVarResponse.headers().map().get("Content-Type").get(0))) { + java.util.Scanner s = new java.util.Scanner(responseBody).useDelimiter("\\A"); + String responseBodyText = s.hasNext() ? s.next() : ""; + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBodyText + ); + } else { + throw new RuntimeException("Error! The response Content-Type is supposed to be `text/plain` but it's not: " + localVarResponse); + } + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder testsPathStringPathStringIntegerPathIntegerRequestBuilder(String pathString, Integer pathInteger) throws ApiException { + // verify the required parameter 'pathString' is set + if (pathString == null) { + throw new ApiException(400, "Missing the required parameter 'pathString' when calling testsPathStringPathStringIntegerPathInteger"); + } + // verify the required parameter 'pathInteger' is set + if (pathInteger == null) { + throw new ApiException(400, "Missing the required parameter 'pathInteger' when calling testsPathStringPathStringIntegerPathInteger"); + } + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/path/string/{path_string}/integer/{path_integer}" + .replace("{path_string}", ApiClient.urlEncode(pathString.toString())) + .replace("{path_integer}", ApiClient.urlEncode(pathInteger.toString())); + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "text/plain"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/QueryApi.java b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/QueryApi.java index 8be80e81d2..406ee3b8fa 100644 --- a/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/QueryApi.java +++ b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/QueryApi.java @@ -75,6 +75,97 @@ public class QueryApi { return operationId + " call failed with: " + statusCode + " - " + body; } + /** + * Test query parameter(s) + * Test query parameter(s) + * @param integerQuery (optional) + * @param booleanQuery (optional) + * @param stringQuery (optional) + * @return String + * @throws ApiException if fails to make API call + */ + public String testQueryIntegerBooleanString(Integer integerQuery, Boolean booleanQuery, String stringQuery) throws ApiException { + ApiResponse localVarResponse = testQueryIntegerBooleanStringWithHttpInfo(integerQuery, booleanQuery, stringQuery); + return localVarResponse.getData(); + } + + /** + * Test query parameter(s) + * Test query parameter(s) + * @param integerQuery (optional) + * @param booleanQuery (optional) + * @param stringQuery (optional) + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse testQueryIntegerBooleanStringWithHttpInfo(Integer integerQuery, Boolean booleanQuery, String stringQuery) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = testQueryIntegerBooleanStringRequestBuilder(integerQuery, booleanQuery, stringQuery); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("testQueryIntegerBooleanString", localVarResponse); + } + // for plain text response + InputStream responseBody = localVarResponse.body(); + if (localVarResponse.headers().map().containsKey("Content-Type") && + "text/plain".equalsIgnoreCase(localVarResponse.headers().map().get("Content-Type").get(0))) { + java.util.Scanner s = new java.util.Scanner(responseBody).useDelimiter("\\A"); + String responseBodyText = s.hasNext() ? s.next() : ""; + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBodyText + ); + } else { + throw new RuntimeException("Error! The response Content-Type is supposed to be `text/plain` but it's not: " + localVarResponse); + } + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder testQueryIntegerBooleanStringRequestBuilder(Integer integerQuery, Boolean booleanQuery, String stringQuery) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/query/integer/boolean/string"; + + List localVarQueryParams = new ArrayList<>(); + localVarQueryParams.addAll(ApiClient.parameterToPairs("integer_query", integerQuery)); + localVarQueryParams.addAll(ApiClient.parameterToPairs("boolean_query", booleanQuery)); + localVarQueryParams.addAll(ApiClient.parameterToPairs("string_query", stringQuery)); + + if (!localVarQueryParams.isEmpty()) { + StringJoiner queryJoiner = new StringJoiner("&"); + localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue())); + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString())); + } else { + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + } + + localVarRequestBuilder.header("Accept", "text/plain"); + + localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody()); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } /** * Test query parameter(s) * Test query parameter(s) diff --git a/samples/client/echo_api/java/native/src/test/java/org/openapitools/client/api/PathApiTest.java b/samples/client/echo_api/java/native/src/test/java/org/openapitools/client/api/PathApiTest.java new file mode 100644 index 0000000000..c08a2f286a --- /dev/null +++ b/samples/client/echo_api/java/native/src/test/java/org/openapitools/client/api/PathApiTest.java @@ -0,0 +1,54 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * 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.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for PathApi + */ +@Ignore +public class PathApiTest { + + private final PathApi api = new PathApi(); + + + /** + * Test path parameter(s) + * + * Test path parameter(s) + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testsPathStringPathStringIntegerPathIntegerTest() throws ApiException { + String pathString = null; + Integer pathInteger = null; + String response = + api.testsPathStringPathStringIntegerPathInteger(pathString, pathInteger); + + // TODO: test validations + } + +} diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/ApiClient.java index 4d226d043f..015cc46bef 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/ApiClient.java @@ -596,9 +596,11 @@ public class ApiClient extends JavaTimeFormatter { List params = new ArrayList(); // preconditions - if (name == null || name.isEmpty() || value == null || value instanceof Collection) return params; + if (name == null || name.isEmpty() || value == null || value instanceof Collection) { + return params; + } - params.add(new Pair(name, parameterToString(value))); + params.add(new Pair(name, escapeString(parameterToString(value)))); return params; } @@ -845,6 +847,10 @@ public class ApiClient extends JavaTimeFormatter { if (mimeType == null || isJsonMime(mimeType)) { // Assume json if no mime type return objectMapper.readValue(entity.getContent(), valueType); + } else if ("text/plain".equalsIgnoreCase(mimeType)) { + // convert input stream to string + java.util.Scanner s = new java.util.Scanner(entity.getContent()).useDelimiter("\\A"); + return (T) (s.hasNext() ? s.next() : ""); } else { throw new ApiException( "Deserialization for content type '" + mimeType + "' not supported for type '" + valueType + "'", @@ -933,7 +939,8 @@ public class ApiClient extends JavaTimeFormatter { url.append("&"); } String value = parameterToString(param.getValue()); - url.append(escapeString(param.getName())).append("=").append(escapeString(value)); + // query parameter value already escaped as part of parameterToPair + url.append(escapeString(param.getName())).append("=").append(value); } } } From 1fad61e2f837c7f07fdda5aaec48c715c66d54bd Mon Sep 17 00:00:00 2001 From: William Cheng Date: Thu, 8 Dec 2022 17:29:53 +0800 Subject: [PATCH 088/189] Fix response body in Java native client (#14222) * fix response body in java native client * add new files * update samples --- .../Java/libraries/native/api.mustache | 8 +- .../src/test/resources/3_0/echo_api.yaml | 27 ++++ .../.openapi-generator/FILES | 2 + .../echo_api/java/apache-httpclient/README.md | 14 +- .../java/apache-httpclient/api/openapi.yaml | 46 ++++++ .../java/apache-httpclient/docs/BodyApi.md | 75 +++++++++ .../org/openapitools/client/api/BodyApi.java | 102 ++++++++++++ .../openapitools/client/api/BodyApiTest.java | 52 ++++++ .../java/native/.openapi-generator/FILES | 2 + samples/client/echo_api/java/native/README.md | 15 +- .../echo_api/java/native/api/openapi.yaml | 46 ++++++ .../echo_api/java/native/docs/BodyApi.md | 144 +++++++++++++++++ .../org/openapitools/client/api/BodyApi.java | 150 ++++++++++++++++++ .../org/openapitools/client/api/PathApi.java | 3 +- .../org/openapitools/client/api/QueryApi.java | 9 +- .../org/openapitools/client/CustomTest.java | 29 +++- .../openapitools/client/api/BodyApiTest.java | 54 +++++++ .../common.ts | 1 + .../client/api/AnotherFakeApi.java | 3 +- .../openapitools/client/api/DefaultApi.java | 3 +- .../org/openapitools/client/api/FakeApi.java | 21 +-- .../client/api/FakeClassnameTags123Api.java | 3 +- .../org/openapitools/client/api/PetApi.java | 15 +- .../org/openapitools/client/api/StoreApi.java | 9 +- .../org/openapitools/client/api/UserApi.java | 6 +- 25 files changed, 767 insertions(+), 72 deletions(-) create mode 100644 samples/client/echo_api/java/apache-httpclient/docs/BodyApi.md create mode 100644 samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/api/BodyApi.java create mode 100644 samples/client/echo_api/java/apache-httpclient/src/test/java/org/openapitools/client/api/BodyApiTest.java create mode 100644 samples/client/echo_api/java/native/docs/BodyApi.md create mode 100644 samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/BodyApi.java create mode 100644 samples/client/echo_api/java/native/src/test/java/org/openapitools/client/api/BodyApiTest.java diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/native/api.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/native/api.mustache index 141d144b70..372ea77144 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/native/api.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/native/api.mustache @@ -239,10 +239,9 @@ public class {{classname}} { } {{#vendorExtensions.x-java-text-plain-string}} // for plain text response - InputStream responseBody = localVarResponse.body(); if (localVarResponse.headers().map().containsKey("Content-Type") && "text/plain".equalsIgnoreCase(localVarResponse.headers().map().get("Content-Type").get(0))) { - java.util.Scanner s = new java.util.Scanner(responseBody).useDelimiter("\\A"); + java.util.Scanner s = new java.util.Scanner(localVarResponse.body()).useDelimiter("\\A"); String responseBodyText = s.hasNext() ? s.next() : ""; return new ApiResponse( localVarResponse.statusCode(), @@ -254,14 +253,11 @@ public class {{classname}} { } {{/vendorExtensions.x-java-text-plain-string}} {{^vendorExtensions.x-java-text-plain-string}} - {{#returnType}} - InputStream responseBody = localVarResponse.body(); - {{/returnType}} return new ApiResponse<{{{returnType}}}{{^returnType}}Void{{/returnType}}>( localVarResponse.statusCode(), localVarResponse.headers().map(), {{#returnType}} - responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference<{{{returnType}}}>() {}) // closes the InputStream + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference<{{{returnType}}}>() {}) // closes the InputStream {{/returnType}} {{^returnType}} null diff --git a/modules/openapi-generator/src/test/resources/3_0/echo_api.yaml b/modules/openapi-generator/src/test/resources/3_0/echo_api.yaml index 34ef848a50..e04cd0b357 100644 --- a/modules/openapi-generator/src/test/resources/3_0/echo_api.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/echo_api.yaml @@ -26,6 +26,10 @@ info: servers: - url: http://localhost:3000/ paths: + # Path usually starts with parameter type such as path, query, header, form + # For body/form parameters, path starts with "/echo" so the the echo server + # will response with the same body in the HTTP request. + # # path parameter tests /path/string/{path_string}/integer/{path_integer}: get: @@ -133,8 +137,31 @@ paths: text/plain: schema: type: string + /echo/body/Pet: + post: + tags: + - body + summary: Test body parameter(s) + description: Test body parameter(s) + operationId: test/echo/body/Pet + requestBody: + $ref: '#/components/requestBodies/Pet' + responses: + '200': + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' components: + requestBodies: + Pet: + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store schemas: Category: type: object diff --git a/samples/client/echo_api/java/apache-httpclient/.openapi-generator/FILES b/samples/client/echo_api/java/apache-httpclient/.openapi-generator/FILES index c62abc624a..c13a3b293c 100644 --- a/samples/client/echo_api/java/apache-httpclient/.openapi-generator/FILES +++ b/samples/client/echo_api/java/apache-httpclient/.openapi-generator/FILES @@ -5,6 +5,7 @@ README.md api/openapi.yaml build.gradle build.sbt +docs/BodyApi.md docs/Category.md docs/PathApi.md docs/Pet.md @@ -29,6 +30,7 @@ src/main/java/org/openapitools/client/RFC3339DateFormat.java src/main/java/org/openapitools/client/ServerConfiguration.java src/main/java/org/openapitools/client/ServerVariable.java src/main/java/org/openapitools/client/StringUtil.java +src/main/java/org/openapitools/client/api/BodyApi.java src/main/java/org/openapitools/client/api/PathApi.java src/main/java/org/openapitools/client/api/QueryApi.java src/main/java/org/openapitools/client/auth/ApiKeyAuth.java diff --git a/samples/client/echo_api/java/apache-httpclient/README.md b/samples/client/echo_api/java/apache-httpclient/README.md index 4b27be4f2b..3f6adfee9d 100644 --- a/samples/client/echo_api/java/apache-httpclient/README.md +++ b/samples/client/echo_api/java/apache-httpclient/README.md @@ -75,22 +75,21 @@ Please follow the [installation](#installation) instruction and execute the foll import org.openapitools.client.*; import org.openapitools.client.auth.*; import org.openapitools.client.model.*; -import org.openapitools.client.api.PathApi; +import org.openapitools.client.api.BodyApi; -public class PathApiExample { +public class BodyApiExample { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("http://localhost:3000"); - PathApi apiInstance = new PathApi(defaultClient); - String pathString = "pathString_example"; // String | - Integer pathInteger = 56; // Integer | + BodyApi apiInstance = new BodyApi(defaultClient); + Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store try { - String result = apiInstance.testsPathStringPathStringIntegerPathInteger(pathString, pathInteger); + Pet result = apiInstance.testEchoBodyPet(pet); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PathApi#testsPathStringPathStringIntegerPathInteger"); + System.err.println("Exception when calling BodyApi#testEchoBodyPet"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -107,6 +106,7 @@ All URIs are relative to *http://localhost:3000* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- +*BodyApi* | [**testEchoBodyPet**](docs/BodyApi.md#testEchoBodyPet) | **POST** /echo/body/Pet | Test body parameter(s) *PathApi* | [**testsPathStringPathStringIntegerPathInteger**](docs/PathApi.md#testsPathStringPathStringIntegerPathInteger) | **GET** /path/string/{path_string}/integer/{path_integer} | Test path parameter(s) *QueryApi* | [**testQueryIntegerBooleanString**](docs/QueryApi.md#testQueryIntegerBooleanString) | **GET** /query/integer/boolean/string | Test query parameter(s) *QueryApi* | [**testQueryStyleFormExplodeTrueArrayString**](docs/QueryApi.md#testQueryStyleFormExplodeTrueArrayString) | **GET** /query/style_form/explode_true/array_string | Test query parameter(s) diff --git a/samples/client/echo_api/java/apache-httpclient/api/openapi.yaml b/samples/client/echo_api/java/apache-httpclient/api/openapi.yaml index b782a803da..4dd00e1631 100644 --- a/samples/client/echo_api/java/apache-httpclient/api/openapi.yaml +++ b/samples/client/echo_api/java/apache-httpclient/api/openapi.yaml @@ -124,9 +124,37 @@ paths: tags: - query x-accepts: text/plain + /echo/body/Pet: + post: + description: Test body parameter(s) + operationId: test/echo/body/Pet + requestBody: + $ref: '#/components/requestBodies/Pet' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + description: Successful operation + summary: Test body parameter(s) + tags: + - body + x-content-type: application/json + x-accepts: application/json components: + requestBodies: + Pet: + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store schemas: Category: + example: + name: Dogs + id: 1 properties: id: example: 1 @@ -139,6 +167,9 @@ components: xml: name: category Tag: + example: + name: name + id: 0 properties: id: format: int64 @@ -149,6 +180,21 @@ components: xml: name: tag Pet: + example: + photoUrls: + - photoUrls + - photoUrls + name: doggie + id: 10 + category: + name: Dogs + id: 1 + tags: + - name: name + id: 0 + - name: name + id: 0 + status: available properties: id: example: 10 diff --git a/samples/client/echo_api/java/apache-httpclient/docs/BodyApi.md b/samples/client/echo_api/java/apache-httpclient/docs/BodyApi.md new file mode 100644 index 0000000000..298dede6e4 --- /dev/null +++ b/samples/client/echo_api/java/apache-httpclient/docs/BodyApi.md @@ -0,0 +1,75 @@ +# BodyApi + +All URIs are relative to *http://localhost:3000* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**testEchoBodyPet**](BodyApi.md#testEchoBodyPet) | **POST** /echo/body/Pet | Test body parameter(s) | + + + +## testEchoBodyPet + +> Pet testEchoBodyPet(pet) + +Test body parameter(s) + +Test body parameter(s) + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.BodyApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + BodyApi apiInstance = new BodyApi(defaultClient); + Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store + try { + Pet result = apiInstance.testEchoBodyPet(pet); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BodyApi#testEchoBodyPet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | [optional] | + +### Return type + +[**Pet**](Pet.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + diff --git a/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/api/BodyApi.java b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/api/BodyApi.java new file mode 100644 index 0000000000..825922c125 --- /dev/null +++ b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/api/BodyApi.java @@ -0,0 +1,102 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * 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 com.fasterxml.jackson.core.type.TypeReference; + +import org.openapitools.client.ApiException; +import org.openapitools.client.ApiClient; +import org.openapitools.client.Configuration; +import org.openapitools.client.model.*; +import org.openapitools.client.Pair; + +import org.openapitools.client.model.Pet; + + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class BodyApi { + private ApiClient apiClient; + + public BodyApi() { + this(Configuration.getDefaultApiClient()); + } + + public BodyApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Test body parameter(s) + * Test body parameter(s) + * @param pet Pet object that needs to be added to the store (optional) + * @return Pet + * @throws ApiException if fails to make API call + */ + public Pet testEchoBodyPet(Pet pet) throws ApiException { + Object localVarPostBody = pet; + + // create path and map variables + String localVarPath = "/echo/body/Pet"; + + // query params + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + TypeReference localVarReturnType = new TypeReference() {}; + return apiClient.invokeAPI( + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + localVarReturnType + ); + } +} diff --git a/samples/client/echo_api/java/apache-httpclient/src/test/java/org/openapitools/client/api/BodyApiTest.java b/samples/client/echo_api/java/apache-httpclient/src/test/java/org/openapitools/client/api/BodyApiTest.java new file mode 100644 index 0000000000..352e8e2e19 --- /dev/null +++ b/samples/client/echo_api/java/apache-httpclient/src/test/java/org/openapitools/client/api/BodyApiTest.java @@ -0,0 +1,52 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * 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.junit.Test; +import org.junit.Ignore; +import org.junit.Assert; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for BodyApi + */ +@Ignore +public class BodyApiTest { + + private final BodyApi api = new BodyApi(); + + /** + * Test body parameter(s) + * + * Test body parameter(s) + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testEchoBodyPetTest() throws ApiException { + Pet pet = null; + Pet response = api.testEchoBodyPet(pet); + + // TODO: test validations + } +} diff --git a/samples/client/echo_api/java/native/.openapi-generator/FILES b/samples/client/echo_api/java/native/.openapi-generator/FILES index de036ed7e7..23dec04e62 100644 --- a/samples/client/echo_api/java/native/.openapi-generator/FILES +++ b/samples/client/echo_api/java/native/.openapi-generator/FILES @@ -5,6 +5,7 @@ README.md api/openapi.yaml build.gradle build.sbt +docs/BodyApi.md docs/Category.md docs/PathApi.md docs/Pet.md @@ -29,6 +30,7 @@ src/main/java/org/openapitools/client/Pair.java src/main/java/org/openapitools/client/RFC3339DateFormat.java src/main/java/org/openapitools/client/ServerConfiguration.java src/main/java/org/openapitools/client/ServerVariable.java +src/main/java/org/openapitools/client/api/BodyApi.java src/main/java/org/openapitools/client/api/PathApi.java src/main/java/org/openapitools/client/api/QueryApi.java src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java diff --git a/samples/client/echo_api/java/native/README.md b/samples/client/echo_api/java/native/README.md index b31d16de14..9a31544938 100644 --- a/samples/client/echo_api/java/native/README.md +++ b/samples/client/echo_api/java/native/README.md @@ -74,22 +74,21 @@ Please follow the [installation](#installation) instruction and execute the foll import org.openapitools.client.*; import org.openapitools.client.model.*; -import org.openapitools.client.api.PathApi; +import org.openapitools.client.api.BodyApi; -public class PathApiExample { +public class BodyApiExample { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); // Configure clients using the `defaultClient` object, such as // overriding the host and port, timeout, etc. - PathApi apiInstance = new PathApi(defaultClient); - String pathString = "pathString_example"; // String | - Integer pathInteger = 56; // Integer | + BodyApi apiInstance = new BodyApi(defaultClient); + Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store try { - String result = apiInstance.testsPathStringPathStringIntegerPathInteger(pathString, pathInteger); + Pet result = apiInstance.testEchoBodyPet(pet); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PathApi#testsPathStringPathStringIntegerPathInteger"); + System.err.println("Exception when calling BodyApi#testEchoBodyPet"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -106,6 +105,8 @@ All URIs are relative to *http://localhost:3000* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- +*BodyApi* | [**testEchoBodyPet**](docs/BodyApi.md#testEchoBodyPet) | **POST** /echo/body/Pet | Test body parameter(s) +*BodyApi* | [**testEchoBodyPetWithHttpInfo**](docs/BodyApi.md#testEchoBodyPetWithHttpInfo) | **POST** /echo/body/Pet | Test body parameter(s) *PathApi* | [**testsPathStringPathStringIntegerPathInteger**](docs/PathApi.md#testsPathStringPathStringIntegerPathInteger) | **GET** /path/string/{path_string}/integer/{path_integer} | Test path parameter(s) *PathApi* | [**testsPathStringPathStringIntegerPathIntegerWithHttpInfo**](docs/PathApi.md#testsPathStringPathStringIntegerPathIntegerWithHttpInfo) | **GET** /path/string/{path_string}/integer/{path_integer} | Test path parameter(s) *QueryApi* | [**testQueryIntegerBooleanString**](docs/QueryApi.md#testQueryIntegerBooleanString) | **GET** /query/integer/boolean/string | Test query parameter(s) diff --git a/samples/client/echo_api/java/native/api/openapi.yaml b/samples/client/echo_api/java/native/api/openapi.yaml index b782a803da..4dd00e1631 100644 --- a/samples/client/echo_api/java/native/api/openapi.yaml +++ b/samples/client/echo_api/java/native/api/openapi.yaml @@ -124,9 +124,37 @@ paths: tags: - query x-accepts: text/plain + /echo/body/Pet: + post: + description: Test body parameter(s) + operationId: test/echo/body/Pet + requestBody: + $ref: '#/components/requestBodies/Pet' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + description: Successful operation + summary: Test body parameter(s) + tags: + - body + x-content-type: application/json + x-accepts: application/json components: + requestBodies: + Pet: + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store schemas: Category: + example: + name: Dogs + id: 1 properties: id: example: 1 @@ -139,6 +167,9 @@ components: xml: name: category Tag: + example: + name: name + id: 0 properties: id: format: int64 @@ -149,6 +180,21 @@ components: xml: name: tag Pet: + example: + photoUrls: + - photoUrls + - photoUrls + name: doggie + id: 10 + category: + name: Dogs + id: 1 + tags: + - name: name + id: 0 + - name: name + id: 0 + status: available properties: id: example: 10 diff --git a/samples/client/echo_api/java/native/docs/BodyApi.md b/samples/client/echo_api/java/native/docs/BodyApi.md new file mode 100644 index 0000000000..f96e1e3d23 --- /dev/null +++ b/samples/client/echo_api/java/native/docs/BodyApi.md @@ -0,0 +1,144 @@ +# BodyApi + +All URIs are relative to *http://localhost:3000* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**testEchoBodyPet**](BodyApi.md#testEchoBodyPet) | **POST** /echo/body/Pet | Test body parameter(s) | +| [**testEchoBodyPetWithHttpInfo**](BodyApi.md#testEchoBodyPetWithHttpInfo) | **POST** /echo/body/Pet | Test body parameter(s) | + + + +## testEchoBodyPet + +> Pet testEchoBodyPet(pet) + +Test body parameter(s) + +Test body parameter(s) + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.BodyApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + BodyApi apiInstance = new BodyApi(defaultClient); + Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store + try { + Pet result = apiInstance.testEchoBodyPet(pet); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BodyApi#testEchoBodyPet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | [optional] | + +### Return type + +[**Pet**](Pet.md) + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + +## testEchoBodyPetWithHttpInfo + +> ApiResponse testEchoBodyPet testEchoBodyPetWithHttpInfo(pet) + +Test body parameter(s) + +Test body parameter(s) + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.ApiResponse; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.BodyApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + BodyApi apiInstance = new BodyApi(defaultClient); + Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store + try { + ApiResponse response = apiInstance.testEchoBodyPetWithHttpInfo(pet); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling BodyApi#testEchoBodyPet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | [optional] | + +### Return type + +ApiResponse<[**Pet**](Pet.md)> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + diff --git a/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/BodyApi.java b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/BodyApi.java new file mode 100644 index 0000000000..45c5b8e6e2 --- /dev/null +++ b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/BodyApi.java @@ -0,0 +1,150 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * 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.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.ApiResponse; +import org.openapitools.client.Pair; + +import org.openapitools.client.model.Pet; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.io.IOException; +import java.io.InputStream; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.time.Duration; + +import java.util.ArrayList; +import java.util.StringJoiner; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Consumer; + +@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class BodyApi { + private final HttpClient memberVarHttpClient; + private final ObjectMapper memberVarObjectMapper; + private final String memberVarBaseUri; + private final Consumer memberVarInterceptor; + private final Duration memberVarReadTimeout; + private final Consumer> memberVarResponseInterceptor; + private final Consumer> memberVarAsyncResponseInterceptor; + + public BodyApi() { + this(new ApiClient()); + } + + public BodyApi(ApiClient apiClient) { + memberVarHttpClient = apiClient.getHttpClient(); + memberVarObjectMapper = apiClient.getObjectMapper(); + memberVarBaseUri = apiClient.getBaseUri(); + memberVarInterceptor = apiClient.getRequestInterceptor(); + memberVarReadTimeout = apiClient.getReadTimeout(); + memberVarResponseInterceptor = apiClient.getResponseInterceptor(); + memberVarAsyncResponseInterceptor = apiClient.getAsyncResponseInterceptor(); + } + + protected ApiException getApiException(String operationId, HttpResponse response) throws IOException { + String body = response.body() == null ? null : new String(response.body().readAllBytes()); + String message = formatExceptionMessage(operationId, response.statusCode(), body); + return new ApiException(response.statusCode(), message, response.headers(), body); + } + + private String formatExceptionMessage(String operationId, int statusCode, String body) { + if (body == null || body.isEmpty()) { + body = "[no body]"; + } + return operationId + " call failed with: " + statusCode + " - " + body; + } + + /** + * Test body parameter(s) + * Test body parameter(s) + * @param pet Pet object that needs to be added to the store (optional) + * @return Pet + * @throws ApiException if fails to make API call + */ + public Pet testEchoBodyPet(Pet pet) throws ApiException { + ApiResponse localVarResponse = testEchoBodyPetWithHttpInfo(pet); + return localVarResponse.getData(); + } + + /** + * Test body parameter(s) + * Test body parameter(s) + * @param pet Pet object that needs to be added to the store (optional) + * @return ApiResponse<Pet> + * @throws ApiException if fails to make API call + */ + public ApiResponse testEchoBodyPetWithHttpInfo(Pet pet) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = testEchoBodyPetRequestBuilder(pet); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("testEchoBodyPet", localVarResponse); + } + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream + ); + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder testEchoBodyPetRequestBuilder(Pet pet) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/echo/body/Pet"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Content-Type", "application/json"); + localVarRequestBuilder.header("Accept", "application/json"); + + try { + byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(pet); + localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody)); + } catch (IOException e) { + throw new ApiException(e); + } + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } +} diff --git a/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/PathApi.java b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/PathApi.java index dacf46dd26..911b0389b0 100644 --- a/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/PathApi.java +++ b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/PathApi.java @@ -108,10 +108,9 @@ public class PathApi { throw getApiException("testsPathStringPathStringIntegerPathInteger", localVarResponse); } // for plain text response - InputStream responseBody = localVarResponse.body(); if (localVarResponse.headers().map().containsKey("Content-Type") && "text/plain".equalsIgnoreCase(localVarResponse.headers().map().get("Content-Type").get(0))) { - java.util.Scanner s = new java.util.Scanner(responseBody).useDelimiter("\\A"); + java.util.Scanner s = new java.util.Scanner(localVarResponse.body()).useDelimiter("\\A"); String responseBodyText = s.hasNext() ? s.next() : ""; return new ApiResponse( localVarResponse.statusCode(), diff --git a/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/QueryApi.java b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/QueryApi.java index 406ee3b8fa..07add30bb3 100644 --- a/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/QueryApi.java +++ b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/QueryApi.java @@ -112,10 +112,9 @@ public class QueryApi { throw getApiException("testQueryIntegerBooleanString", localVarResponse); } // for plain text response - InputStream responseBody = localVarResponse.body(); if (localVarResponse.headers().map().containsKey("Content-Type") && "text/plain".equalsIgnoreCase(localVarResponse.headers().map().get("Content-Type").get(0))) { - java.util.Scanner s = new java.util.Scanner(responseBody).useDelimiter("\\A"); + java.util.Scanner s = new java.util.Scanner(localVarResponse.body()).useDelimiter("\\A"); String responseBodyText = s.hasNext() ? s.next() : ""; return new ApiResponse( localVarResponse.statusCode(), @@ -199,10 +198,9 @@ public class QueryApi { throw getApiException("testQueryStyleFormExplodeTrueArrayString", localVarResponse); } // for plain text response - InputStream responseBody = localVarResponse.body(); if (localVarResponse.headers().map().containsKey("Content-Type") && "text/plain".equalsIgnoreCase(localVarResponse.headers().map().get("Content-Type").get(0))) { - java.util.Scanner s = new java.util.Scanner(responseBody).useDelimiter("\\A"); + java.util.Scanner s = new java.util.Scanner(localVarResponse.body()).useDelimiter("\\A"); String responseBodyText = s.hasNext() ? s.next() : ""; return new ApiResponse( localVarResponse.statusCode(), @@ -284,10 +282,9 @@ public class QueryApi { throw getApiException("testQueryStyleFormExplodeTrueObject", localVarResponse); } // for plain text response - InputStream responseBody = localVarResponse.body(); if (localVarResponse.headers().map().containsKey("Content-Type") && "text/plain".equalsIgnoreCase(localVarResponse.headers().map().get("Content-Type").get(0))) { - java.util.Scanner s = new java.util.Scanner(responseBody).useDelimiter("\\A"); + java.util.Scanner s = new java.util.Scanner(localVarResponse.body()).useDelimiter("\\A"); String responseBodyText = s.hasNext() ? s.next() : ""; return new ApiResponse( localVarResponse.statusCode(), diff --git a/samples/client/echo_api/java/native/src/test/java/org/openapitools/client/CustomTest.java b/samples/client/echo_api/java/native/src/test/java/org/openapitools/client/CustomTest.java index affbfae04a..fb3e2cd486 100644 --- a/samples/client/echo_api/java/native/src/test/java/org/openapitools/client/CustomTest.java +++ b/samples/client/echo_api/java/native/src/test/java/org/openapitools/client/CustomTest.java @@ -15,10 +15,8 @@ package org.openapitools.client; import org.junit.Assert; import org.openapitools.client.ApiException; -import org.openapitools.client.api.QueryApi; -import org.openapitools.client.model.Category; -import org.openapitools.client.model.Pet; -import org.openapitools.client.model.TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter; +import org.openapitools.client.api.*; +import org.openapitools.client.model.*; import org.junit.Test; import org.junit.Ignore; @@ -31,8 +29,31 @@ import java.util.*; public class CustomTest { private final QueryApi api = new QueryApi(); + private final BodyApi bodyApi = new BodyApi(); + /** + * Test body parameter(s) + *

+ * Test body parameter(s) + * + * @throws ApiException if the Api call fails + */ + @Test + public void testEchoBodyPet() throws ApiException { + Pet queryObject = new Pet().id(12345L).name("Hello World"). + photoUrls(Arrays.asList(new String[]{"http://a.com", "http://b.com"})).category(new Category().id(987L).name("new category")); + + Pet p = bodyApi.testEchoBodyPet(queryObject); + Assert.assertNotNull(p); + Assert.assertEquals("Hello World", p.getName()); + Assert.assertEquals(Long.valueOf(12345L), p.getId()); + + // response is empty body + Pet p2 = bodyApi.testEchoBodyPet(null); + Assert.assertNull(p2); + } + /** * Test query parameter(s) *

diff --git a/samples/client/echo_api/java/native/src/test/java/org/openapitools/client/api/BodyApiTest.java b/samples/client/echo_api/java/native/src/test/java/org/openapitools/client/api/BodyApiTest.java new file mode 100644 index 0000000000..fc14326e06 --- /dev/null +++ b/samples/client/echo_api/java/native/src/test/java/org/openapitools/client/api/BodyApiTest.java @@ -0,0 +1,54 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * 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.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + + +/** + * API tests for BodyApi + */ +@Ignore +public class BodyApiTest { + + private final BodyApi api = new BodyApi(); + + + /** + * Test body parameter(s) + * + * Test body parameter(s) + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testEchoBodyPetTest() throws ApiException { + Pet pet = null; + Pet response = + api.testEchoBodyPet(pet); + + // TODO: test validations + } + +} diff --git a/samples/client/others/typescript-axios/with-separate-models-and-api-inheritance/common.ts b/samples/client/others/typescript-axios/with-separate-models-and-api-inheritance/common.ts index 6c84026abc..cb72c04287 100644 --- a/samples/client/others/typescript-axios/with-separate-models-and-api-inheritance/common.ts +++ b/samples/client/others/typescript-axios/with-separate-models-and-api-inheritance/common.ts @@ -85,6 +85,7 @@ export const setOAuthToObject = async function (object: any, name: string, scope } function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { + if (parameter == null) return; if (typeof parameter === "object") { if (Array.isArray(parameter)) { (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index 3bff17c92d..c09ed55d8a 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -106,11 +106,10 @@ public class AnotherFakeApi { if (localVarResponse.statusCode()/ 100 != 2) { throw getApiException("call123testSpecialTags", localVarResponse); } - InputStream responseBody = localVarResponse.body(); return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) // closes the InputStream + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream ); } finally { } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/DefaultApi.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/DefaultApi.java index 8b164954bc..6744fdc7ff 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/DefaultApi.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/DefaultApi.java @@ -104,11 +104,10 @@ public class DefaultApi { if (localVarResponse.statusCode()/ 100 != 2) { throw getApiException("fooGet", localVarResponse); } - InputStream responseBody = localVarResponse.body(); return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) // closes the InputStream + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream ); } finally { } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/FakeApi.java index 384d478bb3..7f35d8b2e1 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/FakeApi.java @@ -115,11 +115,10 @@ public class FakeApi { if (localVarResponse.statusCode()/ 100 != 2) { throw getApiException("fakeHealthGet", localVarResponse); } - InputStream responseBody = localVarResponse.body(); return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) // closes the InputStream + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream ); } finally { } @@ -279,11 +278,10 @@ public class FakeApi { if (localVarResponse.statusCode()/ 100 != 2) { throw getApiException("fakeOuterBooleanSerialize", localVarResponse); } - InputStream responseBody = localVarResponse.body(); return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) // closes the InputStream + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream ); } finally { } @@ -353,11 +351,10 @@ public class FakeApi { if (localVarResponse.statusCode()/ 100 != 2) { throw getApiException("fakeOuterCompositeSerialize", localVarResponse); } - InputStream responseBody = localVarResponse.body(); return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) // closes the InputStream + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream ); } finally { } @@ -427,11 +424,10 @@ public class FakeApi { if (localVarResponse.statusCode()/ 100 != 2) { throw getApiException("fakeOuterNumberSerialize", localVarResponse); } - InputStream responseBody = localVarResponse.body(); return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) // closes the InputStream + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream ); } finally { } @@ -501,11 +497,10 @@ public class FakeApi { if (localVarResponse.statusCode()/ 100 != 2) { throw getApiException("fakeOuterStringSerialize", localVarResponse); } - InputStream responseBody = localVarResponse.body(); return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) // closes the InputStream + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream ); } finally { } @@ -570,11 +565,10 @@ public class FakeApi { if (localVarResponse.statusCode()/ 100 != 2) { throw getApiException("fakePropertyEnumIntegerSerialize", localVarResponse); } - InputStream responseBody = localVarResponse.body(); return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) // closes the InputStream + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream ); } finally { } @@ -903,11 +897,10 @@ public class FakeApi { if (localVarResponse.statusCode()/ 100 != 2) { throw getApiException("testClientModel", localVarResponse); } - InputStream responseBody = localVarResponse.body(); return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) // closes the InputStream + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream ); } finally { } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java index e6c8eab533..f035fc3872 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java @@ -106,11 +106,10 @@ public class FakeClassnameTags123Api { if (localVarResponse.statusCode()/ 100 != 2) { throw getApiException("testClassname", localVarResponse); } - InputStream responseBody = localVarResponse.body(); return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) // closes the InputStream + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream ); } finally { } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/PetApi.java index c31d9a1a2c..f9d23e700d 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/PetApi.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/PetApi.java @@ -269,11 +269,10 @@ public class PetApi { if (localVarResponse.statusCode()/ 100 != 2) { throw getApiException("findPetsByStatus", localVarResponse); } - InputStream responseBody = localVarResponse.body(); return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), - responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}) // closes the InputStream + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference>() {}) // closes the InputStream ); } finally { } @@ -354,11 +353,10 @@ public class PetApi { if (localVarResponse.statusCode()/ 100 != 2) { throw getApiException("findPetsByTags", localVarResponse); } - InputStream responseBody = localVarResponse.body(); return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), - responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}) // closes the InputStream + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference>() {}) // closes the InputStream ); } finally { } @@ -435,11 +433,10 @@ public class PetApi { if (localVarResponse.statusCode()/ 100 != 2) { throw getApiException("getPetById", localVarResponse); } - InputStream responseBody = localVarResponse.body(); return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) // closes the InputStream + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream ); } finally { } @@ -671,11 +668,10 @@ public class PetApi { if (localVarResponse.statusCode()/ 100 != 2) { throw getApiException("uploadFile", localVarResponse); } - InputStream responseBody = localVarResponse.body(); return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) // closes the InputStream + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream ); } finally { } @@ -748,11 +744,10 @@ public class PetApi { if (localVarResponse.statusCode()/ 100 != 2) { throw getApiException("uploadFileWithRequiredFile", localVarResponse); } - InputStream responseBody = localVarResponse.body(); return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) // closes the InputStream + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream ); } finally { } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/StoreApi.java index c54ddcb284..5e7412d395 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/StoreApi.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/StoreApi.java @@ -179,11 +179,10 @@ public class StoreApi { if (localVarResponse.statusCode()/ 100 != 2) { throw getApiException("getInventory", localVarResponse); } - InputStream responseBody = localVarResponse.body(); return new ApiResponse>( localVarResponse.statusCode(), localVarResponse.headers().map(), - responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference>() {}) // closes the InputStream + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference>() {}) // closes the InputStream ); } finally { } @@ -247,11 +246,10 @@ public class StoreApi { if (localVarResponse.statusCode()/ 100 != 2) { throw getApiException("getOrderById", localVarResponse); } - InputStream responseBody = localVarResponse.body(); return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) // closes the InputStream + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream ); } finally { } @@ -320,11 +318,10 @@ public class StoreApi { if (localVarResponse.statusCode()/ 100 != 2) { throw getApiException("placeOrder", localVarResponse); } - InputStream responseBody = localVarResponse.body(); return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) // closes the InputStream + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream ); } finally { } diff --git a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/UserApi.java index 00e4663174..f95345a81a 100644 --- a/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/native/src/main/java/org/openapitools/client/api/UserApi.java @@ -422,11 +422,10 @@ public class UserApi { if (localVarResponse.statusCode()/ 100 != 2) { throw getApiException("getUserByName", localVarResponse); } - InputStream responseBody = localVarResponse.body(); return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) // closes the InputStream + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream ); } finally { } @@ -497,11 +496,10 @@ public class UserApi { if (localVarResponse.statusCode()/ 100 != 2) { throw getApiException("loginUser", localVarResponse); } - InputStream responseBody = localVarResponse.body(); return new ApiResponse( localVarResponse.statusCode(), localVarResponse.headers().map(), - responseBody == null || responseBody.available() < 1 ? null : memberVarObjectMapper.readValue(responseBody, new TypeReference() {}) // closes the InputStream + localVarResponse.body() == null ? null : memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference() {}) // closes the InputStream ); } finally { } From 11d31117a8528e0b8174a863a4c41a42e7d2deb1 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Thu, 8 Dec 2022 20:58:47 +0800 Subject: [PATCH 089/189] fix java apache client optional body, add tests (#14227) --- .../apache-httpclient/ApiClient.mustache | 3 ++ .../org/openapitools/client/ApiClient.java | 3 ++ .../org/openapitools/client/CustomTest.java | 28 ++++++++++++++++--- .../org/openapitools/client/ApiClient.java | 3 ++ 4 files changed, 33 insertions(+), 4 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/ApiClient.mustache index f3bc56b7a1..1a07e1cbdc 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/apache-httpclient/ApiClient.mustache @@ -1059,6 +1059,9 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} { } else { throw new ApiException("method " + method + " does not support a request body"); } + } else { + // for empty body + builder.setEntity(serialize(null, null, contentTypeObj)); } try (CloseableHttpResponse response = httpClient.execute(builder.build(), context)) { diff --git a/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/ApiClient.java index 8a028457e1..49ad3821b7 100644 --- a/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/ApiClient.java @@ -932,6 +932,9 @@ public class ApiClient extends JavaTimeFormatter { } else { throw new ApiException("method " + method + " does not support a request body"); } + } else { + // for empty body + builder.setEntity(serialize(null, null, contentTypeObj)); } try (CloseableHttpResponse response = httpClient.execute(builder.build(), context)) { diff --git a/samples/client/echo_api/java/apache-httpclient/src/test/java/org/openapitools/client/CustomTest.java b/samples/client/echo_api/java/apache-httpclient/src/test/java/org/openapitools/client/CustomTest.java index 3d0eee0cf5..ce936f3041 100644 --- a/samples/client/echo_api/java/apache-httpclient/src/test/java/org/openapitools/client/CustomTest.java +++ b/samples/client/echo_api/java/apache-httpclient/src/test/java/org/openapitools/client/CustomTest.java @@ -15,10 +15,8 @@ package org.openapitools.client; import org.junit.Assert; import org.openapitools.client.ApiException; -import org.openapitools.client.api.QueryApi; -import org.openapitools.client.model.Category; -import org.openapitools.client.model.Pet; -import org.openapitools.client.model.TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter; +import org.openapitools.client.api.*; +import org.openapitools.client.model.*; import org.junit.Test; import org.junit.Ignore; @@ -31,7 +29,29 @@ import java.util.*; public class CustomTest { private final QueryApi api = new QueryApi(); + private final BodyApi bodyApi = new BodyApi(); + /** + * Test body parameter(s) + *

+ * Test body parameter(s) + * + * @throws ApiException if the Api call fails + */ + @Test + public void testEchoBodyPet() throws ApiException { + Pet queryObject = new Pet().id(12345L).name("Hello World"). + photoUrls(Arrays.asList(new String[]{"http://a.com", "http://b.com"})).category(new Category().id(987L).name("new category")); + + Pet p = bodyApi.testEchoBodyPet(queryObject); + Assert.assertNotNull(p); + Assert.assertEquals("Hello World", p.getName()); + Assert.assertEquals(Long.valueOf(12345L), p.getId()); + + // response is empty body + Pet p2 = bodyApi.testEchoBodyPet(null); + Assert.assertNull(p2); + } /** * Test query parameter(s) diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/ApiClient.java index 015cc46bef..662190f762 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/ApiClient.java @@ -1075,6 +1075,9 @@ public class ApiClient extends JavaTimeFormatter { } else { throw new ApiException("method " + method + " does not support a request body"); } + } else { + // for empty body + builder.setEntity(serialize(null, null, contentTypeObj)); } try (CloseableHttpResponse response = httpClient.execute(builder.build(), context)) { From 5d7956293ba8efcfb566342deec9f59421f9862e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 8 Dec 2022 21:36:39 +0800 Subject: [PATCH 090/189] Bump qs from 6.5.2 to 6.5.3 in /website (#14204) Bumps [qs](https://github.com/ljharb/qs) from 6.5.2 to 6.5.3. - [Release notes](https://github.com/ljharb/qs/releases) - [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md) - [Commits](https://github.com/ljharb/qs/compare/v6.5.2...v6.5.3) --- updated-dependencies: - dependency-name: qs dependency-type: indirect ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- website/yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/yarn.lock b/website/yarn.lock index 9a034b0f58..d71b66390e 100644 --- a/website/yarn.lock +++ b/website/yarn.lock @@ -7413,9 +7413,9 @@ qs@6.7.0: integrity sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ== qs@~6.5.2: - version "6.5.2" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" - integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== + version "6.5.3" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.3.tgz#3aeeffc91967ef6e35c0e488ef46fb296ab76aad" + integrity sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA== query-string@^4.1.0: version "4.3.4" From c4b2c81c05f8ddc6c4791bc20eccc0c50c0bec7d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 8 Dec 2022 21:36:48 +0800 Subject: [PATCH 091/189] Bump express from 4.17.1 to 4.18.2 in /website (#14205) Bumps [express](https://github.com/expressjs/express) from 4.17.1 to 4.18.2. - [Release notes](https://github.com/expressjs/express/releases) - [Changelog](https://github.com/expressjs/express/blob/master/History.md) - [Commits](https://github.com/expressjs/express/compare/4.17.1...4.18.2) --- updated-dependencies: - dependency-name: express dependency-type: indirect ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- website/yarn.lock | 366 +++++++++++++++++++++++++--------------------- 1 file changed, 203 insertions(+), 163 deletions(-) diff --git a/website/yarn.lock b/website/yarn.lock index d71b66390e..5e94464d61 100644 --- a/website/yarn.lock +++ b/website/yarn.lock @@ -1399,13 +1399,13 @@ abbrev@1: resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== -accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.7: - version "1.3.7" - resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" - integrity sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA== +accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.8: + version "1.3.8" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e" + integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw== dependencies: - mime-types "~2.1.24" - negotiator "0.6.2" + mime-types "~2.1.34" + negotiator "0.6.3" acorn-walk@^6.1.1: version "6.2.0" @@ -1602,7 +1602,7 @@ arr-union@^3.1.0: array-flatten@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" - integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= + integrity sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg== array-flatten@^2.1.0: version "2.1.2" @@ -1843,21 +1843,23 @@ bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0: resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" integrity sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA== -body-parser@1.19.0: - version "1.19.0" - resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.0.tgz#96b2709e57c9c4e09a6fd66a8fd979844f69f08a" - integrity sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw== +body-parser@1.20.1: + version "1.20.1" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.1.tgz#b1812a8912c195cd371a3ee5e66faa2338a5c668" + integrity sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw== dependencies: - bytes "3.1.0" + bytes "3.1.2" content-type "~1.0.4" debug "2.6.9" - depd "~1.1.2" - http-errors "1.7.2" + depd "2.0.0" + destroy "1.2.0" + http-errors "2.0.0" iconv-lite "0.4.24" - on-finished "~2.3.0" - qs "6.7.0" - raw-body "2.4.0" - type-is "~1.6.17" + on-finished "2.4.1" + qs "6.11.0" + raw-body "2.5.1" + type-is "~1.6.18" + unpipe "1.0.0" bonjour@^3.5.0: version "3.5.0" @@ -2037,10 +2039,10 @@ bytes@3.0.0: resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" integrity sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg= -bytes@3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6" - integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg== +bytes@3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" + integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== cacache@^12.0.2, cacache@^12.0.3: version "12.0.3" @@ -2114,6 +2116,14 @@ cache-loader@^4.1.0: neo-async "^2.6.1" schema-utils "^2.0.0" +call-bind@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" + integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== + dependencies: + function-bind "^1.1.1" + get-intrinsic "^1.0.2" + call-me-maybe@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/call-me-maybe/-/call-me-maybe-1.0.1.tgz#26d208ea89e37b5cbde60250a15f031c16a4d66b" @@ -2551,12 +2561,12 @@ constants-browserify@^1.0.0: resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" integrity sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U= -content-disposition@0.5.3: - version "0.5.3" - resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.3.tgz#e130caf7e7279087c5616c2007d0485698984fbd" - integrity sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g== +content-disposition@0.5.4: + version "0.5.4" + resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.4.tgz#8b82b4efac82512a02bb0b1dcec9d2c5e8eb5bfe" + integrity sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ== dependencies: - safe-buffer "5.1.2" + safe-buffer "5.2.1" content-type@~1.0.4: version "1.0.4" @@ -2573,12 +2583,12 @@ convert-source-map@^1.7.0: cookie-signature@1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" - integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw= + integrity sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ== -cookie@0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba" - integrity sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg== +cookie@0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.5.0.tgz#d1f5d71adec6558c58f389987c366aa47e994f8b" + integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw== copy-concurrently@^1.0.0: version "1.0.5" @@ -3049,6 +3059,11 @@ delegates@^1.0.0: resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= +depd@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" + integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== + depd@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" @@ -3062,10 +3077,10 @@ des.js@^1.0.0: inherits "^2.0.1" minimalistic-assert "^1.0.0" -destroy@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" - integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= +destroy@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" + integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== detab@2.0.2: version "2.0.2" @@ -3254,7 +3269,7 @@ ecc-jsbn@~0.1.1: ee-first@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" - integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= + integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== ejs@^2.6.1: version "2.7.4" @@ -3312,7 +3327,7 @@ emojis-list@^2.0.0: encodeurl@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" - integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= + integrity sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w== end-of-stream@^1.0.0, end-of-stream@^1.1.0: version "1.4.1" @@ -3411,7 +3426,7 @@ es6-promise@^4.1.0: escape-html@^1.0.3, escape-html@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" - integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= + integrity sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow== escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: version "1.0.5" @@ -3456,7 +3471,7 @@ esutils@^2.0.0, esutils@^2.0.2: etag@~1.8.1: version "1.8.1" resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" - integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= + integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg== eval@^0.1.4: version "0.1.4" @@ -3538,37 +3553,38 @@ expand-brackets@^2.1.4: to-regex "^3.0.1" express@^4.16.3, express@^4.17.1: - version "4.17.1" - resolved "https://registry.yarnpkg.com/express/-/express-4.17.1.tgz#4491fc38605cf51f8629d39c2b5d026f98a4c134" - integrity sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g== + version "4.18.2" + resolved "https://registry.yarnpkg.com/express/-/express-4.18.2.tgz#3fabe08296e930c796c19e3c516979386ba9fd59" + integrity sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ== dependencies: - accepts "~1.3.7" + accepts "~1.3.8" array-flatten "1.1.1" - body-parser "1.19.0" - content-disposition "0.5.3" + body-parser "1.20.1" + content-disposition "0.5.4" content-type "~1.0.4" - cookie "0.4.0" + cookie "0.5.0" cookie-signature "1.0.6" debug "2.6.9" - depd "~1.1.2" + depd "2.0.0" encodeurl "~1.0.2" escape-html "~1.0.3" etag "~1.8.1" - finalhandler "~1.1.2" + finalhandler "1.2.0" fresh "0.5.2" + http-errors "2.0.0" merge-descriptors "1.0.1" methods "~1.1.2" - on-finished "~2.3.0" + on-finished "2.4.1" parseurl "~1.3.3" path-to-regexp "0.1.7" - proxy-addr "~2.0.5" - qs "6.7.0" + proxy-addr "~2.0.7" + qs "6.11.0" range-parser "~1.2.1" - safe-buffer "5.1.2" - send "0.17.1" - serve-static "1.14.1" - setprototypeof "1.1.1" - statuses "~1.5.0" + safe-buffer "5.2.1" + send "0.18.0" + serve-static "1.15.0" + setprototypeof "1.2.0" + statuses "2.0.1" type-is "~1.6.18" utils-merge "1.0.1" vary "~1.1.2" @@ -3728,17 +3744,17 @@ fill-range@^7.0.1: dependencies: to-regex-range "^5.0.1" -finalhandler@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d" - integrity sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA== +finalhandler@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.2.0.tgz#7d23fe5731b207b4640e4fcd00aec1f9207a7b32" + integrity sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg== dependencies: debug "2.6.9" encodeurl "~1.0.2" escape-html "~1.0.3" - on-finished "~2.3.0" + on-finished "2.4.1" parseurl "~1.3.3" - statuses "~1.5.0" + statuses "2.0.1" unpipe "~1.0.0" find-cache-dir@^2.0.0, find-cache-dir@^2.1.0: @@ -3837,10 +3853,10 @@ form-data@~2.3.2: combined-stream "^1.0.6" mime-types "^2.1.12" -forwarded@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84" - integrity sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ= +forwarded@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811" + integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow== fragment-cache@^0.2.1: version "0.2.1" @@ -3852,7 +3868,7 @@ fragment-cache@^0.2.1: fresh@0.5.2: version "0.5.2" resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" - integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= + integrity sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q== from2@^2.1.0: version "2.3.0" @@ -3942,6 +3958,15 @@ get-caller-file@^1.0.1: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w== +get-intrinsic@^1.0.2: + version "1.1.3" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.3.tgz#063c84329ad93e83893c7f4f243ef63ffa351385" + integrity sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A== + dependencies: + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.3" + get-own-enumerable-property-symbols@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz#b5fde77f22cbe35f390b4e089922c50bce6ef664" @@ -4181,6 +4206,11 @@ has-symbols@^1.0.1: resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8" integrity sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg== +has-symbols@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" + integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== + has-unicode@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" @@ -4448,16 +4478,16 @@ http-deceiver@^1.2.7: resolved "https://registry.yarnpkg.com/http-deceiver/-/http-deceiver-1.2.7.tgz#fa7168944ab9a519d337cb0bec7284dc3e723d87" integrity sha1-+nFolEq5pRnTN8sL7HKE3D5yPYc= -http-errors@1.7.2: - version "1.7.2" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.2.tgz#4f5029cf13239f31036e5b2e55292bcfbcc85c8f" - integrity sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg== +http-errors@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3" + integrity sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ== dependencies: - depd "~1.1.2" - inherits "2.0.3" - setprototypeof "1.1.1" - statuses ">= 1.5.0 < 2" - toidentifier "1.0.0" + depd "2.0.0" + inherits "2.0.4" + setprototypeof "1.2.0" + statuses "2.0.1" + toidentifier "1.0.1" http-errors@~1.6.2: version "1.6.3" @@ -4469,17 +4499,6 @@ http-errors@~1.6.2: setprototypeof "1.1.0" statuses ">= 1.4.0 < 2" -http-errors@~1.7.2: - version "1.7.3" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.3.tgz#6c619e4f9c60308c38519498c14fbb10aacebb06" - integrity sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw== - dependencies: - depd "~1.1.2" - inherits "2.0.4" - setprototypeof "1.1.1" - statuses ">= 1.5.0 < 2" - toidentifier "1.0.0" - http-parser-js@>=0.4.0: version "0.5.0" resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.5.0.tgz#d65edbede84349d0dc30320815a15d39cc3cbbd8" @@ -4724,12 +4743,7 @@ ip@^1.1.0, ip@^1.1.5: resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a" integrity sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo= -ipaddr.js@1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.0.tgz#37df74e430a0e47550fe54a2defe30d8acd95f65" - integrity sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA== - -ipaddr.js@^1.9.0: +ipaddr.js@1.9.1, ipaddr.js@^1.9.0: version "1.9.1" resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== @@ -5571,7 +5585,7 @@ mdurl@^1.0.1: media-typer@0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" - integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= + integrity sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ== mem@^4.0.0: version "4.3.0" @@ -5601,7 +5615,7 @@ memory-fs@^0.5.0: merge-descriptors@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" - integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E= + integrity sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w== merge-stream@^2.0.0: version "2.0.0" @@ -5621,7 +5635,7 @@ merge2@^1.3.0: methods@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" - integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= + integrity sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w== microevent.ts@~0.1.1: version "0.1.1" @@ -5663,16 +5677,16 @@ miller-rabin@^4.0.0: bn.js "^4.0.0" brorand "^1.0.1" -mime-db@1.40.0: - version "1.40.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.40.0.tgz#a65057e998db090f732a68f6c276d387d4126c32" - integrity sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA== - mime-db@1.43.0, "mime-db@>= 1.43.0 < 2": version "1.43.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.43.0.tgz#0a12e0502650e473d735535050e7c8f4eb4fae58" integrity sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ== +mime-db@1.52.0: + version "1.52.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" + integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== + mime-db@~1.37.0: version "1.37.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.37.0.tgz#0b6a0ce6fdbe9576e25f1f2d2fde8830dc0ad0d8" @@ -5692,12 +5706,12 @@ mime-types@~2.1.17: dependencies: mime-db "1.43.0" -mime-types@~2.1.24: - version "2.1.24" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.24.tgz#b6f8d0b3e951efb77dedeca194cff6d16f676f81" - integrity sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ== +mime-types@~2.1.24, mime-types@~2.1.34: + version "2.1.35" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" + integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== dependencies: - mime-db "1.40.0" + mime-db "1.52.0" mime@1.6.0: version "1.6.0" @@ -5861,9 +5875,14 @@ move-concurrently@^1.0.1: ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= + integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== -ms@2.1.1, ms@^2.1.1: +ms@2.1.3: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + +ms@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== @@ -5917,10 +5936,10 @@ needle@^2.2.1: iconv-lite "^0.4.4" sax "^1.2.4" -negotiator@0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" - integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== +negotiator@0.6.3: + version "0.6.3" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" + integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== neo-async@^2.5.0, neo-async@^2.6.1: version "2.6.1" @@ -6155,6 +6174,11 @@ object-inspect@^1.7.0: resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.7.0.tgz#f4f6bd181ad77f006b5ece60bd0b6f398ff74a67" integrity sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw== +object-inspect@^1.9.0: + version "1.12.2" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.2.tgz#c0641f26394532f28ab8d796ab954e43c009a8ea" + integrity sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ== + object-is@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.0.2.tgz#6b80eb84fe451498f65007982f035a5b445edec4" @@ -6217,10 +6241,10 @@ obuf@^1.0.0, obuf@^1.1.2: resolved "https://registry.yarnpkg.com/obuf/-/obuf-1.1.2.tgz#09bea3343d41859ebd446292d11c9d4db619084e" integrity sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg== -on-finished@~2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" - integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc= +on-finished@2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f" + integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg== dependencies: ee-first "1.1.1" @@ -6535,7 +6559,7 @@ path-parse@^1.0.6, path-parse@^1.0.7: path-to-regexp@0.1.7: version "0.1.7" resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" - integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= + integrity sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ== path-to-regexp@^1.7.0: version "1.8.0" @@ -7332,13 +7356,13 @@ property-information@^5.0.0, property-information@^5.3.0: dependencies: xtend "^4.0.0" -proxy-addr@~2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.5.tgz#34cbd64a2d81f4b1fd21e76f9f06c8a45299ee34" - integrity sha512-t/7RxHXPH6cJtP0pRG6smSr9QJidhB+3kXu0KgXnbGYMgzEnUxRQ4/LDdfOwZEMyIh3/xHb8PX3t+lfL9z+YVQ== +proxy-addr@~2.0.7: + version "2.0.7" + resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.7.tgz#f19fe69ceab311eeb94b42e70e8c2070f9ba1025" + integrity sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg== dependencies: - forwarded "~0.1.2" - ipaddr.js "1.9.0" + forwarded "0.2.0" + ipaddr.js "1.9.1" prr@~1.0.1: version "1.0.1" @@ -7407,10 +7431,12 @@ q@^1.1.2: resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" integrity sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc= -qs@6.7.0: - version "6.7.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc" - integrity sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ== +qs@6.11.0: + version "6.11.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a" + integrity sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q== + dependencies: + side-channel "^1.0.4" qs@~6.5.2: version "6.5.3" @@ -7460,13 +7486,13 @@ range-parser@^1.2.1, range-parser@~1.2.1: resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== -raw-body@2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.0.tgz#a1ce6fb9c9bc356ca52e89256ab59059e13d0332" - integrity sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q== +raw-body@2.5.1: + version "2.5.1" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.1.tgz#fe1b1628b181b700215e5fd42389f98b71392857" + integrity sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig== dependencies: - bytes "3.1.0" - http-errors "1.7.2" + bytes "3.1.2" + http-errors "2.0.0" iconv-lite "0.4.24" unpipe "1.0.0" @@ -8049,7 +8075,7 @@ safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== -safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.1, safe-buffer@~5.2.0: +safe-buffer@5.2.1, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.1, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== @@ -8146,24 +8172,24 @@ semver@^6.0.0, semver@^6.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== -send@0.17.1: - version "0.17.1" - resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8" - integrity sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg== +send@0.18.0: + version "0.18.0" + resolved "https://registry.yarnpkg.com/send/-/send-0.18.0.tgz#670167cc654b05f5aa4a767f9113bb371bc706be" + integrity sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg== dependencies: debug "2.6.9" - depd "~1.1.2" - destroy "~1.0.4" + depd "2.0.0" + destroy "1.2.0" encodeurl "~1.0.2" escape-html "~1.0.3" etag "~1.8.1" fresh "0.5.2" - http-errors "~1.7.2" + http-errors "2.0.0" mime "1.6.0" - ms "2.1.1" - on-finished "~2.3.0" + ms "2.1.3" + on-finished "2.4.1" range-parser "~1.2.1" - statuses "~1.5.0" + statuses "2.0.1" serialize-javascript@^2.1.2: version "2.1.2" @@ -8183,15 +8209,15 @@ serve-index@^1.9.1: mime-types "~2.1.17" parseurl "~1.3.2" -serve-static@1.14.1: - version "1.14.1" - resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.14.1.tgz#666e636dc4f010f7ef29970a88a674320898b2f9" - integrity sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg== +serve-static@1.15.0: + version "1.15.0" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.15.0.tgz#faaef08cffe0a1a62f60cad0c4e513cff0ac9540" + integrity sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g== dependencies: encodeurl "~1.0.2" escape-html "~1.0.3" parseurl "~1.3.3" - send "0.17.1" + send "0.18.0" set-blocking@^2.0.0, set-blocking@~2.0.0: version "2.0.0" @@ -8218,10 +8244,10 @@ setprototypeof@1.1.0: resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656" integrity sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ== -setprototypeof@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683" - integrity sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw== +setprototypeof@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" + integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== sha.js@^2.4.0, sha.js@^2.4.8: version "2.4.11" @@ -8269,6 +8295,15 @@ shelljs@^0.8.3: interpret "^1.0.0" rechoir "^0.6.2" +side-channel@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" + integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== + dependencies: + call-bind "^1.0.0" + get-intrinsic "^1.0.2" + object-inspect "^1.9.0" + signal-exit@^3.0.0, signal-exit@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" @@ -8490,7 +8525,12 @@ static-extend@^0.1.1: define-property "^0.2.5" object-copy "^0.1.0" -"statuses@>= 1.4.0 < 2", "statuses@>= 1.5.0 < 2", statuses@~1.5.0: +statuses@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" + integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== + +"statuses@>= 1.4.0 < 2": version "1.5.0" resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= @@ -8894,10 +8934,10 @@ to-regex@^3.0.1, to-regex@^3.0.2: regex-not "^1.0.2" safe-regex "^1.1.0" -toidentifier@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" - integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw== +toidentifier@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" + integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== tough-cookie@~2.4.3: version "2.4.3" @@ -8966,7 +9006,7 @@ type-fest@^0.8.1: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== -type-is@~1.6.17, type-is@~1.6.18: +type-is@~1.6.18: version "1.6.18" resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== @@ -9142,7 +9182,7 @@ universalify@^0.1.0: unpipe@1.0.0, unpipe@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" - integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= + integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== unquote@~1.1.1: version "1.1.1" @@ -9235,7 +9275,7 @@ utila@^0.4.0, utila@~0.4: utils-merge@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" - integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= + integrity sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA== uuid@^3.0.1, uuid@^3.3.2: version "3.3.2" @@ -9250,7 +9290,7 @@ value-equal@^1.0.1: vary@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" - integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= + integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg== vendors@^1.0.0: version "1.0.2" From a57fb9e1096a79e7e743fe126fff9c3a7b665d8c Mon Sep 17 00:00:00 2001 From: William Cheng Date: Fri, 9 Dec 2022 10:48:49 +0800 Subject: [PATCH 092/189] update certifi to newer version (#14228) --- .../src/main/resources/python-fastapi/requirements.mustache | 2 +- samples/server/petstore/python-fastapi/requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/python-fastapi/requirements.mustache b/modules/openapi-generator/src/main/resources/python-fastapi/requirements.mustache index ddef1affcc..a491725181 100644 --- a/modules/openapi-generator/src/main/resources/python-fastapi/requirements.mustache +++ b/modules/openapi-generator/src/main/resources/python-fastapi/requirements.mustache @@ -2,7 +2,7 @@ aiofiles==0.5.0 aniso8601==7.0.0 async-exit-stack==1.0.1 async-generator==1.10 -certifi==2020.12.5 +certifi==2022.12.7 chardet==4.0.0 click==7.1.2 dnspython==2.1.0 diff --git a/samples/server/petstore/python-fastapi/requirements.txt b/samples/server/petstore/python-fastapi/requirements.txt index ddef1affcc..a491725181 100644 --- a/samples/server/petstore/python-fastapi/requirements.txt +++ b/samples/server/petstore/python-fastapi/requirements.txt @@ -2,7 +2,7 @@ aiofiles==0.5.0 aniso8601==7.0.0 async-exit-stack==1.0.1 async-generator==1.10 -certifi==2020.12.5 +certifi==2022.12.7 chardet==4.0.0 click==7.1.2 dnspython==2.1.0 From c3b9bd74592f6a7617aa7e767d16da019f125893 Mon Sep 17 00:00:00 2001 From: devhl-labs Date: Fri, 9 Dec 2022 05:01:54 -0500 Subject: [PATCH 093/189] [csharp-netcore] Adds ability to inherit api (#13797) * refactor nrt annotation * enable nrt by default in .net6.0+ * use shorter nrt annotation * build samples * removed debugging lines * fixed model and operatoin constructors * reverted a commented line for comparison * upgraded to System.Text.Json * build samples * build samples * deleted samples to remove old files * bug fixes * bug fixes * added cumpulsory property to codegen * build samples * fixed bug * fixed bug * fixes * removed bugged code that wasnt needed * build samples * restored sorting and default values for required params * fixed bugs in comparison * fixed sort comparators * recreate tests * build samples...again... * removed debugging line breaks * simplified constructor signature * inject json options * build samples...again... * build samples * add support for composed primitives * build samples * build all samples * avoid reserved words * restored a file * multiple fixes * bug fixes * bug fixes * api clients now transient, added EventHub * bug fix * bug fix * added ability to inherit api * added ability to inherit api * bug fix * added requiredAndNotNullable * added custom serialization * added request info to error handler * added OrDefault for enum parsing * fixed DateTime? deserialization * added support for server override * added IServiceCollection to host builder extensions * improve cookie support * bug fixes * fixed spacing * fixed content type header * fixed spacing * removed reference to newtonsoft * bug fixes in deserialization * resolved conflicts * removed postProcessAllModels code now present in abstract * added a comment with url to an issue * removed unneeded code * removed change that should be another pr * build and update samples * reduce number of files modified * reduce number of files modified * delete and build samples * delete and build samples * fixed property name issue * fixed CodegenModel collection properties * avoid a conflict * avoid a conflict * add a todo * added todo * fixed circular reference * small changes * synced with other branches * commented some code for now * copied samples from master * changed mustache templates * build samples * fixed invalid property names * rebuild samples * rebuild samples * fixed casing issue * resolved conflicts * fixed bug in resolving conflicts * removed default api, users can handle that if required * removed default api, users can handle that if required * build samples......again.... * addressed comment * addressed comment * addressed comment * addressed comment * build samples --- .../codegen/CodegenOperation.java | 9 +- .../codegen/CodegenParameter.java | 6 +- .../openapitools/codegen/CodegenProperty.java | 2 +- .../openapitools/codegen/DefaultCodegen.java | 6 + .../languages/CSharpNetCoreClientCodegen.java | 190 +- .../generichost/ApiException.mustache | 2 +- .../libraries/generichost/ApiFactory.mustache | 49 + .../generichost/ApiKeyToken.mustache | 16 +- .../generichost/ApiResponseEventArgs.mustache | 19 +- .../generichost/ApiResponse`1.mustache | 18 +- .../generichost/ApiTestsBase.mustache | 9 +- .../libraries/generichost/BasicToken.mustache | 4 +- .../generichost/BearerToken.mustache | 4 +- .../generichost/ClientUtils.mustache | 154 +- .../generichost/CookieContainer.mustache | 22 + .../generichost/DateTimeFormats.mustache | 16 + ...ustache => DateTimeJsonConverter.mustache} | 24 +- .../DateTimeNullableJsonConverter.mustache | 53 + .../generichost/DefaultApis.mustache | 1 + .../DependencyInjectionTests.mustache | 19 +- .../generichost/HostConfiguration.mustache | 82 +- .../HttpSigningConfiguration.mustache | 4 +- .../generichost/HttpSigningToken.mustache | 4 +- .../libraries/generichost/IApi.mustache | 10 +- .../IHostBuilderExtensions.mustache | 81 + .../IHttpClientBuilderExtensions.mustache | 75 + .../IServiceCollectionExtensions.mustache | 109 ++ .../generichost/ImplementsIEquatable.mustache | 3 + .../ImplementsValidatable.mustache | 4 + .../generichost/JsonConverter.mustache | 192 +- .../JsonSerializerOptionsProvider.mustache | 4 +- .../generichost/ModelBaseSignature.mustache | 1 + .../generichost/ModelSignature.mustache | 1 + .../libraries/generichost/OAuthToken.mustache | 4 +- .../generichost/OperationOrDefault.mustache | 24 + .../generichost/OperationSignature.mustache | 1 + .../generichost/PropertyDataType.mustache | 1 + ...README.mustache => README.client.mustache} | 7 +- .../generichost/README.solution.mustache | 1 + .../generichost/README.test.mustache | 0 .../generichost/RateLimitProvider`1.mustache | 4 +- .../libraries/generichost/TokenBase.mustache | 4 +- .../generichost/TokenContainer`1.mustache | 4 +- .../generichost/TokenProvider`1.mustache | 4 +- .../libraries/generichost/api.mustache | 287 +-- .../libraries/generichost/api_test.mustache | 10 +- .../libraries/generichost/model.mustache | 22 +- .../generichost/modelGeneric.mustache | 125 +- .../generichost/testInstructions.mustache | 18 + .../csharp-netcore/modelEnum.mustache | 119 +- .../csharp-netcore/modelInnerEnum.mustache | 53 +- .../csharp-netcore/model_test.mustache | 4 +- .../netcore_project.additions.mustache | 1 + .../csharp-netcore/netcore_project.mustache | 10 +- .../netcore_testproject.additions.mustache | 1 + .../netcore_testproject.mustache | 9 +- .../Org.OpenAPITools.Test.csproj | 1 - .../Org.OpenAPITools.Test.csproj | 1 - .../.openapi-generator/FILES | 12 +- .../README.md | 258 --- .../docs/apis/FakeApi.md | 60 +- .../docs/apis/PetApi.md | 20 +- .../docs/apis/UserApi.md | 10 +- .../docs/models/AdditionalPropertiesClass.md | 6 +- .../docs/models/ApiResponse.md | 2 +- .../docs/models/ArrayTest.md | 2 +- .../docs/models/Capitalization.md | 6 +- .../docs/models/Category.md | 2 +- .../docs/models/ClassModel.md | 2 +- .../docs/models/Drawing.md | 2 +- .../docs/models/EnumArrays.md | 2 +- .../docs/models/EnumTest.md | 8 +- .../docs/models/FooGetDefaultResponse.md | 2 +- .../docs/models/FormatTest.md | 22 +- .../docs/models/MapTest.md | 4 +- ...dPropertiesAndAdditionalPropertiesClass.md | 2 +- .../docs/models/Model200Response.md | 2 +- .../docs/models/ModelClient.md | 2 +- .../docs/models/Name.md | 2 +- .../docs/models/NullableClass.md | 16 +- .../docs/models/ObjectWithDeprecatedFields.md | 6 +- .../docs/models/OuterComposite.md | 2 +- .../docs/models/Pet.md | 6 +- .../docs/models/SpecialModelName.md | 2 +- .../docs/models/User.md | 12 +- .../Api/AnotherFakeApiTests.cs | 6 +- .../Org.OpenAPITools.Test/Api/ApiTestsBase.cs | 3 +- .../Api/DefaultApiTests.cs | 6 +- .../Api/DependencyInjectionTests.cs | 63 +- .../Org.OpenAPITools.Test/Api/FakeApiTests.cs | 32 +- .../Api/FakeClassnameTags123ApiTests.cs | 6 +- .../Org.OpenAPITools.Test/Api/PetApiTests.cs | 14 +- .../Api/StoreApiTests.cs | 6 +- .../Org.OpenAPITools.Test/Api/UserApiTests.cs | 10 +- ...ctivityOutputElementRepresentationTests.cs | 1 - .../Model/ActivityTests.cs | 1 - .../Model/AdditionalPropertiesClassTests.cs | 29 +- .../Model/AnimalTests.cs | 1 - .../Model/ApiResponseTests.cs | 17 +- .../Model/AppleReqTests.cs | 1 - .../Org.OpenAPITools.Test/Model/AppleTests.cs | 1 - .../Model/ArrayOfArrayOfNumberOnlyTests.cs | 1 - .../Model/ArrayOfNumberOnlyTests.cs | 1 - .../Model/ArrayTestTests.cs | 17 +- .../Model/BananaReqTests.cs | 1 - .../Model/BananaTests.cs | 1 - .../Model/BasquePigTests.cs | 1 - .../Model/CapitalizationTests.cs | 29 +- .../Model/CatAllOfTests.cs | 1 - .../Org.OpenAPITools.Test/Model/CatTests.cs | 1 - .../Model/CategoryTests.cs | 17 +- .../Model/ChildCatAllOfTests.cs | 1 - .../Model/ChildCatTests.cs | 1 - .../Model/ClassModelTests.cs | 7 +- .../Model/ComplexQuadrilateralTests.cs | 1 - .../Model/DanishPigTests.cs | 1 - .../Model/DeprecatedObjectTests.cs | 1 - .../Model/DogAllOfTests.cs | 1 - .../Org.OpenAPITools.Test/Model/DogTests.cs | 1 - .../Model/DrawingTests.cs | 17 +- .../Model/EnumArraysTests.cs | 17 +- .../Model/EnumClassTests.cs | 1 - .../Model/EnumTestTests.cs | 45 +- .../Model/EquilateralTriangleTests.cs | 1 - .../Model/FileSchemaTestClassTests.cs | 1 - .../Org.OpenAPITools.Test/Model/FileTests.cs | 1 - .../Model/FooGetDefaultResponseTests.cs | 7 +- .../Org.OpenAPITools.Test/Model/FooTests.cs | 1 - .../Model/FormatTestTests.cs | 107 +- .../Model/FruitReqTests.cs | 1 - .../Org.OpenAPITools.Test/Model/FruitTests.cs | 1 - .../Model/GmFruitTests.cs | 1 - .../Model/GrandparentAnimalTests.cs | 1 - .../Model/HasOnlyReadOnlyTests.cs | 1 - .../Model/HealthCheckResultTests.cs | 1 - .../Model/IsoscelesTriangleTests.cs | 1 - .../Org.OpenAPITools.Test/Model/ListTests.cs | 1 - .../Model/MammalTests.cs | 1 - .../Model/MapTestTests.cs | 33 +- ...ertiesAndAdditionalPropertiesClassTests.cs | 17 +- .../Model/Model200ResponseTests.cs | 17 +- .../Model/ModelClientTests.cs | 7 +- .../Org.OpenAPITools.Test/Model/NameTests.cs | 17 +- .../Model/NullableClassTests.cs | 79 +- .../Model/NullableShapeTests.cs | 1 - .../Model/NumberOnlyTests.cs | 1 - .../Model/ObjectWithDeprecatedFieldsTests.cs | 29 +- .../Org.OpenAPITools.Test/Model/OrderTests.cs | 1 - .../Model/OuterCompositeTests.cs | 17 +- .../Model/OuterEnumDefaultValueTests.cs | 1 - .../OuterEnumIntegerDefaultValueTests.cs | 1 - .../Model/OuterEnumIntegerTests.cs | 1 - .../Model/OuterEnumTests.cs | 1 - .../Model/ParentPetTests.cs | 1 - .../Org.OpenAPITools.Test/Model/PetTests.cs | 39 +- .../Org.OpenAPITools.Test/Model/PigTests.cs | 1 - .../Model/PolymorphicPropertyTests.cs | 1 - .../Model/QuadrilateralInterfaceTests.cs | 1 - .../Model/QuadrilateralTests.cs | 1 - .../Model/ReadOnlyFirstTests.cs | 1 - .../Model/ReturnTests.cs | 1 - .../Model/ScaleneTriangleTests.cs | 1 - .../Model/ShapeInterfaceTests.cs | 1 - .../Model/ShapeOrNullTests.cs | 1 - .../Org.OpenAPITools.Test/Model/ShapeTests.cs | 1 - .../Model/SimpleQuadrilateralTests.cs | 1 - .../Model/SpecialModelNameTests.cs | 17 +- .../Org.OpenAPITools.Test/Model/TagTests.cs | 1 - .../Model/TriangleInterfaceTests.cs | 1 - .../Model/TriangleTests.cs | 1 - .../Org.OpenAPITools.Test/Model/UserTests.cs | 51 +- .../Org.OpenAPITools.Test/Model/WhaleTests.cs | 1 - .../Org.OpenAPITools.Test/Model/ZebraTests.cs | 1 - .../Org.OpenAPITools.Test.csproj | 5 +- .../src/Org.OpenAPITools.Test/README.md | 0 .../Org.OpenAPITools/Api/AnotherFakeApi.cs | 110 +- .../src/Org.OpenAPITools/Api/DefaultApi.cs | 91 +- .../src/Org.OpenAPITools/Api/FakeApi.cs | 1554 +++++++++++------ .../Api/FakeClassnameTags123Api.cs | 112 +- .../src/Org.OpenAPITools/Api/IApi.cs | 15 + .../src/Org.OpenAPITools/Api/PetApi.cs | 949 ++++++---- .../src/Org.OpenAPITools/Api/StoreApi.cs | 327 ++-- .../src/Org.OpenAPITools/Api/UserApi.cs | 694 +++++--- .../src/Org.OpenAPITools/Client/ApiFactory.cs | 49 + .../Org.OpenAPITools/Client/ApiKeyToken.cs | 12 +- .../Client/ApiResponseEventArgs.cs | 15 +- .../Org.OpenAPITools/Client/ApiResponse`1.cs | 14 +- .../Org.OpenAPITools/Client/ClientUtils.cs | 116 -- .../Client/CookieContainer.cs | 20 + .../Client/DateTimeJsonConverter.cs | 71 + .../Client/DateTimeNullableJsonConverter.cs | 76 + .../Client/HostConfiguration.cs | 140 +- .../src/Org.OpenAPITools/Client/IApi.cs | 21 - .../Client/OpenAPIDateJsonConverter.cs | 42 - .../Extensions/IHostBuilderExtensions.cs | 59 + .../IHttpClientBuilderExtensions.cs | 79 + .../IServiceCollectionExtensions.cs | 90 + .../src/Org.OpenAPITools/Model/Activity.cs | 129 +- .../ActivityOutputElementRepresentation.cs | 143 +- .../Model/AdditionalPropertiesClass.cs | 303 ++-- .../src/Org.OpenAPITools/Model/Animal.cs | 139 +- .../src/Org.OpenAPITools/Model/ApiResponse.cs | 169 +- .../src/Org.OpenAPITools/Model/Apple.cs | 142 +- .../src/Org.OpenAPITools/Model/AppleReq.cs | 130 +- .../Model/ArrayOfArrayOfNumberOnly.cs | 129 +- .../Model/ArrayOfNumberOnly.cs | 129 +- .../src/Org.OpenAPITools/Model/ArrayTest.cs | 175 +- .../src/Org.OpenAPITools/Model/Banana.cs | 125 +- .../src/Org.OpenAPITools/Model/BananaReq.cs | 127 +- .../src/Org.OpenAPITools/Model/BasquePig.cs | 123 +- .../Org.OpenAPITools/Model/Capitalization.cs | 266 +-- .../src/Org.OpenAPITools/Model/Cat.cs | 80 +- .../src/Org.OpenAPITools/Model/CatAllOf.cs | 125 +- .../src/Org.OpenAPITools/Model/Category.cs | 150 +- .../src/Org.OpenAPITools/Model/ChildCat.cs | 77 +- .../Org.OpenAPITools/Model/ChildCatAllOf.cs | 172 +- .../src/Org.OpenAPITools/Model/ClassModel.cs | 136 +- .../Model/ComplexQuadrilateral.cs | 78 +- .../src/Org.OpenAPITools/Model/DanishPig.cs | 123 +- .../Model/DeprecatedObject.cs | 128 +- .../src/Org.OpenAPITools/Model/Dog.cs | 80 +- .../src/Org.OpenAPITools/Model/DogAllOf.cs | 128 +- .../src/Org.OpenAPITools/Model/Drawing.cs | 179 +- .../src/Org.OpenAPITools/Model/EnumArrays.cs | 255 ++- .../src/Org.OpenAPITools/Model/EnumClass.cs | 116 +- .../src/Org.OpenAPITools/Model/EnumTest.cs | 572 ++++-- .../Model/EquilateralTriangle.cs | 78 +- .../src/Org.OpenAPITools/Model/File.cs | 128 +- .../Model/FileSchemaTestClass.cs | 144 +- .../src/Org.OpenAPITools/Model/Foo.cs | 128 +- .../Model/FooGetDefaultResponse.cs | 137 +- .../src/Org.OpenAPITools/Model/FormatTest.cs | 594 ++++--- .../src/Org.OpenAPITools/Model/Fruit.cs | 100 +- .../src/Org.OpenAPITools/Model/FruitReq.cs | 75 +- .../src/Org.OpenAPITools/Model/GmFruit.cs | 88 +- .../Model/GrandparentAnimal.cs | 123 +- .../Org.OpenAPITools/Model/HasOnlyReadOnly.cs | 113 +- .../Model/HealthCheckResult.cs | 115 +- .../Model/IsoscelesTriangle.cs | 72 +- .../src/Org.OpenAPITools/Model/List.cs | 128 +- .../src/Org.OpenAPITools/Model/Mammal.cs | 86 +- .../src/Org.OpenAPITools/Model/MapTest.cs | 229 ++- ...dPropertiesAndAdditionalPropertiesClass.cs | 174 +- .../Model/Model200Response.cs | 155 +- .../src/Org.OpenAPITools/Model/ModelClient.cs | 136 +- .../src/Org.OpenAPITools/Model/Name.cs | 145 +- .../Org.OpenAPITools/Model/NullableClass.cs | 355 ++-- .../Org.OpenAPITools/Model/NullableShape.cs | 81 +- .../src/Org.OpenAPITools/Model/NumberOnly.cs | 125 +- .../Model/ObjectWithDeprecatedFields.cs | 221 ++- .../src/Org.OpenAPITools/Model/Order.cs | 231 ++- .../Org.OpenAPITools/Model/OuterComposite.cs | 176 +- .../src/Org.OpenAPITools/Model/OuterEnum.cs | 116 +- .../Model/OuterEnumDefaultValue.cs | 116 +- .../Model/OuterEnumInteger.cs | 104 +- .../Model/OuterEnumIntegerDefaultValue.cs | 104 +- .../src/Org.OpenAPITools/Model/ParentPet.cs | 73 +- .../src/Org.OpenAPITools/Model/Pet.cs | 272 ++- .../src/Org.OpenAPITools/Model/Pig.cs | 81 +- .../Model/PolymorphicProperty.cs | 91 +- .../Org.OpenAPITools/Model/Quadrilateral.cs | 81 +- .../Model/QuadrilateralInterface.cs | 123 +- .../Org.OpenAPITools/Model/ReadOnlyFirst.cs | 112 +- .../src/Org.OpenAPITools/Model/Return.cs | 125 +- .../Org.OpenAPITools/Model/ScaleneTriangle.cs | 78 +- .../src/Org.OpenAPITools/Model/Shape.cs | 104 +- .../Org.OpenAPITools/Model/ShapeInterface.cs | 123 +- .../src/Org.OpenAPITools/Model/ShapeOrNull.cs | 104 +- .../Model/SimpleQuadrilateral.cs | 78 +- .../Model/SpecialModelName.cs | 157 +- .../src/Org.OpenAPITools/Model/Tag.cs | 139 +- .../src/Org.OpenAPITools/Model/Triangle.cs | 136 +- .../Model/TriangleInterface.cs | 123 +- .../src/Org.OpenAPITools/Model/User.cs | 363 ++-- .../src/Org.OpenAPITools/Model/Whale.cs | 147 +- .../src/Org.OpenAPITools/Model/Zebra.cs | 183 +- .../Org.OpenAPITools/Org.OpenAPITools.csproj | 6 +- .../src/Org.OpenAPITools/README.md | 260 +++ .../.openapi-generator/FILES | 12 +- .../README.md | 258 --- .../docs/apis/FakeApi.md | 60 +- .../docs/apis/PetApi.md | 20 +- .../docs/apis/UserApi.md | 10 +- .../docs/models/AdditionalPropertiesClass.md | 6 +- .../docs/models/ApiResponse.md | 2 +- .../docs/models/ArrayTest.md | 2 +- .../docs/models/Capitalization.md | 6 +- .../docs/models/Category.md | 2 +- .../docs/models/ClassModel.md | 2 +- .../docs/models/Drawing.md | 2 +- .../docs/models/EnumArrays.md | 2 +- .../docs/models/EnumTest.md | 8 +- .../docs/models/FooGetDefaultResponse.md | 2 +- .../docs/models/FormatTest.md | 22 +- .../docs/models/MapTest.md | 4 +- ...dPropertiesAndAdditionalPropertiesClass.md | 2 +- .../docs/models/Model200Response.md | 2 +- .../docs/models/ModelClient.md | 2 +- .../docs/models/Name.md | 2 +- .../docs/models/NullableClass.md | 16 +- .../docs/models/ObjectWithDeprecatedFields.md | 6 +- .../docs/models/OuterComposite.md | 2 +- .../docs/models/Pet.md | 6 +- .../docs/models/SpecialModelName.md | 2 +- .../docs/models/User.md | 12 +- .../Api/AnotherFakeApiTests.cs | 6 +- .../Org.OpenAPITools.Test/Api/ApiTestsBase.cs | 3 +- .../Api/DefaultApiTests.cs | 6 +- .../Api/DependencyInjectionTests.cs | 63 +- .../Org.OpenAPITools.Test/Api/FakeApiTests.cs | 32 +- .../Api/FakeClassnameTags123ApiTests.cs | 6 +- .../Org.OpenAPITools.Test/Api/PetApiTests.cs | 14 +- .../Api/StoreApiTests.cs | 6 +- .../Org.OpenAPITools.Test/Api/UserApiTests.cs | 10 +- ...ctivityOutputElementRepresentationTests.cs | 1 - .../Model/ActivityTests.cs | 1 - .../Model/AdditionalPropertiesClassTests.cs | 29 +- .../Model/AnimalTests.cs | 1 - .../Model/ApiResponseTests.cs | 17 +- .../Model/AppleReqTests.cs | 1 - .../Org.OpenAPITools.Test/Model/AppleTests.cs | 1 - .../Model/ArrayOfArrayOfNumberOnlyTests.cs | 1 - .../Model/ArrayOfNumberOnlyTests.cs | 1 - .../Model/ArrayTestTests.cs | 17 +- .../Model/BananaReqTests.cs | 1 - .../Model/BananaTests.cs | 1 - .../Model/BasquePigTests.cs | 1 - .../Model/CapitalizationTests.cs | 29 +- .../Model/CatAllOfTests.cs | 1 - .../Org.OpenAPITools.Test/Model/CatTests.cs | 1 - .../Model/CategoryTests.cs | 17 +- .../Model/ChildCatAllOfTests.cs | 1 - .../Model/ChildCatTests.cs | 1 - .../Model/ClassModelTests.cs | 7 +- .../Model/ComplexQuadrilateralTests.cs | 1 - .../Model/DanishPigTests.cs | 1 - .../Model/DeprecatedObjectTests.cs | 1 - .../Model/DogAllOfTests.cs | 1 - .../Org.OpenAPITools.Test/Model/DogTests.cs | 1 - .../Model/DrawingTests.cs | 17 +- .../Model/EnumArraysTests.cs | 17 +- .../Model/EnumClassTests.cs | 1 - .../Model/EnumTestTests.cs | 45 +- .../Model/EquilateralTriangleTests.cs | 1 - .../Model/FileSchemaTestClassTests.cs | 1 - .../Org.OpenAPITools.Test/Model/FileTests.cs | 1 - .../Model/FooGetDefaultResponseTests.cs | 7 +- .../Org.OpenAPITools.Test/Model/FooTests.cs | 1 - .../Model/FormatTestTests.cs | 107 +- .../Model/FruitReqTests.cs | 1 - .../Org.OpenAPITools.Test/Model/FruitTests.cs | 1 - .../Model/GmFruitTests.cs | 1 - .../Model/GrandparentAnimalTests.cs | 1 - .../Model/HasOnlyReadOnlyTests.cs | 1 - .../Model/HealthCheckResultTests.cs | 1 - .../Model/IsoscelesTriangleTests.cs | 1 - .../Org.OpenAPITools.Test/Model/ListTests.cs | 1 - .../Model/MammalTests.cs | 1 - .../Model/MapTestTests.cs | 33 +- ...ertiesAndAdditionalPropertiesClassTests.cs | 17 +- .../Model/Model200ResponseTests.cs | 17 +- .../Model/ModelClientTests.cs | 7 +- .../Org.OpenAPITools.Test/Model/NameTests.cs | 17 +- .../Model/NullableClassTests.cs | 79 +- .../Model/NullableShapeTests.cs | 1 - .../Model/NumberOnlyTests.cs | 1 - .../Model/ObjectWithDeprecatedFieldsTests.cs | 29 +- .../Org.OpenAPITools.Test/Model/OrderTests.cs | 1 - .../Model/OuterCompositeTests.cs | 17 +- .../Model/OuterEnumDefaultValueTests.cs | 1 - .../OuterEnumIntegerDefaultValueTests.cs | 1 - .../Model/OuterEnumIntegerTests.cs | 1 - .../Model/OuterEnumTests.cs | 1 - .../Model/ParentPetTests.cs | 1 - .../Org.OpenAPITools.Test/Model/PetTests.cs | 39 +- .../Org.OpenAPITools.Test/Model/PigTests.cs | 1 - .../Model/PolymorphicPropertyTests.cs | 1 - .../Model/QuadrilateralInterfaceTests.cs | 1 - .../Model/QuadrilateralTests.cs | 1 - .../Model/ReadOnlyFirstTests.cs | 1 - .../Model/ReturnTests.cs | 1 - .../Model/ScaleneTriangleTests.cs | 1 - .../Model/ShapeInterfaceTests.cs | 1 - .../Model/ShapeOrNullTests.cs | 1 - .../Org.OpenAPITools.Test/Model/ShapeTests.cs | 1 - .../Model/SimpleQuadrilateralTests.cs | 1 - .../Model/SpecialModelNameTests.cs | 17 +- .../Org.OpenAPITools.Test/Model/TagTests.cs | 1 - .../Model/TriangleInterfaceTests.cs | 1 - .../Model/TriangleTests.cs | 1 - .../Org.OpenAPITools.Test/Model/UserTests.cs | 51 +- .../Org.OpenAPITools.Test/Model/WhaleTests.cs | 1 - .../Org.OpenAPITools.Test/Model/ZebraTests.cs | 1 - .../Org.OpenAPITools.Test.csproj | 5 +- .../src/Org.OpenAPITools.Test/README.md | 0 .../Org.OpenAPITools/Api/AnotherFakeApi.cs | 106 +- .../src/Org.OpenAPITools/Api/DefaultApi.cs | 87 +- .../src/Org.OpenAPITools/Api/FakeApi.cs | 1545 +++++++++++----- .../Api/FakeClassnameTags123Api.cs | 108 +- .../src/Org.OpenAPITools/Api/IApi.cs | 15 + .../src/Org.OpenAPITools/Api/PetApi.cs | 868 ++++++--- .../src/Org.OpenAPITools/Api/StoreApi.cs | 308 +++- .../src/Org.OpenAPITools/Api/UserApi.cs | 660 ++++--- .../src/Org.OpenAPITools/Client/ApiFactory.cs | 49 + .../Org.OpenAPITools/Client/ApiKeyToken.cs | 12 +- .../Client/ApiResponseEventArgs.cs | 15 +- .../Org.OpenAPITools/Client/ApiResponse`1.cs | 14 +- .../Org.OpenAPITools/Client/ClientUtils.cs | 116 -- .../Client/CookieContainer.cs | 18 + .../Client/DateTimeJsonConverter.cs | 71 + .../Client/DateTimeNullableJsonConverter.cs | 76 + .../Client/HostConfiguration.cs | 140 +- .../src/Org.OpenAPITools/Client/IApi.cs | 21 - .../Client/OpenAPIDateJsonConverter.cs | 42 - .../Extensions/IHostBuilderExtensions.cs | 57 + .../IHttpClientBuilderExtensions.cs | 77 + .../IServiceCollectionExtensions.cs | 88 + .../src/Org.OpenAPITools/Model/Activity.cs | 127 +- .../ActivityOutputElementRepresentation.cs | 139 +- .../Model/AdditionalPropertiesClass.cs | 259 ++- .../src/Org.OpenAPITools/Model/Animal.cs | 135 +- .../src/Org.OpenAPITools/Model/ApiResponse.cs | 165 +- .../src/Org.OpenAPITools/Model/Apple.cs | 138 +- .../src/Org.OpenAPITools/Model/AppleReq.cs | 128 +- .../Model/ArrayOfArrayOfNumberOnly.cs | 127 +- .../Model/ArrayOfNumberOnly.cs | 127 +- .../src/Org.OpenAPITools/Model/ArrayTest.cs | 171 +- .../src/Org.OpenAPITools/Model/Banana.cs | 123 +- .../src/Org.OpenAPITools/Model/BananaReq.cs | 125 +- .../src/Org.OpenAPITools/Model/BasquePig.cs | 123 +- .../Org.OpenAPITools/Model/Capitalization.cs | 230 ++- .../src/Org.OpenAPITools/Model/Cat.cs | 76 +- .../src/Org.OpenAPITools/Model/CatAllOf.cs | 123 +- .../src/Org.OpenAPITools/Model/Category.cs | 152 +- .../src/Org.OpenAPITools/Model/ChildCat.cs | 73 +- .../Org.OpenAPITools/Model/ChildCatAllOf.cs | 168 +- .../src/Org.OpenAPITools/Model/ClassModel.cs | 136 +- .../Model/ComplexQuadrilateral.cs | 78 +- .../src/Org.OpenAPITools/Model/DanishPig.cs | 123 +- .../Model/DeprecatedObject.cs | 126 +- .../src/Org.OpenAPITools/Model/Dog.cs | 74 +- .../src/Org.OpenAPITools/Model/DogAllOf.cs | 126 +- .../src/Org.OpenAPITools/Model/Drawing.cs | 175 +- .../src/Org.OpenAPITools/Model/EnumArrays.cs | 251 ++- .../src/Org.OpenAPITools/Model/EnumClass.cs | 116 +- .../src/Org.OpenAPITools/Model/EnumTest.cs | 542 ++++-- .../Model/EquilateralTriangle.cs | 78 +- .../src/Org.OpenAPITools/Model/File.cs | 126 +- .../Model/FileSchemaTestClass.cs | 140 +- .../src/Org.OpenAPITools/Model/Foo.cs | 124 +- .../Model/FooGetDefaultResponse.cs | 137 +- .../src/Org.OpenAPITools/Model/FormatTest.cs | 548 +++--- .../src/Org.OpenAPITools/Model/Fruit.cs | 94 +- .../src/Org.OpenAPITools/Model/FruitReq.cs | 71 +- .../src/Org.OpenAPITools/Model/GmFruit.cs | 82 +- .../Model/GrandparentAnimal.cs | 123 +- .../Org.OpenAPITools/Model/HasOnlyReadOnly.cs | 111 +- .../Model/HealthCheckResult.cs | 115 +- .../Model/IsoscelesTriangle.cs | 72 +- .../src/Org.OpenAPITools/Model/List.cs | 126 +- .../src/Org.OpenAPITools/Model/Mammal.cs | 80 +- .../src/Org.OpenAPITools/Model/MapTest.cs | 225 ++- ...dPropertiesAndAdditionalPropertiesClass.cs | 170 +- .../Model/Model200Response.cs | 153 +- .../src/Org.OpenAPITools/Model/ModelClient.cs | 136 +- .../src/Org.OpenAPITools/Model/Name.cs | 141 +- .../Org.OpenAPITools/Model/NullableClass.cs | 355 ++-- .../Org.OpenAPITools/Model/NullableShape.cs | 77 +- .../src/Org.OpenAPITools/Model/NumberOnly.cs | 123 +- .../Model/ObjectWithDeprecatedFields.cs | 219 ++- .../src/Org.OpenAPITools/Model/Order.cs | 219 ++- .../Org.OpenAPITools/Model/OuterComposite.cs | 162 +- .../src/Org.OpenAPITools/Model/OuterEnum.cs | 116 +- .../Model/OuterEnumDefaultValue.cs | 116 +- .../Model/OuterEnumInteger.cs | 104 +- .../Model/OuterEnumIntegerDefaultValue.cs | 104 +- .../src/Org.OpenAPITools/Model/ParentPet.cs | 71 +- .../src/Org.OpenAPITools/Model/Pet.cs | 268 ++- .../src/Org.OpenAPITools/Model/Pig.cs | 77 +- .../Model/PolymorphicProperty.cs | 83 +- .../Org.OpenAPITools/Model/Quadrilateral.cs | 77 +- .../Model/QuadrilateralInterface.cs | 123 +- .../Org.OpenAPITools/Model/ReadOnlyFirst.cs | 108 +- .../src/Org.OpenAPITools/Model/Return.cs | 123 +- .../Org.OpenAPITools/Model/ScaleneTriangle.cs | 78 +- .../src/Org.OpenAPITools/Model/Shape.cs | 98 +- .../Org.OpenAPITools/Model/ShapeInterface.cs | 123 +- .../src/Org.OpenAPITools/Model/ShapeOrNull.cs | 98 +- .../Model/SimpleQuadrilateral.cs | 78 +- .../Model/SpecialModelName.cs | 155 +- .../src/Org.OpenAPITools/Model/Tag.cs | 135 +- .../src/Org.OpenAPITools/Model/Triangle.cs | 126 +- .../Model/TriangleInterface.cs | 123 +- .../src/Org.OpenAPITools/Model/User.cs | 329 ++-- .../src/Org.OpenAPITools/Model/Whale.cs | 143 +- .../src/Org.OpenAPITools/Model/Zebra.cs | 181 +- .../Org.OpenAPITools/Org.OpenAPITools.csproj | 6 +- .../src/Org.OpenAPITools/README.md | 260 +++ .../.openapi-generator/FILES | 12 +- .../README.md | 258 --- .../docs/apis/FakeApi.md | 60 +- .../docs/apis/PetApi.md | 20 +- .../docs/apis/UserApi.md | 10 +- .../docs/models/AdditionalPropertiesClass.md | 6 +- .../docs/models/ApiResponse.md | 2 +- .../docs/models/ArrayTest.md | 2 +- .../docs/models/Capitalization.md | 6 +- .../docs/models/Category.md | 2 +- .../docs/models/ClassModel.md | 2 +- .../docs/models/Drawing.md | 2 +- .../docs/models/EnumArrays.md | 2 +- .../docs/models/EnumTest.md | 8 +- .../docs/models/FooGetDefaultResponse.md | 2 +- .../docs/models/FormatTest.md | 22 +- .../docs/models/MapTest.md | 4 +- ...dPropertiesAndAdditionalPropertiesClass.md | 2 +- .../docs/models/Model200Response.md | 2 +- .../docs/models/ModelClient.md | 2 +- .../docs/models/Name.md | 2 +- .../docs/models/NullableClass.md | 16 +- .../docs/models/ObjectWithDeprecatedFields.md | 6 +- .../docs/models/OuterComposite.md | 2 +- .../docs/models/Pet.md | 6 +- .../docs/models/SpecialModelName.md | 2 +- .../docs/models/User.md | 12 +- .../Api/AnotherFakeApiTests.cs | 6 +- .../Org.OpenAPITools.Test/Api/ApiTestsBase.cs | 3 +- .../Api/DefaultApiTests.cs | 6 +- .../Api/DependencyInjectionTests.cs | 63 +- .../Org.OpenAPITools.Test/Api/FakeApiTests.cs | 32 +- .../Api/FakeClassnameTags123ApiTests.cs | 6 +- .../Org.OpenAPITools.Test/Api/PetApiTests.cs | 14 +- .../Api/StoreApiTests.cs | 6 +- .../Org.OpenAPITools.Test/Api/UserApiTests.cs | 10 +- ...ctivityOutputElementRepresentationTests.cs | 1 - .../Model/ActivityTests.cs | 1 - .../Model/AdditionalPropertiesClassTests.cs | 29 +- .../Model/AnimalTests.cs | 1 - .../Model/ApiResponseTests.cs | 17 +- .../Model/AppleReqTests.cs | 1 - .../Org.OpenAPITools.Test/Model/AppleTests.cs | 1 - .../Model/ArrayOfArrayOfNumberOnlyTests.cs | 1 - .../Model/ArrayOfNumberOnlyTests.cs | 1 - .../Model/ArrayTestTests.cs | 17 +- .../Model/BananaReqTests.cs | 1 - .../Model/BananaTests.cs | 1 - .../Model/BasquePigTests.cs | 1 - .../Model/CapitalizationTests.cs | 29 +- .../Model/CatAllOfTests.cs | 1 - .../Org.OpenAPITools.Test/Model/CatTests.cs | 1 - .../Model/CategoryTests.cs | 17 +- .../Model/ChildCatAllOfTests.cs | 1 - .../Model/ChildCatTests.cs | 1 - .../Model/ClassModelTests.cs | 7 +- .../Model/ComplexQuadrilateralTests.cs | 1 - .../Model/DanishPigTests.cs | 1 - .../Model/DeprecatedObjectTests.cs | 1 - .../Model/DogAllOfTests.cs | 1 - .../Org.OpenAPITools.Test/Model/DogTests.cs | 1 - .../Model/DrawingTests.cs | 17 +- .../Model/EnumArraysTests.cs | 17 +- .../Model/EnumClassTests.cs | 1 - .../Model/EnumTestTests.cs | 45 +- .../Model/EquilateralTriangleTests.cs | 1 - .../Model/FileSchemaTestClassTests.cs | 1 - .../Org.OpenAPITools.Test/Model/FileTests.cs | 1 - .../Model/FooGetDefaultResponseTests.cs | 7 +- .../Org.OpenAPITools.Test/Model/FooTests.cs | 1 - .../Model/FormatTestTests.cs | 107 +- .../Model/FruitReqTests.cs | 1 - .../Org.OpenAPITools.Test/Model/FruitTests.cs | 1 - .../Model/GmFruitTests.cs | 1 - .../Model/GrandparentAnimalTests.cs | 1 - .../Model/HasOnlyReadOnlyTests.cs | 1 - .../Model/HealthCheckResultTests.cs | 1 - .../Model/IsoscelesTriangleTests.cs | 1 - .../Org.OpenAPITools.Test/Model/ListTests.cs | 1 - .../Model/MammalTests.cs | 1 - .../Model/MapTestTests.cs | 33 +- ...ertiesAndAdditionalPropertiesClassTests.cs | 17 +- .../Model/Model200ResponseTests.cs | 17 +- .../Model/ModelClientTests.cs | 7 +- .../Org.OpenAPITools.Test/Model/NameTests.cs | 17 +- .../Model/NullableClassTests.cs | 79 +- .../Model/NullableShapeTests.cs | 1 - .../Model/NumberOnlyTests.cs | 1 - .../Model/ObjectWithDeprecatedFieldsTests.cs | 29 +- .../Org.OpenAPITools.Test/Model/OrderTests.cs | 1 - .../Model/OuterCompositeTests.cs | 17 +- .../Model/OuterEnumDefaultValueTests.cs | 1 - .../OuterEnumIntegerDefaultValueTests.cs | 1 - .../Model/OuterEnumIntegerTests.cs | 1 - .../Model/OuterEnumTests.cs | 1 - .../Model/ParentPetTests.cs | 1 - .../Org.OpenAPITools.Test/Model/PetTests.cs | 39 +- .../Org.OpenAPITools.Test/Model/PigTests.cs | 1 - .../Model/PolymorphicPropertyTests.cs | 1 - .../Model/QuadrilateralInterfaceTests.cs | 1 - .../Model/QuadrilateralTests.cs | 1 - .../Model/ReadOnlyFirstTests.cs | 1 - .../Model/ReturnTests.cs | 1 - .../Model/ScaleneTriangleTests.cs | 1 - .../Model/ShapeInterfaceTests.cs | 1 - .../Model/ShapeOrNullTests.cs | 1 - .../Org.OpenAPITools.Test/Model/ShapeTests.cs | 1 - .../Model/SimpleQuadrilateralTests.cs | 1 - .../Model/SpecialModelNameTests.cs | 17 +- .../Org.OpenAPITools.Test/Model/TagTests.cs | 1 - .../Model/TriangleInterfaceTests.cs | 1 - .../Model/TriangleTests.cs | 1 - .../Org.OpenAPITools.Test/Model/UserTests.cs | 51 +- .../Org.OpenAPITools.Test/Model/WhaleTests.cs | 1 - .../Org.OpenAPITools.Test/Model/ZebraTests.cs | 1 - .../Org.OpenAPITools.Test.csproj | 1 - .../src/Org.OpenAPITools.Test/README.md | 0 .../Org.OpenAPITools/Api/AnotherFakeApi.cs | 106 +- .../src/Org.OpenAPITools/Api/DefaultApi.cs | 87 +- .../src/Org.OpenAPITools/Api/FakeApi.cs | 1545 +++++++++++----- .../Api/FakeClassnameTags123Api.cs | 108 +- .../src/Org.OpenAPITools/Api/IApi.cs | 15 + .../src/Org.OpenAPITools/Api/PetApi.cs | 868 ++++++--- .../src/Org.OpenAPITools/Api/StoreApi.cs | 308 +++- .../src/Org.OpenAPITools/Api/UserApi.cs | 660 ++++--- .../src/Org.OpenAPITools/Client/ApiFactory.cs | 49 + .../Org.OpenAPITools/Client/ApiKeyToken.cs | 12 +- .../Client/ApiResponseEventArgs.cs | 15 +- .../Org.OpenAPITools/Client/ApiResponse`1.cs | 14 +- .../Org.OpenAPITools/Client/ClientUtils.cs | 116 -- .../Client/CookieContainer.cs | 18 + .../Client/DateTimeJsonConverter.cs | 71 + .../Client/DateTimeNullableJsonConverter.cs | 76 + .../Client/HostConfiguration.cs | 140 +- .../src/Org.OpenAPITools/Client/IApi.cs | 21 - .../Client/OpenAPIDateJsonConverter.cs | 42 - .../Extensions/IHostBuilderExtensions.cs | 57 + .../IHttpClientBuilderExtensions.cs | 77 + .../IServiceCollectionExtensions.cs | 88 + .../src/Org.OpenAPITools/Model/Activity.cs | 127 +- .../ActivityOutputElementRepresentation.cs | 139 +- .../Model/AdditionalPropertiesClass.cs | 259 ++- .../src/Org.OpenAPITools/Model/Animal.cs | 135 +- .../src/Org.OpenAPITools/Model/ApiResponse.cs | 165 +- .../src/Org.OpenAPITools/Model/Apple.cs | 138 +- .../src/Org.OpenAPITools/Model/AppleReq.cs | 128 +- .../Model/ArrayOfArrayOfNumberOnly.cs | 127 +- .../Model/ArrayOfNumberOnly.cs | 127 +- .../src/Org.OpenAPITools/Model/ArrayTest.cs | 171 +- .../src/Org.OpenAPITools/Model/Banana.cs | 123 +- .../src/Org.OpenAPITools/Model/BananaReq.cs | 125 +- .../src/Org.OpenAPITools/Model/BasquePig.cs | 123 +- .../Org.OpenAPITools/Model/Capitalization.cs | 230 ++- .../src/Org.OpenAPITools/Model/Cat.cs | 76 +- .../src/Org.OpenAPITools/Model/CatAllOf.cs | 123 +- .../src/Org.OpenAPITools/Model/Category.cs | 152 +- .../src/Org.OpenAPITools/Model/ChildCat.cs | 73 +- .../Org.OpenAPITools/Model/ChildCatAllOf.cs | 168 +- .../src/Org.OpenAPITools/Model/ClassModel.cs | 136 +- .../Model/ComplexQuadrilateral.cs | 78 +- .../src/Org.OpenAPITools/Model/DanishPig.cs | 123 +- .../Model/DeprecatedObject.cs | 126 +- .../src/Org.OpenAPITools/Model/Dog.cs | 74 +- .../src/Org.OpenAPITools/Model/DogAllOf.cs | 126 +- .../src/Org.OpenAPITools/Model/Drawing.cs | 175 +- .../src/Org.OpenAPITools/Model/EnumArrays.cs | 251 ++- .../src/Org.OpenAPITools/Model/EnumClass.cs | 116 +- .../src/Org.OpenAPITools/Model/EnumTest.cs | 542 ++++-- .../Model/EquilateralTriangle.cs | 78 +- .../src/Org.OpenAPITools/Model/File.cs | 126 +- .../Model/FileSchemaTestClass.cs | 140 +- .../src/Org.OpenAPITools/Model/Foo.cs | 124 +- .../Model/FooGetDefaultResponse.cs | 137 +- .../src/Org.OpenAPITools/Model/FormatTest.cs | 548 +++--- .../src/Org.OpenAPITools/Model/Fruit.cs | 94 +- .../src/Org.OpenAPITools/Model/FruitReq.cs | 71 +- .../src/Org.OpenAPITools/Model/GmFruit.cs | 82 +- .../Model/GrandparentAnimal.cs | 123 +- .../Org.OpenAPITools/Model/HasOnlyReadOnly.cs | 111 +- .../Model/HealthCheckResult.cs | 115 +- .../Model/IsoscelesTriangle.cs | 72 +- .../src/Org.OpenAPITools/Model/List.cs | 126 +- .../src/Org.OpenAPITools/Model/Mammal.cs | 80 +- .../src/Org.OpenAPITools/Model/MapTest.cs | 225 ++- ...dPropertiesAndAdditionalPropertiesClass.cs | 170 +- .../Model/Model200Response.cs | 153 +- .../src/Org.OpenAPITools/Model/ModelClient.cs | 136 +- .../src/Org.OpenAPITools/Model/Name.cs | 141 +- .../Org.OpenAPITools/Model/NullableClass.cs | 355 ++-- .../Org.OpenAPITools/Model/NullableShape.cs | 77 +- .../src/Org.OpenAPITools/Model/NumberOnly.cs | 123 +- .../Model/ObjectWithDeprecatedFields.cs | 219 ++- .../src/Org.OpenAPITools/Model/Order.cs | 219 ++- .../Org.OpenAPITools/Model/OuterComposite.cs | 162 +- .../src/Org.OpenAPITools/Model/OuterEnum.cs | 116 +- .../Model/OuterEnumDefaultValue.cs | 116 +- .../Model/OuterEnumInteger.cs | 104 +- .../Model/OuterEnumIntegerDefaultValue.cs | 104 +- .../src/Org.OpenAPITools/Model/ParentPet.cs | 71 +- .../src/Org.OpenAPITools/Model/Pet.cs | 268 ++- .../src/Org.OpenAPITools/Model/Pig.cs | 77 +- .../Model/PolymorphicProperty.cs | 83 +- .../Org.OpenAPITools/Model/Quadrilateral.cs | 77 +- .../Model/QuadrilateralInterface.cs | 123 +- .../Org.OpenAPITools/Model/ReadOnlyFirst.cs | 108 +- .../src/Org.OpenAPITools/Model/Return.cs | 123 +- .../Org.OpenAPITools/Model/ScaleneTriangle.cs | 78 +- .../src/Org.OpenAPITools/Model/Shape.cs | 98 +- .../Org.OpenAPITools/Model/ShapeInterface.cs | 123 +- .../src/Org.OpenAPITools/Model/ShapeOrNull.cs | 98 +- .../Model/SimpleQuadrilateral.cs | 78 +- .../Model/SpecialModelName.cs | 155 +- .../src/Org.OpenAPITools/Model/Tag.cs | 135 +- .../src/Org.OpenAPITools/Model/Triangle.cs | 126 +- .../Model/TriangleInterface.cs | 123 +- .../src/Org.OpenAPITools/Model/User.cs | 329 ++-- .../src/Org.OpenAPITools/Model/Whale.cs | 143 +- .../src/Org.OpenAPITools/Model/Zebra.cs | 181 +- .../src/Org.OpenAPITools/README.md | 260 +++ .../Org.OpenAPITools.Test.csproj | 5 +- .../Org.OpenAPITools.Test.csproj | 5 +- .../Org.OpenAPITools.Test.csproj | 5 +- .../Org.OpenAPITools.Test.csproj | 1 - 721 files changed, 34847 insertions(+), 20341 deletions(-) create mode 100644 modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ApiFactory.mustache create mode 100644 modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/CookieContainer.mustache create mode 100644 modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/DateTimeFormats.mustache rename modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/{OpenAPIDateConverter.mustache => DateTimeJsonConverter.mustache} (55%) create mode 100644 modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/DateTimeNullableJsonConverter.mustache create mode 100644 modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/DefaultApis.mustache create mode 100644 modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/IHostBuilderExtensions.mustache create mode 100644 modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/IHttpClientBuilderExtensions.mustache create mode 100644 modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/IServiceCollectionExtensions.mustache create mode 100644 modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ImplementsIEquatable.mustache create mode 100644 modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ImplementsValidatable.mustache create mode 100644 modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ModelBaseSignature.mustache create mode 100644 modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ModelSignature.mustache create mode 100644 modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/OperationOrDefault.mustache create mode 100644 modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/OperationSignature.mustache create mode 100644 modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/PropertyDataType.mustache rename modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/{README.mustache => README.client.mustache} (96%) create mode 100644 modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/README.solution.mustache create mode 100644 modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/README.test.mustache create mode 100644 modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/testInstructions.mustache create mode 100644 modules/openapi-generator/src/main/resources/csharp-netcore/netcore_project.additions.mustache create mode 100644 modules/openapi-generator/src/main/resources/csharp-netcore/netcore_testproject.additions.mustache create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/README.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/IApi.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/ApiFactory.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/CookieContainer.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/DateTimeJsonConverter.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/DateTimeNullableJsonConverter.cs delete mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/IApi.cs delete mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/OpenAPIDateJsonConverter.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Extensions/IHostBuilderExtensions.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Extensions/IHttpClientBuilderExtensions.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Extensions/IServiceCollectionExtensions.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/README.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/README.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/IApi.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/ApiFactory.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/CookieContainer.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/DateTimeJsonConverter.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/DateTimeNullableJsonConverter.cs delete mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/IApi.cs delete mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/OpenAPIDateJsonConverter.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Extensions/IHostBuilderExtensions.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Extensions/IHttpClientBuilderExtensions.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Extensions/IServiceCollectionExtensions.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/README.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/README.md create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/IApi.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/ApiFactory.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/CookieContainer.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/DateTimeJsonConverter.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/DateTimeNullableJsonConverter.cs delete mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/IApi.cs delete mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/OpenAPIDateJsonConverter.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Extensions/IHostBuilderExtensions.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Extensions/IHttpClientBuilderExtensions.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Extensions/IServiceCollectionExtensions.cs create mode 100644 samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/README.md diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenOperation.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenOperation.java index 2672a1709a..c46875f9fb 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenOperation.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenOperation.java @@ -48,6 +48,7 @@ public class CodegenOperation { public List cookieParams = new ArrayList(); public List requiredParams = new ArrayList(); public List optionalParams = new ArrayList(); + public List requiredAndNotNullableParams = new ArrayList(); public List authMethods; public List tags; public List responses = new ArrayList(); @@ -157,6 +158,10 @@ public class CodegenOperation { return nonEmpty(optionalParams); } + public boolean getHasRequiredAndNotNullableParams() { + return nonEmpty(requiredAndNotNullableParams); + } + /** * Check if there's at least one required parameter * @@ -364,6 +369,7 @@ public class CodegenOperation { sb.append(", cookieParams=").append(cookieParams); sb.append(", requiredParams=").append(requiredParams); sb.append(", optionalParams=").append(optionalParams); + sb.append(", requiredAndNotNullableParams=").append(requiredAndNotNullableParams); sb.append(", authMethods=").append(authMethods); sb.append(", tags=").append(tags); sb.append(", responses=").append(responses); @@ -442,6 +448,7 @@ public class CodegenOperation { Objects.equals(cookieParams, that.cookieParams) && Objects.equals(requiredParams, that.requiredParams) && Objects.equals(optionalParams, that.optionalParams) && + Objects.equals(requiredAndNotNullableParams, that.requiredAndNotNullableParams) && Objects.equals(authMethods, that.authMethods) && Objects.equals(tags, that.tags) && Objects.equals(responses, that.responses) && @@ -471,6 +478,6 @@ public class CodegenOperation { pathParams, queryParams, headerParams, formParams, cookieParams, requiredParams, returnProperty, optionalParams, authMethods, tags, responses, callbacks, imports, examples, requestBodyExamples, externalDocs, vendorExtensions, nickname, operationIdOriginal, operationIdLowerCase, operationIdCamelCase, - operationIdSnakeCase, hasErrorResponseObject); + operationIdSnakeCase, hasErrorResponseObject, requiredAndNotNullableParams); } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java index ca8ac29eb3..ae72385698 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenParameter.java @@ -763,10 +763,14 @@ public class CodegenParameter implements IJsonSchemaValidationProperties { this.requiredVars = requiredVars; } - public boolean compulsory(){ + public boolean requiredAndNotNullable(){ return required && !isNullable; } + public boolean notRequiredOrIsNullable() { + return !required || isNullable; + } + @Override public boolean getIsNull() { return isNull; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java index c3cf38349b..d3de34a29b 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenProperty.java @@ -505,7 +505,7 @@ public class CodegenProperty implements Cloneable, IJsonSchemaValidationProperti return required; } - public boolean compulsory() { + public boolean requiredAndNotNullable() { return getRequired() && !isNullable; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index 0e580ae31d..30e1c099c5 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java @@ -4332,6 +4332,7 @@ public class DefaultCodegen implements CodegenConfig { List formParams = new ArrayList<>(); List requiredParams = new ArrayList<>(); List optionalParams = new ArrayList<>(); + List requiredAndNotNullableParams = new ArrayList<>(); CodegenParameter bodyParam = null; RequestBody requestBody = operation.getRequestBody(); @@ -4441,6 +4442,10 @@ public class DefaultCodegen implements CodegenConfig { optionalParams.add(cp.copy()); op.hasOptionalParams = true; } + + if (cp.requiredAndNotNullable()) { + requiredAndNotNullableParams.add(cp.copy()); + } } // add imports to operation import tag @@ -4477,6 +4482,7 @@ public class DefaultCodegen implements CodegenConfig { op.formParams = formParams; op.requiredParams = requiredParams; op.optionalParams = optionalParams; + op.requiredAndNotNullableParams = requiredAndNotNullableParams; op.externalDocs = operation.getExternalDocs(); // legacy support op.nickname = op.operationId; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreClientCodegen.java index 76075c0986..184df91173 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreClientCodegen.java @@ -400,19 +400,35 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen { // avoid breaking changes if (GENERICHOST.equals(getLibrary())) { - Comparator comparatorByRequiredAndDefault = propertyComparatorByRequired.thenComparing(propertyComparatorByDefaultValue); - Collections.sort(codegenModel.vars, comparatorByRequiredAndDefault); - Collections.sort(codegenModel.allVars, comparatorByRequiredAndDefault); - Collections.sort(codegenModel.requiredVars, comparatorByRequiredAndDefault); - Collections.sort(codegenModel.optionalVars, comparatorByRequiredAndDefault); - Collections.sort(codegenModel.readOnlyVars, comparatorByRequiredAndDefault); - Collections.sort(codegenModel.readWriteVars, comparatorByRequiredAndDefault); - Collections.sort(codegenModel.parentVars, comparatorByRequiredAndDefault); + + Collections.sort(codegenModel.vars, propertyComparatorByName); + Collections.sort(codegenModel.allVars, propertyComparatorByName); + Collections.sort(codegenModel.requiredVars, propertyComparatorByName); + Collections.sort(codegenModel.optionalVars, propertyComparatorByName); + Collections.sort(codegenModel.readOnlyVars, propertyComparatorByName); + Collections.sort(codegenModel.readWriteVars, propertyComparatorByName); + Collections.sort(codegenModel.parentVars, propertyComparatorByName); + + Comparator comparator = propertyComparatorByNullable.thenComparing(propertyComparatorByDefaultValue); + Collections.sort(codegenModel.vars, comparator); + Collections.sort(codegenModel.allVars, comparator); + Collections.sort(codegenModel.requiredVars, comparator); + Collections.sort(codegenModel.optionalVars, comparator); + Collections.sort(codegenModel.readOnlyVars, comparator); + Collections.sort(codegenModel.readWriteVars, comparator); + Collections.sort(codegenModel.parentVars, comparator); } return codegenModel; } + public static Comparator propertyComparatorByName = new Comparator() { + @Override + public int compare(CodegenProperty one, CodegenProperty another) { + return one.name.compareTo(another.name); + } + }; + public static Comparator propertyComparatorByDefaultValue = new Comparator() { @Override public int compare(CodegenProperty one, CodegenProperty another) { @@ -425,18 +441,25 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen { } }; - public static Comparator propertyComparatorByRequired = new Comparator() { + public static Comparator propertyComparatorByNullable = new Comparator() { @Override public int compare(CodegenProperty one, CodegenProperty another) { - if (one.required == another.required) + if (one.isNullable == another.isNullable) return 0; - else if (Boolean.TRUE.equals(one.required)) + else if (Boolean.FALSE.equals(one.isNullable)) return -1; else return 1; } }; + public static Comparator parameterComparatorByDataType = new Comparator() { + @Override + public int compare(CodegenParameter one, CodegenParameter another) { + return one.dataType.compareTo(another.dataType); + } + }; + public static Comparator parameterComparatorByDefaultValue = new Comparator() { @Override public int compare(CodegenParameter one, CodegenParameter another) { @@ -804,8 +827,6 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen { supportingFiles.add(new SupportingFile("auth/OAuthFlow.mustache", authPackageDir, "OAuthFlow.cs")); } } - - addTestInstructions(); } public void setClientPackage(String clientPackage) { @@ -823,45 +844,34 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen { return op; } - Comparator comparatorByRequiredAndDefault = parameterComparatorByRequired.thenComparing(parameterComparatorByDefaultValue); - Collections.sort(op.allParams, comparatorByRequiredAndDefault); - Collections.sort(op.bodyParams, comparatorByRequiredAndDefault); - Collections.sort(op.pathParams, comparatorByRequiredAndDefault); - Collections.sort(op.queryParams, comparatorByRequiredAndDefault); - Collections.sort(op.headerParams, comparatorByRequiredAndDefault); - Collections.sort(op.implicitHeadersParams, comparatorByRequiredAndDefault); - Collections.sort(op.formParams, comparatorByRequiredAndDefault); - Collections.sort(op.cookieParams, comparatorByRequiredAndDefault); - Collections.sort(op.requiredParams, comparatorByRequiredAndDefault); - Collections.sort(op.optionalParams, comparatorByRequiredAndDefault); + Collections.sort(op.allParams, parameterComparatorByDataType); + Collections.sort(op.bodyParams, parameterComparatorByDataType); + Collections.sort(op.pathParams, parameterComparatorByDataType); + Collections.sort(op.queryParams, parameterComparatorByDataType); + Collections.sort(op.headerParams, parameterComparatorByDataType); + Collections.sort(op.implicitHeadersParams, parameterComparatorByDataType); + Collections.sort(op.formParams, parameterComparatorByDataType); + Collections.sort(op.cookieParams, parameterComparatorByDataType); + Collections.sort(op.requiredParams, parameterComparatorByDataType); + Collections.sort(op.optionalParams, parameterComparatorByDataType); + Collections.sort(op.requiredAndNotNullableParams, parameterComparatorByDataType); + + Comparator comparator = parameterComparatorByRequired.thenComparing(parameterComparatorByDefaultValue); + Collections.sort(op.allParams, comparator); + Collections.sort(op.bodyParams, comparator); + Collections.sort(op.pathParams, comparator); + Collections.sort(op.queryParams, comparator); + Collections.sort(op.headerParams, comparator); + Collections.sort(op.implicitHeadersParams, comparator); + Collections.sort(op.formParams, comparator); + Collections.sort(op.cookieParams, comparator); + Collections.sort(op.requiredParams, comparator); + Collections.sort(op.optionalParams, comparator); + Collections.sort(op.requiredAndNotNullableParams, comparator); return op; } - private void addTestInstructions() { - if (GENERICHOST.equals(getLibrary())) { - additionalProperties.put("testInstructions", - "/* *********************************************************************************" + - "\n* Follow these manual steps to construct tests." + - "\n* This file will not be overwritten." + - "\n* *********************************************************************************" + - "\n* 1. Navigate to ApiTests.Base.cs and ensure any tokens are being created correctly." + - "\n* Take care not to commit credentials to any repository." + - "\n*" + - "\n* 2. Mocking is coordinated by ApiTestsBase#AddApiHttpClients." + - "\n* To mock the client, use the generic AddApiHttpClients." + - "\n* To mock the server, change the client's BaseAddress." + - "\n*" + - "\n* 3. Locate the test you want below" + - "\n* - remove the skip property from the Fact attribute" + - "\n* - set the value of any variables if necessary" + - "\n*" + - "\n* 4. Run the tests and ensure they work." + - "\n*" + - "\n*/"); - } - } - public void addSupportingFiles(final String clientPackageDir, final String packageFolder, final AtomicReference excludeTests, final String testPackageFolder, final String testPackageName, final String modelPackageDir, final String authPackageDir) { supportingFiles.add(new SupportingFile("IApiAccessor.mustache", clientPackageDir, "IApiAccessor.cs")); @@ -912,8 +922,23 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen { supportingFiles.add(new SupportingFile("AbstractOpenAPISchema.mustache", modelPackageDir, "AbstractOpenAPISchema.cs")); } - public void addGenericHostSupportingFiles(final String clientPackageDir, final String packageFolder, - final AtomicReference excludeTests, final String testPackageFolder, final String testPackageName, final String modelPackageDir) { + public void addGenericHostSupportingFiles(final String clientPackageDir, final String packageDir, + final AtomicReference excludeTests, final String testPackageDir, final String testPackageName, final String modelPackageDir) { + supportingFiles.add(new SupportingFile("README.test.mustache", testPackageDir, "README.md")); + + supportingFiles.add(new SupportingFile("README.solution.mustache", "", "README.md")); + supportingFiles.add(new SupportingFile("gitignore.mustache", "", ".gitignore")); + supportingFiles.add(new SupportingFile("Solution.mustache", "", packageName + ".sln")); + supportingFiles.add(new SupportingFile("appveyor.mustache", "", "appveyor.yml")); + + supportingFiles.add(new SupportingFile("git_push.sh.mustache", "docs" + File.separator + "scripts", "git_push.sh")); + supportingFiles.add(new SupportingFile("git_push.ps1.mustache", "docs" + File.separator + "scripts", "git_push.ps1")); + // TODO: supportingFiles.add(new SupportingFile("generate.ps1.mustache", "docs" + File.separator + "scripts", "generate.ps1")); + + supportingFiles.add(new SupportingFile("netcore_project.mustache", packageDir, packageName + ".csproj")); + supportingFiles.add(new SupportingFile("README.client.mustache", packageDir, "README.md")); + + // client directory supportingFiles.add(new SupportingFile("TokenProvider`1.mustache", clientPackageDir, "TokenProvider`1.cs")); supportingFiles.add(new SupportingFile("RateLimitProvider`1.mustache", clientPackageDir, "RateLimitProvider`1.cs")); supportingFiles.add(new SupportingFile("TokenContainer`1.mustache", clientPackageDir, "TokenContainer`1.cs")); @@ -922,23 +947,24 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen { supportingFiles.add(new SupportingFile("ApiResponse`1.mustache", clientPackageDir, "ApiResponse`1.cs")); supportingFiles.add(new SupportingFile("ClientUtils.mustache", clientPackageDir, "ClientUtils.cs")); supportingFiles.add(new SupportingFile("HostConfiguration.mustache", clientPackageDir, "HostConfiguration.cs")); - supportingFiles.add(new SupportingFile("README.mustache", "", "README.md")); - supportingFiles.add(new SupportingFile("git_push.sh.mustache", "docs" + File.separator + "scripts", "git_push.sh")); - supportingFiles.add(new SupportingFile("git_push.ps1.mustache", "docs" + File.separator + "scripts", "git_push.ps1")); - // TODO: supportingFiles.add(new SupportingFile("generate.ps1.mustache", "docs" + File.separator + "scripts", "generate.ps1")); - supportingFiles.add(new SupportingFile("gitignore.mustache", "", ".gitignore")); - supportingFiles.add(new SupportingFile("Solution.mustache", "", packageName + ".sln")); - supportingFiles.add(new SupportingFile("netcore_project.mustache", packageFolder, packageName + ".csproj")); - supportingFiles.add(new SupportingFile("appveyor.mustache", "", "appveyor.yml")); - supportingFiles.add(new SupportingFile("OpenAPIDateConverter.mustache", clientPackageDir, "OpenAPIDateJsonConverter.cs")); + supportingFiles.add(new SupportingFile("ApiFactory.mustache", clientPackageDir, "ApiFactory.cs")); + supportingFiles.add(new SupportingFile("DateTimeJsonConverter.mustache", clientPackageDir, "DateTimeJsonConverter.cs")); + supportingFiles.add(new SupportingFile("DateTimeNullableJsonConverter.mustache", clientPackageDir, "DateTimeNullableJsonConverter.cs")); supportingFiles.add(new SupportingFile("ApiResponseEventArgs.mustache", clientPackageDir, "ApiResponseEventArgs.cs")); - supportingFiles.add(new SupportingFile("IApi.mustache", clientPackageDir, getInterfacePrefix() + "Api.cs")); supportingFiles.add(new SupportingFile("JsonSerializerOptionsProvider.mustache", clientPackageDir, "JsonSerializerOptionsProvider.cs")); + supportingFiles.add(new SupportingFile("CookieContainer.mustache", clientPackageDir, "CookieContainer.cs")); + + supportingFiles.add(new SupportingFile("IApi.mustache", sourceFolder + File.separator + packageName + File.separator + apiPackage(), getInterfacePrefix() + "Api.cs")); + + // extensions + String extensionsFolder = sourceFolder + File.separator + packageName + File.separator + "Extensions"; + supportingFiles.add(new SupportingFile("IHttpClientBuilderExtensions.mustache", extensionsFolder, "IHttpClientBuilderExtensions.cs")); + supportingFiles.add(new SupportingFile("IHostBuilderExtensions.mustache", extensionsFolder, "IHostBuilderExtensions.cs")); + supportingFiles.add(new SupportingFile("IServiceCollectionExtensions.mustache", extensionsFolder, "IServiceCollectionExtensions.cs")); String apiTestFolder = testFolder + File.separator + testPackageName() + File.separator + apiPackage(); - if (Boolean.FALSE.equals(excludeTests.get())) { - supportingFiles.add(new SupportingFile("netcore_testproject.mustache", testPackageFolder, testPackageName + ".csproj")); + supportingFiles.add(new SupportingFile("netcore_testproject.mustache", testPackageDir, testPackageName + ".csproj")); supportingFiles.add(new SupportingFile("DependencyInjectionTests.mustache", apiTestFolder, "DependencyInjectionTests.cs")); // do not overwrite test file that already exists @@ -1409,7 +1435,7 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen { * Check modules\openapi-generator\src\test\resources\3_0\java\petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml * Without this method, property petType in GrandparentAnimal will not make it through ParentPet and into ChildCat */ - private void EnsureInheritedPropertiesArePresent(CodegenModel derivedModel) { + private void ensureInheritedPropertiesArePresent(CodegenModel derivedModel) { // every c# generator should definitely want this, or we should fix the issue // still, lets avoid breaking changes :( if (Boolean.FALSE.equals(GENERICHOST.equals(getLibrary()))){ @@ -1429,7 +1455,7 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen { } } - EnsureInheritedPropertiesArePresent(derivedModel.parentModel); + ensureInheritedPropertiesArePresent(derivedModel.parentModel); } /** @@ -1466,12 +1492,46 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen { }); } - EnsureInheritedPropertiesArePresent(cm); + ensureInheritedPropertiesArePresent(cm); + + for (CodegenProperty property : cm.allVars){ + fixInvalidPropertyName(cm, property); + } + for (CodegenProperty property : cm.vars){ + fixInvalidPropertyName(cm, property); + } + for (CodegenProperty property : cm.readWriteVars){ + fixInvalidPropertyName(cm, property); + } + for (CodegenProperty property : cm.optionalVars){ + fixInvalidPropertyName(cm, property); + } + for (CodegenProperty property : cm.parentVars){ + fixInvalidPropertyName(cm, property); + } + for (CodegenProperty property : cm.requiredVars){ + fixInvalidPropertyName(cm, property); + } + for (CodegenProperty property : cm.readOnlyVars){ + fixInvalidPropertyName(cm, property); + } + for (CodegenProperty property : cm.nonNullableVars){ + fixInvalidPropertyName(cm, property); + } } return objs; } + private void fixInvalidPropertyName(CodegenModel model, CodegenProperty property){ + // TODO: remove once https://github.com/OpenAPITools/openapi-generator/pull/13681 is merged + if (property.name.equalsIgnoreCase(model.classname) || + reservedWords().contains(property.name) || + reservedWords().contains(camelize(sanitizeName(property.name), LOWERCASE_FIRST_LETTER))) { + property.name = property.name + "Property"; + } + } + /** * Removes properties from a model which are also defined in a composed class. * diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ApiException.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ApiException.mustache index c716cf25e9..c14c1010ff 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ApiException.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ApiException.mustache @@ -6,7 +6,7 @@ {{/nrt}} using System; -namespace {{packageName}}.Client +namespace {{packageName}}.{{clientPackage}} { ///

/// API Exception diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ApiFactory.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ApiFactory.mustache new file mode 100644 index 0000000000..6cb18d04ef --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ApiFactory.mustache @@ -0,0 +1,49 @@ +using System; +using Microsoft.Extensions.DependencyInjection; + + +namespace {{packageName}}.{{clientPackage}} +{ + /// + /// An IApiFactory interface + /// + {{>visibility}} interface IApiFactory + { + /// + /// A method to create an IApi of type IResult + /// + /// + /// + IResult Create() where IResult : {{interfacePrefix}}{{apiPackage}}.IApi; + } + + /// + /// An ApiFactory + /// + {{>visibility}} class ApiFactory : IApiFactory + { + /// + /// The service provider + /// + public IServiceProvider Services { get; } + + /// + /// Initializes a new instance of the class. + /// + /// + public ApiFactory(IServiceProvider services) + { + Services = services; + } + + /// + /// A method to create an IApi of type IResult + /// + /// + /// + public IResult Create() where IResult : {{interfacePrefix}}{{apiPackage}}.IApi + { + return Services.GetRequiredService(); + } + } +} diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ApiKeyToken.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ApiKeyToken.mustache index 25a751ad6b..3bee0750d5 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ApiKeyToken.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ApiKeyToken.mustache @@ -6,12 +6,12 @@ {{/nrt}} using System; -namespace {{packageName}}.Client +namespace {{packageName}}.{{clientPackage}} { /// /// A token constructed from an apiKey. /// - public class ApiKeyToken : TokenBase + {{>visibility}} class ApiKeyToken : TokenBase { private string _raw; @@ -20,22 +20,12 @@ namespace {{packageName}}.Client /// /// /// - /// + /// public ApiKeyToken(string value, string prefix = "Bearer ", TimeSpan? timeout = null) : base(timeout) { _raw = $"{ prefix }{ value }"; } - /// - /// Places the token in the cookie. - /// - /// - /// - public virtual void UseInCookie(System.Net.Http.HttpRequestMessage request, string cookieName) - { - request.Headers.Add("Cookie", $"{ cookieName }=_raw"); - } - /// /// Places the token in the header. /// diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ApiResponseEventArgs.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ApiResponseEventArgs.mustache index 5ff1619932..a79086e63a 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ApiResponseEventArgs.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ApiResponseEventArgs.mustache @@ -1,46 +1,57 @@ using System; using System.Net; -namespace {{packageName}}.Client +namespace {{packageName}}.{{clientPackage}} { /// /// Useful for tracking server health. /// - public class ApiResponseEventArgs : EventArgs + {{>visibility}} class ApiResponseEventArgs : EventArgs { /// /// The time the request was sent. /// public DateTime RequestedAt { get; } + /// /// The time the response was received. /// public DateTime ReceivedAt { get; } + /// /// The HttpStatusCode received. /// public HttpStatusCode HttpStatus { get; } + /// /// The path requested. /// - public string Path { get; } + public string PathFormat { get; } + /// /// The elapsed time from request to response. /// public TimeSpan ToTimeSpan => this.ReceivedAt - this.RequestedAt; + /// + /// The path + /// + public string Path { get; } + /// /// The event args used to track server health. /// /// /// /// + /// /// - public ApiResponseEventArgs(DateTime requestedAt, DateTime receivedAt, HttpStatusCode httpStatus, string path) + public ApiResponseEventArgs(DateTime requestedAt, DateTime receivedAt, HttpStatusCode httpStatus, string pathFormat, string path) { RequestedAt = requestedAt; ReceivedAt = receivedAt; HttpStatus = httpStatus; + PathFormat = pathFormat; Path = path; } } diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ApiResponse`1.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ApiResponse`1.mustache index f37833790e..7e2e1c8a78 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ApiResponse`1.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ApiResponse`1.mustache @@ -8,12 +8,12 @@ using System; using System.Collections.Generic; using System.Net; -namespace {{packageName}}.Client +namespace {{packageName}}.{{clientPackage}} { /// /// Provides a non-generic contract for the ApiResponse wrapper. /// - public interface IApiResponse + {{>visibility}} interface IApiResponse { /// /// The data type of @@ -30,6 +30,11 @@ namespace {{packageName}}.Client /// The raw content of this response /// string RawContent { get; } + + /// + /// The DateTime when the request was retrieved. + /// + DateTime DownloadedAt { get; } } /// @@ -37,13 +42,11 @@ namespace {{packageName}}.Client /// {{>visibility}} partial class ApiResponse : IApiResponse { - #region Properties - /// /// The deserialized content /// {{! .net 3.1 does not support unconstrained nullable T }} - public T{{#nrt}}{{^netcoreapp3.1}}?{{/netcoreapp3.1}}{{/nrt}} Content { get; set; } + public T{{#nrt}}{{^netcoreapp3.1}}?{{/netcoreapp3.1}}{{/nrt}} Content { get; internal set; } /// /// Gets or sets the status code (HTTP status code) @@ -79,7 +82,10 @@ namespace {{packageName}}.Client /// public System.Net.Http.Headers.HttpResponseHeaders Headers { get; } - #endregion Properties + /// + /// The DateTime when the request was retrieved. + /// + public DateTime DownloadedAt { get; } = DateTime.UtcNow; ///
/// Construct the response using an HttpResponseMessage diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ApiTestsBase.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ApiTestsBase.mustache index 57dd3c7ede..ce4ef35212 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ApiTestsBase.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ApiTestsBase.mustache @@ -3,14 +3,15 @@ using System; using System.Collections.Generic; using System.Security.Cryptography; using Microsoft.Extensions.Hosting; -using {{packageName}}.Client;{{#hasImport}} +using {{packageName}}.{{clientPackage}};{{#hasImport}} using {{packageName}}.{{modelPackage}};{{/hasImport}} +using {{packageName}}.Extensions; -{{{testInstructions}}} +{{>testInstructions}} -namespace {{packageName}}.Test.Api +namespace {{packageName}}.Test.{{apiPackage}} { /// /// Base class for API tests @@ -25,7 +26,7 @@ namespace {{packageName}}.Test.Api } public static IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args) - .Configure{{apiName}}((context, options) => + .Configure{{apiName}}((context, services, options) => { {{#hasApiKeyMethods}}ApiKeyToken apiKeyToken = new ApiKeyToken(context.Configuration[""], timeout: TimeSpan.FromSeconds(1)); options.AddTokens(apiKeyToken); diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/BasicToken.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/BasicToken.mustache index a8a2b910a1..4cb7023f71 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/BasicToken.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/BasicToken.mustache @@ -9,12 +9,12 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; -namespace {{packageName}}.Client +namespace {{packageName}}.{{clientPackage}} { /// /// A token constructed from a username and password. /// - public class BasicToken : TokenBase + {{>visibility}} class BasicToken : TokenBase { private string _username; diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/BearerToken.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/BearerToken.mustache index b6062bfc24..b0fc0a5d2e 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/BearerToken.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/BearerToken.mustache @@ -9,12 +9,12 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; -namespace {{packageName}}.Client +namespace {{packageName}}.{{clientPackage}} { /// /// A token constructed from a token from a bearer token. /// - public class BearerToken : TokenBase + {{>visibility}} class BearerToken : TokenBase { private string _raw; diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ClientUtils.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ClientUtils.mustache index 572565262e..2c200d418a 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ClientUtils.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ClientUtils.mustache @@ -6,24 +6,17 @@ using System; using System.IO; using System.Linq; -using System.Net.Http; using System.Text; using System.Text.Json; -using System.Text.RegularExpressions; -using Microsoft.Extensions.Hosting; -using Microsoft.Extensions.DependencyInjection;{{#supportsRetry}} -using Polly.Timeout; -using Polly.Extensions.Http; -using Polly;{{/supportsRetry}} -using {{packageName}}.Api;{{#useCompareNetObjects}} +using System.Text.RegularExpressions;{{#useCompareNetObjects}} using KellermanSoftware.CompareNetObjects;{{/useCompareNetObjects}} -namespace {{packageName}}.Client +namespace {{packageName}}.{{clientPackage}} { /// /// Utility functions providing some benefit to API client consumers. /// - public static class ClientUtils + {{>visibility}} static class ClientUtils { {{#useCompareNetObjects}} /// @@ -278,146 +271,5 @@ namespace {{packageName}}.Client /// The format to use for DateTime serialization /// public const string ISO8601_DATETIME_FORMAT = "o"; - - {{^hasAuthMethods}} - /// - /// Add the api to your host builder. - /// - /// - /// - public static IHostBuilder Configure{{apiName}}(this IHostBuilder builder) - { - builder.ConfigureServices((context, services) => - { - HostConfiguration config = new HostConfiguration(services); - - Add{{apiName}}(services, config); - }); - - return builder; - } - - {{/hasAuthMethods}} - /// - /// Add the api to your host builder. - /// - /// - /// - public static IHostBuilder Configure{{apiName}}(this IHostBuilder builder, Action options) - { - builder.ConfigureServices((context, services) => - { - HostConfiguration config = new HostConfiguration(services); - - options(context, config); - - Add{{apiName}}(services, config); - }); - - return builder; - } - - {{^hasAuthMethods}} - /// - /// Add the api to your host builder. - /// - /// - /// - public static void Add{{apiName}}(this IServiceCollection services) - { - HostConfiguration config = new HostConfiguration(services); - Add{{apiName}}(services, config); - } - - {{/hasAuthMethods}} - /// - /// Add the api to your host builder. - /// - /// - /// - public static void Add{{apiName}}(this IServiceCollection services, Action options) - { - HostConfiguration config = new HostConfiguration(services); - options(config); - Add{{apiName}}(services, config); - } - - private static void Add{{apiName}}(IServiceCollection services, HostConfiguration host) - { - if (!host.HttpClientsAdded) - host.Add{{apiName}}HttpClients(); - - // ensure that a token provider was provided for this token type - // if not, default to RateLimitProvider - var containerServices = services.Where(s => s.ServiceType.IsGenericType && - s.ServiceType.GetGenericTypeDefinition().IsAssignableFrom(typeof(TokenContainer<>))).ToArray(); - - foreach(var containerService in containerServices) - { - var tokenType = containerService.ServiceType.GenericTypeArguments[0]; - - var provider = services.FirstOrDefault(s => s.ServiceType.IsAssignableFrom(typeof(TokenProvider<>).MakeGenericType(tokenType))); - - if (provider == null) - { - services.AddSingleton(typeof(RateLimitProvider<>).MakeGenericType(tokenType)); - services.AddSingleton(typeof(TokenProvider<>).MakeGenericType(tokenType), - s => s.GetRequiredService(typeof(RateLimitProvider<>).MakeGenericType(tokenType))); - } - } - }{{#supportsRetry}} - - /// - /// Adds a Polly retry policy to your clients. - /// - /// - /// - /// - public static IHttpClientBuilder AddRetryPolicy(this IHttpClientBuilder client, int retries) - { - client.AddPolicyHandler(RetryPolicy(retries)); - - return client; - } - - /// - /// Adds a Polly timeout policy to your clients. - /// - /// - /// - /// - public static IHttpClientBuilder AddTimeoutPolicy(this IHttpClientBuilder client, TimeSpan timeout) - { - client.AddPolicyHandler(TimeoutPolicy(timeout)); - - return client; - } - - /// - /// Adds a Polly circiut breaker to your clients. - /// - /// - /// - /// - /// - public static IHttpClientBuilder AddCircuitBreakerPolicy(this IHttpClientBuilder client, int handledEventsAllowedBeforeBreaking, TimeSpan durationOfBreak) - { - client.AddTransientHttpErrorPolicy(builder => CircuitBreakerPolicy(builder, handledEventsAllowedBeforeBreaking, durationOfBreak)); - - return client; - } - - private static Polly.Retry.AsyncRetryPolicy RetryPolicy(int retries) - => HttpPolicyExtensions - .HandleTransientHttpError() - .Or() - .RetryAsync(retries); - - private static AsyncTimeoutPolicy TimeoutPolicy(TimeSpan timeout) - => Policy.TimeoutAsync(timeout); - - private static Polly.CircuitBreaker.AsyncCircuitBreakerPolicy CircuitBreakerPolicy( - PolicyBuilder builder, int handledEventsAllowedBeforeBreaking, TimeSpan durationOfBreak) - => builder.CircuitBreakerAsync(handledEventsAllowedBeforeBreaking, durationOfBreak);{{/supportsRetry}} } } diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/CookieContainer.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/CookieContainer.mustache new file mode 100644 index 0000000000..f96d4fb418 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/CookieContainer.mustache @@ -0,0 +1,22 @@ +// +{{partial_header}} +{{#nrt}} +#nullable enable + +{{/nrt}} +using System.Linq; +using System.Collections.Generic; + +namespace {{packageName}}.{{clientPackage}} +{ + /// + /// A class containing a CookieContainer + /// + {{>visibility}} sealed class CookieContainer + { + /// + /// The collection of tokens + /// + public System.Net.CookieContainer Value { get; } = new System.Net.CookieContainer(); + } +} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/DateTimeFormats.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/DateTimeFormats.mustache new file mode 100644 index 0000000000..4a24ef29b6 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/DateTimeFormats.mustache @@ -0,0 +1,16 @@ + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'ffffffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'ffffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'ffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ssK", + "yyyyMMddTHHmmss.fffffffK", + "yyyyMMddTHHmmss.ffffffK", + "yyyyMMddTHHmmss.fffffK", + "yyyyMMddTHHmmss.ffffK", + "yyyyMMddTHHmmss.fffK", + "yyyyMMddTHHmmss.ffK", + "yyyyMMddTHHmmss.fK", + "yyyyMMddTHHmmssK", \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/OpenAPIDateConverter.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/DateTimeJsonConverter.mustache similarity index 55% rename from modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/OpenAPIDateConverter.mustache rename to modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/DateTimeJsonConverter.mustache index 144ac7328a..bdf2b8c1cc 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/OpenAPIDateConverter.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/DateTimeJsonConverter.mustache @@ -4,14 +4,18 @@ using System.Globalization; using System.Text.Json; using System.Text.Json.Serialization; -namespace {{packageName}}.Client +namespace {{packageName}}.{{clientPackage}} { /// /// Formatter for 'date' openapi formats ss defined by full-date - RFC3339 /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types /// - public class OpenAPIDateJsonConverter : JsonConverter + {{>visibility}} class DateTimeJsonConverter : JsonConverter { + public static readonly string[] FORMATS = { +{{>DateTimeFormats}} + }; + /// /// Returns a DateTime from the Json object /// @@ -19,8 +23,18 @@ namespace {{packageName}}.Client /// /// /// - public override DateTime Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => - DateTime.ParseExact(reader.GetString(){{nrt!}}, "yyyy-MM-dd", CultureInfo.InvariantCulture); + public override DateTime Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { + if (reader.TokenType == JsonTokenType.Null) + throw new NotSupportedException(); + + string value = reader.GetString(){{nrt!}}; + + foreach(string format in FORMATS) + if (DateTime.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateTime result)) + return result; + + throw new NotSupportedException(); + } /// /// Writes the DateTime to the json writer @@ -29,6 +43,6 @@ namespace {{packageName}}.Client /// /// public override void Write(Utf8JsonWriter writer, DateTime dateTimeValue, JsonSerializerOptions options) => - writer.WriteStringValue(dateTimeValue.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture)); + writer.WriteStringValue(dateTimeValue.ToString(FORMATS[0], CultureInfo.InvariantCulture)); } } diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/DateTimeNullableJsonConverter.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/DateTimeNullableJsonConverter.mustache new file mode 100644 index 0000000000..224dd044c3 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/DateTimeNullableJsonConverter.mustache @@ -0,0 +1,53 @@ +{{>partial_header}} +using System; +using System.Globalization; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace {{packageName}}.{{clientPackage}} +{ + /// + /// Formatter for 'date' openapi formats ss defined by full-date - RFC3339 + /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types + /// + {{>visibility}} class DateTimeNullableJsonConverter : JsonConverter + { + public static readonly string[] FORMATS = { +{{>DateTimeFormats}} + }; + + /// + /// Returns a DateTime from the Json object + /// + /// + /// + /// + /// + public override DateTime? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { + if (reader.TokenType == JsonTokenType.Null) + return null; + + string value = reader.GetString(){{nrt!}}; + + foreach(string format in FORMATS) + if (DateTime.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateTime result)) + return result; + + return null; + } + + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, DateTime? dateTimeValue, JsonSerializerOptions options) + { + if (dateTimeValue == null) + writer.WriteNullValue(); + else + writer.WriteStringValue(dateTimeValue.Value.ToString(FORMATS[0], CultureInfo.InvariantCulture)); + } + } +} diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/DefaultApis.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/DefaultApis.mustache new file mode 100644 index 0000000000..4729d92303 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/DefaultApis.mustache @@ -0,0 +1 @@ +{{#apiInfo}}{{#apis}}{{classname}}{{^-last}}, {{/-last}}{{/apis}}{{/apiInfo}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/DependencyInjectionTests.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/DependencyInjectionTests.mustache index ac4a4d8e2d..57d3cc8670 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/DependencyInjectionTests.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/DependencyInjectionTests.mustache @@ -4,11 +4,12 @@ using Microsoft.Extensions.Hosting; using Microsoft.Extensions.DependencyInjection; using System.Collections.Generic; using System.Security.Cryptography; -using {{packageName}}.Client; -using {{packageName}}.{{apiPackage}}; +using {{packageName}}.{{clientPackage}}; +using {{packageName}}.{{interfacePrefix}}{{apiPackage}}; +using {{packageName}}.Extensions; using Xunit; -namespace {{packageName}}.Test.Api +namespace {{packageName}}.Test.{{apiPackage}} { /// /// Tests the dependency injection. @@ -16,7 +17,7 @@ namespace {{packageName}}.Test.Api public class DependencyInjectionTest { private readonly IHost _hostUsingConfigureWithoutAClient = - Host.CreateDefaultBuilder(Array.Empty()).Configure{{apiName}}((context, options) => + Host.CreateDefaultBuilder(Array.Empty()).Configure{{apiName}}((context, services, options) => { {{#hasApiKeyMethods}}ApiKeyToken apiKeyToken = new ApiKeyToken($"", timeout: TimeSpan.FromSeconds(1)); options.AddTokens(apiKeyToken); @@ -37,7 +38,7 @@ namespace {{packageName}}.Test.Api .Build(); private readonly IHost _hostUsingConfigureWithAClient = - Host.CreateDefaultBuilder(Array.Empty()).Configure{{apiName}}((context, options) => + Host.CreateDefaultBuilder(Array.Empty()).Configure{{apiName}}((context, services, options) => { {{#hasApiKeyMethods}}ApiKeyToken apiKeyToken = new ApiKeyToken($"", timeout: TimeSpan.FromSeconds(1)); options.AddTokens(apiKeyToken); @@ -113,7 +114,7 @@ namespace {{packageName}}.Test.Api [Fact] public void ConfigureApiWithAClientTest() { - {{#apiInfo}}{{#apis}}var {{#lambda.camelcase}}{{classname}}{{/lambda.camelcase}} = _hostUsingConfigureWithAClient.Services.GetRequiredService<{{interfacePrefix}}{{classname}}>(); + {{#apiInfo}}{{#apis}}var {{#lambda.camelcase}}{{classname}}{{/lambda.camelcase}} = _hostUsingConfigureWithAClient.Services.GetRequiredService<{{interfacePrefix}}{{apiPackage}}.{{interfacePrefix}}{{classname}}>(); Assert.True({{#lambda.camelcase}}{{classname}}{{/lambda.camelcase}}.HttpClient.BaseAddress != null);{{^-last}} {{/-last}}{{/apis}}{{/apiInfo}} @@ -125,7 +126,7 @@ namespace {{packageName}}.Test.Api [Fact] public void ConfigureApiWithoutAClientTest() { - {{#apiInfo}}{{#apis}}var {{#lambda.camelcase}}{{classname}}{{/lambda.camelcase}} = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<{{interfacePrefix}}{{classname}}>(); + {{#apiInfo}}{{#apis}}var {{#lambda.camelcase}}{{classname}}{{/lambda.camelcase}} = _hostUsingConfigureWithoutAClient.Services.GetRequiredService<{{interfacePrefix}}{{apiPackage}}.{{interfacePrefix}}{{classname}}>(); Assert.True({{#lambda.camelcase}}{{classname}}{{/lambda.camelcase}}.HttpClient.BaseAddress != null);{{^-last}} {{/-last}}{{/apis}}{{/apiInfo}} @@ -137,7 +138,7 @@ namespace {{packageName}}.Test.Api [Fact] public void AddApiWithAClientTest() { - {{#apiInfo}}{{#apis}}var {{#lambda.camelcase}}{{classname}}{{/lambda.camelcase}} = _hostUsingAddWithAClient.Services.GetRequiredService<{{interfacePrefix}}{{classname}}>(); + {{#apiInfo}}{{#apis}}var {{#lambda.camelcase}}{{classname}}{{/lambda.camelcase}} = _hostUsingAddWithAClient.Services.GetRequiredService<{{interfacePrefix}}{{apiPackage}}.{{interfacePrefix}}{{classname}}>(); Assert.True({{#lambda.camelcase}}{{classname}}{{/lambda.camelcase}}.HttpClient.BaseAddress != null);{{^-last}} {{/-last}}{{/apis}}{{/apiInfo}} @@ -149,7 +150,7 @@ namespace {{packageName}}.Test.Api [Fact] public void AddApiWithoutAClientTest() { - {{#apiInfo}}{{#apis}}var {{#lambda.camelcase}}{{classname}}{{/lambda.camelcase}} = _hostUsingAddWithoutAClient.Services.GetRequiredService<{{interfacePrefix}}{{classname}}>(); + {{#apiInfo}}{{#apis}}var {{#lambda.camelcase}}{{classname}}{{/lambda.camelcase}} = _hostUsingAddWithoutAClient.Services.GetRequiredService<{{interfacePrefix}}{{apiPackage}}.{{interfacePrefix}}{{classname}}>(); Assert.True({{#lambda.camelcase}}{{classname}}{{/lambda.camelcase}}.HttpClient.BaseAddress != null);{{^-last}} {{/-last}}{{/apis}}{{/apiInfo}} diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/HostConfiguration.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/HostConfiguration.mustache index e74707baa8..4c6114f9f1 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/HostConfiguration.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/HostConfiguration.mustache @@ -10,18 +10,22 @@ using System.Text.Json; using System.Text.Json.Serialization; using System.Net.Http; using Microsoft.Extensions.DependencyInjection; -using {{packageName}}.Api; -using {{packageName}}.Model; +using {{packageName}}.{{modelPackage}}; -namespace {{packageName}}.Client +namespace {{packageName}}.{{clientPackage}} { /// /// Provides hosting configuration for {{packageName}} /// - public class HostConfiguration + {{>visibility}} class HostConfiguration<{{#apiInfo}}{{#apis}}T{{classname}}{{^-last}}, {{/-last}}{{/apis}}{{/apiInfo}}> + {{#apiInfo}} + {{#apis}} + where T{{classname}} : class, {{interfacePrefix}}{{apiPackage}}.{{interfacePrefix}}{{classname}} + {{/apis}} + {{/apiInfo}} { private readonly IServiceCollection _services; - private JsonSerializerOptions _jsonOptions = new JsonSerializerOptions(); + private readonly JsonSerializerOptions _jsonOptions = new JsonSerializerOptions(); internal bool HttpClientsAdded { get; private set; } @@ -33,30 +37,22 @@ namespace {{packageName}}.Client { _services = services; _jsonOptions.Converters.Add(new JsonStringEnumConverter()); - _jsonOptions.Converters.Add(new OpenAPIDateJsonConverter()); -{{#models}} -{{#model}} -{{^isEnum}} -{{#allOf}} -{{#-first}} + _jsonOptions.Converters.Add(new DateTimeJsonConverter()); + _jsonOptions.Converters.Add(new DateTimeNullableJsonConverter()); + {{#models}} + {{#model}} + {{#isEnum}} + _jsonOptions.Converters.Add(new {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}Converter()); + _jsonOptions.Converters.Add(new {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}NullableConverter()); + {{/isEnum}} + {{^isEnum}} _jsonOptions.Converters.Add(new {{classname}}JsonConverter()); -{{/-first}} -{{/allOf}} -{{#anyOf}} -{{#-first}} - _jsonOptions.Converters.Add(new {{classname}}JsonConverter()); -{{/-first}} -{{/anyOf}} -{{#oneOf}} -{{#-first}} - _jsonOptions.Converters.Add(new {{classname}}JsonConverter()); -{{/-first}} -{{/oneOf}} -{{/isEnum}} -{{/model}} -{{/models}} - _services.AddSingleton(new JsonSerializerOptionsProvider(_jsonOptions));{{#apiInfo}}{{#apis}} - _services.AddSingleton<{{interfacePrefix}}{{classname}}, {{classname}}>();{{/apis}}{{/apiInfo}} + {{/isEnum}} + {{/model}} + {{/models}} + _services.AddSingleton(new JsonSerializerOptionsProvider(_jsonOptions)); + _services.AddSingleton();{{#apiInfo}}{{#apis}} + _services.AddTransient();{{/apis}}{{/apiInfo}} } /// @@ -65,17 +61,16 @@ namespace {{packageName}}.Client /// /// /// - public HostConfiguration Add{{apiName}}HttpClients<{{#apiInfo}}{{#apis}}T{{classname}}{{^-last}}, {{/-last}}{{/apis}}> + public HostConfiguration<{{#apiInfo}}{{#apis}}T{{classname}}{{^-last}}, {{/-last}}{{/apis}}{{/apiInfo}}> Add{{apiName}}HttpClients ( - Action{{nrt?}} client = null, Action{{nrt?}} builder = null){{#apis}} - where T{{classname}} : class, {{interfacePrefix}}{{classname}}{{/apis}} + Action{{nrt?}} client = null, Action{{nrt?}} builder = null) { if (client == null) client = c => c.BaseAddress = new Uri(ClientUtils.BASE_ADDRESS); List builders = new List(); - - {{#apis}}builders.Add(_services.AddHttpClient<{{interfacePrefix}}{{classname}}, T{{classname}}>(client)); + + {{#apiInfo}}{{#apis}}builders.Add(_services.AddHttpClient<{{interfacePrefix}}{{apiPackage}}.{{interfacePrefix}}{{classname}}, T{{classname}}>(client)); {{/apis}}{{/apiInfo}} if (builder != null) foreach (IHttpClientBuilder instance in builders) @@ -86,25 +81,12 @@ namespace {{packageName}}.Client return this; } - /// - /// Configures the HttpClients. - /// - /// - /// - /// - public HostConfiguration Add{{apiName}}HttpClients(Action{{nrt?}} client = null, Action{{nrt?}} builder = null) - { - Add{{apiName}}HttpClients<{{#apiInfo}}{{#apis}}{{classname}}{{^-last}}, {{/-last}}{{/apis}}{{/apiInfo}}>(client, builder); - - return this; - } - /// /// Configures the JsonSerializerSettings /// /// /// - public HostConfiguration ConfigureJsonOptions(Action options) + public HostConfiguration<{{#apiInfo}}{{#apis}}T{{classname}}{{^-last}}, {{/-last}}{{/apis}}{{/apiInfo}}> ConfigureJsonOptions(Action options) { options(_jsonOptions); @@ -117,7 +99,7 @@ namespace {{packageName}}.Client /// /// /// - public HostConfiguration AddTokens(TTokenBase token) where TTokenBase : TokenBase + public HostConfiguration<{{#apiInfo}}{{#apis}}T{{classname}}{{^-last}}, {{/-last}}{{/apis}}{{/apiInfo}}> AddTokens(TTokenBase token) where TTokenBase : TokenBase { return AddTokens(new TTokenBase[]{ token }); } @@ -128,7 +110,7 @@ namespace {{packageName}}.Client /// /// /// - public HostConfiguration AddTokens(IEnumerable tokens) where TTokenBase : TokenBase + public HostConfiguration<{{#apiInfo}}{{#apis}}T{{classname}}{{^-last}}, {{/-last}}{{/apis}}{{/apiInfo}}> AddTokens(IEnumerable tokens) where TTokenBase : TokenBase { TokenContainer container = new TokenContainer(tokens); _services.AddSingleton(services => container); @@ -142,7 +124,7 @@ namespace {{packageName}}.Client /// /// /// - public HostConfiguration UseProvider() + public HostConfiguration<{{#apiInfo}}{{#apis}}T{{classname}}{{^-last}}, {{/-last}}{{/apis}}{{/apiInfo}}> UseProvider() where TTokenProvider : TokenProvider where TTokenBase : TokenBase { diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/HttpSigningConfiguration.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/HttpSigningConfiguration.mustache index 4e17cf240e..ed86b4967d 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/HttpSigningConfiguration.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/HttpSigningConfiguration.mustache @@ -13,12 +13,12 @@ using System.Security.Cryptography; using System.Text; using System.Web; -namespace {{packageName}}.Client +namespace {{packageName}}.{{clientPackage}} { /// /// Class for HttpSigning auth related parameter and methods /// - public class HttpSigningConfiguration + {{>visibility}} class HttpSigningConfiguration { #region /// diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/HttpSigningToken.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/HttpSigningToken.mustache index 224714027c..353ce04fca 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/HttpSigningToken.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/HttpSigningToken.mustache @@ -9,12 +9,12 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; -namespace {{packageName}}.Client +namespace {{packageName}}.{{clientPackage}} { /// /// A token constructed from an HttpSigningConfiguration /// - public class HttpSignatureToken : TokenBase + {{>visibility}} class HttpSignatureToken : TokenBase { private HttpSigningConfiguration _configuration; diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/IApi.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/IApi.mustache index 019132830f..0adffa7509 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/IApi.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/IApi.mustache @@ -1,21 +1,15 @@ using System.Net.Http; -namespace {{packageName}}.Client +namespace {{packageName}}.{{interfacePrefix}}{{apiPackage}} { /// /// Any Api client /// - public interface {{interfacePrefix}}Api + {{>visibility}} interface {{interfacePrefix}}Api { /// /// The HttpClient /// HttpClient HttpClient { get; } - - /// - /// An event to track the health of the server. - /// If you store these event args, be sure to purge old event args to prevent a memory leak. - /// - event ClientUtils.EventHandler{{nrt?}} ApiResponded; } } \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/IHostBuilderExtensions.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/IHostBuilderExtensions.mustache new file mode 100644 index 0000000000..2c21e5be31 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/IHostBuilderExtensions.mustache @@ -0,0 +1,81 @@ +{{>partial_header}} +{{#nrt}} +#nullable enable + +{{/nrt}} +using System; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using {{packageName}}.{{clientPackage}}; +using {{packageName}}.{{apiPackage}}; + +namespace {{packageName}}.Extensions +{ + /// + /// Extension methods for IHostBuilder + /// + {{>visibility}} static class IHostBuilderExtensions + { + {{^hasAuthMethods}} + /// + /// Add the api to your host builder. + /// + /// + public static IHostBuilder Configure{{apiName}}<{{#apiInfo}}{{#apis}}T{{classname}}{{^-last}}, {{/-last}}{{/apis}}{{/apiInfo}}>(this IHostBuilder builder) + {{#apiInfo}} + {{#apis}} + where T{{classname}} : class, {{interfacePrefix}}{{apiPackage}}.{{interfacePrefix}}{{classname}} + {{/apis}} + {{/apiInfo}} + { + builder.ConfigureServices((context, services) => + { + HostConfiguration<{{#apiInfo}}{{#apis}}T{{classname}}{{^-last}}, {{/-last}}{{/apis}}{{/apiInfo}}> config = new HostConfiguration<{{#apiInfo}}{{#apis}}T{{classname}}{{^-last}}, {{/-last}}{{/apis}}{{/apiInfo}}>(services); + + IServiceCollectionExtensions.Add{{apiName}}(services, config); + }); + + return builder; + } + + /// + /// Add the api to your host builder. + /// + /// + public static IHostBuilder Configure{{apiName}}(this IHostBuilder builder) + => Configure{{apiName}}<{{>DefaultApis}}>(builder); + + {{/hasAuthMethods}} + /// + /// Add the api to your host builder. + /// + /// + /// + public static IHostBuilder Configure{{apiName}}<{{#apiInfo}}{{#apis}}T{{classname}}{{^-last}}, {{/-last}}{{/apis}}{{/apiInfo}}>(this IHostBuilder builder, Action> options) + {{#apiInfo}} + {{#apis}} + where T{{classname}} : class, {{interfacePrefix}}{{apiPackage}}.{{interfacePrefix}}{{classname}} + {{/apis}} + {{/apiInfo}} + { + builder.ConfigureServices((context, services) => + { + HostConfiguration<{{#apiInfo}}{{#apis}}T{{classname}}{{^-last}}, {{/-last}}{{/apis}}{{/apiInfo}}> config = new HostConfiguration<{{#apiInfo}}{{#apis}}T{{classname}}{{^-last}}, {{/-last}}{{/apis}}{{/apiInfo}}>(services); + + options(context, services, config); + + IServiceCollectionExtensions.Add{{apiName}}(services, config); + }); + + return builder; + } + + /// + /// Add the api to your host builder. + /// + /// + /// + public static IHostBuilder Configure{{apiName}}(this IHostBuilder builder, ActionDefaultApis}}>> options) + => Configure{{apiName}}<{{>DefaultApis}}>(builder, options); + } +} diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/IHttpClientBuilderExtensions.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/IHttpClientBuilderExtensions.mustache new file mode 100644 index 0000000000..31e6369086 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/IHttpClientBuilderExtensions.mustache @@ -0,0 +1,75 @@ +{{>partial_header}} +{{#nrt}} +#nullable enable + +{{/nrt}} +using System; +using System.Net.Http; +using Microsoft.Extensions.DependencyInjection;{{#supportsRetry}} +using Polly.Timeout; +using Polly.Extensions.Http; +using Polly;{{/supportsRetry}} + +namespace {{packageName}}.Extensions +{ + /// + /// Extension methods for IHttpClientBuilder + /// + {{>visibility}} static class IHttpClientBuilderExtensions + { + {{#supportsRetry}} + /// + /// Adds a Polly retry policy to your clients. + /// + /// + /// + /// + public static IHttpClientBuilder AddRetryPolicy(this IHttpClientBuilder client, int retries) + { + client.AddPolicyHandler(RetryPolicy(retries)); + + return client; + } + + /// + /// Adds a Polly timeout policy to your clients. + /// + /// + /// + /// + public static IHttpClientBuilder AddTimeoutPolicy(this IHttpClientBuilder client, TimeSpan timeout) + { + client.AddPolicyHandler(TimeoutPolicy(timeout)); + + return client; + } + + /// + /// Adds a Polly circiut breaker to your clients. + /// + /// + /// + /// + /// + public static IHttpClientBuilder AddCircuitBreakerPolicy(this IHttpClientBuilder client, int handledEventsAllowedBeforeBreaking, TimeSpan durationOfBreak) + { + client.AddTransientHttpErrorPolicy(builder => CircuitBreakerPolicy(builder, handledEventsAllowedBeforeBreaking, durationOfBreak)); + + return client; + } + + private static Polly.Retry.AsyncRetryPolicy RetryPolicy(int retries) + => HttpPolicyExtensions + .HandleTransientHttpError() + .Or() + .RetryAsync(retries); + + private static AsyncTimeoutPolicy TimeoutPolicy(TimeSpan timeout) + => Policy.TimeoutAsync(timeout); + + private static Polly.CircuitBreaker.AsyncCircuitBreakerPolicy CircuitBreakerPolicy( + PolicyBuilder builder, int handledEventsAllowedBeforeBreaking, TimeSpan durationOfBreak) + => builder.CircuitBreakerAsync(handledEventsAllowedBeforeBreaking, durationOfBreak); + {{/supportsRetry}} + } +} diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/IServiceCollectionExtensions.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/IServiceCollectionExtensions.mustache new file mode 100644 index 0000000000..f1f4be90af --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/IServiceCollectionExtensions.mustache @@ -0,0 +1,109 @@ +{{>partial_header}} +{{#nrt}} +#nullable enable + +{{/nrt}} +using System; +using System.Linq; +using Microsoft.Extensions.DependencyInjection; +using {{packageName}}.{{clientPackage}}; +using {{packageName}}.{{apiPackage}}; + +namespace {{packageName}}.Extensions +{ + /// + /// Extension methods for IServiceCollection + /// + {{>visibility}} static class IServiceCollectionExtensions + { + {{^hasAuthMethods}} + /// + /// Add the api to your host builder. + /// + /// + /// + public static void Add{{apiName}}<{{#apiInfo}}{{#apis}}T{{classname}}{{^-last}}, {{/-last}}{{/apis}}{{/apiInfo}}>(this IServiceCollection services) + {{#apiInfo}} + {{#apis}} + where T{{classname}} : class, {{interfacePrefix}}{{apiPackage}}.{{interfacePrefix}}{{classname}} + {{/apis}} + {{/apiInfo}} + { + HostConfiguration<{{#apiInfo}}{{#apis}}T{{classname}}{{^-last}}, {{/-last}}{{/apis}}{{/apiInfo}}> config = new HostConfiguration<{{#apiInfo}}{{#apis}}T{{classname}}{{^-last}}, {{/-last}}{{/apis}}{{/apiInfo}}>(services); + Add{{apiName}}(services, config); + } + + /// + /// Add the api to your host builder. + /// + /// + /// + public static void Add{{apiName}}(this IServiceCollection services) + { + HostConfiguration<{{>DefaultApis}}> config = new HostConfiguration<{{>DefaultApis}}>(services); + Add{{apiName}}(services, config); + } + + {{/hasAuthMethods}} + /// + /// Add the api to your host builder. + /// + /// + /// + public static void Add{{apiName}}<{{#apiInfo}}{{#apis}}T{{classname}}{{^-last}}, {{/-last}}{{/apis}}{{/apiInfo}}>(this IServiceCollection services, Action> options) + {{#apiInfo}} + {{#apis}} + where T{{classname}} : class, {{interfacePrefix}}{{apiPackage}}.{{interfacePrefix}}{{classname}} + {{/apis}} + {{/apiInfo}} + { + HostConfiguration<{{#apiInfo}}{{#apis}}T{{classname}}{{^-last}}, {{/-last}}{{/apis}}{{/apiInfo}}> config = new HostConfiguration<{{#apiInfo}}{{#apis}}T{{classname}}{{^-last}}, {{/-last}}{{/apis}}{{/apiInfo}}>(services); + options(config); + Add{{apiName}}(services, config); + } + + /// + /// Add the api to your host builder. + /// + /// + /// + public static void Add{{apiName}}(this IServiceCollection services, ActionDefaultApis}}>> options) + { + HostConfiguration<{{>DefaultApis}}> config = new HostConfiguration<{{>DefaultApis}}>(services); + options(config); + Add{{apiName}}(services, config); + } + + internal static void Add{{apiName}}<{{#apiInfo}}{{#apis}}T{{classname}}{{^-last}}, {{/-last}}{{/apis}}{{/apiInfo}}>(IServiceCollection services, HostConfiguration<{{#apiInfo}}{{#apis}}T{{classname}}{{^-last}}, {{/-last}}{{/apis}}{{/apiInfo}}> host) + {{#apiInfo}} + {{#apis}} + where T{{classname}} : class, {{interfacePrefix}}{{apiPackage}}.{{interfacePrefix}}{{classname}} + {{/apis}} + {{/apiInfo}} + { + if (!host.HttpClientsAdded) + host.Add{{apiName}}HttpClients(); + + services.AddSingleton(); + + // ensure that a token provider was provided for this token type + // if not, default to RateLimitProvider + var containerServices = services.Where(s => s.ServiceType.IsGenericType && + s.ServiceType.GetGenericTypeDefinition().IsAssignableFrom(typeof(TokenContainer<>))).ToArray(); + + foreach(var containerService in containerServices) + { + var tokenType = containerService.ServiceType.GenericTypeArguments[0]; + + var provider = services.FirstOrDefault(s => s.ServiceType.IsAssignableFrom(typeof(TokenProvider<>).MakeGenericType(tokenType))); + + if (provider == null) + { + services.AddSingleton(typeof(RateLimitProvider<>).MakeGenericType(tokenType)); + services.AddSingleton(typeof(TokenProvider<>).MakeGenericType(tokenType), + s => s.GetRequiredService(typeof(RateLimitProvider<>).MakeGenericType(tokenType))); + } + } + } + } +} diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ImplementsIEquatable.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ImplementsIEquatable.mustache new file mode 100644 index 0000000000..25f679727a --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ImplementsIEquatable.mustache @@ -0,0 +1,3 @@ +{{#readOnlyVars}} +{{#-first}} +{{#parent}}, {{/parent}}{{^parent}} : {{/parent}}IEquatable<{{classname}}{{nrt?}}>{{/-first}}{{/readOnlyVars}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ImplementsValidatable.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ImplementsValidatable.mustache new file mode 100644 index 0000000000..546971159e --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ImplementsValidatable.mustache @@ -0,0 +1,4 @@ +{{#validatable}} +{{^parent}} +{{^readOnlyVars}} + : {{/readOnlyVars}}{{/parent}}{{#parent}}{{^readOnlyVars}}, {{/readOnlyVars}}{{/parent}}{{^parent}}{{#readOnlyVars}}{{#-first}}, {{/-first}}{{/readOnlyVars}}{{/parent}}IValidatableObject{{/validatable}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/JsonConverter.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/JsonConverter.mustache index 0a0f7540ca..00de10d513 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/JsonConverter.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/JsonConverter.mustache @@ -1,15 +1,8 @@ /// /// A Json converter for type {{classname}} /// - public class {{classname}}JsonConverter : JsonConverter<{{classname}}> + {{>visibility}} class {{classname}}JsonConverter : JsonConverter<{{classname}}> { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof({{classname}}).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -22,9 +15,11 @@ { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); + JsonTokenType startingTokenType = reader.TokenType; + {{#composedSchemas.anyOf}} Utf8JsonReader {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}Reader = reader; bool {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}Deserialized = Client.ClientUtils.TryDeserialize<{{{dataType}}}>(ref {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}Reader, options, out {{{dataType}}}{{^isBoolean}}{{nrt?}}{{/isBoolean}} {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}); @@ -38,20 +33,23 @@ {{#composedSchemas.allOf}} {{^isInherited}} Utf8JsonReader {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}Reader = reader; - bool {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}Deserialized = Client.ClientUtils.TryDeserialize<{{{dataType}}}>(ref {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}Reader, options, out {{{dataType}}}{{^isBoolean}}{{nrt?}}{{/isBoolean}} {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}); + bool {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}Deserialized = Client.ClientUtils.TryDeserialize<{{{dataType}}}>(ref reader, options, out {{{dataType}}}{{^isBoolean}}{{nrt?}}{{/isBoolean}} {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}); {{/isInherited}} {{/composedSchemas.allOf}} {{#allVars}} - {{#lambda.optional}}{{{datatypeWithEnum}}}{{/lambda.optional}} {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = default; + {{#isInnerEnum}}{{^isMap}}{{classname}}.{{/isMap}}{{/isInnerEnum}}{{{datatypeWithEnum}}}{{#isEnum}}{{#isNullable}}?{{/isNullable}}{{/isEnum}} {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = default; {{/allVars}} while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string{{nrt?}} propertyName = reader.GetString(); reader.Read(); @@ -61,48 +59,92 @@ {{#allVars}} case "{{baseName}}": {{#isString}} + {{^isMap}} + {{^isEnum}} + {{^isUuid}} {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = reader.GetString(); + {{/isUuid}} + {{/isEnum}} + {{/isMap}} {{/isString}} {{#isBoolean}} {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = reader.GetBoolean(); {{/isBoolean}} - {{#isDecimal}} - {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = reader.GetDecimal(); - {{/isDecimal}} {{#isNumeric}} - {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = reader.GetInt32(); - {{/isNumeric}} - {{#isLong}} - {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = reader.GetInt64(); - {{/isLong}} + {{^isEnum}} {{#isDouble}} {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = reader.GetDouble(); {{/isDouble}} + {{#isDecimal}} + {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = reader.GetDecimal(); + {{/isDecimal}} + {{#isFloat}} + {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = (float)reader.GetDouble(); + {{/isFloat}} + {{#isLong}} + {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = reader.GetInt64(); + {{/isLong}} + {{^isLong}} + {{^isFloat}} + {{^isDecimal}} + {{^isDouble}} + {{#isNullable}} + if (reader.TokenType != JsonTokenType.Null) + {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = reader.GetInt32(); + {{/isNullable}} + {{^isNullable}} + {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = reader.GetInt32(); + {{/isNullable}} + {{/isDouble}} + {{/isDecimal}} + {{/isFloat}} + {{/isLong}} + {{/isEnum}} + {{/isNumeric}} {{#isDate}} - {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = reader.GetDateTime(); + {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = JsonSerializer.Deserialize(ref reader, options); {{/isDate}} {{#isDateTime}} - {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = reader.GetDateTime(); + {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = JsonSerializer.Deserialize(ref reader, options); {{/isDateTime}} + {{#isEnum}} + {{^isMap}} + {{#isNumeric}} + {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = ({{#isInnerEnum}}{{classname}}.{{/isInnerEnum}}{{{datatypeWithEnum}}}) reader.GetInt32(); + {{/isNumeric}} + {{^isNumeric}} + string {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}RawValue = reader.GetString(); + {{^isInnerEnum}} + {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = {{{datatypeWithEnum}}}Converter.FromString{{#isNullable}}OrDefault{{/isNullable}}({{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}RawValue); + {{/isInnerEnum}} + {{#isInnerEnum}} + {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = {{classname}}.{{{datatypeWithEnum}}}FromString({{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}RawValue); + {{/isInnerEnum}} + {{/isNumeric}} + {{/isMap}} + {{/isEnum}} + {{#isUuid}} + {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = reader.GetGuid(); + {{/isUuid}} + {{^isUuid}} + {{^isEnum}} {{^isString}} {{^isBoolean}} - {{^isDecimal}} {{^isNumeric}} - {{^isLong}} - {{^isDouble}} {{^isDate}} {{^isDateTime}} {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = JsonSerializer.Deserialize<{{{datatypeWithEnum}}}>(ref reader, options); {{/isDateTime}} {{/isDate}} - {{/isDouble}} - {{/isLong}} {{/isNumeric}} - {{/isDecimal}} {{/isBoolean}} {{/isString}} + {{/isEnum}} + {{/isUuid}} break; {{/allVars}} + default: + break; } } } @@ -127,5 +169,95 @@ /// /// /// - public override void Write(Utf8JsonWriter writer, {{classname}} {{#lambda.camelcase_param}}{{classname}}{{/lambda.camelcase_param}}, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, {{classname}} {{#lambda.camelcase_param}}{{classname}}{{/lambda.camelcase_param}}, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + {{#allVars}} + {{#isString}} + {{^isMap}} + {{^isEnum}} + {{^isUuid}} + writer.WriteString("{{baseName}}", {{#lambda.camelcase_param}}{{classname}}{{/lambda.camelcase_param}}.{{name}}); + {{/isUuid}} + {{/isEnum}} + {{/isMap}} + {{/isString}} + {{#isBoolean}} + {{#isNullable}} + if ({{#lambda.camelcase_param}}{{classname}}{{/lambda.camelcase_param}}.{{name}} != null) + writer.WriteBoolean("{{baseName}}", {{#lambda.camelcase_param}}{{classname}}{{/lambda.camelcase_param}}.{{name}}.Value); + else + writer.WriteNull("{{baseName}}"); + {{/isNullable}} + {{^isNullable}} + writer.WriteBoolean("{{baseName}}", {{#lambda.camelcase_param}}{{classname}}{{/lambda.camelcase_param}}.{{name}}); + {{/isNullable}} + {{/isBoolean}} + {{#isNumeric}} + {{#isNullable}} + if ({{#lambda.camelcase_param}}{{classname}}{{/lambda.camelcase_param}}.{{name}} != null) + writer.WriteNumber("{{baseName}}", (int){{#lambda.camelcase_param}}{{classname}}{{/lambda.camelcase_param}}.{{name}}.Value); + else + writer.WriteNull("{{baseName}}"); + {{/isNullable}} + {{^isNullable}} + writer.WriteNumber("{{baseName}}", (int){{#lambda.camelcase_param}}{{classname}}{{/lambda.camelcase_param}}.{{name}}); + {{/isNullable}} + {{/isNumeric}} + {{#isDate}} + writer.WritePropertyName("{{baseName}}"); + JsonSerializer.Serialize(writer, {{#lambda.camelcase_param}}{{classname}}{{/lambda.camelcase_param}}.{{name}}, options); + {{/isDate}} + {{#isDateTime}} + writer.WritePropertyName("{{baseName}}"); + JsonSerializer.Serialize(writer, {{#lambda.camelcase_param}}{{classname}}{{/lambda.camelcase_param}}.{{name}}, options); + {{/isDateTime}} + {{#isEnum}} + {{^isMap}} + {{^isNumeric}} + {{#isInnerEnum}} + var {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}RawValue = {{classname}}.{{{datatypeWithEnum}}}ToJsonValue({{#lambda.camelcase_param}}{{classname}}{{/lambda.camelcase_param}}.{{name}}); + if ({{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}RawValue != null) + writer.WriteString("{{baseName}}", {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}RawValue); + else + writer.WriteNull("{{baseName}}"); + {{/isInnerEnum}} + {{^isInnerEnum}} + {{#isNullable}} + if ({{#lambda.camelcase_param}}{{classname}}{{/lambda.camelcase_param}}.{{name}} == null) + writer.WriteNull("{{baseName}}"); + {{/isNullable}} + var {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}RawValue = {{{datatypeWithEnum}}}Converter.ToJsonValue({{#lambda.camelcase_param}}{{classname}}{{/lambda.camelcase_param}}.{{name}}{{#isNullable}}.Value{{/isNullable}}); + if ({{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}RawValue != null) + writer.Write{{#allowableValues}}{{#enumVars}}{{#-first}}{{#isString}}String{{/isString}}{{^isString}}Number{{/isString}}{{/-first}}{{/enumVars}}{{/allowableValues}}("{{baseName}}", {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}RawValue); + else + writer.WriteNull("{{baseName}}"); + {{/isInnerEnum}} + {{/isNumeric}} + {{/isMap}} + {{/isEnum}} + {{#isUuid}} + writer.WriteString("{{baseName}}", {{#lambda.camelcase_param}}{{classname}}{{/lambda.camelcase_param}}.{{name}}); + {{/isUuid}} + {{^isUuid}} + {{^isEnum}} + {{^isString}} + {{^isBoolean}} + {{^isNumeric}} + {{^isDate}} + {{^isDateTime}} + writer.WritePropertyName("{{baseName}}"); + JsonSerializer.Serialize(writer, {{#lambda.camelcase_param}}{{classname}}{{/lambda.camelcase_param}}.{{name}}, options); + {{/isDateTime}} + {{/isDate}} + {{/isNumeric}} + {{/isBoolean}} + {{/isString}} + {{/isEnum}} + {{/isUuid}} + {{/allVars}} + + writer.WriteEndObject(); + } } \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/JsonSerializerOptionsProvider.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/JsonSerializerOptionsProvider.mustache index 4b28944a2a..93f8054031 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/JsonSerializerOptionsProvider.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/JsonSerializerOptionsProvider.mustache @@ -6,12 +6,12 @@ {{/nrt}} using System.Text.Json; -namespace {{packageName}}.Client +namespace {{packageName}}.{{clientPackage}} { /// /// Provides the JsonSerializerOptions /// - public class JsonSerializerOptionsProvider + {{>visibility}} class JsonSerializerOptionsProvider { /// /// the JsonSerializerOptions diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ModelBaseSignature.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ModelBaseSignature.mustache new file mode 100644 index 0000000000..ddc5ecaead --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ModelBaseSignature.mustache @@ -0,0 +1 @@ +{{#parentModel.composedSchemas.allOf}}{{^isInherited}}{{#lambda.camelcase_param}}{{parent}}{{/lambda.camelcase_param}}.{{#lambda.titlecase}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.titlecase}} {{/isInherited}}{{/parentModel.composedSchemas.allOf}}{{#parentModel.composedSchemas.anyOf}}{{#lambda.camelcase_param}}{{parent}}}{{/lambda.camelcase_param}}.{{#lambda.titlecase}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.titlecase}} {{/parentModel.composedSchemas.anyOf}}{{#allVars}}{{#isInherited}}{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} {{/isInherited}}{{/allVars}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ModelSignature.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ModelSignature.mustache new file mode 100644 index 0000000000..1cc9190e96 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/ModelSignature.mustache @@ -0,0 +1 @@ +{{#model.allVars}}{{>PropertyDataType}} {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}{{#defaultValue}} = {{^isDateTime}}{{{defaultValue}}}{{/isDateTime}}{{#isDateTime}}default{{/isDateTime}}{{/defaultValue}}{{^defaultValue}}{{#isNullable}} = default{{/isNullable}}{{/defaultValue}} {{/model.allVars}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/OAuthToken.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/OAuthToken.mustache index b5410ea075..f450c3d092 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/OAuthToken.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/OAuthToken.mustache @@ -9,12 +9,12 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; -namespace {{packageName}}.Client +namespace {{packageName}}.{{clientPackage}} { /// /// A token constructed with OAuth. /// - public class OAuthToken : TokenBase + {{>visibility}} class OAuthToken : TokenBase { private string _raw; diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/OperationOrDefault.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/OperationOrDefault.mustache new file mode 100644 index 0000000000..01a2d1daf1 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/OperationOrDefault.mustache @@ -0,0 +1,24 @@ + /// + /// {{summary}} {{notes}} + /// + /// Thrown when fails to make API call + {{#allParams}} + /// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} + {{/allParams}} + /// Cancellation Token to cancel the request. + /// <> + public async Task<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}object{{/returnType}}{{nrt?}}> {{operationId}}OrDefaultAsync({{>OperationSignature}}) + { + ApiResponse<{{#returnType}}{{{.}}}{{/returnType}}{{^returnType}}object{{/returnType}}{{nrt?}}>{{nrt?}} result = null; + try + { + result = await {{operationId}}WithHttpInfoAsync({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}cancellationToken).ConfigureAwait(false); + } + catch (Exception) + { + } + + return result != null && result.IsSuccessStatusCode + ? result.Content + : null; + } \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/OperationSignature.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/OperationSignature.mustache new file mode 100644 index 0000000000..64eabc543b --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/OperationSignature.mustache @@ -0,0 +1 @@ +{{#lambda.joinWithComma}}{{#allParams}}{{^notRequiredOrIsNullable}}{{#lambda.required}}{{{dataType}}}{{/lambda.required}}{{/notRequiredOrIsNullable}}{{#notRequiredOrIsNullable}}{{#lambda.optional}}{{{dataType}}}{{/lambda.optional}}{{/notRequiredOrIsNullable}} {{paramName}}{{^requiredAndNotNullable}} = null{{/requiredAndNotNullable}} {{/allParams}}System.Threading.CancellationToken? cancellationToken = null{{/lambda.joinWithComma}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/PropertyDataType.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/PropertyDataType.mustache new file mode 100644 index 0000000000..8ab7a12c80 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/PropertyDataType.mustache @@ -0,0 +1 @@ +{{#nrt}}{{#isNullable}}{{#lambda.optional}}{{{datatypeWithEnum}}}{{/lambda.optional}}{{/isNullable}}{{^isNullable}}{{{datatypeWithEnum}}}{{/isNullable}}{{/nrt}}{{^nrt}}{{#isNullable}}{{#vendorExtensions.x-csharp-value-type}}{{{datatypeWithEnum}}}?{{/vendorExtensions.x-csharp-value-type}}{{^vendorExtensions.x-csharp-value-type}}{{{datatypeWithEnum}}}{{/vendorExtensions.x-csharp-value-type}}{{/isNullable}}{{^isNullable}}{{{datatypeWithEnum}}}{{/isNullable}}{{/nrt}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/README.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/README.client.mustache similarity index 96% rename from modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/README.mustache rename to modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/README.client.mustache index e76936568a..f3cae79361 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/README.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/README.client.mustache @@ -102,6 +102,9 @@ namespace YourProject It depends how you made the request. If the return type is ApiResponse no error will be thrown, though the Content property will be null. StatusCode and ReasonPhrase will contain information about the error. If the return type is T, then it will throw. If the return type is TOrDefault, it will return null. +- How do I validate requests and process responses? + Use the provided On and After methods in the Api class from the namespace {{packageName}}.Rest.DefaultApi. + Or provide your own class by using the generic Configure{{apiName}} method. ## Dependencies @@ -109,9 +112,7 @@ namespace YourProject - [Microsoft.Extensions.Hosting](https://www.nuget.org/packages/Microsoft.Extensions.Hosting/) - 5.0.0 or later - [Microsoft.Extensions.Http](https://www.nuget.org/packages/Microsoft.Extensions.Http/) - 5.0.0 or later{{#supportsRetry}} - [Microsoft.Extensions.Http.Polly](https://www.nuget.org/packages/Microsoft.Extensions.Http.Polly/) - 5.0.1 or later -- [Polly](https://www.nuget.org/packages/Polly/) - 7.2.3 or later{{/supportsRetry}} -- [Newtonsoft.Json](https://www.nuget.org/packages/Newtonsoft.Json/) - 13.0.1 or later -- [JsonSubTypes](https://www.nuget.org/packages/JsonSubTypes/) - 1.7.0 or later{{#useCompareNetObjects}} +- [Polly](https://www.nuget.org/packages/Polly/) - 7.2.3 or later{{/supportsRetry}}{{#useCompareNetObjects}} - [CompareNETObjects](https://www.nuget.org/packages/CompareNETObjects) - 4.61.0 or later{{/useCompareNetObjects}}{{#validatable}} - [System.ComponentModel.Annotations](https://www.nuget.org/packages/System.ComponentModel.Annotations) - 4.7.0 or later{{/validatable}}{{#apiDocs}} diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/README.solution.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/README.solution.mustache new file mode 100644 index 0000000000..f9c1c7f746 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/README.solution.mustache @@ -0,0 +1 @@ +# Created with Openapi Generator diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/README.test.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/README.test.mustache new file mode 100644 index 0000000000..e69de29bb2 diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/RateLimitProvider`1.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/RateLimitProvider`1.mustache index 944c0061f5..03a117341f 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/RateLimitProvider`1.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/RateLimitProvider`1.mustache @@ -11,13 +11,13 @@ using System.Linq; using System.Threading; using System.Threading.Tasks;{{/netStandard}} -namespace {{packageName}}.Client {{^netStandard}} +namespace {{packageName}}.{{clientPackage}} {{^netStandard}} { /// /// Provides a token to the api clients. Tokens will be rate limited based on the provided TimeSpan. /// /// - public class RateLimitProvider : TokenProvider where TTokenBase : TokenBase + {{>visibility}} class RateLimitProvider : TokenProvider where TTokenBase : TokenBase { internal Channel AvailableTokens { get; } diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/TokenBase.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/TokenBase.mustache index fd720d1dce..2373db173c 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/TokenBase.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/TokenBase.mustache @@ -6,12 +6,12 @@ {{/nrt}} using System; -namespace {{packageName}}.Client +namespace {{packageName}}.{{clientPackage}} { /// /// The base for all tokens. /// - public abstract class TokenBase + {{>visibility}} abstract class TokenBase { private DateTime _nextAvailable = DateTime.UtcNow; private object _nextAvailableLock = new object(); diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/TokenContainer`1.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/TokenContainer`1.mustache index 9d742241da..3e8f1b15dd 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/TokenContainer`1.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/TokenContainer`1.mustache @@ -7,13 +7,13 @@ using System.Linq; using System.Collections.Generic; -namespace {{packageName}}.Client +namespace {{packageName}}.{{clientPackage}} { /// /// A container for a collection of tokens. /// /// - public sealed class TokenContainer where TTokenBase : TokenBase + {{>visibility}} sealed class TokenContainer where TTokenBase : TokenBase { /// /// The collection of tokens diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/TokenProvider`1.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/TokenProvider`1.mustache index cc8bbd72e4..26130f4b39 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/TokenProvider`1.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/TokenProvider`1.mustache @@ -7,14 +7,14 @@ using System; using System.Linq; using System.Collections.Generic; -using {{packageName}}.Client; +using {{packageName}}.{{clientPackage}}; namespace {{packageName}} { /// /// A class which will provide tokens. /// - public abstract class TokenProvider where TTokenBase : TokenBase + {{>visibility}} abstract class TokenProvider where TTokenBase : TokenBase { /// /// The array of tokens. diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/api.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/api.mustache index 439b19cad3..8753cadab3 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/api.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/api.mustache @@ -12,16 +12,17 @@ using Microsoft.Extensions.Logging; using System.Net.Http; using System.Net.Http.Headers; using System.Text.Json; -using {{packageName}}.Client; +using {{packageName}}.{{clientPackage}}; {{#hasImport}} using {{packageName}}.{{modelPackage}}; {{/hasImport}} -namespace {{packageName}}.{{apiPackage}} +namespace {{packageName}}.{{interfacePrefix}}{{apiPackage}} { {{#operations}} /// /// Represents a collection of functions to interact with the API endpoints + /// This class is registered as transient. /// {{>visibility}} interface {{interfacePrefix}}{{classname}} : IApi { @@ -38,7 +39,7 @@ namespace {{packageName}}.{{apiPackage}} {{/allParams}} /// Cancellation Token to cancel the request. /// Task<ApiResponse<{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}object{{/returnType}}{{nrt?}}>> - Task> {{operationId}}WithHttpInfoAsync({{#allParams}}{{#required}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/required}}{{^required}}{{{dataType}}} {{paramName}} = null{{^-last}}, {{/-last}}{{/required}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken? cancellationToken = null); + Task> {{operationId}}WithHttpInfoAsync({{>OperationSignature}}); /// /// {{summary}} @@ -52,7 +53,7 @@ namespace {{packageName}}.{{apiPackage}} {{/allParams}} /// Cancellation Token to cancel the request. /// Task of ApiResponse<{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}object{{/returnType}}> - Task<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}object{{/returnType}}{{nrt?}}> {{operationId}}Async({{#allParams}}{{#required}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/required}}{{^required}}{{{dataType}}} {{paramName}} = null{{^-last}}, {{/-last}}{{/required}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken? cancellationToken = null);{{#nrt}} + Task<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}object{{/returnType}}> {{operationId}}Async({{>OperationSignature}});{{#nrt}} /// /// {{summary}} @@ -65,26 +66,23 @@ namespace {{packageName}}.{{apiPackage}} {{/allParams}} /// Cancellation Token to cancel the request. /// Task of ApiResponse<{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}object{{/returnType}}?> - Task<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}object{{/returnType}}{{nrt?}}> {{operationId}}OrDefaultAsync({{#allParams}}{{#required}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/required}}{{^required}}{{{dataType}}} {{paramName}} = null{{^-last}}, {{/-last}}{{/required}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken? cancellationToken = null); + Task<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}object{{/returnType}}{{nrt?}}> {{operationId}}OrDefaultAsync({{>OperationSignature}});{{/nrt}} + {{^-last}} - {{/nrt}}{{^-last}} {{/-last}} {{/operation}} } +} +namespace {{packageName}}.{{apiPackage}} +{ /// /// Represents a collection of functions to interact with the API endpoints /// - {{>visibility}} partial class {{classname}} : {{interfacePrefix}}{{classname}} + {{>visibility}} partial class {{classname}} : {{interfacePrefix}}{{apiPackage}}.{{interfacePrefix}}{{classname}} { private JsonSerializerOptions _jsonSerializerOptions; - /// - /// An event to track the health of the server. - /// If you store these event args, be sure to purge old event args to prevent a memory leak. - /// - public event ClientUtils.EventHandler{{nrt?}} ApiResponded; - /// /// The logger /// @@ -140,6 +138,15 @@ namespace {{packageName}}.{{apiPackage}} HttpSignatureTokenProvider = httpSignatureTokenProvider;{{/hasHttpSignatureMethods}}{{#hasOAuthMethods}} OauthTokenProvider = oauthTokenProvider;{{/hasOAuthMethods}} } + + /// + /// Logs the api response + /// + /// + protected virtual void OnApiResponded(ApiResponseEventArgs args) + { + Logger.LogInformation("{0,-9} | {1} | {3}", (args.ReceivedAt - args.RequestedAt).TotalSeconds, args.HttpStatus, args.Path); + } {{#operation}} /// @@ -151,7 +158,7 @@ namespace {{packageName}}.{{apiPackage}} {{/allParams}} /// Cancellation Token to cancel the request. /// <> - public async Task<{{#returnType}}{{{.}}}{{/returnType}}{{^returnType}}object{{/returnType}}{{nrt?}}> {{operationId}}Async({{#allParams}}{{#required}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/required}}{{^required}}{{{dataType}}} {{paramName}} = null{{^-last}}, {{/-last}}{{/required}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken? cancellationToken = null) + public async Task<{{#returnType}}{{{.}}}{{/returnType}}{{^returnType}}object{{/returnType}}> {{operationId}}Async({{>OperationSignature}}) { ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}object{{/returnType}}{{nrt?}}> result = await {{operationId}}WithHttpInfoAsync({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}cancellationToken).ConfigureAwait(false); @@ -160,66 +167,80 @@ namespace {{packageName}}.{{apiPackage}} #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'{{/returnTypeIsPrimitive}}{{/nrt}} throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); - return result.Content; + return result.Content{{#nrt}}{{#returnProperty}}{{#isPrimitiveType}}{{^isMap}}{{^isString}}.Value{{/isString}}{{/isMap}}{{/isPrimitiveType}}{{/returnProperty}}{{/nrt}}; } {{#nrt}} - /// - /// {{summary}} {{notes}} - /// - /// Thrown when fails to make API call - {{#allParams}} - /// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} - {{/allParams}} - /// Cancellation Token to cancel the request. - /// <> - public async Task<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}object{{/returnType}}{{nrt?}}> {{operationId}}OrDefaultAsync({{#allParams}}{{#required}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/required}}{{^required}}{{{dataType}}} {{paramName}} = null{{^-last}}, {{/-last}}{{/required}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken? cancellationToken = null) - { - ApiResponse<{{#returnType}}{{{.}}}{{/returnType}}{{^returnType}}object{{/returnType}}{{nrt?}}>{{nrt?}} result = null; - try - { - result = await {{operationId}}WithHttpInfoAsync({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}cancellationToken).ConfigureAwait(false); - } - catch (Exception) - { - } - - return result != null && result.IsSuccessStatusCode - ? result.Content - : null; - } +{{>OperationOrDefault}} {{/nrt}} {{^nrt}} {{^returnTypeIsPrimitive}} - {{! Note that this method is a copy paste of above due to NRT complexities }} - /// - /// {{summary}} {{notes}} - /// - /// Thrown when fails to make API call - {{#allParams}} - /// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}} - {{/allParams}} - /// Cancellation Token to cancel the request. - /// <> - public async Task<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}object{{/returnType}}{{nrt?}}> {{operationId}}OrDefaultAsync({{#allParams}}{{#required}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/required}}{{^required}}{{{dataType}}} {{paramName}} = null{{^-last}}, {{/-last}}{{/required}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken? cancellationToken = null) - { - ApiResponse<{{#returnType}}{{{.}}}{{/returnType}}{{^returnType}}object{{/returnType}}{{nrt?}}>{{nrt?}} result = null; - try - { - result = await {{operationId}}WithHttpInfoAsync({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}cancellationToken).ConfigureAwait(false); - } - catch (Exception) - { - } - - return result != null && result.IsSuccessStatusCode - ? result.Content - : null; - } +{{>OperationOrDefault}} {{/returnTypeIsPrimitive}} {{/nrt}} + /// + /// Validates the request parameters + /// + {{#allParams}} + /// + {{/allParams}} + /// + protected virtual {{^allParams}}void{{/allParams}}{{#allParams}}{{#-first}}{{^-last}}({{/-last}}{{/-first}}{{#requiredAndNotNullable}}{{#lambda.required}}{{{dataType}}}{{/lambda.required}}{{^-last}}, {{/-last}}{{/requiredAndNotNullable}}{{^requiredAndNotNullable}}{{#lambda.optional}}{{{dataType}}}{{/lambda.optional}}{{^-last}}, {{/-last}}{{/requiredAndNotNullable}}{{#-last}}{{^-first}}){{/-first}}{{/-last}}{{/allParams}} On{{operationId}}({{#allParams}}{{#requiredAndNotNullable}}{{#lambda.required}}{{{dataType}}}{{/lambda.required}} {{paramName}}{{^-last}}, {{/-last}}{{/requiredAndNotNullable}}{{^requiredAndNotNullable}}{{#lambda.optional}}{{{dataType}}}{{/lambda.optional}} {{paramName}}{{^-last}}, {{/-last}}{{/requiredAndNotNullable}}{{/allParams}}) + { + {{#requiredAndNotNullableParams}} + {{#-first}} + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + {{/-first}} + {{#nrt}} + if ({{paramName}} == null) + throw new ArgumentNullException(nameof({{paramName}})); + + {{/nrt}} + {{^nrt}} + {{^vendorExtensions.x-csharp-value-type}} + if ({{paramName}} == null) + throw new ArgumentNullException(nameof({{paramName}})); + + {{/vendorExtensions.x-csharp-value-type}} + {{/nrt}} + {{#-last}} + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + {{/-last}} + {{/requiredAndNotNullableParams}} + return{{#allParams}} {{#-first}}{{^-last}}({{/-last}}{{/-first}}{{paramName}}{{^-last}},{{/-last}}{{#-last}}{{^-first}}){{/-first}}{{/-last}}{{/allParams}}; + } + + /// + /// Processes the server response + /// + /// + {{#allParams}} + /// + {{/allParams}} + protected virtual void After{{operationId}}({{#lambda.joinWithComma}}ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}object{{/returnType}}{{nrt?}}> apiResponse {{#allParams}}{{#requiredAndNotNullable}}{{#lambda.required}}{{{dataType}}}{{/lambda.required}} {{paramName}} {{/requiredAndNotNullable}}{{^requiredAndNotNullable}}{{#lambda.optional}}{{{dataType}}}{{/lambda.optional}} {{paramName}} {{/requiredAndNotNullable}}{{/allParams}}{{/lambda.joinWithComma}}) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + {{#allParams}} + /// + {{/allParams}} + protected virtual void OnError{{operationId}}({{#lambda.joinWithComma}}Exception exception string pathFormat string path {{#allParams}}{{#requiredAndNotNullable}}{{#lambda.required}}{{{dataType}}}{{/lambda.required}} {{paramName}} {{/requiredAndNotNullable}}{{^requiredAndNotNullable}}{{#lambda.optional}}{{{dataType}}}{{/lambda.optional}} {{paramName}} {{/requiredAndNotNullable}}{{/allParams}}{{/lambda.joinWithComma}}) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// {{summary}} {{notes}} /// @@ -229,33 +250,53 @@ namespace {{packageName}}.{{apiPackage}} {{/allParams}} /// Cancellation Token to cancel the request. /// <> where T : - public async Task> {{operationId}}WithHttpInfoAsync({{#allParams}}{{#required}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/required}}{{^required}}{{{dataType}}} {{paramName}} = null{{^-last}}, {{/-last}}{{/required}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}System.Threading.CancellationToken? cancellationToken = null) + public async Task> {{operationId}}WithHttpInfoAsync({{>OperationSignature}}) { + UriBuilder uriBuilder = new UriBuilder(); + try { - {{#hasRequiredParams}}#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'{{/hasRequiredParams}}{{#allParams}}{{#required}}{{#nrt}} + {{#allParams}}{{#-first}}{{#-last}}{{paramName}} = {{/-last}}{{^-last}}var validatedParameters = {{/-last}}{{/-first}}{{/allParams}}On{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); + {{#allParams}} + {{#-first}} + {{^-last}} + {{#allParams}} + {{paramName}} = validatedParameters.Item{{-index}}; + {{/allParams}} + {{/-last}} + {{/-first}} + {{/allParams}} - if ({{paramName}} == null) - throw new ArgumentNullException(nameof({{paramName}}));{{/nrt}}{{^nrt}}{{^vendorExtensions.x-csharp-value-type}} - - if ({{paramName}} == null) - throw new ArgumentNullException(nameof({{paramName}}));{{/vendorExtensions.x-csharp-value-type}}{{/nrt}}{{/required}}{{/allParams}}{{#hasRequiredParams}} - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - {{/hasRequiredParams}}using (HttpRequestMessage request = new HttpRequestMessage()) + using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); + {{^servers}} uriBuilder.Host = HttpClient.BaseAddress{{nrt!}}.Host; uriBuilder.Port = HttpClient.BaseAddress{{nrt!}}.Port; uriBuilder.Scheme = ClientUtils.SCHEME; - uriBuilder.Path = ClientUtils.CONTEXT_PATH + "{{path}}";{{#pathParams}}{{#required}} - uriBuilder.Path = uriBuilder.Path.Replace("%7B{{baseName}}%7D", Uri.EscapeDataString({{paramName}}.ToString()));{{/required}}{{^required}} + uriBuilder.Path = ClientUtils.CONTEXT_PATH + "{{path}}"; + {{/servers}} + {{#servers}} + {{#-first}} + var url = request.RequestUri = new Uri("{{url}}"); + uriBuilder.Host = url.Authority; + uriBuilder.Scheme = url.Scheme; + uriBuilder.Path = url.AbsolutePath; + + {{/-first}} + {{/servers}} + {{#pathParams}} + {{#required}} + uriBuilder.Path = uriBuilder.Path.Replace("%7B{{baseName}}%7D", Uri.EscapeDataString({{paramName}}.ToString()));{{/required}}{{^required}} if ({{paramName}} != null) uriBuilder.Path = uriBuilder.Path + $"/{ Uri.EscapeDataString({{paramName}}).ToString()) }"; - {{/required}}{{/pathParams}}{{#queryParams}}{{#-first}} + {{#-last}} + {{/-last}} + {{/required}} + {{/pathParams}} + {{#queryParams}} + {{#-first}} System.Collections.Specialized.NameValueCollection parseQueryString = System.Web.HttpUtility.ParseQueryString(string.Empty);{{/-first}}{{/queryParams}}{{^queryParams}}{{#authMethods}}{{#isApiKey}}{{#isKeyInQuery}} System.Collections.Specialized.NameValueCollection parseQueryString = System.Web.HttpUtility.ParseQueryString(string.Empty);{{/isKeyInQuery}}{{/isApiKey}}{{/authMethods}}{{/queryParams}}{{#queryParams}}{{#required}}{{#-first}} @@ -266,13 +307,23 @@ namespace {{packageName}}.{{apiPackage}} {{/-first}}{{/queryParams}}{{#queryParams}}{{^required}}if ({{paramName}} != null) parseQueryString["{{baseName}}"] = Uri.EscapeDataString({{paramName}}.ToString(){{nrt!}}); - {{/required}}{{#-last}}uriBuilder.Query = parseQueryString.ToString();{{/-last}}{{/queryParams}}{{#headerParams}}{{#required}} + {{/required}}{{#-last}}uriBuilder.Query = parseQueryString.ToString(); - request.Headers.Add("{{baseName}}", ClientUtils.ParameterToString({{paramName}}));{{/required}}{{^required}} + {{/-last}} + {{/queryParams}} + {{#headerParams}} + {{#required}} + request.Headers.Add("{{baseName}}", ClientUtils.ParameterToString({{paramName}})); + {{/required}} + {{^required}} if ({{paramName}} != null) - request.Headers.Add("{{baseName}}", ClientUtils.ParameterToString({{paramName}}));{{/required}}{{/headerParams}}{{#formParams}}{{#-first}} + request.Headers.Add("{{baseName}}", ClientUtils.ParameterToString({{paramName}})); + {{/required}} + {{/headerParams}} + {{#formParams}} + {{#-first}} MultipartContent multipartContent = new MultipartContent(); request.Content = multipartContent; @@ -281,22 +332,39 @@ namespace {{packageName}}.{{apiPackage}} multipartContent.Add(new FormUrlEncodedContent(formParams));{{/-first}}{{^isFile}}{{#required}} - formParams.Add(new KeyValuePair("{{baseName}}", ClientUtils.ParameterToString({{paramName}})));{{/required}}{{^required}} + formParams.Add(new KeyValuePair("{{baseName}}", ClientUtils.ParameterToString({{paramName}}))); + {{/required}} + {{^required}} if ({{paramName}} != null) - formParams.Add(new KeyValuePair("{{baseName}}", ClientUtils.ParameterToString({{paramName}})));{{/required}}{{/isFile}}{{#isFile}}{{#required}} + formParams.Add(new KeyValuePair("{{baseName}}", ClientUtils.ParameterToString({{paramName}}))); - multipartContent.Add(new StreamContent({{paramName}}));{{/required}}{{^required}} + {{/required}} + {{/isFile}} + {{#isFile}} + {{#required}} + multipartContent.Add(new StreamContent({{paramName}})); + {{/required}} + {{^required}} if ({{paramName}} != null) - multipartContent.Add(new StreamContent({{paramName}}));{{/required}}{{/isFile}}{{/formParams}}{{#bodyParam}} + multipartContent.Add(new StreamContent({{paramName}})); + {{/required}} + {{/isFile}} + {{/formParams}} + {{#bodyParam}} request.Content = ({{paramName}} as object) is System.IO.Stream stream ? request.Content = new StreamContent(stream) - : request.Content = new StringContent(JsonSerializer.Serialize({{paramName}}, _jsonSerializerOptions));{{/bodyParam}}{{#authMethods}}{{#-first}} + : request.Content = new StringContent(JsonSerializer.Serialize({{paramName}}, _jsonSerializerOptions)); - List tokens = new List();{{/-first}}{{#isApiKey}} + {{/bodyParam}} + {{#authMethods}} + {{#-first}} + List tokens = new List(); + {{/-first}} + {{#isApiKey}} ApiKeyToken apiKey = (ApiKeyToken) await ApiKeyProvider.GetAsync(cancellationToken).ConfigureAwait(false); tokens.Add(apiKey);{{#isKeyInHeader}} @@ -305,11 +373,7 @@ namespace {{packageName}}.{{apiPackage}} apiKey.UseInQuery(request, uriBuilder, parseQueryString, "{{keyParamName}}"); - uriBuilder.Query = parseQueryString.ToString();{{/isKeyInQuery}}{{#isKeyInCookie}} - - apiKey.UseInCookie(request, parseQueryString, "{{keyParamName}}"); - - uriBuilder.Query = parseQueryString.ToString();{{/isKeyInCookie}}{{/isApiKey}}{{/authMethods}} + uriBuilder.Query = parseQueryString.ToString();{{/isKeyInQuery}}{{/isApiKey}}{{/authMethods}} {{! below line must be after any UseInQuery calls, but before using the HttpSignatureToken}} request.RequestUri = uriBuilder.Uri;{{#authMethods}}{{#isBasicBasic}} @@ -348,7 +412,7 @@ namespace {{packageName}}.{{apiPackage}} string{{nrt?}} contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType);{{/-first}}{{/consumes}}{{#produces}}{{#-first}} + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType);{{/-first}}{{/consumes}}{{#produces}}{{#-first}} string[] accepts = new string[] { {{/-first}}{{/produces}} {{#produces}}"{{{mediaType}}}"{{^-last}}, @@ -359,35 +423,33 @@ namespace {{packageName}}.{{apiPackage}} if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - {{/-first}}{{/produces}}{{^netStandard}} + {{/-first}} + {{/produces}} + {{^netStandard}} + request.Method = HttpMethod.{{#lambda.titlecase}}{{#lambda.lowercase}}{{httpMethod}}{{/lambda.lowercase}}{{/lambda.titlecase}};{{/netStandard}}{{#netStandard}} request.Method = new HttpMethod("{{#lambda.uppercase}}{{httpMethod}}{{/lambda.uppercase}}");{{/netStandard}}{{! early standard versions do not have HttpMethod.Patch }} + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "{{path}}", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync({{^netStandard}}{{^netcoreapp3.1}}cancellationToken.GetValueOrDefault(){{/netcoreapp3.1}}{{/netStandard}}).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "{{path}}")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}object{{/returnType}}{{nrt?}}> apiResponse = new ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}object{{/returnType}}{{nrt?}}>(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) - apiResponse.Content = JsonSerializer.Deserialize<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}object{{/returnType}}>(apiResponse.RawContent, _jsonSerializerOptions);{{#authMethods}} + { + apiResponse.Content = JsonSerializer.Deserialize<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}object{{/returnType}}>(apiResponse.RawContent, _jsonSerializerOptions); + After{{operationId}}({{#lambda.joinWithComma}}apiResponse {{#allParams}}{{paramName}} {{/allParams}}{{/lambda.joinWithComma}}); + } + {{#authMethods}} else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) - token.BeginRateLimit();{{/authMethods}} + token.BeginRateLimit(); + {{/authMethods}} return apiResponse; } @@ -395,11 +457,10 @@ namespace {{packageName}}.{{apiPackage}} } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnError{{operationId}}({{#lambda.joinWithComma}}e "{{path}}" uriBuilder.Path {{#allParams}}{{paramName}} {{/allParams}}{{/lambda.joinWithComma}}); throw; } - }{{^-last}} - {{/-last}} + } {{/operation}} } {{/operations}} diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/api_test.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/api_test.mustache index b64731f81d..b46a103b40 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/api_test.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/api_test.mustache @@ -4,25 +4,25 @@ using System.Collections.Generic; using System.Threading.Tasks; using Xunit; using Microsoft.Extensions.DependencyInjection; -using {{packageName}}.{{apiPackage}};{{#hasImport}} +using {{packageName}}.{{interfacePrefix}}{{apiPackage}};{{#hasImport}} using {{packageName}}.{{modelPackage}};{{/hasImport}} -{{{testInstructions}}} +{{>testInstructions}} -namespace {{packageName}}.Test.Api +namespace {{packageName}}.Test.{{apiPackage}} { /// /// Class for testing {{classname}} /// public sealed class {{classname}}Tests : ApiTestsBase { - private readonly {{interfacePrefix}}{{classname}} _instance; + private readonly {{interfacePrefix}}{{apiPackage}}.{{interfacePrefix}}{{classname}} _instance; public {{classname}}Tests(): base(Array.Empty()) { - _instance = _host.Services.GetRequiredService<{{interfacePrefix}}{{classname}}>(); + _instance = _host.Services.GetRequiredService<{{interfacePrefix}}{{apiPackage}}.{{interfacePrefix}}{{classname}}>(); } {{#operations}} diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/model.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/model.mustache index d6e643a2fe..cd592f9786 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/model.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/model.mustache @@ -10,7 +10,9 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; +{{^useGenericHost}} using System.Runtime.Serialization; +{{/useGenericHost}} using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -26,23 +28,13 @@ using OpenAPIClientUtils = {{packageName}}.Client.ClientUtils; namespace {{packageName}}.{{modelPackage}} { -{{#isEnum}}{{>modelEnum}}{{/isEnum}}{{^isEnum}}{{>modelGeneric}} +{{#isEnum}} +{{>modelEnum}} +{{/isEnum}} +{{^isEnum}} +{{>modelGeneric}} -{{#allOf}} -{{#-first}} {{>JsonConverter}} -{{/-first}} -{{/allOf}} -{{#anyOf}} -{{#-first}} -{{>JsonConverter}} -{{/-first}} -{{/anyOf}} -{{#oneOf}} -{{#-first}} -{{>JsonConverter}} -{{/-first}} -{{/oneOf}} {{/isEnum}} {{/model}} {{/models}} diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/modelGeneric.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/modelGeneric.mustache index 1f18f91bce..1df0e038eb 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/modelGeneric.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/modelGeneric.mustache @@ -1,7 +1,7 @@ /// /// {{description}}{{^description}}{{classname}}{{/description}} /// - {{>visibility}} partial class {{classname}} : {{#parent}}{{{.}}}, {{/parent}}IEquatable<{{classname}}>{{#validatable}}{{^parentModel}}, IValidatableObject{{/parentModel}}{{/validatable}} + {{>visibility}} partial class {{classname}}{{#parent}} : {{{.}}}{{/parent}}{{>ImplementsIEquatable}}{{>ImplementsValidatable}} { {{#composedSchemas.oneOf}} /// @@ -17,21 +17,26 @@ /// {{/composedSchemas.anyOf}} {{#allVars}} - /// {{description}}{{^description}}{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}{{/description}}{{#required}} (required){{/required}}{{#defaultValue}} (default to {{.}}){{/defaultValue}} + /// {{description}}{{^description}}{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}{{/description}}{{#defaultValue}} (default to {{.}}){{/defaultValue}} {{/allVars}} - public {{classname}}({{#lambda.joinWithComma}}{{{dataType}}}{{#isNullable}}{{nrt?}}{{/isNullable}} {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}} {{#model.composedSchemas.allOf}}{{^isInherited}}{{{dataType}}} {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}} {{/isInherited}}{{/model.composedSchemas.allOf}}{{#model.composedSchemas.anyOf}}{{{dataType}}}{{#isNullable}}{{nrt?}}{{/isNullable}} {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}} {{/model.composedSchemas.anyOf}}{{#model.allVars}}{{^compulsory}}{{#lambda.optional}}{{{datatypeWithEnum}}}{{/lambda.optional}}{{/compulsory}}{{#compulsory}}{{{datatypeWithEnum}}}{{/compulsory}} {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}{{#defaultValue}} = {{^isDateTime}}{{{defaultValue}}}{{/isDateTime}}{{#isDateTime}}default{{/isDateTime}}{{/defaultValue}}{{^defaultValue}}{{^compulsory}} = default{{/compulsory}}{{/defaultValue}} {{/model.allVars}}{{/lambda.joinWithComma}}){{#parent}} : base({{#lambda.joinWithComma}}{{#parentModel.composedSchemas.oneOf}}{{#lambda.camelcase_param}}{{parent}}{{/lambda.camelcase_param}}.{{#lambda.titlecase}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.titlecase}} {{/parentModel.composedSchemas.oneOf}}{{#parentModel.composedSchemas.allOf}}{{^isInherited}}{{#lambda.camelcase_param}}{{parent}}{{/lambda.camelcase_param}}.{{#lambda.titlecase}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.titlecase}} {{/isInherited}}{{/parentModel.composedSchemas.allOf}}{{#parentModel.composedSchemas.anyOf}}{{#lambda.camelcase_param}}{{parent}}}{{/lambda.camelcase_param}}.{{#lambda.titlecase}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.titlecase}} {{/parentModel.composedSchemas.anyOf}}{{#allVars}}{{#isInherited}}{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} {{/isInherited}}{{/allVars}}{{/lambda.joinWithComma}}){{/parent}} + [JsonConstructor] + {{#readWriteVars}}{{#-first}}public{{/-first}}{{/readWriteVars}}{{^readWriteVars}}internal{{/readWriteVars}} {{classname}}({{#lambda.joinWithComma}}{{{dataType}}}{{#isNullable}}{{nrt?}}{{/isNullable}} {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}} {{#model.composedSchemas.allOf}}{{^isInherited}}{{{dataType}}} {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}} {{/isInherited}}{{/model.composedSchemas.allOf}}{{#model.composedSchemas.anyOf}}{{{dataType}}}{{#isNullable}}{{nrt?}}{{/isNullable}} {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}} {{/model.composedSchemas.anyOf}}{{>ModelSignature}}{{/lambda.joinWithComma}}){{#parent}} : base({{#lambda.joinWithComma}}{{#parentModel.composedSchemas.oneOf}}{{#lambda.camelcase_param}}{{parent}}{{/lambda.camelcase_param}}.{{#lambda.titlecase}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.titlecase}} {{/parentModel.composedSchemas.oneOf}}{{>ModelBaseSignature}}{{/lambda.joinWithComma}}){{/parent}} { - {{#allVars}} - {{^isInherited}} - {{#required}} - {{^isNullable}} - if ({{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} == null) - throw new ArgumentNullException("{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} is a required property for {{classname}} and cannot be null."); + {{#nonNullableVars}} + {{#-first}} + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' - {{/isNullable}} - {{/required}} - {{/isInherited}} - {{/allVars}} + {{/-first}} + if ({{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} == null) + throw new ArgumentNullException(nameof({{name}})); + + {{#-last}} + #pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + {{/-last}} + {{/nonNullableVars}} {{#lambda.titlecase}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.titlecase}} = {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}; {{#composedSchemas.allOf}} {{#lambda.titlecase}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.titlecase}} = {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}; @@ -60,21 +65,26 @@ /// {{/composedSchemas.anyOf}} {{#allVars}} - /// {{description}}{{^description}}{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}{{/description}}{{#required}} (required){{/required}}{{#defaultValue}} (default to {{.}}){{/defaultValue}} + /// {{description}}{{^description}}{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}{{/description}}{{#defaultValue}} (default to {{.}}){{/defaultValue}} {{/allVars}} - public {{classname}}({{#lambda.joinWithComma}}{{#composedSchemas.allOf}}{{^isInherited}}{{{dataType}}} {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}} {{/isInherited}}{{/composedSchemas.allOf}}{{#composedSchemas.anyOf}}{{{dataType}}}{{#isNullable}}{{nrt?}}{{/isNullable}} {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}} {{/composedSchemas.anyOf}}{{#allVars}}{{^compulsory}}{{#lambda.optional}}{{{datatypeWithEnum}}}{{/lambda.optional}}{{/compulsory}}{{#compulsory}}{{{datatypeWithEnum}}}{{/compulsory}} {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}{{#defaultValue}} = {{^isDateTime}}{{{defaultValue}}}{{/isDateTime}}{{#isDateTime}}default{{/isDateTime}}{{/defaultValue}}{{^defaultValue}}{{^compulsory}} = default{{/compulsory}}{{/defaultValue}} {{/allVars}}{{/lambda.joinWithComma}}){{#parent}} : base({{#lambda.joinWithComma}}{{#parentModel.composedSchemas.oneOf}}{{#lambda.camelcase_param}}{{parent}}{{/lambda.camelcase_param}}.{{#lambda.titlecase}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.titlecase}} {{/parentModel.composedSchemas.oneOf}}{{#parentModel.composedSchemas.allOf}}{{^isInherited}}{{#lambda.camelcase_param}}{{parent}}{{/lambda.camelcase_param}}.{{#lambda.titlecase}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.titlecase}} {{/isInherited}}{{/parentModel.composedSchemas.allOf}}{{#parentModel.composedSchemas.anyOf}}{{#lambda.camelcase_param}}{{parent}}}{{/lambda.camelcase_param}}.{{#lambda.titlecase}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.titlecase}} {{/parentModel.composedSchemas.anyOf}}{{#allVars}}{{#isInherited}}{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} {{/isInherited}}{{/allVars}}{{/lambda.joinWithComma}}){{/parent}} + [JsonConstructor] + {{#readWriteVars}}{{#-first}}public{{/-first}}{{/readWriteVars}}{{^readWriteVars}}internal{{/readWriteVars}} {{classname}}({{#lambda.joinWithComma}}{{#composedSchemas.allOf}}{{^isInherited}}{{{dataType}}} {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}} {{/isInherited}}{{/composedSchemas.allOf}}{{#composedSchemas.anyOf}}{{{dataType}}}{{#isNullable}}{{nrt?}}{{/isNullable}} {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}} {{/composedSchemas.anyOf}}{{>ModelSignature}}{{/lambda.joinWithComma}}){{#parent}} : base({{#lambda.joinWithComma}}{{>ModelBaseSignature}}{{/lambda.joinWithComma}}){{/parent}} { - {{#allVars}} - {{^isInherited}} - {{#required}} - {{^isNullable}} + {{#nonNullableVars}} + {{#-first}} +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + {{/-first}} if ({{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} == null) throw new ArgumentNullException("{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} is a required property for {{classname}} and cannot be null."); - {{/isNullable}} - {{/required}} - {{/isInherited}} - {{/allVars}} + {{#-last}} +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + {{/-last}} + {{/nonNullableVars}} {{#composedSchemas.allOf}} {{^isInherited}} {{#lambda.titlecase}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.titlecase}} = {{#lambda.camelcase_param}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.camelcase_param}}; @@ -115,7 +125,7 @@ {{#deprecated}} [Obsolete] {{/deprecated}} - public {{#isNullable}}{{#required}}{{#lambda.optional}}{{{datatypeWithEnum}}}{{/lambda.optional}}{{/required}}{{/isNullable}}{{^isNullable}}{{^required}}{{#lambda.optional}}{{{datatypeWithEnum}}}{{/lambda.optional}}{{/required}}{{/isNullable}}{{^isNullable}}{{#required}}{{{datatypeWithEnum}}}{{/required}}{{/isNullable}}{{#isNullable}}{{^required}}{{#lambda.optional}}{{{datatypeWithEnum}}}{{/lambda.optional}}{{/required}}{{/isNullable}} {{name}} { get; {{#isReadOnly}}private {{/isReadOnly}}set; } + public {{>PropertyDataType}} {{name}} { get; {{^isReadOnly}}set; {{/isReadOnly}}} {{/isEnum}} {{/vars}} @@ -127,7 +137,7 @@ {{#deprecated}} [Obsolete] {{/deprecated}} - public {{{dataType}}}{{#isNullable}}{{nrt?}}{{/isNullable}} {{#lambda.titlecase}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.titlecase}} { get; {{#isReadOnly}}private {{/isReadOnly}}set; } + public {{{dataType}}}{{nrt?}} {{#lambda.titlecase}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.titlecase}} { get; {{^isReadOnly}}set; {{/isReadOnly}}} {{/composedSchemas.anyOf}} {{#composedSchemas.oneOf}} @@ -138,7 +148,7 @@ {{#deprecated}} [Obsolete] {{/deprecated}} - public {{{dataType}}}{{#isNullable}}{{nrt?}}{{/isNullable}} {{#lambda.titlecase}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.titlecase}} { get; {{#isReadOnly}}private {{/isReadOnly}}set; } + public {{{dataType}}}{{nrt?}} {{#lambda.titlecase}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.titlecase}} { get; {{^isReadOnly}}set; {{/isReadOnly}}} {{/composedSchemas.oneOf}} {{#composedSchemas.allOf}} @@ -150,7 +160,7 @@ {{#deprecated}} [Obsolete] {{/deprecated}} - public {{{dataType}}} {{#lambda.titlecase}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.titlecase}} { get; {{#isReadOnly}}private {{/isReadOnly}}set; } + public {{{dataType}}} {{#lambda.titlecase}}{{baseType}}{{#isArray}}{{{dataFormat}}}{{/isArray}}{{/lambda.titlecase}} { get; {{^isReadOnly}}set; {{/isReadOnly}}} {{/isInherited}} {{/composedSchemas.allOf}} @@ -165,7 +175,7 @@ {{#deprecated}} [Obsolete] {{/deprecated}} - public {{^compulsory}}{{#lambda.optional}}{{{datatypeWithEnum}}}{{/lambda.optional}}{{/compulsory}}{{#compulsory}}{{{datatypeWithEnum}}}{{/compulsory}} {{name}} { get; {{#isReadOnly}}private {{/isReadOnly}}set; } + public {{#isNullable}}{{#lambda.optional}}{{{datatypeWithEnum}}}{{/lambda.optional}}{{/isNullable}}{{^isNullable}}{{{datatypeWithEnum}}}{{/isNullable}} {{name}} { get; {{^isReadOnly}}set; {{/isReadOnly}}} {{/isEnum}} {{/isInherited}} @@ -176,7 +186,7 @@ /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); {{/parentModel}} {{/isAdditionalPropertiesTrue}} @@ -202,6 +212,8 @@ sb.Append("}\n"); return sb.ToString(); } + {{#readOnlyVars}} + {{#-first}} /// /// Returns true if objects are equal @@ -230,29 +242,28 @@ {{/useCompareNetObjects}} {{^useCompareNetObjects}} if (input == null) - { return false; - } - return {{#vars}}{{#parent}}base.Equals(input) && {{/parent}}{{^isContainer}} + + return {{#parent}}base.Equals(input) && {{/parent}}{{#readOnlyVars}}{{^isInherited}}{{^isContainer}} ( - this.{{name}} == input.{{name}} || + {{name}} == input.{{name}} || {{^vendorExtensions.x-is-value-type}} - (this.{{name}} != null && - this.{{name}}.Equals(input.{{name}})) + ({{name}} != null && + {{name}}.Equals(input.{{name}})) {{/vendorExtensions.x-is-value-type}} {{#vendorExtensions.x-is-value-type}} - this.{{name}}.Equals(input.{{name}}) + {{name}}.Equals(input.{{name}}) {{/vendorExtensions.x-is-value-type}} ){{^-last}} && {{/-last}}{{/isContainer}}{{#isContainer}} ( - this.{{name}} == input.{{name}} || - {{^vendorExtensions.x-is-value-type}}this.{{name}} != null && + {{name}} == input.{{name}} || + {{^vendorExtensions.x-is-value-type}}{{name}} != null && input.{{name}} != null && - {{/vendorExtensions.x-is-value-type}}this.{{name}}.SequenceEqual(input.{{name}}) - ){{^-last}} && {{/-last}}{{/isContainer}}{{/vars}}{{^vars}}{{#parent}}base.Equals(input){{/parent}}{{^parent}}false{{/parent}}{{/vars}}{{^isAdditionalPropertiesTrue}};{{/isAdditionalPropertiesTrue}} + {{/vendorExtensions.x-is-value-type}}{{name}}.SequenceEqual(input.{{name}}) + ){{^-last}} && {{/-last}}{{/isContainer}}{{/isInherited}}{{/readOnlyVars}}{{^readOnlyVars}}{{#parent}}base.Equals(input){{/parent}}{{^parent}}false{{/parent}}{{/readOnlyVars}}{{^isAdditionalPropertiesTrue}};{{/isAdditionalPropertiesTrue}} {{#isAdditionalPropertiesTrue}} {{^parentModel}} - && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); + && (AdditionalProperties.Count == input.AdditionalProperties.Count && !AdditionalProperties.Except(input.AdditionalProperties).Any()); {{/parentModel}} {{/isAdditionalPropertiesTrue}} {{/useCompareNetObjects}} @@ -272,29 +283,29 @@ {{^parent}} int hashCode = 41; {{/parent}} - {{#vars}} - {{^vendorExtensions.x-is-value-type}} - if (this.{{name}} != null) - { - hashCode = (hashCode * 59) + this.{{name}}.GetHashCode(); - } - {{/vendorExtensions.x-is-value-type}} - {{#vendorExtensions.x-is-value-type}} - hashCode = (hashCode * 59) + this.{{name}}.GetHashCode(); - {{/vendorExtensions.x-is-value-type}} - {{/vars}} + {{#readOnlyVars}} + {{^isNullable}} + hashCode = (hashCode * 59) + {{name}}.GetHashCode(); + {{/isNullable}} + {{/readOnlyVars}} + {{#readOnlyVars}} + {{#isNullable}} + + if ({{name}} != null) + hashCode = (hashCode * 59) + {{name}}.GetHashCode(); + {{/isNullable}} + {{/readOnlyVars}} {{#isAdditionalPropertiesTrue}} {{^parentModel}} - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } + hashCode = (hashCode * 59) + AdditionalProperties.GetHashCode(); {{/parentModel}} {{/isAdditionalPropertiesTrue}} + return hashCode; } } - + {{/-first}} + {{/readOnlyVars}} {{#validatable}} {{^parentModel}} {{>validatable}} diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/testInstructions.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/testInstructions.mustache new file mode 100644 index 0000000000..7bf738e207 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/libraries/generichost/testInstructions.mustache @@ -0,0 +1,18 @@ +/* ********************************************************************************* +* Follow these manual steps to construct tests. +* This file will not be overwritten. +* ********************************************************************************* +* 1. Navigate to ApiTests.Base.cs and ensure any tokens are being created correctly. +* Take care not to commit credentials to any repository. +* +* 2. Mocking is coordinated by ApiTestsBase#AddApiHttpClients. +* To mock the client, use the generic AddApiHttpClients. +* To mock the server, change the client's BaseAddress. +* +* 3. Locate the test you want below +* - remove the skip property from the Fact attribute +* - set the value of any variables if necessary +* +* 4. Run the tests and ensure they work. +* +*/ \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/modelEnum.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/modelEnum.mustache index 514542d70e..a12611e9cf 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/modelEnum.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/modelEnum.mustache @@ -29,10 +29,125 @@ /// Enum {{name}} for value: {{value}} /// {{#isString}} + {{^useGenericHost}} + {{! EnumMember not currently supported in System.Text.Json, use a converter instead }} [EnumMember(Value = "{{{value}}}")] + {{/useGenericHost}} {{/isString}} - {{name}}{{^isString}} = {{{value}}}{{/isString}}{{#isString}} = {{-index}}{{/isString}}{{^-last}},{{/-last}} + {{name}} = {{^isString}}{{{value}}}{{/isString}}{{#isString}}{{-index}}{{/isString}}{{^-last}},{{/-last}} {{/enumVars}} {{/allowableValues}} - }{{! NOTE: This model's enumVars is modified to look like CodegenProperty}} + } + {{#useGenericHost}} + + public class {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}Converter : JsonConverter<{{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}> + { + public static {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} FromString(string value) + { + {{#allowableValues}} + {{#enumVars}} + if (value == {{^isString}}({{{value}}}).ToString(){{/isString}}{{#isString}}"{{{value}}}"{{/isString}}) + return {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}.{{name}}; + + {{/enumVars}} + {{/allowableValues}} + throw new NotImplementedException($"Could not convert value to type {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}: '{value}'"); + } + + public static {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}? FromStringOrDefault(string value) + { + {{#allowableValues}} + {{#enumVars}} + if (value == {{^isString}}({{{value}}}).ToString(){{/isString}}{{#isString}}"{{{value}}}"{{/isString}}) + return {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}.{{name}}; + + {{/enumVars}} + {{/allowableValues}} + return null; + } + + public static {{#isString}}string{{/isString}}{{^isString}}int{{/isString}} ToJsonValue({{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} value) + { + {{^isString}} + return (int) value; + {{/isString}} + {{#isString}} + {{#allowableValues}} + {{#enumVars}} + if (value == {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}.{{name}}) + return "{{value}}"; + + {{/enumVars}} + {{/allowableValues}} + throw new NotImplementedException($"Value could not be handled: '{value}'"); + {{/isString}} + } + + /// + /// Returns a {{datatypeWithEnum}} from the Json object + /// + /// + /// + /// + /// + public override {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string{{nrt?}} rawValue = reader.GetString(); + + {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}? result = {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}Converter.FromString(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} {{#lambda.camelcase_param}}{{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}{{/lambda.camelcase_param}}, JsonSerializerOptions options) + { + writer.WriteStringValue({{#lambda.camelcase_param}}{{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}{{/lambda.camelcase_param}}.ToString()); + } + } + + public class {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}NullableConverter : JsonConverter<{{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}?> + { + /// + /// Returns a {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} from the Json object + /// + /// + /// + /// + /// + public override {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string{{nrt?}} rawValue = reader.GetString(); + + if (rawValue == null) + return null; + + {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}? result = {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}Converter.FromString(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}? {{#lambda.camelcase_param}}{{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}{{/lambda.camelcase_param}}, JsonSerializerOptions options) + { + writer.WriteStringValue({{#lambda.camelcase_param}}{{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}{{/lambda.camelcase_param}}?.ToString() ?? "null"); + } + } + {{/useGenericHost}} diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/modelInnerEnum.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/modelInnerEnum.mustache index f879f022da..f79a78178a 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/modelInnerEnum.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/modelInnerEnum.mustache @@ -17,12 +17,61 @@ /// /// Enum {{name}} for value: {{value}} /// + {{^useGenericHost}} {{#isString}} [EnumMember(Value = "{{{value}}}")] {{/isString}} - {{name}}{{^isString}} = {{{value}}}{{/isString}}{{#isString}} = {{-index}}{{/isString}}{{^-last}},{{/-last}} + {{/useGenericHost}} + {{name}} = {{^isString}}{{{value}}}{{/isString}}{{#isString}}{{-index}}{{/isString}}{{^-last}},{{/-last}} {{/enumVars}} {{/allowableValues}} } - {{/isContainer}} + {{#useGenericHost}} + + /// + /// Returns a {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} + /// + /// + /// + public static {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}{{#isNullable}}?{{/isNullable}} {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}FromString(string value) + { + {{#allowableValues}} + {{#enumVars}} + if (value == {{^isString}}({{{value}}}).ToString(){{/isString}}{{#isString}}"{{{value}}}"{{/isString}}) + return {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}.{{name}}; + + {{/enumVars}} + {{/allowableValues}} + {{#isNullable}} + return null; + {{/isNullable}} + {{^isNullable}} + throw new NotImplementedException($"Could not convert value to type {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}: '{value}'"); + {{/isNullable}} + } + + /// + /// Returns equivalent json value + /// + /// + /// + /// + public static {{#isString}}string{{/isString}}{{^isString}}int{{/isString}} {{datatypeWithEnum}}ToJsonValue({{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} value) + { + {{^isString}} + return (int) value; + {{/isString}} + {{#isString}} + {{#allowableValues}} + {{#enumVars}} + if (value == {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}.{{name}}) + return "{{value}}"; + + {{/enumVars}} + {{/allowableValues}} + throw new NotImplementedException($"Value could not be handled: '{value}'"); + {{/isString}} + } + {{/useGenericHost}} + {{/isContainer}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/model_test.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/model_test.mustache index b4aefe5100..347c2c35a2 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/model_test.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/model_test.mustache @@ -8,9 +8,11 @@ using System.IO; using System.Collections.Generic; using {{packageName}}.{{apiPackage}}; using {{packageName}}.{{modelPackage}}; -using {{packageName}}.Client; +using {{packageName}}.{{clientPackage}}; using System.Reflection; +{{^useGenericHost}} using Newtonsoft.Json; +{{/useGenericHost}} {{#models}} {{#model}} diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/netcore_project.additions.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/netcore_project.additions.mustache new file mode 100644 index 0000000000..8c6f3ad52d --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/netcore_project.additions.mustache @@ -0,0 +1 @@ +{{! if needed users can add this file to their templates folder to append to the csproj }} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/netcore_project.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/netcore_project.mustache index 3befcffaf4..6c9744625e 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/netcore_project.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/netcore_project.mustache @@ -35,14 +35,14 @@ {{/useRestSharp}} {{#useGenericHost}} - - + + {{#supportsRetry}} - + {{/supportsRetry}} {{/useGenericHost}} {{#supportsRetry}} - + {{/supportsRetry}} {{#validatable}} @@ -61,4 +61,4 @@ {{/net48}} - +{{>netcore_project.additions}} diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/netcore_testproject.additions.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/netcore_testproject.additions.mustache new file mode 100644 index 0000000000..8c6f3ad52d --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/netcore_testproject.additions.mustache @@ -0,0 +1 @@ +{{! if needed users can add this file to their templates folder to append to the csproj }} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/netcore_testproject.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/netcore_testproject.mustache index d4b2048ae5..078005bc23 100644 --- a/modules/openapi-generator/src/main/resources/csharp-netcore/netcore_testproject.mustache +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/netcore_testproject.mustache @@ -9,13 +9,12 @@ - - - + + + - - +{{>netcore_testproject.additions}} diff --git a/samples/client/others/csharp-netcore-complex-files/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/samples/client/others/csharp-netcore-complex-files/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj index a68e9179c8..06b106b96d 100644 --- a/samples/client/others/csharp-netcore-complex-files/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj +++ b/samples/client/others/csharp-netcore-complex-files/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj @@ -16,5 +16,4 @@ - diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj index a68e9179c8..06b106b96d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj @@ -16,5 +16,4 @@ - diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/.openapi-generator/FILES b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/.openapi-generator/FILES index cf0f5c871b..65d841c450 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/.openapi-generator/FILES +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/.openapi-generator/FILES @@ -92,31 +92,38 @@ docs/scripts/git_push.ps1 docs/scripts/git_push.sh src/Org.OpenAPITools.Test/Api/DependencyInjectionTests.cs src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj +src/Org.OpenAPITools.Test/README.md src/Org.OpenAPITools/Api/AnotherFakeApi.cs src/Org.OpenAPITools/Api/DefaultApi.cs src/Org.OpenAPITools/Api/FakeApi.cs src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs +src/Org.OpenAPITools/Api/IApi.cs src/Org.OpenAPITools/Api/PetApi.cs src/Org.OpenAPITools/Api/StoreApi.cs src/Org.OpenAPITools/Api/UserApi.cs src/Org.OpenAPITools/Client/ApiException.cs +src/Org.OpenAPITools/Client/ApiFactory.cs src/Org.OpenAPITools/Client/ApiKeyToken.cs src/Org.OpenAPITools/Client/ApiResponseEventArgs.cs src/Org.OpenAPITools/Client/ApiResponse`1.cs src/Org.OpenAPITools/Client/BasicToken.cs src/Org.OpenAPITools/Client/BearerToken.cs src/Org.OpenAPITools/Client/ClientUtils.cs +src/Org.OpenAPITools/Client/CookieContainer.cs +src/Org.OpenAPITools/Client/DateTimeJsonConverter.cs +src/Org.OpenAPITools/Client/DateTimeNullableJsonConverter.cs src/Org.OpenAPITools/Client/HostConfiguration.cs src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs src/Org.OpenAPITools/Client/HttpSigningToken.cs -src/Org.OpenAPITools/Client/IApi.cs src/Org.OpenAPITools/Client/JsonSerializerOptionsProvider.cs src/Org.OpenAPITools/Client/OAuthToken.cs -src/Org.OpenAPITools/Client/OpenAPIDateJsonConverter.cs src/Org.OpenAPITools/Client/RateLimitProvider`1.cs src/Org.OpenAPITools/Client/TokenBase.cs src/Org.OpenAPITools/Client/TokenContainer`1.cs src/Org.OpenAPITools/Client/TokenProvider`1.cs +src/Org.OpenAPITools/Extensions/IHostBuilderExtensions.cs +src/Org.OpenAPITools/Extensions/IHttpClientBuilderExtensions.cs +src/Org.OpenAPITools/Extensions/IServiceCollectionExtensions.cs src/Org.OpenAPITools/Model/Activity.cs src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs @@ -197,3 +204,4 @@ src/Org.OpenAPITools/Model/User.cs src/Org.OpenAPITools/Model/Whale.cs src/Org.OpenAPITools/Model/Zebra.cs src/Org.OpenAPITools/Org.OpenAPITools.csproj +src/Org.OpenAPITools/README.md diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/README.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/README.md index de89d86a36..f9c1c7f746 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/README.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/README.md @@ -1,259 +1 @@ # Created with Openapi Generator - - -## Run the following powershell command to generate the library - -```ps1 -$properties = @( - 'apiName=Api', - 'targetFramework=net7.0', - 'validatable=true', - 'nullableReferenceTypes=true', - 'hideGenerationTimestamp=true', - 'packageVersion=1.0.0', - 'packageAuthors=OpenAPI', - 'packageCompany=OpenAPI', - 'packageCopyright=No Copyright', - 'packageDescription=A library generated from a OpenAPI doc', - 'packageName=Org.OpenAPITools', - 'packageTags=', - 'packageTitle=OpenAPI Library' -) -join "," - -$global = @( - 'apiDocs=true', - 'modelDocs=true', - 'apiTests=true', - 'modelTests=true' -) -join "," - -java -jar "/openapi-generator/modules/openapi-generator-cli/target/openapi-generator-cli.jar" generate ` - -g csharp-netcore ` - -i .yaml ` - -o ` - --library generichost ` - --additional-properties $properties ` - --global-property $global ` - --git-host "github.com" ` - --git-repo-id "GIT_REPO_ID" ` - --git-user-id "GIT_USER_ID" ` - --release-note "Minor update" - # -t templates -``` - - -## Using the library in your project - -```cs -using System; -using System.Threading.Tasks; -using Microsoft.Extensions.Hosting; -using Microsoft.Extensions.DependencyInjection; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace YourProject -{ - public class Program - { - public static async Task Main(string[] args) - { - var host = CreateHostBuilder(args).Build(); - var api = host.Services.GetRequiredService(); - ApiResponse foo = await api.Call123TestSpecialTagsWithHttpInfoAsync("todo"); - } - - public static IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args) - .ConfigureApi((context, options) => - { - // the type of token here depends on the api security specifications - ApiKeyToken token = new(""); - options.AddTokens(token); - - // optionally choose the method the tokens will be provided with, default is RateLimitProvider - options.UseProvider, ApiKeyToken>(); - - // the type of token here depends on the api security specifications - ApiKeyToken token = new(""); - options.AddTokens(token); - - // optionally choose the method the tokens will be provided with, default is RateLimitProvider - options.UseProvider, ApiKeyToken>(); - - // the type of token here depends on the api security specifications - ApiKeyToken token = new(""); - options.AddTokens(token); - - // optionally choose the method the tokens will be provided with, default is RateLimitProvider - options.UseProvider, ApiKeyToken>(); - - // the type of token here depends on the api security specifications - ApiKeyToken token = new(""); - options.AddTokens(token); - - // optionally choose the method the tokens will be provided with, default is RateLimitProvider - options.UseProvider, ApiKeyToken>(); - - // the type of token here depends on the api security specifications - ApiKeyToken token = new(""); - options.AddTokens(token); - - // optionally choose the method the tokens will be provided with, default is RateLimitProvider - options.UseProvider, ApiKeyToken>(); - - // the type of token here depends on the api security specifications - ApiKeyToken token = new(""); - options.AddTokens(token); - - // optionally choose the method the tokens will be provided with, default is RateLimitProvider - options.UseProvider, ApiKeyToken>(); - - options.ConfigureJsonOptions((jsonOptions) => - { - // your custom converters if any - }); - - options.AddApiHttpClients(builder: builder => builder - .AddRetryPolicy(2) - .AddTimeoutPolicy(TimeSpan.FromSeconds(5)) - .AddCircuitBreakerPolicy(10, TimeSpan.FromSeconds(30)) - // add whatever middleware you prefer - ); - }); - } -} -``` - -## Questions - -- What about HttpRequest failures and retries? - If supportsRetry is enabled, you can configure Polly in the ConfigureClients method. -- How are tokens used? - Tokens are provided by a TokenProvider class. The default is RateLimitProvider which will perform client side rate limiting. - Other providers can be used with the UseProvider method. -- Does an HttpRequest throw an error when the server response is not Ok? - It depends how you made the request. If the return type is ApiResponse no error will be thrown, though the Content property will be null. - StatusCode and ReasonPhrase will contain information about the error. - If the return type is T, then it will throw. If the return type is TOrDefault, it will return null. - - -## Dependencies - -- [Microsoft.Extensions.Hosting](https://www.nuget.org/packages/Microsoft.Extensions.Hosting/) - 5.0.0 or later -- [Microsoft.Extensions.Http](https://www.nuget.org/packages/Microsoft.Extensions.Http/) - 5.0.0 or later -- [Microsoft.Extensions.Http.Polly](https://www.nuget.org/packages/Microsoft.Extensions.Http.Polly/) - 5.0.1 or later -- [Polly](https://www.nuget.org/packages/Polly/) - 7.2.3 or later -- [Newtonsoft.Json](https://www.nuget.org/packages/Newtonsoft.Json/) - 13.0.1 or later -- [JsonSubTypes](https://www.nuget.org/packages/JsonSubTypes/) - 1.7.0 or later -- [CompareNETObjects](https://www.nuget.org/packages/CompareNETObjects) - 4.61.0 or later -- [System.ComponentModel.Annotations](https://www.nuget.org/packages/System.ComponentModel.Annotations) - 4.7.0 or later - - -## Documentation for Authorization - -Authentication schemes defined for the API: - - -### api_key - -- **Type**: API key -- **API key parameter name**: api_key -- **Location**: HTTP header - - -### api_key_query - -- **Type**: API key -- **API key parameter name**: api_key_query -- **Location**: URL query string - - -### bearer_test - - -- **Type**: Bearer Authentication - - -### http_basic_test - - -- **Type**: HTTP basic authentication - - -### http_signature_test - - - - -### petstore_auth - - -- **Type**: OAuth -- **Flow**: implicit -- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog -- **Scopes**: -- write:pets: modify pets in your account -- read:pets: read your pets - -## Build -- SDK version: 1.0.0 -- Build package: org.openapitools.codegen.languages.CSharpNetCoreClientCodegen - -## Api Information -- appName: OpenAPI Petstore -- appVersion: 1.0.0 -- appDescription: 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 Global properties](https://openapi-generator.tech/docs/globals) -- generateAliasAsModel: -- supportingFiles: -- models: omitted for brevity -- apis: omitted for brevity -- apiDocs: true -- modelDocs: true -- apiTests: true -- modelTests: true -- withXml: - -## [OpenApi Generator Parameters](https://openapi-generator.tech/docs/generators/csharp-netcore) -- allowUnicodeIdentifiers: -- apiName: Api -- caseInsensitiveResponseHeaders: -- conditionalSerialization: false -- disallowAdditionalPropertiesIfNotPresent: false -- gitHost: github.com -- gitRepoId: GIT_REPO_ID -- gitUserId: GIT_USER_ID -- hideGenerationTimestamp: true -- interfacePrefix: I -- library: generichost -- licenseId: -- modelPropertyNaming: -- netCoreProjectFile: false -- nonPublicApi: false -- nullableReferenceTypes: true -- optionalAssemblyInfo: -- optionalEmitDefaultValues: false -- optionalMethodArgument: true -- optionalProjectFile: -- packageAuthors: OpenAPI -- packageCompany: OpenAPI -- packageCopyright: No Copyright -- packageDescription: A library generated from a OpenAPI doc -- packageGuid: {321C8C3F-0156-40C1-AE42-D59761FB9B6C} -- packageName: Org.OpenAPITools -- packageTags: -- packageTitle: OpenAPI Library -- packageVersion: 1.0.0 -- releaseNote: Minor update -- returnICollection: false -- sortParamsByRequiredFlag: -- sourceFolder: src -- targetFramework: net7.0 -- useCollection: false -- useDateTimeOffset: false -- useOneOfDiscriminatorLookup: false -- validatable: true - -This C# SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project. diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/apis/FakeApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/apis/FakeApi.md index a179355d60..77826f0673 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/apis/FakeApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/apis/FakeApi.md @@ -631,7 +631,7 @@ No authorization required # **TestBodyWithQueryParams** -> void TestBodyWithQueryParams (string query, User user) +> void TestBodyWithQueryParams (User user, string query) @@ -652,12 +652,12 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var query = "query_example"; // string | var user = new User(); // User | + var query = "query_example"; // string | try { - apiInstance.TestBodyWithQueryParams(query, user); + apiInstance.TestBodyWithQueryParams(user, query); } catch (ApiException e) { @@ -676,7 +676,7 @@ This returns an ApiResponse object which contains the response data, status code ```csharp try { - apiInstance.TestBodyWithQueryParamsWithHttpInfo(query, user); + apiInstance.TestBodyWithQueryParamsWithHttpInfo(user, query); } catch (ApiException e) { @@ -690,8 +690,8 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **query** | **string** | | | | **user** | [**User**](User.md) | | | +| **query** | **string** | | | ### Return type @@ -807,7 +807,7 @@ No authorization required # **TestEndpointParameters** -> void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string? _string = null, System.IO.Stream? binary = null, DateTime? date = null, string? password = null, string? callback = null, DateTime? dateTime = null) +> void TestEndpointParameters (byte[] _byte, decimal number, double _double, string patternWithoutDelimiter, DateTime? date = null, System.IO.Stream? binary = null, float? _float = null, int? integer = null, int? int32 = null, long? int64 = null, string? _string = null, string? password = null, string? callback = null, DateTime? dateTime = null) Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -834,17 +834,17 @@ namespace Example config.Password = "YOUR_PASSWORD"; var apiInstance = new FakeApi(config); + var _byte = System.Text.Encoding.ASCII.GetBytes("BYTE_ARRAY_DATA_HERE"); // byte[] | None var number = 8.14D; // decimal | None var _double = 1.2D; // double | None var patternWithoutDelimiter = "patternWithoutDelimiter_example"; // string | None - var _byte = System.Text.Encoding.ASCII.GetBytes("BYTE_ARRAY_DATA_HERE"); // byte[] | None + var date = DateTime.Parse("2013-10-20"); // DateTime? | None (optional) + var binary = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream? | None (optional) + var _float = 3.4F; // float? | None (optional) var integer = 56; // int? | None (optional) var int32 = 56; // int? | None (optional) var int64 = 789L; // long? | None (optional) - var _float = 3.4F; // float? | None (optional) var _string = "_string_example"; // string? | None (optional) - var binary = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream? | None (optional) - var date = DateTime.Parse("2013-10-20"); // DateTime? | None (optional) var password = "password_example"; // string? | None (optional) var callback = "callback_example"; // string? | None (optional) var dateTime = DateTime.Parse(""2010-02-01T10:20:10.111110+01:00""); // DateTime? | None (optional) (default to "2010-02-01T10:20:10.111110+01:00") @@ -852,7 +852,7 @@ namespace Example try { // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - apiInstance.TestEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, password, callback, dateTime); + apiInstance.TestEndpointParameters(_byte, number, _double, patternWithoutDelimiter, date, binary, _float, integer, int32, int64, _string, password, callback, dateTime); } catch (ApiException e) { @@ -872,7 +872,7 @@ This returns an ApiResponse object which contains the response data, status code try { // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - apiInstance.TestEndpointParametersWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, password, callback, dateTime); + apiInstance.TestEndpointParametersWithHttpInfo(_byte, number, _double, patternWithoutDelimiter, date, binary, _float, integer, int32, int64, _string, password, callback, dateTime); } catch (ApiException e) { @@ -886,17 +886,17 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| +| **_byte** | **byte[]** | None | | | **number** | **decimal** | None | | | **_double** | **double** | None | | | **patternWithoutDelimiter** | **string** | None | | -| **_byte** | **byte[]** | None | | +| **date** | **DateTime?** | None | [optional] | +| **binary** | **System.IO.Stream?****System.IO.Stream?** | None | [optional] | +| **_float** | **float?** | None | [optional] | | **integer** | **int?** | None | [optional] | | **int32** | **int?** | None | [optional] | | **int64** | **long?** | None | [optional] | -| **_float** | **float?** | None | [optional] | | **_string** | **string?** | None | [optional] | -| **binary** | **System.IO.Stream?****System.IO.Stream?** | None | [optional] | -| **date** | **DateTime?** | None | [optional] | | **password** | **string?** | None | [optional] | | **callback** | **string?** | None | [optional] | | **dateTime** | **DateTime?** | None | [optional] [default to "2010-02-01T10:20:10.111110+01:00"] | @@ -925,7 +925,7 @@ void (empty response body) # **TestEnumParameters** -> void TestEnumParameters (List? enumHeaderStringArray = null, List? enumQueryStringArray = null, int? enumQueryInteger = null, double? enumQueryDouble = null, string? enumHeaderString = null, string? enumQueryString = null, List? enumFormStringArray = null, string? enumFormString = null) +> void TestEnumParameters (List? enumHeaderStringArray = null, List? enumQueryStringArray = null, double? enumQueryDouble = null, int? enumQueryInteger = null, List? enumFormStringArray = null, string? enumHeaderString = null, string? enumQueryString = null, string? enumFormString = null) To test enum parameters @@ -950,17 +950,17 @@ namespace Example var apiInstance = new FakeApi(config); var enumHeaderStringArray = new List?(); // List? | Header parameter enum test (string array) (optional) var enumQueryStringArray = new List?(); // List? | Query parameter enum test (string array) (optional) - var enumQueryInteger = 1; // int? | Query parameter enum test (double) (optional) var enumQueryDouble = 1.1D; // double? | Query parameter enum test (double) (optional) + var enumQueryInteger = 1; // int? | Query parameter enum test (double) (optional) + var enumFormStringArray = new List?(); // List? | Form parameter enum test (string array) (optional) (default to $) var enumHeaderString = "_abc"; // string? | Header parameter enum test (string) (optional) (default to -efg) var enumQueryString = "_abc"; // string? | Query parameter enum test (string) (optional) (default to -efg) - var enumFormStringArray = new List?(); // List? | Form parameter enum test (string array) (optional) (default to $) var enumFormString = "_abc"; // string? | Form parameter enum test (string) (optional) (default to -efg) try { // To test enum parameters - apiInstance.TestEnumParameters(enumHeaderStringArray, enumQueryStringArray, enumQueryInteger, enumQueryDouble, enumHeaderString, enumQueryString, enumFormStringArray, enumFormString); + apiInstance.TestEnumParameters(enumHeaderStringArray, enumQueryStringArray, enumQueryDouble, enumQueryInteger, enumFormStringArray, enumHeaderString, enumQueryString, enumFormString); } catch (ApiException e) { @@ -980,7 +980,7 @@ This returns an ApiResponse object which contains the response data, status code try { // To test enum parameters - apiInstance.TestEnumParametersWithHttpInfo(enumHeaderStringArray, enumQueryStringArray, enumQueryInteger, enumQueryDouble, enumHeaderString, enumQueryString, enumFormStringArray, enumFormString); + apiInstance.TestEnumParametersWithHttpInfo(enumHeaderStringArray, enumQueryStringArray, enumQueryDouble, enumQueryInteger, enumFormStringArray, enumHeaderString, enumQueryString, enumFormString); } catch (ApiException e) { @@ -996,11 +996,11 @@ catch (ApiException e) |------|------|-------------|-------| | **enumHeaderStringArray** | [**List<string>?**](string.md) | Header parameter enum test (string array) | [optional] | | **enumQueryStringArray** | [**List<string>?**](string.md) | Query parameter enum test (string array) | [optional] | -| **enumQueryInteger** | **int?** | Query parameter enum test (double) | [optional] | | **enumQueryDouble** | **double?** | Query parameter enum test (double) | [optional] | +| **enumQueryInteger** | **int?** | Query parameter enum test (double) | [optional] | +| **enumFormStringArray** | [**List<string>?**](string.md) | Form parameter enum test (string array) | [optional] [default to $] | | **enumHeaderString** | **string?** | Header parameter enum test (string) | [optional] [default to -efg] | | **enumQueryString** | **string?** | Query parameter enum test (string) | [optional] [default to -efg] | -| **enumFormStringArray** | [**List<string>?**](string.md) | Form parameter enum test (string array) | [optional] [default to $] | | **enumFormString** | **string?** | Form parameter enum test (string) | [optional] [default to -efg] | ### Return type @@ -1027,7 +1027,7 @@ No authorization required # **TestGroupParameters** -> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null) +> void TestGroupParameters (bool requiredBooleanGroup, int requiredStringGroup, long requiredInt64Group, bool? booleanGroup = null, int? stringGroup = null, long? int64Group = null) Fake endpoint to test group parameters (optional) @@ -1053,17 +1053,17 @@ namespace Example config.AccessToken = "YOUR_BEARER_TOKEN"; var apiInstance = new FakeApi(config); - var requiredStringGroup = 56; // int | Required String in group parameters var requiredBooleanGroup = true; // bool | Required Boolean in group parameters + var requiredStringGroup = 56; // int | Required String in group parameters var requiredInt64Group = 789L; // long | Required Integer in group parameters - var stringGroup = 56; // int? | String in group parameters (optional) var booleanGroup = true; // bool? | Boolean in group parameters (optional) + var stringGroup = 56; // int? | String in group parameters (optional) var int64Group = 789L; // long? | Integer in group parameters (optional) try { // Fake endpoint to test group parameters (optional) - apiInstance.TestGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + apiInstance.TestGroupParameters(requiredBooleanGroup, requiredStringGroup, requiredInt64Group, booleanGroup, stringGroup, int64Group); } catch (ApiException e) { @@ -1083,7 +1083,7 @@ This returns an ApiResponse object which contains the response data, status code try { // Fake endpoint to test group parameters (optional) - apiInstance.TestGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + apiInstance.TestGroupParametersWithHttpInfo(requiredBooleanGroup, requiredStringGroup, requiredInt64Group, booleanGroup, stringGroup, int64Group); } catch (ApiException e) { @@ -1097,11 +1097,11 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **requiredStringGroup** | **int** | Required String in group parameters | | | **requiredBooleanGroup** | **bool** | Required Boolean in group parameters | | +| **requiredStringGroup** | **int** | Required String in group parameters | | | **requiredInt64Group** | **long** | Required Integer in group parameters | | -| **stringGroup** | **int?** | String in group parameters | [optional] | | **booleanGroup** | **bool?** | Boolean in group parameters | [optional] | +| **stringGroup** | **int?** | String in group parameters | [optional] | | **int64Group** | **long?** | Integer in group parameters | [optional] | ### Return type diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/apis/PetApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/apis/PetApi.md index 4187e44c57..d5e8e8330a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/apis/PetApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/apis/PetApi.md @@ -664,7 +664,7 @@ void (empty response body) # **UploadFile** -> ApiResponse UploadFile (long petId, string? additionalMetadata = null, System.IO.Stream? file = null) +> ApiResponse UploadFile (long petId, System.IO.Stream? file = null, string? additionalMetadata = null) uploads an image @@ -689,13 +689,13 @@ namespace Example var apiInstance = new PetApi(config); var petId = 789L; // long | ID of pet to update - var additionalMetadata = "additionalMetadata_example"; // string? | Additional data to pass to server (optional) var file = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream? | file to upload (optional) + var additionalMetadata = "additionalMetadata_example"; // string? | Additional data to pass to server (optional) try { // uploads an image - ApiResponse result = apiInstance.UploadFile(petId, additionalMetadata, file); + ApiResponse result = apiInstance.UploadFile(petId, file, additionalMetadata); Debug.WriteLine(result); } catch (ApiException e) @@ -716,7 +716,7 @@ This returns an ApiResponse object which contains the response data, status code try { // uploads an image - ApiResponse response = apiInstance.UploadFileWithHttpInfo(petId, additionalMetadata, file); + ApiResponse response = apiInstance.UploadFileWithHttpInfo(petId, file, additionalMetadata); Debug.Write("Status Code: " + response.StatusCode); Debug.Write("Response Headers: " + response.Headers); Debug.Write("Response Body: " + response.Data); @@ -734,8 +734,8 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| | **petId** | **long** | ID of pet to update | | -| **additionalMetadata** | **string?** | Additional data to pass to server | [optional] | | **file** | **System.IO.Stream?****System.IO.Stream?** | file to upload | [optional] | +| **additionalMetadata** | **string?** | Additional data to pass to server | [optional] | ### Return type @@ -760,7 +760,7 @@ catch (ApiException e) # **UploadFileWithRequiredFile** -> ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, string? additionalMetadata = null) +> ApiResponse UploadFileWithRequiredFile (System.IO.Stream requiredFile, long petId, string? additionalMetadata = null) uploads an image (required) @@ -784,14 +784,14 @@ namespace Example config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(config); - var petId = 789L; // long | ID of pet to update var requiredFile = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | file to upload + var petId = 789L; // long | ID of pet to update var additionalMetadata = "additionalMetadata_example"; // string? | Additional data to pass to server (optional) try { // uploads an image (required) - ApiResponse result = apiInstance.UploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); + ApiResponse result = apiInstance.UploadFileWithRequiredFile(requiredFile, petId, additionalMetadata); Debug.WriteLine(result); } catch (ApiException e) @@ -812,7 +812,7 @@ This returns an ApiResponse object which contains the response data, status code try { // uploads an image (required) - ApiResponse response = apiInstance.UploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata); + ApiResponse response = apiInstance.UploadFileWithRequiredFileWithHttpInfo(requiredFile, petId, additionalMetadata); Debug.Write("Status Code: " + response.StatusCode); Debug.Write("Response Headers: " + response.Headers); Debug.Write("Response Body: " + response.Data); @@ -829,8 +829,8 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **petId** | **long** | ID of pet to update | | | **requiredFile** | **System.IO.Stream****System.IO.Stream** | file to upload | | +| **petId** | **long** | ID of pet to update | | | **additionalMetadata** | **string?** | Additional data to pass to server | [optional] | ### Return type diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/apis/UserApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/apis/UserApi.md index fd1c1a7d62..a862c8c112 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/apis/UserApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/apis/UserApi.md @@ -623,7 +623,7 @@ No authorization required # **UpdateUser** -> void UpdateUser (string username, User user) +> void UpdateUser (User user, string username) Updated user @@ -646,13 +646,13 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); - var username = "username_example"; // string | name that need to be deleted var user = new User(); // User | Updated user object + var username = "username_example"; // string | name that need to be deleted try { // Updated user - apiInstance.UpdateUser(username, user); + apiInstance.UpdateUser(user, username); } catch (ApiException e) { @@ -672,7 +672,7 @@ This returns an ApiResponse object which contains the response data, status code try { // Updated user - apiInstance.UpdateUserWithHttpInfo(username, user); + apiInstance.UpdateUserWithHttpInfo(user, username); } catch (ApiException e) { @@ -686,8 +686,8 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **username** | **string** | name that need to be deleted | | | **user** | [**User**](User.md) | Updated user object | | +| **username** | **string** | name that need to be deleted | | ### Return type diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/AdditionalPropertiesClass.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/AdditionalPropertiesClass.md index 1f91945000..f79869f95a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/AdditionalPropertiesClass.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/AdditionalPropertiesClass.md @@ -4,14 +4,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**MapProperty** | **Dictionary<string, string>** | | [optional] +**EmptyMap** | **Object** | an object with no declared properties and no undeclared properties, hence it's an empty map. | [optional] **MapOfMapProperty** | **Dictionary<string, Dictionary<string, string>>** | | [optional] -**Anytype1** | **Object** | | [optional] +**MapProperty** | **Dictionary<string, string>** | | [optional] **MapWithUndeclaredPropertiesAnytype1** | **Object** | | [optional] **MapWithUndeclaredPropertiesAnytype2** | **Object** | | [optional] **MapWithUndeclaredPropertiesAnytype3** | **Dictionary<string, Object>** | | [optional] -**EmptyMap** | **Object** | an object with no declared properties and no undeclared properties, hence it's an empty map. | [optional] **MapWithUndeclaredPropertiesString** | **Dictionary<string, string>** | | [optional] +**Anytype1** | **Object** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/ApiResponse.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/ApiResponse.md index bc808ceeae..d89ed1a25d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/ApiResponse.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/ApiResponse.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Code** | **int** | | [optional] -**Type** | **string** | | [optional] **Message** | **string** | | [optional] +**Type** | **string** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/ArrayTest.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/ArrayTest.md index 32365e6d4d..ed572120cd 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/ArrayTest.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/ArrayTest.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ArrayOfString** | **List<string>** | | [optional] **ArrayArrayOfInteger** | **List<List<long>>** | | [optional] **ArrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [optional] +**ArrayOfString** | **List<string>** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Capitalization.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Capitalization.md index fde98a967e..9e225c1723 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Capitalization.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Capitalization.md @@ -4,12 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**SmallCamel** | **string** | | [optional] +**ATT_NAME** | **string** | Name of the pet | [optional] **CapitalCamel** | **string** | | [optional] -**SmallSnake** | **string** | | [optional] **CapitalSnake** | **string** | | [optional] **SCAETHFlowPoints** | **string** | | [optional] -**ATT_NAME** | **string** | Name of the pet | [optional] +**SmallCamel** | **string** | | [optional] +**SmallSnake** | **string** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Category.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Category.md index c2cf3f8e91..6eb0a2e13e 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Category.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Category.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | **string** | | [default to "default-name"] **Id** | **long** | | [optional] +**Name** | **string** | | [default to "default-name"] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/ClassModel.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/ClassModel.md index bb35816c91..a098828a04 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/ClassModel.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/ClassModel.md @@ -5,7 +5,7 @@ Model for testing model with \"_class\" property Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Class** | **string** | | [optional] +**ClassProperty** | **string** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Drawing.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Drawing.md index 18117e6c93..fcee9662af 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Drawing.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Drawing.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **MainShape** | [**Shape**](Shape.md) | | [optional] **ShapeOrNull** | [**ShapeOrNull**](ShapeOrNull.md) | | [optional] -**NullableShape** | [**NullableShape**](NullableShape.md) | | [optional] **Shapes** | [**List<Shape>**](Shape.md) | | [optional] +**NullableShape** | [**NullableShape**](NullableShape.md) | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/EnumArrays.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/EnumArrays.md index 2a27962cc5..7467f67978 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/EnumArrays.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/EnumArrays.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**JustSymbol** | **string** | | [optional] **ArrayEnum** | **List<EnumArrays.ArrayEnumEnum>** | | [optional] +**JustSymbol** | **string** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/EnumTest.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/EnumTest.md index 71602270ba..53bbfe31e7 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/EnumTest.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/EnumTest.md @@ -4,15 +4,15 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**EnumStringRequired** | **string** | | -**EnumString** | **string** | | [optional] **EnumInteger** | **int** | | [optional] **EnumIntegerOnly** | **int** | | [optional] **EnumNumber** | **double** | | [optional] -**OuterEnum** | **OuterEnum** | | [optional] -**OuterEnumInteger** | **OuterEnumInteger** | | [optional] +**EnumString** | **string** | | [optional] +**EnumStringRequired** | **string** | | **OuterEnumDefaultValue** | **OuterEnumDefaultValue** | | [optional] +**OuterEnumInteger** | **OuterEnumInteger** | | [optional] **OuterEnumIntegerDefaultValue** | **OuterEnumIntegerDefaultValue** | | [optional] +**OuterEnum** | **OuterEnum** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/FooGetDefaultResponse.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/FooGetDefaultResponse.md index 47e50daca3..78c99facf5 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/FooGetDefaultResponse.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/FooGetDefaultResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**String** | [**Foo**](Foo.md) | | [optional] +**StringProperty** | [**Foo**](Foo.md) | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/FormatTest.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/FormatTest.md index 0b92c2fb10..4e34a6d18b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/FormatTest.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/FormatTest.md @@ -4,22 +4,22 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Number** | **decimal** | | -**Byte** | **byte[]** | | +**Binary** | **System.IO.Stream** | | [optional] +**ByteProperty** | **byte[]** | | **Date** | **DateTime** | | -**Password** | **string** | | -**Integer** | **int** | | [optional] +**DateTime** | **DateTime** | | [optional] +**DecimalProperty** | **decimal** | | [optional] +**DoubleProperty** | **double** | | [optional] +**FloatProperty** | **float** | | [optional] **Int32** | **int** | | [optional] **Int64** | **long** | | [optional] -**Float** | **float** | | [optional] -**Double** | **double** | | [optional] -**Decimal** | **decimal** | | [optional] -**String** | **string** | | [optional] -**Binary** | **System.IO.Stream** | | [optional] -**DateTime** | **DateTime** | | [optional] -**Uuid** | **Guid** | | [optional] +**Integer** | **int** | | [optional] +**Number** | **decimal** | | +**Password** | **string** | | **PatternWithDigits** | **string** | A string that is a 10 digit number. Can have leading zeros. | [optional] **PatternWithDigitsAndDelimiter** | **string** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [optional] +**StringProperty** | **string** | | [optional] +**Uuid** | **Guid** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/MapTest.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/MapTest.md index aaee09f787..5dd27228bb 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/MapTest.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/MapTest.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**MapMapOfString** | **Dictionary<string, Dictionary<string, string>>** | | [optional] -**MapOfEnumString** | **Dictionary<string, MapTest.InnerEnum>** | | [optional] **DirectMap** | **Dictionary<string, bool>** | | [optional] **IndirectMap** | **Dictionary<string, bool>** | | [optional] +**MapMapOfString** | **Dictionary<string, Dictionary<string, string>>** | | [optional] +**MapOfEnumString** | **Dictionary<string, MapTest.InnerEnum>** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/MixedPropertiesAndAdditionalPropertiesClass.md index 031d2b9606..0bac85a8e8 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/MixedPropertiesAndAdditionalPropertiesClass.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Uuid** | **Guid** | | [optional] **DateTime** | **DateTime** | | [optional] **Map** | [**Dictionary<string, Animal>**](Animal.md) | | [optional] +**Uuid** | **Guid** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Model200Response.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Model200Response.md index 8bc8049f46..93139e1d1a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Model200Response.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Model200Response.md @@ -5,8 +5,8 @@ Model for testing model name starting with number Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**ClassProperty** | **string** | | [optional] **Name** | **int** | | [optional] -**Class** | **string** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/ModelClient.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/ModelClient.md index 9e0e83645f..51cf0636e7 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/ModelClient.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/ModelClient.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**_Client** | **string** | | [optional] +**_ClientProperty** | **string** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Name.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Name.md index 2ee782c0c5..11f49b9fd4 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Name.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Name.md @@ -6,8 +6,8 @@ Model for testing model name same as property name Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **NameProperty** | **int** | | -**SnakeCase** | **int** | | [optional] [readonly] **Property** | **string** | | [optional] +**SnakeCase** | **int** | | [optional] [readonly] **_123Number** | **int** | | [optional] [readonly] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/NullableClass.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/NullableClass.md index d4a19d1856..ac86336ea7 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/NullableClass.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/NullableClass.md @@ -4,18 +4,18 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**IntegerProp** | **int?** | | [optional] -**NumberProp** | **decimal?** | | [optional] +**ArrayItemsNullable** | **List<Object>** | | [optional] +**ObjectItemsNullable** | **Dictionary<string, Object>** | | [optional] +**ArrayAndItemsNullableProp** | **List<Object>** | | [optional] +**ArrayNullableProp** | **List<Object>** | | [optional] **BooleanProp** | **bool?** | | [optional] -**StringProp** | **string** | | [optional] **DateProp** | **DateTime?** | | [optional] **DatetimeProp** | **DateTime?** | | [optional] -**ArrayNullableProp** | **List<Object>** | | [optional] -**ArrayAndItemsNullableProp** | **List<Object>** | | [optional] -**ArrayItemsNullable** | **List<Object>** | | [optional] -**ObjectNullableProp** | **Dictionary<string, Object>** | | [optional] +**IntegerProp** | **int?** | | [optional] +**NumberProp** | **decimal?** | | [optional] **ObjectAndItemsNullableProp** | **Dictionary<string, Object>** | | [optional] -**ObjectItemsNullable** | **Dictionary<string, Object>** | | [optional] +**ObjectNullableProp** | **Dictionary<string, Object>** | | [optional] +**StringProp** | **string** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/ObjectWithDeprecatedFields.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/ObjectWithDeprecatedFields.md index b737f7d757..9f44c24d19 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/ObjectWithDeprecatedFields.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/ObjectWithDeprecatedFields.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Uuid** | **string** | | [optional] -**Id** | **decimal** | | [optional] -**DeprecatedRef** | [**DeprecatedObject**](DeprecatedObject.md) | | [optional] **Bars** | **List<string>** | | [optional] +**DeprecatedRef** | [**DeprecatedObject**](DeprecatedObject.md) | | [optional] +**Id** | **decimal** | | [optional] +**Uuid** | **string** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/OuterComposite.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/OuterComposite.md index abf676810f..8985c59d09 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/OuterComposite.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/OuterComposite.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**MyBoolean** | **bool** | | [optional] **MyNumber** | **decimal** | | [optional] **MyString** | **string** | | [optional] -**MyBoolean** | **bool** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Pet.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Pet.md index 7de10304ab..b13bb576b4 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Pet.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/Pet.md @@ -4,12 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**Category** | [**Category**](Category.md) | | [optional] +**Id** | **long** | | [optional] **Name** | **string** | | **PhotoUrls** | **List<string>** | | -**Id** | **long** | | [optional] -**Category** | [**Category**](Category.md) | | [optional] -**Tags** | [**List<Tag>**](Tag.md) | | [optional] **Status** | **string** | pet status in the store | [optional] +**Tags** | [**List<Tag>**](Tag.md) | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/SpecialModelName.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/SpecialModelName.md index 662fa6f4a3..b48f349000 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/SpecialModelName.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/SpecialModelName.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**SpecialPropertyName** | **long** | | [optional] **SpecialModelNameProperty** | **string** | | [optional] +**SpecialPropertyName** | **long** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/User.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/User.md index a0f0d22389..455f031674 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/User.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/models/User.md @@ -4,18 +4,18 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **long** | | [optional] -**Username** | **string** | | [optional] -**FirstName** | **string** | | [optional] -**LastName** | **string** | | [optional] **Email** | **string** | | [optional] +**FirstName** | **string** | | [optional] +**Id** | **long** | | [optional] +**LastName** | **string** | | [optional] +**ObjectWithNoDeclaredProps** | **Object** | test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. | [optional] **Password** | **string** | | [optional] **Phone** | **string** | | [optional] **UserStatus** | **int** | User Status | [optional] -**ObjectWithNoDeclaredProps** | **Object** | test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. | [optional] -**ObjectWithNoDeclaredPropsNullable** | **Object** | test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. | [optional] +**Username** | **string** | | [optional] **AnyTypeProp** | **Object** | test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389 | [optional] **AnyTypePropNullable** | **Object** | test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values. | [optional] +**ObjectWithNoDeclaredPropsNullable** | **Object** | test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Api/AnotherFakeApiTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Api/AnotherFakeApiTests.cs index fea7e39428..30f54c0aab 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Api/AnotherFakeApiTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Api/AnotherFakeApiTests.cs @@ -12,7 +12,7 @@ using System.Collections.Generic; using System.Threading.Tasks; using Xunit; using Microsoft.Extensions.DependencyInjection; -using Org.OpenAPITools.Api; +using Org.OpenAPITools.IApi; using Org.OpenAPITools.Model; @@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api /// public sealed class AnotherFakeApiTests : ApiTestsBase { - private readonly IAnotherFakeApi _instance; + private readonly IApi.IAnotherFakeApi _instance; public AnotherFakeApiTests(): base(Array.Empty()) { - _instance = _host.Services.GetRequiredService(); + _instance = _host.Services.GetRequiredService(); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Api/ApiTestsBase.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Api/ApiTestsBase.cs index 88d6fc1f48..75e37de241 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Api/ApiTestsBase.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Api/ApiTestsBase.cs @@ -12,6 +12,7 @@ using System.Collections.Generic; using System.Security.Cryptography; using Microsoft.Extensions.Hosting; using Org.OpenAPITools.Client; +using Org.OpenAPITools.Extensions; /* ********************************************************************************* @@ -49,7 +50,7 @@ namespace Org.OpenAPITools.Test.Api } public static IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args) - .ConfigureApi((context, options) => + .ConfigureApi((context, services, options) => { ApiKeyToken apiKeyToken = new ApiKeyToken(context.Configuration[""], timeout: TimeSpan.FromSeconds(1)); options.AddTokens(apiKeyToken); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Api/DefaultApiTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Api/DefaultApiTests.cs index 16f60704f2..d79076dcd6 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Api/DefaultApiTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Api/DefaultApiTests.cs @@ -12,7 +12,7 @@ using System.Collections.Generic; using System.Threading.Tasks; using Xunit; using Microsoft.Extensions.DependencyInjection; -using Org.OpenAPITools.Api; +using Org.OpenAPITools.IApi; using Org.OpenAPITools.Model; @@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api /// public sealed class DefaultApiTests : ApiTestsBase { - private readonly IDefaultApi _instance; + private readonly IApi.IDefaultApi _instance; public DefaultApiTests(): base(Array.Empty()) { - _instance = _host.Services.GetRequiredService(); + _instance = _host.Services.GetRequiredService(); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Api/DependencyInjectionTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Api/DependencyInjectionTests.cs index 4eee3d2b6e..256df5697c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Api/DependencyInjectionTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Api/DependencyInjectionTests.cs @@ -13,7 +13,8 @@ using Microsoft.Extensions.DependencyInjection; using System.Collections.Generic; using System.Security.Cryptography; using Org.OpenAPITools.Client; -using Org.OpenAPITools.Api; +using Org.OpenAPITools.IApi; +using Org.OpenAPITools.Extensions; using Xunit; namespace Org.OpenAPITools.Test.Api @@ -24,7 +25,7 @@ namespace Org.OpenAPITools.Test.Api public class DependencyInjectionTest { private readonly IHost _hostUsingConfigureWithoutAClient = - Host.CreateDefaultBuilder(Array.Empty()).ConfigureApi((context, options) => + Host.CreateDefaultBuilder(Array.Empty()).ConfigureApi((context, services, options) => { ApiKeyToken apiKeyToken = new ApiKeyToken($"", timeout: TimeSpan.FromSeconds(1)); options.AddTokens(apiKeyToken); @@ -45,7 +46,7 @@ namespace Org.OpenAPITools.Test.Api .Build(); private readonly IHost _hostUsingConfigureWithAClient = - Host.CreateDefaultBuilder(Array.Empty()).ConfigureApi((context, options) => + Host.CreateDefaultBuilder(Array.Empty()).ConfigureApi((context, services, options) => { ApiKeyToken apiKeyToken = new ApiKeyToken($"", timeout: TimeSpan.FromSeconds(1)); options.AddTokens(apiKeyToken); @@ -121,25 +122,25 @@ namespace Org.OpenAPITools.Test.Api [Fact] public void ConfigureApiWithAClientTest() { - var anotherFakeApi = _hostUsingConfigureWithAClient.Services.GetRequiredService(); + var anotherFakeApi = _hostUsingConfigureWithAClient.Services.GetRequiredService(); Assert.True(anotherFakeApi.HttpClient.BaseAddress != null); - var defaultApi = _hostUsingConfigureWithAClient.Services.GetRequiredService(); + var defaultApi = _hostUsingConfigureWithAClient.Services.GetRequiredService(); Assert.True(defaultApi.HttpClient.BaseAddress != null); - var fakeApi = _hostUsingConfigureWithAClient.Services.GetRequiredService(); + var fakeApi = _hostUsingConfigureWithAClient.Services.GetRequiredService(); Assert.True(fakeApi.HttpClient.BaseAddress != null); - var fakeClassnameTags123Api = _hostUsingConfigureWithAClient.Services.GetRequiredService(); + var fakeClassnameTags123Api = _hostUsingConfigureWithAClient.Services.GetRequiredService(); Assert.True(fakeClassnameTags123Api.HttpClient.BaseAddress != null); - var petApi = _hostUsingConfigureWithAClient.Services.GetRequiredService(); + var petApi = _hostUsingConfigureWithAClient.Services.GetRequiredService(); Assert.True(petApi.HttpClient.BaseAddress != null); - var storeApi = _hostUsingConfigureWithAClient.Services.GetRequiredService(); + var storeApi = _hostUsingConfigureWithAClient.Services.GetRequiredService(); Assert.True(storeApi.HttpClient.BaseAddress != null); - var userApi = _hostUsingConfigureWithAClient.Services.GetRequiredService(); + var userApi = _hostUsingConfigureWithAClient.Services.GetRequiredService(); Assert.True(userApi.HttpClient.BaseAddress != null); } @@ -149,25 +150,25 @@ namespace Org.OpenAPITools.Test.Api [Fact] public void ConfigureApiWithoutAClientTest() { - var anotherFakeApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService(); + var anotherFakeApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService(); Assert.True(anotherFakeApi.HttpClient.BaseAddress != null); - var defaultApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService(); + var defaultApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService(); Assert.True(defaultApi.HttpClient.BaseAddress != null); - var fakeApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService(); + var fakeApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService(); Assert.True(fakeApi.HttpClient.BaseAddress != null); - var fakeClassnameTags123Api = _hostUsingConfigureWithoutAClient.Services.GetRequiredService(); + var fakeClassnameTags123Api = _hostUsingConfigureWithoutAClient.Services.GetRequiredService(); Assert.True(fakeClassnameTags123Api.HttpClient.BaseAddress != null); - var petApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService(); + var petApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService(); Assert.True(petApi.HttpClient.BaseAddress != null); - var storeApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService(); + var storeApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService(); Assert.True(storeApi.HttpClient.BaseAddress != null); - var userApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService(); + var userApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService(); Assert.True(userApi.HttpClient.BaseAddress != null); } @@ -177,25 +178,25 @@ namespace Org.OpenAPITools.Test.Api [Fact] public void AddApiWithAClientTest() { - var anotherFakeApi = _hostUsingAddWithAClient.Services.GetRequiredService(); + var anotherFakeApi = _hostUsingAddWithAClient.Services.GetRequiredService(); Assert.True(anotherFakeApi.HttpClient.BaseAddress != null); - var defaultApi = _hostUsingAddWithAClient.Services.GetRequiredService(); + var defaultApi = _hostUsingAddWithAClient.Services.GetRequiredService(); Assert.True(defaultApi.HttpClient.BaseAddress != null); - var fakeApi = _hostUsingAddWithAClient.Services.GetRequiredService(); + var fakeApi = _hostUsingAddWithAClient.Services.GetRequiredService(); Assert.True(fakeApi.HttpClient.BaseAddress != null); - var fakeClassnameTags123Api = _hostUsingAddWithAClient.Services.GetRequiredService(); + var fakeClassnameTags123Api = _hostUsingAddWithAClient.Services.GetRequiredService(); Assert.True(fakeClassnameTags123Api.HttpClient.BaseAddress != null); - var petApi = _hostUsingAddWithAClient.Services.GetRequiredService(); + var petApi = _hostUsingAddWithAClient.Services.GetRequiredService(); Assert.True(petApi.HttpClient.BaseAddress != null); - var storeApi = _hostUsingAddWithAClient.Services.GetRequiredService(); + var storeApi = _hostUsingAddWithAClient.Services.GetRequiredService(); Assert.True(storeApi.HttpClient.BaseAddress != null); - var userApi = _hostUsingAddWithAClient.Services.GetRequiredService(); + var userApi = _hostUsingAddWithAClient.Services.GetRequiredService(); Assert.True(userApi.HttpClient.BaseAddress != null); } @@ -205,25 +206,25 @@ namespace Org.OpenAPITools.Test.Api [Fact] public void AddApiWithoutAClientTest() { - var anotherFakeApi = _hostUsingAddWithoutAClient.Services.GetRequiredService(); + var anotherFakeApi = _hostUsingAddWithoutAClient.Services.GetRequiredService(); Assert.True(anotherFakeApi.HttpClient.BaseAddress != null); - var defaultApi = _hostUsingAddWithoutAClient.Services.GetRequiredService(); + var defaultApi = _hostUsingAddWithoutAClient.Services.GetRequiredService(); Assert.True(defaultApi.HttpClient.BaseAddress != null); - var fakeApi = _hostUsingAddWithoutAClient.Services.GetRequiredService(); + var fakeApi = _hostUsingAddWithoutAClient.Services.GetRequiredService(); Assert.True(fakeApi.HttpClient.BaseAddress != null); - var fakeClassnameTags123Api = _hostUsingAddWithoutAClient.Services.GetRequiredService(); + var fakeClassnameTags123Api = _hostUsingAddWithoutAClient.Services.GetRequiredService(); Assert.True(fakeClassnameTags123Api.HttpClient.BaseAddress != null); - var petApi = _hostUsingAddWithoutAClient.Services.GetRequiredService(); + var petApi = _hostUsingAddWithoutAClient.Services.GetRequiredService(); Assert.True(petApi.HttpClient.BaseAddress != null); - var storeApi = _hostUsingAddWithoutAClient.Services.GetRequiredService(); + var storeApi = _hostUsingAddWithoutAClient.Services.GetRequiredService(); Assert.True(storeApi.HttpClient.BaseAddress != null); - var userApi = _hostUsingAddWithoutAClient.Services.GetRequiredService(); + var userApi = _hostUsingAddWithoutAClient.Services.GetRequiredService(); Assert.True(userApi.HttpClient.BaseAddress != null); } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs index b20faebe9c..84ff71fb14 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs @@ -12,7 +12,7 @@ using System.Collections.Generic; using System.Threading.Tasks; using Xunit; using Microsoft.Extensions.DependencyInjection; -using Org.OpenAPITools.Api; +using Org.OpenAPITools.IApi; using Org.OpenAPITools.Model; @@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api /// public sealed class FakeApiTests : ApiTestsBase { - private readonly IFakeApi _instance; + private readonly IApi.IFakeApi _instance; public FakeApiTests(): base(Array.Empty()) { - _instance = _host.Services.GetRequiredService(); + _instance = _host.Services.GetRequiredService(); } @@ -131,9 +131,9 @@ namespace Org.OpenAPITools.Test.Api [Fact (Skip = "not implemented")] public async Task TestBodyWithQueryParamsAsyncTest() { - string query = default; User user = default; - await _instance.TestBodyWithQueryParamsAsync(query, user); + string query = default; + await _instance.TestBodyWithQueryParamsAsync(user, query); } /// @@ -153,21 +153,21 @@ namespace Org.OpenAPITools.Test.Api [Fact (Skip = "not implemented")] public async Task TestEndpointParametersAsyncTest() { + byte[] _byte = default; decimal number = default; double _double = default; string patternWithoutDelimiter = default; - byte[] _byte = default; + DateTime? date = default; + System.IO.Stream? binary = default; + float? _float = default; int? integer = default; int? int32 = default; long? int64 = default; - float? _float = default; string? _string = default; - System.IO.Stream? binary = default; - DateTime? date = default; string? password = default; string? callback = default; DateTime? dateTime = default; - await _instance.TestEndpointParametersAsync(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, password, callback, dateTime); + await _instance.TestEndpointParametersAsync(_byte, number, _double, patternWithoutDelimiter, date, binary, _float, integer, int32, int64, _string, password, callback, dateTime); } /// @@ -178,13 +178,13 @@ namespace Org.OpenAPITools.Test.Api { List? enumHeaderStringArray = default; List? enumQueryStringArray = default; - int? enumQueryInteger = default; double? enumQueryDouble = default; + int? enumQueryInteger = default; + List? enumFormStringArray = default; string? enumHeaderString = default; string? enumQueryString = default; - List? enumFormStringArray = default; string? enumFormString = default; - await _instance.TestEnumParametersAsync(enumHeaderStringArray, enumQueryStringArray, enumQueryInteger, enumQueryDouble, enumHeaderString, enumQueryString, enumFormStringArray, enumFormString); + await _instance.TestEnumParametersAsync(enumHeaderStringArray, enumQueryStringArray, enumQueryDouble, enumQueryInteger, enumFormStringArray, enumHeaderString, enumQueryString, enumFormString); } /// @@ -193,13 +193,13 @@ namespace Org.OpenAPITools.Test.Api [Fact (Skip = "not implemented")] public async Task TestGroupParametersAsyncTest() { - int requiredStringGroup = default; bool requiredBooleanGroup = default; + int requiredStringGroup = default; long requiredInt64Group = default; - int? stringGroup = default; bool? booleanGroup = default; + int? stringGroup = default; long? int64Group = default; - await _instance.TestGroupParametersAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + await _instance.TestGroupParametersAsync(requiredBooleanGroup, requiredStringGroup, requiredInt64Group, booleanGroup, stringGroup, int64Group); } /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Api/FakeClassnameTags123ApiTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Api/FakeClassnameTags123ApiTests.cs index 0e8d44fe98..5a34bf585f 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Api/FakeClassnameTags123ApiTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Api/FakeClassnameTags123ApiTests.cs @@ -12,7 +12,7 @@ using System.Collections.Generic; using System.Threading.Tasks; using Xunit; using Microsoft.Extensions.DependencyInjection; -using Org.OpenAPITools.Api; +using Org.OpenAPITools.IApi; using Org.OpenAPITools.Model; @@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api /// public sealed class FakeClassnameTags123ApiTests : ApiTestsBase { - private readonly IFakeClassnameTags123Api _instance; + private readonly IApi.IFakeClassnameTags123Api _instance; public FakeClassnameTags123ApiTests(): base(Array.Empty()) { - _instance = _host.Services.GetRequiredService(); + _instance = _host.Services.GetRequiredService(); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Api/PetApiTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Api/PetApiTests.cs index 30734616d1..d539cb5396 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Api/PetApiTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Api/PetApiTests.cs @@ -12,7 +12,7 @@ using System.Collections.Generic; using System.Threading.Tasks; using Xunit; using Microsoft.Extensions.DependencyInjection; -using Org.OpenAPITools.Api; +using Org.OpenAPITools.IApi; using Org.OpenAPITools.Model; @@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api /// public sealed class PetApiTests : ApiTestsBase { - private readonly IPetApi _instance; + private readonly IApi.IPetApi _instance; public PetApiTests(): base(Array.Empty()) { - _instance = _host.Services.GetRequiredService(); + _instance = _host.Services.GetRequiredService(); } @@ -134,9 +134,9 @@ namespace Org.OpenAPITools.Test.Api public async Task UploadFileAsyncTest() { long petId = default; - string? additionalMetadata = default; System.IO.Stream? file = default; - var response = await _instance.UploadFileAsync(petId, additionalMetadata, file); + string? additionalMetadata = default; + var response = await _instance.UploadFileAsync(petId, file, additionalMetadata); Assert.IsType(response); } @@ -146,10 +146,10 @@ namespace Org.OpenAPITools.Test.Api [Fact (Skip = "not implemented")] public async Task UploadFileWithRequiredFileAsyncTest() { - long petId = default; System.IO.Stream requiredFile = default; + long petId = default; string? additionalMetadata = default; - var response = await _instance.UploadFileWithRequiredFileAsync(petId, requiredFile, additionalMetadata); + var response = await _instance.UploadFileWithRequiredFileAsync(requiredFile, petId, additionalMetadata); Assert.IsType(response); } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Api/StoreApiTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Api/StoreApiTests.cs index 98748893e3..679d648838 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Api/StoreApiTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Api/StoreApiTests.cs @@ -12,7 +12,7 @@ using System.Collections.Generic; using System.Threading.Tasks; using Xunit; using Microsoft.Extensions.DependencyInjection; -using Org.OpenAPITools.Api; +using Org.OpenAPITools.IApi; using Org.OpenAPITools.Model; @@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api /// public sealed class StoreApiTests : ApiTestsBase { - private readonly IStoreApi _instance; + private readonly IApi.IStoreApi _instance; public StoreApiTests(): base(Array.Empty()) { - _instance = _host.Services.GetRequiredService(); + _instance = _host.Services.GetRequiredService(); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Api/UserApiTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Api/UserApiTests.cs index 0df256733a..b8006066fa 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Api/UserApiTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Api/UserApiTests.cs @@ -12,7 +12,7 @@ using System.Collections.Generic; using System.Threading.Tasks; using Xunit; using Microsoft.Extensions.DependencyInjection; -using Org.OpenAPITools.Api; +using Org.OpenAPITools.IApi; using Org.OpenAPITools.Model; @@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api /// public sealed class UserApiTests : ApiTestsBase { - private readonly IUserApi _instance; + private readonly IApi.IUserApi _instance; public UserApiTests(): base(Array.Empty()) { - _instance = _host.Services.GetRequiredService(); + _instance = _host.Services.GetRequiredService(); } @@ -129,9 +129,9 @@ namespace Org.OpenAPITools.Test.Api [Fact (Skip = "not implemented")] public async Task UpdateUserAsyncTest() { - string username = default; User user = default; - await _instance.UpdateUserAsync(username, user); + string username = default; + await _instance.UpdateUserAsync(user, username); } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ActivityOutputElementRepresentationTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ActivityOutputElementRepresentationTests.cs index f211a64884..174a7e333a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ActivityOutputElementRepresentationTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ActivityOutputElementRepresentationTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ActivityTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ActivityTests.cs index afe9e846ee..c7479a3c34 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ActivityTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ActivityTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesClassTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesClassTests.cs index 9ab029ed09..95bd159350 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesClassTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesClassTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -57,12 +56,12 @@ namespace Org.OpenAPITools.Test.Model /// - /// Test the property 'MapProperty' + /// Test the property 'EmptyMap' /// [Fact] - public void MapPropertyTest() + public void EmptyMapTest() { - // TODO unit test for the property 'MapProperty' + // TODO unit test for the property 'EmptyMap' } /// /// Test the property 'MapOfMapProperty' @@ -73,12 +72,12 @@ namespace Org.OpenAPITools.Test.Model // TODO unit test for the property 'MapOfMapProperty' } /// - /// Test the property 'Anytype1' + /// Test the property 'MapProperty' /// [Fact] - public void Anytype1Test() + public void MapPropertyTest() { - // TODO unit test for the property 'Anytype1' + // TODO unit test for the property 'MapProperty' } /// /// Test the property 'MapWithUndeclaredPropertiesAnytype1' @@ -105,14 +104,6 @@ namespace Org.OpenAPITools.Test.Model // TODO unit test for the property 'MapWithUndeclaredPropertiesAnytype3' } /// - /// Test the property 'EmptyMap' - /// - [Fact] - public void EmptyMapTest() - { - // TODO unit test for the property 'EmptyMap' - } - /// /// Test the property 'MapWithUndeclaredPropertiesString' /// [Fact] @@ -120,6 +111,14 @@ namespace Org.OpenAPITools.Test.Model { // TODO unit test for the property 'MapWithUndeclaredPropertiesString' } + /// + /// Test the property 'Anytype1' + /// + [Fact] + public void Anytype1Test() + { + // TODO unit test for the property 'Anytype1' + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/AnimalTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/AnimalTests.cs index ced34a4faa..8c38ac47af 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/AnimalTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/AnimalTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ApiResponseTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ApiResponseTests.cs index 2a2e098e60..a2a9a2d49d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ApiResponseTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ApiResponseTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -65,14 +64,6 @@ namespace Org.OpenAPITools.Test.Model // TODO unit test for the property 'Code' } /// - /// Test the property 'Type' - /// - [Fact] - public void TypeTest() - { - // TODO unit test for the property 'Type' - } - /// /// Test the property 'Message' /// [Fact] @@ -80,6 +71,14 @@ namespace Org.OpenAPITools.Test.Model { // TODO unit test for the property 'Message' } + /// + /// Test the property 'Type' + /// + [Fact] + public void TypeTest() + { + // TODO unit test for the property 'Type' + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/AppleReqTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/AppleReqTests.cs index f945f65936..0610780d65 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/AppleReqTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/AppleReqTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/AppleTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/AppleTests.cs index 468d60184a..e0bd59e773 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/AppleTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/AppleTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ArrayOfArrayOfNumberOnlyTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ArrayOfArrayOfNumberOnlyTests.cs index 0b259d7d39..8f046a0bf6 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ArrayOfArrayOfNumberOnlyTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ArrayOfArrayOfNumberOnlyTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ArrayOfNumberOnlyTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ArrayOfNumberOnlyTests.cs index 27f312ad25..53b2fe30fd 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ArrayOfNumberOnlyTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ArrayOfNumberOnlyTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ArrayTestTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ArrayTestTests.cs index a433e8c87c..df87ba3aaa 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ArrayTestTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ArrayTestTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -56,14 +55,6 @@ namespace Org.OpenAPITools.Test.Model } - /// - /// Test the property 'ArrayOfString' - /// - [Fact] - public void ArrayOfStringTest() - { - // TODO unit test for the property 'ArrayOfString' - } /// /// Test the property 'ArrayArrayOfInteger' /// @@ -80,6 +71,14 @@ namespace Org.OpenAPITools.Test.Model { // TODO unit test for the property 'ArrayArrayOfModel' } + /// + /// Test the property 'ArrayOfString' + /// + [Fact] + public void ArrayOfStringTest() + { + // TODO unit test for the property 'ArrayOfString' + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/BananaReqTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/BananaReqTests.cs index 8a6eeb82ee..6f31ba2029 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/BananaReqTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/BananaReqTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/BananaTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/BananaTests.cs index 8d8cc376b0..6cb6c62ffd 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/BananaTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/BananaTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/BasquePigTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/BasquePigTests.cs index 3cdccaa759..9798a17577 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/BasquePigTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/BasquePigTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/CapitalizationTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/CapitalizationTests.cs index 185c83666f..b84c7c85a7 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/CapitalizationTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/CapitalizationTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -57,12 +56,12 @@ namespace Org.OpenAPITools.Test.Model /// - /// Test the property 'SmallCamel' + /// Test the property 'ATT_NAME' /// [Fact] - public void SmallCamelTest() + public void ATT_NAMETest() { - // TODO unit test for the property 'SmallCamel' + // TODO unit test for the property 'ATT_NAME' } /// /// Test the property 'CapitalCamel' @@ -73,14 +72,6 @@ namespace Org.OpenAPITools.Test.Model // TODO unit test for the property 'CapitalCamel' } /// - /// Test the property 'SmallSnake' - /// - [Fact] - public void SmallSnakeTest() - { - // TODO unit test for the property 'SmallSnake' - } - /// /// Test the property 'CapitalSnake' /// [Fact] @@ -97,12 +88,20 @@ namespace Org.OpenAPITools.Test.Model // TODO unit test for the property 'SCAETHFlowPoints' } /// - /// Test the property 'ATT_NAME' + /// Test the property 'SmallCamel' /// [Fact] - public void ATT_NAMETest() + public void SmallCamelTest() { - // TODO unit test for the property 'ATT_NAME' + // TODO unit test for the property 'SmallCamel' + } + /// + /// Test the property 'SmallSnake' + /// + [Fact] + public void SmallSnakeTest() + { + // TODO unit test for the property 'SmallSnake' } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/CatAllOfTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/CatAllOfTests.cs index fb51c28489..3498bb0c15 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/CatAllOfTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/CatAllOfTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/CatTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/CatTests.cs index 9c3c48ffef..402a476d07 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/CatTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/CatTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/CategoryTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/CategoryTests.cs index 621877aa97..822f8241fa 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/CategoryTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/CategoryTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -56,14 +55,6 @@ namespace Org.OpenAPITools.Test.Model } - /// - /// Test the property 'Name' - /// - [Fact] - public void NameTest() - { - // TODO unit test for the property 'Name' - } /// /// Test the property 'Id' /// @@ -72,6 +63,14 @@ namespace Org.OpenAPITools.Test.Model { // TODO unit test for the property 'Id' } + /// + /// Test the property 'Name' + /// + [Fact] + public void NameTest() + { + // TODO unit test for the property 'Name' + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ChildCatAllOfTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ChildCatAllOfTests.cs index 49a5393249..d4de4c4741 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ChildCatAllOfTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ChildCatAllOfTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ChildCatTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ChildCatTests.cs index 0fe3ebfa06..f1b0aa1005 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ChildCatTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ChildCatTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ClassModelTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ClassModelTests.cs index d29472e83a..2e6c120d8f 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ClassModelTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ClassModelTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -57,12 +56,12 @@ namespace Org.OpenAPITools.Test.Model /// - /// Test the property 'Class' + /// Test the property 'ClassProperty' /// [Fact] - public void ClassTest() + public void ClassPropertyTest() { - // TODO unit test for the property 'Class' + // TODO unit test for the property 'ClassProperty' } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ComplexQuadrilateralTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ComplexQuadrilateralTests.cs index 6c50fe7aab..3f2f96e73a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ComplexQuadrilateralTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ComplexQuadrilateralTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/DanishPigTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/DanishPigTests.cs index 572d9bffa7..087d38674b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/DanishPigTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/DanishPigTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/DeprecatedObjectTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/DeprecatedObjectTests.cs index 1da5f4011c..85ecbfdda5 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/DeprecatedObjectTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/DeprecatedObjectTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/DogAllOfTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/DogAllOfTests.cs index b22a444209..1e86d76150 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/DogAllOfTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/DogAllOfTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/DogTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/DogTests.cs index bf906f01bc..ef2eabfca3 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/DogTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/DogTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/DrawingTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/DrawingTests.cs index 0709ad9eeb..c38867cb5a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/DrawingTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/DrawingTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -73,14 +72,6 @@ namespace Org.OpenAPITools.Test.Model // TODO unit test for the property 'ShapeOrNull' } /// - /// Test the property 'NullableShape' - /// - [Fact] - public void NullableShapeTest() - { - // TODO unit test for the property 'NullableShape' - } - /// /// Test the property 'Shapes' /// [Fact] @@ -88,6 +79,14 @@ namespace Org.OpenAPITools.Test.Model { // TODO unit test for the property 'Shapes' } + /// + /// Test the property 'NullableShape' + /// + [Fact] + public void NullableShapeTest() + { + // TODO unit test for the property 'NullableShape' + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/EnumArraysTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/EnumArraysTests.cs index 5779ca2947..ee3d000f32 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/EnumArraysTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/EnumArraysTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -56,14 +55,6 @@ namespace Org.OpenAPITools.Test.Model } - /// - /// Test the property 'JustSymbol' - /// - [Fact] - public void JustSymbolTest() - { - // TODO unit test for the property 'JustSymbol' - } /// /// Test the property 'ArrayEnum' /// @@ -72,6 +63,14 @@ namespace Org.OpenAPITools.Test.Model { // TODO unit test for the property 'ArrayEnum' } + /// + /// Test the property 'JustSymbol' + /// + [Fact] + public void JustSymbolTest() + { + // TODO unit test for the property 'JustSymbol' + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/EnumClassTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/EnumClassTests.cs index a17738c5cb..e2fc2d0228 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/EnumClassTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/EnumClassTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/EnumTestTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/EnumTestTests.cs index a22c39ca84..60e3aca92b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/EnumTestTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/EnumTestTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -56,22 +55,6 @@ namespace Org.OpenAPITools.Test.Model } - /// - /// Test the property 'EnumStringRequired' - /// - [Fact] - public void EnumStringRequiredTest() - { - // TODO unit test for the property 'EnumStringRequired' - } - /// - /// Test the property 'EnumString' - /// - [Fact] - public void EnumStringTest() - { - // TODO unit test for the property 'EnumString' - } /// /// Test the property 'EnumInteger' /// @@ -97,20 +80,20 @@ namespace Org.OpenAPITools.Test.Model // TODO unit test for the property 'EnumNumber' } /// - /// Test the property 'OuterEnum' + /// Test the property 'EnumString' /// [Fact] - public void OuterEnumTest() + public void EnumStringTest() { - // TODO unit test for the property 'OuterEnum' + // TODO unit test for the property 'EnumString' } /// - /// Test the property 'OuterEnumInteger' + /// Test the property 'EnumStringRequired' /// [Fact] - public void OuterEnumIntegerTest() + public void EnumStringRequiredTest() { - // TODO unit test for the property 'OuterEnumInteger' + // TODO unit test for the property 'EnumStringRequired' } /// /// Test the property 'OuterEnumDefaultValue' @@ -121,6 +104,14 @@ namespace Org.OpenAPITools.Test.Model // TODO unit test for the property 'OuterEnumDefaultValue' } /// + /// Test the property 'OuterEnumInteger' + /// + [Fact] + public void OuterEnumIntegerTest() + { + // TODO unit test for the property 'OuterEnumInteger' + } + /// /// Test the property 'OuterEnumIntegerDefaultValue' /// [Fact] @@ -128,6 +119,14 @@ namespace Org.OpenAPITools.Test.Model { // TODO unit test for the property 'OuterEnumIntegerDefaultValue' } + /// + /// Test the property 'OuterEnum' + /// + [Fact] + public void OuterEnumTest() + { + // TODO unit test for the property 'OuterEnum' + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/EquilateralTriangleTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/EquilateralTriangleTests.cs index 9ca755c4b0..9ab78a5977 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/EquilateralTriangleTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/EquilateralTriangleTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/FileSchemaTestClassTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/FileSchemaTestClassTests.cs index 9f45b4fe89..9836a779bf 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/FileSchemaTestClassTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/FileSchemaTestClassTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/FileTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/FileTests.cs index 761bb72a84..4f0e7079bc 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/FileTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/FileTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/FooGetDefaultResponseTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/FooGetDefaultResponseTests.cs index 0154d52841..b7313941a6 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/FooGetDefaultResponseTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/FooGetDefaultResponseTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -57,12 +56,12 @@ namespace Org.OpenAPITools.Test.Model /// - /// Test the property 'String' + /// Test the property 'StringProperty' /// [Fact] - public void StringTest() + public void StringPropertyTest() { - // TODO unit test for the property 'String' + // TODO unit test for the property 'StringProperty' } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/FooTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/FooTests.cs index 0b6ed52edb..c0bdf85f9b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/FooTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/FooTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs index 707847bbcd..d3a978bdc4 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -57,20 +56,20 @@ namespace Org.OpenAPITools.Test.Model /// - /// Test the property 'Number' + /// Test the property 'Binary' /// [Fact] - public void NumberTest() + public void BinaryTest() { - // TODO unit test for the property 'Number' + // TODO unit test for the property 'Binary' } /// - /// Test the property 'Byte' + /// Test the property 'ByteProperty' /// [Fact] - public void ByteTest() + public void BytePropertyTest() { - // TODO unit test for the property 'Byte' + // TODO unit test for the property 'ByteProperty' } /// /// Test the property 'Date' @@ -81,20 +80,36 @@ namespace Org.OpenAPITools.Test.Model // TODO unit test for the property 'Date' } /// - /// Test the property 'Password' + /// Test the property 'DateTime' /// [Fact] - public void PasswordTest() + public void DateTimeTest() { - // TODO unit test for the property 'Password' + // TODO unit test for the property 'DateTime' } /// - /// Test the property 'Integer' + /// Test the property 'DecimalProperty' /// [Fact] - public void IntegerTest() + public void DecimalPropertyTest() { - // TODO unit test for the property 'Integer' + // TODO unit test for the property 'DecimalProperty' + } + /// + /// Test the property 'DoubleProperty' + /// + [Fact] + public void DoublePropertyTest() + { + // TODO unit test for the property 'DoubleProperty' + } + /// + /// Test the property 'FloatProperty' + /// + [Fact] + public void FloatPropertyTest() + { + // TODO unit test for the property 'FloatProperty' } /// /// Test the property 'Int32' @@ -113,60 +128,28 @@ namespace Org.OpenAPITools.Test.Model // TODO unit test for the property 'Int64' } /// - /// Test the property 'Float' + /// Test the property 'Integer' /// [Fact] - public void FloatTest() + public void IntegerTest() { - // TODO unit test for the property 'Float' + // TODO unit test for the property 'Integer' } /// - /// Test the property 'Double' + /// Test the property 'Number' /// [Fact] - public void DoubleTest() + public void NumberTest() { - // TODO unit test for the property 'Double' + // TODO unit test for the property 'Number' } /// - /// Test the property 'Decimal' + /// Test the property 'Password' /// [Fact] - public void DecimalTest() + public void PasswordTest() { - // TODO unit test for the property 'Decimal' - } - /// - /// Test the property 'String' - /// - [Fact] - public void StringTest() - { - // TODO unit test for the property 'String' - } - /// - /// Test the property 'Binary' - /// - [Fact] - public void BinaryTest() - { - // TODO unit test for the property 'Binary' - } - /// - /// Test the property 'DateTime' - /// - [Fact] - public void DateTimeTest() - { - // TODO unit test for the property 'DateTime' - } - /// - /// Test the property 'Uuid' - /// - [Fact] - public void UuidTest() - { - // TODO unit test for the property 'Uuid' + // TODO unit test for the property 'Password' } /// /// Test the property 'PatternWithDigits' @@ -184,6 +167,22 @@ namespace Org.OpenAPITools.Test.Model { // TODO unit test for the property 'PatternWithDigitsAndDelimiter' } + /// + /// Test the property 'StringProperty' + /// + [Fact] + public void StringPropertyTest() + { + // TODO unit test for the property 'StringProperty' + } + /// + /// Test the property 'Uuid' + /// + [Fact] + public void UuidTest() + { + // TODO unit test for the property 'Uuid' + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/FruitReqTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/FruitReqTests.cs index 3a0b55b93e..3ef884e59c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/FruitReqTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/FruitReqTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/FruitTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/FruitTests.cs index ddc424d56e..9ab6b7f278 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/FruitTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/FruitTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/GmFruitTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/GmFruitTests.cs index cbd35f9173..036c5641cf 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/GmFruitTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/GmFruitTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/GrandparentAnimalTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/GrandparentAnimalTests.cs index faa4930944..182cf7350b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/GrandparentAnimalTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/GrandparentAnimalTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/HasOnlyReadOnlyTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/HasOnlyReadOnlyTests.cs index 651a9f0ce3..d9a07efcf9 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/HasOnlyReadOnlyTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/HasOnlyReadOnlyTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/HealthCheckResultTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/HealthCheckResultTests.cs index 857190a333..d29edf5dd1 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/HealthCheckResultTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/HealthCheckResultTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/IsoscelesTriangleTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/IsoscelesTriangleTests.cs index 8e0dae9342..2fed6f0b4c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/IsoscelesTriangleTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/IsoscelesTriangleTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ListTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ListTests.cs index 2ed828d052..398a464492 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ListTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ListTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/MammalTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/MammalTests.cs index 6477ab950f..0889d80a70 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/MammalTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/MammalTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/MapTestTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/MapTestTests.cs index 20036e1c90..0dc95aa6b2 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/MapTestTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/MapTestTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -56,22 +55,6 @@ namespace Org.OpenAPITools.Test.Model } - /// - /// Test the property 'MapMapOfString' - /// - [Fact] - public void MapMapOfStringTest() - { - // TODO unit test for the property 'MapMapOfString' - } - /// - /// Test the property 'MapOfEnumString' - /// - [Fact] - public void MapOfEnumStringTest() - { - // TODO unit test for the property 'MapOfEnumString' - } /// /// Test the property 'DirectMap' /// @@ -88,6 +71,22 @@ namespace Org.OpenAPITools.Test.Model { // TODO unit test for the property 'IndirectMap' } + /// + /// Test the property 'MapMapOfString' + /// + [Fact] + public void MapMapOfStringTest() + { + // TODO unit test for the property 'MapMapOfString' + } + /// + /// Test the property 'MapOfEnumString' + /// + [Fact] + public void MapOfEnumStringTest() + { + // TODO unit test for the property 'MapOfEnumString' + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/MixedPropertiesAndAdditionalPropertiesClassTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/MixedPropertiesAndAdditionalPropertiesClassTests.cs index f56cd715f4..d94f882e0a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/MixedPropertiesAndAdditionalPropertiesClassTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/MixedPropertiesAndAdditionalPropertiesClassTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -56,14 +55,6 @@ namespace Org.OpenAPITools.Test.Model } - /// - /// Test the property 'Uuid' - /// - [Fact] - public void UuidTest() - { - // TODO unit test for the property 'Uuid' - } /// /// Test the property 'DateTime' /// @@ -80,6 +71,14 @@ namespace Org.OpenAPITools.Test.Model { // TODO unit test for the property 'Map' } + /// + /// Test the property 'Uuid' + /// + [Fact] + public void UuidTest() + { + // TODO unit test for the property 'Uuid' + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/Model200ResponseTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/Model200ResponseTests.cs index e25478618f..31f2a75431 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/Model200ResponseTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/Model200ResponseTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -56,6 +55,14 @@ namespace Org.OpenAPITools.Test.Model } + /// + /// Test the property 'ClassProperty' + /// + [Fact] + public void ClassPropertyTest() + { + // TODO unit test for the property 'ClassProperty' + } /// /// Test the property 'Name' /// @@ -64,14 +71,6 @@ namespace Org.OpenAPITools.Test.Model { // TODO unit test for the property 'Name' } - /// - /// Test the property 'Class' - /// - [Fact] - public void ClassTest() - { - // TODO unit test for the property 'Class' - } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ModelClientTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ModelClientTests.cs index 24a9e26315..40b3700ce9 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ModelClientTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ModelClientTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -57,12 +56,12 @@ namespace Org.OpenAPITools.Test.Model /// - /// Test the property '_Client' + /// Test the property '_ClientProperty' /// [Fact] - public void _ClientTest() + public void _ClientPropertyTest() { - // TODO unit test for the property '_Client' + // TODO unit test for the property '_ClientProperty' } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/NameTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/NameTests.cs index 61f8ad1137..523b3e050a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/NameTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/NameTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -65,14 +64,6 @@ namespace Org.OpenAPITools.Test.Model // TODO unit test for the property 'NameProperty' } /// - /// Test the property 'SnakeCase' - /// - [Fact] - public void SnakeCaseTest() - { - // TODO unit test for the property 'SnakeCase' - } - /// /// Test the property 'Property' /// [Fact] @@ -81,6 +72,14 @@ namespace Org.OpenAPITools.Test.Model // TODO unit test for the property 'Property' } /// + /// Test the property 'SnakeCase' + /// + [Fact] + public void SnakeCaseTest() + { + // TODO unit test for the property 'SnakeCase' + } + /// /// Test the property '_123Number' /// [Fact] diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/NullableClassTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/NullableClassTests.cs index 8f00505612..adf7c14f13 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/NullableClassTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/NullableClassTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -57,20 +56,36 @@ namespace Org.OpenAPITools.Test.Model /// - /// Test the property 'IntegerProp' + /// Test the property 'ArrayItemsNullable' /// [Fact] - public void IntegerPropTest() + public void ArrayItemsNullableTest() { - // TODO unit test for the property 'IntegerProp' + // TODO unit test for the property 'ArrayItemsNullable' } /// - /// Test the property 'NumberProp' + /// Test the property 'ObjectItemsNullable' /// [Fact] - public void NumberPropTest() + public void ObjectItemsNullableTest() { - // TODO unit test for the property 'NumberProp' + // TODO unit test for the property 'ObjectItemsNullable' + } + /// + /// Test the property 'ArrayAndItemsNullableProp' + /// + [Fact] + public void ArrayAndItemsNullablePropTest() + { + // TODO unit test for the property 'ArrayAndItemsNullableProp' + } + /// + /// Test the property 'ArrayNullableProp' + /// + [Fact] + public void ArrayNullablePropTest() + { + // TODO unit test for the property 'ArrayNullableProp' } /// /// Test the property 'BooleanProp' @@ -81,14 +96,6 @@ namespace Org.OpenAPITools.Test.Model // TODO unit test for the property 'BooleanProp' } /// - /// Test the property 'StringProp' - /// - [Fact] - public void StringPropTest() - { - // TODO unit test for the property 'StringProp' - } - /// /// Test the property 'DateProp' /// [Fact] @@ -105,36 +112,20 @@ namespace Org.OpenAPITools.Test.Model // TODO unit test for the property 'DatetimeProp' } /// - /// Test the property 'ArrayNullableProp' + /// Test the property 'IntegerProp' /// [Fact] - public void ArrayNullablePropTest() + public void IntegerPropTest() { - // TODO unit test for the property 'ArrayNullableProp' + // TODO unit test for the property 'IntegerProp' } /// - /// Test the property 'ArrayAndItemsNullableProp' + /// Test the property 'NumberProp' /// [Fact] - public void ArrayAndItemsNullablePropTest() + public void NumberPropTest() { - // TODO unit test for the property 'ArrayAndItemsNullableProp' - } - /// - /// Test the property 'ArrayItemsNullable' - /// - [Fact] - public void ArrayItemsNullableTest() - { - // TODO unit test for the property 'ArrayItemsNullable' - } - /// - /// Test the property 'ObjectNullableProp' - /// - [Fact] - public void ObjectNullablePropTest() - { - // TODO unit test for the property 'ObjectNullableProp' + // TODO unit test for the property 'NumberProp' } /// /// Test the property 'ObjectAndItemsNullableProp' @@ -145,12 +136,20 @@ namespace Org.OpenAPITools.Test.Model // TODO unit test for the property 'ObjectAndItemsNullableProp' } /// - /// Test the property 'ObjectItemsNullable' + /// Test the property 'ObjectNullableProp' /// [Fact] - public void ObjectItemsNullableTest() + public void ObjectNullablePropTest() { - // TODO unit test for the property 'ObjectItemsNullable' + // TODO unit test for the property 'ObjectNullableProp' + } + /// + /// Test the property 'StringProp' + /// + [Fact] + public void StringPropTest() + { + // TODO unit test for the property 'StringProp' } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/NullableShapeTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/NullableShapeTests.cs index 8202ef6391..734d03e5e7 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/NullableShapeTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/NullableShapeTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/NumberOnlyTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/NumberOnlyTests.cs index 3a06cb020b..5db923c1d3 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/NumberOnlyTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/NumberOnlyTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ObjectWithDeprecatedFieldsTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ObjectWithDeprecatedFieldsTests.cs index 82f93fab48..9e9b651f81 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ObjectWithDeprecatedFieldsTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ObjectWithDeprecatedFieldsTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -57,20 +56,12 @@ namespace Org.OpenAPITools.Test.Model /// - /// Test the property 'Uuid' + /// Test the property 'Bars' /// [Fact] - public void UuidTest() + public void BarsTest() { - // TODO unit test for the property 'Uuid' - } - /// - /// Test the property 'Id' - /// - [Fact] - public void IdTest() - { - // TODO unit test for the property 'Id' + // TODO unit test for the property 'Bars' } /// /// Test the property 'DeprecatedRef' @@ -81,12 +72,20 @@ namespace Org.OpenAPITools.Test.Model // TODO unit test for the property 'DeprecatedRef' } /// - /// Test the property 'Bars' + /// Test the property 'Id' /// [Fact] - public void BarsTest() + public void IdTest() { - // TODO unit test for the property 'Bars' + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'Uuid' + /// + [Fact] + public void UuidTest() + { + // TODO unit test for the property 'Uuid' } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/OrderTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/OrderTests.cs index cf5c561c54..10682e72f2 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/OrderTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/OrderTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/OuterCompositeTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/OuterCompositeTests.cs index 2efda0db59..8c176d9f94 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/OuterCompositeTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/OuterCompositeTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -56,6 +55,14 @@ namespace Org.OpenAPITools.Test.Model } + /// + /// Test the property 'MyBoolean' + /// + [Fact] + public void MyBooleanTest() + { + // TODO unit test for the property 'MyBoolean' + } /// /// Test the property 'MyNumber' /// @@ -72,14 +79,6 @@ namespace Org.OpenAPITools.Test.Model { // TODO unit test for the property 'MyString' } - /// - /// Test the property 'MyBoolean' - /// - [Fact] - public void MyBooleanTest() - { - // TODO unit test for the property 'MyBoolean' - } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/OuterEnumDefaultValueTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/OuterEnumDefaultValueTests.cs index 986fff774c..9f6d8b52b6 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/OuterEnumDefaultValueTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/OuterEnumDefaultValueTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/OuterEnumIntegerDefaultValueTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/OuterEnumIntegerDefaultValueTests.cs index 015d5dab94..e51365edb2 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/OuterEnumIntegerDefaultValueTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/OuterEnumIntegerDefaultValueTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/OuterEnumIntegerTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/OuterEnumIntegerTests.cs index 385e899110..36e6a060f9 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/OuterEnumIntegerTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/OuterEnumIntegerTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/OuterEnumTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/OuterEnumTests.cs index f47304767b..b38c693d1a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/OuterEnumTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/OuterEnumTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ParentPetTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ParentPetTests.cs index 1e17568ed3..34cae43eac 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ParentPetTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ParentPetTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/PetTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/PetTests.cs index 28ea4d8478..66cfbf7bdb 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/PetTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/PetTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -56,6 +55,22 @@ namespace Org.OpenAPITools.Test.Model } + /// + /// Test the property 'Category' + /// + [Fact] + public void CategoryTest() + { + // TODO unit test for the property 'Category' + } + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } /// /// Test the property 'Name' /// @@ -73,20 +88,12 @@ namespace Org.OpenAPITools.Test.Model // TODO unit test for the property 'PhotoUrls' } /// - /// Test the property 'Id' + /// Test the property 'Status' /// [Fact] - public void IdTest() + public void StatusTest() { - // TODO unit test for the property 'Id' - } - /// - /// Test the property 'Category' - /// - [Fact] - public void CategoryTest() - { - // TODO unit test for the property 'Category' + // TODO unit test for the property 'Status' } /// /// Test the property 'Tags' @@ -96,14 +103,6 @@ namespace Org.OpenAPITools.Test.Model { // TODO unit test for the property 'Tags' } - /// - /// Test the property 'Status' - /// - [Fact] - public void StatusTest() - { - // TODO unit test for the property 'Status' - } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/PigTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/PigTests.cs index a66befe8f5..0e85eabf16 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/PigTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/PigTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/PolymorphicPropertyTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/PolymorphicPropertyTests.cs index eff3c6ddc9..98aad34f4b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/PolymorphicPropertyTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/PolymorphicPropertyTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/QuadrilateralInterfaceTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/QuadrilateralInterfaceTests.cs index 6eef9f4c81..42243bd29c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/QuadrilateralInterfaceTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/QuadrilateralInterfaceTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/QuadrilateralTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/QuadrilateralTests.cs index 3d62673d09..e15b2c5c74 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/QuadrilateralTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/QuadrilateralTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ReadOnlyFirstTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ReadOnlyFirstTests.cs index dc3d0fad54..7e99972f26 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ReadOnlyFirstTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ReadOnlyFirstTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ReturnTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ReturnTests.cs index 65fa199fe3..9969564490 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ReturnTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ReturnTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ScaleneTriangleTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ScaleneTriangleTests.cs index 018dffb596..cad95d2963 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ScaleneTriangleTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ScaleneTriangleTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ShapeInterfaceTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ShapeInterfaceTests.cs index 7bd0bc86f9..3129f3775c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ShapeInterfaceTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ShapeInterfaceTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ShapeOrNullTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ShapeOrNullTests.cs index ef56435764..a33da20eda 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ShapeOrNullTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ShapeOrNullTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ShapeTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ShapeTests.cs index 783a9657ed..b2d995af50 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ShapeTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ShapeTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/SimpleQuadrilateralTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/SimpleQuadrilateralTests.cs index 3bcd65e792..0221971c07 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/SimpleQuadrilateralTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/SimpleQuadrilateralTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/SpecialModelNameTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/SpecialModelNameTests.cs index 91682a7afd..1a5bb10af8 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/SpecialModelNameTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/SpecialModelNameTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -56,14 +55,6 @@ namespace Org.OpenAPITools.Test.Model } - /// - /// Test the property 'SpecialPropertyName' - /// - [Fact] - public void SpecialPropertyNameTest() - { - // TODO unit test for the property 'SpecialPropertyName' - } /// /// Test the property 'SpecialModelNameProperty' /// @@ -72,6 +63,14 @@ namespace Org.OpenAPITools.Test.Model { // TODO unit test for the property 'SpecialModelNameProperty' } + /// + /// Test the property 'SpecialPropertyName' + /// + [Fact] + public void SpecialPropertyNameTest() + { + // TODO unit test for the property 'SpecialPropertyName' + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/TagTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/TagTests.cs index 6d56232d0a..92a5f82365 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/TagTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/TagTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/TriangleInterfaceTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/TriangleInterfaceTests.cs index fba65470be..924d6b42d7 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/TriangleInterfaceTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/TriangleInterfaceTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/TriangleTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/TriangleTests.cs index bdaab0b479..9701da6a54 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/TriangleTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/TriangleTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/UserTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/UserTests.cs index a7b095e4c2..a464c80c84 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/UserTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/UserTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -57,20 +56,12 @@ namespace Org.OpenAPITools.Test.Model /// - /// Test the property 'Id' + /// Test the property 'Email' /// [Fact] - public void IdTest() + public void EmailTest() { - // TODO unit test for the property 'Id' - } - /// - /// Test the property 'Username' - /// - [Fact] - public void UsernameTest() - { - // TODO unit test for the property 'Username' + // TODO unit test for the property 'Email' } /// /// Test the property 'FirstName' @@ -81,6 +72,14 @@ namespace Org.OpenAPITools.Test.Model // TODO unit test for the property 'FirstName' } /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// /// Test the property 'LastName' /// [Fact] @@ -89,12 +88,12 @@ namespace Org.OpenAPITools.Test.Model // TODO unit test for the property 'LastName' } /// - /// Test the property 'Email' + /// Test the property 'ObjectWithNoDeclaredProps' /// [Fact] - public void EmailTest() + public void ObjectWithNoDeclaredPropsTest() { - // TODO unit test for the property 'Email' + // TODO unit test for the property 'ObjectWithNoDeclaredProps' } /// /// Test the property 'Password' @@ -121,20 +120,12 @@ namespace Org.OpenAPITools.Test.Model // TODO unit test for the property 'UserStatus' } /// - /// Test the property 'ObjectWithNoDeclaredProps' + /// Test the property 'Username' /// [Fact] - public void ObjectWithNoDeclaredPropsTest() + public void UsernameTest() { - // TODO unit test for the property 'ObjectWithNoDeclaredProps' - } - /// - /// Test the property 'ObjectWithNoDeclaredPropsNullable' - /// - [Fact] - public void ObjectWithNoDeclaredPropsNullableTest() - { - // TODO unit test for the property 'ObjectWithNoDeclaredPropsNullable' + // TODO unit test for the property 'Username' } /// /// Test the property 'AnyTypeProp' @@ -152,6 +143,14 @@ namespace Org.OpenAPITools.Test.Model { // TODO unit test for the property 'AnyTypePropNullable' } + /// + /// Test the property 'ObjectWithNoDeclaredPropsNullable' + /// + [Fact] + public void ObjectWithNoDeclaredPropsNullableTest() + { + // TODO unit test for the property 'ObjectWithNoDeclaredPropsNullable' + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/WhaleTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/WhaleTests.cs index 9b82c29c8f..91a7b21f21 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/WhaleTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/WhaleTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ZebraTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ZebraTests.cs index 39e0561fe0..08b1c6056c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ZebraTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Model/ZebraTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj index 0a1564bcf5..96b9fd0c60 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj @@ -9,13 +9,12 @@ - + - + - diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/README.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools.Test/README.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/AnotherFakeApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/AnotherFakeApi.cs index 87be0ad41e..a74ad308ba 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/AnotherFakeApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/AnotherFakeApi.cs @@ -21,10 +21,11 @@ using System.Text.Json; using Org.OpenAPITools.Client; using Org.OpenAPITools.Model; -namespace Org.OpenAPITools.Api +namespace Org.OpenAPITools.IApi { /// /// Represents a collection of functions to interact with the API endpoints + /// This class is registered as transient. /// public interface IAnotherFakeApi : IApi { @@ -50,7 +51,7 @@ namespace Org.OpenAPITools.Api /// client model /// Cancellation Token to cancel the request. /// Task of ApiResponse<ModelClient> - Task Call123TestSpecialTagsAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null); + Task Call123TestSpecialTagsAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null); /// /// To test special tags @@ -62,22 +63,18 @@ namespace Org.OpenAPITools.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse<ModelClient?> Task Call123TestSpecialTagsOrDefaultAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null); + } +} - } - +namespace Org.OpenAPITools.Api +{ /// /// Represents a collection of functions to interact with the API endpoints /// - public partial class AnotherFakeApi : IAnotherFakeApi + public partial class AnotherFakeApi : IApi.IAnotherFakeApi { private JsonSerializerOptions _jsonSerializerOptions; - /// - /// An event to track the health of the server. - /// If you store these event args, be sure to purge old event args to prevent a memory leak. - /// - public event ClientUtils.EventHandler? ApiResponded; - /// /// The logger /// @@ -134,6 +131,15 @@ namespace Org.OpenAPITools.Api OauthTokenProvider = oauthTokenProvider; } + /// + /// Logs the api response + /// + /// + protected virtual void OnApiResponded(ApiResponseEventArgs args) + { + Logger.LogInformation("{0,-9} | {1} | {3}", (args.ReceivedAt - args.RequestedAt).TotalSeconds, args.HttpStatus, args.Path); + } + /// /// To test special tags To test special tags and operation ID starting with number /// @@ -141,7 +147,7 @@ namespace Org.OpenAPITools.Api /// client model /// Cancellation Token to cancel the request. /// <> - public async Task Call123TestSpecialTagsAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null) + public async Task Call123TestSpecialTagsAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await Call123TestSpecialTagsWithHttpInfoAsync(modelClient, cancellationToken).ConfigureAwait(false); @@ -174,6 +180,46 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual ModelClient OnCall123TestSpecialTags(ModelClient modelClient) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (modelClient == null) + throw new ArgumentNullException(nameof(modelClient)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return modelClient; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterCall123TestSpecialTags(ApiResponse apiResponse, ModelClient modelClient) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorCall123TestSpecialTags(Exception exception, string pathFormat, string path, ModelClient modelClient) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// To test special tags To test special tags and operation ID starting with number /// @@ -183,18 +229,14 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> Call123TestSpecialTagsWithHttpInfoAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (modelClient == null) - throw new ArgumentNullException(nameof(modelClient)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + modelClient = OnCall123TestSpecialTags(modelClient); using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress!.Host; uriBuilder.Port = HttpClient.BaseAddress!.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -204,6 +246,8 @@ namespace Org.OpenAPITools.Api ? request.Content = new StreamContent(stream) : request.Content = new StringContent(JsonSerializer.Serialize(modelClient, _jsonSerializerOptions)); + + request.RequestUri = uriBuilder.Uri; string[] contentTypes = new string[] { @@ -213,7 +257,7 @@ namespace Org.OpenAPITools.Api string? contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); string[] accepts = new string[] { "application/json" @@ -223,31 +267,24 @@ namespace Org.OpenAPITools.Api if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - + request.Method = HttpMethod.Patch; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/another-fake/dummy", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/another-fake/dummy")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterCall123TestSpecialTags(apiResponse, modelClient); + } return apiResponse; } @@ -255,8 +292,9 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorCall123TestSpecialTags(e, "/another-fake/dummy", uriBuilder.Path, modelClient); throw; } - } } + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/DefaultApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/DefaultApi.cs index 74a3ab0165..c794759279 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/DefaultApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/DefaultApi.cs @@ -21,10 +21,11 @@ using System.Text.Json; using Org.OpenAPITools.Client; using Org.OpenAPITools.Model; -namespace Org.OpenAPITools.Api +namespace Org.OpenAPITools.IApi { /// /// Represents a collection of functions to interact with the API endpoints + /// This class is registered as transient. /// public interface IDefaultApi : IApi { @@ -48,7 +49,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Cancellation Token to cancel the request. /// Task of ApiResponse<FooGetDefaultResponse> - Task FooGetAsync(System.Threading.CancellationToken? cancellationToken = null); + Task FooGetAsync(System.Threading.CancellationToken? cancellationToken = null); /// /// @@ -59,22 +60,18 @@ namespace Org.OpenAPITools.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse<FooGetDefaultResponse?> Task FooGetOrDefaultAsync(System.Threading.CancellationToken? cancellationToken = null); + } +} - } - +namespace Org.OpenAPITools.Api +{ /// /// Represents a collection of functions to interact with the API endpoints /// - public partial class DefaultApi : IDefaultApi + public partial class DefaultApi : IApi.IDefaultApi { private JsonSerializerOptions _jsonSerializerOptions; - /// - /// An event to track the health of the server. - /// If you store these event args, be sure to purge old event args to prevent a memory leak. - /// - public event ClientUtils.EventHandler? ApiResponded; - /// /// The logger /// @@ -131,13 +128,22 @@ namespace Org.OpenAPITools.Api OauthTokenProvider = oauthTokenProvider; } + /// + /// Logs the api response + /// + /// + protected virtual void OnApiResponded(ApiResponseEventArgs args) + { + Logger.LogInformation("{0,-9} | {1} | {3}", (args.ReceivedAt - args.RequestedAt).TotalSeconds, args.HttpStatus, args.Path); + } + /// /// /// /// Thrown when fails to make API call /// Cancellation Token to cancel the request. /// <> - public async Task FooGetAsync(System.Threading.CancellationToken? cancellationToken = null) + public async Task FooGetAsync(System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await FooGetWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); @@ -169,6 +175,34 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + protected virtual void OnFooGet() + { + return; + } + + /// + /// Processes the server response + /// + /// + protected virtual void AfterFooGet(ApiResponse apiResponse) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + protected virtual void OnErrorFooGet(Exception exception, string pathFormat, string path) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// /// @@ -177,16 +211,21 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> FooGetWithHttpInfoAsync(System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { + OnFooGet(); + using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress!.Host; uriBuilder.Port = HttpClient.BaseAddress!.Port; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/foo"; + + request.RequestUri = uriBuilder.Uri; string[] accepts = new string[] { @@ -197,31 +236,24 @@ namespace Org.OpenAPITools.Api if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - + request.Method = HttpMethod.Get; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/foo", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/foo")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterFooGet(apiResponse); + } return apiResponse; } @@ -229,8 +261,9 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorFooGet(e, "/foo", uriBuilder.Path); throw; } - } } + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/FakeApi.cs index 56d7a03ec3..8732ee2357 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/FakeApi.cs @@ -21,10 +21,11 @@ using System.Text.Json; using Org.OpenAPITools.Client; using Org.OpenAPITools.Model; -namespace Org.OpenAPITools.Api +namespace Org.OpenAPITools.IApi { /// /// Represents a collection of functions to interact with the API endpoints + /// This class is registered as transient. /// public interface IFakeApi : IApi { @@ -48,7 +49,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Cancellation Token to cancel the request. /// Task of ApiResponse<HealthCheckResult> - Task FakeHealthGetAsync(System.Threading.CancellationToken? cancellationToken = null); + Task FakeHealthGetAsync(System.Threading.CancellationToken? cancellationToken = null); /// /// Health check endpoint @@ -60,7 +61,6 @@ namespace Org.OpenAPITools.Api /// Task of ApiResponse<HealthCheckResult?> Task FakeHealthGetOrDefaultAsync(System.Threading.CancellationToken? cancellationToken = null); - /// /// /// @@ -83,7 +83,7 @@ namespace Org.OpenAPITools.Api /// Input boolean as post body (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse<bool> - Task FakeOuterBooleanSerializeAsync(bool? body = null, System.Threading.CancellationToken? cancellationToken = null); + Task FakeOuterBooleanSerializeAsync(bool? body = null, System.Threading.CancellationToken? cancellationToken = null); /// /// @@ -96,7 +96,6 @@ namespace Org.OpenAPITools.Api /// Task of ApiResponse<bool?> Task FakeOuterBooleanSerializeOrDefaultAsync(bool? body = null, System.Threading.CancellationToken? cancellationToken = null); - /// /// /// @@ -119,7 +118,7 @@ namespace Org.OpenAPITools.Api /// Input composite as post body (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse<OuterComposite> - Task FakeOuterCompositeSerializeAsync(OuterComposite? outerComposite = null, System.Threading.CancellationToken? cancellationToken = null); + Task FakeOuterCompositeSerializeAsync(OuterComposite? outerComposite = null, System.Threading.CancellationToken? cancellationToken = null); /// /// @@ -132,7 +131,6 @@ namespace Org.OpenAPITools.Api /// Task of ApiResponse<OuterComposite?> Task FakeOuterCompositeSerializeOrDefaultAsync(OuterComposite? outerComposite = null, System.Threading.CancellationToken? cancellationToken = null); - /// /// /// @@ -155,7 +153,7 @@ namespace Org.OpenAPITools.Api /// Input number as post body (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse<decimal> - Task FakeOuterNumberSerializeAsync(decimal? body = null, System.Threading.CancellationToken? cancellationToken = null); + Task FakeOuterNumberSerializeAsync(decimal? body = null, System.Threading.CancellationToken? cancellationToken = null); /// /// @@ -168,7 +166,6 @@ namespace Org.OpenAPITools.Api /// Task of ApiResponse<decimal?> Task FakeOuterNumberSerializeOrDefaultAsync(decimal? body = null, System.Threading.CancellationToken? cancellationToken = null); - /// /// /// @@ -191,7 +188,7 @@ namespace Org.OpenAPITools.Api /// Input string as post body (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse<string> - Task FakeOuterStringSerializeAsync(string? body = null, System.Threading.CancellationToken? cancellationToken = null); + Task FakeOuterStringSerializeAsync(string? body = null, System.Threading.CancellationToken? cancellationToken = null); /// /// @@ -204,7 +201,6 @@ namespace Org.OpenAPITools.Api /// Task of ApiResponse<string?> Task FakeOuterStringSerializeOrDefaultAsync(string? body = null, System.Threading.CancellationToken? cancellationToken = null); - /// /// Array of Enums /// @@ -225,7 +221,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Cancellation Token to cancel the request. /// Task of ApiResponse<List<OuterEnum>> - Task?> GetArrayOfEnumsAsync(System.Threading.CancellationToken? cancellationToken = null); + Task> GetArrayOfEnumsAsync(System.Threading.CancellationToken? cancellationToken = null); /// /// Array of Enums @@ -237,7 +233,6 @@ namespace Org.OpenAPITools.Api /// Task of ApiResponse<List<OuterEnum>?> Task?> GetArrayOfEnumsOrDefaultAsync(System.Threading.CancellationToken? cancellationToken = null); - /// /// /// @@ -260,7 +255,7 @@ namespace Org.OpenAPITools.Api /// /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> - Task TestBodyWithFileSchemaAsync(FileSchemaTestClass fileSchemaTestClass, System.Threading.CancellationToken? cancellationToken = null); + Task TestBodyWithFileSchemaAsync(FileSchemaTestClass fileSchemaTestClass, System.Threading.CancellationToken? cancellationToken = null); /// /// @@ -273,7 +268,6 @@ namespace Org.OpenAPITools.Api /// Task of ApiResponse<object?> Task TestBodyWithFileSchemaOrDefaultAsync(FileSchemaTestClass fileSchemaTestClass, System.Threading.CancellationToken? cancellationToken = null); - /// /// /// @@ -281,11 +275,11 @@ namespace Org.OpenAPITools.Api /// /// /// Thrown when fails to make API call - /// /// + /// /// Cancellation Token to cancel the request. /// Task<ApiResponse<object?>> - Task> TestBodyWithQueryParamsWithHttpInfoAsync(string query, User user, System.Threading.CancellationToken? cancellationToken = null); + Task> TestBodyWithQueryParamsWithHttpInfoAsync(User user, string query, System.Threading.CancellationToken? cancellationToken = null); /// /// @@ -294,11 +288,11 @@ namespace Org.OpenAPITools.Api /// /// /// Thrown when fails to make API call - /// /// + /// /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> - Task TestBodyWithQueryParamsAsync(string query, User user, System.Threading.CancellationToken? cancellationToken = null); + Task TestBodyWithQueryParamsAsync(User user, string query, System.Threading.CancellationToken? cancellationToken = null); /// /// @@ -306,13 +300,12 @@ namespace Org.OpenAPITools.Api /// /// /// - /// /// + /// /// Cancellation Token to cancel the request. /// Task of ApiResponse<object?> - Task TestBodyWithQueryParamsOrDefaultAsync(string query, User user, System.Threading.CancellationToken? cancellationToken = null); + Task TestBodyWithQueryParamsOrDefaultAsync(User user, string query, System.Threading.CancellationToken? cancellationToken = null); - /// /// To test \"client\" model /// @@ -335,7 +328,7 @@ namespace Org.OpenAPITools.Api /// client model /// Cancellation Token to cancel the request. /// Task of ApiResponse<ModelClient> - Task TestClientModelAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null); + Task TestClientModelAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null); /// /// To test \"client\" model @@ -348,7 +341,6 @@ namespace Org.OpenAPITools.Api /// Task of ApiResponse<ModelClient?> Task TestClientModelOrDefaultAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null); - /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// @@ -356,23 +348,23 @@ namespace Org.OpenAPITools.Api /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call + /// None /// None /// None /// None - /// None + /// None (optional) + /// None (optional) + /// None (optional) /// None (optional) /// None (optional) /// None (optional) - /// None (optional) /// None (optional) - /// None (optional) - /// None (optional) /// None (optional) /// None (optional) /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// Cancellation Token to cancel the request. /// Task<ApiResponse<object?>> - Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string? _string = null, System.IO.Stream? binary = null, DateTime? date = null, string? password = null, string? callback = null, DateTime? dateTime = null, System.Threading.CancellationToken? cancellationToken = null); + Task> TestEndpointParametersWithHttpInfoAsync(byte[] _byte, decimal number, double _double, string patternWithoutDelimiter, DateTime? date = null, System.IO.Stream? binary = null, float? _float = null, int? integer = null, int? int32 = null, long? int64 = null, string? _string = null, string? password = null, string? callback = null, DateTime? dateTime = null, System.Threading.CancellationToken? cancellationToken = null); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -381,23 +373,23 @@ namespace Org.OpenAPITools.Api /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call + /// None /// None /// None /// None - /// None + /// None (optional) + /// None (optional) + /// None (optional) /// None (optional) /// None (optional) /// None (optional) - /// None (optional) /// None (optional) - /// None (optional) - /// None (optional) /// None (optional) /// None (optional) /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> - Task TestEndpointParametersAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string? _string = null, System.IO.Stream? binary = null, DateTime? date = null, string? password = null, string? callback = null, DateTime? dateTime = null, System.Threading.CancellationToken? cancellationToken = null); + Task TestEndpointParametersAsync(byte[] _byte, decimal number, double _double, string patternWithoutDelimiter, DateTime? date = null, System.IO.Stream? binary = null, float? _float = null, int? integer = null, int? int32 = null, long? int64 = null, string? _string = null, string? password = null, string? callback = null, DateTime? dateTime = null, System.Threading.CancellationToken? cancellationToken = null); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -405,43 +397,23 @@ namespace Org.OpenAPITools.Api /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// + /// None /// None /// None /// None - /// None + /// None (optional) + /// None (optional) + /// None (optional) /// None (optional) /// None (optional) /// None (optional) - /// None (optional) /// None (optional) - /// None (optional) - /// None (optional) /// None (optional) /// None (optional) /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// Cancellation Token to cancel the request. /// Task of ApiResponse<object?> - Task TestEndpointParametersOrDefaultAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string? _string = null, System.IO.Stream? binary = null, DateTime? date = null, string? password = null, string? callback = null, DateTime? dateTime = null, System.Threading.CancellationToken? cancellationToken = null); - - - /// - /// To test enum parameters - /// - /// - /// To test enum parameters - /// - /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (double) (optional) - /// Query parameter enum test (double) (optional) - /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string) (optional, default to -efg) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) - /// Cancellation Token to cancel the request. - /// Task<ApiResponse<object?>> - Task> TestEnumParametersWithHttpInfoAsync(List? enumHeaderStringArray = null, List? enumQueryStringArray = null, int? enumQueryInteger = null, double? enumQueryDouble = null, string? enumHeaderString = null, string? enumQueryString = null, List? enumFormStringArray = null, string? enumFormString = null, System.Threading.CancellationToken? cancellationToken = null); + Task TestEndpointParametersOrDefaultAsync(byte[] _byte, decimal number, double _double, string patternWithoutDelimiter, DateTime? date = null, System.IO.Stream? binary = null, float? _float = null, int? integer = null, int? int32 = null, long? int64 = null, string? _string = null, string? password = null, string? callback = null, DateTime? dateTime = null, System.Threading.CancellationToken? cancellationToken = null); /// /// To test enum parameters @@ -452,15 +424,34 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Header parameter enum test (string array) (optional) /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) + /// Query parameter enum test (double) (optional) + /// Form parameter enum test (string array) (optional, default to $) /// Header parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (string) (optional, default to -efg) + /// Form parameter enum test (string) (optional, default to -efg) + /// Cancellation Token to cancel the request. + /// Task<ApiResponse<object?>> + Task> TestEnumParametersWithHttpInfoAsync(List? enumHeaderStringArray = null, List? enumQueryStringArray = null, double? enumQueryDouble = null, int? enumQueryInteger = null, List? enumFormStringArray = null, string? enumHeaderString = null, string? enumQueryString = null, string? enumFormString = null, System.Threading.CancellationToken? cancellationToken = null); + + /// + /// To test enum parameters + /// + /// + /// To test enum parameters + /// + /// Thrown when fails to make API call + /// Header parameter enum test (string array) (optional) + /// Query parameter enum test (string array) (optional) + /// Query parameter enum test (double) (optional) + /// Query parameter enum test (double) (optional) /// Form parameter enum test (string array) (optional, default to $) + /// Header parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (string) (optional, default to -efg) /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> - Task TestEnumParametersAsync(List? enumHeaderStringArray = null, List? enumQueryStringArray = null, int? enumQueryInteger = null, double? enumQueryDouble = null, string? enumHeaderString = null, string? enumQueryString = null, List? enumFormStringArray = null, string? enumFormString = null, System.Threading.CancellationToken? cancellationToken = null); + Task TestEnumParametersAsync(List? enumHeaderStringArray = null, List? enumQueryStringArray = null, double? enumQueryDouble = null, int? enumQueryInteger = null, List? enumFormStringArray = null, string? enumHeaderString = null, string? enumQueryString = null, string? enumFormString = null, System.Threading.CancellationToken? cancellationToken = null); /// /// To test enum parameters @@ -470,17 +461,16 @@ namespace Org.OpenAPITools.Api /// /// Header parameter enum test (string array) (optional) /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) + /// Query parameter enum test (double) (optional) + /// Form parameter enum test (string array) (optional, default to $) /// Header parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (string) (optional, default to -efg) - /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel the request. /// Task of ApiResponse<object?> - Task TestEnumParametersOrDefaultAsync(List? enumHeaderStringArray = null, List? enumQueryStringArray = null, int? enumQueryInteger = null, double? enumQueryDouble = null, string? enumHeaderString = null, string? enumQueryString = null, List? enumFormStringArray = null, string? enumFormString = null, System.Threading.CancellationToken? cancellationToken = null); + Task TestEnumParametersOrDefaultAsync(List? enumHeaderStringArray = null, List? enumQueryStringArray = null, double? enumQueryDouble = null, int? enumQueryInteger = null, List? enumFormStringArray = null, string? enumHeaderString = null, string? enumQueryString = null, string? enumFormString = null, System.Threading.CancellationToken? cancellationToken = null); - /// /// Fake endpoint to test group parameters (optional) /// @@ -488,15 +478,15 @@ namespace Org.OpenAPITools.Api /// Fake endpoint to test group parameters (optional) /// /// Thrown when fails to make API call - /// Required String in group parameters /// Required Boolean in group parameters + /// Required String in group parameters /// Required Integer in group parameters - /// String in group parameters (optional) /// Boolean in group parameters (optional) + /// String in group parameters (optional) /// Integer in group parameters (optional) /// Cancellation Token to cancel the request. /// Task<ApiResponse<object?>> - Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null, System.Threading.CancellationToken? cancellationToken = null); + Task> TestGroupParametersWithHttpInfoAsync(bool requiredBooleanGroup, int requiredStringGroup, long requiredInt64Group, bool? booleanGroup = null, int? stringGroup = null, long? int64Group = null, System.Threading.CancellationToken? cancellationToken = null); /// /// Fake endpoint to test group parameters (optional) @@ -505,15 +495,15 @@ namespace Org.OpenAPITools.Api /// Fake endpoint to test group parameters (optional) /// /// Thrown when fails to make API call - /// Required String in group parameters /// Required Boolean in group parameters + /// Required String in group parameters /// Required Integer in group parameters - /// String in group parameters (optional) /// Boolean in group parameters (optional) + /// String in group parameters (optional) /// Integer in group parameters (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> - Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null, System.Threading.CancellationToken? cancellationToken = null); + Task TestGroupParametersAsync(bool requiredBooleanGroup, int requiredStringGroup, long requiredInt64Group, bool? booleanGroup = null, int? stringGroup = null, long? int64Group = null, System.Threading.CancellationToken? cancellationToken = null); /// /// Fake endpoint to test group parameters (optional) @@ -521,17 +511,16 @@ namespace Org.OpenAPITools.Api /// /// Fake endpoint to test group parameters (optional) /// - /// Required String in group parameters /// Required Boolean in group parameters + /// Required String in group parameters /// Required Integer in group parameters - /// String in group parameters (optional) /// Boolean in group parameters (optional) + /// String in group parameters (optional) /// Integer in group parameters (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse<object?> - Task TestGroupParametersOrDefaultAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null, System.Threading.CancellationToken? cancellationToken = null); + Task TestGroupParametersOrDefaultAsync(bool requiredBooleanGroup, int requiredStringGroup, long requiredInt64Group, bool? booleanGroup = null, int? stringGroup = null, long? int64Group = null, System.Threading.CancellationToken? cancellationToken = null); - /// /// test inline additionalProperties /// @@ -554,7 +543,7 @@ namespace Org.OpenAPITools.Api /// request body /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> - Task TestInlineAdditionalPropertiesAsync(Dictionary requestBody, System.Threading.CancellationToken? cancellationToken = null); + Task TestInlineAdditionalPropertiesAsync(Dictionary requestBody, System.Threading.CancellationToken? cancellationToken = null); /// /// test inline additionalProperties @@ -567,7 +556,6 @@ namespace Org.OpenAPITools.Api /// Task of ApiResponse<object?> Task TestInlineAdditionalPropertiesOrDefaultAsync(Dictionary requestBody, System.Threading.CancellationToken? cancellationToken = null); - /// /// test json serialization of form data /// @@ -592,7 +580,7 @@ namespace Org.OpenAPITools.Api /// field2 /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> - Task TestJsonFormDataAsync(string param, string param2, System.Threading.CancellationToken? cancellationToken = null); + Task TestJsonFormDataAsync(string param, string param2, System.Threading.CancellationToken? cancellationToken = null); /// /// test json serialization of form data @@ -606,7 +594,6 @@ namespace Org.OpenAPITools.Api /// Task of ApiResponse<object?> Task TestJsonFormDataOrDefaultAsync(string param, string param2, System.Threading.CancellationToken? cancellationToken = null); - /// /// /// @@ -637,7 +624,7 @@ namespace Org.OpenAPITools.Api /// /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> - Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, System.Threading.CancellationToken? cancellationToken = null); + Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, System.Threading.CancellationToken? cancellationToken = null); /// /// @@ -653,22 +640,18 @@ namespace Org.OpenAPITools.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse<object?> Task TestQueryParameterCollectionFormatOrDefaultAsync(List pipe, List ioutil, List http, List url, List context, System.Threading.CancellationToken? cancellationToken = null); + } +} - } - +namespace Org.OpenAPITools.Api +{ /// /// Represents a collection of functions to interact with the API endpoints /// - public partial class FakeApi : IFakeApi + public partial class FakeApi : IApi.IFakeApi { private JsonSerializerOptions _jsonSerializerOptions; - /// - /// An event to track the health of the server. - /// If you store these event args, be sure to purge old event args to prevent a memory leak. - /// - public event ClientUtils.EventHandler? ApiResponded; - /// /// The logger /// @@ -725,13 +708,22 @@ namespace Org.OpenAPITools.Api OauthTokenProvider = oauthTokenProvider; } + /// + /// Logs the api response + /// + /// + protected virtual void OnApiResponded(ApiResponseEventArgs args) + { + Logger.LogInformation("{0,-9} | {1} | {3}", (args.ReceivedAt - args.RequestedAt).TotalSeconds, args.HttpStatus, args.Path); + } + /// /// Health check endpoint /// /// Thrown when fails to make API call /// Cancellation Token to cancel the request. /// <> - public async Task FakeHealthGetAsync(System.Threading.CancellationToken? cancellationToken = null) + public async Task FakeHealthGetAsync(System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await FakeHealthGetWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); @@ -763,6 +755,34 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + protected virtual void OnFakeHealthGet() + { + return; + } + + /// + /// Processes the server response + /// + /// + protected virtual void AfterFakeHealthGet(ApiResponse apiResponse) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + protected virtual void OnErrorFakeHealthGet(Exception exception, string pathFormat, string path) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Health check endpoint /// @@ -771,16 +791,21 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> FakeHealthGetWithHttpInfoAsync(System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { + OnFakeHealthGet(); + using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress!.Host; uriBuilder.Port = HttpClient.BaseAddress!.Port; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/fake/health"; + + request.RequestUri = uriBuilder.Uri; string[] accepts = new string[] { @@ -791,31 +816,24 @@ namespace Org.OpenAPITools.Api if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - + request.Method = HttpMethod.Get; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/health", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/health")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterFakeHealthGet(apiResponse); + } return apiResponse; } @@ -823,7 +841,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorFakeHealthGet(e, "/fake/health", uriBuilder.Path); throw; } } @@ -835,14 +853,14 @@ namespace Org.OpenAPITools.Api /// Input boolean as post body (optional) /// Cancellation Token to cancel the request. /// <> - public async Task FakeOuterBooleanSerializeAsync(bool? body = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task FakeOuterBooleanSerializeAsync(bool? body = null, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await FakeOuterBooleanSerializeWithHttpInfoAsync(body, cancellationToken).ConfigureAwait(false); if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); - return result.Content; + return result.Content.Value; } /// @@ -868,6 +886,37 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual bool? OnFakeOuterBooleanSerialize(bool? body) + { + return body; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterFakeOuterBooleanSerialize(ApiResponse apiResponse, bool? body) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorFakeOuterBooleanSerialize(Exception exception, string pathFormat, string path, bool? body) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Test serialization of outer boolean types /// @@ -877,11 +926,14 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> FakeOuterBooleanSerializeWithHttpInfoAsync(bool? body = null, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { + body = OnFakeOuterBooleanSerialize(body); + using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress!.Host; uriBuilder.Port = HttpClient.BaseAddress!.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -891,6 +943,8 @@ namespace Org.OpenAPITools.Api ? request.Content = new StreamContent(stream) : request.Content = new StringContent(JsonSerializer.Serialize(body, _jsonSerializerOptions)); + + request.RequestUri = uriBuilder.Uri; string[] contentTypes = new string[] { @@ -900,7 +954,7 @@ namespace Org.OpenAPITools.Api string? contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); string[] accepts = new string[] { "*/*" @@ -910,31 +964,24 @@ namespace Org.OpenAPITools.Api if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - + request.Method = HttpMethod.Post; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/outer/boolean", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/outer/boolean")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterFakeOuterBooleanSerialize(apiResponse, body); + } return apiResponse; } @@ -942,7 +989,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorFakeOuterBooleanSerialize(e, "/fake/outer/boolean", uriBuilder.Path, body); throw; } } @@ -954,7 +1001,7 @@ namespace Org.OpenAPITools.Api /// Input composite as post body (optional) /// Cancellation Token to cancel the request. /// <> - public async Task FakeOuterCompositeSerializeAsync(OuterComposite? outerComposite = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task FakeOuterCompositeSerializeAsync(OuterComposite? outerComposite = null, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await FakeOuterCompositeSerializeWithHttpInfoAsync(outerComposite, cancellationToken).ConfigureAwait(false); @@ -987,6 +1034,37 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual OuterComposite? OnFakeOuterCompositeSerialize(OuterComposite? outerComposite) + { + return outerComposite; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterFakeOuterCompositeSerialize(ApiResponse apiResponse, OuterComposite? outerComposite) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorFakeOuterCompositeSerialize(Exception exception, string pathFormat, string path, OuterComposite? outerComposite) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Test serialization of object with outer number type /// @@ -996,11 +1074,14 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> FakeOuterCompositeSerializeWithHttpInfoAsync(OuterComposite? outerComposite = null, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { + outerComposite = OnFakeOuterCompositeSerialize(outerComposite); + using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress!.Host; uriBuilder.Port = HttpClient.BaseAddress!.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -1010,6 +1091,8 @@ namespace Org.OpenAPITools.Api ? request.Content = new StreamContent(stream) : request.Content = new StringContent(JsonSerializer.Serialize(outerComposite, _jsonSerializerOptions)); + + request.RequestUri = uriBuilder.Uri; string[] contentTypes = new string[] { @@ -1019,7 +1102,7 @@ namespace Org.OpenAPITools.Api string? contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); string[] accepts = new string[] { "*/*" @@ -1029,31 +1112,24 @@ namespace Org.OpenAPITools.Api if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - + request.Method = HttpMethod.Post; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/outer/composite", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/outer/composite")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterFakeOuterCompositeSerialize(apiResponse, outerComposite); + } return apiResponse; } @@ -1061,7 +1137,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorFakeOuterCompositeSerialize(e, "/fake/outer/composite", uriBuilder.Path, outerComposite); throw; } } @@ -1073,14 +1149,14 @@ namespace Org.OpenAPITools.Api /// Input number as post body (optional) /// Cancellation Token to cancel the request. /// <> - public async Task FakeOuterNumberSerializeAsync(decimal? body = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task FakeOuterNumberSerializeAsync(decimal? body = null, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await FakeOuterNumberSerializeWithHttpInfoAsync(body, cancellationToken).ConfigureAwait(false); if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); - return result.Content; + return result.Content.Value; } /// @@ -1106,6 +1182,37 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual decimal? OnFakeOuterNumberSerialize(decimal? body) + { + return body; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterFakeOuterNumberSerialize(ApiResponse apiResponse, decimal? body) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorFakeOuterNumberSerialize(Exception exception, string pathFormat, string path, decimal? body) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Test serialization of outer number types /// @@ -1115,11 +1222,14 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> FakeOuterNumberSerializeWithHttpInfoAsync(decimal? body = null, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { + body = OnFakeOuterNumberSerialize(body); + using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress!.Host; uriBuilder.Port = HttpClient.BaseAddress!.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -1129,6 +1239,8 @@ namespace Org.OpenAPITools.Api ? request.Content = new StreamContent(stream) : request.Content = new StringContent(JsonSerializer.Serialize(body, _jsonSerializerOptions)); + + request.RequestUri = uriBuilder.Uri; string[] contentTypes = new string[] { @@ -1138,7 +1250,7 @@ namespace Org.OpenAPITools.Api string? contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); string[] accepts = new string[] { "*/*" @@ -1148,31 +1260,24 @@ namespace Org.OpenAPITools.Api if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - + request.Method = HttpMethod.Post; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/outer/number", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/outer/number")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterFakeOuterNumberSerialize(apiResponse, body); + } return apiResponse; } @@ -1180,7 +1285,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorFakeOuterNumberSerialize(e, "/fake/outer/number", uriBuilder.Path, body); throw; } } @@ -1192,7 +1297,7 @@ namespace Org.OpenAPITools.Api /// Input string as post body (optional) /// Cancellation Token to cancel the request. /// <> - public async Task FakeOuterStringSerializeAsync(string? body = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task FakeOuterStringSerializeAsync(string? body = null, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await FakeOuterStringSerializeWithHttpInfoAsync(body, cancellationToken).ConfigureAwait(false); @@ -1225,6 +1330,37 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual string? OnFakeOuterStringSerialize(string? body) + { + return body; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterFakeOuterStringSerialize(ApiResponse apiResponse, string? body) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorFakeOuterStringSerialize(Exception exception, string pathFormat, string path, string? body) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Test serialization of outer string types /// @@ -1234,11 +1370,14 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> FakeOuterStringSerializeWithHttpInfoAsync(string? body = null, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { + body = OnFakeOuterStringSerialize(body); + using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress!.Host; uriBuilder.Port = HttpClient.BaseAddress!.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -1248,6 +1387,8 @@ namespace Org.OpenAPITools.Api ? request.Content = new StreamContent(stream) : request.Content = new StringContent(JsonSerializer.Serialize(body, _jsonSerializerOptions)); + + request.RequestUri = uriBuilder.Uri; string[] contentTypes = new string[] { @@ -1257,7 +1398,7 @@ namespace Org.OpenAPITools.Api string? contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); string[] accepts = new string[] { "*/*" @@ -1267,31 +1408,24 @@ namespace Org.OpenAPITools.Api if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - + request.Method = HttpMethod.Post; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/outer/string", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/outer/string")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterFakeOuterStringSerialize(apiResponse, body); + } return apiResponse; } @@ -1299,7 +1433,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorFakeOuterStringSerialize(e, "/fake/outer/string", uriBuilder.Path, body); throw; } } @@ -1310,7 +1444,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Cancellation Token to cancel the request. /// <> - public async Task?> GetArrayOfEnumsAsync(System.Threading.CancellationToken? cancellationToken = null) + public async Task> GetArrayOfEnumsAsync(System.Threading.CancellationToken? cancellationToken = null) { ApiResponse?> result = await GetArrayOfEnumsWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); @@ -1342,6 +1476,34 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + protected virtual void OnGetArrayOfEnums() + { + return; + } + + /// + /// Processes the server response + /// + /// + protected virtual void AfterGetArrayOfEnums(ApiResponse?> apiResponse) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + protected virtual void OnErrorGetArrayOfEnums(Exception exception, string pathFormat, string path) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Array of Enums /// @@ -1350,16 +1512,21 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task?>> GetArrayOfEnumsWithHttpInfoAsync(System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { + OnGetArrayOfEnums(); + using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress!.Host; uriBuilder.Port = HttpClient.BaseAddress!.Port; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/fake/array-of-enums"; + + request.RequestUri = uriBuilder.Uri; string[] accepts = new string[] { @@ -1370,31 +1537,24 @@ namespace Org.OpenAPITools.Api if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - + request.Method = HttpMethod.Get; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/array-of-enums", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/array-of-enums")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse?> apiResponse = new ApiResponse?>(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize>(apiResponse.RawContent, _jsonSerializerOptions); + AfterGetArrayOfEnums(apiResponse); + } return apiResponse; } @@ -1402,7 +1562,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorGetArrayOfEnums(e, "/fake/array-of-enums", uriBuilder.Path); throw; } } @@ -1414,7 +1574,7 @@ namespace Org.OpenAPITools.Api /// /// Cancellation Token to cancel the request. /// <> - public async Task TestBodyWithFileSchemaAsync(FileSchemaTestClass fileSchemaTestClass, System.Threading.CancellationToken? cancellationToken = null) + public async Task TestBodyWithFileSchemaAsync(FileSchemaTestClass fileSchemaTestClass, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await TestBodyWithFileSchemaWithHttpInfoAsync(fileSchemaTestClass, cancellationToken).ConfigureAwait(false); @@ -1447,6 +1607,46 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual FileSchemaTestClass OnTestBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (fileSchemaTestClass == null) + throw new ArgumentNullException(nameof(fileSchemaTestClass)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return fileSchemaTestClass; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterTestBodyWithFileSchema(ApiResponse apiResponse, FileSchemaTestClass fileSchemaTestClass) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorTestBodyWithFileSchema(Exception exception, string pathFormat, string path, FileSchemaTestClass fileSchemaTestClass) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// For this test, the body for this request much reference a schema named `File`. /// @@ -1456,18 +1656,14 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> TestBodyWithFileSchemaWithHttpInfoAsync(FileSchemaTestClass fileSchemaTestClass, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (fileSchemaTestClass == null) - throw new ArgumentNullException(nameof(fileSchemaTestClass)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + fileSchemaTestClass = OnTestBodyWithFileSchema(fileSchemaTestClass); using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress!.Host; uriBuilder.Port = HttpClient.BaseAddress!.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -1477,6 +1673,8 @@ namespace Org.OpenAPITools.Api ? request.Content = new StreamContent(stream) : request.Content = new StringContent(JsonSerializer.Serialize(fileSchemaTestClass, _jsonSerializerOptions)); + + request.RequestUri = uriBuilder.Uri; string[] contentTypes = new string[] { @@ -1486,32 +1684,25 @@ namespace Org.OpenAPITools.Api string? contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); request.Method = HttpMethod.Put; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/body-with-file-schema", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/body-with-file-schema")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterTestBodyWithFileSchema(apiResponse, fileSchemaTestClass); + } return apiResponse; } @@ -1519,7 +1710,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorTestBodyWithFileSchema(e, "/fake/body-with-file-schema", uriBuilder.Path, fileSchemaTestClass); throw; } } @@ -1528,13 +1719,13 @@ namespace Org.OpenAPITools.Api /// /// /// Thrown when fails to make API call - /// /// + /// /// Cancellation Token to cancel the request. /// <> - public async Task TestBodyWithQueryParamsAsync(string query, User user, System.Threading.CancellationToken? cancellationToken = null) + public async Task TestBodyWithQueryParamsAsync(User user, string query, System.Threading.CancellationToken? cancellationToken = null) { - ApiResponse result = await TestBodyWithQueryParamsWithHttpInfoAsync(query, user, cancellationToken).ConfigureAwait(false); + ApiResponse result = await TestBodyWithQueryParamsWithHttpInfoAsync(user, query, cancellationToken).ConfigureAwait(false); if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); @@ -1546,16 +1737,16 @@ namespace Org.OpenAPITools.Api /// /// /// Thrown when fails to make API call - /// /// + /// /// Cancellation Token to cancel the request. /// <> - public async Task TestBodyWithQueryParamsOrDefaultAsync(string query, User user, System.Threading.CancellationToken? cancellationToken = null) + public async Task TestBodyWithQueryParamsOrDefaultAsync(User user, string query, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse? result = null; try { - result = await TestBodyWithQueryParamsWithHttpInfoAsync(query, user, cancellationToken).ConfigureAwait(false); + result = await TestBodyWithQueryParamsWithHttpInfoAsync(user, query, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -1566,31 +1757,72 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + /// + protected virtual (User, string) OnTestBodyWithQueryParams(User user, string query) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (user == null) + throw new ArgumentNullException(nameof(user)); + + if (query == null) + throw new ArgumentNullException(nameof(query)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return (user, query); + } + + /// + /// Processes the server response + /// + /// + /// + /// + protected virtual void AfterTestBodyWithQueryParams(ApiResponse apiResponse, User user, string query) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + /// + protected virtual void OnErrorTestBodyWithQueryParams(Exception exception, string pathFormat, string path, User user, string query) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// /// /// Thrown when fails to make API call - /// /// + /// /// Cancellation Token to cancel the request. /// <> where T : - public async Task> TestBodyWithQueryParamsWithHttpInfoAsync(string query, User user, System.Threading.CancellationToken? cancellationToken = null) + public async Task> TestBodyWithQueryParamsWithHttpInfoAsync(User user, string query, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (query == null) - throw new ArgumentNullException(nameof(query)); - - if (user == null) - throw new ArgumentNullException(nameof(user)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + var validatedParameters = OnTestBodyWithQueryParams(user, query); + user = validatedParameters.Item1; + query = validatedParameters.Item2; using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress!.Host; uriBuilder.Port = HttpClient.BaseAddress!.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -1606,6 +1838,8 @@ namespace Org.OpenAPITools.Api ? request.Content = new StreamContent(stream) : request.Content = new StringContent(JsonSerializer.Serialize(user, _jsonSerializerOptions)); + + request.RequestUri = uriBuilder.Uri; string[] contentTypes = new string[] { @@ -1615,32 +1849,25 @@ namespace Org.OpenAPITools.Api string? contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); request.Method = HttpMethod.Put; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/body-with-query-params", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/body-with-query-params")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterTestBodyWithQueryParams(apiResponse, user, query); + } return apiResponse; } @@ -1648,7 +1875,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorTestBodyWithQueryParams(e, "/fake/body-with-query-params", uriBuilder.Path, user, query); throw; } } @@ -1660,7 +1887,7 @@ namespace Org.OpenAPITools.Api /// client model /// Cancellation Token to cancel the request. /// <> - public async Task TestClientModelAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null) + public async Task TestClientModelAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await TestClientModelWithHttpInfoAsync(modelClient, cancellationToken).ConfigureAwait(false); @@ -1693,6 +1920,46 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual ModelClient OnTestClientModel(ModelClient modelClient) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (modelClient == null) + throw new ArgumentNullException(nameof(modelClient)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return modelClient; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterTestClientModel(ApiResponse apiResponse, ModelClient modelClient) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorTestClientModel(Exception exception, string pathFormat, string path, ModelClient modelClient) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// To test \"client\" model To test \"client\" model /// @@ -1702,18 +1969,14 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> TestClientModelWithHttpInfoAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (modelClient == null) - throw new ArgumentNullException(nameof(modelClient)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + modelClient = OnTestClientModel(modelClient); using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress!.Host; uriBuilder.Port = HttpClient.BaseAddress!.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -1723,6 +1986,8 @@ namespace Org.OpenAPITools.Api ? request.Content = new StreamContent(stream) : request.Content = new StringContent(JsonSerializer.Serialize(modelClient, _jsonSerializerOptions)); + + request.RequestUri = uriBuilder.Uri; string[] contentTypes = new string[] { @@ -1732,7 +1997,7 @@ namespace Org.OpenAPITools.Api string? contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); string[] accepts = new string[] { "application/json" @@ -1742,31 +2007,24 @@ namespace Org.OpenAPITools.Api if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - + request.Method = HttpMethod.Patch; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterTestClientModel(apiResponse, modelClient); + } return apiResponse; } @@ -1774,7 +2032,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorTestClientModel(e, "/fake", uriBuilder.Path, modelClient); throw; } } @@ -1783,25 +2041,25 @@ namespace Org.OpenAPITools.Api /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call + /// None /// None /// None /// None - /// None + /// None (optional) + /// None (optional) + /// None (optional) /// None (optional) /// None (optional) /// None (optional) - /// None (optional) /// None (optional) - /// None (optional) - /// None (optional) /// None (optional) /// None (optional) /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// Cancellation Token to cancel the request. /// <> - public async Task TestEndpointParametersAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string? _string = null, System.IO.Stream? binary = null, DateTime? date = null, string? password = null, string? callback = null, DateTime? dateTime = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task TestEndpointParametersAsync(byte[] _byte, decimal number, double _double, string patternWithoutDelimiter, DateTime? date = null, System.IO.Stream? binary = null, float? _float = null, int? integer = null, int? int32 = null, long? int64 = null, string? _string = null, string? password = null, string? callback = null, DateTime? dateTime = null, System.Threading.CancellationToken? cancellationToken = null) { - ApiResponse result = await TestEndpointParametersWithHttpInfoAsync(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, password, callback, dateTime, cancellationToken).ConfigureAwait(false); + ApiResponse result = await TestEndpointParametersWithHttpInfoAsync(_byte, number, _double, patternWithoutDelimiter, date, binary, _float, integer, int32, int64, _string, password, callback, dateTime, cancellationToken).ConfigureAwait(false); if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); @@ -1813,28 +2071,28 @@ namespace Org.OpenAPITools.Api /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call + /// None /// None /// None /// None - /// None + /// None (optional) + /// None (optional) + /// None (optional) /// None (optional) /// None (optional) /// None (optional) - /// None (optional) /// None (optional) - /// None (optional) - /// None (optional) /// None (optional) /// None (optional) /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// Cancellation Token to cancel the request. /// <> - public async Task TestEndpointParametersOrDefaultAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string? _string = null, System.IO.Stream? binary = null, DateTime? date = null, string? password = null, string? callback = null, DateTime? dateTime = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task TestEndpointParametersOrDefaultAsync(byte[] _byte, decimal number, double _double, string patternWithoutDelimiter, DateTime? date = null, System.IO.Stream? binary = null, float? _float = null, int? integer = null, int? int32 = null, long? int64 = null, string? _string = null, string? password = null, string? callback = null, DateTime? dateTime = null, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse? result = null; try { - result = await TestEndpointParametersWithHttpInfoAsync(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, password, callback, dateTime, cancellationToken).ConfigureAwait(false); + result = await TestEndpointParametersWithHttpInfoAsync(_byte, number, _double, patternWithoutDelimiter, date, binary, _float, integer, int32, int64, _string, password, callback, dateTime, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -1845,49 +2103,138 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + protected virtual (byte[], decimal, double, string, DateTime?, System.IO.Stream?, float?, int?, int?, long?, string?, string?, string?, DateTime?) OnTestEndpointParameters(byte[] _byte, decimal number, double _double, string patternWithoutDelimiter, DateTime? date, System.IO.Stream? binary, float? _float, int? integer, int? int32, long? int64, string? _string, string? password, string? callback, DateTime? dateTime) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (_byte == null) + throw new ArgumentNullException(nameof(_byte)); + + if (number == null) + throw new ArgumentNullException(nameof(number)); + + if (_double == null) + throw new ArgumentNullException(nameof(_double)); + + if (patternWithoutDelimiter == null) + throw new ArgumentNullException(nameof(patternWithoutDelimiter)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return (_byte, number, _double, patternWithoutDelimiter, date, binary, _float, integer, int32, int64, _string, password, callback, dateTime); + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + protected virtual void AfterTestEndpointParameters(ApiResponse apiResponse, byte[] _byte, decimal number, double _double, string patternWithoutDelimiter, DateTime? date, System.IO.Stream? binary, float? _float, int? integer, int? int32, long? int64, string? _string, string? password, string? callback, DateTime? dateTime) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + protected virtual void OnErrorTestEndpointParameters(Exception exception, string pathFormat, string path, byte[] _byte, decimal number, double _double, string patternWithoutDelimiter, DateTime? date, System.IO.Stream? binary, float? _float, int? integer, int? int32, long? int64, string? _string, string? password, string? callback, DateTime? dateTime) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call + /// None /// None /// None /// None - /// None + /// None (optional) + /// None (optional) + /// None (optional) /// None (optional) /// None (optional) /// None (optional) - /// None (optional) /// None (optional) - /// None (optional) - /// None (optional) /// None (optional) /// None (optional) /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// Cancellation Token to cancel the request. /// <> where T : - public async Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string? _string = null, System.IO.Stream? binary = null, DateTime? date = null, string? password = null, string? callback = null, DateTime? dateTime = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task> TestEndpointParametersWithHttpInfoAsync(byte[] _byte, decimal number, double _double, string patternWithoutDelimiter, DateTime? date = null, System.IO.Stream? binary = null, float? _float = null, int? integer = null, int? int32 = null, long? int64 = null, string? _string = null, string? password = null, string? callback = null, DateTime? dateTime = null, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (number == null) - throw new ArgumentNullException(nameof(number)); - - if (_double == null) - throw new ArgumentNullException(nameof(_double)); - - if (patternWithoutDelimiter == null) - throw new ArgumentNullException(nameof(patternWithoutDelimiter)); - - if (_byte == null) - throw new ArgumentNullException(nameof(_byte)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + var validatedParameters = OnTestEndpointParameters(_byte, number, _double, patternWithoutDelimiter, date, binary, _float, integer, int32, int64, _string, password, callback, dateTime); + _byte = validatedParameters.Item1; + number = validatedParameters.Item2; + _double = validatedParameters.Item3; + patternWithoutDelimiter = validatedParameters.Item4; + date = validatedParameters.Item5; + binary = validatedParameters.Item6; + _float = validatedParameters.Item7; + integer = validatedParameters.Item8; + int32 = validatedParameters.Item9; + int64 = validatedParameters.Item10; + _string = validatedParameters.Item11; + password = validatedParameters.Item12; + callback = validatedParameters.Item13; + dateTime = validatedParameters.Item14; using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress!.Host; uriBuilder.Port = HttpClient.BaseAddress!.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -1901,13 +2248,28 @@ namespace Org.OpenAPITools.Api multipartContent.Add(new FormUrlEncodedContent(formParams)); + formParams.Add(new KeyValuePair("byte", ClientUtils.ParameterToString(_byte))); + + + formParams.Add(new KeyValuePair("number", ClientUtils.ParameterToString(number))); + + formParams.Add(new KeyValuePair("double", ClientUtils.ParameterToString(_double))); + + formParams.Add(new KeyValuePair("pattern_without_delimiter", ClientUtils.ParameterToString(patternWithoutDelimiter))); - formParams.Add(new KeyValuePair("byte", ClientUtils.ParameterToString(_byte))); + if (date != null) + formParams.Add(new KeyValuePair("date", ClientUtils.ParameterToString(date))); + + if (binary != null) + multipartContent.Add(new StreamContent(binary)); + + if (_float != null) + formParams.Add(new KeyValuePair("float", ClientUtils.ParameterToString(_float))); if (integer != null) formParams.Add(new KeyValuePair("integer", ClientUtils.ParameterToString(integer))); @@ -1918,18 +2280,9 @@ namespace Org.OpenAPITools.Api if (int64 != null) formParams.Add(new KeyValuePair("int64", ClientUtils.ParameterToString(int64))); - if (_float != null) - formParams.Add(new KeyValuePair("float", ClientUtils.ParameterToString(_float))); - if (_string != null) formParams.Add(new KeyValuePair("string", ClientUtils.ParameterToString(_string))); - if (binary != null) - multipartContent.Add(new StreamContent(binary)); - - if (date != null) - formParams.Add(new KeyValuePair("date", ClientUtils.ParameterToString(date))); - if (password != null) formParams.Add(new KeyValuePair("password", ClientUtils.ParameterToString(password))); @@ -1941,6 +2294,8 @@ namespace Org.OpenAPITools.Api List tokens = new List(); + + request.RequestUri = uriBuilder.Uri; BasicToken basicToken = (BasicToken) await BasicTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); @@ -1956,32 +2311,25 @@ namespace Org.OpenAPITools.Api string? contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); request.Method = HttpMethod.Post; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterTestEndpointParameters(apiResponse, _byte, number, _double, patternWithoutDelimiter, date, binary, _float, integer, int32, int64, _string, password, callback, dateTime); + } else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -1992,7 +2340,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorTestEndpointParameters(e, "/fake", uriBuilder.Path, _byte, number, _double, patternWithoutDelimiter, date, binary, _float, integer, int32, int64, _string, password, callback, dateTime); throw; } } @@ -2003,17 +2351,17 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Header parameter enum test (string array) (optional) /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) + /// Query parameter enum test (double) (optional) + /// Form parameter enum test (string array) (optional, default to $) /// Header parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (string) (optional, default to -efg) - /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel the request. /// <> - public async Task TestEnumParametersAsync(List? enumHeaderStringArray = null, List? enumQueryStringArray = null, int? enumQueryInteger = null, double? enumQueryDouble = null, string? enumHeaderString = null, string? enumQueryString = null, List? enumFormStringArray = null, string? enumFormString = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task TestEnumParametersAsync(List? enumHeaderStringArray = null, List? enumQueryStringArray = null, double? enumQueryDouble = null, int? enumQueryInteger = null, List? enumFormStringArray = null, string? enumHeaderString = null, string? enumQueryString = null, string? enumFormString = null, System.Threading.CancellationToken? cancellationToken = null) { - ApiResponse result = await TestEnumParametersWithHttpInfoAsync(enumHeaderStringArray, enumQueryStringArray, enumQueryInteger, enumQueryDouble, enumHeaderString, enumQueryString, enumFormStringArray, enumFormString, cancellationToken).ConfigureAwait(false); + ApiResponse result = await TestEnumParametersWithHttpInfoAsync(enumHeaderStringArray, enumQueryStringArray, enumQueryDouble, enumQueryInteger, enumFormStringArray, enumHeaderString, enumQueryString, enumFormString, cancellationToken).ConfigureAwait(false); if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); @@ -2027,20 +2375,20 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Header parameter enum test (string array) (optional) /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) + /// Query parameter enum test (double) (optional) + /// Form parameter enum test (string array) (optional, default to $) /// Header parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (string) (optional, default to -efg) - /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel the request. /// <> - public async Task TestEnumParametersOrDefaultAsync(List? enumHeaderStringArray = null, List? enumQueryStringArray = null, int? enumQueryInteger = null, double? enumQueryDouble = null, string? enumHeaderString = null, string? enumQueryString = null, List? enumFormStringArray = null, string? enumFormString = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task TestEnumParametersOrDefaultAsync(List? enumHeaderStringArray = null, List? enumQueryStringArray = null, double? enumQueryDouble = null, int? enumQueryInteger = null, List? enumFormStringArray = null, string? enumHeaderString = null, string? enumQueryString = null, string? enumFormString = null, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse? result = null; try { - result = await TestEnumParametersWithHttpInfoAsync(enumHeaderStringArray, enumQueryStringArray, enumQueryInteger, enumQueryDouble, enumHeaderString, enumQueryString, enumFormStringArray, enumFormString, cancellationToken).ConfigureAwait(false); + result = await TestEnumParametersWithHttpInfoAsync(enumHeaderStringArray, enumQueryStringArray, enumQueryDouble, enumQueryInteger, enumFormStringArray, enumHeaderString, enumQueryString, enumFormString, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -2051,27 +2399,90 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + protected virtual (List?, List?, double?, int?, List?, string?, string?, string?) OnTestEnumParameters(List? enumHeaderStringArray, List? enumQueryStringArray, double? enumQueryDouble, int? enumQueryInteger, List? enumFormStringArray, string? enumHeaderString, string? enumQueryString, string? enumFormString) + { + return (enumHeaderStringArray, enumQueryStringArray, enumQueryDouble, enumQueryInteger, enumFormStringArray, enumHeaderString, enumQueryString, enumFormString); + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + protected virtual void AfterTestEnumParameters(ApiResponse apiResponse, List? enumHeaderStringArray, List? enumQueryStringArray, double? enumQueryDouble, int? enumQueryInteger, List? enumFormStringArray, string? enumHeaderString, string? enumQueryString, string? enumFormString) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + protected virtual void OnErrorTestEnumParameters(Exception exception, string pathFormat, string path, List? enumHeaderStringArray, List? enumQueryStringArray, double? enumQueryDouble, int? enumQueryInteger, List? enumFormStringArray, string? enumHeaderString, string? enumQueryString, string? enumFormString) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// To test enum parameters To test enum parameters /// /// Thrown when fails to make API call /// Header parameter enum test (string array) (optional) /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) + /// Query parameter enum test (double) (optional) + /// Form parameter enum test (string array) (optional, default to $) /// Header parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (string) (optional, default to -efg) - /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel the request. /// <> where T : - public async Task> TestEnumParametersWithHttpInfoAsync(List? enumHeaderStringArray = null, List? enumQueryStringArray = null, int? enumQueryInteger = null, double? enumQueryDouble = null, string? enumHeaderString = null, string? enumQueryString = null, List? enumFormStringArray = null, string? enumFormString = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task> TestEnumParametersWithHttpInfoAsync(List? enumHeaderStringArray = null, List? enumQueryStringArray = null, double? enumQueryDouble = null, int? enumQueryInteger = null, List? enumFormStringArray = null, string? enumHeaderString = null, string? enumQueryString = null, string? enumFormString = null, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { + var validatedParameters = OnTestEnumParameters(enumHeaderStringArray, enumQueryStringArray, enumQueryDouble, enumQueryInteger, enumFormStringArray, enumHeaderString, enumQueryString, enumFormString); + enumHeaderStringArray = validatedParameters.Item1; + enumQueryStringArray = validatedParameters.Item2; + enumQueryDouble = validatedParameters.Item3; + enumQueryInteger = validatedParameters.Item4; + enumFormStringArray = validatedParameters.Item5; + enumHeaderString = validatedParameters.Item6; + enumQueryString = validatedParameters.Item7; + enumFormString = validatedParameters.Item8; + using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress!.Host; uriBuilder.Port = HttpClient.BaseAddress!.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -2081,12 +2492,12 @@ namespace Org.OpenAPITools.Api if (enumQueryStringArray != null) parseQueryString["enum_query_string_array"] = Uri.EscapeDataString(enumQueryStringArray.ToString()!); - if (enumQueryInteger != null) - parseQueryString["enum_query_integer"] = Uri.EscapeDataString(enumQueryInteger.ToString()!); - if (enumQueryDouble != null) parseQueryString["enum_query_double"] = Uri.EscapeDataString(enumQueryDouble.ToString()!); + if (enumQueryInteger != null) + parseQueryString["enum_query_integer"] = Uri.EscapeDataString(enumQueryInteger.ToString()!); + if (enumQueryString != null) parseQueryString["enum_query_string"] = Uri.EscapeDataString(enumQueryString.ToString()!); @@ -2104,14 +2515,14 @@ namespace Org.OpenAPITools.Api List> formParams = new List>(); - multipartContent.Add(new FormUrlEncodedContent(formParams)); - - if (enumFormStringArray != null) + multipartContent.Add(new FormUrlEncodedContent(formParams)); if (enumFormStringArray != null) formParams.Add(new KeyValuePair("enum_form_string_array", ClientUtils.ParameterToString(enumFormStringArray))); if (enumFormString != null) formParams.Add(new KeyValuePair("enum_form_string", ClientUtils.ParameterToString(enumFormString))); + + request.RequestUri = uriBuilder.Uri; string[] contentTypes = new string[] { @@ -2121,32 +2532,25 @@ namespace Org.OpenAPITools.Api string? contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); request.Method = HttpMethod.Get; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterTestEnumParameters(apiResponse, enumHeaderStringArray, enumQueryStringArray, enumQueryDouble, enumQueryInteger, enumFormStringArray, enumHeaderString, enumQueryString, enumFormString); + } return apiResponse; } @@ -2154,7 +2558,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorTestEnumParameters(e, "/fake", uriBuilder.Path, enumHeaderStringArray, enumQueryStringArray, enumQueryDouble, enumQueryInteger, enumFormStringArray, enumHeaderString, enumQueryString, enumFormString); throw; } } @@ -2163,17 +2567,17 @@ namespace Org.OpenAPITools.Api /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) /// /// Thrown when fails to make API call - /// Required String in group parameters /// Required Boolean in group parameters + /// Required String in group parameters /// Required Integer in group parameters - /// String in group parameters (optional) /// Boolean in group parameters (optional) + /// String in group parameters (optional) /// Integer in group parameters (optional) /// Cancellation Token to cancel the request. /// <> - public async Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task TestGroupParametersAsync(bool requiredBooleanGroup, int requiredStringGroup, long requiredInt64Group, bool? booleanGroup = null, int? stringGroup = null, long? int64Group = null, System.Threading.CancellationToken? cancellationToken = null) { - ApiResponse result = await TestGroupParametersWithHttpInfoAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, cancellationToken).ConfigureAwait(false); + ApiResponse result = await TestGroupParametersWithHttpInfoAsync(requiredBooleanGroup, requiredStringGroup, requiredInt64Group, booleanGroup, stringGroup, int64Group, cancellationToken).ConfigureAwait(false); if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); @@ -2185,20 +2589,20 @@ namespace Org.OpenAPITools.Api /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) /// /// Thrown when fails to make API call - /// Required String in group parameters /// Required Boolean in group parameters + /// Required String in group parameters /// Required Integer in group parameters - /// String in group parameters (optional) /// Boolean in group parameters (optional) + /// String in group parameters (optional) /// Integer in group parameters (optional) /// Cancellation Token to cancel the request. /// <> - public async Task TestGroupParametersOrDefaultAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task TestGroupParametersOrDefaultAsync(bool requiredBooleanGroup, int requiredStringGroup, long requiredInt64Group, bool? booleanGroup = null, int? stringGroup = null, long? int64Group = null, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse? result = null; try { - result = await TestGroupParametersWithHttpInfoAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, cancellationToken).ConfigureAwait(false); + result = await TestGroupParametersWithHttpInfoAsync(requiredBooleanGroup, requiredStringGroup, requiredInt64Group, booleanGroup, stringGroup, int64Group, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -2209,38 +2613,95 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + /// + /// + /// + /// + /// + protected virtual (bool, int, long, bool?, int?, long?) OnTestGroupParameters(bool requiredBooleanGroup, int requiredStringGroup, long requiredInt64Group, bool? booleanGroup, int? stringGroup, long? int64Group) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (requiredBooleanGroup == null) + throw new ArgumentNullException(nameof(requiredBooleanGroup)); + + if (requiredStringGroup == null) + throw new ArgumentNullException(nameof(requiredStringGroup)); + + if (requiredInt64Group == null) + throw new ArgumentNullException(nameof(requiredInt64Group)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return (requiredBooleanGroup, requiredStringGroup, requiredInt64Group, booleanGroup, stringGroup, int64Group); + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + /// + /// + /// + protected virtual void AfterTestGroupParameters(ApiResponse apiResponse, bool requiredBooleanGroup, int requiredStringGroup, long requiredInt64Group, bool? booleanGroup, int? stringGroup, long? int64Group) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + protected virtual void OnErrorTestGroupParameters(Exception exception, string pathFormat, string path, bool requiredBooleanGroup, int requiredStringGroup, long requiredInt64Group, bool? booleanGroup, int? stringGroup, long? int64Group) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) /// /// Thrown when fails to make API call - /// Required String in group parameters /// Required Boolean in group parameters + /// Required String in group parameters /// Required Integer in group parameters - /// String in group parameters (optional) /// Boolean in group parameters (optional) + /// String in group parameters (optional) /// Integer in group parameters (optional) /// Cancellation Token to cancel the request. /// <> where T : - public async Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task> TestGroupParametersWithHttpInfoAsync(bool requiredBooleanGroup, int requiredStringGroup, long requiredInt64Group, bool? booleanGroup = null, int? stringGroup = null, long? int64Group = null, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (requiredStringGroup == null) - throw new ArgumentNullException(nameof(requiredStringGroup)); - - if (requiredBooleanGroup == null) - throw new ArgumentNullException(nameof(requiredBooleanGroup)); - - if (requiredInt64Group == null) - throw new ArgumentNullException(nameof(requiredInt64Group)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + var validatedParameters = OnTestGroupParameters(requiredBooleanGroup, requiredStringGroup, requiredInt64Group, booleanGroup, stringGroup, int64Group); + requiredBooleanGroup = validatedParameters.Item1; + requiredStringGroup = validatedParameters.Item2; + requiredInt64Group = validatedParameters.Item3; + booleanGroup = validatedParameters.Item4; + stringGroup = validatedParameters.Item5; + int64Group = validatedParameters.Item6; using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress!.Host; uriBuilder.Port = HttpClient.BaseAddress!.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -2266,6 +2727,8 @@ namespace Org.OpenAPITools.Api List tokens = new List(); + + request.RequestUri = uriBuilder.Uri; BearerToken bearerToken = (BearerToken) await BearerTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); @@ -2276,28 +2739,21 @@ namespace Org.OpenAPITools.Api request.Method = HttpMethod.Delete; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterTestGroupParameters(apiResponse, requiredBooleanGroup, requiredStringGroup, requiredInt64Group, booleanGroup, stringGroup, int64Group); + } else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -2308,7 +2764,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorTestGroupParameters(e, "/fake", uriBuilder.Path, requiredBooleanGroup, requiredStringGroup, requiredInt64Group, booleanGroup, stringGroup, int64Group); throw; } } @@ -2320,7 +2776,7 @@ namespace Org.OpenAPITools.Api /// request body /// Cancellation Token to cancel the request. /// <> - public async Task TestInlineAdditionalPropertiesAsync(Dictionary requestBody, System.Threading.CancellationToken? cancellationToken = null) + public async Task TestInlineAdditionalPropertiesAsync(Dictionary requestBody, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await TestInlineAdditionalPropertiesWithHttpInfoAsync(requestBody, cancellationToken).ConfigureAwait(false); @@ -2353,6 +2809,46 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual Dictionary OnTestInlineAdditionalProperties(Dictionary requestBody) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (requestBody == null) + throw new ArgumentNullException(nameof(requestBody)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return requestBody; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterTestInlineAdditionalProperties(ApiResponse apiResponse, Dictionary requestBody) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorTestInlineAdditionalProperties(Exception exception, string pathFormat, string path, Dictionary requestBody) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// test inline additionalProperties /// @@ -2362,18 +2858,14 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> TestInlineAdditionalPropertiesWithHttpInfoAsync(Dictionary requestBody, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (requestBody == null) - throw new ArgumentNullException(nameof(requestBody)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + requestBody = OnTestInlineAdditionalProperties(requestBody); using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress!.Host; uriBuilder.Port = HttpClient.BaseAddress!.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -2383,6 +2875,8 @@ namespace Org.OpenAPITools.Api ? request.Content = new StreamContent(stream) : request.Content = new StringContent(JsonSerializer.Serialize(requestBody, _jsonSerializerOptions)); + + request.RequestUri = uriBuilder.Uri; string[] contentTypes = new string[] { @@ -2392,32 +2886,25 @@ namespace Org.OpenAPITools.Api string? contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); request.Method = HttpMethod.Post; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/inline-additionalProperties", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/inline-additionalProperties")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterTestInlineAdditionalProperties(apiResponse, requestBody); + } return apiResponse; } @@ -2425,7 +2912,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorTestInlineAdditionalProperties(e, "/fake/inline-additionalProperties", uriBuilder.Path, requestBody); throw; } } @@ -2438,7 +2925,7 @@ namespace Org.OpenAPITools.Api /// field2 /// Cancellation Token to cancel the request. /// <> - public async Task TestJsonFormDataAsync(string param, string param2, System.Threading.CancellationToken? cancellationToken = null) + public async Task TestJsonFormDataAsync(string param, string param2, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await TestJsonFormDataWithHttpInfoAsync(param, param2, cancellationToken).ConfigureAwait(false); @@ -2472,6 +2959,52 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + /// + protected virtual (string, string) OnTestJsonFormData(string param, string param2) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (param == null) + throw new ArgumentNullException(nameof(param)); + + if (param2 == null) + throw new ArgumentNullException(nameof(param2)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return (param, param2); + } + + /// + /// Processes the server response + /// + /// + /// + /// + protected virtual void AfterTestJsonFormData(ApiResponse apiResponse, string param, string param2) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + /// + protected virtual void OnErrorTestJsonFormData(Exception exception, string pathFormat, string path, string param, string param2) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// test json serialization of form data /// @@ -2482,21 +3015,16 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> TestJsonFormDataWithHttpInfoAsync(string param, string param2, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (param == null) - throw new ArgumentNullException(nameof(param)); - - if (param2 == null) - throw new ArgumentNullException(nameof(param2)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + var validatedParameters = OnTestJsonFormData(param, param2); + param = validatedParameters.Item1; + param2 = validatedParameters.Item2; using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress!.Host; uriBuilder.Port = HttpClient.BaseAddress!.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -2512,8 +3040,12 @@ namespace Org.OpenAPITools.Api formParams.Add(new KeyValuePair("param", ClientUtils.ParameterToString(param))); + + formParams.Add(new KeyValuePair("param2", ClientUtils.ParameterToString(param2))); + + request.RequestUri = uriBuilder.Uri; string[] contentTypes = new string[] { @@ -2523,32 +3055,25 @@ namespace Org.OpenAPITools.Api string? contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); request.Method = HttpMethod.Get; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/jsonFormData", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/jsonFormData")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterTestJsonFormData(apiResponse, param, param2); + } return apiResponse; } @@ -2556,7 +3081,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorTestJsonFormData(e, "/fake/jsonFormData", uriBuilder.Path, param, param2); throw; } } @@ -2572,7 +3097,7 @@ namespace Org.OpenAPITools.Api /// /// Cancellation Token to cancel the request. /// <> - public async Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, System.Threading.CancellationToken? cancellationToken = null) + public async Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await TestQueryParameterCollectionFormatWithHttpInfoAsync(pipe, ioutil, http, url, context, cancellationToken).ConfigureAwait(false); @@ -2609,6 +3134,70 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + /// + /// + /// + /// + protected virtual (List, List, List, List, List) OnTestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (pipe == null) + throw new ArgumentNullException(nameof(pipe)); + + if (ioutil == null) + throw new ArgumentNullException(nameof(ioutil)); + + if (http == null) + throw new ArgumentNullException(nameof(http)); + + if (url == null) + throw new ArgumentNullException(nameof(url)); + + if (context == null) + throw new ArgumentNullException(nameof(context)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return (pipe, ioutil, http, url, context); + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + /// + /// + protected virtual void AfterTestQueryParameterCollectionFormat(ApiResponse apiResponse, List pipe, List ioutil, List http, List url, List context) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + /// + /// + /// + /// + protected virtual void OnErrorTestQueryParameterCollectionFormat(Exception exception, string pathFormat, string path, List pipe, List ioutil, List http, List url, List context) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// To test the collection format in query parameters /// @@ -2622,30 +3211,19 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> TestQueryParameterCollectionFormatWithHttpInfoAsync(List pipe, List ioutil, List http, List url, List context, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (pipe == null) - throw new ArgumentNullException(nameof(pipe)); - - if (ioutil == null) - throw new ArgumentNullException(nameof(ioutil)); - - if (http == null) - throw new ArgumentNullException(nameof(http)); - - if (url == null) - throw new ArgumentNullException(nameof(url)); - - if (context == null) - throw new ArgumentNullException(nameof(context)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + var validatedParameters = OnTestQueryParameterCollectionFormat(pipe, ioutil, http, url, context); + pipe = validatedParameters.Item1; + ioutil = validatedParameters.Item2; + http = validatedParameters.Item3; + url = validatedParameters.Item4; + context = validatedParameters.Item5; using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress!.Host; uriBuilder.Port = HttpClient.BaseAddress!.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -2661,32 +3239,27 @@ namespace Org.OpenAPITools.Api uriBuilder.Query = parseQueryString.ToString(); + + request.RequestUri = uriBuilder.Uri; request.Method = HttpMethod.Put; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/test-query-parameters", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/test-query-parameters")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterTestQueryParameterCollectionFormat(apiResponse, pipe, ioutil, http, url, context); + } return apiResponse; } @@ -2694,8 +3267,9 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorTestQueryParameterCollectionFormat(e, "/fake/test-query-parameters", uriBuilder.Path, pipe, ioutil, http, url, context); throw; } - } } + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs index 631e6abe15..4bdb85c720 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs @@ -21,10 +21,11 @@ using System.Text.Json; using Org.OpenAPITools.Client; using Org.OpenAPITools.Model; -namespace Org.OpenAPITools.Api +namespace Org.OpenAPITools.IApi { /// /// Represents a collection of functions to interact with the API endpoints + /// This class is registered as transient. /// public interface IFakeClassnameTags123Api : IApi { @@ -50,7 +51,7 @@ namespace Org.OpenAPITools.Api /// client model /// Cancellation Token to cancel the request. /// Task of ApiResponse<ModelClient> - Task TestClassnameAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null); + Task TestClassnameAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null); /// /// To test class name in snake case @@ -62,22 +63,18 @@ namespace Org.OpenAPITools.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse<ModelClient?> Task TestClassnameOrDefaultAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null); + } +} - } - +namespace Org.OpenAPITools.Api +{ /// /// Represents a collection of functions to interact with the API endpoints /// - public partial class FakeClassnameTags123Api : IFakeClassnameTags123Api + public partial class FakeClassnameTags123Api : IApi.IFakeClassnameTags123Api { private JsonSerializerOptions _jsonSerializerOptions; - /// - /// An event to track the health of the server. - /// If you store these event args, be sure to purge old event args to prevent a memory leak. - /// - public event ClientUtils.EventHandler? ApiResponded; - /// /// The logger /// @@ -134,6 +131,15 @@ namespace Org.OpenAPITools.Api OauthTokenProvider = oauthTokenProvider; } + /// + /// Logs the api response + /// + /// + protected virtual void OnApiResponded(ApiResponseEventArgs args) + { + Logger.LogInformation("{0,-9} | {1} | {3}", (args.ReceivedAt - args.RequestedAt).TotalSeconds, args.HttpStatus, args.Path); + } + /// /// To test class name in snake case To test class name in snake case /// @@ -141,7 +147,7 @@ namespace Org.OpenAPITools.Api /// client model /// Cancellation Token to cancel the request. /// <> - public async Task TestClassnameAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null) + public async Task TestClassnameAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await TestClassnameWithHttpInfoAsync(modelClient, cancellationToken).ConfigureAwait(false); @@ -174,6 +180,46 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual ModelClient OnTestClassname(ModelClient modelClient) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (modelClient == null) + throw new ArgumentNullException(nameof(modelClient)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return modelClient; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterTestClassname(ApiResponse apiResponse, ModelClient modelClient) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorTestClassname(Exception exception, string pathFormat, string path, ModelClient modelClient) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// To test class name in snake case To test class name in snake case /// @@ -183,26 +229,22 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> TestClassnameWithHttpInfoAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (modelClient == null) - throw new ArgumentNullException(nameof(modelClient)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + modelClient = OnTestClassname(modelClient); using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress!.Host; uriBuilder.Port = HttpClient.BaseAddress!.Port; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/fake_classname_test"; - System.Collections.Specialized.NameValueCollection parseQueryString = System.Web.HttpUtility.ParseQueryString(string.Empty); - request.Content = (modelClient as object) is System.IO.Stream stream + + System.Collections.Specialized.NameValueCollection parseQueryString = System.Web.HttpUtility.ParseQueryString(string.Empty); request.Content = (modelClient as object) is System.IO.Stream stream ? request.Content = new StreamContent(stream) : request.Content = new StringContent(JsonSerializer.Serialize(modelClient, _jsonSerializerOptions)); @@ -225,7 +267,7 @@ namespace Org.OpenAPITools.Api string? contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); string[] accepts = new string[] { "application/json" @@ -235,31 +277,24 @@ namespace Org.OpenAPITools.Api if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - + request.Method = HttpMethod.Patch; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake_classname_test", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake_classname_test")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterTestClassname(apiResponse, modelClient); + } else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -270,8 +305,9 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorTestClassname(e, "/fake_classname_test", uriBuilder.Path, modelClient); throw; } - } } + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/IApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/IApi.cs new file mode 100644 index 0000000000..038f19bcfa --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/IApi.cs @@ -0,0 +1,15 @@ +using System.Net.Http; + +namespace Org.OpenAPITools.IApi +{ + /// + /// Any Api client + /// + public interface IApi + { + /// + /// The HttpClient + /// + HttpClient HttpClient { get; } + } +} \ No newline at end of file diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/PetApi.cs index b86139fcd5..0e46e92ad0 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/PetApi.cs @@ -21,10 +21,11 @@ using System.Text.Json; using Org.OpenAPITools.Client; using Org.OpenAPITools.Model; -namespace Org.OpenAPITools.Api +namespace Org.OpenAPITools.IApi { /// /// Represents a collection of functions to interact with the API endpoints + /// This class is registered as transient. /// public interface IPetApi : IApi { @@ -50,7 +51,7 @@ namespace Org.OpenAPITools.Api /// Pet object that needs to be added to the store /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> - Task AddPetAsync(Pet pet, System.Threading.CancellationToken? cancellationToken = null); + Task AddPetAsync(Pet pet, System.Threading.CancellationToken? cancellationToken = null); /// /// Add a new pet to the store @@ -63,7 +64,6 @@ namespace Org.OpenAPITools.Api /// Task of ApiResponse<object?> Task AddPetOrDefaultAsync(Pet pet, System.Threading.CancellationToken? cancellationToken = null); - /// /// Deletes a pet /// @@ -88,7 +88,7 @@ namespace Org.OpenAPITools.Api /// (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> - Task DeletePetAsync(long petId, string? apiKey = null, System.Threading.CancellationToken? cancellationToken = null); + Task DeletePetAsync(long petId, string? apiKey = null, System.Threading.CancellationToken? cancellationToken = null); /// /// Deletes a pet @@ -102,7 +102,6 @@ namespace Org.OpenAPITools.Api /// Task of ApiResponse<object?> Task DeletePetOrDefaultAsync(long petId, string? apiKey = null, System.Threading.CancellationToken? cancellationToken = null); - /// /// Finds Pets by status /// @@ -125,7 +124,7 @@ namespace Org.OpenAPITools.Api /// Status values that need to be considered for filter /// Cancellation Token to cancel the request. /// Task of ApiResponse<List<Pet>> - Task?> FindPetsByStatusAsync(List status, System.Threading.CancellationToken? cancellationToken = null); + Task> FindPetsByStatusAsync(List status, System.Threading.CancellationToken? cancellationToken = null); /// /// Finds Pets by status @@ -138,7 +137,6 @@ namespace Org.OpenAPITools.Api /// Task of ApiResponse<List<Pet>?> Task?> FindPetsByStatusOrDefaultAsync(List status, System.Threading.CancellationToken? cancellationToken = null); - /// /// Finds Pets by tags /// @@ -161,7 +159,7 @@ namespace Org.OpenAPITools.Api /// Tags to filter by /// Cancellation Token to cancel the request. /// Task of ApiResponse<List<Pet>> - Task?> FindPetsByTagsAsync(List tags, System.Threading.CancellationToken? cancellationToken = null); + Task> FindPetsByTagsAsync(List tags, System.Threading.CancellationToken? cancellationToken = null); /// /// Finds Pets by tags @@ -174,7 +172,6 @@ namespace Org.OpenAPITools.Api /// Task of ApiResponse<List<Pet>?> Task?> FindPetsByTagsOrDefaultAsync(List tags, System.Threading.CancellationToken? cancellationToken = null); - /// /// Find pet by ID /// @@ -197,7 +194,7 @@ namespace Org.OpenAPITools.Api /// ID of pet to return /// Cancellation Token to cancel the request. /// Task of ApiResponse<Pet> - Task GetPetByIdAsync(long petId, System.Threading.CancellationToken? cancellationToken = null); + Task GetPetByIdAsync(long petId, System.Threading.CancellationToken? cancellationToken = null); /// /// Find pet by ID @@ -210,7 +207,6 @@ namespace Org.OpenAPITools.Api /// Task of ApiResponse<Pet?> Task GetPetByIdOrDefaultAsync(long petId, System.Threading.CancellationToken? cancellationToken = null); - /// /// Update an existing pet /// @@ -233,7 +229,7 @@ namespace Org.OpenAPITools.Api /// Pet object that needs to be added to the store /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> - Task UpdatePetAsync(Pet pet, System.Threading.CancellationToken? cancellationToken = null); + Task UpdatePetAsync(Pet pet, System.Threading.CancellationToken? cancellationToken = null); /// /// Update an existing pet @@ -246,7 +242,6 @@ namespace Org.OpenAPITools.Api /// Task of ApiResponse<object?> Task UpdatePetOrDefaultAsync(Pet pet, System.Threading.CancellationToken? cancellationToken = null); - /// /// Updates a pet in the store with form data /// @@ -273,7 +268,7 @@ namespace Org.OpenAPITools.Api /// Updated status of the pet (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> - Task UpdatePetWithFormAsync(long petId, string? name = null, string? status = null, System.Threading.CancellationToken? cancellationToken = null); + Task UpdatePetWithFormAsync(long petId, string? name = null, string? status = null, System.Threading.CancellationToken? cancellationToken = null); /// /// Updates a pet in the store with form data @@ -288,7 +283,6 @@ namespace Org.OpenAPITools.Api /// Task of ApiResponse<object?> Task UpdatePetWithFormOrDefaultAsync(long petId, string? name = null, string? status = null, System.Threading.CancellationToken? cancellationToken = null); - /// /// uploads an image /// @@ -297,53 +291,38 @@ namespace Org.OpenAPITools.Api /// /// Thrown when fails to make API call /// ID of pet to update - /// Additional data to pass to server (optional) /// file to upload (optional) - /// Cancellation Token to cancel the request. - /// Task<ApiResponse<ApiResponse?>> - Task> UploadFileWithHttpInfoAsync(long petId, string? additionalMetadata = null, System.IO.Stream? file = null, System.Threading.CancellationToken? cancellationToken = null); - - /// - /// uploads an image - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// Additional data to pass to server (optional) - /// file to upload (optional) - /// Cancellation Token to cancel the request. - /// Task of ApiResponse<ApiResponse> - Task UploadFileAsync(long petId, string? additionalMetadata = null, System.IO.Stream? file = null, System.Threading.CancellationToken? cancellationToken = null); - - /// - /// uploads an image - /// - /// - /// - /// - /// ID of pet to update - /// Additional data to pass to server (optional) - /// file to upload (optional) - /// Cancellation Token to cancel the request. - /// Task of ApiResponse<ApiResponse?> - Task UploadFileOrDefaultAsync(long petId, string? additionalMetadata = null, System.IO.Stream? file = null, System.Threading.CancellationToken? cancellationToken = null); - - - /// - /// uploads an image (required) - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload /// Additional data to pass to server (optional) /// Cancellation Token to cancel the request. /// Task<ApiResponse<ApiResponse?>> - Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, string? additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null); + Task> UploadFileWithHttpInfoAsync(long petId, System.IO.Stream? file = null, string? additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null); + + /// + /// uploads an image + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload (optional) + /// Additional data to pass to server (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse<ApiResponse> + Task UploadFileAsync(long petId, System.IO.Stream? file = null, string? additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null); + + /// + /// uploads an image + /// + /// + /// + /// + /// ID of pet to update + /// file to upload (optional) + /// Additional data to pass to server (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse<ApiResponse?> + Task UploadFileOrDefaultAsync(long petId, System.IO.Stream? file = null, string? additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null); /// /// uploads an image (required) @@ -352,12 +331,12 @@ namespace Org.OpenAPITools.Api /// /// /// Thrown when fails to make API call - /// ID of pet to update /// file to upload + /// ID of pet to update /// Additional data to pass to server (optional) /// Cancellation Token to cancel the request. - /// Task of ApiResponse<ApiResponse> - Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, string? additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null); + /// Task<ApiResponse<ApiResponse?>> + Task> UploadFileWithRequiredFileWithHttpInfoAsync(System.IO.Stream requiredFile, long petId, string? additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null); /// /// uploads an image (required) @@ -365,28 +344,38 @@ namespace Org.OpenAPITools.Api /// /// /// - /// ID of pet to update + /// Thrown when fails to make API call /// file to upload + /// ID of pet to update + /// Additional data to pass to server (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse<ApiResponse> + Task UploadFileWithRequiredFileAsync(System.IO.Stream requiredFile, long petId, string? additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null); + + /// + /// uploads an image (required) + /// + /// + /// + /// + /// file to upload + /// ID of pet to update /// Additional data to pass to server (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse<ApiResponse?> - Task UploadFileWithRequiredFileOrDefaultAsync(long petId, System.IO.Stream requiredFile, string? additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null); - - } + Task UploadFileWithRequiredFileOrDefaultAsync(System.IO.Stream requiredFile, long petId, string? additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null); + } +} +namespace Org.OpenAPITools.Api +{ /// /// Represents a collection of functions to interact with the API endpoints /// - public partial class PetApi : IPetApi + public partial class PetApi : IApi.IPetApi { private JsonSerializerOptions _jsonSerializerOptions; - /// - /// An event to track the health of the server. - /// If you store these event args, be sure to purge old event args to prevent a memory leak. - /// - public event ClientUtils.EventHandler? ApiResponded; - /// /// The logger /// @@ -443,6 +432,15 @@ namespace Org.OpenAPITools.Api OauthTokenProvider = oauthTokenProvider; } + /// + /// Logs the api response + /// + /// + protected virtual void OnApiResponded(ApiResponseEventArgs args) + { + Logger.LogInformation("{0,-9} | {1} | {3}", (args.ReceivedAt - args.RequestedAt).TotalSeconds, args.HttpStatus, args.Path); + } + /// /// Add a new pet to the store /// @@ -450,7 +448,7 @@ namespace Org.OpenAPITools.Api /// Pet object that needs to be added to the store /// Cancellation Token to cancel the request. /// <> - public async Task AddPetAsync(Pet pet, System.Threading.CancellationToken? cancellationToken = null) + public async Task AddPetAsync(Pet pet, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await AddPetWithHttpInfoAsync(pet, cancellationToken).ConfigureAwait(false); @@ -483,6 +481,46 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual Pet OnAddPet(Pet pet) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (pet == null) + throw new ArgumentNullException(nameof(pet)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return pet; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterAddPet(ApiResponse apiResponse, Pet pet) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorAddPet(Exception exception, string pathFormat, string path, Pet pet) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Add a new pet to the store /// @@ -492,22 +530,18 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> AddPetWithHttpInfoAsync(Pet pet, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (pet == null) - throw new ArgumentNullException(nameof(pet)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + pet = OnAddPet(pet); using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); - uriBuilder.Host = HttpClient.BaseAddress!.Host; - uriBuilder.Port = HttpClient.BaseAddress!.Port; - uriBuilder.Scheme = ClientUtils.SCHEME; - uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/pet"; + var url = request.RequestUri = new Uri("http://petstore.swagger.io/v2"); + uriBuilder.Host = url.Authority; + uriBuilder.Scheme = url.Scheme; + uriBuilder.Path = url.AbsolutePath; request.Content = (pet as object) is System.IO.Stream stream ? request.Content = new StreamContent(stream) @@ -515,6 +549,8 @@ namespace Org.OpenAPITools.Api List tokens = new List(); + + request.RequestUri = uriBuilder.Uri; HttpSignatureToken signatureToken = (HttpSignatureToken) await HttpSignatureTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); @@ -539,32 +575,25 @@ namespace Org.OpenAPITools.Api string? contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); request.Method = HttpMethod.Post; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/pet", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/pet")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterAddPet(apiResponse, pet); + } else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -578,7 +607,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorAddPet(e, "/pet", uriBuilder.Path, pet); throw; } } @@ -591,7 +620,7 @@ namespace Org.OpenAPITools.Api /// (optional) /// Cancellation Token to cancel the request. /// <> - public async Task DeletePetAsync(long petId, string? apiKey = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task DeletePetAsync(long petId, string? apiKey = null, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await DeletePetWithHttpInfoAsync(petId, apiKey, cancellationToken).ConfigureAwait(false); @@ -625,6 +654,49 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + /// + protected virtual (long, string?) OnDeletePet(long petId, string? apiKey) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (petId == null) + throw new ArgumentNullException(nameof(petId)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return (petId, apiKey); + } + + /// + /// Processes the server response + /// + /// + /// + /// + protected virtual void AfterDeletePet(ApiResponse apiResponse, long petId, string? apiKey) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + /// + protected virtual void OnErrorDeletePet(Exception exception, string pathFormat, string path, long petId, string? apiKey) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Deletes a pet /// @@ -635,29 +707,28 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> DeletePetWithHttpInfoAsync(long petId, string? apiKey = null, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (petId == null) - throw new ArgumentNullException(nameof(petId)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + var validatedParameters = OnDeletePet(petId, apiKey); + petId = validatedParameters.Item1; + apiKey = validatedParameters.Item2; using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress!.Host; uriBuilder.Port = HttpClient.BaseAddress!.Port; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/pet/{petId}"; - uriBuilder.Path = uriBuilder.Path.Replace("%7BpetId%7D", Uri.EscapeDataString(petId.ToString())); - if (apiKey != null) + uriBuilder.Path = uriBuilder.Path.Replace("%7BpetId%7D", Uri.EscapeDataString(petId.ToString())); if (apiKey != null) request.Headers.Add("api_key", ClientUtils.ParameterToString(apiKey)); List tokens = new List(); + + request.RequestUri = uriBuilder.Uri; OAuthToken oauthToken = (OAuthToken) await OauthTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); @@ -668,28 +739,21 @@ namespace Org.OpenAPITools.Api request.Method = HttpMethod.Delete; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/pet/{petId}", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/pet/{petId}")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterDeletePet(apiResponse, petId, apiKey); + } else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -700,7 +764,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorDeletePet(e, "/pet/{petId}", uriBuilder.Path, petId, apiKey); throw; } } @@ -712,7 +776,7 @@ namespace Org.OpenAPITools.Api /// Status values that need to be considered for filter /// Cancellation Token to cancel the request. /// <> - public async Task?> FindPetsByStatusAsync(List status, System.Threading.CancellationToken? cancellationToken = null) + public async Task> FindPetsByStatusAsync(List status, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse?> result = await FindPetsByStatusWithHttpInfoAsync(status, cancellationToken).ConfigureAwait(false); @@ -745,6 +809,46 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual List OnFindPetsByStatus(List status) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (status == null) + throw new ArgumentNullException(nameof(status)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return status; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterFindPetsByStatus(ApiResponse?> apiResponse, List status) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorFindPetsByStatus(Exception exception, string pathFormat, string path, List status) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Finds Pets by status Multiple status values can be provided with comma separated strings /// @@ -754,18 +858,14 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task?>> FindPetsByStatusWithHttpInfoAsync(List status, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (status == null) - throw new ArgumentNullException(nameof(status)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + status = OnFindPetsByStatus(status); using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress!.Host; uriBuilder.Port = HttpClient.BaseAddress!.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -779,6 +879,8 @@ namespace Org.OpenAPITools.Api List tokens = new List(); + + request.RequestUri = uriBuilder.Uri; HttpSignatureToken signatureToken = (HttpSignatureToken) await HttpSignatureTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); @@ -804,31 +906,24 @@ namespace Org.OpenAPITools.Api if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - + request.Method = HttpMethod.Get; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/pet/findByStatus", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/pet/findByStatus")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse?> apiResponse = new ApiResponse?>(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize>(apiResponse.RawContent, _jsonSerializerOptions); + AfterFindPetsByStatus(apiResponse, status); + } else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -842,7 +937,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorFindPetsByStatus(e, "/pet/findByStatus", uriBuilder.Path, status); throw; } } @@ -854,7 +949,7 @@ namespace Org.OpenAPITools.Api /// Tags to filter by /// Cancellation Token to cancel the request. /// <> - public async Task?> FindPetsByTagsAsync(List tags, System.Threading.CancellationToken? cancellationToken = null) + public async Task> FindPetsByTagsAsync(List tags, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse?> result = await FindPetsByTagsWithHttpInfoAsync(tags, cancellationToken).ConfigureAwait(false); @@ -887,6 +982,46 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual List OnFindPetsByTags(List tags) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (tags == null) + throw new ArgumentNullException(nameof(tags)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return tags; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterFindPetsByTags(ApiResponse?> apiResponse, List tags) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorFindPetsByTags(Exception exception, string pathFormat, string path, List tags) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. /// @@ -896,18 +1031,14 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task?>> FindPetsByTagsWithHttpInfoAsync(List tags, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (tags == null) - throw new ArgumentNullException(nameof(tags)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + tags = OnFindPetsByTags(tags); using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress!.Host; uriBuilder.Port = HttpClient.BaseAddress!.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -921,6 +1052,8 @@ namespace Org.OpenAPITools.Api List tokens = new List(); + + request.RequestUri = uriBuilder.Uri; HttpSignatureToken signatureToken = (HttpSignatureToken) await HttpSignatureTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); @@ -946,31 +1079,24 @@ namespace Org.OpenAPITools.Api if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - + request.Method = HttpMethod.Get; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/pet/findByTags", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/pet/findByTags")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse?> apiResponse = new ApiResponse?>(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize>(apiResponse.RawContent, _jsonSerializerOptions); + AfterFindPetsByTags(apiResponse, tags); + } else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -984,7 +1110,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorFindPetsByTags(e, "/pet/findByTags", uriBuilder.Path, tags); throw; } } @@ -996,7 +1122,7 @@ namespace Org.OpenAPITools.Api /// ID of pet to return /// Cancellation Token to cancel the request. /// <> - public async Task GetPetByIdAsync(long petId, System.Threading.CancellationToken? cancellationToken = null) + public async Task GetPetByIdAsync(long petId, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await GetPetByIdWithHttpInfoAsync(petId, cancellationToken).ConfigureAwait(false); @@ -1029,6 +1155,46 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual long OnGetPetById(long petId) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (petId == null) + throw new ArgumentNullException(nameof(petId)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return petId; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterGetPetById(ApiResponse apiResponse, long petId) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorGetPetById(Exception exception, string pathFormat, string path, long petId) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Find pet by ID Returns a single pet /// @@ -1038,25 +1204,20 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> GetPetByIdWithHttpInfoAsync(long petId, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (petId == null) - throw new ArgumentNullException(nameof(petId)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + petId = OnGetPetById(petId); using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress!.Host; uriBuilder.Port = HttpClient.BaseAddress!.Port; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/pet/{petId}"; - uriBuilder.Path = uriBuilder.Path.Replace("%7BpetId%7D", Uri.EscapeDataString(petId.ToString())); - List tokens = new List(); + uriBuilder.Path = uriBuilder.Path.Replace("%7BpetId%7D", Uri.EscapeDataString(petId.ToString())); List tokens = new List(); ApiKeyToken apiKey = (ApiKeyToken) await ApiKeyProvider.GetAsync(cancellationToken).ConfigureAwait(false); @@ -1075,31 +1236,24 @@ namespace Org.OpenAPITools.Api if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - + request.Method = HttpMethod.Get; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/pet/{petId}", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/pet/{petId}")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterGetPetById(apiResponse, petId); + } else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -1110,7 +1264,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorGetPetById(e, "/pet/{petId}", uriBuilder.Path, petId); throw; } } @@ -1122,7 +1276,7 @@ namespace Org.OpenAPITools.Api /// Pet object that needs to be added to the store /// Cancellation Token to cancel the request. /// <> - public async Task UpdatePetAsync(Pet pet, System.Threading.CancellationToken? cancellationToken = null) + public async Task UpdatePetAsync(Pet pet, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await UpdatePetWithHttpInfoAsync(pet, cancellationToken).ConfigureAwait(false); @@ -1155,6 +1309,46 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual Pet OnUpdatePet(Pet pet) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (pet == null) + throw new ArgumentNullException(nameof(pet)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return pet; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterUpdatePet(ApiResponse apiResponse, Pet pet) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorUpdatePet(Exception exception, string pathFormat, string path, Pet pet) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Update an existing pet /// @@ -1164,22 +1358,18 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> UpdatePetWithHttpInfoAsync(Pet pet, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (pet == null) - throw new ArgumentNullException(nameof(pet)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + pet = OnUpdatePet(pet); using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); - uriBuilder.Host = HttpClient.BaseAddress!.Host; - uriBuilder.Port = HttpClient.BaseAddress!.Port; - uriBuilder.Scheme = ClientUtils.SCHEME; - uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/pet"; + var url = request.RequestUri = new Uri("http://petstore.swagger.io/v2"); + uriBuilder.Host = url.Authority; + uriBuilder.Scheme = url.Scheme; + uriBuilder.Path = url.AbsolutePath; request.Content = (pet as object) is System.IO.Stream stream ? request.Content = new StreamContent(stream) @@ -1187,6 +1377,8 @@ namespace Org.OpenAPITools.Api List tokens = new List(); + + request.RequestUri = uriBuilder.Uri; HttpSignatureToken signatureToken = (HttpSignatureToken) await HttpSignatureTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); @@ -1211,32 +1403,25 @@ namespace Org.OpenAPITools.Api string? contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); request.Method = HttpMethod.Put; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/pet", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/pet")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterUpdatePet(apiResponse, pet); + } else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -1250,7 +1435,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorUpdatePet(e, "/pet", uriBuilder.Path, pet); throw; } } @@ -1264,7 +1449,7 @@ namespace Org.OpenAPITools.Api /// Updated status of the pet (optional) /// Cancellation Token to cancel the request. /// <> - public async Task UpdatePetWithFormAsync(long petId, string? name = null, string? status = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task UpdatePetWithFormAsync(long petId, string? name = null, string? status = null, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await UpdatePetWithFormWithHttpInfoAsync(petId, name, status, cancellationToken).ConfigureAwait(false); @@ -1299,6 +1484,52 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + /// + /// + protected virtual (long, string?, string?) OnUpdatePetWithForm(long petId, string? name, string? status) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (petId == null) + throw new ArgumentNullException(nameof(petId)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return (petId, name, status); + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void AfterUpdatePetWithForm(ApiResponse apiResponse, long petId, string? name, string? status) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + /// + /// + protected virtual void OnErrorUpdatePetWithForm(Exception exception, string pathFormat, string path, long petId, string? name, string? status) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Updates a pet in the store with form data /// @@ -1310,33 +1541,29 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> UpdatePetWithFormWithHttpInfoAsync(long petId, string? name = null, string? status = null, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (petId == null) - throw new ArgumentNullException(nameof(petId)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + var validatedParameters = OnUpdatePetWithForm(petId, name, status); + petId = validatedParameters.Item1; + name = validatedParameters.Item2; + status = validatedParameters.Item3; using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress!.Host; uriBuilder.Port = HttpClient.BaseAddress!.Port; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/pet/{petId}"; - uriBuilder.Path = uriBuilder.Path.Replace("%7BpetId%7D", Uri.EscapeDataString(petId.ToString())); - MultipartContent multipartContent = new MultipartContent(); + uriBuilder.Path = uriBuilder.Path.Replace("%7BpetId%7D", Uri.EscapeDataString(petId.ToString())); MultipartContent multipartContent = new MultipartContent(); request.Content = multipartContent; List> formParams = new List>(); - multipartContent.Add(new FormUrlEncodedContent(formParams)); - - if (name != null) + multipartContent.Add(new FormUrlEncodedContent(formParams)); if (name != null) formParams.Add(new KeyValuePair("name", ClientUtils.ParameterToString(name))); if (status != null) @@ -1344,6 +1571,8 @@ namespace Org.OpenAPITools.Api List tokens = new List(); + + request.RequestUri = uriBuilder.Uri; OAuthToken oauthToken = (OAuthToken) await OauthTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); @@ -1359,32 +1588,25 @@ namespace Org.OpenAPITools.Api string? contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); request.Method = HttpMethod.Post; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/pet/{petId}", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/pet/{petId}")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterUpdatePetWithForm(apiResponse, petId, name, status); + } else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -1395,7 +1617,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorUpdatePetWithForm(e, "/pet/{petId}", uriBuilder.Path, petId, name, status); throw; } } @@ -1405,13 +1627,13 @@ namespace Org.OpenAPITools.Api /// /// Thrown when fails to make API call /// ID of pet to update - /// Additional data to pass to server (optional) /// file to upload (optional) + /// Additional data to pass to server (optional) /// Cancellation Token to cancel the request. /// <> - public async Task UploadFileAsync(long petId, string? additionalMetadata = null, System.IO.Stream? file = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task UploadFileAsync(long petId, System.IO.Stream? file = null, string? additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null) { - ApiResponse result = await UploadFileWithHttpInfoAsync(petId, additionalMetadata, file, cancellationToken).ConfigureAwait(false); + ApiResponse result = await UploadFileWithHttpInfoAsync(petId, file, additionalMetadata, cancellationToken).ConfigureAwait(false); if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); @@ -1424,16 +1646,16 @@ namespace Org.OpenAPITools.Api /// /// Thrown when fails to make API call /// ID of pet to update - /// Additional data to pass to server (optional) /// file to upload (optional) + /// Additional data to pass to server (optional) /// Cancellation Token to cancel the request. /// <> - public async Task UploadFileOrDefaultAsync(long petId, string? additionalMetadata = null, System.IO.Stream? file = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task UploadFileOrDefaultAsync(long petId, System.IO.Stream? file = null, string? additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse? result = null; try { - result = await UploadFileWithHttpInfoAsync(petId, additionalMetadata, file, cancellationToken).ConfigureAwait(false); + result = await UploadFileWithHttpInfoAsync(petId, file, additionalMetadata, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -1444,51 +1666,95 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + /// + /// + protected virtual (long, System.IO.Stream?, string?) OnUploadFile(long petId, System.IO.Stream? file, string? additionalMetadata) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (petId == null) + throw new ArgumentNullException(nameof(petId)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return (petId, file, additionalMetadata); + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void AfterUploadFile(ApiResponse apiResponse, long petId, System.IO.Stream? file, string? additionalMetadata) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + /// + /// + protected virtual void OnErrorUploadFile(Exception exception, string pathFormat, string path, long petId, System.IO.Stream? file, string? additionalMetadata) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// uploads an image /// /// Thrown when fails to make API call /// ID of pet to update - /// Additional data to pass to server (optional) /// file to upload (optional) + /// Additional data to pass to server (optional) /// Cancellation Token to cancel the request. /// <> where T : - public async Task> UploadFileWithHttpInfoAsync(long petId, string? additionalMetadata = null, System.IO.Stream? file = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task> UploadFileWithHttpInfoAsync(long petId, System.IO.Stream? file = null, string? additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (petId == null) - throw new ArgumentNullException(nameof(petId)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + var validatedParameters = OnUploadFile(petId, file, additionalMetadata); + petId = validatedParameters.Item1; + file = validatedParameters.Item2; + additionalMetadata = validatedParameters.Item3; using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress!.Host; uriBuilder.Port = HttpClient.BaseAddress!.Port; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/pet/{petId}/uploadImage"; - uriBuilder.Path = uriBuilder.Path.Replace("%7BpetId%7D", Uri.EscapeDataString(petId.ToString())); - MultipartContent multipartContent = new MultipartContent(); + uriBuilder.Path = uriBuilder.Path.Replace("%7BpetId%7D", Uri.EscapeDataString(petId.ToString())); MultipartContent multipartContent = new MultipartContent(); request.Content = multipartContent; List> formParams = new List>(); - multipartContent.Add(new FormUrlEncodedContent(formParams)); + multipartContent.Add(new FormUrlEncodedContent(formParams)); if (file != null) + multipartContent.Add(new StreamContent(file)); if (additionalMetadata != null) formParams.Add(new KeyValuePair("additionalMetadata", ClientUtils.ParameterToString(additionalMetadata))); - if (file != null) - multipartContent.Add(new StreamContent(file)); - List tokens = new List(); + + request.RequestUri = uriBuilder.Uri; OAuthToken oauthToken = (OAuthToken) await OauthTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); @@ -1504,7 +1770,7 @@ namespace Org.OpenAPITools.Api string? contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); string[] accepts = new string[] { "application/json" @@ -1514,31 +1780,24 @@ namespace Org.OpenAPITools.Api if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - + request.Method = HttpMethod.Post; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/pet/{petId}/uploadImage", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/pet/{petId}/uploadImage")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterUploadFile(apiResponse, petId, file, additionalMetadata); + } else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -1549,7 +1808,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorUploadFile(e, "/pet/{petId}/uploadImage", uriBuilder.Path, petId, file, additionalMetadata); throw; } } @@ -1558,14 +1817,14 @@ namespace Org.OpenAPITools.Api /// uploads an image (required) /// /// Thrown when fails to make API call - /// ID of pet to update /// file to upload + /// ID of pet to update /// Additional data to pass to server (optional) /// Cancellation Token to cancel the request. /// <> - public async Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, string? additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task UploadFileWithRequiredFileAsync(System.IO.Stream requiredFile, long petId, string? additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null) { - ApiResponse result = await UploadFileWithRequiredFileWithHttpInfoAsync(petId, requiredFile, additionalMetadata, cancellationToken).ConfigureAwait(false); + ApiResponse result = await UploadFileWithRequiredFileWithHttpInfoAsync(requiredFile, petId, additionalMetadata, cancellationToken).ConfigureAwait(false); if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); @@ -1577,17 +1836,17 @@ namespace Org.OpenAPITools.Api /// uploads an image (required) /// /// Thrown when fails to make API call - /// ID of pet to update /// file to upload + /// ID of pet to update /// Additional data to pass to server (optional) /// Cancellation Token to cancel the request. /// <> - public async Task UploadFileWithRequiredFileOrDefaultAsync(long petId, System.IO.Stream requiredFile, string? additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task UploadFileWithRequiredFileOrDefaultAsync(System.IO.Stream requiredFile, long petId, string? additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse? result = null; try { - result = await UploadFileWithRequiredFileWithHttpInfoAsync(petId, requiredFile, additionalMetadata, cancellationToken).ConfigureAwait(false); + result = await UploadFileWithRequiredFileWithHttpInfoAsync(requiredFile, petId, additionalMetadata, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -1598,53 +1857,97 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + /// + /// + protected virtual (System.IO.Stream, long, string?) OnUploadFileWithRequiredFile(System.IO.Stream requiredFile, long petId, string? additionalMetadata) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (requiredFile == null) + throw new ArgumentNullException(nameof(requiredFile)); + + if (petId == null) + throw new ArgumentNullException(nameof(petId)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return (requiredFile, petId, additionalMetadata); + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void AfterUploadFileWithRequiredFile(ApiResponse apiResponse, System.IO.Stream requiredFile, long petId, string? additionalMetadata) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + /// + /// + protected virtual void OnErrorUploadFileWithRequiredFile(Exception exception, string pathFormat, string path, System.IO.Stream requiredFile, long petId, string? additionalMetadata) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// uploads an image (required) /// /// Thrown when fails to make API call - /// ID of pet to update /// file to upload + /// ID of pet to update /// Additional data to pass to server (optional) /// Cancellation Token to cancel the request. /// <> where T : - public async Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, string? additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task> UploadFileWithRequiredFileWithHttpInfoAsync(System.IO.Stream requiredFile, long petId, string? additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (petId == null) - throw new ArgumentNullException(nameof(petId)); - - if (requiredFile == null) - throw new ArgumentNullException(nameof(requiredFile)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + var validatedParameters = OnUploadFileWithRequiredFile(requiredFile, petId, additionalMetadata); + requiredFile = validatedParameters.Item1; + petId = validatedParameters.Item2; + additionalMetadata = validatedParameters.Item3; using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress!.Host; uriBuilder.Port = HttpClient.BaseAddress!.Port; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/fake/{petId}/uploadImageWithRequiredFile"; - uriBuilder.Path = uriBuilder.Path.Replace("%7BpetId%7D", Uri.EscapeDataString(petId.ToString())); - MultipartContent multipartContent = new MultipartContent(); + uriBuilder.Path = uriBuilder.Path.Replace("%7BpetId%7D", Uri.EscapeDataString(petId.ToString())); MultipartContent multipartContent = new MultipartContent(); request.Content = multipartContent; List> formParams = new List>(); - multipartContent.Add(new FormUrlEncodedContent(formParams)); - - multipartContent.Add(new StreamContent(requiredFile)); + multipartContent.Add(new FormUrlEncodedContent(formParams)); multipartContent.Add(new StreamContent(requiredFile)); if (additionalMetadata != null) formParams.Add(new KeyValuePair("additionalMetadata", ClientUtils.ParameterToString(additionalMetadata))); List tokens = new List(); + + request.RequestUri = uriBuilder.Uri; OAuthToken oauthToken = (OAuthToken) await OauthTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); @@ -1660,7 +1963,7 @@ namespace Org.OpenAPITools.Api string? contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); string[] accepts = new string[] { "application/json", @@ -1671,31 +1974,24 @@ namespace Org.OpenAPITools.Api if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - + request.Method = HttpMethod.Post; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/{petId}/uploadImageWithRequiredFile", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/{petId}/uploadImageWithRequiredFile")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterUploadFileWithRequiredFile(apiResponse, requiredFile, petId, additionalMetadata); + } else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -1706,8 +2002,9 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorUploadFileWithRequiredFile(e, "/fake/{petId}/uploadImageWithRequiredFile", uriBuilder.Path, requiredFile, petId, additionalMetadata); throw; } - } } + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/StoreApi.cs index 1d07247d8e..de9a6972e9 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/StoreApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/StoreApi.cs @@ -21,10 +21,11 @@ using System.Text.Json; using Org.OpenAPITools.Client; using Org.OpenAPITools.Model; -namespace Org.OpenAPITools.Api +namespace Org.OpenAPITools.IApi { /// /// Represents a collection of functions to interact with the API endpoints + /// This class is registered as transient. /// public interface IStoreApi : IApi { @@ -50,7 +51,7 @@ namespace Org.OpenAPITools.Api /// ID of the order that needs to be deleted /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> - Task DeleteOrderAsync(string orderId, System.Threading.CancellationToken? cancellationToken = null); + Task DeleteOrderAsync(string orderId, System.Threading.CancellationToken? cancellationToken = null); /// /// Delete purchase order by ID @@ -63,7 +64,6 @@ namespace Org.OpenAPITools.Api /// Task of ApiResponse<object?> Task DeleteOrderOrDefaultAsync(string orderId, System.Threading.CancellationToken? cancellationToken = null); - /// /// Returns pet inventories by status /// @@ -84,7 +84,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Cancellation Token to cancel the request. /// Task of ApiResponse<Dictionary<string, int>> - Task?> GetInventoryAsync(System.Threading.CancellationToken? cancellationToken = null); + Task> GetInventoryAsync(System.Threading.CancellationToken? cancellationToken = null); /// /// Returns pet inventories by status @@ -96,7 +96,6 @@ namespace Org.OpenAPITools.Api /// Task of ApiResponse<Dictionary<string, int>?> Task?> GetInventoryOrDefaultAsync(System.Threading.CancellationToken? cancellationToken = null); - /// /// Find purchase order by ID /// @@ -119,7 +118,7 @@ namespace Org.OpenAPITools.Api /// ID of pet that needs to be fetched /// Cancellation Token to cancel the request. /// Task of ApiResponse<Order> - Task GetOrderByIdAsync(long orderId, System.Threading.CancellationToken? cancellationToken = null); + Task GetOrderByIdAsync(long orderId, System.Threading.CancellationToken? cancellationToken = null); /// /// Find purchase order by ID @@ -132,7 +131,6 @@ namespace Org.OpenAPITools.Api /// Task of ApiResponse<Order?> Task GetOrderByIdOrDefaultAsync(long orderId, System.Threading.CancellationToken? cancellationToken = null); - /// /// Place an order for a pet /// @@ -155,7 +153,7 @@ namespace Org.OpenAPITools.Api /// order placed for purchasing the pet /// Cancellation Token to cancel the request. /// Task of ApiResponse<Order> - Task PlaceOrderAsync(Order order, System.Threading.CancellationToken? cancellationToken = null); + Task PlaceOrderAsync(Order order, System.Threading.CancellationToken? cancellationToken = null); /// /// Place an order for a pet @@ -167,22 +165,18 @@ namespace Org.OpenAPITools.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse<Order?> Task PlaceOrderOrDefaultAsync(Order order, System.Threading.CancellationToken? cancellationToken = null); + } +} - } - +namespace Org.OpenAPITools.Api +{ /// /// Represents a collection of functions to interact with the API endpoints /// - public partial class StoreApi : IStoreApi + public partial class StoreApi : IApi.IStoreApi { private JsonSerializerOptions _jsonSerializerOptions; - /// - /// An event to track the health of the server. - /// If you store these event args, be sure to purge old event args to prevent a memory leak. - /// - public event ClientUtils.EventHandler? ApiResponded; - /// /// The logger /// @@ -239,6 +233,15 @@ namespace Org.OpenAPITools.Api OauthTokenProvider = oauthTokenProvider; } + /// + /// Logs the api response + /// + /// + protected virtual void OnApiResponded(ApiResponseEventArgs args) + { + Logger.LogInformation("{0,-9} | {1} | {3}", (args.ReceivedAt - args.RequestedAt).TotalSeconds, args.HttpStatus, args.Path); + } + /// /// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors /// @@ -246,7 +249,7 @@ namespace Org.OpenAPITools.Api /// ID of the order that needs to be deleted /// Cancellation Token to cancel the request. /// <> - public async Task DeleteOrderAsync(string orderId, System.Threading.CancellationToken? cancellationToken = null) + public async Task DeleteOrderAsync(string orderId, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await DeleteOrderWithHttpInfoAsync(orderId, cancellationToken).ConfigureAwait(false); @@ -279,6 +282,46 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual string OnDeleteOrder(string orderId) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (orderId == null) + throw new ArgumentNullException(nameof(orderId)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return orderId; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterDeleteOrder(ApiResponse apiResponse, string orderId) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorDeleteOrder(Exception exception, string pathFormat, string path, string orderId) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors /// @@ -288,50 +331,40 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> DeleteOrderWithHttpInfoAsync(string orderId, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (orderId == null) - throw new ArgumentNullException(nameof(orderId)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + orderId = OnDeleteOrder(orderId); using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress!.Host; uriBuilder.Port = HttpClient.BaseAddress!.Port; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/store/order/{order_id}"; + uriBuilder.Path = uriBuilder.Path.Replace("%7Border_id%7D", Uri.EscapeDataString(orderId.ToString())); request.RequestUri = uriBuilder.Uri; request.Method = HttpMethod.Delete; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/store/order/{order_id}", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/store/order/{order_id}")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterDeleteOrder(apiResponse, orderId); + } return apiResponse; } @@ -339,7 +372,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorDeleteOrder(e, "/store/order/{order_id}", uriBuilder.Path, orderId); throw; } } @@ -350,7 +383,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Cancellation Token to cancel the request. /// <> - public async Task?> GetInventoryAsync(System.Threading.CancellationToken? cancellationToken = null) + public async Task> GetInventoryAsync(System.Threading.CancellationToken? cancellationToken = null) { ApiResponse?> result = await GetInventoryWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); @@ -382,6 +415,34 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + protected virtual void OnGetInventory() + { + return; + } + + /// + /// Processes the server response + /// + /// + protected virtual void AfterGetInventory(ApiResponse?> apiResponse) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + protected virtual void OnErrorGetInventory(Exception exception, string pathFormat, string path) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Returns pet inventories by status Returns a map of status codes to quantities /// @@ -390,11 +451,14 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task?>> GetInventoryWithHttpInfoAsync(System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { + OnGetInventory(); + using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress!.Host; uriBuilder.Port = HttpClient.BaseAddress!.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -418,31 +482,24 @@ namespace Org.OpenAPITools.Api if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - + request.Method = HttpMethod.Get; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/store/inventory", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/store/inventory")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse?> apiResponse = new ApiResponse?>(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize>(apiResponse.RawContent, _jsonSerializerOptions); + AfterGetInventory(apiResponse); + } else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -453,7 +510,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorGetInventory(e, "/store/inventory", uriBuilder.Path); throw; } } @@ -465,7 +522,7 @@ namespace Org.OpenAPITools.Api /// ID of pet that needs to be fetched /// Cancellation Token to cancel the request. /// <> - public async Task GetOrderByIdAsync(long orderId, System.Threading.CancellationToken? cancellationToken = null) + public async Task GetOrderByIdAsync(long orderId, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await GetOrderByIdWithHttpInfoAsync(orderId, cancellationToken).ConfigureAwait(false); @@ -498,6 +555,46 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual long OnGetOrderById(long orderId) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (orderId == null) + throw new ArgumentNullException(nameof(orderId)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return orderId; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterGetOrderById(ApiResponse apiResponse, long orderId) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorGetOrderById(Exception exception, string pathFormat, string path, long orderId) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// @@ -507,22 +604,19 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> GetOrderByIdWithHttpInfoAsync(long orderId, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (orderId == null) - throw new ArgumentNullException(nameof(orderId)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + orderId = OnGetOrderById(orderId); using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress!.Host; uriBuilder.Port = HttpClient.BaseAddress!.Port; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/store/order/{order_id}"; + uriBuilder.Path = uriBuilder.Path.Replace("%7Border_id%7D", Uri.EscapeDataString(orderId.ToString())); request.RequestUri = uriBuilder.Uri; @@ -536,31 +630,24 @@ namespace Org.OpenAPITools.Api if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - + request.Method = HttpMethod.Get; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/store/order/{order_id}", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/store/order/{order_id}")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterGetOrderById(apiResponse, orderId); + } return apiResponse; } @@ -568,7 +655,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorGetOrderById(e, "/store/order/{order_id}", uriBuilder.Path, orderId); throw; } } @@ -580,7 +667,7 @@ namespace Org.OpenAPITools.Api /// order placed for purchasing the pet /// Cancellation Token to cancel the request. /// <> - public async Task PlaceOrderAsync(Order order, System.Threading.CancellationToken? cancellationToken = null) + public async Task PlaceOrderAsync(Order order, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await PlaceOrderWithHttpInfoAsync(order, cancellationToken).ConfigureAwait(false); @@ -613,6 +700,46 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual Order OnPlaceOrder(Order order) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (order == null) + throw new ArgumentNullException(nameof(order)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return order; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterPlaceOrder(ApiResponse apiResponse, Order order) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorPlaceOrder(Exception exception, string pathFormat, string path, Order order) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Place an order for a pet /// @@ -622,18 +749,14 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> PlaceOrderWithHttpInfoAsync(Order order, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (order == null) - throw new ArgumentNullException(nameof(order)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + order = OnPlaceOrder(order); using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress!.Host; uriBuilder.Port = HttpClient.BaseAddress!.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -643,6 +766,8 @@ namespace Org.OpenAPITools.Api ? request.Content = new StreamContent(stream) : request.Content = new StringContent(JsonSerializer.Serialize(order, _jsonSerializerOptions)); + + request.RequestUri = uriBuilder.Uri; string[] contentTypes = new string[] { @@ -652,7 +777,7 @@ namespace Org.OpenAPITools.Api string? contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); string[] accepts = new string[] { "application/xml", @@ -663,31 +788,24 @@ namespace Org.OpenAPITools.Api if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - + request.Method = HttpMethod.Post; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/store/order", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/store/order")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterPlaceOrder(apiResponse, order); + } return apiResponse; } @@ -695,8 +813,9 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorPlaceOrder(e, "/store/order", uriBuilder.Path, order); throw; } - } } + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/UserApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/UserApi.cs index 1d51468c10..d6d3548d8a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/UserApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/UserApi.cs @@ -21,10 +21,11 @@ using System.Text.Json; using Org.OpenAPITools.Client; using Org.OpenAPITools.Model; -namespace Org.OpenAPITools.Api +namespace Org.OpenAPITools.IApi { /// /// Represents a collection of functions to interact with the API endpoints + /// This class is registered as transient. /// public interface IUserApi : IApi { @@ -50,7 +51,7 @@ namespace Org.OpenAPITools.Api /// Created user object /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> - Task CreateUserAsync(User user, System.Threading.CancellationToken? cancellationToken = null); + Task CreateUserAsync(User user, System.Threading.CancellationToken? cancellationToken = null); /// /// Create user @@ -63,7 +64,6 @@ namespace Org.OpenAPITools.Api /// Task of ApiResponse<object?> Task CreateUserOrDefaultAsync(User user, System.Threading.CancellationToken? cancellationToken = null); - /// /// Creates list of users with given input array /// @@ -86,7 +86,7 @@ namespace Org.OpenAPITools.Api /// List of user object /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> - Task CreateUsersWithArrayInputAsync(List user, System.Threading.CancellationToken? cancellationToken = null); + Task CreateUsersWithArrayInputAsync(List user, System.Threading.CancellationToken? cancellationToken = null); /// /// Creates list of users with given input array @@ -99,7 +99,6 @@ namespace Org.OpenAPITools.Api /// Task of ApiResponse<object?> Task CreateUsersWithArrayInputOrDefaultAsync(List user, System.Threading.CancellationToken? cancellationToken = null); - /// /// Creates list of users with given input array /// @@ -122,7 +121,7 @@ namespace Org.OpenAPITools.Api /// List of user object /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> - Task CreateUsersWithListInputAsync(List user, System.Threading.CancellationToken? cancellationToken = null); + Task CreateUsersWithListInputAsync(List user, System.Threading.CancellationToken? cancellationToken = null); /// /// Creates list of users with given input array @@ -135,7 +134,6 @@ namespace Org.OpenAPITools.Api /// Task of ApiResponse<object?> Task CreateUsersWithListInputOrDefaultAsync(List user, System.Threading.CancellationToken? cancellationToken = null); - /// /// Delete user /// @@ -158,7 +156,7 @@ namespace Org.OpenAPITools.Api /// The name that needs to be deleted /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> - Task DeleteUserAsync(string username, System.Threading.CancellationToken? cancellationToken = null); + Task DeleteUserAsync(string username, System.Threading.CancellationToken? cancellationToken = null); /// /// Delete user @@ -171,7 +169,6 @@ namespace Org.OpenAPITools.Api /// Task of ApiResponse<object?> Task DeleteUserOrDefaultAsync(string username, System.Threading.CancellationToken? cancellationToken = null); - /// /// Get user by user name /// @@ -194,7 +191,7 @@ namespace Org.OpenAPITools.Api /// The name that needs to be fetched. Use user1 for testing. /// Cancellation Token to cancel the request. /// Task of ApiResponse<User> - Task GetUserByNameAsync(string username, System.Threading.CancellationToken? cancellationToken = null); + Task GetUserByNameAsync(string username, System.Threading.CancellationToken? cancellationToken = null); /// /// Get user by user name @@ -207,7 +204,6 @@ namespace Org.OpenAPITools.Api /// Task of ApiResponse<User?> Task GetUserByNameOrDefaultAsync(string username, System.Threading.CancellationToken? cancellationToken = null); - /// /// Logs user into the system /// @@ -232,7 +228,7 @@ namespace Org.OpenAPITools.Api /// The password for login in clear text /// Cancellation Token to cancel the request. /// Task of ApiResponse<string> - Task LoginUserAsync(string username, string password, System.Threading.CancellationToken? cancellationToken = null); + Task LoginUserAsync(string username, string password, System.Threading.CancellationToken? cancellationToken = null); /// /// Logs user into the system @@ -246,7 +242,6 @@ namespace Org.OpenAPITools.Api /// Task of ApiResponse<string?> Task LoginUserOrDefaultAsync(string username, string password, System.Threading.CancellationToken? cancellationToken = null); - /// /// Logs out current logged in user session /// @@ -267,7 +262,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> - Task LogoutUserAsync(System.Threading.CancellationToken? cancellationToken = null); + Task LogoutUserAsync(System.Threading.CancellationToken? cancellationToken = null); /// /// Logs out current logged in user session @@ -279,7 +274,6 @@ namespace Org.OpenAPITools.Api /// Task of ApiResponse<object?> Task LogoutUserOrDefaultAsync(System.Threading.CancellationToken? cancellationToken = null); - /// /// Updated user /// @@ -287,11 +281,11 @@ namespace Org.OpenAPITools.Api /// This can only be done by the logged in user. /// /// Thrown when fails to make API call - /// name that need to be deleted /// Updated user object + /// name that need to be deleted /// Cancellation Token to cancel the request. /// Task<ApiResponse<object?>> - Task> UpdateUserWithHttpInfoAsync(string username, User user, System.Threading.CancellationToken? cancellationToken = null); + Task> UpdateUserWithHttpInfoAsync(User user, string username, System.Threading.CancellationToken? cancellationToken = null); /// /// Updated user @@ -300,11 +294,11 @@ namespace Org.OpenAPITools.Api /// This can only be done by the logged in user. /// /// Thrown when fails to make API call - /// name that need to be deleted /// Updated user object + /// name that need to be deleted /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> - Task UpdateUserAsync(string username, User user, System.Threading.CancellationToken? cancellationToken = null); + Task UpdateUserAsync(User user, string username, System.Threading.CancellationToken? cancellationToken = null); /// /// Updated user @@ -312,27 +306,23 @@ namespace Org.OpenAPITools.Api /// /// This can only be done by the logged in user. /// - /// name that need to be deleted /// Updated user object + /// name that need to be deleted /// Cancellation Token to cancel the request. /// Task of ApiResponse<object?> - Task UpdateUserOrDefaultAsync(string username, User user, System.Threading.CancellationToken? cancellationToken = null); - - } + Task UpdateUserOrDefaultAsync(User user, string username, System.Threading.CancellationToken? cancellationToken = null); + } +} +namespace Org.OpenAPITools.Api +{ /// /// Represents a collection of functions to interact with the API endpoints /// - public partial class UserApi : IUserApi + public partial class UserApi : IApi.IUserApi { private JsonSerializerOptions _jsonSerializerOptions; - /// - /// An event to track the health of the server. - /// If you store these event args, be sure to purge old event args to prevent a memory leak. - /// - public event ClientUtils.EventHandler? ApiResponded; - /// /// The logger /// @@ -389,6 +379,15 @@ namespace Org.OpenAPITools.Api OauthTokenProvider = oauthTokenProvider; } + /// + /// Logs the api response + /// + /// + protected virtual void OnApiResponded(ApiResponseEventArgs args) + { + Logger.LogInformation("{0,-9} | {1} | {3}", (args.ReceivedAt - args.RequestedAt).TotalSeconds, args.HttpStatus, args.Path); + } + /// /// Create user This can only be done by the logged in user. /// @@ -396,7 +395,7 @@ namespace Org.OpenAPITools.Api /// Created user object /// Cancellation Token to cancel the request. /// <> - public async Task CreateUserAsync(User user, System.Threading.CancellationToken? cancellationToken = null) + public async Task CreateUserAsync(User user, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await CreateUserWithHttpInfoAsync(user, cancellationToken).ConfigureAwait(false); @@ -429,6 +428,46 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual User OnCreateUser(User user) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (user == null) + throw new ArgumentNullException(nameof(user)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return user; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterCreateUser(ApiResponse apiResponse, User user) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorCreateUser(Exception exception, string pathFormat, string path, User user) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Create user This can only be done by the logged in user. /// @@ -438,18 +477,14 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> CreateUserWithHttpInfoAsync(User user, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (user == null) - throw new ArgumentNullException(nameof(user)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + user = OnCreateUser(user); using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress!.Host; uriBuilder.Port = HttpClient.BaseAddress!.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -459,6 +494,8 @@ namespace Org.OpenAPITools.Api ? request.Content = new StreamContent(stream) : request.Content = new StringContent(JsonSerializer.Serialize(user, _jsonSerializerOptions)); + + request.RequestUri = uriBuilder.Uri; string[] contentTypes = new string[] { @@ -468,32 +505,25 @@ namespace Org.OpenAPITools.Api string? contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); request.Method = HttpMethod.Post; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/user", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/user")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterCreateUser(apiResponse, user); + } return apiResponse; } @@ -501,7 +531,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorCreateUser(e, "/user", uriBuilder.Path, user); throw; } } @@ -513,7 +543,7 @@ namespace Org.OpenAPITools.Api /// List of user object /// Cancellation Token to cancel the request. /// <> - public async Task CreateUsersWithArrayInputAsync(List user, System.Threading.CancellationToken? cancellationToken = null) + public async Task CreateUsersWithArrayInputAsync(List user, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await CreateUsersWithArrayInputWithHttpInfoAsync(user, cancellationToken).ConfigureAwait(false); @@ -546,6 +576,46 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual List OnCreateUsersWithArrayInput(List user) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (user == null) + throw new ArgumentNullException(nameof(user)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return user; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterCreateUsersWithArrayInput(ApiResponse apiResponse, List user) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorCreateUsersWithArrayInput(Exception exception, string pathFormat, string path, List user) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Creates list of users with given input array /// @@ -555,18 +625,14 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> CreateUsersWithArrayInputWithHttpInfoAsync(List user, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (user == null) - throw new ArgumentNullException(nameof(user)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + user = OnCreateUsersWithArrayInput(user); using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress!.Host; uriBuilder.Port = HttpClient.BaseAddress!.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -576,6 +642,8 @@ namespace Org.OpenAPITools.Api ? request.Content = new StreamContent(stream) : request.Content = new StringContent(JsonSerializer.Serialize(user, _jsonSerializerOptions)); + + request.RequestUri = uriBuilder.Uri; string[] contentTypes = new string[] { @@ -585,32 +653,25 @@ namespace Org.OpenAPITools.Api string? contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); request.Method = HttpMethod.Post; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/user/createWithArray", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/user/createWithArray")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterCreateUsersWithArrayInput(apiResponse, user); + } return apiResponse; } @@ -618,7 +679,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorCreateUsersWithArrayInput(e, "/user/createWithArray", uriBuilder.Path, user); throw; } } @@ -630,7 +691,7 @@ namespace Org.OpenAPITools.Api /// List of user object /// Cancellation Token to cancel the request. /// <> - public async Task CreateUsersWithListInputAsync(List user, System.Threading.CancellationToken? cancellationToken = null) + public async Task CreateUsersWithListInputAsync(List user, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await CreateUsersWithListInputWithHttpInfoAsync(user, cancellationToken).ConfigureAwait(false); @@ -663,6 +724,46 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual List OnCreateUsersWithListInput(List user) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (user == null) + throw new ArgumentNullException(nameof(user)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return user; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterCreateUsersWithListInput(ApiResponse apiResponse, List user) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorCreateUsersWithListInput(Exception exception, string pathFormat, string path, List user) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Creates list of users with given input array /// @@ -672,18 +773,14 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> CreateUsersWithListInputWithHttpInfoAsync(List user, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (user == null) - throw new ArgumentNullException(nameof(user)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + user = OnCreateUsersWithListInput(user); using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress!.Host; uriBuilder.Port = HttpClient.BaseAddress!.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -693,6 +790,8 @@ namespace Org.OpenAPITools.Api ? request.Content = new StreamContent(stream) : request.Content = new StringContent(JsonSerializer.Serialize(user, _jsonSerializerOptions)); + + request.RequestUri = uriBuilder.Uri; string[] contentTypes = new string[] { @@ -702,32 +801,25 @@ namespace Org.OpenAPITools.Api string? contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); request.Method = HttpMethod.Post; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/user/createWithList", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/user/createWithList")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterCreateUsersWithListInput(apiResponse, user); + } return apiResponse; } @@ -735,7 +827,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorCreateUsersWithListInput(e, "/user/createWithList", uriBuilder.Path, user); throw; } } @@ -747,7 +839,7 @@ namespace Org.OpenAPITools.Api /// The name that needs to be deleted /// Cancellation Token to cancel the request. /// <> - public async Task DeleteUserAsync(string username, System.Threading.CancellationToken? cancellationToken = null) + public async Task DeleteUserAsync(string username, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await DeleteUserWithHttpInfoAsync(username, cancellationToken).ConfigureAwait(false); @@ -780,6 +872,46 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual string OnDeleteUser(string username) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (username == null) + throw new ArgumentNullException(nameof(username)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return username; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterDeleteUser(ApiResponse apiResponse, string username) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorDeleteUser(Exception exception, string pathFormat, string path, string username) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Delete user This can only be done by the logged in user. /// @@ -789,50 +921,40 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> DeleteUserWithHttpInfoAsync(string username, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (username == null) - throw new ArgumentNullException(nameof(username)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + username = OnDeleteUser(username); using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress!.Host; uriBuilder.Port = HttpClient.BaseAddress!.Port; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/user/{username}"; + uriBuilder.Path = uriBuilder.Path.Replace("%7Busername%7D", Uri.EscapeDataString(username.ToString())); request.RequestUri = uriBuilder.Uri; request.Method = HttpMethod.Delete; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/user/{username}", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/user/{username}")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterDeleteUser(apiResponse, username); + } return apiResponse; } @@ -840,7 +962,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorDeleteUser(e, "/user/{username}", uriBuilder.Path, username); throw; } } @@ -852,7 +974,7 @@ namespace Org.OpenAPITools.Api /// The name that needs to be fetched. Use user1 for testing. /// Cancellation Token to cancel the request. /// <> - public async Task GetUserByNameAsync(string username, System.Threading.CancellationToken? cancellationToken = null) + public async Task GetUserByNameAsync(string username, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await GetUserByNameWithHttpInfoAsync(username, cancellationToken).ConfigureAwait(false); @@ -885,6 +1007,46 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual string OnGetUserByName(string username) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (username == null) + throw new ArgumentNullException(nameof(username)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return username; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterGetUserByName(ApiResponse apiResponse, string username) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorGetUserByName(Exception exception, string pathFormat, string path, string username) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Get user by user name /// @@ -894,22 +1056,19 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> GetUserByNameWithHttpInfoAsync(string username, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (username == null) - throw new ArgumentNullException(nameof(username)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + username = OnGetUserByName(username); using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress!.Host; uriBuilder.Port = HttpClient.BaseAddress!.Port; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/user/{username}"; + uriBuilder.Path = uriBuilder.Path.Replace("%7Busername%7D", Uri.EscapeDataString(username.ToString())); request.RequestUri = uriBuilder.Uri; @@ -923,31 +1082,24 @@ namespace Org.OpenAPITools.Api if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - + request.Method = HttpMethod.Get; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/user/{username}", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/user/{username}")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterGetUserByName(apiResponse, username); + } return apiResponse; } @@ -955,7 +1107,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorGetUserByName(e, "/user/{username}", uriBuilder.Path, username); throw; } } @@ -968,7 +1120,7 @@ namespace Org.OpenAPITools.Api /// The password for login in clear text /// Cancellation Token to cancel the request. /// <> - public async Task LoginUserAsync(string username, string password, System.Threading.CancellationToken? cancellationToken = null) + public async Task LoginUserAsync(string username, string password, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await LoginUserWithHttpInfoAsync(username, password, cancellationToken).ConfigureAwait(false); @@ -1002,6 +1154,52 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + /// + protected virtual (string, string) OnLoginUser(string username, string password) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (username == null) + throw new ArgumentNullException(nameof(username)); + + if (password == null) + throw new ArgumentNullException(nameof(password)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return (username, password); + } + + /// + /// Processes the server response + /// + /// + /// + /// + protected virtual void AfterLoginUser(ApiResponse apiResponse, string username, string password) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + /// + protected virtual void OnErrorLoginUser(Exception exception, string pathFormat, string path, string username, string password) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Logs user into the system /// @@ -1012,21 +1210,16 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> LoginUserWithHttpInfoAsync(string username, string password, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (username == null) - throw new ArgumentNullException(nameof(username)); - - if (password == null) - throw new ArgumentNullException(nameof(password)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + var validatedParameters = OnLoginUser(username, password); + username = validatedParameters.Item1; + password = validatedParameters.Item2; using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress!.Host; uriBuilder.Port = HttpClient.BaseAddress!.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -1039,6 +1232,8 @@ namespace Org.OpenAPITools.Api uriBuilder.Query = parseQueryString.ToString(); + + request.RequestUri = uriBuilder.Uri; string[] accepts = new string[] { @@ -1050,31 +1245,24 @@ namespace Org.OpenAPITools.Api if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - + request.Method = HttpMethod.Get; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/user/login", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/user/login")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterLoginUser(apiResponse, username, password); + } return apiResponse; } @@ -1082,7 +1270,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorLoginUser(e, "/user/login", uriBuilder.Path, username, password); throw; } } @@ -1093,7 +1281,7 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Cancellation Token to cancel the request. /// <> - public async Task LogoutUserAsync(System.Threading.CancellationToken? cancellationToken = null) + public async Task LogoutUserAsync(System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = await LogoutUserWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); @@ -1125,6 +1313,34 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + protected virtual void OnLogoutUser() + { + return; + } + + /// + /// Processes the server response + /// + /// + protected virtual void AfterLogoutUser(ApiResponse apiResponse) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + protected virtual void OnErrorLogoutUser(Exception exception, string pathFormat, string path) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Logs out current logged in user session /// @@ -1133,42 +1349,40 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> LogoutUserWithHttpInfoAsync(System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { + OnLogoutUser(); + using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress!.Host; uriBuilder.Port = HttpClient.BaseAddress!.Port; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/user/logout"; + + request.RequestUri = uriBuilder.Uri; request.Method = HttpMethod.Get; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/user/logout", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/user/logout")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterLogoutUser(apiResponse); + } return apiResponse; } @@ -1176,7 +1390,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorLogoutUser(e, "/user/logout", uriBuilder.Path); throw; } } @@ -1185,13 +1399,13 @@ namespace Org.OpenAPITools.Api /// Updated user This can only be done by the logged in user. /// /// Thrown when fails to make API call - /// name that need to be deleted /// Updated user object + /// name that need to be deleted /// Cancellation Token to cancel the request. /// <> - public async Task UpdateUserAsync(string username, User user, System.Threading.CancellationToken? cancellationToken = null) + public async Task UpdateUserAsync(User user, string username, System.Threading.CancellationToken? cancellationToken = null) { - ApiResponse result = await UpdateUserWithHttpInfoAsync(username, user, cancellationToken).ConfigureAwait(false); + ApiResponse result = await UpdateUserWithHttpInfoAsync(user, username, cancellationToken).ConfigureAwait(false); if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); @@ -1203,16 +1417,16 @@ namespace Org.OpenAPITools.Api /// Updated user This can only be done by the logged in user. /// /// Thrown when fails to make API call - /// name that need to be deleted /// Updated user object + /// name that need to be deleted /// Cancellation Token to cancel the request. /// <> - public async Task UpdateUserOrDefaultAsync(string username, User user, System.Threading.CancellationToken? cancellationToken = null) + public async Task UpdateUserOrDefaultAsync(User user, string username, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse? result = null; try { - result = await UpdateUserWithHttpInfoAsync(username, user, cancellationToken).ConfigureAwait(false); + result = await UpdateUserWithHttpInfoAsync(user, username, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -1223,41 +1437,83 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + /// + protected virtual (User, string) OnUpdateUser(User user, string username) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (user == null) + throw new ArgumentNullException(nameof(user)); + + if (username == null) + throw new ArgumentNullException(nameof(username)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return (user, username); + } + + /// + /// Processes the server response + /// + /// + /// + /// + protected virtual void AfterUpdateUser(ApiResponse apiResponse, User user, string username) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + /// + protected virtual void OnErrorUpdateUser(Exception exception, string pathFormat, string path, User user, string username) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Updated user This can only be done by the logged in user. /// /// Thrown when fails to make API call - /// name that need to be deleted /// Updated user object + /// name that need to be deleted /// Cancellation Token to cancel the request. /// <> where T : - public async Task> UpdateUserWithHttpInfoAsync(string username, User user, System.Threading.CancellationToken? cancellationToken = null) + public async Task> UpdateUserWithHttpInfoAsync(User user, string username, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (username == null) - throw new ArgumentNullException(nameof(username)); - - if (user == null) - throw new ArgumentNullException(nameof(user)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + var validatedParameters = OnUpdateUser(user, username); + user = validatedParameters.Item1; + username = validatedParameters.Item2; using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress!.Host; uriBuilder.Port = HttpClient.BaseAddress!.Port; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/user/{username}"; - uriBuilder.Path = uriBuilder.Path.Replace("%7Busername%7D", Uri.EscapeDataString(username.ToString())); - request.Content = (user as object) is System.IO.Stream stream + uriBuilder.Path = uriBuilder.Path.Replace("%7Busername%7D", Uri.EscapeDataString(username.ToString())); request.Content = (user as object) is System.IO.Stream stream ? request.Content = new StreamContent(stream) : request.Content = new StringContent(JsonSerializer.Serialize(user, _jsonSerializerOptions)); + + request.RequestUri = uriBuilder.Uri; string[] contentTypes = new string[] { @@ -1267,32 +1523,25 @@ namespace Org.OpenAPITools.Api string? contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); request.Method = HttpMethod.Put; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/user/{username}", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/user/{username}")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterUpdateUser(apiResponse, user, username); + } return apiResponse; } @@ -1300,8 +1549,9 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorUpdateUser(e, "/user/{username}", uriBuilder.Path, user, username); throw; } - } } + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/ApiFactory.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/ApiFactory.cs new file mode 100644 index 0000000000..7757b89c19 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/ApiFactory.cs @@ -0,0 +1,49 @@ +using System; +using Microsoft.Extensions.DependencyInjection; + + +namespace Org.OpenAPITools.Client +{ + /// + /// An IApiFactory interface + /// + public interface IApiFactory + { + /// + /// A method to create an IApi of type IResult + /// + /// + /// + IResult Create() where IResult : IApi.IApi; + } + + /// + /// An ApiFactory + /// + public class ApiFactory : IApiFactory + { + /// + /// The service provider + /// + public IServiceProvider Services { get; } + + /// + /// Initializes a new instance of the class. + /// + /// + public ApiFactory(IServiceProvider services) + { + Services = services; + } + + /// + /// A method to create an IApi of type IResult + /// + /// + /// + public IResult Create() where IResult : IApi.IApi + { + return Services.GetRequiredService(); + } + } +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/ApiKeyToken.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/ApiKeyToken.cs index 32793bac5c..a421f4e53e 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/ApiKeyToken.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/ApiKeyToken.cs @@ -18,22 +18,12 @@ namespace Org.OpenAPITools.Client /// /// /// - /// + /// public ApiKeyToken(string value, string prefix = "Bearer ", TimeSpan? timeout = null) : base(timeout) { _raw = $"{ prefix }{ value }"; } - /// - /// Places the token in the cookie. - /// - /// - /// - public virtual void UseInCookie(System.Net.Http.HttpRequestMessage request, string cookieName) - { - request.Headers.Add("Cookie", $"{ cookieName }=_raw"); - } - /// /// Places the token in the header. /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/ApiResponseEventArgs.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/ApiResponseEventArgs.cs index e5da600032..f87e53e8b0 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/ApiResponseEventArgs.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/ApiResponseEventArgs.cs @@ -12,35 +12,46 @@ namespace Org.OpenAPITools.Client /// The time the request was sent. /// public DateTime RequestedAt { get; } + /// /// The time the response was received. /// public DateTime ReceivedAt { get; } + /// /// The HttpStatusCode received. /// public HttpStatusCode HttpStatus { get; } + /// /// The path requested. /// - public string Path { get; } + public string PathFormat { get; } + /// /// The elapsed time from request to response. /// public TimeSpan ToTimeSpan => this.ReceivedAt - this.RequestedAt; + /// + /// The path + /// + public string Path { get; } + /// /// The event args used to track server health. /// /// /// /// + /// /// - public ApiResponseEventArgs(DateTime requestedAt, DateTime receivedAt, HttpStatusCode httpStatus, string path) + public ApiResponseEventArgs(DateTime requestedAt, DateTime receivedAt, HttpStatusCode httpStatus, string pathFormat, string path) { RequestedAt = requestedAt; ReceivedAt = receivedAt; HttpStatus = httpStatus; + PathFormat = pathFormat; Path = path; } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/ApiResponse`1.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/ApiResponse`1.cs index 36696f85be..1148457b2b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/ApiResponse`1.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/ApiResponse`1.cs @@ -36,6 +36,11 @@ namespace Org.OpenAPITools.Client /// The raw content of this response /// string RawContent { get; } + + /// + /// The DateTime when the request was retrieved. + /// + DateTime DownloadedAt { get; } } /// @@ -43,12 +48,10 @@ namespace Org.OpenAPITools.Client /// public partial class ApiResponse : IApiResponse { - #region Properties - /// /// The deserialized content /// - public T? Content { get; set; } + public T? Content { get; internal set; } /// /// Gets or sets the status code (HTTP status code) @@ -84,7 +87,10 @@ namespace Org.OpenAPITools.Client /// public System.Net.Http.Headers.HttpResponseHeaders Headers { get; } - #endregion Properties + /// + /// The DateTime when the request was retrieved. + /// + public DateTime DownloadedAt { get; } = DateTime.UtcNow; /// /// Construct the response using an HttpResponseMessage diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/ClientUtils.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/ClientUtils.cs index 73d4891851..e23f531480 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/ClientUtils.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/ClientUtils.cs @@ -12,16 +12,9 @@ using System; using System.IO; using System.Linq; -using System.Net.Http; using System.Text; using System.Text.Json; using System.Text.RegularExpressions; -using Microsoft.Extensions.Hosting; -using Microsoft.Extensions.DependencyInjection; -using Polly.Timeout; -using Polly.Extensions.Http; -using Polly; -using Org.OpenAPITools.Api; using KellermanSoftware.CompareNetObjects; namespace Org.OpenAPITools.Client @@ -282,114 +275,5 @@ namespace Org.OpenAPITools.Client /// The format to use for DateTime serialization /// public const string ISO8601_DATETIME_FORMAT = "o"; - - /// - /// Add the api to your host builder. - /// - /// - /// - public static IHostBuilder ConfigureApi(this IHostBuilder builder, Action options) - { - builder.ConfigureServices((context, services) => - { - HostConfiguration config = new HostConfiguration(services); - - options(context, config); - - AddApi(services, config); - }); - - return builder; - } - - /// - /// Add the api to your host builder. - /// - /// - /// - public static void AddApi(this IServiceCollection services, Action options) - { - HostConfiguration config = new HostConfiguration(services); - options(config); - AddApi(services, config); - } - - private static void AddApi(IServiceCollection services, HostConfiguration host) - { - if (!host.HttpClientsAdded) - host.AddApiHttpClients(); - - // ensure that a token provider was provided for this token type - // if not, default to RateLimitProvider - var containerServices = services.Where(s => s.ServiceType.IsGenericType && - s.ServiceType.GetGenericTypeDefinition().IsAssignableFrom(typeof(TokenContainer<>))).ToArray(); - - foreach(var containerService in containerServices) - { - var tokenType = containerService.ServiceType.GenericTypeArguments[0]; - - var provider = services.FirstOrDefault(s => s.ServiceType.IsAssignableFrom(typeof(TokenProvider<>).MakeGenericType(tokenType))); - - if (provider == null) - { - services.AddSingleton(typeof(RateLimitProvider<>).MakeGenericType(tokenType)); - services.AddSingleton(typeof(TokenProvider<>).MakeGenericType(tokenType), - s => s.GetRequiredService(typeof(RateLimitProvider<>).MakeGenericType(tokenType))); - } - } - } - - /// - /// Adds a Polly retry policy to your clients. - /// - /// - /// - /// - public static IHttpClientBuilder AddRetryPolicy(this IHttpClientBuilder client, int retries) - { - client.AddPolicyHandler(RetryPolicy(retries)); - - return client; - } - - /// - /// Adds a Polly timeout policy to your clients. - /// - /// - /// - /// - public static IHttpClientBuilder AddTimeoutPolicy(this IHttpClientBuilder client, TimeSpan timeout) - { - client.AddPolicyHandler(TimeoutPolicy(timeout)); - - return client; - } - - /// - /// Adds a Polly circiut breaker to your clients. - /// - /// - /// - /// - /// - public static IHttpClientBuilder AddCircuitBreakerPolicy(this IHttpClientBuilder client, int handledEventsAllowedBeforeBreaking, TimeSpan durationOfBreak) - { - client.AddTransientHttpErrorPolicy(builder => CircuitBreakerPolicy(builder, handledEventsAllowedBeforeBreaking, durationOfBreak)); - - return client; - } - - private static Polly.Retry.AsyncRetryPolicy RetryPolicy(int retries) - => HttpPolicyExtensions - .HandleTransientHttpError() - .Or() - .RetryAsync(retries); - - private static AsyncTimeoutPolicy TimeoutPolicy(TimeSpan timeout) - => Policy.TimeoutAsync(timeout); - - private static Polly.CircuitBreaker.AsyncCircuitBreakerPolicy CircuitBreakerPolicy( - PolicyBuilder builder, int handledEventsAllowedBeforeBreaking, TimeSpan durationOfBreak) - => builder.CircuitBreakerAsync(handledEventsAllowedBeforeBreaking, durationOfBreak); } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/CookieContainer.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/CookieContainer.cs new file mode 100644 index 0000000000..85093b0c1f --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/CookieContainer.cs @@ -0,0 +1,20 @@ +// + +#nullable enable + +using System.Linq; +using System.Collections.Generic; + +namespace Org.OpenAPITools.Client +{ + /// + /// A class containing a CookieContainer + /// + public sealed class CookieContainer + { + /// + /// The collection of tokens + /// + public System.Net.CookieContainer Value { get; } = new System.Net.CookieContainer(); + } +} \ No newline at end of file diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/DateTimeJsonConverter.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/DateTimeJsonConverter.cs new file mode 100644 index 0000000000..a86c694664 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/DateTimeJsonConverter.cs @@ -0,0 +1,71 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Globalization; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Org.OpenAPITools.Client +{ + /// + /// Formatter for 'date' openapi formats ss defined by full-date - RFC3339 + /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types + /// + public class DateTimeJsonConverter : JsonConverter + { + public static readonly string[] FORMATS = { + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'ffffffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'ffffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'ffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ssK", + "yyyyMMddTHHmmss.fffffffK", + "yyyyMMddTHHmmss.ffffffK", + "yyyyMMddTHHmmss.fffffK", + "yyyyMMddTHHmmss.ffffK", + "yyyyMMddTHHmmss.fffK", + "yyyyMMddTHHmmss.ffK", + "yyyyMMddTHHmmss.fK", + "yyyyMMddTHHmmssK", + }; + + /// + /// Returns a DateTime from the Json object + /// + /// + /// + /// + /// + public override DateTime Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { + if (reader.TokenType == JsonTokenType.Null) + throw new NotSupportedException(); + + string value = reader.GetString()!; + + foreach(string format in FORMATS) + if (DateTime.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateTime result)) + return result; + + throw new NotSupportedException(); + } + + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, DateTime dateTimeValue, JsonSerializerOptions options) => + writer.WriteStringValue(dateTimeValue.ToString(FORMATS[0], CultureInfo.InvariantCulture)); + } +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/DateTimeNullableJsonConverter.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/DateTimeNullableJsonConverter.cs new file mode 100644 index 0000000000..abf780dcd8 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/DateTimeNullableJsonConverter.cs @@ -0,0 +1,76 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Globalization; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Org.OpenAPITools.Client +{ + /// + /// Formatter for 'date' openapi formats ss defined by full-date - RFC3339 + /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types + /// + public class DateTimeNullableJsonConverter : JsonConverter + { + public static readonly string[] FORMATS = { + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'ffffffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'ffffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'ffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ssK", + "yyyyMMddTHHmmss.fffffffK", + "yyyyMMddTHHmmss.ffffffK", + "yyyyMMddTHHmmss.fffffK", + "yyyyMMddTHHmmss.ffffK", + "yyyyMMddTHHmmss.fffK", + "yyyyMMddTHHmmss.ffK", + "yyyyMMddTHHmmss.fK", + "yyyyMMddTHHmmssK", + }; + + /// + /// Returns a DateTime from the Json object + /// + /// + /// + /// + /// + public override DateTime? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { + if (reader.TokenType == JsonTokenType.Null) + return null; + + string value = reader.GetString()!; + + foreach(string format in FORMATS) + if (DateTime.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateTime result)) + return result; + + return null; + } + + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, DateTime? dateTimeValue, JsonSerializerOptions options) + { + if (dateTimeValue == null) + writer.WriteNullValue(); + else + writer.WriteStringValue(dateTimeValue.Value.ToString(FORMATS[0], CultureInfo.InvariantCulture)); + } + } +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/HostConfiguration.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/HostConfiguration.cs index d0346cfb49..4583545e96 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/HostConfiguration.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/HostConfiguration.cs @@ -16,7 +16,6 @@ using System.Text.Json; using System.Text.Json.Serialization; using System.Net.Http; using Microsoft.Extensions.DependencyInjection; -using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; namespace Org.OpenAPITools.Client @@ -24,10 +23,17 @@ namespace Org.OpenAPITools.Client /// /// Provides hosting configuration for Org.OpenAPITools /// - public class HostConfiguration + public class HostConfiguration + where TAnotherFakeApi : class, IApi.IAnotherFakeApi + where TDefaultApi : class, IApi.IDefaultApi + where TFakeApi : class, IApi.IFakeApi + where TFakeClassnameTags123Api : class, IApi.IFakeClassnameTags123Api + where TPetApi : class, IApi.IPetApi + where TStoreApi : class, IApi.IStoreApi + where TUserApi : class, IApi.IUserApi { private readonly IServiceCollection _services; - private JsonSerializerOptions _jsonOptions = new JsonSerializerOptions(); + private readonly JsonSerializerOptions _jsonOptions = new JsonSerializerOptions(); internal bool HttpClientsAdded { get; private set; } @@ -39,35 +45,101 @@ namespace Org.OpenAPITools.Client { _services = services; _jsonOptions.Converters.Add(new JsonStringEnumConverter()); - _jsonOptions.Converters.Add(new OpenAPIDateJsonConverter()); + _jsonOptions.Converters.Add(new DateTimeJsonConverter()); + _jsonOptions.Converters.Add(new DateTimeNullableJsonConverter()); + _jsonOptions.Converters.Add(new ActivityJsonConverter()); + _jsonOptions.Converters.Add(new ActivityOutputElementRepresentationJsonConverter()); + _jsonOptions.Converters.Add(new AdditionalPropertiesClassJsonConverter()); + _jsonOptions.Converters.Add(new AnimalJsonConverter()); + _jsonOptions.Converters.Add(new ApiResponseJsonConverter()); + _jsonOptions.Converters.Add(new AppleJsonConverter()); + _jsonOptions.Converters.Add(new AppleReqJsonConverter()); + _jsonOptions.Converters.Add(new ArrayOfArrayOfNumberOnlyJsonConverter()); + _jsonOptions.Converters.Add(new ArrayOfNumberOnlyJsonConverter()); + _jsonOptions.Converters.Add(new ArrayTestJsonConverter()); + _jsonOptions.Converters.Add(new BananaJsonConverter()); + _jsonOptions.Converters.Add(new BananaReqJsonConverter()); + _jsonOptions.Converters.Add(new BasquePigJsonConverter()); + _jsonOptions.Converters.Add(new CapitalizationJsonConverter()); _jsonOptions.Converters.Add(new CatJsonConverter()); + _jsonOptions.Converters.Add(new CatAllOfJsonConverter()); + _jsonOptions.Converters.Add(new CategoryJsonConverter()); _jsonOptions.Converters.Add(new ChildCatJsonConverter()); + _jsonOptions.Converters.Add(new ChildCatAllOfJsonConverter()); + _jsonOptions.Converters.Add(new ClassModelJsonConverter()); _jsonOptions.Converters.Add(new ComplexQuadrilateralJsonConverter()); + _jsonOptions.Converters.Add(new DanishPigJsonConverter()); + _jsonOptions.Converters.Add(new DeprecatedObjectJsonConverter()); _jsonOptions.Converters.Add(new DogJsonConverter()); + _jsonOptions.Converters.Add(new DogAllOfJsonConverter()); + _jsonOptions.Converters.Add(new DrawingJsonConverter()); + _jsonOptions.Converters.Add(new EnumArraysJsonConverter()); + _jsonOptions.Converters.Add(new EnumClassConverter()); + _jsonOptions.Converters.Add(new EnumClassNullableConverter()); + _jsonOptions.Converters.Add(new EnumTestJsonConverter()); _jsonOptions.Converters.Add(new EquilateralTriangleJsonConverter()); + _jsonOptions.Converters.Add(new FileJsonConverter()); + _jsonOptions.Converters.Add(new FileSchemaTestClassJsonConverter()); + _jsonOptions.Converters.Add(new FooJsonConverter()); + _jsonOptions.Converters.Add(new FooGetDefaultResponseJsonConverter()); + _jsonOptions.Converters.Add(new FormatTestJsonConverter()); _jsonOptions.Converters.Add(new FruitJsonConverter()); _jsonOptions.Converters.Add(new FruitReqJsonConverter()); _jsonOptions.Converters.Add(new GmFruitJsonConverter()); + _jsonOptions.Converters.Add(new GrandparentAnimalJsonConverter()); + _jsonOptions.Converters.Add(new HasOnlyReadOnlyJsonConverter()); + _jsonOptions.Converters.Add(new HealthCheckResultJsonConverter()); _jsonOptions.Converters.Add(new IsoscelesTriangleJsonConverter()); + _jsonOptions.Converters.Add(new ListJsonConverter()); _jsonOptions.Converters.Add(new MammalJsonConverter()); + _jsonOptions.Converters.Add(new MapTestJsonConverter()); + _jsonOptions.Converters.Add(new MixedPropertiesAndAdditionalPropertiesClassJsonConverter()); + _jsonOptions.Converters.Add(new Model200ResponseJsonConverter()); + _jsonOptions.Converters.Add(new ModelClientJsonConverter()); + _jsonOptions.Converters.Add(new NameJsonConverter()); + _jsonOptions.Converters.Add(new NullableClassJsonConverter()); _jsonOptions.Converters.Add(new NullableShapeJsonConverter()); + _jsonOptions.Converters.Add(new NumberOnlyJsonConverter()); + _jsonOptions.Converters.Add(new ObjectWithDeprecatedFieldsJsonConverter()); + _jsonOptions.Converters.Add(new OrderJsonConverter()); + _jsonOptions.Converters.Add(new OuterCompositeJsonConverter()); + _jsonOptions.Converters.Add(new OuterEnumConverter()); + _jsonOptions.Converters.Add(new OuterEnumNullableConverter()); + _jsonOptions.Converters.Add(new OuterEnumDefaultValueConverter()); + _jsonOptions.Converters.Add(new OuterEnumDefaultValueNullableConverter()); + _jsonOptions.Converters.Add(new OuterEnumIntegerConverter()); + _jsonOptions.Converters.Add(new OuterEnumIntegerNullableConverter()); + _jsonOptions.Converters.Add(new OuterEnumIntegerDefaultValueConverter()); + _jsonOptions.Converters.Add(new OuterEnumIntegerDefaultValueNullableConverter()); _jsonOptions.Converters.Add(new ParentPetJsonConverter()); + _jsonOptions.Converters.Add(new PetJsonConverter()); _jsonOptions.Converters.Add(new PigJsonConverter()); _jsonOptions.Converters.Add(new PolymorphicPropertyJsonConverter()); _jsonOptions.Converters.Add(new QuadrilateralJsonConverter()); + _jsonOptions.Converters.Add(new QuadrilateralInterfaceJsonConverter()); + _jsonOptions.Converters.Add(new ReadOnlyFirstJsonConverter()); + _jsonOptions.Converters.Add(new ReturnJsonConverter()); _jsonOptions.Converters.Add(new ScaleneTriangleJsonConverter()); _jsonOptions.Converters.Add(new ShapeJsonConverter()); + _jsonOptions.Converters.Add(new ShapeInterfaceJsonConverter()); _jsonOptions.Converters.Add(new ShapeOrNullJsonConverter()); _jsonOptions.Converters.Add(new SimpleQuadrilateralJsonConverter()); + _jsonOptions.Converters.Add(new SpecialModelNameJsonConverter()); + _jsonOptions.Converters.Add(new TagJsonConverter()); _jsonOptions.Converters.Add(new TriangleJsonConverter()); + _jsonOptions.Converters.Add(new TriangleInterfaceJsonConverter()); + _jsonOptions.Converters.Add(new UserJsonConverter()); + _jsonOptions.Converters.Add(new WhaleJsonConverter()); + _jsonOptions.Converters.Add(new ZebraJsonConverter()); _services.AddSingleton(new JsonSerializerOptionsProvider(_jsonOptions)); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); + _services.AddSingleton(); + _services.AddTransient(); + _services.AddTransient(); + _services.AddTransient(); + _services.AddTransient(); + _services.AddTransient(); + _services.AddTransient(); + _services.AddTransient(); } /// @@ -76,29 +148,22 @@ namespace Org.OpenAPITools.Client /// /// /// - public HostConfiguration AddApiHttpClients + public HostConfiguration AddApiHttpClients ( Action? client = null, Action? builder = null) - where TAnotherFakeApi : class, IAnotherFakeApi - where TDefaultApi : class, IDefaultApi - where TFakeApi : class, IFakeApi - where TFakeClassnameTags123Api : class, IFakeClassnameTags123Api - where TPetApi : class, IPetApi - where TStoreApi : class, IStoreApi - where TUserApi : class, IUserApi { if (client == null) client = c => c.BaseAddress = new Uri(ClientUtils.BASE_ADDRESS); List builders = new List(); - - builders.Add(_services.AddHttpClient(client)); - builders.Add(_services.AddHttpClient(client)); - builders.Add(_services.AddHttpClient(client)); - builders.Add(_services.AddHttpClient(client)); - builders.Add(_services.AddHttpClient(client)); - builders.Add(_services.AddHttpClient(client)); - builders.Add(_services.AddHttpClient(client)); + + builders.Add(_services.AddHttpClient(client)); + builders.Add(_services.AddHttpClient(client)); + builders.Add(_services.AddHttpClient(client)); + builders.Add(_services.AddHttpClient(client)); + builders.Add(_services.AddHttpClient(client)); + builders.Add(_services.AddHttpClient(client)); + builders.Add(_services.AddHttpClient(client)); if (builder != null) foreach (IHttpClientBuilder instance in builders) @@ -109,25 +174,12 @@ namespace Org.OpenAPITools.Client return this; } - /// - /// Configures the HttpClients. - /// - /// - /// - /// - public HostConfiguration AddApiHttpClients(Action? client = null, Action? builder = null) - { - AddApiHttpClients(client, builder); - - return this; - } - /// /// Configures the JsonSerializerSettings /// /// /// - public HostConfiguration ConfigureJsonOptions(Action options) + public HostConfiguration ConfigureJsonOptions(Action options) { options(_jsonOptions); @@ -140,7 +192,7 @@ namespace Org.OpenAPITools.Client /// /// /// - public HostConfiguration AddTokens(TTokenBase token) where TTokenBase : TokenBase + public HostConfiguration AddTokens(TTokenBase token) where TTokenBase : TokenBase { return AddTokens(new TTokenBase[]{ token }); } @@ -151,7 +203,7 @@ namespace Org.OpenAPITools.Client /// /// /// - public HostConfiguration AddTokens(IEnumerable tokens) where TTokenBase : TokenBase + public HostConfiguration AddTokens(IEnumerable tokens) where TTokenBase : TokenBase { TokenContainer container = new TokenContainer(tokens); _services.AddSingleton(services => container); @@ -165,7 +217,7 @@ namespace Org.OpenAPITools.Client /// /// /// - public HostConfiguration UseProvider() + public HostConfiguration UseProvider() where TTokenProvider : TokenProvider where TTokenBase : TokenBase { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/IApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/IApi.cs deleted file mode 100644 index 53c5a858ff..0000000000 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/IApi.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System.Net.Http; - -namespace Org.OpenAPITools.Client -{ - /// - /// Any Api client - /// - public interface IApi - { - /// - /// The HttpClient - /// - HttpClient HttpClient { get; } - - /// - /// An event to track the health of the server. - /// If you store these event args, be sure to purge old event args to prevent a memory leak. - /// - event ClientUtils.EventHandler? ApiResponded; - } -} \ No newline at end of file diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/OpenAPIDateJsonConverter.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/OpenAPIDateJsonConverter.cs deleted file mode 100644 index 5f64123b7d..0000000000 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Client/OpenAPIDateJsonConverter.cs +++ /dev/null @@ -1,42 +0,0 @@ -/* - * OpenAPI Petstore - * - * 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://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Globalization; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Org.OpenAPITools.Client -{ - /// - /// Formatter for 'date' openapi formats ss defined by full-date - RFC3339 - /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types - /// - public class OpenAPIDateJsonConverter : JsonConverter - { - /// - /// Returns a DateTime from the Json object - /// - /// - /// - /// - /// - public override DateTime Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => - DateTime.ParseExact(reader.GetString()!, "yyyy-MM-dd", CultureInfo.InvariantCulture); - - /// - /// Writes the DateTime to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, DateTime dateTimeValue, JsonSerializerOptions options) => - writer.WriteStringValue(dateTimeValue.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture)); - } -} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Extensions/IHostBuilderExtensions.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Extensions/IHostBuilderExtensions.cs new file mode 100644 index 0000000000..798c676b1b --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Extensions/IHostBuilderExtensions.cs @@ -0,0 +1,59 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Org.OpenAPITools.Client; +using Org.OpenAPITools.Api; + +namespace Org.OpenAPITools.Extensions +{ + /// + /// Extension methods for IHostBuilder + /// + public static class IHostBuilderExtensions + { + /// + /// Add the api to your host builder. + /// + /// + /// + public static IHostBuilder ConfigureApi(this IHostBuilder builder, Action> options) + where TAnotherFakeApi : class, IApi.IAnotherFakeApi + where TDefaultApi : class, IApi.IDefaultApi + where TFakeApi : class, IApi.IFakeApi + where TFakeClassnameTags123Api : class, IApi.IFakeClassnameTags123Api + where TPetApi : class, IApi.IPetApi + where TStoreApi : class, IApi.IStoreApi + where TUserApi : class, IApi.IUserApi + { + builder.ConfigureServices((context, services) => + { + HostConfiguration config = new HostConfiguration(services); + + options(context, services, config); + + IServiceCollectionExtensions.AddApi(services, config); + }); + + return builder; + } + + /// + /// Add the api to your host builder. + /// + /// + /// + public static IHostBuilder ConfigureApi(this IHostBuilder builder, Action> options) + => ConfigureApi(builder, options); + } +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Extensions/IHttpClientBuilderExtensions.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Extensions/IHttpClientBuilderExtensions.cs new file mode 100644 index 0000000000..95cbdb3808 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Extensions/IHttpClientBuilderExtensions.cs @@ -0,0 +1,79 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Net.Http; +using Microsoft.Extensions.DependencyInjection; +using Polly.Timeout; +using Polly.Extensions.Http; +using Polly; + +namespace Org.OpenAPITools.Extensions +{ + /// + /// Extension methods for IHttpClientBuilder + /// + public static class IHttpClientBuilderExtensions + { + /// + /// Adds a Polly retry policy to your clients. + /// + /// + /// + /// + public static IHttpClientBuilder AddRetryPolicy(this IHttpClientBuilder client, int retries) + { + client.AddPolicyHandler(RetryPolicy(retries)); + + return client; + } + + /// + /// Adds a Polly timeout policy to your clients. + /// + /// + /// + /// + public static IHttpClientBuilder AddTimeoutPolicy(this IHttpClientBuilder client, TimeSpan timeout) + { + client.AddPolicyHandler(TimeoutPolicy(timeout)); + + return client; + } + + /// + /// Adds a Polly circiut breaker to your clients. + /// + /// + /// + /// + /// + public static IHttpClientBuilder AddCircuitBreakerPolicy(this IHttpClientBuilder client, int handledEventsAllowedBeforeBreaking, TimeSpan durationOfBreak) + { + client.AddTransientHttpErrorPolicy(builder => CircuitBreakerPolicy(builder, handledEventsAllowedBeforeBreaking, durationOfBreak)); + + return client; + } + + private static Polly.Retry.AsyncRetryPolicy RetryPolicy(int retries) + => HttpPolicyExtensions + .HandleTransientHttpError() + .Or() + .RetryAsync(retries); + + private static AsyncTimeoutPolicy TimeoutPolicy(TimeSpan timeout) + => Policy.TimeoutAsync(timeout); + + private static Polly.CircuitBreaker.AsyncCircuitBreakerPolicy CircuitBreakerPolicy( + PolicyBuilder builder, int handledEventsAllowedBeforeBreaking, TimeSpan durationOfBreak) + => builder.CircuitBreakerAsync(handledEventsAllowedBeforeBreaking, durationOfBreak); + } +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Extensions/IServiceCollectionExtensions.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Extensions/IServiceCollectionExtensions.cs new file mode 100644 index 0000000000..1ed9bbd90a --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Extensions/IServiceCollectionExtensions.cs @@ -0,0 +1,90 @@ +/* + * OpenAPI Petstore + * + * 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://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Linq; +using Microsoft.Extensions.DependencyInjection; +using Org.OpenAPITools.Client; +using Org.OpenAPITools.Api; + +namespace Org.OpenAPITools.Extensions +{ + /// + /// Extension methods for IServiceCollection + /// + public static class IServiceCollectionExtensions + { + /// + /// Add the api to your host builder. + /// + /// + /// + public static void AddApi(this IServiceCollection services, Action> options) + where TAnotherFakeApi : class, IApi.IAnotherFakeApi + where TDefaultApi : class, IApi.IDefaultApi + where TFakeApi : class, IApi.IFakeApi + where TFakeClassnameTags123Api : class, IApi.IFakeClassnameTags123Api + where TPetApi : class, IApi.IPetApi + where TStoreApi : class, IApi.IStoreApi + where TUserApi : class, IApi.IUserApi + { + HostConfiguration config = new HostConfiguration(services); + options(config); + AddApi(services, config); + } + + /// + /// Add the api to your host builder. + /// + /// + /// + public static void AddApi(this IServiceCollection services, Action> options) + { + HostConfiguration config = new HostConfiguration(services); + options(config); + AddApi(services, config); + } + + internal static void AddApi(IServiceCollection services, HostConfiguration host) + where TAnotherFakeApi : class, IApi.IAnotherFakeApi + where TDefaultApi : class, IApi.IDefaultApi + where TFakeApi : class, IApi.IFakeApi + where TFakeClassnameTags123Api : class, IApi.IFakeClassnameTags123Api + where TPetApi : class, IApi.IPetApi + where TStoreApi : class, IApi.IStoreApi + where TUserApi : class, IApi.IUserApi + { + if (!host.HttpClientsAdded) + host.AddApiHttpClients(); + + services.AddSingleton(); + + // ensure that a token provider was provided for this token type + // if not, default to RateLimitProvider + var containerServices = services.Where(s => s.ServiceType.IsGenericType && + s.ServiceType.GetGenericTypeDefinition().IsAssignableFrom(typeof(TokenContainer<>))).ToArray(); + + foreach(var containerService in containerServices) + { + var tokenType = containerService.ServiceType.GenericTypeArguments[0]; + + var provider = services.FirstOrDefault(s => s.ServiceType.IsAssignableFrom(typeof(TokenProvider<>).MakeGenericType(tokenType))); + + if (provider == null) + { + services.AddSingleton(typeof(RateLimitProvider<>).MakeGenericType(tokenType)); + services.AddSingleton(typeof(TokenProvider<>).MakeGenericType(tokenType), + s => s.GetRequiredService(typeof(RateLimitProvider<>).MakeGenericType(tokenType))); + } + } + } + } +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Activity.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Activity.cs index d8753f6553..3e658cad4d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Activity.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Activity.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,14 +28,24 @@ namespace Org.OpenAPITools.Model /// /// test map of maps /// - public partial class Activity : IEquatable, IValidatableObject + public partial class Activity : IValidatableObject { /// /// Initializes a new instance of the class. /// /// activityOutputs - public Activity(Dictionary>? activityOutputs = default) + [JsonConstructor] + public Activity(Dictionary> activityOutputs) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (activityOutputs == null) + throw new ArgumentNullException("activityOutputs is a required property for Activity and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + ActivityOutputs = activityOutputs; } @@ -44,13 +53,13 @@ namespace Org.OpenAPITools.Model /// Gets or Sets ActivityOutputs /// [JsonPropertyName("activity_outputs")] - public Dictionary>? ActivityOutputs { get; set; } + public Dictionary> ActivityOutputs { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -65,48 +74,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Activity).AreEqual; - } - - /// - /// Returns true if Activity instances are equal - /// - /// Instance of Activity to be compared - /// Boolean - public bool Equals(Activity? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ActivityOutputs != null) - { - hashCode = (hashCode * 59) + this.ActivityOutputs.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -118,4 +85,72 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type Activity + /// + public class ActivityJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override Activity Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + Dictionary> activityOutputs = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "activity_outputs": + activityOutputs = JsonSerializer.Deserialize>>(ref reader, options); + break; + default: + break; + } + } + } + + return new Activity(activityOutputs); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Activity activity, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WritePropertyName("activity_outputs"); + JsonSerializer.Serialize(writer, activity.ActivityOutputs, options); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs index 2cd5bb9372..3cfe622988 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,15 +28,28 @@ namespace Org.OpenAPITools.Model /// /// ActivityOutputElementRepresentation /// - public partial class ActivityOutputElementRepresentation : IEquatable, IValidatableObject + public partial class ActivityOutputElementRepresentation : IValidatableObject { /// /// Initializes a new instance of the class. /// /// prop1 /// prop2 - public ActivityOutputElementRepresentation(string? prop1 = default, Object? prop2 = default) + [JsonConstructor] + public ActivityOutputElementRepresentation(string prop1, Object prop2) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (prop1 == null) + throw new ArgumentNullException("prop1 is a required property for ActivityOutputElementRepresentation and cannot be null."); + + if (prop2 == null) + throw new ArgumentNullException("prop2 is a required property for ActivityOutputElementRepresentation and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + Prop1 = prop1; Prop2 = prop2; } @@ -46,19 +58,19 @@ namespace Org.OpenAPITools.Model /// Gets or Sets Prop1 /// [JsonPropertyName("prop1")] - public string? Prop1 { get; set; } + public string Prop1 { get; set; } /// /// Gets or Sets Prop2 /// [JsonPropertyName("prop2")] - public Object? Prop2 { get; set; } + public Object Prop2 { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -74,52 +86,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as ActivityOutputElementRepresentation).AreEqual; - } - - /// - /// Returns true if ActivityOutputElementRepresentation instances are equal - /// - /// Instance of ActivityOutputElementRepresentation to be compared - /// Boolean - public bool Equals(ActivityOutputElementRepresentation? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Prop1 != null) - { - hashCode = (hashCode * 59) + this.Prop1.GetHashCode(); - } - if (this.Prop2 != null) - { - hashCode = (hashCode * 59) + this.Prop2.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -131,4 +97,77 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type ActivityOutputElementRepresentation + /// + public class ActivityOutputElementRepresentationJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override ActivityOutputElementRepresentation Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string prop1 = default; + Object prop2 = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "prop1": + prop1 = reader.GetString(); + break; + case "prop2": + prop2 = JsonSerializer.Deserialize(ref reader, options); + break; + default: + break; + } + } + } + + return new ActivityOutputElementRepresentation(prop1, prop2); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ActivityOutputElementRepresentation activityOutputElementRepresentation, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("prop1", activityOutputElementRepresentation.Prop1); + writer.WritePropertyName("prop2"); + JsonSerializer.Serialize(writer, activityOutputElementRepresentation.Prop2, options); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs index 6525a4a034..2bdee7f21c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,42 +28,101 @@ namespace Org.OpenAPITools.Model /// /// AdditionalPropertiesClass /// - public partial class AdditionalPropertiesClass : IEquatable, IValidatableObject + public partial class AdditionalPropertiesClass : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// mapProperty + /// an object with no declared properties and no undeclared properties, hence it's an empty map. /// mapOfMapProperty - /// anytype1 + /// mapProperty /// mapWithUndeclaredPropertiesAnytype1 /// mapWithUndeclaredPropertiesAnytype2 /// mapWithUndeclaredPropertiesAnytype3 - /// an object with no declared properties and no undeclared properties, hence it's an empty map. /// mapWithUndeclaredPropertiesString - public AdditionalPropertiesClass(Dictionary? mapProperty = default, Dictionary>? mapOfMapProperty = default, Object? anytype1 = default, Object? mapWithUndeclaredPropertiesAnytype1 = default, Object? mapWithUndeclaredPropertiesAnytype2 = default, Dictionary? mapWithUndeclaredPropertiesAnytype3 = default, Object? emptyMap = default, Dictionary? mapWithUndeclaredPropertiesString = default) + /// anytype1 + [JsonConstructor] + public AdditionalPropertiesClass(Object emptyMap, Dictionary> mapOfMapProperty, Dictionary mapProperty, Object mapWithUndeclaredPropertiesAnytype1, Object mapWithUndeclaredPropertiesAnytype2, Dictionary mapWithUndeclaredPropertiesAnytype3, Dictionary mapWithUndeclaredPropertiesString, Object? anytype1 = default) { - MapProperty = mapProperty; +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (mapProperty == null) + throw new ArgumentNullException("mapProperty is a required property for AdditionalPropertiesClass and cannot be null."); + + if (mapOfMapProperty == null) + throw new ArgumentNullException("mapOfMapProperty is a required property for AdditionalPropertiesClass and cannot be null."); + + if (mapWithUndeclaredPropertiesAnytype1 == null) + throw new ArgumentNullException("mapWithUndeclaredPropertiesAnytype1 is a required property for AdditionalPropertiesClass and cannot be null."); + + if (mapWithUndeclaredPropertiesAnytype2 == null) + throw new ArgumentNullException("mapWithUndeclaredPropertiesAnytype2 is a required property for AdditionalPropertiesClass and cannot be null."); + + if (mapWithUndeclaredPropertiesAnytype3 == null) + throw new ArgumentNullException("mapWithUndeclaredPropertiesAnytype3 is a required property for AdditionalPropertiesClass and cannot be null."); + + if (emptyMap == null) + throw new ArgumentNullException("emptyMap is a required property for AdditionalPropertiesClass and cannot be null."); + + if (mapWithUndeclaredPropertiesString == null) + throw new ArgumentNullException("mapWithUndeclaredPropertiesString is a required property for AdditionalPropertiesClass and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + EmptyMap = emptyMap; MapOfMapProperty = mapOfMapProperty; - Anytype1 = anytype1; + MapProperty = mapProperty; MapWithUndeclaredPropertiesAnytype1 = mapWithUndeclaredPropertiesAnytype1; MapWithUndeclaredPropertiesAnytype2 = mapWithUndeclaredPropertiesAnytype2; MapWithUndeclaredPropertiesAnytype3 = mapWithUndeclaredPropertiesAnytype3; - EmptyMap = emptyMap; MapWithUndeclaredPropertiesString = mapWithUndeclaredPropertiesString; + Anytype1 = anytype1; } /// - /// Gets or Sets MapProperty + /// an object with no declared properties and no undeclared properties, hence it's an empty map. /// - [JsonPropertyName("map_property")] - public Dictionary? MapProperty { get; set; } + /// an object with no declared properties and no undeclared properties, hence it's an empty map. + [JsonPropertyName("empty_map")] + public Object EmptyMap { get; set; } /// /// Gets or Sets MapOfMapProperty /// [JsonPropertyName("map_of_map_property")] - public Dictionary>? MapOfMapProperty { get; set; } + public Dictionary> MapOfMapProperty { get; set; } + + /// + /// Gets or Sets MapProperty + /// + [JsonPropertyName("map_property")] + public Dictionary MapProperty { get; set; } + + /// + /// Gets or Sets MapWithUndeclaredPropertiesAnytype1 + /// + [JsonPropertyName("map_with_undeclared_properties_anytype_1")] + public Object MapWithUndeclaredPropertiesAnytype1 { get; set; } + + /// + /// Gets or Sets MapWithUndeclaredPropertiesAnytype2 + /// + [JsonPropertyName("map_with_undeclared_properties_anytype_2")] + public Object MapWithUndeclaredPropertiesAnytype2 { get; set; } + + /// + /// Gets or Sets MapWithUndeclaredPropertiesAnytype3 + /// + [JsonPropertyName("map_with_undeclared_properties_anytype_3")] + public Dictionary MapWithUndeclaredPropertiesAnytype3 { get; set; } + + /// + /// Gets or Sets MapWithUndeclaredPropertiesString + /// + [JsonPropertyName("map_with_undeclared_properties_string")] + public Dictionary MapWithUndeclaredPropertiesString { get; set; } /// /// Gets or Sets Anytype1 @@ -72,42 +130,11 @@ namespace Org.OpenAPITools.Model [JsonPropertyName("anytype_1")] public Object? Anytype1 { get; set; } - /// - /// Gets or Sets MapWithUndeclaredPropertiesAnytype1 - /// - [JsonPropertyName("map_with_undeclared_properties_anytype_1")] - public Object? MapWithUndeclaredPropertiesAnytype1 { get; set; } - - /// - /// Gets or Sets MapWithUndeclaredPropertiesAnytype2 - /// - [JsonPropertyName("map_with_undeclared_properties_anytype_2")] - public Object? MapWithUndeclaredPropertiesAnytype2 { get; set; } - - /// - /// Gets or Sets MapWithUndeclaredPropertiesAnytype3 - /// - [JsonPropertyName("map_with_undeclared_properties_anytype_3")] - public Dictionary? MapWithUndeclaredPropertiesAnytype3 { get; set; } - - /// - /// an object with no declared properties and no undeclared properties, hence it's an empty map. - /// - /// an object with no declared properties and no undeclared properties, hence it's an empty map. - [JsonPropertyName("empty_map")] - public Object? EmptyMap { get; set; } - - /// - /// Gets or Sets MapWithUndeclaredPropertiesString - /// - [JsonPropertyName("map_with_undeclared_properties_string")] - public Dictionary? MapWithUndeclaredPropertiesString { get; set; } - /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -117,88 +144,18 @@ namespace Org.OpenAPITools.Model { StringBuilder sb = new StringBuilder(); sb.Append("class AdditionalPropertiesClass {\n"); - sb.Append(" MapProperty: ").Append(MapProperty).Append("\n"); + sb.Append(" EmptyMap: ").Append(EmptyMap).Append("\n"); sb.Append(" MapOfMapProperty: ").Append(MapOfMapProperty).Append("\n"); - sb.Append(" Anytype1: ").Append(Anytype1).Append("\n"); + sb.Append(" MapProperty: ").Append(MapProperty).Append("\n"); sb.Append(" MapWithUndeclaredPropertiesAnytype1: ").Append(MapWithUndeclaredPropertiesAnytype1).Append("\n"); sb.Append(" MapWithUndeclaredPropertiesAnytype2: ").Append(MapWithUndeclaredPropertiesAnytype2).Append("\n"); sb.Append(" MapWithUndeclaredPropertiesAnytype3: ").Append(MapWithUndeclaredPropertiesAnytype3).Append("\n"); - sb.Append(" EmptyMap: ").Append(EmptyMap).Append("\n"); sb.Append(" MapWithUndeclaredPropertiesString: ").Append(MapWithUndeclaredPropertiesString).Append("\n"); + sb.Append(" Anytype1: ").Append(Anytype1).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as AdditionalPropertiesClass).AreEqual; - } - - /// - /// Returns true if AdditionalPropertiesClass instances are equal - /// - /// Instance of AdditionalPropertiesClass to be compared - /// Boolean - public bool Equals(AdditionalPropertiesClass? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.MapProperty != null) - { - hashCode = (hashCode * 59) + this.MapProperty.GetHashCode(); - } - if (this.MapOfMapProperty != null) - { - hashCode = (hashCode * 59) + this.MapOfMapProperty.GetHashCode(); - } - if (this.Anytype1 != null) - { - hashCode = (hashCode * 59) + this.Anytype1.GetHashCode(); - } - if (this.MapWithUndeclaredPropertiesAnytype1 != null) - { - hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesAnytype1.GetHashCode(); - } - if (this.MapWithUndeclaredPropertiesAnytype2 != null) - { - hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesAnytype2.GetHashCode(); - } - if (this.MapWithUndeclaredPropertiesAnytype3 != null) - { - hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesAnytype3.GetHashCode(); - } - if (this.EmptyMap != null) - { - hashCode = (hashCode * 59) + this.EmptyMap.GetHashCode(); - } - if (this.MapWithUndeclaredPropertiesString != null) - { - hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesString.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -210,4 +167,114 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type AdditionalPropertiesClass + /// + public class AdditionalPropertiesClassJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override AdditionalPropertiesClass Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + Object emptyMap = default; + Dictionary> mapOfMapProperty = default; + Dictionary mapProperty = default; + Object mapWithUndeclaredPropertiesAnytype1 = default; + Object mapWithUndeclaredPropertiesAnytype2 = default; + Dictionary mapWithUndeclaredPropertiesAnytype3 = default; + Dictionary mapWithUndeclaredPropertiesString = default; + Object anytype1 = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "empty_map": + emptyMap = JsonSerializer.Deserialize(ref reader, options); + break; + case "map_of_map_property": + mapOfMapProperty = JsonSerializer.Deserialize>>(ref reader, options); + break; + case "map_property": + mapProperty = JsonSerializer.Deserialize>(ref reader, options); + break; + case "map_with_undeclared_properties_anytype_1": + mapWithUndeclaredPropertiesAnytype1 = JsonSerializer.Deserialize(ref reader, options); + break; + case "map_with_undeclared_properties_anytype_2": + mapWithUndeclaredPropertiesAnytype2 = JsonSerializer.Deserialize(ref reader, options); + break; + case "map_with_undeclared_properties_anytype_3": + mapWithUndeclaredPropertiesAnytype3 = JsonSerializer.Deserialize>(ref reader, options); + break; + case "map_with_undeclared_properties_string": + mapWithUndeclaredPropertiesString = JsonSerializer.Deserialize>(ref reader, options); + break; + case "anytype_1": + anytype1 = JsonSerializer.Deserialize(ref reader, options); + break; + default: + break; + } + } + } + + return new AdditionalPropertiesClass(emptyMap, mapOfMapProperty, mapProperty, mapWithUndeclaredPropertiesAnytype1, mapWithUndeclaredPropertiesAnytype2, mapWithUndeclaredPropertiesAnytype3, mapWithUndeclaredPropertiesString, anytype1); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, AdditionalPropertiesClass additionalPropertiesClass, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WritePropertyName("empty_map"); + JsonSerializer.Serialize(writer, additionalPropertiesClass.EmptyMap, options); + writer.WritePropertyName("map_of_map_property"); + JsonSerializer.Serialize(writer, additionalPropertiesClass.MapOfMapProperty, options); + writer.WritePropertyName("map_property"); + JsonSerializer.Serialize(writer, additionalPropertiesClass.MapProperty, options); + writer.WritePropertyName("map_with_undeclared_properties_anytype_1"); + JsonSerializer.Serialize(writer, additionalPropertiesClass.MapWithUndeclaredPropertiesAnytype1, options); + writer.WritePropertyName("map_with_undeclared_properties_anytype_2"); + JsonSerializer.Serialize(writer, additionalPropertiesClass.MapWithUndeclaredPropertiesAnytype2, options); + writer.WritePropertyName("map_with_undeclared_properties_anytype_3"); + JsonSerializer.Serialize(writer, additionalPropertiesClass.MapWithUndeclaredPropertiesAnytype3, options); + writer.WritePropertyName("map_with_undeclared_properties_string"); + JsonSerializer.Serialize(writer, additionalPropertiesClass.MapWithUndeclaredPropertiesString, options); + writer.WritePropertyName("anytype_1"); + JsonSerializer.Serialize(writer, additionalPropertiesClass.Anytype1, options); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Animal.cs index 21aa789d30..8d5bd4c6c9 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Animal.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,18 +28,28 @@ namespace Org.OpenAPITools.Model /// /// Animal /// - public partial class Animal : IEquatable, IValidatableObject + public partial class Animal : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// className (required) + /// className /// color (default to "red") - public Animal(string className, string? color = "red") + [JsonConstructor] + public Animal(string className, string color = "red") { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + if (className == null) throw new ArgumentNullException("className is a required property for Animal and cannot be null."); + if (color == null) + throw new ArgumentNullException("color is a required property for Animal and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + ClassName = className; Color = color; } @@ -55,13 +64,13 @@ namespace Org.OpenAPITools.Model /// Gets or Sets Color /// [JsonPropertyName("color")] - public string? Color { get; set; } + public string Color { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -77,52 +86,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Animal).AreEqual; - } - - /// - /// Returns true if Animal instances are equal - /// - /// Instance of Animal to be compared - /// Boolean - public bool Equals(Animal? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ClassName != null) - { - hashCode = (hashCode * 59) + this.ClassName.GetHashCode(); - } - if (this.Color != null) - { - hashCode = (hashCode * 59) + this.Color.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -144,4 +107,76 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type Animal + /// + public class AnimalJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override Animal Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string className = default; + string color = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "className": + className = reader.GetString(); + break; + case "color": + color = reader.GetString(); + break; + default: + break; + } + } + } + + return new Animal(className, color); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Animal animal, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("className", animal.ClassName); + writer.WriteString("color", animal.Color); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ApiResponse.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ApiResponse.cs index 8bde19180c..ca44ce608d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ApiResponse.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ApiResponse.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,44 +28,60 @@ namespace Org.OpenAPITools.Model /// /// ApiResponse /// - public partial class ApiResponse : IEquatable, IValidatableObject + public partial class ApiResponse : IValidatableObject { /// /// Initializes a new instance of the class. /// /// code - /// type /// message - public ApiResponse(int? code = default, string? type = default, string? message = default) + /// type + [JsonConstructor] + public ApiResponse(int code, string message, string type) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (code == null) + throw new ArgumentNullException("code is a required property for ApiResponse and cannot be null."); + + if (type == null) + throw new ArgumentNullException("type is a required property for ApiResponse and cannot be null."); + + if (message == null) + throw new ArgumentNullException("message is a required property for ApiResponse and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + Code = code; - Type = type; Message = message; + Type = type; } /// /// Gets or Sets Code /// [JsonPropertyName("code")] - public int? Code { get; set; } - - /// - /// Gets or Sets Type - /// - [JsonPropertyName("type")] - public string? Type { get; set; } + public int Code { get; set; } /// /// Gets or Sets Message /// [JsonPropertyName("message")] - public string? Message { get; set; } + public string Message { get; set; } + + /// + /// Gets or Sets Type + /// + [JsonPropertyName("type")] + public string Type { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -77,59 +92,12 @@ namespace Org.OpenAPITools.Model StringBuilder sb = new StringBuilder(); sb.Append("class ApiResponse {\n"); sb.Append(" Code: ").Append(Code).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append(" Message: ").Append(Message).Append("\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as ApiResponse).AreEqual; - } - - /// - /// Returns true if ApiResponse instances are equal - /// - /// Instance of ApiResponse to be compared - /// Boolean - public bool Equals(ApiResponse? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Code.GetHashCode(); - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - if (this.Message != null) - { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -141,4 +109,81 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type ApiResponse + /// + public class ApiResponseJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override ApiResponse Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + int code = default; + string message = default; + string type = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "code": + code = reader.GetInt32(); + break; + case "message": + message = reader.GetString(); + break; + case "type": + type = reader.GetString(); + break; + default: + break; + } + } + } + + return new ApiResponse(code, message, type); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ApiResponse apiResponse, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteNumber("code", (int)apiResponse.Code); + writer.WriteString("message", apiResponse.Message); + writer.WriteString("type", apiResponse.Type); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Apple.cs index dadf5664d0..bd710804c0 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Apple.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,15 +28,28 @@ namespace Org.OpenAPITools.Model /// /// Apple /// - public partial class Apple : IEquatable, IValidatableObject + public partial class Apple : IValidatableObject { /// /// Initializes a new instance of the class. /// /// cultivar /// origin - public Apple(string? cultivar = default, string? origin = default) + [JsonConstructor] + public Apple(string cultivar, string origin) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (cultivar == null) + throw new ArgumentNullException("cultivar is a required property for Apple and cannot be null."); + + if (origin == null) + throw new ArgumentNullException("origin is a required property for Apple and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + Cultivar = cultivar; Origin = origin; } @@ -46,19 +58,19 @@ namespace Org.OpenAPITools.Model /// Gets or Sets Cultivar /// [JsonPropertyName("cultivar")] - public string? Cultivar { get; set; } + public string Cultivar { get; set; } /// /// Gets or Sets Origin /// [JsonPropertyName("origin")] - public string? Origin { get; set; } + public string Origin { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -74,52 +86,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Apple).AreEqual; - } - - /// - /// Returns true if Apple instances are equal - /// - /// Instance of Apple to be compared - /// Boolean - public bool Equals(Apple? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Cultivar != null) - { - hashCode = (hashCode * 59) + this.Cultivar.GetHashCode(); - } - if (this.Origin != null) - { - hashCode = (hashCode * 59) + this.Origin.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -145,4 +111,76 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type Apple + /// + public class AppleJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override Apple Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string cultivar = default; + string origin = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "cultivar": + cultivar = reader.GetString(); + break; + case "origin": + origin = reader.GetString(); + break; + default: + break; + } + } + } + + return new Apple(cultivar, origin); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Apple apple, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("cultivar", apple.Cultivar); + writer.WriteString("origin", apple.Origin); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/AppleReq.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/AppleReq.cs index d323a03e06..93a9e8fb3d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/AppleReq.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/AppleReq.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,18 +28,28 @@ namespace Org.OpenAPITools.Model /// /// AppleReq /// - public partial class AppleReq : IEquatable, IValidatableObject + public partial class AppleReq : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// cultivar (required) + /// cultivar /// mealy - public AppleReq(string cultivar, bool? mealy = default) + [JsonConstructor] + public AppleReq(string cultivar, bool mealy) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + if (cultivar == null) throw new ArgumentNullException("cultivar is a required property for AppleReq and cannot be null."); + if (mealy == null) + throw new ArgumentNullException("mealy is a required property for AppleReq and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + Cultivar = cultivar; Mealy = mealy; } @@ -55,7 +64,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets Mealy /// [JsonPropertyName("mealy")] - public bool? Mealy { get; set; } + public bool Mealy { get; set; } /// /// Returns the string presentation of the object @@ -70,45 +79,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as AppleReq).AreEqual; - } - - /// - /// Returns true if AppleReq instances are equal - /// - /// Instance of AppleReq to be compared - /// Boolean - public bool Equals(AppleReq? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Cultivar != null) - { - hashCode = (hashCode * 59) + this.Cultivar.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Mealy.GetHashCode(); - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -120,4 +90,76 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type AppleReq + /// + public class AppleReqJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override AppleReq Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string cultivar = default; + bool mealy = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "cultivar": + cultivar = reader.GetString(); + break; + case "mealy": + mealy = reader.GetBoolean(); + break; + default: + break; + } + } + } + + return new AppleReq(cultivar, mealy); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, AppleReq appleReq, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("cultivar", appleReq.Cultivar); + writer.WriteBoolean("mealy", appleReq.Mealy); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs index e284a52634..f59cb18549 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,14 +28,24 @@ namespace Org.OpenAPITools.Model /// /// ArrayOfArrayOfNumberOnly /// - public partial class ArrayOfArrayOfNumberOnly : IEquatable, IValidatableObject + public partial class ArrayOfArrayOfNumberOnly : IValidatableObject { /// /// Initializes a new instance of the class. /// /// arrayArrayNumber - public ArrayOfArrayOfNumberOnly(List>? arrayArrayNumber = default) + [JsonConstructor] + public ArrayOfArrayOfNumberOnly(List> arrayArrayNumber) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (arrayArrayNumber == null) + throw new ArgumentNullException("arrayArrayNumber is a required property for ArrayOfArrayOfNumberOnly and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + ArrayArrayNumber = arrayArrayNumber; } @@ -44,13 +53,13 @@ namespace Org.OpenAPITools.Model /// Gets or Sets ArrayArrayNumber /// [JsonPropertyName("ArrayArrayNumber")] - public List>? ArrayArrayNumber { get; set; } + public List> ArrayArrayNumber { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -65,48 +74,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as ArrayOfArrayOfNumberOnly).AreEqual; - } - - /// - /// Returns true if ArrayOfArrayOfNumberOnly instances are equal - /// - /// Instance of ArrayOfArrayOfNumberOnly to be compared - /// Boolean - public bool Equals(ArrayOfArrayOfNumberOnly? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ArrayArrayNumber != null) - { - hashCode = (hashCode * 59) + this.ArrayArrayNumber.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -118,4 +85,72 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type ArrayOfArrayOfNumberOnly + /// + public class ArrayOfArrayOfNumberOnlyJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override ArrayOfArrayOfNumberOnly Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + List> arrayArrayNumber = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "ArrayArrayNumber": + arrayArrayNumber = JsonSerializer.Deserialize>>(ref reader, options); + break; + default: + break; + } + } + } + + return new ArrayOfArrayOfNumberOnly(arrayArrayNumber); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ArrayOfArrayOfNumberOnly arrayOfArrayOfNumberOnly, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WritePropertyName("ArrayArrayNumber"); + JsonSerializer.Serialize(writer, arrayOfArrayOfNumberOnly.ArrayArrayNumber, options); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs index 1670dcd31a..58c27adc71 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,14 +28,24 @@ namespace Org.OpenAPITools.Model /// /// ArrayOfNumberOnly /// - public partial class ArrayOfNumberOnly : IEquatable, IValidatableObject + public partial class ArrayOfNumberOnly : IValidatableObject { /// /// Initializes a new instance of the class. /// /// arrayNumber - public ArrayOfNumberOnly(List? arrayNumber = default) + [JsonConstructor] + public ArrayOfNumberOnly(List arrayNumber) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (arrayNumber == null) + throw new ArgumentNullException("arrayNumber is a required property for ArrayOfNumberOnly and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + ArrayNumber = arrayNumber; } @@ -44,13 +53,13 @@ namespace Org.OpenAPITools.Model /// Gets or Sets ArrayNumber /// [JsonPropertyName("ArrayNumber")] - public List? ArrayNumber { get; set; } + public List ArrayNumber { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -65,48 +74,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as ArrayOfNumberOnly).AreEqual; - } - - /// - /// Returns true if ArrayOfNumberOnly instances are equal - /// - /// Instance of ArrayOfNumberOnly to be compared - /// Boolean - public bool Equals(ArrayOfNumberOnly? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ArrayNumber != null) - { - hashCode = (hashCode * 59) + this.ArrayNumber.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -118,4 +85,72 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type ArrayOfNumberOnly + /// + public class ArrayOfNumberOnlyJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override ArrayOfNumberOnly Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + List arrayNumber = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "ArrayNumber": + arrayNumber = JsonSerializer.Deserialize>(ref reader, options); + break; + default: + break; + } + } + } + + return new ArrayOfNumberOnly(arrayNumber); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ArrayOfNumberOnly arrayOfNumberOnly, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WritePropertyName("ArrayNumber"); + JsonSerializer.Serialize(writer, arrayOfNumberOnly.ArrayNumber, options); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ArrayTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ArrayTest.cs index 371238a32a..95286c8847 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ArrayTest.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ArrayTest.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,44 +28,60 @@ namespace Org.OpenAPITools.Model /// /// ArrayTest /// - public partial class ArrayTest : IEquatable, IValidatableObject + public partial class ArrayTest : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// arrayOfString /// arrayArrayOfInteger /// arrayArrayOfModel - public ArrayTest(List? arrayOfString = default, List>? arrayArrayOfInteger = default, List>? arrayArrayOfModel = default) + /// arrayOfString + [JsonConstructor] + public ArrayTest(List> arrayArrayOfInteger, List> arrayArrayOfModel, List arrayOfString) { - ArrayOfString = arrayOfString; +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (arrayOfString == null) + throw new ArgumentNullException("arrayOfString is a required property for ArrayTest and cannot be null."); + + if (arrayArrayOfInteger == null) + throw new ArgumentNullException("arrayArrayOfInteger is a required property for ArrayTest and cannot be null."); + + if (arrayArrayOfModel == null) + throw new ArgumentNullException("arrayArrayOfModel is a required property for ArrayTest and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + ArrayArrayOfInteger = arrayArrayOfInteger; ArrayArrayOfModel = arrayArrayOfModel; + ArrayOfString = arrayOfString; } - /// - /// Gets or Sets ArrayOfString - /// - [JsonPropertyName("array_of_string")] - public List? ArrayOfString { get; set; } - /// /// Gets or Sets ArrayArrayOfInteger /// [JsonPropertyName("array_array_of_integer")] - public List>? ArrayArrayOfInteger { get; set; } + public List> ArrayArrayOfInteger { get; set; } /// /// Gets or Sets ArrayArrayOfModel /// [JsonPropertyName("array_array_of_model")] - public List>? ArrayArrayOfModel { get; set; } + public List> ArrayArrayOfModel { get; set; } + + /// + /// Gets or Sets ArrayOfString + /// + [JsonPropertyName("array_of_string")] + public List ArrayOfString { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -76,63 +91,13 @@ namespace Org.OpenAPITools.Model { StringBuilder sb = new StringBuilder(); sb.Append("class ArrayTest {\n"); - sb.Append(" ArrayOfString: ").Append(ArrayOfString).Append("\n"); sb.Append(" ArrayArrayOfInteger: ").Append(ArrayArrayOfInteger).Append("\n"); sb.Append(" ArrayArrayOfModel: ").Append(ArrayArrayOfModel).Append("\n"); + sb.Append(" ArrayOfString: ").Append(ArrayOfString).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as ArrayTest).AreEqual; - } - - /// - /// Returns true if ArrayTest instances are equal - /// - /// Instance of ArrayTest to be compared - /// Boolean - public bool Equals(ArrayTest? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ArrayOfString != null) - { - hashCode = (hashCode * 59) + this.ArrayOfString.GetHashCode(); - } - if (this.ArrayArrayOfInteger != null) - { - hashCode = (hashCode * 59) + this.ArrayArrayOfInteger.GetHashCode(); - } - if (this.ArrayArrayOfModel != null) - { - hashCode = (hashCode * 59) + this.ArrayArrayOfModel.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -144,4 +109,84 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type ArrayTest + /// + public class ArrayTestJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override ArrayTest Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + List> arrayArrayOfInteger = default; + List> arrayArrayOfModel = default; + List arrayOfString = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "array_array_of_integer": + arrayArrayOfInteger = JsonSerializer.Deserialize>>(ref reader, options); + break; + case "array_array_of_model": + arrayArrayOfModel = JsonSerializer.Deserialize>>(ref reader, options); + break; + case "array_of_string": + arrayOfString = JsonSerializer.Deserialize>(ref reader, options); + break; + default: + break; + } + } + } + + return new ArrayTest(arrayArrayOfInteger, arrayArrayOfModel, arrayOfString); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ArrayTest arrayTest, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WritePropertyName("array_array_of_integer"); + JsonSerializer.Serialize(writer, arrayTest.ArrayArrayOfInteger, options); + writer.WritePropertyName("array_array_of_model"); + JsonSerializer.Serialize(writer, arrayTest.ArrayArrayOfModel, options); + writer.WritePropertyName("array_of_string"); + JsonSerializer.Serialize(writer, arrayTest.ArrayOfString, options); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Banana.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Banana.cs index d41ec32c1d..736cd0de7b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Banana.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Banana.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,14 +28,24 @@ namespace Org.OpenAPITools.Model /// /// Banana /// - public partial class Banana : IEquatable, IValidatableObject + public partial class Banana : IValidatableObject { /// /// Initializes a new instance of the class. /// /// lengthCm - public Banana(decimal? lengthCm = default) + [JsonConstructor] + public Banana(decimal lengthCm) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (lengthCm == null) + throw new ArgumentNullException("lengthCm is a required property for Banana and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + LengthCm = lengthCm; } @@ -44,13 +53,13 @@ namespace Org.OpenAPITools.Model /// Gets or Sets LengthCm /// [JsonPropertyName("lengthCm")] - public decimal? LengthCm { get; set; } + public decimal LengthCm { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -65,45 +74,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Banana).AreEqual; - } - - /// - /// Returns true if Banana instances are equal - /// - /// Instance of Banana to be compared - /// Boolean - public bool Equals(Banana? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.LengthCm.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -115,4 +85,71 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type Banana + /// + public class BananaJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override Banana Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + decimal lengthCm = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "lengthCm": + lengthCm = reader.GetInt32(); + break; + default: + break; + } + } + } + + return new Banana(lengthCm); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Banana banana, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteNumber("lengthCm", (int)banana.LengthCm); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/BananaReq.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/BananaReq.cs index cd3eaea948..cd32083c6b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/BananaReq.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/BananaReq.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,18 +28,28 @@ namespace Org.OpenAPITools.Model /// /// BananaReq /// - public partial class BananaReq : IEquatable, IValidatableObject + public partial class BananaReq : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// lengthCm (required) + /// lengthCm /// sweet - public BananaReq(decimal lengthCm, bool? sweet = default) + [JsonConstructor] + public BananaReq(decimal lengthCm, bool sweet) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + if (lengthCm == null) throw new ArgumentNullException("lengthCm is a required property for BananaReq and cannot be null."); + if (sweet == null) + throw new ArgumentNullException("sweet is a required property for BananaReq and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + LengthCm = lengthCm; Sweet = sweet; } @@ -55,7 +64,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets Sweet /// [JsonPropertyName("sweet")] - public bool? Sweet { get; set; } + public bool Sweet { get; set; } /// /// Returns the string presentation of the object @@ -70,42 +79,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as BananaReq).AreEqual; - } - - /// - /// Returns true if BananaReq instances are equal - /// - /// Instance of BananaReq to be compared - /// Boolean - public bool Equals(BananaReq? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.LengthCm.GetHashCode(); - hashCode = (hashCode * 59) + this.Sweet.GetHashCode(); - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -117,4 +90,76 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type BananaReq + /// + public class BananaReqJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override BananaReq Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + decimal lengthCm = default; + bool sweet = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "lengthCm": + lengthCm = reader.GetInt32(); + break; + case "sweet": + sweet = reader.GetBoolean(); + break; + default: + break; + } + } + } + + return new BananaReq(lengthCm, sweet); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, BananaReq bananaReq, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteNumber("lengthCm", (int)bananaReq.LengthCm); + writer.WriteBoolean("sweet", bananaReq.Sweet); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/BasquePig.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/BasquePig.cs index 4f84644336..bd29e86605 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/BasquePig.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/BasquePig.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,17 +28,24 @@ namespace Org.OpenAPITools.Model /// /// BasquePig /// - public partial class BasquePig : IEquatable, IValidatableObject + public partial class BasquePig : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// className (required) + /// className + [JsonConstructor] public BasquePig(string className) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + if (className == null) throw new ArgumentNullException("className is a required property for BasquePig and cannot be null."); +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + ClassName = className; } @@ -53,7 +59,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -68,48 +74,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as BasquePig).AreEqual; - } - - /// - /// Returns true if BasquePig instances are equal - /// - /// Instance of BasquePig to be compared - /// Boolean - public bool Equals(BasquePig? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ClassName != null) - { - hashCode = (hashCode * 59) + this.ClassName.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -121,4 +85,71 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type BasquePig + /// + public class BasquePigJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override BasquePig Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string className = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "className": + className = reader.GetString(); + break; + default: + break; + } + } + } + + return new BasquePig(className); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, BasquePig basquePig, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("className", basquePig.ClassName); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Capitalization.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Capitalization.cs index 2a52a362f6..7b2728c1e7 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Capitalization.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Capitalization.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,69 +28,94 @@ namespace Org.OpenAPITools.Model /// /// Capitalization /// - public partial class Capitalization : IEquatable, IValidatableObject + public partial class Capitalization : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// smallCamel + /// Name of the pet /// capitalCamel - /// smallSnake /// capitalSnake /// sCAETHFlowPoints - /// Name of the pet - public Capitalization(string? smallCamel = default, string? capitalCamel = default, string? smallSnake = default, string? capitalSnake = default, string? sCAETHFlowPoints = default, string? aTTNAME = default) + /// smallCamel + /// smallSnake + [JsonConstructor] + public Capitalization(string aTTNAME, string capitalCamel, string capitalSnake, string sCAETHFlowPoints, string smallCamel, string smallSnake) { - SmallCamel = smallCamel; +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (smallCamel == null) + throw new ArgumentNullException("smallCamel is a required property for Capitalization and cannot be null."); + + if (capitalCamel == null) + throw new ArgumentNullException("capitalCamel is a required property for Capitalization and cannot be null."); + + if (smallSnake == null) + throw new ArgumentNullException("smallSnake is a required property for Capitalization and cannot be null."); + + if (capitalSnake == null) + throw new ArgumentNullException("capitalSnake is a required property for Capitalization and cannot be null."); + + if (sCAETHFlowPoints == null) + throw new ArgumentNullException("sCAETHFlowPoints is a required property for Capitalization and cannot be null."); + + if (aTTNAME == null) + throw new ArgumentNullException("aTTNAME is a required property for Capitalization and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + ATT_NAME = aTTNAME; CapitalCamel = capitalCamel; - SmallSnake = smallSnake; CapitalSnake = capitalSnake; SCAETHFlowPoints = sCAETHFlowPoints; - ATT_NAME = aTTNAME; + SmallCamel = smallCamel; + SmallSnake = smallSnake; } - /// - /// Gets or Sets SmallCamel - /// - [JsonPropertyName("smallCamel")] - public string? SmallCamel { get; set; } - - /// - /// Gets or Sets CapitalCamel - /// - [JsonPropertyName("CapitalCamel")] - public string? CapitalCamel { get; set; } - - /// - /// Gets or Sets SmallSnake - /// - [JsonPropertyName("small_Snake")] - public string? SmallSnake { get; set; } - - /// - /// Gets or Sets CapitalSnake - /// - [JsonPropertyName("Capital_Snake")] - public string? CapitalSnake { get; set; } - - /// - /// Gets or Sets SCAETHFlowPoints - /// - [JsonPropertyName("SCA_ETH_Flow_Points")] - public string? SCAETHFlowPoints { get; set; } - /// /// Name of the pet /// /// Name of the pet [JsonPropertyName("ATT_NAME")] - public string? ATT_NAME { get; set; } + public string ATT_NAME { get; set; } + + /// + /// Gets or Sets CapitalCamel + /// + [JsonPropertyName("CapitalCamel")] + public string CapitalCamel { get; set; } + + /// + /// Gets or Sets CapitalSnake + /// + [JsonPropertyName("Capital_Snake")] + public string CapitalSnake { get; set; } + + /// + /// Gets or Sets SCAETHFlowPoints + /// + [JsonPropertyName("SCA_ETH_Flow_Points")] + public string SCAETHFlowPoints { get; set; } + + /// + /// Gets or Sets SmallCamel + /// + [JsonPropertyName("smallCamel")] + public string SmallCamel { get; set; } + + /// + /// Gets or Sets SmallSnake + /// + [JsonPropertyName("small_Snake")] + public string SmallSnake { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -101,78 +125,16 @@ namespace Org.OpenAPITools.Model { StringBuilder sb = new StringBuilder(); sb.Append("class Capitalization {\n"); - sb.Append(" SmallCamel: ").Append(SmallCamel).Append("\n"); + sb.Append(" ATT_NAME: ").Append(ATT_NAME).Append("\n"); sb.Append(" CapitalCamel: ").Append(CapitalCamel).Append("\n"); - sb.Append(" SmallSnake: ").Append(SmallSnake).Append("\n"); sb.Append(" CapitalSnake: ").Append(CapitalSnake).Append("\n"); sb.Append(" SCAETHFlowPoints: ").Append(SCAETHFlowPoints).Append("\n"); - sb.Append(" ATT_NAME: ").Append(ATT_NAME).Append("\n"); + sb.Append(" SmallCamel: ").Append(SmallCamel).Append("\n"); + sb.Append(" SmallSnake: ").Append(SmallSnake).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Capitalization).AreEqual; - } - - /// - /// Returns true if Capitalization instances are equal - /// - /// Instance of Capitalization to be compared - /// Boolean - public bool Equals(Capitalization? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.SmallCamel != null) - { - hashCode = (hashCode * 59) + this.SmallCamel.GetHashCode(); - } - if (this.CapitalCamel != null) - { - hashCode = (hashCode * 59) + this.CapitalCamel.GetHashCode(); - } - if (this.SmallSnake != null) - { - hashCode = (hashCode * 59) + this.SmallSnake.GetHashCode(); - } - if (this.CapitalSnake != null) - { - hashCode = (hashCode * 59) + this.CapitalSnake.GetHashCode(); - } - if (this.SCAETHFlowPoints != null) - { - hashCode = (hashCode * 59) + this.SCAETHFlowPoints.GetHashCode(); - } - if (this.ATT_NAME != null) - { - hashCode = (hashCode * 59) + this.ATT_NAME.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -184,4 +146,96 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type Capitalization + /// + public class CapitalizationJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override Capitalization Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string aTTNAME = default; + string capitalCamel = default; + string capitalSnake = default; + string sCAETHFlowPoints = default; + string smallCamel = default; + string smallSnake = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "ATT_NAME": + aTTNAME = reader.GetString(); + break; + case "CapitalCamel": + capitalCamel = reader.GetString(); + break; + case "Capital_Snake": + capitalSnake = reader.GetString(); + break; + case "SCA_ETH_Flow_Points": + sCAETHFlowPoints = reader.GetString(); + break; + case "smallCamel": + smallCamel = reader.GetString(); + break; + case "small_Snake": + smallSnake = reader.GetString(); + break; + default: + break; + } + } + } + + return new Capitalization(aTTNAME, capitalCamel, capitalSnake, sCAETHFlowPoints, smallCamel, smallSnake); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Capitalization capitalization, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("ATT_NAME", capitalization.ATT_NAME); + writer.WriteString("CapitalCamel", capitalization.CapitalCamel); + writer.WriteString("Capital_Snake", capitalization.CapitalSnake); + writer.WriteString("SCA_ETH_Flow_Points", capitalization.SCAETHFlowPoints); + writer.WriteString("smallCamel", capitalization.SmallCamel); + writer.WriteString("small_Snake", capitalization.SmallSnake); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Cat.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Cat.cs index b18b39a2c7..a243c2d20b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Cat.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Cat.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,16 +28,17 @@ namespace Org.OpenAPITools.Model /// /// Cat /// - public partial class Cat : Animal, IEquatable + public partial class Cat : Animal, IValidatableObject { /// /// Initializes a new instance of the class. /// /// /// - /// className (required) + /// className /// color (default to "red") - public Cat(Dictionary dictionary, CatAllOf catAllOf, string className, string? color = "red") : base(className, color) + [JsonConstructor] + internal Cat(Dictionary dictionary, CatAllOf catAllOf, string className, string color = "red") : base(className, color) { Dictionary = dictionary; CatAllOf = catAllOf; @@ -66,40 +66,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Cat).AreEqual; - } - - /// - /// Returns true if Cat instances are equal - /// - /// Instance of Cat to be compared - /// Boolean - public bool Equals(Cat? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - return hashCode; - } - } - } /// @@ -107,13 +73,6 @@ namespace Org.OpenAPITools.Model /// public class CatJsonConverter : JsonConverter { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof(Cat).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -126,24 +85,29 @@ namespace Org.OpenAPITools.Model { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); + JsonTokenType startingTokenType = reader.TokenType; + Utf8JsonReader dictionaryReader = reader; - bool dictionaryDeserialized = Client.ClientUtils.TryDeserialize>(ref dictionaryReader, options, out Dictionary? dictionary); + bool dictionaryDeserialized = Client.ClientUtils.TryDeserialize>(ref reader, options, out Dictionary? dictionary); Utf8JsonReader catAllOfReader = reader; - bool catAllOfDeserialized = Client.ClientUtils.TryDeserialize(ref catAllOfReader, options, out CatAllOf? catAllOf); + bool catAllOfDeserialized = Client.ClientUtils.TryDeserialize(ref reader, options, out CatAllOf? catAllOf); - string? className = default; - string? color = default; + string className = default; + string color = default; while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string? propertyName = reader.GetString(); reader.Read(); @@ -156,6 +120,8 @@ namespace Org.OpenAPITools.Model case "color": color = reader.GetString(); break; + default: + break; } } } @@ -170,6 +136,14 @@ namespace Org.OpenAPITools.Model /// /// /// - public override void Write(Utf8JsonWriter writer, Cat cat, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, Cat cat, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("className", cat.ClassName); + writer.WriteString("color", cat.Color); + + writer.WriteEndObject(); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/CatAllOf.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/CatAllOf.cs index c397e1b6bc..d3e15dd47e 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/CatAllOf.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/CatAllOf.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,14 +28,24 @@ namespace Org.OpenAPITools.Model /// /// CatAllOf /// - public partial class CatAllOf : IEquatable, IValidatableObject + public partial class CatAllOf : IValidatableObject { /// /// Initializes a new instance of the class. /// /// declawed - public CatAllOf(bool? declawed = default) + [JsonConstructor] + public CatAllOf(bool declawed) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (declawed == null) + throw new ArgumentNullException("declawed is a required property for CatAllOf and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + Declawed = declawed; } @@ -44,13 +53,13 @@ namespace Org.OpenAPITools.Model /// Gets or Sets Declawed /// [JsonPropertyName("declawed")] - public bool? Declawed { get; set; } + public bool Declawed { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -65,45 +74,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as CatAllOf).AreEqual; - } - - /// - /// Returns true if CatAllOf instances are equal - /// - /// Instance of CatAllOf to be compared - /// Boolean - public bool Equals(CatAllOf? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Declawed.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -115,4 +85,71 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type CatAllOf + /// + public class CatAllOfJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override CatAllOf Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + bool declawed = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "declawed": + declawed = reader.GetBoolean(); + break; + default: + break; + } + } + } + + return new CatAllOf(declawed); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, CatAllOf catAllOf, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteBoolean("declawed", catAllOf.Declawed); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Category.cs index 05300f8a0b..3de3554f72 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Category.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,39 +28,49 @@ namespace Org.OpenAPITools.Model /// /// Category /// - public partial class Category : IEquatable, IValidatableObject + public partial class Category : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// name (required) (default to "default-name") /// id - public Category(string name = "default-name", long? id = default) + /// name (default to "default-name") + [JsonConstructor] + public Category(long id, string name = "default-name") { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (id == null) + throw new ArgumentNullException("id is a required property for Category and cannot be null."); + if (name == null) throw new ArgumentNullException("name is a required property for Category and cannot be null."); - Name = name; +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + Id = id; + Name = name; } + /// + /// Gets or Sets Id + /// + [JsonPropertyName("id")] + public long Id { get; set; } + /// /// Gets or Sets Name /// [JsonPropertyName("name")] public string Name { get; set; } - /// - /// Gets or Sets Id - /// - [JsonPropertyName("id")] - public long? Id { get; set; } - /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -71,55 +80,12 @@ namespace Org.OpenAPITools.Model { StringBuilder sb = new StringBuilder(); sb.Append("class Category {\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Category).AreEqual; - } - - /// - /// Returns true if Category instances are equal - /// - /// Instance of Category to be compared - /// Boolean - public bool Equals(Category? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -131,4 +97,76 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type Category + /// + public class CategoryJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override Category Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + long id = default; + string name = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "id": + id = reader.GetInt64(); + break; + case "name": + name = reader.GetString(); + break; + default: + break; + } + } + } + + return new Category(id, name); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Category category, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteNumber("id", (int)category.Id); + writer.WriteString("name", category.Name); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ChildCat.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ChildCat.cs index 57c72e45da..c10c0f93a0 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ChildCat.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ChildCat.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,14 +28,15 @@ namespace Org.OpenAPITools.Model /// /// ChildCat /// - public partial class ChildCat : ParentPet, IEquatable + public partial class ChildCat : ParentPet, IValidatableObject { /// /// Initializes a new instance of the class. /// /// - /// petType (required) - public ChildCat(ChildCatAllOf childCatAllOf, string petType) : base(petType) + /// petType + [JsonConstructor] + internal ChildCat(ChildCatAllOf childCatAllOf, string petType) : base(petType) { ChildCatAllOf = childCatAllOf; } @@ -58,40 +58,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as ChildCat).AreEqual; - } - - /// - /// Returns true if ChildCat instances are equal - /// - /// Instance of ChildCat to be compared - /// Boolean - public bool Equals(ChildCat? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - return hashCode; - } - } - } /// @@ -99,13 +65,6 @@ namespace Org.OpenAPITools.Model /// public class ChildCatJsonConverter : JsonConverter { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof(ChildCat).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -118,20 +77,25 @@ namespace Org.OpenAPITools.Model { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); - Utf8JsonReader childCatAllOfReader = reader; - bool childCatAllOfDeserialized = Client.ClientUtils.TryDeserialize(ref childCatAllOfReader, options, out ChildCatAllOf? childCatAllOf); + JsonTokenType startingTokenType = reader.TokenType; - string? petType = default; + Utf8JsonReader childCatAllOfReader = reader; + bool childCatAllOfDeserialized = Client.ClientUtils.TryDeserialize(ref reader, options, out ChildCatAllOf? childCatAllOf); + + string petType = default; while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string? propertyName = reader.GetString(); reader.Read(); @@ -141,6 +105,8 @@ namespace Org.OpenAPITools.Model case "pet_type": petType = reader.GetString(); break; + default: + break; } } } @@ -155,6 +121,13 @@ namespace Org.OpenAPITools.Model /// /// /// - public override void Write(Utf8JsonWriter writer, ChildCat childCat, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, ChildCat childCat, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("pet_type", childCat.PetType); + + writer.WriteEndObject(); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ChildCatAllOf.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ChildCatAllOf.cs index 194c0fc96e..b1f7cbed43 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ChildCatAllOf.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ChildCatAllOf.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,15 +28,28 @@ namespace Org.OpenAPITools.Model /// /// ChildCatAllOf /// - public partial class ChildCatAllOf : IEquatable, IValidatableObject + public partial class ChildCatAllOf : IValidatableObject { /// /// Initializes a new instance of the class. /// /// name /// petType (default to PetTypeEnum.ChildCat) - public ChildCatAllOf(string? name = default, PetTypeEnum? petType = PetTypeEnum.ChildCat) + [JsonConstructor] + public ChildCatAllOf(string name, PetTypeEnum petType = PetTypeEnum.ChildCat) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (name == null) + throw new ArgumentNullException("name is a required property for ChildCatAllOf and cannot be null."); + + if (petType == null) + throw new ArgumentNullException("petType is a required property for ChildCatAllOf and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + Name = name; PetType = petType; } @@ -50,28 +62,54 @@ namespace Org.OpenAPITools.Model /// /// Enum ChildCat for value: ChildCat /// - [EnumMember(Value = "ChildCat")] ChildCat = 1 } + /// + /// Returns a PetTypeEnum + /// + /// + /// + public static PetTypeEnum PetTypeEnumFromString(string value) + { + if (value == "ChildCat") + return PetTypeEnum.ChildCat; + + throw new NotImplementedException($"Could not convert value to type PetTypeEnum: '{value}'"); + } + + /// + /// Returns equivalent json value + /// + /// + /// + /// + public static string PetTypeEnumToJsonValue(PetTypeEnum value) + { + if (value == PetTypeEnum.ChildCat) + return "ChildCat"; + + throw new NotImplementedException($"Value could not be handled: '{value}'"); + } + /// /// Gets or Sets PetType /// [JsonPropertyName("pet_type")] - public PetTypeEnum? PetType { get; set; } + public PetTypeEnum PetType { get; set; } /// /// Gets or Sets Name /// [JsonPropertyName("name")] - public string? Name { get; set; } + public string Name { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -87,49 +125,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as ChildCatAllOf).AreEqual; - } - - /// - /// Returns true if ChildCatAllOf instances are equal - /// - /// Instance of ChildCatAllOf to be compared - /// Boolean - public bool Equals(ChildCatAllOf? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PetType.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -141,4 +136,81 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type ChildCatAllOf + /// + public class ChildCatAllOfJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override ChildCatAllOf Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string name = default; + ChildCatAllOf.PetTypeEnum petType = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "name": + name = reader.GetString(); + break; + case "pet_type": + string petTypeRawValue = reader.GetString(); + petType = ChildCatAllOf.PetTypeEnumFromString(petTypeRawValue); + break; + default: + break; + } + } + } + + return new ChildCatAllOf(name, petType); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ChildCatAllOf childCatAllOf, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("name", childCatAllOf.Name); + var petTypeRawValue = ChildCatAllOf.PetTypeEnumToJsonValue(childCatAllOf.PetType); + if (petTypeRawValue != null) + writer.WriteString("pet_type", petTypeRawValue); + else + writer.WriteNull("pet_type"); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ClassModel.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ClassModel.cs index 5e9b01f14a..1c5262054d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ClassModel.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ClassModel.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,28 +28,38 @@ namespace Org.OpenAPITools.Model /// /// Model for testing model with \"_class\" property /// - public partial class ClassModel : IEquatable, IValidatableObject + public partial class ClassModel : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// _class - public ClassModel(string? _class = default) + /// classProperty + [JsonConstructor] + public ClassModel(string classProperty) { - Class = _class; +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (classProperty == null) + throw new ArgumentNullException("classProperty is a required property for ClassModel and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + ClassProperty = classProperty; } /// - /// Gets or Sets Class + /// Gets or Sets ClassProperty /// [JsonPropertyName("_class")] - public string? Class { get; set; } + public string ClassProperty { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -60,53 +69,11 @@ namespace Org.OpenAPITools.Model { StringBuilder sb = new StringBuilder(); sb.Append("class ClassModel {\n"); - sb.Append(" Class: ").Append(Class).Append("\n"); + sb.Append(" ClassProperty: ").Append(ClassProperty).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as ClassModel).AreEqual; - } - - /// - /// Returns true if ClassModel instances are equal - /// - /// Instance of ClassModel to be compared - /// Boolean - public bool Equals(ClassModel? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Class != null) - { - hashCode = (hashCode * 59) + this.Class.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -118,4 +85,71 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type ClassModel + /// + public class ClassModelJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override ClassModel Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string classProperty = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "_class": + classProperty = reader.GetString(); + break; + default: + break; + } + } + } + + return new ClassModel(classProperty); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ClassModel classModel, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("_class", classModel.ClassProperty); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs index 1a3fe55f3c..8b964d0070 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,14 +28,15 @@ namespace Org.OpenAPITools.Model /// /// ComplexQuadrilateral /// - public partial class ComplexQuadrilateral : IEquatable, IValidatableObject + public partial class ComplexQuadrilateral : IValidatableObject { /// /// Initializes a new instance of the class. /// /// /// - public ComplexQuadrilateral(ShapeInterface shapeInterface, QuadrilateralInterface quadrilateralInterface) + [JsonConstructor] + internal ComplexQuadrilateral(ShapeInterface shapeInterface, QuadrilateralInterface quadrilateralInterface) { ShapeInterface = shapeInterface; QuadrilateralInterface = quadrilateralInterface; @@ -56,7 +56,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -70,44 +70,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as ComplexQuadrilateral).AreEqual; - } - - /// - /// Returns true if ComplexQuadrilateral instances are equal - /// - /// Instance of ComplexQuadrilateral to be compared - /// Boolean - public bool Equals(ComplexQuadrilateral? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -124,13 +86,6 @@ namespace Org.OpenAPITools.Model /// public class ComplexQuadrilateralJsonConverter : JsonConverter { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof(ComplexQuadrilateral).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -143,28 +98,35 @@ namespace Org.OpenAPITools.Model { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); + JsonTokenType startingTokenType = reader.TokenType; + Utf8JsonReader shapeInterfaceReader = reader; - bool shapeInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref shapeInterfaceReader, options, out ShapeInterface? shapeInterface); + bool shapeInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref reader, options, out ShapeInterface? shapeInterface); Utf8JsonReader quadrilateralInterfaceReader = reader; - bool quadrilateralInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref quadrilateralInterfaceReader, options, out QuadrilateralInterface? quadrilateralInterface); + bool quadrilateralInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref reader, options, out QuadrilateralInterface? quadrilateralInterface); while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string? propertyName = reader.GetString(); reader.Read(); switch (propertyName) { + default: + break; } } } @@ -179,6 +141,12 @@ namespace Org.OpenAPITools.Model /// /// /// - public override void Write(Utf8JsonWriter writer, ComplexQuadrilateral complexQuadrilateral, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, ComplexQuadrilateral complexQuadrilateral, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + + writer.WriteEndObject(); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/DanishPig.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/DanishPig.cs index 9be9ffbc89..f54a10979c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/DanishPig.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/DanishPig.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,17 +28,24 @@ namespace Org.OpenAPITools.Model /// /// DanishPig /// - public partial class DanishPig : IEquatable, IValidatableObject + public partial class DanishPig : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// className (required) + /// className + [JsonConstructor] public DanishPig(string className) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + if (className == null) throw new ArgumentNullException("className is a required property for DanishPig and cannot be null."); +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + ClassName = className; } @@ -53,7 +59,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -68,48 +74,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as DanishPig).AreEqual; - } - - /// - /// Returns true if DanishPig instances are equal - /// - /// Instance of DanishPig to be compared - /// Boolean - public bool Equals(DanishPig? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ClassName != null) - { - hashCode = (hashCode * 59) + this.ClassName.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -121,4 +85,71 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type DanishPig + /// + public class DanishPigJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override DanishPig Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string className = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "className": + className = reader.GetString(); + break; + default: + break; + } + } + } + + return new DanishPig(className); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, DanishPig danishPig, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("className", danishPig.ClassName); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/DeprecatedObject.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/DeprecatedObject.cs index e5ec23562d..7ebbabe809 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/DeprecatedObject.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/DeprecatedObject.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,14 +28,24 @@ namespace Org.OpenAPITools.Model /// /// DeprecatedObject /// - public partial class DeprecatedObject : IEquatable, IValidatableObject + public partial class DeprecatedObject : IValidatableObject { /// /// Initializes a new instance of the class. /// /// name - public DeprecatedObject(string? name = default) + [JsonConstructor] + public DeprecatedObject(string name) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (name == null) + throw new ArgumentNullException("name is a required property for DeprecatedObject and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + Name = name; } @@ -44,13 +53,13 @@ namespace Org.OpenAPITools.Model /// Gets or Sets Name /// [JsonPropertyName("name")] - public string? Name { get; set; } + public string Name { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -65,48 +74,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as DeprecatedObject).AreEqual; - } - - /// - /// Returns true if DeprecatedObject instances are equal - /// - /// Instance of DeprecatedObject to be compared - /// Boolean - public bool Equals(DeprecatedObject? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -118,4 +85,71 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type DeprecatedObject + /// + public class DeprecatedObjectJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override DeprecatedObject Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string name = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "name": + name = reader.GetString(); + break; + default: + break; + } + } + } + + return new DeprecatedObject(name); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, DeprecatedObject deprecatedObject, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("name", deprecatedObject.Name); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Dog.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Dog.cs index 7ce3f26883..485915dd25 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Dog.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Dog.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,15 +28,16 @@ namespace Org.OpenAPITools.Model /// /// Dog /// - public partial class Dog : Animal, IEquatable + public partial class Dog : Animal, IValidatableObject { /// /// Initializes a new instance of the class. /// /// - /// className (required) + /// className /// color (default to "red") - public Dog(DogAllOf dogAllOf, string className, string? color = "red") : base(className, color) + [JsonConstructor] + internal Dog(DogAllOf dogAllOf, string className, string color = "red") : base(className, color) { DogAllOf = dogAllOf; } @@ -59,40 +59,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Dog).AreEqual; - } - - /// - /// Returns true if Dog instances are equal - /// - /// Instance of Dog to be compared - /// Boolean - public bool Equals(Dog? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - return hashCode; - } - } - } /// @@ -100,13 +66,6 @@ namespace Org.OpenAPITools.Model /// public class DogJsonConverter : JsonConverter { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof(Dog).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -119,21 +78,26 @@ namespace Org.OpenAPITools.Model { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); - Utf8JsonReader dogAllOfReader = reader; - bool dogAllOfDeserialized = Client.ClientUtils.TryDeserialize(ref dogAllOfReader, options, out DogAllOf? dogAllOf); + JsonTokenType startingTokenType = reader.TokenType; - string? className = default; - string? color = default; + Utf8JsonReader dogAllOfReader = reader; + bool dogAllOfDeserialized = Client.ClientUtils.TryDeserialize(ref reader, options, out DogAllOf? dogAllOf); + + string className = default; + string color = default; while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string? propertyName = reader.GetString(); reader.Read(); @@ -146,6 +110,8 @@ namespace Org.OpenAPITools.Model case "color": color = reader.GetString(); break; + default: + break; } } } @@ -160,6 +126,14 @@ namespace Org.OpenAPITools.Model /// /// /// - public override void Write(Utf8JsonWriter writer, Dog dog, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, Dog dog, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("className", dog.ClassName); + writer.WriteString("color", dog.Color); + + writer.WriteEndObject(); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/DogAllOf.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/DogAllOf.cs index f6a94b443e..06248bb34f 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/DogAllOf.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/DogAllOf.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,14 +28,24 @@ namespace Org.OpenAPITools.Model /// /// DogAllOf /// - public partial class DogAllOf : IEquatable, IValidatableObject + public partial class DogAllOf : IValidatableObject { /// /// Initializes a new instance of the class. /// /// breed - public DogAllOf(string? breed = default) + [JsonConstructor] + public DogAllOf(string breed) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (breed == null) + throw new ArgumentNullException("breed is a required property for DogAllOf and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + Breed = breed; } @@ -44,13 +53,13 @@ namespace Org.OpenAPITools.Model /// Gets or Sets Breed /// [JsonPropertyName("breed")] - public string? Breed { get; set; } + public string Breed { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -65,48 +74,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as DogAllOf).AreEqual; - } - - /// - /// Returns true if DogAllOf instances are equal - /// - /// Instance of DogAllOf to be compared - /// Boolean - public bool Equals(DogAllOf? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Breed != null) - { - hashCode = (hashCode * 59) + this.Breed.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -118,4 +85,71 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type DogAllOf + /// + public class DogAllOfJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override DogAllOf Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string breed = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "breed": + breed = reader.GetString(); + break; + default: + break; + } + } + } + + return new DogAllOf(breed); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, DogAllOf dogAllOf, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("breed", dogAllOf.Breed); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Drawing.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Drawing.cs index b5d4b43be1..72a19246c8 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Drawing.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Drawing.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,34 +28,56 @@ namespace Org.OpenAPITools.Model /// /// Drawing /// - public partial class Drawing : Dictionary, IEquatable, IValidatableObject + public partial class Drawing : Dictionary, IValidatableObject { /// /// Initializes a new instance of the class. /// /// mainShape /// shapeOrNull - /// nullableShape /// shapes - public Drawing(Shape? mainShape = default, ShapeOrNull? shapeOrNull = default, NullableShape? nullableShape = default, List? shapes = default) : base() + /// nullableShape + [JsonConstructor] + public Drawing(Shape mainShape, ShapeOrNull shapeOrNull, List shapes, NullableShape? nullableShape = default) : base() { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (mainShape == null) + throw new ArgumentNullException("mainShape is a required property for Drawing and cannot be null."); + + if (shapeOrNull == null) + throw new ArgumentNullException("shapeOrNull is a required property for Drawing and cannot be null."); + + if (shapes == null) + throw new ArgumentNullException("shapes is a required property for Drawing and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + MainShape = mainShape; ShapeOrNull = shapeOrNull; - NullableShape = nullableShape; Shapes = shapes; + NullableShape = nullableShape; } /// /// Gets or Sets MainShape /// [JsonPropertyName("mainShape")] - public Shape? MainShape { get; set; } + public Shape MainShape { get; set; } /// /// Gets or Sets ShapeOrNull /// [JsonPropertyName("shapeOrNull")] - public ShapeOrNull? ShapeOrNull { get; set; } + public ShapeOrNull ShapeOrNull { get; set; } + + /// + /// Gets or Sets Shapes + /// + [JsonPropertyName("shapes")] + public List Shapes { get; set; } /// /// Gets or Sets NullableShape @@ -64,12 +85,6 @@ namespace Org.OpenAPITools.Model [JsonPropertyName("nullableShape")] public NullableShape? NullableShape { get; set; } - /// - /// Gets or Sets Shapes - /// - [JsonPropertyName("shapes")] - public List? Shapes { get; set; } - /// /// Returns the string presentation of the object /// @@ -81,61 +96,11 @@ namespace Org.OpenAPITools.Model sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); sb.Append(" MainShape: ").Append(MainShape).Append("\n"); sb.Append(" ShapeOrNull: ").Append(ShapeOrNull).Append("\n"); - sb.Append(" NullableShape: ").Append(NullableShape).Append("\n"); sb.Append(" Shapes: ").Append(Shapes).Append("\n"); + sb.Append(" NullableShape: ").Append(NullableShape).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Drawing).AreEqual; - } - - /// - /// Returns true if Drawing instances are equal - /// - /// Instance of Drawing to be compared - /// Boolean - public bool Equals(Drawing? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.MainShape != null) - { - hashCode = (hashCode * 59) + this.MainShape.GetHashCode(); - } - if (this.ShapeOrNull != null) - { - hashCode = (hashCode * 59) + this.ShapeOrNull.GetHashCode(); - } - if (this.NullableShape != null) - { - hashCode = (hashCode * 59) + this.NullableShape.GetHashCode(); - } - if (this.Shapes != null) - { - hashCode = (hashCode * 59) + this.Shapes.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -147,4 +112,90 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type Drawing + /// + public class DrawingJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override Drawing Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + Shape mainShape = default; + ShapeOrNull shapeOrNull = default; + List shapes = default; + NullableShape nullableShape = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "mainShape": + mainShape = JsonSerializer.Deserialize(ref reader, options); + break; + case "shapeOrNull": + shapeOrNull = JsonSerializer.Deserialize(ref reader, options); + break; + case "shapes": + shapes = JsonSerializer.Deserialize>(ref reader, options); + break; + case "nullableShape": + nullableShape = JsonSerializer.Deserialize(ref reader, options); + break; + default: + break; + } + } + } + + return new Drawing(mainShape, shapeOrNull, shapes, nullableShape); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Drawing drawing, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WritePropertyName("mainShape"); + JsonSerializer.Serialize(writer, drawing.MainShape, options); + writer.WritePropertyName("shapeOrNull"); + JsonSerializer.Serialize(writer, drawing.ShapeOrNull, options); + writer.WritePropertyName("shapes"); + JsonSerializer.Serialize(writer, drawing.Shapes, options); + writer.WritePropertyName("nullableShape"); + JsonSerializer.Serialize(writer, drawing.NullableShape, options); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/EnumArrays.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/EnumArrays.cs index 951d98e662..8040834df4 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/EnumArrays.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/EnumArrays.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,17 +28,80 @@ namespace Org.OpenAPITools.Model /// /// EnumArrays /// - public partial class EnumArrays : IEquatable, IValidatableObject + public partial class EnumArrays : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// justSymbol /// arrayEnum - public EnumArrays(JustSymbolEnum? justSymbol = default, List? arrayEnum = default) + /// justSymbol + [JsonConstructor] + public EnumArrays(List arrayEnum, JustSymbolEnum justSymbol) { - JustSymbol = justSymbol; +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (justSymbol == null) + throw new ArgumentNullException("justSymbol is a required property for EnumArrays and cannot be null."); + + if (arrayEnum == null) + throw new ArgumentNullException("arrayEnum is a required property for EnumArrays and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + ArrayEnum = arrayEnum; + JustSymbol = justSymbol; + } + + /// + /// Defines ArrayEnum + /// + public enum ArrayEnumEnum + { + /// + /// Enum Fish for value: fish + /// + Fish = 1, + + /// + /// Enum Crab for value: crab + /// + Crab = 2 + + } + + /// + /// Returns a ArrayEnumEnum + /// + /// + /// + public static ArrayEnumEnum ArrayEnumEnumFromString(string value) + { + if (value == "fish") + return ArrayEnumEnum.Fish; + + if (value == "crab") + return ArrayEnumEnum.Crab; + + throw new NotImplementedException($"Could not convert value to type ArrayEnumEnum: '{value}'"); + } + + /// + /// Returns equivalent json value + /// + /// + /// + /// + public static string ArrayEnumEnumToJsonValue(ArrayEnumEnum value) + { + if (value == ArrayEnumEnum.Fish) + return "fish"; + + if (value == ArrayEnumEnum.Crab) + return "crab"; + + throw new NotImplementedException($"Value could not be handled: '{value}'"); } /// @@ -50,53 +112,65 @@ namespace Org.OpenAPITools.Model /// /// Enum GreaterThanOrEqualTo for value: >= /// - [EnumMember(Value = ">=")] GreaterThanOrEqualTo = 1, /// /// Enum Dollar for value: $ /// - [EnumMember(Value = "$")] Dollar = 2 } + /// + /// Returns a JustSymbolEnum + /// + /// + /// + public static JustSymbolEnum JustSymbolEnumFromString(string value) + { + if (value == ">=") + return JustSymbolEnum.GreaterThanOrEqualTo; + + if (value == "$") + return JustSymbolEnum.Dollar; + + throw new NotImplementedException($"Could not convert value to type JustSymbolEnum: '{value}'"); + } + + /// + /// Returns equivalent json value + /// + /// + /// + /// + public static string JustSymbolEnumToJsonValue(JustSymbolEnum value) + { + if (value == JustSymbolEnum.GreaterThanOrEqualTo) + return ">="; + + if (value == JustSymbolEnum.Dollar) + return "$"; + + throw new NotImplementedException($"Value could not be handled: '{value}'"); + } + /// /// Gets or Sets JustSymbol /// [JsonPropertyName("just_symbol")] - public JustSymbolEnum? JustSymbol { get; set; } - - /// - /// Defines ArrayEnum - /// - public enum ArrayEnumEnum - { - /// - /// Enum Fish for value: fish - /// - [EnumMember(Value = "fish")] - Fish = 1, - - /// - /// Enum Crab for value: crab - /// - [EnumMember(Value = "crab")] - Crab = 2 - - } + public JustSymbolEnum JustSymbol { get; set; } /// /// Gets or Sets ArrayEnum /// [JsonPropertyName("array_enum")] - public List? ArrayEnum { get; set; } + public List ArrayEnum { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -106,55 +180,12 @@ namespace Org.OpenAPITools.Model { StringBuilder sb = new StringBuilder(); sb.Append("class EnumArrays {\n"); - sb.Append(" JustSymbol: ").Append(JustSymbol).Append("\n"); sb.Append(" ArrayEnum: ").Append(ArrayEnum).Append("\n"); + sb.Append(" JustSymbol: ").Append(JustSymbol).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as EnumArrays).AreEqual; - } - - /// - /// Returns true if EnumArrays instances are equal - /// - /// Instance of EnumArrays to be compared - /// Boolean - public bool Equals(EnumArrays? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.JustSymbol.GetHashCode(); - if (this.ArrayEnum != null) - { - hashCode = (hashCode * 59) + this.ArrayEnum.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -166,4 +197,82 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type EnumArrays + /// + public class EnumArraysJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override EnumArrays Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + List arrayEnum = default; + EnumArrays.JustSymbolEnum justSymbol = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "array_enum": + arrayEnum = JsonSerializer.Deserialize>(ref reader, options); + break; + case "just_symbol": + string justSymbolRawValue = reader.GetString(); + justSymbol = EnumArrays.JustSymbolEnumFromString(justSymbolRawValue); + break; + default: + break; + } + } + } + + return new EnumArrays(arrayEnum, justSymbol); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, EnumArrays enumArrays, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WritePropertyName("array_enum"); + JsonSerializer.Serialize(writer, enumArrays.ArrayEnum, options); + var justSymbolRawValue = EnumArrays.JustSymbolEnumToJsonValue(enumArrays.JustSymbol); + if (justSymbolRawValue != null) + writer.WriteString("just_symbol", justSymbolRawValue); + else + writer.WriteNull("just_symbol"); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/EnumClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/EnumClass.cs index 9aa3badce2..5aa241352e 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/EnumClass.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/EnumClass.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -34,20 +33,129 @@ namespace Org.OpenAPITools.Model /// /// Enum Abc for value: _abc /// - [EnumMember(Value = "_abc")] Abc = 1, /// /// Enum Efg for value: -efg /// - [EnumMember(Value = "-efg")] Efg = 2, /// /// Enum Xyz for value: (xyz) /// - [EnumMember(Value = "(xyz)")] Xyz = 3 } + + public class EnumClassConverter : JsonConverter + { + public static EnumClass FromString(string value) + { + if (value == "_abc") + return EnumClass.Abc; + + if (value == "-efg") + return EnumClass.Efg; + + if (value == "(xyz)") + return EnumClass.Xyz; + + throw new NotImplementedException($"Could not convert value to type EnumClass: '{value}'"); + } + + public static EnumClass? FromStringOrDefault(string value) + { + if (value == "_abc") + return EnumClass.Abc; + + if (value == "-efg") + return EnumClass.Efg; + + if (value == "(xyz)") + return EnumClass.Xyz; + + return null; + } + + public static string ToJsonValue(EnumClass value) + { + if (value == EnumClass.Abc) + return "_abc"; + + if (value == EnumClass.Efg) + return "-efg"; + + if (value == EnumClass.Xyz) + return "(xyz)"; + + throw new NotImplementedException($"Value could not be handled: '{value}'"); + } + + /// + /// Returns a from the Json object + /// + /// + /// + /// + /// + public override EnumClass Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + EnumClass? result = EnumClassConverter.FromString(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the EnumClass to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, EnumClass enumClass, JsonSerializerOptions options) + { + writer.WriteStringValue(enumClass.ToString()); + } + } + + public class EnumClassNullableConverter : JsonConverter + { + /// + /// Returns a EnumClass from the Json object + /// + /// + /// + /// + /// + public override EnumClass? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + if (rawValue == null) + return null; + + EnumClass? result = EnumClassConverter.FromString(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, EnumClass? enumClass, JsonSerializerOptions options) + { + writer.WriteStringValue(enumClass?.ToString() ?? "null"); + } + } + } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/EnumTest.cs index c8f0a68335..9b9889a020 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/EnumTest.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,98 +28,64 @@ namespace Org.OpenAPITools.Model /// /// EnumTest /// - public partial class EnumTest : IEquatable, IValidatableObject + public partial class EnumTest : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// enumStringRequired (required) - /// enumString /// enumInteger /// enumIntegerOnly /// enumNumber - /// outerEnum - /// outerEnumInteger + /// enumString + /// enumStringRequired /// outerEnumDefaultValue + /// outerEnumInteger /// outerEnumIntegerDefaultValue - public EnumTest(EnumStringRequiredEnum enumStringRequired, EnumStringEnum? enumString = default, EnumIntegerEnum? enumInteger = default, EnumIntegerOnlyEnum? enumIntegerOnly = default, EnumNumberEnum? enumNumber = default, OuterEnum? outerEnum = default, OuterEnumInteger? outerEnumInteger = default, OuterEnumDefaultValue? outerEnumDefaultValue = default, OuterEnumIntegerDefaultValue? outerEnumIntegerDefaultValue = default) + /// outerEnum + [JsonConstructor] + public EnumTest(EnumIntegerEnum enumInteger, EnumIntegerOnlyEnum enumIntegerOnly, EnumNumberEnum enumNumber, EnumStringEnum enumString, EnumStringRequiredEnum enumStringRequired, OuterEnumDefaultValue outerEnumDefaultValue, OuterEnumInteger outerEnumInteger, OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue, OuterEnum? outerEnum = default) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (enumString == null) + throw new ArgumentNullException("enumString is a required property for EnumTest and cannot be null."); + if (enumStringRequired == null) throw new ArgumentNullException("enumStringRequired is a required property for EnumTest and cannot be null."); - EnumStringRequired = enumStringRequired; - EnumString = enumString; + if (enumInteger == null) + throw new ArgumentNullException("enumInteger is a required property for EnumTest and cannot be null."); + + if (enumIntegerOnly == null) + throw new ArgumentNullException("enumIntegerOnly is a required property for EnumTest and cannot be null."); + + if (enumNumber == null) + throw new ArgumentNullException("enumNumber is a required property for EnumTest and cannot be null."); + + if (outerEnumInteger == null) + throw new ArgumentNullException("outerEnumInteger is a required property for EnumTest and cannot be null."); + + if (outerEnumDefaultValue == null) + throw new ArgumentNullException("outerEnumDefaultValue is a required property for EnumTest and cannot be null."); + + if (outerEnumIntegerDefaultValue == null) + throw new ArgumentNullException("outerEnumIntegerDefaultValue is a required property for EnumTest and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + EnumInteger = enumInteger; EnumIntegerOnly = enumIntegerOnly; EnumNumber = enumNumber; - OuterEnum = outerEnum; - OuterEnumInteger = outerEnumInteger; + EnumString = enumString; + EnumStringRequired = enumStringRequired; OuterEnumDefaultValue = outerEnumDefaultValue; + OuterEnumInteger = outerEnumInteger; OuterEnumIntegerDefaultValue = outerEnumIntegerDefaultValue; + OuterEnum = outerEnum; } - /// - /// Defines EnumStringRequired - /// - public enum EnumStringRequiredEnum - { - /// - /// Enum UPPER for value: UPPER - /// - [EnumMember(Value = "UPPER")] - UPPER = 1, - - /// - /// Enum Lower for value: lower - /// - [EnumMember(Value = "lower")] - Lower = 2, - - /// - /// Enum Empty for value: - /// - [EnumMember(Value = "")] - Empty = 3 - - } - - /// - /// Gets or Sets EnumStringRequired - /// - [JsonPropertyName("enum_string_required")] - public EnumStringRequiredEnum EnumStringRequired { get; set; } - - /// - /// Defines EnumString - /// - public enum EnumStringEnum - { - /// - /// Enum UPPER for value: UPPER - /// - [EnumMember(Value = "UPPER")] - UPPER = 1, - - /// - /// Enum Lower for value: lower - /// - [EnumMember(Value = "lower")] - Lower = 2, - - /// - /// Enum Empty for value: - /// - [EnumMember(Value = "")] - Empty = 3 - - } - - /// - /// Gets or Sets EnumString - /// - [JsonPropertyName("enum_string")] - public EnumStringEnum? EnumString { get; set; } - /// /// Defines EnumInteger /// @@ -138,11 +103,38 @@ namespace Org.OpenAPITools.Model } + /// + /// Returns a EnumIntegerEnum + /// + /// + /// + public static EnumIntegerEnum EnumIntegerEnumFromString(string value) + { + if (value == (1).ToString()) + return EnumIntegerEnum.NUMBER_1; + + if (value == (-1).ToString()) + return EnumIntegerEnum.NUMBER_MINUS_1; + + throw new NotImplementedException($"Could not convert value to type EnumIntegerEnum: '{value}'"); + } + + /// + /// Returns equivalent json value + /// + /// + /// + /// + public static int EnumIntegerEnumToJsonValue(EnumIntegerEnum value) + { + return (int) value; + } + /// /// Gets or Sets EnumInteger /// [JsonPropertyName("enum_integer")] - public EnumIntegerEnum? EnumInteger { get; set; } + public EnumIntegerEnum EnumInteger { get; set; } /// /// Defines EnumIntegerOnly @@ -161,11 +153,38 @@ namespace Org.OpenAPITools.Model } + /// + /// Returns a EnumIntegerOnlyEnum + /// + /// + /// + public static EnumIntegerOnlyEnum EnumIntegerOnlyEnumFromString(string value) + { + if (value == (2).ToString()) + return EnumIntegerOnlyEnum.NUMBER_2; + + if (value == (-2).ToString()) + return EnumIntegerOnlyEnum.NUMBER_MINUS_2; + + throw new NotImplementedException($"Could not convert value to type EnumIntegerOnlyEnum: '{value}'"); + } + + /// + /// Returns equivalent json value + /// + /// + /// + /// + public static int EnumIntegerOnlyEnumToJsonValue(EnumIntegerOnlyEnum value) + { + return (int) value; + } + /// /// Gets or Sets EnumIntegerOnly /// [JsonPropertyName("enum_integer_only")] - public EnumIntegerOnlyEnum? EnumIntegerOnly { get; set; } + public EnumIntegerOnlyEnum EnumIntegerOnly { get; set; } /// /// Defines EnumNumber @@ -175,22 +194,205 @@ namespace Org.OpenAPITools.Model /// /// Enum NUMBER_1_DOT_1 for value: 1.1 /// - [EnumMember(Value = "1.1")] NUMBER_1_DOT_1 = 1, /// /// Enum NUMBER_MINUS_1_DOT_2 for value: -1.2 /// - [EnumMember(Value = "-1.2")] NUMBER_MINUS_1_DOT_2 = 2 } + /// + /// Returns a EnumNumberEnum + /// + /// + /// + public static EnumNumberEnum EnumNumberEnumFromString(string value) + { + if (value == "1.1") + return EnumNumberEnum.NUMBER_1_DOT_1; + + if (value == "-1.2") + return EnumNumberEnum.NUMBER_MINUS_1_DOT_2; + + throw new NotImplementedException($"Could not convert value to type EnumNumberEnum: '{value}'"); + } + + /// + /// Returns equivalent json value + /// + /// + /// + /// + public static string EnumNumberEnumToJsonValue(EnumNumberEnum value) + { + if (value == EnumNumberEnum.NUMBER_1_DOT_1) + return "1.1"; + + if (value == EnumNumberEnum.NUMBER_MINUS_1_DOT_2) + return "-1.2"; + + throw new NotImplementedException($"Value could not be handled: '{value}'"); + } + /// /// Gets or Sets EnumNumber /// [JsonPropertyName("enum_number")] - public EnumNumberEnum? EnumNumber { get; set; } + public EnumNumberEnum EnumNumber { get; set; } + + /// + /// Defines EnumString + /// + public enum EnumStringEnum + { + /// + /// Enum UPPER for value: UPPER + /// + UPPER = 1, + + /// + /// Enum Lower for value: lower + /// + Lower = 2, + + /// + /// Enum Empty for value: + /// + Empty = 3 + + } + + /// + /// Returns a EnumStringEnum + /// + /// + /// + public static EnumStringEnum EnumStringEnumFromString(string value) + { + if (value == "UPPER") + return EnumStringEnum.UPPER; + + if (value == "lower") + return EnumStringEnum.Lower; + + if (value == "") + return EnumStringEnum.Empty; + + throw new NotImplementedException($"Could not convert value to type EnumStringEnum: '{value}'"); + } + + /// + /// Returns equivalent json value + /// + /// + /// + /// + public static string EnumStringEnumToJsonValue(EnumStringEnum value) + { + if (value == EnumStringEnum.UPPER) + return "UPPER"; + + if (value == EnumStringEnum.Lower) + return "lower"; + + if (value == EnumStringEnum.Empty) + return ""; + + throw new NotImplementedException($"Value could not be handled: '{value}'"); + } + + /// + /// Gets or Sets EnumString + /// + [JsonPropertyName("enum_string")] + public EnumStringEnum EnumString { get; set; } + + /// + /// Defines EnumStringRequired + /// + public enum EnumStringRequiredEnum + { + /// + /// Enum UPPER for value: UPPER + /// + UPPER = 1, + + /// + /// Enum Lower for value: lower + /// + Lower = 2, + + /// + /// Enum Empty for value: + /// + Empty = 3 + + } + + /// + /// Returns a EnumStringRequiredEnum + /// + /// + /// + public static EnumStringRequiredEnum EnumStringRequiredEnumFromString(string value) + { + if (value == "UPPER") + return EnumStringRequiredEnum.UPPER; + + if (value == "lower") + return EnumStringRequiredEnum.Lower; + + if (value == "") + return EnumStringRequiredEnum.Empty; + + throw new NotImplementedException($"Could not convert value to type EnumStringRequiredEnum: '{value}'"); + } + + /// + /// Returns equivalent json value + /// + /// + /// + /// + public static string EnumStringRequiredEnumToJsonValue(EnumStringRequiredEnum value) + { + if (value == EnumStringRequiredEnum.UPPER) + return "UPPER"; + + if (value == EnumStringRequiredEnum.Lower) + return "lower"; + + if (value == EnumStringRequiredEnum.Empty) + return ""; + + throw new NotImplementedException($"Value could not be handled: '{value}'"); + } + + /// + /// Gets or Sets EnumStringRequired + /// + [JsonPropertyName("enum_string_required")] + public EnumStringRequiredEnum EnumStringRequired { get; set; } + + /// + /// Gets or Sets OuterEnumDefaultValue + /// + [JsonPropertyName("outerEnumDefaultValue")] + public OuterEnumDefaultValue OuterEnumDefaultValue { get; set; } + + /// + /// Gets or Sets OuterEnumInteger + /// + [JsonPropertyName("outerEnumInteger")] + public OuterEnumInteger OuterEnumInteger { get; set; } + + /// + /// Gets or Sets OuterEnumIntegerDefaultValue + /// + [JsonPropertyName("outerEnumIntegerDefaultValue")] + public OuterEnumIntegerDefaultValue OuterEnumIntegerDefaultValue { get; set; } /// /// Gets or Sets OuterEnum @@ -198,29 +400,11 @@ namespace Org.OpenAPITools.Model [JsonPropertyName("outerEnum")] public OuterEnum? OuterEnum { get; set; } - /// - /// Gets or Sets OuterEnumInteger - /// - [JsonPropertyName("outerEnumInteger")] - public OuterEnumInteger? OuterEnumInteger { get; set; } - - /// - /// Gets or Sets OuterEnumDefaultValue - /// - [JsonPropertyName("outerEnumDefaultValue")] - public OuterEnumDefaultValue? OuterEnumDefaultValue { get; set; } - - /// - /// Gets or Sets OuterEnumIntegerDefaultValue - /// - [JsonPropertyName("outerEnumIntegerDefaultValue")] - public OuterEnumIntegerDefaultValue? OuterEnumIntegerDefaultValue { get; set; } - /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -230,66 +414,19 @@ namespace Org.OpenAPITools.Model { StringBuilder sb = new StringBuilder(); sb.Append("class EnumTest {\n"); - sb.Append(" EnumStringRequired: ").Append(EnumStringRequired).Append("\n"); - sb.Append(" EnumString: ").Append(EnumString).Append("\n"); sb.Append(" EnumInteger: ").Append(EnumInteger).Append("\n"); sb.Append(" EnumIntegerOnly: ").Append(EnumIntegerOnly).Append("\n"); sb.Append(" EnumNumber: ").Append(EnumNumber).Append("\n"); - sb.Append(" OuterEnum: ").Append(OuterEnum).Append("\n"); - sb.Append(" OuterEnumInteger: ").Append(OuterEnumInteger).Append("\n"); + sb.Append(" EnumString: ").Append(EnumString).Append("\n"); + sb.Append(" EnumStringRequired: ").Append(EnumStringRequired).Append("\n"); sb.Append(" OuterEnumDefaultValue: ").Append(OuterEnumDefaultValue).Append("\n"); + sb.Append(" OuterEnumInteger: ").Append(OuterEnumInteger).Append("\n"); sb.Append(" OuterEnumIntegerDefaultValue: ").Append(OuterEnumIntegerDefaultValue).Append("\n"); + sb.Append(" OuterEnum: ").Append(OuterEnum).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as EnumTest).AreEqual; - } - - /// - /// Returns true if EnumTest instances are equal - /// - /// Instance of EnumTest to be compared - /// Boolean - public bool Equals(EnumTest? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.EnumStringRequired.GetHashCode(); - hashCode = (hashCode * 59) + this.EnumString.GetHashCode(); - hashCode = (hashCode * 59) + this.EnumInteger.GetHashCode(); - hashCode = (hashCode * 59) + this.EnumIntegerOnly.GetHashCode(); - hashCode = (hashCode * 59) + this.EnumNumber.GetHashCode(); - hashCode = (hashCode * 59) + this.OuterEnum.GetHashCode(); - hashCode = (hashCode * 59) + this.OuterEnumInteger.GetHashCode(); - hashCode = (hashCode * 59) + this.OuterEnumDefaultValue.GetHashCode(); - hashCode = (hashCode * 59) + this.OuterEnumIntegerDefaultValue.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -301,4 +438,143 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type EnumTest + /// + public class EnumTestJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override EnumTest Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + EnumTest.EnumIntegerEnum enumInteger = default; + EnumTest.EnumIntegerOnlyEnum enumIntegerOnly = default; + EnumTest.EnumNumberEnum enumNumber = default; + EnumTest.EnumStringEnum enumString = default; + EnumTest.EnumStringRequiredEnum enumStringRequired = default; + OuterEnumDefaultValue outerEnumDefaultValue = default; + OuterEnumInteger outerEnumInteger = default; + OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue = default; + OuterEnum? outerEnum = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "enum_integer": + enumInteger = (EnumTest.EnumIntegerEnum) reader.GetInt32(); + break; + case "enum_integer_only": + enumIntegerOnly = (EnumTest.EnumIntegerOnlyEnum) reader.GetInt32(); + break; + case "enum_number": + enumNumber = (EnumTest.EnumNumberEnum) reader.GetInt32(); + break; + case "enum_string": + string enumStringRawValue = reader.GetString(); + enumString = EnumTest.EnumStringEnumFromString(enumStringRawValue); + break; + case "enum_string_required": + string enumStringRequiredRawValue = reader.GetString(); + enumStringRequired = EnumTest.EnumStringRequiredEnumFromString(enumStringRequiredRawValue); + break; + case "outerEnumDefaultValue": + string outerEnumDefaultValueRawValue = reader.GetString(); + outerEnumDefaultValue = OuterEnumDefaultValueConverter.FromString(outerEnumDefaultValueRawValue); + break; + case "outerEnumInteger": + string outerEnumIntegerRawValue = reader.GetString(); + outerEnumInteger = OuterEnumIntegerConverter.FromString(outerEnumIntegerRawValue); + break; + case "outerEnumIntegerDefaultValue": + string outerEnumIntegerDefaultValueRawValue = reader.GetString(); + outerEnumIntegerDefaultValue = OuterEnumIntegerDefaultValueConverter.FromString(outerEnumIntegerDefaultValueRawValue); + break; + case "outerEnum": + string outerEnumRawValue = reader.GetString(); + outerEnum = OuterEnumConverter.FromStringOrDefault(outerEnumRawValue); + break; + default: + break; + } + } + } + + return new EnumTest(enumInteger, enumIntegerOnly, enumNumber, enumString, enumStringRequired, outerEnumDefaultValue, outerEnumInteger, outerEnumIntegerDefaultValue, outerEnum); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, EnumTest enumTest, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteNumber("enum_integer", (int)enumTest.EnumInteger); + writer.WriteNumber("enum_integer_only", (int)enumTest.EnumIntegerOnly); + writer.WriteNumber("enum_number", (int)enumTest.EnumNumber); + var enumStringRawValue = EnumTest.EnumStringEnumToJsonValue(enumTest.EnumString); + if (enumStringRawValue != null) + writer.WriteString("enum_string", enumStringRawValue); + else + writer.WriteNull("enum_string"); + var enumStringRequiredRawValue = EnumTest.EnumStringRequiredEnumToJsonValue(enumTest.EnumStringRequired); + if (enumStringRequiredRawValue != null) + writer.WriteString("enum_string_required", enumStringRequiredRawValue); + else + writer.WriteNull("enum_string_required"); + var outerEnumDefaultValueRawValue = OuterEnumDefaultValueConverter.ToJsonValue(enumTest.OuterEnumDefaultValue); + if (outerEnumDefaultValueRawValue != null) + writer.WriteString("outerEnumDefaultValue", outerEnumDefaultValueRawValue); + else + writer.WriteNull("outerEnumDefaultValue"); + var outerEnumIntegerRawValue = OuterEnumIntegerConverter.ToJsonValue(enumTest.OuterEnumInteger); + if (outerEnumIntegerRawValue != null) + writer.WriteNumber("outerEnumInteger", outerEnumIntegerRawValue); + else + writer.WriteNull("outerEnumInteger"); + var outerEnumIntegerDefaultValueRawValue = OuterEnumIntegerDefaultValueConverter.ToJsonValue(enumTest.OuterEnumIntegerDefaultValue); + if (outerEnumIntegerDefaultValueRawValue != null) + writer.WriteNumber("outerEnumIntegerDefaultValue", outerEnumIntegerDefaultValueRawValue); + else + writer.WriteNull("outerEnumIntegerDefaultValue"); + if (enumTest.OuterEnum == null) + writer.WriteNull("outerEnum"); + var outerEnumRawValue = OuterEnumConverter.ToJsonValue(enumTest.OuterEnum.Value); + if (outerEnumRawValue != null) + writer.WriteString("outerEnum", outerEnumRawValue); + else + writer.WriteNull("outerEnum"); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/EquilateralTriangle.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/EquilateralTriangle.cs index 8a4946d99b..61a3ce9209 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/EquilateralTriangle.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/EquilateralTriangle.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,14 +28,15 @@ namespace Org.OpenAPITools.Model /// /// EquilateralTriangle /// - public partial class EquilateralTriangle : IEquatable, IValidatableObject + public partial class EquilateralTriangle : IValidatableObject { /// /// Initializes a new instance of the class. /// /// /// - public EquilateralTriangle(ShapeInterface shapeInterface, TriangleInterface triangleInterface) + [JsonConstructor] + internal EquilateralTriangle(ShapeInterface shapeInterface, TriangleInterface triangleInterface) { ShapeInterface = shapeInterface; TriangleInterface = triangleInterface; @@ -56,7 +56,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -70,44 +70,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as EquilateralTriangle).AreEqual; - } - - /// - /// Returns true if EquilateralTriangle instances are equal - /// - /// Instance of EquilateralTriangle to be compared - /// Boolean - public bool Equals(EquilateralTriangle? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -124,13 +86,6 @@ namespace Org.OpenAPITools.Model /// public class EquilateralTriangleJsonConverter : JsonConverter { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof(EquilateralTriangle).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -143,28 +98,35 @@ namespace Org.OpenAPITools.Model { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); + JsonTokenType startingTokenType = reader.TokenType; + Utf8JsonReader shapeInterfaceReader = reader; - bool shapeInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref shapeInterfaceReader, options, out ShapeInterface? shapeInterface); + bool shapeInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref reader, options, out ShapeInterface? shapeInterface); Utf8JsonReader triangleInterfaceReader = reader; - bool triangleInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref triangleInterfaceReader, options, out TriangleInterface? triangleInterface); + bool triangleInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref reader, options, out TriangleInterface? triangleInterface); while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string? propertyName = reader.GetString(); reader.Read(); switch (propertyName) { + default: + break; } } } @@ -179,6 +141,12 @@ namespace Org.OpenAPITools.Model /// /// /// - public override void Write(Utf8JsonWriter writer, EquilateralTriangle equilateralTriangle, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, EquilateralTriangle equilateralTriangle, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + + writer.WriteEndObject(); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/File.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/File.cs index 2ae90b249a..34867c689e 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/File.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/File.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,14 +28,24 @@ namespace Org.OpenAPITools.Model /// /// Must be named `File` for test. /// - public partial class File : IEquatable, IValidatableObject + public partial class File : IValidatableObject { /// /// Initializes a new instance of the class. /// /// Test capitalization - public File(string? sourceURI = default) + [JsonConstructor] + public File(string sourceURI) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (sourceURI == null) + throw new ArgumentNullException("sourceURI is a required property for File and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + SourceURI = sourceURI; } @@ -45,13 +54,13 @@ namespace Org.OpenAPITools.Model /// /// Test capitalization [JsonPropertyName("sourceURI")] - public string? SourceURI { get; set; } + public string SourceURI { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -66,48 +75,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as File).AreEqual; - } - - /// - /// Returns true if File instances are equal - /// - /// Instance of File to be compared - /// Boolean - public bool Equals(File? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.SourceURI != null) - { - hashCode = (hashCode * 59) + this.SourceURI.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -119,4 +86,71 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type File + /// + public class FileJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override File Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string sourceURI = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "sourceURI": + sourceURI = reader.GetString(); + break; + default: + break; + } + } + } + + return new File(sourceURI); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, File file, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("sourceURI", file.SourceURI); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs index 26c1e83b07..209344ad13 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,15 +28,28 @@ namespace Org.OpenAPITools.Model /// /// FileSchemaTestClass /// - public partial class FileSchemaTestClass : IEquatable, IValidatableObject + public partial class FileSchemaTestClass : IValidatableObject { /// /// Initializes a new instance of the class. /// /// file /// files - public FileSchemaTestClass(File? file = default, List? files = default) + [JsonConstructor] + public FileSchemaTestClass(File file, List files) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (file == null) + throw new ArgumentNullException("file is a required property for FileSchemaTestClass and cannot be null."); + + if (files == null) + throw new ArgumentNullException("files is a required property for FileSchemaTestClass and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + File = file; Files = files; } @@ -46,19 +58,19 @@ namespace Org.OpenAPITools.Model /// Gets or Sets File /// [JsonPropertyName("file")] - public File? File { get; set; } + public File File { get; set; } /// /// Gets or Sets Files /// [JsonPropertyName("files")] - public List? Files { get; set; } + public List Files { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -74,52 +86,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as FileSchemaTestClass).AreEqual; - } - - /// - /// Returns true if FileSchemaTestClass instances are equal - /// - /// Instance of FileSchemaTestClass to be compared - /// Boolean - public bool Equals(FileSchemaTestClass? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.File != null) - { - hashCode = (hashCode * 59) + this.File.GetHashCode(); - } - if (this.Files != null) - { - hashCode = (hashCode * 59) + this.Files.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -131,4 +97,78 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type FileSchemaTestClass + /// + public class FileSchemaTestClassJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override FileSchemaTestClass Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + File file = default; + List files = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "file": + file = JsonSerializer.Deserialize(ref reader, options); + break; + case "files": + files = JsonSerializer.Deserialize>(ref reader, options); + break; + default: + break; + } + } + } + + return new FileSchemaTestClass(file, files); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, FileSchemaTestClass fileSchemaTestClass, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WritePropertyName("file"); + JsonSerializer.Serialize(writer, fileSchemaTestClass.File, options); + writer.WritePropertyName("files"); + JsonSerializer.Serialize(writer, fileSchemaTestClass.Files, options); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Foo.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Foo.cs index 4997e8d3bb..5cc4464b05 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Foo.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Foo.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,14 +28,24 @@ namespace Org.OpenAPITools.Model /// /// Foo /// - public partial class Foo : IEquatable, IValidatableObject + public partial class Foo : IValidatableObject { /// /// Initializes a new instance of the class. /// /// bar (default to "bar") - public Foo(string? bar = "bar") + [JsonConstructor] + public Foo(string bar = "bar") { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (bar == null) + throw new ArgumentNullException("bar is a required property for Foo and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + Bar = bar; } @@ -44,13 +53,13 @@ namespace Org.OpenAPITools.Model /// Gets or Sets Bar /// [JsonPropertyName("bar")] - public string? Bar { get; set; } + public string Bar { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -65,48 +74,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Foo).AreEqual; - } - - /// - /// Returns true if Foo instances are equal - /// - /// Instance of Foo to be compared - /// Boolean - public bool Equals(Foo? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Bar != null) - { - hashCode = (hashCode * 59) + this.Bar.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -118,4 +85,71 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type Foo + /// + public class FooJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override Foo Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string bar = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "bar": + bar = reader.GetString(); + break; + default: + break; + } + } + } + + return new Foo(bar); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Foo foo, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("bar", foo.Bar); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs index 5cd966c64a..a78484e949 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,28 +28,38 @@ namespace Org.OpenAPITools.Model /// /// FooGetDefaultResponse /// - public partial class FooGetDefaultResponse : IEquatable, IValidatableObject + public partial class FooGetDefaultResponse : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// _string - public FooGetDefaultResponse(Foo? _string = default) + /// stringProperty + [JsonConstructor] + public FooGetDefaultResponse(Foo stringProperty) { - String = _string; +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (stringProperty == null) + throw new ArgumentNullException("stringProperty is a required property for FooGetDefaultResponse and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + StringProperty = stringProperty; } /// - /// Gets or Sets String + /// Gets or Sets StringProperty /// [JsonPropertyName("string")] - public Foo? String { get; set; } + public Foo StringProperty { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -60,53 +69,11 @@ namespace Org.OpenAPITools.Model { StringBuilder sb = new StringBuilder(); sb.Append("class FooGetDefaultResponse {\n"); - sb.Append(" String: ").Append(String).Append("\n"); + sb.Append(" StringProperty: ").Append(StringProperty).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as FooGetDefaultResponse).AreEqual; - } - - /// - /// Returns true if FooGetDefaultResponse instances are equal - /// - /// Instance of FooGetDefaultResponse to be compared - /// Boolean - public bool Equals(FooGetDefaultResponse? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.String != null) - { - hashCode = (hashCode * 59) + this.String.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -118,4 +85,72 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type FooGetDefaultResponse + /// + public class FooGetDefaultResponseJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override FooGetDefaultResponse Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + Foo stringProperty = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "string": + stringProperty = JsonSerializer.Deserialize(ref reader, options); + break; + default: + break; + } + } + } + + return new FooGetDefaultResponse(stringProperty); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, FooGetDefaultResponse fooGetDefaultResponse, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WritePropertyName("string"); + JsonSerializer.Serialize(writer, fooGetDefaultResponse.StringProperty, options); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/FormatTest.cs index e3fc4c55e8..4c4cf76e23 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/FormatTest.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,70 +28,113 @@ namespace Org.OpenAPITools.Model /// /// FormatTest /// - public partial class FormatTest : IEquatable, IValidatableObject + public partial class FormatTest : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// number (required) - /// _byte (required) - /// date (required) - /// password (required) - /// integer + /// binary + /// byteProperty + /// date + /// dateTime + /// decimalProperty + /// doubleProperty + /// floatProperty /// int32 /// int64 - /// _float - /// _double - /// _decimal - /// _string - /// binary - /// dateTime - /// uuid + /// integer + /// number + /// password /// A string that is a 10 digit number. Can have leading zeros. /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. - public FormatTest(decimal number, byte[] _byte, DateTime date, string password, int? integer = default, int? int32 = default, long? int64 = default, float? _float = default, double? _double = default, decimal? _decimal = default, string? _string = default, System.IO.Stream? binary = default, DateTime? dateTime = default, Guid? uuid = default, string? patternWithDigits = default, string? patternWithDigitsAndDelimiter = default) + /// stringProperty + /// uuid + [JsonConstructor] + public FormatTest(System.IO.Stream binary, byte[] byteProperty, DateTime date, DateTime dateTime, decimal decimalProperty, double doubleProperty, float floatProperty, int int32, long int64, int integer, decimal number, string password, string patternWithDigits, string patternWithDigitsAndDelimiter, string stringProperty, Guid uuid) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (integer == null) + throw new ArgumentNullException("integer is a required property for FormatTest and cannot be null."); + + if (int32 == null) + throw new ArgumentNullException("int32 is a required property for FormatTest and cannot be null."); + + if (int64 == null) + throw new ArgumentNullException("int64 is a required property for FormatTest and cannot be null."); + if (number == null) throw new ArgumentNullException("number is a required property for FormatTest and cannot be null."); - if (_byte == null) - throw new ArgumentNullException("_byte is a required property for FormatTest and cannot be null."); + if (floatProperty == null) + throw new ArgumentNullException("floatProperty is a required property for FormatTest and cannot be null."); + + if (doubleProperty == null) + throw new ArgumentNullException("doubleProperty is a required property for FormatTest and cannot be null."); + + if (decimalProperty == null) + throw new ArgumentNullException("decimalProperty is a required property for FormatTest and cannot be null."); + + if (stringProperty == null) + throw new ArgumentNullException("stringProperty is a required property for FormatTest and cannot be null."); + + if (byteProperty == null) + throw new ArgumentNullException("byteProperty is a required property for FormatTest and cannot be null."); + + if (binary == null) + throw new ArgumentNullException("binary is a required property for FormatTest and cannot be null."); if (date == null) throw new ArgumentNullException("date is a required property for FormatTest and cannot be null."); + if (dateTime == null) + throw new ArgumentNullException("dateTime is a required property for FormatTest and cannot be null."); + + if (uuid == null) + throw new ArgumentNullException("uuid is a required property for FormatTest and cannot be null."); + if (password == null) throw new ArgumentNullException("password is a required property for FormatTest and cannot be null."); - Number = number; - Byte = _byte; + if (patternWithDigits == null) + throw new ArgumentNullException("patternWithDigits is a required property for FormatTest and cannot be null."); + + if (patternWithDigitsAndDelimiter == null) + throw new ArgumentNullException("patternWithDigitsAndDelimiter is a required property for FormatTest and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + Binary = binary; + ByteProperty = byteProperty; Date = date; - Password = password; - Integer = integer; + DateTime = dateTime; + DecimalProperty = decimalProperty; + DoubleProperty = doubleProperty; + FloatProperty = floatProperty; Int32 = int32; Int64 = int64; - Float = _float; - Double = _double; - Decimal = _decimal; - String = _string; - Binary = binary; - DateTime = dateTime; - Uuid = uuid; + Integer = integer; + Number = number; + Password = password; PatternWithDigits = patternWithDigits; PatternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; + StringProperty = stringProperty; + Uuid = uuid; } /// - /// Gets or Sets Number + /// Gets or Sets Binary /// - [JsonPropertyName("number")] - public decimal Number { get; set; } + [JsonPropertyName("binary")] + public System.IO.Stream Binary { get; set; } /// - /// Gets or Sets Byte + /// Gets or Sets ByteProperty /// [JsonPropertyName("byte")] - public byte[] Byte { get; set; } + public byte[] ByteProperty { get; set; } /// /// Gets or Sets Date @@ -100,91 +142,91 @@ namespace Org.OpenAPITools.Model [JsonPropertyName("date")] public DateTime Date { get; set; } + /// + /// Gets or Sets DateTime + /// + [JsonPropertyName("dateTime")] + public DateTime DateTime { get; set; } + + /// + /// Gets or Sets DecimalProperty + /// + [JsonPropertyName("decimal")] + public decimal DecimalProperty { get; set; } + + /// + /// Gets or Sets DoubleProperty + /// + [JsonPropertyName("double")] + public double DoubleProperty { get; set; } + + /// + /// Gets or Sets FloatProperty + /// + [JsonPropertyName("float")] + public float FloatProperty { get; set; } + + /// + /// Gets or Sets Int32 + /// + [JsonPropertyName("int32")] + public int Int32 { get; set; } + + /// + /// Gets or Sets Int64 + /// + [JsonPropertyName("int64")] + public long Int64 { get; set; } + + /// + /// Gets or Sets Integer + /// + [JsonPropertyName("integer")] + public int Integer { get; set; } + + /// + /// Gets or Sets Number + /// + [JsonPropertyName("number")] + public decimal Number { get; set; } + /// /// Gets or Sets Password /// [JsonPropertyName("password")] public string Password { get; set; } - /// - /// Gets or Sets Integer - /// - [JsonPropertyName("integer")] - public int? Integer { get; set; } - - /// - /// Gets or Sets Int32 - /// - [JsonPropertyName("int32")] - public int? Int32 { get; set; } - - /// - /// Gets or Sets Int64 - /// - [JsonPropertyName("int64")] - public long? Int64 { get; set; } - - /// - /// Gets or Sets Float - /// - [JsonPropertyName("float")] - public float? Float { get; set; } - - /// - /// Gets or Sets Double - /// - [JsonPropertyName("double")] - public double? Double { get; set; } - - /// - /// Gets or Sets Decimal - /// - [JsonPropertyName("decimal")] - public decimal? Decimal { get; set; } - - /// - /// Gets or Sets String - /// - [JsonPropertyName("string")] - public string? String { get; set; } - - /// - /// Gets or Sets Binary - /// - [JsonPropertyName("binary")] - public System.IO.Stream? Binary { get; set; } - - /// - /// Gets or Sets DateTime - /// - [JsonPropertyName("dateTime")] - public DateTime? DateTime { get; set; } - - /// - /// Gets or Sets Uuid - /// - [JsonPropertyName("uuid")] - public Guid? Uuid { get; set; } - /// /// A string that is a 10 digit number. Can have leading zeros. /// /// A string that is a 10 digit number. Can have leading zeros. [JsonPropertyName("pattern_with_digits")] - public string? PatternWithDigits { get; set; } + public string PatternWithDigits { get; set; } /// /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. /// /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. [JsonPropertyName("pattern_with_digits_and_delimiter")] - public string? PatternWithDigitsAndDelimiter { get; set; } + public string PatternWithDigitsAndDelimiter { get; set; } + + /// + /// Gets or Sets StringProperty + /// + [JsonPropertyName("string")] + public string StringProperty { get; set; } + + /// + /// Gets or Sets Uuid + /// + [JsonPropertyName("uuid")] + public Guid Uuid { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -194,107 +236,26 @@ namespace Org.OpenAPITools.Model { StringBuilder sb = new StringBuilder(); sb.Append("class FormatTest {\n"); - sb.Append(" Number: ").Append(Number).Append("\n"); - sb.Append(" Byte: ").Append(Byte).Append("\n"); + sb.Append(" Binary: ").Append(Binary).Append("\n"); + sb.Append(" ByteProperty: ").Append(ByteProperty).Append("\n"); sb.Append(" Date: ").Append(Date).Append("\n"); - sb.Append(" Password: ").Append(Password).Append("\n"); - sb.Append(" Integer: ").Append(Integer).Append("\n"); + sb.Append(" DateTime: ").Append(DateTime).Append("\n"); + sb.Append(" DecimalProperty: ").Append(DecimalProperty).Append("\n"); + sb.Append(" DoubleProperty: ").Append(DoubleProperty).Append("\n"); + sb.Append(" FloatProperty: ").Append(FloatProperty).Append("\n"); sb.Append(" Int32: ").Append(Int32).Append("\n"); sb.Append(" Int64: ").Append(Int64).Append("\n"); - sb.Append(" Float: ").Append(Float).Append("\n"); - sb.Append(" Double: ").Append(Double).Append("\n"); - sb.Append(" Decimal: ").Append(Decimal).Append("\n"); - sb.Append(" String: ").Append(String).Append("\n"); - sb.Append(" Binary: ").Append(Binary).Append("\n"); - sb.Append(" DateTime: ").Append(DateTime).Append("\n"); - sb.Append(" Uuid: ").Append(Uuid).Append("\n"); + sb.Append(" Integer: ").Append(Integer).Append("\n"); + sb.Append(" Number: ").Append(Number).Append("\n"); + sb.Append(" Password: ").Append(Password).Append("\n"); sb.Append(" PatternWithDigits: ").Append(PatternWithDigits).Append("\n"); sb.Append(" PatternWithDigitsAndDelimiter: ").Append(PatternWithDigitsAndDelimiter).Append("\n"); + sb.Append(" StringProperty: ").Append(StringProperty).Append("\n"); + sb.Append(" Uuid: ").Append(Uuid).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as FormatTest).AreEqual; - } - - /// - /// Returns true if FormatTest instances are equal - /// - /// Instance of FormatTest to be compared - /// Boolean - public bool Equals(FormatTest? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Number.GetHashCode(); - if (this.Byte != null) - { - hashCode = (hashCode * 59) + this.Byte.GetHashCode(); - } - if (this.Date != null) - { - hashCode = (hashCode * 59) + this.Date.GetHashCode(); - } - if (this.Password != null) - { - hashCode = (hashCode * 59) + this.Password.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Integer.GetHashCode(); - hashCode = (hashCode * 59) + this.Int32.GetHashCode(); - hashCode = (hashCode * 59) + this.Int64.GetHashCode(); - hashCode = (hashCode * 59) + this.Float.GetHashCode(); - hashCode = (hashCode * 59) + this.Double.GetHashCode(); - hashCode = (hashCode * 59) + this.Decimal.GetHashCode(); - if (this.String != null) - { - hashCode = (hashCode * 59) + this.String.GetHashCode(); - } - if (this.Binary != null) - { - hashCode = (hashCode * 59) + this.Binary.GetHashCode(); - } - if (this.DateTime != null) - { - hashCode = (hashCode * 59) + this.DateTime.GetHashCode(); - } - if (this.Uuid != null) - { - hashCode = (hashCode * 59) + this.Uuid.GetHashCode(); - } - if (this.PatternWithDigits != null) - { - hashCode = (hashCode * 59) + this.PatternWithDigits.GetHashCode(); - } - if (this.PatternWithDigitsAndDelimiter != null) - { - hashCode = (hashCode * 59) + this.PatternWithDigitsAndDelimiter.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -302,6 +263,54 @@ namespace Org.OpenAPITools.Model /// Validation Result public IEnumerable Validate(ValidationContext validationContext) { + // DoubleProperty (double) maximum + if (this.DoubleProperty > (double)123.4) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for DoubleProperty, must be a value less than or equal to 123.4.", new [] { "DoubleProperty" }); + } + + // DoubleProperty (double) minimum + if (this.DoubleProperty < (double)67.8) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for DoubleProperty, must be a value greater than or equal to 67.8.", new [] { "DoubleProperty" }); + } + + // FloatProperty (float) maximum + if (this.FloatProperty > (float)987.6) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for FloatProperty, must be a value less than or equal to 987.6.", new [] { "FloatProperty" }); + } + + // FloatProperty (float) minimum + if (this.FloatProperty < (float)54.3) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for FloatProperty, must be a value greater than or equal to 54.3.", new [] { "FloatProperty" }); + } + + // Int32 (int) maximum + if (this.Int32 > (int)200) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Int32, must be a value less than or equal to 200.", new [] { "Int32" }); + } + + // Int32 (int) minimum + if (this.Int32 < (int)20) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Int32, must be a value greater than or equal to 20.", new [] { "Int32" }); + } + + // Integer (int) maximum + if (this.Integer > (int)100) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Integer, must be a value less than or equal to 100.", new [] { "Integer" }); + } + + // Integer (int) minimum + if (this.Integer < (int)10) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Integer, must be a value greater than or equal to 10.", new [] { "Integer" }); + } + // Number (decimal) maximum if (this.Number > (decimal)543.2) { @@ -326,61 +335,6 @@ namespace Org.OpenAPITools.Model yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Password, length must be greater than 10.", new [] { "Password" }); } - // Integer (int) maximum - if (this.Integer > (int)100) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Integer, must be a value less than or equal to 100.", new [] { "Integer" }); - } - - // Integer (int) minimum - if (this.Integer < (int)10) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Integer, must be a value greater than or equal to 10.", new [] { "Integer" }); - } - - // Int32 (int) maximum - if (this.Int32 > (int)200) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Int32, must be a value less than or equal to 200.", new [] { "Int32" }); - } - - // Int32 (int) minimum - if (this.Int32 < (int)20) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Int32, must be a value greater than or equal to 20.", new [] { "Int32" }); - } - - // Float (float) maximum - if (this.Float > (float)987.6) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Float, must be a value less than or equal to 987.6.", new [] { "Float" }); - } - - // Float (float) minimum - if (this.Float < (float)54.3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Float, must be a value greater than or equal to 54.3.", new [] { "Float" }); - } - - // Double (double) maximum - if (this.Double > (double)123.4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Double, must be a value less than or equal to 123.4.", new [] { "Double" }); - } - - // Double (double) minimum - if (this.Double < (double)67.8) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Double, must be a value greater than or equal to 67.8.", new [] { "Double" }); - } - - // String (string) pattern - Regex regexString = new Regex(@"[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); - if (false == regexString.Match(this.String).Success) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for String, must match a pattern of " + regexString, new [] { "String" }); - } - // PatternWithDigits (string) pattern Regex regexPatternWithDigits = new Regex(@"^\\d{10}$", RegexOptions.CultureInvariant); if (false == regexPatternWithDigits.Match(this.PatternWithDigits).Success) @@ -395,8 +349,162 @@ namespace Org.OpenAPITools.Model yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PatternWithDigitsAndDelimiter, must match a pattern of " + regexPatternWithDigitsAndDelimiter, new [] { "PatternWithDigitsAndDelimiter" }); } + // StringProperty (string) pattern + Regex regexStringProperty = new Regex(@"[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); + if (false == regexStringProperty.Match(this.StringProperty).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StringProperty, must match a pattern of " + regexStringProperty, new [] { "StringProperty" }); + } + yield break; } } + /// + /// A Json converter for type FormatTest + /// + public class FormatTestJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override FormatTest Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + System.IO.Stream binary = default; + byte[] byteProperty = default; + DateTime date = default; + DateTime dateTime = default; + decimal decimalProperty = default; + double doubleProperty = default; + float floatProperty = default; + int int32 = default; + long int64 = default; + int integer = default; + decimal number = default; + string password = default; + string patternWithDigits = default; + string patternWithDigitsAndDelimiter = default; + string stringProperty = default; + Guid uuid = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "binary": + binary = JsonSerializer.Deserialize(ref reader, options); + break; + case "byte": + byteProperty = JsonSerializer.Deserialize(ref reader, options); + break; + case "date": + date = JsonSerializer.Deserialize(ref reader, options); + break; + case "dateTime": + dateTime = JsonSerializer.Deserialize(ref reader, options); + break; + case "decimal": + decimalProperty = JsonSerializer.Deserialize(ref reader, options); + break; + case "double": + doubleProperty = reader.GetDouble(); + break; + case "float": + floatProperty = (float)reader.GetDouble(); + break; + case "int32": + int32 = reader.GetInt32(); + break; + case "int64": + int64 = reader.GetInt64(); + break; + case "integer": + integer = reader.GetInt32(); + break; + case "number": + number = reader.GetInt32(); + break; + case "password": + password = reader.GetString(); + break; + case "pattern_with_digits": + patternWithDigits = reader.GetString(); + break; + case "pattern_with_digits_and_delimiter": + patternWithDigitsAndDelimiter = reader.GetString(); + break; + case "string": + stringProperty = reader.GetString(); + break; + case "uuid": + uuid = reader.GetGuid(); + break; + default: + break; + } + } + } + + return new FormatTest(binary, byteProperty, date, dateTime, decimalProperty, doubleProperty, floatProperty, int32, int64, integer, number, password, patternWithDigits, patternWithDigitsAndDelimiter, stringProperty, uuid); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, FormatTest formatTest, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WritePropertyName("binary"); + JsonSerializer.Serialize(writer, formatTest.Binary, options); + writer.WritePropertyName("byte"); + JsonSerializer.Serialize(writer, formatTest.ByteProperty, options); + writer.WritePropertyName("date"); + JsonSerializer.Serialize(writer, formatTest.Date, options); + writer.WritePropertyName("dateTime"); + JsonSerializer.Serialize(writer, formatTest.DateTime, options); + writer.WritePropertyName("decimal"); + JsonSerializer.Serialize(writer, formatTest.DecimalProperty, options); + writer.WriteNumber("double", (int)formatTest.DoubleProperty); + writer.WriteNumber("float", (int)formatTest.FloatProperty); + writer.WriteNumber("int32", (int)formatTest.Int32); + writer.WriteNumber("int64", (int)formatTest.Int64); + writer.WriteNumber("integer", (int)formatTest.Integer); + writer.WriteNumber("number", (int)formatTest.Number); + writer.WriteString("password", formatTest.Password); + writer.WriteString("pattern_with_digits", formatTest.PatternWithDigits); + writer.WriteString("pattern_with_digits_and_delimiter", formatTest.PatternWithDigitsAndDelimiter); + writer.WriteString("string", formatTest.StringProperty); + writer.WriteString("uuid", formatTest.Uuid); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Fruit.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Fruit.cs index 4e173ba6d5..e3bad64b28 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Fruit.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Fruit.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,15 +28,25 @@ namespace Org.OpenAPITools.Model /// /// Fruit /// - public partial class Fruit : IEquatable, IValidatableObject + public partial class Fruit : IValidatableObject { /// /// Initializes a new instance of the class. /// /// /// color - public Fruit(Apple? apple, string? color = default) + [JsonConstructor] + public Fruit(Apple? apple, string color) { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (color == null) + throw new ArgumentNullException(nameof(Color)); + + #pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + Apple = apple; Color = color; } @@ -47,8 +56,18 @@ namespace Org.OpenAPITools.Model /// /// /// color - public Fruit(Banana banana, string? color = default) + [JsonConstructor] + public Fruit(Banana banana, string color) { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (color == null) + throw new ArgumentNullException(nameof(Color)); + + #pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + Banana = banana; Color = color; } @@ -61,13 +80,13 @@ namespace Org.OpenAPITools.Model /// /// Gets or Sets Banana /// - public Banana Banana { get; set; } + public Banana? Banana { get; set; } /// /// Gets or Sets Color /// [JsonPropertyName("color")] - public string? Color { get; set; } + public string Color { get; set; } /// /// Returns the string presentation of the object @@ -81,44 +100,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Fruit).AreEqual; - } - - /// - /// Returns true if Fruit instances are equal - /// - /// Instance of Fruit to be compared - /// Boolean - public bool Equals(Fruit? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Color != null) - { - hashCode = (hashCode * 59) + this.Color.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -135,13 +116,6 @@ namespace Org.OpenAPITools.Model /// public class FruitJsonConverter : JsonConverter { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof(Fruit).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -154,23 +128,28 @@ namespace Org.OpenAPITools.Model { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); + JsonTokenType startingTokenType = reader.TokenType; + Utf8JsonReader appleReader = reader; bool appleDeserialized = Client.ClientUtils.TryDeserialize(ref appleReader, options, out Apple? apple); Utf8JsonReader bananaReader = reader; bool bananaDeserialized = Client.ClientUtils.TryDeserialize(ref bananaReader, options, out Banana? banana); - string? color = default; + string color = default; while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string? propertyName = reader.GetString(); reader.Read(); @@ -180,6 +159,8 @@ namespace Org.OpenAPITools.Model case "color": color = reader.GetString(); break; + default: + break; } } } @@ -200,6 +181,13 @@ namespace Org.OpenAPITools.Model /// /// /// - public override void Write(Utf8JsonWriter writer, Fruit fruit, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, Fruit fruit, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("color", fruit.Color); + + writer.WriteEndObject(); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/FruitReq.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/FruitReq.cs index 98f30ed1e7..5086fba218 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/FruitReq.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/FruitReq.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,13 +28,14 @@ namespace Org.OpenAPITools.Model /// /// FruitReq /// - public partial class FruitReq : IEquatable, IValidatableObject + public partial class FruitReq : IValidatableObject { /// /// Initializes a new instance of the class. /// /// - public FruitReq(AppleReq appleReq) + [JsonConstructor] + internal FruitReq(AppleReq appleReq) { AppleReq = appleReq; } @@ -44,7 +44,8 @@ namespace Org.OpenAPITools.Model /// Initializes a new instance of the class. /// /// - public FruitReq(BananaReq bananaReq) + [JsonConstructor] + internal FruitReq(BananaReq bananaReq) { BananaReq = bananaReq; } @@ -52,12 +53,12 @@ namespace Org.OpenAPITools.Model /// /// Gets or Sets AppleReq /// - public AppleReq AppleReq { get; set; } + public AppleReq? AppleReq { get; set; } /// /// Gets or Sets BananaReq /// - public BananaReq BananaReq { get; set; } + public BananaReq? BananaReq { get; set; } /// /// Returns the string presentation of the object @@ -70,40 +71,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as FruitReq).AreEqual; - } - - /// - /// Returns true if FruitReq instances are equal - /// - /// Instance of FruitReq to be compared - /// Boolean - public bool Equals(FruitReq? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -120,13 +87,6 @@ namespace Org.OpenAPITools.Model /// public class FruitReqJsonConverter : JsonConverter { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof(FruitReq).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -139,9 +99,11 @@ namespace Org.OpenAPITools.Model { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); + JsonTokenType startingTokenType = reader.TokenType; + Utf8JsonReader appleReqReader = reader; bool appleReqDeserialized = Client.ClientUtils.TryDeserialize(ref appleReqReader, options, out AppleReq? appleReq); @@ -151,16 +113,21 @@ namespace Org.OpenAPITools.Model while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string? propertyName = reader.GetString(); reader.Read(); switch (propertyName) { + default: + break; } } } @@ -181,6 +148,12 @@ namespace Org.OpenAPITools.Model /// /// /// - public override void Write(Utf8JsonWriter writer, FruitReq fruitReq, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, FruitReq fruitReq, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + + writer.WriteEndObject(); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/GmFruit.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/GmFruit.cs index bdb883115d..94525cb6c9 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/GmFruit.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/GmFruit.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,7 +28,7 @@ namespace Org.OpenAPITools.Model /// /// GmFruit /// - public partial class GmFruit : IEquatable, IValidatableObject + public partial class GmFruit : IValidatableObject { /// /// Initializes a new instance of the class. @@ -37,8 +36,18 @@ namespace Org.OpenAPITools.Model /// /// /// color - public GmFruit(Apple? apple, Banana banana, string? color = default) + [JsonConstructor] + public GmFruit(Apple? apple, Banana banana, string color) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (color == null) + throw new ArgumentNullException("color is a required property for GmFruit and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + Apple = Apple; Banana = Banana; Color = color; @@ -52,13 +61,13 @@ namespace Org.OpenAPITools.Model /// /// Gets or Sets Banana /// - public Banana Banana { get; set; } + public Banana? Banana { get; set; } /// /// Gets or Sets Color /// [JsonPropertyName("color")] - public string? Color { get; set; } + public string Color { get; set; } /// /// Returns the string presentation of the object @@ -72,44 +81,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as GmFruit).AreEqual; - } - - /// - /// Returns true if GmFruit instances are equal - /// - /// Instance of GmFruit to be compared - /// Boolean - public bool Equals(GmFruit? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Color != null) - { - hashCode = (hashCode * 59) + this.Color.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -126,13 +97,6 @@ namespace Org.OpenAPITools.Model /// public class GmFruitJsonConverter : JsonConverter { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof(GmFruit).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -145,23 +109,28 @@ namespace Org.OpenAPITools.Model { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); + JsonTokenType startingTokenType = reader.TokenType; + Utf8JsonReader appleReader = reader; bool appleDeserialized = Client.ClientUtils.TryDeserialize(ref appleReader, options, out Apple? apple); Utf8JsonReader bananaReader = reader; bool bananaDeserialized = Client.ClientUtils.TryDeserialize(ref bananaReader, options, out Banana? banana); - string? color = default; + string color = default; while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string? propertyName = reader.GetString(); reader.Read(); @@ -171,6 +140,8 @@ namespace Org.OpenAPITools.Model case "color": color = reader.GetString(); break; + default: + break; } } } @@ -185,6 +156,13 @@ namespace Org.OpenAPITools.Model /// /// /// - public override void Write(Utf8JsonWriter writer, GmFruit gmFruit, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, GmFruit gmFruit, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("color", gmFruit.Color); + + writer.WriteEndObject(); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/GrandparentAnimal.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/GrandparentAnimal.cs index ba90bb4687..28b104fb7c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/GrandparentAnimal.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/GrandparentAnimal.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,17 +28,24 @@ namespace Org.OpenAPITools.Model /// /// GrandparentAnimal /// - public partial class GrandparentAnimal : IEquatable, IValidatableObject + public partial class GrandparentAnimal : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// petType (required) + /// petType + [JsonConstructor] public GrandparentAnimal(string petType) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + if (petType == null) throw new ArgumentNullException("petType is a required property for GrandparentAnimal and cannot be null."); +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + PetType = petType; } @@ -53,7 +59,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -68,48 +74,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as GrandparentAnimal).AreEqual; - } - - /// - /// Returns true if GrandparentAnimal instances are equal - /// - /// Instance of GrandparentAnimal to be compared - /// Boolean - public bool Equals(GrandparentAnimal? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.PetType != null) - { - hashCode = (hashCode * 59) + this.PetType.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -131,4 +95,71 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type GrandparentAnimal + /// + public class GrandparentAnimalJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override GrandparentAnimal Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string petType = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "pet_type": + petType = reader.GetString(); + break; + default: + break; + } + } + } + + return new GrandparentAnimal(petType); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, GrandparentAnimal grandparentAnimal, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("pet_type", grandparentAnimal.PetType); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs index ae81256f82..9e549290fe 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,15 +28,28 @@ namespace Org.OpenAPITools.Model /// /// HasOnlyReadOnly /// - public partial class HasOnlyReadOnly : IEquatable, IValidatableObject + public partial class HasOnlyReadOnly : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// /// bar /// foo - public HasOnlyReadOnly(string? bar = default, string? foo = default) + [JsonConstructor] + internal HasOnlyReadOnly(string bar, string foo) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (bar == null) + throw new ArgumentNullException("bar is a required property for HasOnlyReadOnly and cannot be null."); + + if (foo == null) + throw new ArgumentNullException("foo is a required property for HasOnlyReadOnly and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + Bar = bar; Foo = foo; } @@ -46,19 +58,19 @@ namespace Org.OpenAPITools.Model /// Gets or Sets Bar /// [JsonPropertyName("bar")] - public string? Bar { get; private set; } + public string Bar { get; } /// /// Gets or Sets Foo /// [JsonPropertyName("foo")] - public string? Foo { get; private set; } + public string Foo { get; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -104,22 +116,13 @@ namespace Org.OpenAPITools.Model unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Bar != null) - { - hashCode = (hashCode * 59) + this.Bar.GetHashCode(); - } - if (this.Foo != null) - { - hashCode = (hashCode * 59) + this.Foo.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } + hashCode = (hashCode * 59) + Bar.GetHashCode(); + hashCode = (hashCode * 59) + Foo.GetHashCode(); + hashCode = (hashCode * 59) + AdditionalProperties.GetHashCode(); + return hashCode; } } - /// /// To validate all properties of the instance /// @@ -131,4 +134,76 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type HasOnlyReadOnly + /// + public class HasOnlyReadOnlyJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override HasOnlyReadOnly Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string bar = default; + string foo = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "bar": + bar = reader.GetString(); + break; + case "foo": + foo = reader.GetString(); + break; + default: + break; + } + } + } + + return new HasOnlyReadOnly(bar, foo); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, HasOnlyReadOnly hasOnlyReadOnly, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("bar", hasOnlyReadOnly.Bar); + writer.WriteString("foo", hasOnlyReadOnly.Foo); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/HealthCheckResult.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/HealthCheckResult.cs index 34a2909e1c..70ea7fe99e 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/HealthCheckResult.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/HealthCheckResult.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,12 +28,13 @@ namespace Org.OpenAPITools.Model /// /// Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. /// - public partial class HealthCheckResult : IEquatable, IValidatableObject + public partial class HealthCheckResult : IValidatableObject { /// /// Initializes a new instance of the class. /// /// nullableMessage + [JsonConstructor] public HealthCheckResult(string? nullableMessage = default) { NullableMessage = nullableMessage; @@ -50,7 +50,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -65,48 +65,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as HealthCheckResult).AreEqual; - } - - /// - /// Returns true if HealthCheckResult instances are equal - /// - /// Instance of HealthCheckResult to be compared - /// Boolean - public bool Equals(HealthCheckResult? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.NullableMessage != null) - { - hashCode = (hashCode * 59) + this.NullableMessage.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -118,4 +76,71 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type HealthCheckResult + /// + public class HealthCheckResultJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override HealthCheckResult Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string nullableMessage = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "NullableMessage": + nullableMessage = reader.GetString(); + break; + default: + break; + } + } + } + + return new HealthCheckResult(nullableMessage); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, HealthCheckResult healthCheckResult, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("NullableMessage", healthCheckResult.NullableMessage); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs index e207d964b0..00900bdaa5 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,14 +28,15 @@ namespace Org.OpenAPITools.Model /// /// IsoscelesTriangle /// - public partial class IsoscelesTriangle : IEquatable, IValidatableObject + public partial class IsoscelesTriangle : IValidatableObject { /// /// Initializes a new instance of the class. /// /// /// - public IsoscelesTriangle(ShapeInterface shapeInterface, TriangleInterface triangleInterface) + [JsonConstructor] + internal IsoscelesTriangle(ShapeInterface shapeInterface, TriangleInterface triangleInterface) { ShapeInterface = shapeInterface; TriangleInterface = triangleInterface; @@ -63,40 +63,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as IsoscelesTriangle).AreEqual; - } - - /// - /// Returns true if IsoscelesTriangle instances are equal - /// - /// Instance of IsoscelesTriangle to be compared - /// Boolean - public bool Equals(IsoscelesTriangle? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -113,13 +79,6 @@ namespace Org.OpenAPITools.Model /// public class IsoscelesTriangleJsonConverter : JsonConverter { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof(IsoscelesTriangle).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -132,28 +91,35 @@ namespace Org.OpenAPITools.Model { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); + JsonTokenType startingTokenType = reader.TokenType; + Utf8JsonReader shapeInterfaceReader = reader; - bool shapeInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref shapeInterfaceReader, options, out ShapeInterface? shapeInterface); + bool shapeInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref reader, options, out ShapeInterface? shapeInterface); Utf8JsonReader triangleInterfaceReader = reader; - bool triangleInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref triangleInterfaceReader, options, out TriangleInterface? triangleInterface); + bool triangleInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref reader, options, out TriangleInterface? triangleInterface); while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string? propertyName = reader.GetString(); reader.Read(); switch (propertyName) { + default: + break; } } } @@ -168,6 +134,12 @@ namespace Org.OpenAPITools.Model /// /// /// - public override void Write(Utf8JsonWriter writer, IsoscelesTriangle isoscelesTriangle, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, IsoscelesTriangle isoscelesTriangle, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + + writer.WriteEndObject(); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/List.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/List.cs index af537950c8..67fb97c53a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/List.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/List.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,14 +28,24 @@ namespace Org.OpenAPITools.Model /// /// List /// - public partial class List : IEquatable, IValidatableObject + public partial class List : IValidatableObject { /// /// Initializes a new instance of the class. /// /// _123list - public List(string? _123list = default) + [JsonConstructor] + public List(string _123list) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (_123list == null) + throw new ArgumentNullException("_123list is a required property for List and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + _123List = _123list; } @@ -44,13 +53,13 @@ namespace Org.OpenAPITools.Model /// Gets or Sets _123List /// [JsonPropertyName("123-list")] - public string? _123List { get; set; } + public string _123List { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -65,48 +74,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as List).AreEqual; - } - - /// - /// Returns true if List instances are equal - /// - /// Instance of List to be compared - /// Boolean - public bool Equals(List? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this._123List != null) - { - hashCode = (hashCode * 59) + this._123List.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -118,4 +85,71 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type List + /// + public class ListJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override List Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string _123list = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "123-list": + _123list = reader.GetString(); + break; + default: + break; + } + } + } + + return new List(_123list); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, List list, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("123-list", list._123List); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Mammal.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Mammal.cs index f7ca7b5b60..63e92dcb24 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Mammal.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Mammal.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,13 +28,14 @@ namespace Org.OpenAPITools.Model /// /// Mammal /// - public partial class Mammal : IEquatable, IValidatableObject + public partial class Mammal : IValidatableObject { /// /// Initializes a new instance of the class. /// /// - public Mammal(Whale whale) + [JsonConstructor] + internal Mammal(Whale whale) { Whale = whale; } @@ -44,7 +44,8 @@ namespace Org.OpenAPITools.Model /// Initializes a new instance of the class. /// /// - public Mammal(Zebra zebra) + [JsonConstructor] + internal Mammal(Zebra zebra) { Zebra = zebra; } @@ -53,7 +54,8 @@ namespace Org.OpenAPITools.Model /// Initializes a new instance of the class. /// /// - public Mammal(Pig pig) + [JsonConstructor] + internal Mammal(Pig pig) { Pig = pig; } @@ -61,23 +63,23 @@ namespace Org.OpenAPITools.Model /// /// Gets or Sets Whale /// - public Whale Whale { get; set; } + public Whale? Whale { get; set; } /// /// Gets or Sets Zebra /// - public Zebra Zebra { get; set; } + public Zebra? Zebra { get; set; } /// /// Gets or Sets Pig /// - public Pig Pig { get; set; } + public Pig? Pig { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -91,44 +93,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Mammal).AreEqual; - } - - /// - /// Returns true if Mammal instances are equal - /// - /// Instance of Mammal to be compared - /// Boolean - public bool Equals(Mammal? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -155,13 +119,6 @@ namespace Org.OpenAPITools.Model /// public class MammalJsonConverter : JsonConverter { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof(Mammal).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -174,9 +131,11 @@ namespace Org.OpenAPITools.Model { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); + JsonTokenType startingTokenType = reader.TokenType; + Utf8JsonReader whaleReader = reader; bool whaleDeserialized = Client.ClientUtils.TryDeserialize(ref whaleReader, options, out Whale? whale); @@ -189,16 +148,21 @@ namespace Org.OpenAPITools.Model while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string? propertyName = reader.GetString(); reader.Read(); switch (propertyName) { + default: + break; } } } @@ -222,6 +186,12 @@ namespace Org.OpenAPITools.Model /// /// /// - public override void Write(Utf8JsonWriter writer, Mammal mammal, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, Mammal mammal, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + + writer.WriteEndObject(); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/MapTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/MapTest.cs index 64a3380a3d..750572e009 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/MapTest.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/MapTest.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,21 +28,40 @@ namespace Org.OpenAPITools.Model /// /// MapTest /// - public partial class MapTest : IEquatable, IValidatableObject + public partial class MapTest : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// mapMapOfString - /// mapOfEnumString /// directMap /// indirectMap - public MapTest(Dictionary>? mapMapOfString = default, Dictionary? mapOfEnumString = default, Dictionary? directMap = default, Dictionary? indirectMap = default) + /// mapMapOfString + /// mapOfEnumString + [JsonConstructor] + public MapTest(Dictionary directMap, Dictionary indirectMap, Dictionary> mapMapOfString, Dictionary mapOfEnumString) { - MapMapOfString = mapMapOfString; - MapOfEnumString = mapOfEnumString; +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (mapMapOfString == null) + throw new ArgumentNullException("mapMapOfString is a required property for MapTest and cannot be null."); + + if (mapOfEnumString == null) + throw new ArgumentNullException("mapOfEnumString is a required property for MapTest and cannot be null."); + + if (directMap == null) + throw new ArgumentNullException("directMap is a required property for MapTest and cannot be null."); + + if (indirectMap == null) + throw new ArgumentNullException("indirectMap is a required property for MapTest and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + DirectMap = directMap; IndirectMap = indirectMap; + MapMapOfString = mapMapOfString; + MapOfEnumString = mapOfEnumString; } /// @@ -54,46 +72,77 @@ namespace Org.OpenAPITools.Model /// /// Enum UPPER for value: UPPER /// - [EnumMember(Value = "UPPER")] UPPER = 1, /// /// Enum Lower for value: lower /// - [EnumMember(Value = "lower")] Lower = 2 } /// - /// Gets or Sets MapMapOfString + /// Returns a InnerEnum /// - [JsonPropertyName("map_map_of_string")] - public Dictionary>? MapMapOfString { get; set; } + /// + /// + public static InnerEnum InnerEnumFromString(string value) + { + if (value == "UPPER") + return InnerEnum.UPPER; + + if (value == "lower") + return InnerEnum.Lower; + + throw new NotImplementedException($"Could not convert value to type InnerEnum: '{value}'"); + } /// - /// Gets or Sets MapOfEnumString + /// Returns equivalent json value /// - [JsonPropertyName("map_of_enum_string")] - public Dictionary? MapOfEnumString { get; set; } + /// + /// + /// + public static string InnerEnumToJsonValue(InnerEnum value) + { + if (value == InnerEnum.UPPER) + return "UPPER"; + + if (value == InnerEnum.Lower) + return "lower"; + + throw new NotImplementedException($"Value could not be handled: '{value}'"); + } /// /// Gets or Sets DirectMap /// [JsonPropertyName("direct_map")] - public Dictionary? DirectMap { get; set; } + public Dictionary DirectMap { get; set; } /// /// Gets or Sets IndirectMap /// [JsonPropertyName("indirect_map")] - public Dictionary? IndirectMap { get; set; } + public Dictionary IndirectMap { get; set; } + + /// + /// Gets or Sets MapMapOfString + /// + [JsonPropertyName("map_map_of_string")] + public Dictionary> MapMapOfString { get; set; } + + /// + /// Gets or Sets MapOfEnumString + /// + [JsonPropertyName("map_of_enum_string")] + public Dictionary MapOfEnumString { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -103,68 +152,14 @@ namespace Org.OpenAPITools.Model { StringBuilder sb = new StringBuilder(); sb.Append("class MapTest {\n"); - sb.Append(" MapMapOfString: ").Append(MapMapOfString).Append("\n"); - sb.Append(" MapOfEnumString: ").Append(MapOfEnumString).Append("\n"); sb.Append(" DirectMap: ").Append(DirectMap).Append("\n"); sb.Append(" IndirectMap: ").Append(IndirectMap).Append("\n"); + sb.Append(" MapMapOfString: ").Append(MapMapOfString).Append("\n"); + sb.Append(" MapOfEnumString: ").Append(MapOfEnumString).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as MapTest).AreEqual; - } - - /// - /// Returns true if MapTest instances are equal - /// - /// Instance of MapTest to be compared - /// Boolean - public bool Equals(MapTest? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.MapMapOfString != null) - { - hashCode = (hashCode * 59) + this.MapMapOfString.GetHashCode(); - } - if (this.MapOfEnumString != null) - { - hashCode = (hashCode * 59) + this.MapOfEnumString.GetHashCode(); - } - if (this.DirectMap != null) - { - hashCode = (hashCode * 59) + this.DirectMap.GetHashCode(); - } - if (this.IndirectMap != null) - { - hashCode = (hashCode * 59) + this.IndirectMap.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -176,4 +171,90 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type MapTest + /// + public class MapTestJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override MapTest Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + Dictionary directMap = default; + Dictionary indirectMap = default; + Dictionary> mapMapOfString = default; + Dictionary mapOfEnumString = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "direct_map": + directMap = JsonSerializer.Deserialize>(ref reader, options); + break; + case "indirect_map": + indirectMap = JsonSerializer.Deserialize>(ref reader, options); + break; + case "map_map_of_string": + mapMapOfString = JsonSerializer.Deserialize>>(ref reader, options); + break; + case "map_of_enum_string": + mapOfEnumString = JsonSerializer.Deserialize>(ref reader, options); + break; + default: + break; + } + } + } + + return new MapTest(directMap, indirectMap, mapMapOfString, mapOfEnumString); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, MapTest mapTest, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WritePropertyName("direct_map"); + JsonSerializer.Serialize(writer, mapTest.DirectMap, options); + writer.WritePropertyName("indirect_map"); + JsonSerializer.Serialize(writer, mapTest.IndirectMap, options); + writer.WritePropertyName("map_map_of_string"); + JsonSerializer.Serialize(writer, mapTest.MapMapOfString, options); + writer.WritePropertyName("map_of_enum_string"); + JsonSerializer.Serialize(writer, mapTest.MapOfEnumString, options); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs index a583c8f393..9086f80866 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,44 +28,60 @@ namespace Org.OpenAPITools.Model /// /// MixedPropertiesAndAdditionalPropertiesClass /// - public partial class MixedPropertiesAndAdditionalPropertiesClass : IEquatable, IValidatableObject + public partial class MixedPropertiesAndAdditionalPropertiesClass : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// uuid /// dateTime /// map - public MixedPropertiesAndAdditionalPropertiesClass(Guid? uuid = default, DateTime? dateTime = default, Dictionary? map = default) + /// uuid + [JsonConstructor] + public MixedPropertiesAndAdditionalPropertiesClass(DateTime dateTime, Dictionary map, Guid uuid) { - Uuid = uuid; +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (uuid == null) + throw new ArgumentNullException("uuid is a required property for MixedPropertiesAndAdditionalPropertiesClass and cannot be null."); + + if (dateTime == null) + throw new ArgumentNullException("dateTime is a required property for MixedPropertiesAndAdditionalPropertiesClass and cannot be null."); + + if (map == null) + throw new ArgumentNullException("map is a required property for MixedPropertiesAndAdditionalPropertiesClass and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + DateTime = dateTime; Map = map; + Uuid = uuid; } - /// - /// Gets or Sets Uuid - /// - [JsonPropertyName("uuid")] - public Guid? Uuid { get; set; } - /// /// Gets or Sets DateTime /// [JsonPropertyName("dateTime")] - public DateTime? DateTime { get; set; } + public DateTime DateTime { get; set; } /// /// Gets or Sets Map /// [JsonPropertyName("map")] - public Dictionary? Map { get; set; } + public Dictionary Map { get; set; } + + /// + /// Gets or Sets Uuid + /// + [JsonPropertyName("uuid")] + public Guid Uuid { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -76,63 +91,13 @@ namespace Org.OpenAPITools.Model { StringBuilder sb = new StringBuilder(); sb.Append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.Append(" Uuid: ").Append(Uuid).Append("\n"); sb.Append(" DateTime: ").Append(DateTime).Append("\n"); sb.Append(" Map: ").Append(Map).Append("\n"); + sb.Append(" Uuid: ").Append(Uuid).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as MixedPropertiesAndAdditionalPropertiesClass).AreEqual; - } - - /// - /// Returns true if MixedPropertiesAndAdditionalPropertiesClass instances are equal - /// - /// Instance of MixedPropertiesAndAdditionalPropertiesClass to be compared - /// Boolean - public bool Equals(MixedPropertiesAndAdditionalPropertiesClass? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Uuid != null) - { - hashCode = (hashCode * 59) + this.Uuid.GetHashCode(); - } - if (this.DateTime != null) - { - hashCode = (hashCode * 59) + this.DateTime.GetHashCode(); - } - if (this.Map != null) - { - hashCode = (hashCode * 59) + this.Map.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -144,4 +109,83 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type MixedPropertiesAndAdditionalPropertiesClass + /// + public class MixedPropertiesAndAdditionalPropertiesClassJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override MixedPropertiesAndAdditionalPropertiesClass Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + DateTime dateTime = default; + Dictionary map = default; + Guid uuid = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "dateTime": + dateTime = JsonSerializer.Deserialize(ref reader, options); + break; + case "map": + map = JsonSerializer.Deserialize>(ref reader, options); + break; + case "uuid": + uuid = reader.GetGuid(); + break; + default: + break; + } + } + } + + return new MixedPropertiesAndAdditionalPropertiesClass(dateTime, map, uuid); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, MixedPropertiesAndAdditionalPropertiesClass mixedPropertiesAndAdditionalPropertiesClass, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WritePropertyName("dateTime"); + JsonSerializer.Serialize(writer, mixedPropertiesAndAdditionalPropertiesClass.DateTime, options); + writer.WritePropertyName("map"); + JsonSerializer.Serialize(writer, mixedPropertiesAndAdditionalPropertiesClass.Map, options); + writer.WriteString("uuid", mixedPropertiesAndAdditionalPropertiesClass.Uuid); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Model200Response.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Model200Response.cs index 318ef8a27a..5ef23bad5f 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Model200Response.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Model200Response.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,36 +28,49 @@ namespace Org.OpenAPITools.Model /// /// Model for testing model name starting with number /// - public partial class Model200Response : IEquatable, IValidatableObject + public partial class Model200Response : IValidatableObject { /// /// Initializes a new instance of the class. /// + /// classProperty /// name - /// _class - public Model200Response(int? name = default, string? _class = default) + [JsonConstructor] + public Model200Response(string classProperty, int name) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (name == null) + throw new ArgumentNullException("name is a required property for Model200Response and cannot be null."); + + if (classProperty == null) + throw new ArgumentNullException("classProperty is a required property for Model200Response and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + ClassProperty = classProperty; Name = name; - Class = _class; } + /// + /// Gets or Sets ClassProperty + /// + [JsonPropertyName("class")] + public string ClassProperty { get; set; } + /// /// Gets or Sets Name /// [JsonPropertyName("name")] - public int? Name { get; set; } - - /// - /// Gets or Sets Class - /// - [JsonPropertyName("class")] - public string? Class { get; set; } + public int Name { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -68,55 +80,12 @@ namespace Org.OpenAPITools.Model { StringBuilder sb = new StringBuilder(); sb.Append("class Model200Response {\n"); + sb.Append(" ClassProperty: ").Append(ClassProperty).Append("\n"); sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Class: ").Append(Class).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Model200Response).AreEqual; - } - - /// - /// Returns true if Model200Response instances are equal - /// - /// Instance of Model200Response to be compared - /// Boolean - public bool Equals(Model200Response? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - if (this.Class != null) - { - hashCode = (hashCode * 59) + this.Class.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -128,4 +97,76 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type Model200Response + /// + public class Model200ResponseJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override Model200Response Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string classProperty = default; + int name = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "class": + classProperty = reader.GetString(); + break; + case "name": + name = reader.GetInt32(); + break; + default: + break; + } + } + } + + return new Model200Response(classProperty, name); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Model200Response model200Response, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("class", model200Response.ClassProperty); + writer.WriteNumber("name", (int)model200Response.Name); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ModelClient.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ModelClient.cs index 8636476119..8dd430bc07 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ModelClient.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ModelClient.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,28 +28,38 @@ namespace Org.OpenAPITools.Model /// /// ModelClient /// - public partial class ModelClient : IEquatable, IValidatableObject + public partial class ModelClient : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// _client - public ModelClient(string? _client = default) + /// clientProperty + [JsonConstructor] + public ModelClient(string clientProperty) { - _Client = _client; +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (clientProperty == null) + throw new ArgumentNullException("clientProperty is a required property for ModelClient and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + _ClientProperty = clientProperty; } /// - /// Gets or Sets _Client + /// Gets or Sets _ClientProperty /// [JsonPropertyName("client")] - public string? _Client { get; set; } + public string _ClientProperty { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -60,53 +69,11 @@ namespace Org.OpenAPITools.Model { StringBuilder sb = new StringBuilder(); sb.Append("class ModelClient {\n"); - sb.Append(" _Client: ").Append(_Client).Append("\n"); + sb.Append(" _ClientProperty: ").Append(_ClientProperty).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as ModelClient).AreEqual; - } - - /// - /// Returns true if ModelClient instances are equal - /// - /// Instance of ModelClient to be compared - /// Boolean - public bool Equals(ModelClient? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this._Client != null) - { - hashCode = (hashCode * 59) + this._Client.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -118,4 +85,71 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type ModelClient + /// + public class ModelClientJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override ModelClient Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string clientProperty = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "client": + clientProperty = reader.GetString(); + break; + default: + break; + } + } + } + + return new ModelClient(clientProperty); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ModelClient modelClient, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("client", modelClient._ClientProperty); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Name.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Name.cs index 3c560228d8..2f0e11921b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Name.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Name.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,23 +28,39 @@ namespace Org.OpenAPITools.Model /// /// Model for testing model name same as property name /// - public partial class Name : IEquatable, IValidatableObject + public partial class Name : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// nameProperty (required) - /// snakeCase + /// nameProperty /// property + /// snakeCase /// _123number - public Name(int nameProperty, int? snakeCase = default, string? property = default, int? _123number = default) + [JsonConstructor] + public Name(int nameProperty, string property, int snakeCase, int _123number) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + if (nameProperty == null) throw new ArgumentNullException("nameProperty is a required property for Name and cannot be null."); + if (snakeCase == null) + throw new ArgumentNullException("snakeCase is a required property for Name and cannot be null."); + + if (property == null) + throw new ArgumentNullException("property is a required property for Name and cannot be null."); + + if (_123number == null) + throw new ArgumentNullException("_123number is a required property for Name and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + NameProperty = nameProperty; - SnakeCase = snakeCase; Property = property; + SnakeCase = snakeCase; _123Number = _123number; } @@ -55,29 +70,29 @@ namespace Org.OpenAPITools.Model [JsonPropertyName("name")] public int NameProperty { get; set; } - /// - /// Gets or Sets SnakeCase - /// - [JsonPropertyName("snake_case")] - public int? SnakeCase { get; private set; } - /// /// Gets or Sets Property /// [JsonPropertyName("property")] - public string? Property { get; set; } + public string Property { get; set; } + + /// + /// Gets or Sets SnakeCase + /// + [JsonPropertyName("snake_case")] + public int SnakeCase { get; } /// /// Gets or Sets _123Number /// [JsonPropertyName("123Number")] - public int? _123Number { get; private set; } + public int _123Number { get; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -88,8 +103,8 @@ namespace Org.OpenAPITools.Model StringBuilder sb = new StringBuilder(); sb.Append("class Name {\n"); sb.Append(" NameProperty: ").Append(NameProperty).Append("\n"); - sb.Append(" SnakeCase: ").Append(SnakeCase).Append("\n"); sb.Append(" Property: ").Append(Property).Append("\n"); + sb.Append(" SnakeCase: ").Append(SnakeCase).Append("\n"); sb.Append(" _123Number: ").Append(_123Number).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); @@ -125,21 +140,13 @@ namespace Org.OpenAPITools.Model unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.NameProperty.GetHashCode(); - hashCode = (hashCode * 59) + this.SnakeCase.GetHashCode(); - if (this.Property != null) - { - hashCode = (hashCode * 59) + this.Property.GetHashCode(); - } - hashCode = (hashCode * 59) + this._123Number.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } + hashCode = (hashCode * 59) + SnakeCase.GetHashCode(); + hashCode = (hashCode * 59) + _123Number.GetHashCode(); + hashCode = (hashCode * 59) + AdditionalProperties.GetHashCode(); + return hashCode; } } - /// /// To validate all properties of the instance /// @@ -151,4 +158,86 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type Name + /// + public class NameJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override Name Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + int nameProperty = default; + string property = default; + int snakeCase = default; + int _123number = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "name": + nameProperty = reader.GetInt32(); + break; + case "property": + property = reader.GetString(); + break; + case "snake_case": + snakeCase = reader.GetInt32(); + break; + case "123Number": + _123number = reader.GetInt32(); + break; + default: + break; + } + } + } + + return new Name(nameProperty, property, snakeCase, _123number); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Name name, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteNumber("name", (int)name.NameProperty); + writer.WriteString("property", name.Property); + writer.WriteNumber("snake_case", (int)name.SnakeCase); + writer.WriteNumber("123Number", (int)name._123Number); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/NullableClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/NullableClass.cs index 8b935f4940..8f79ed04ea 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/NullableClass.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/NullableClass.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,50 +28,75 @@ namespace Org.OpenAPITools.Model /// /// NullableClass /// - public partial class NullableClass : Dictionary, IEquatable, IValidatableObject + public partial class NullableClass : Dictionary, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// integerProp - /// numberProp + /// arrayItemsNullable + /// objectItemsNullable + /// arrayAndItemsNullableProp + /// arrayNullableProp /// booleanProp - /// stringProp /// dateProp /// datetimeProp - /// arrayNullableProp - /// arrayAndItemsNullableProp - /// arrayItemsNullable - /// objectNullableProp + /// integerProp + /// numberProp /// objectAndItemsNullableProp - /// objectItemsNullable - public NullableClass(int? integerProp = default, decimal? numberProp = default, bool? booleanProp = default, string? stringProp = default, DateTime? dateProp = default, DateTime? datetimeProp = default, List? arrayNullableProp = default, List? arrayAndItemsNullableProp = default, List? arrayItemsNullable = default, Dictionary? objectNullableProp = default, Dictionary? objectAndItemsNullableProp = default, Dictionary? objectItemsNullable = default) : base() + /// objectNullableProp + /// stringProp + [JsonConstructor] + public NullableClass(List arrayItemsNullable, Dictionary objectItemsNullable, List? arrayAndItemsNullableProp = default, List? arrayNullableProp = default, bool? booleanProp = default, DateTime? dateProp = default, DateTime? datetimeProp = default, int? integerProp = default, decimal? numberProp = default, Dictionary? objectAndItemsNullableProp = default, Dictionary? objectNullableProp = default, string? stringProp = default) : base() { - IntegerProp = integerProp; - NumberProp = numberProp; +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (arrayItemsNullable == null) + throw new ArgumentNullException("arrayItemsNullable is a required property for NullableClass and cannot be null."); + + if (objectItemsNullable == null) + throw new ArgumentNullException("objectItemsNullable is a required property for NullableClass and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + ArrayItemsNullable = arrayItemsNullable; + ObjectItemsNullable = objectItemsNullable; + ArrayAndItemsNullableProp = arrayAndItemsNullableProp; + ArrayNullableProp = arrayNullableProp; BooleanProp = booleanProp; - StringProp = stringProp; DateProp = dateProp; DatetimeProp = datetimeProp; - ArrayNullableProp = arrayNullableProp; - ArrayAndItemsNullableProp = arrayAndItemsNullableProp; - ArrayItemsNullable = arrayItemsNullable; - ObjectNullableProp = objectNullableProp; + IntegerProp = integerProp; + NumberProp = numberProp; ObjectAndItemsNullableProp = objectAndItemsNullableProp; - ObjectItemsNullable = objectItemsNullable; + ObjectNullableProp = objectNullableProp; + StringProp = stringProp; } /// - /// Gets or Sets IntegerProp + /// Gets or Sets ArrayItemsNullable /// - [JsonPropertyName("integer_prop")] - public int? IntegerProp { get; set; } + [JsonPropertyName("array_items_nullable")] + public List ArrayItemsNullable { get; set; } /// - /// Gets or Sets NumberProp + /// Gets or Sets ObjectItemsNullable /// - [JsonPropertyName("number_prop")] - public decimal? NumberProp { get; set; } + [JsonPropertyName("object_items_nullable")] + public Dictionary ObjectItemsNullable { get; set; } + + /// + /// Gets or Sets ArrayAndItemsNullableProp + /// + [JsonPropertyName("array_and_items_nullable_prop")] + public List? ArrayAndItemsNullableProp { get; set; } + + /// + /// Gets or Sets ArrayNullableProp + /// + [JsonPropertyName("array_nullable_prop")] + public List? ArrayNullableProp { get; set; } /// /// Gets or Sets BooleanProp @@ -80,12 +104,6 @@ namespace Org.OpenAPITools.Model [JsonPropertyName("boolean_prop")] public bool? BooleanProp { get; set; } - /// - /// Gets or Sets StringProp - /// - [JsonPropertyName("string_prop")] - public string? StringProp { get; set; } - /// /// Gets or Sets DateProp /// @@ -99,28 +117,16 @@ namespace Org.OpenAPITools.Model public DateTime? DatetimeProp { get; set; } /// - /// Gets or Sets ArrayNullableProp + /// Gets or Sets IntegerProp /// - [JsonPropertyName("array_nullable_prop")] - public List? ArrayNullableProp { get; set; } + [JsonPropertyName("integer_prop")] + public int? IntegerProp { get; set; } /// - /// Gets or Sets ArrayAndItemsNullableProp + /// Gets or Sets NumberProp /// - [JsonPropertyName("array_and_items_nullable_prop")] - public List? ArrayAndItemsNullableProp { get; set; } - - /// - /// Gets or Sets ArrayItemsNullable - /// - [JsonPropertyName("array_items_nullable")] - public List? ArrayItemsNullable { get; set; } - - /// - /// Gets or Sets ObjectNullableProp - /// - [JsonPropertyName("object_nullable_prop")] - public Dictionary? ObjectNullableProp { get; set; } + [JsonPropertyName("number_prop")] + public decimal? NumberProp { get; set; } /// /// Gets or Sets ObjectAndItemsNullableProp @@ -129,10 +135,16 @@ namespace Org.OpenAPITools.Model public Dictionary? ObjectAndItemsNullableProp { get; set; } /// - /// Gets or Sets ObjectItemsNullable + /// Gets or Sets ObjectNullableProp /// - [JsonPropertyName("object_items_nullable")] - public Dictionary? ObjectItemsNullable { get; set; } + [JsonPropertyName("object_nullable_prop")] + public Dictionary? ObjectNullableProp { get; set; } + + /// + /// Gets or Sets StringProp + /// + [JsonPropertyName("string_prop")] + public string? StringProp { get; set; } /// /// Returns the string presentation of the object @@ -143,103 +155,21 @@ namespace Org.OpenAPITools.Model StringBuilder sb = new StringBuilder(); sb.Append("class NullableClass {\n"); sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" IntegerProp: ").Append(IntegerProp).Append("\n"); - sb.Append(" NumberProp: ").Append(NumberProp).Append("\n"); + sb.Append(" ArrayItemsNullable: ").Append(ArrayItemsNullable).Append("\n"); + sb.Append(" ObjectItemsNullable: ").Append(ObjectItemsNullable).Append("\n"); + sb.Append(" ArrayAndItemsNullableProp: ").Append(ArrayAndItemsNullableProp).Append("\n"); + sb.Append(" ArrayNullableProp: ").Append(ArrayNullableProp).Append("\n"); sb.Append(" BooleanProp: ").Append(BooleanProp).Append("\n"); - sb.Append(" StringProp: ").Append(StringProp).Append("\n"); sb.Append(" DateProp: ").Append(DateProp).Append("\n"); sb.Append(" DatetimeProp: ").Append(DatetimeProp).Append("\n"); - sb.Append(" ArrayNullableProp: ").Append(ArrayNullableProp).Append("\n"); - sb.Append(" ArrayAndItemsNullableProp: ").Append(ArrayAndItemsNullableProp).Append("\n"); - sb.Append(" ArrayItemsNullable: ").Append(ArrayItemsNullable).Append("\n"); - sb.Append(" ObjectNullableProp: ").Append(ObjectNullableProp).Append("\n"); + sb.Append(" IntegerProp: ").Append(IntegerProp).Append("\n"); + sb.Append(" NumberProp: ").Append(NumberProp).Append("\n"); sb.Append(" ObjectAndItemsNullableProp: ").Append(ObjectAndItemsNullableProp).Append("\n"); - sb.Append(" ObjectItemsNullable: ").Append(ObjectItemsNullable).Append("\n"); + sb.Append(" ObjectNullableProp: ").Append(ObjectNullableProp).Append("\n"); + sb.Append(" StringProp: ").Append(StringProp).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as NullableClass).AreEqual; - } - - /// - /// Returns true if NullableClass instances are equal - /// - /// Instance of NullableClass to be compared - /// Boolean - public bool Equals(NullableClass? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.IntegerProp != null) - { - hashCode = (hashCode * 59) + this.IntegerProp.GetHashCode(); - } - if (this.NumberProp != null) - { - hashCode = (hashCode * 59) + this.NumberProp.GetHashCode(); - } - if (this.BooleanProp != null) - { - hashCode = (hashCode * 59) + this.BooleanProp.GetHashCode(); - } - if (this.StringProp != null) - { - hashCode = (hashCode * 59) + this.StringProp.GetHashCode(); - } - if (this.DateProp != null) - { - hashCode = (hashCode * 59) + this.DateProp.GetHashCode(); - } - if (this.DatetimeProp != null) - { - hashCode = (hashCode * 59) + this.DatetimeProp.GetHashCode(); - } - if (this.ArrayNullableProp != null) - { - hashCode = (hashCode * 59) + this.ArrayNullableProp.GetHashCode(); - } - if (this.ArrayAndItemsNullableProp != null) - { - hashCode = (hashCode * 59) + this.ArrayAndItemsNullableProp.GetHashCode(); - } - if (this.ArrayItemsNullable != null) - { - hashCode = (hashCode * 59) + this.ArrayItemsNullable.GetHashCode(); - } - if (this.ObjectNullableProp != null) - { - hashCode = (hashCode * 59) + this.ObjectNullableProp.GetHashCode(); - } - if (this.ObjectAndItemsNullableProp != null) - { - hashCode = (hashCode * 59) + this.ObjectAndItemsNullableProp.GetHashCode(); - } - if (this.ObjectItemsNullable != null) - { - hashCode = (hashCode * 59) + this.ObjectItemsNullable.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -251,4 +181,145 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type NullableClass + /// + public class NullableClassJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override NullableClass Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + List arrayItemsNullable = default; + Dictionary objectItemsNullable = default; + List arrayAndItemsNullableProp = default; + List arrayNullableProp = default; + bool? booleanProp = default; + DateTime? dateProp = default; + DateTime? datetimeProp = default; + int? integerProp = default; + decimal? numberProp = default; + Dictionary objectAndItemsNullableProp = default; + Dictionary objectNullableProp = default; + string stringProp = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "array_items_nullable": + arrayItemsNullable = JsonSerializer.Deserialize>(ref reader, options); + break; + case "object_items_nullable": + objectItemsNullable = JsonSerializer.Deserialize>(ref reader, options); + break; + case "array_and_items_nullable_prop": + arrayAndItemsNullableProp = JsonSerializer.Deserialize>(ref reader, options); + break; + case "array_nullable_prop": + arrayNullableProp = JsonSerializer.Deserialize>(ref reader, options); + break; + case "boolean_prop": + booleanProp = reader.GetBoolean(); + break; + case "date_prop": + dateProp = JsonSerializer.Deserialize(ref reader, options); + break; + case "datetime_prop": + datetimeProp = JsonSerializer.Deserialize(ref reader, options); + break; + case "integer_prop": + if (reader.TokenType != JsonTokenType.Null) + integerProp = reader.GetInt32(); + break; + case "number_prop": + if (reader.TokenType != JsonTokenType.Null) + numberProp = reader.GetInt32(); + break; + case "object_and_items_nullable_prop": + objectAndItemsNullableProp = JsonSerializer.Deserialize>(ref reader, options); + break; + case "object_nullable_prop": + objectNullableProp = JsonSerializer.Deserialize>(ref reader, options); + break; + case "string_prop": + stringProp = reader.GetString(); + break; + default: + break; + } + } + } + + return new NullableClass(arrayItemsNullable, objectItemsNullable, arrayAndItemsNullableProp, arrayNullableProp, booleanProp, dateProp, datetimeProp, integerProp, numberProp, objectAndItemsNullableProp, objectNullableProp, stringProp); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, NullableClass nullableClass, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WritePropertyName("array_items_nullable"); + JsonSerializer.Serialize(writer, nullableClass.ArrayItemsNullable, options); + writer.WritePropertyName("object_items_nullable"); + JsonSerializer.Serialize(writer, nullableClass.ObjectItemsNullable, options); + writer.WritePropertyName("array_and_items_nullable_prop"); + JsonSerializer.Serialize(writer, nullableClass.ArrayAndItemsNullableProp, options); + writer.WritePropertyName("array_nullable_prop"); + JsonSerializer.Serialize(writer, nullableClass.ArrayNullableProp, options); + if (nullableClass.BooleanProp != null) + writer.WriteBoolean("boolean_prop", nullableClass.BooleanProp.Value); + else + writer.WriteNull("boolean_prop"); + writer.WritePropertyName("date_prop"); + JsonSerializer.Serialize(writer, nullableClass.DateProp, options); + writer.WritePropertyName("datetime_prop"); + JsonSerializer.Serialize(writer, nullableClass.DatetimeProp, options); + if (nullableClass.IntegerProp != null) + writer.WriteNumber("integer_prop", (int)nullableClass.IntegerProp.Value); + else + writer.WriteNull("integer_prop"); + if (nullableClass.NumberProp != null) + writer.WriteNumber("number_prop", (int)nullableClass.NumberProp.Value); + else + writer.WriteNull("number_prop"); + writer.WritePropertyName("object_and_items_nullable_prop"); + JsonSerializer.Serialize(writer, nullableClass.ObjectAndItemsNullableProp, options); + writer.WritePropertyName("object_nullable_prop"); + JsonSerializer.Serialize(writer, nullableClass.ObjectNullableProp, options); + writer.WriteString("string_prop", nullableClass.StringProp); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/NullableShape.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/NullableShape.cs index f5eb1bcd8e..59d13aaff1 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/NullableShape.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/NullableShape.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,13 +28,14 @@ namespace Org.OpenAPITools.Model /// /// The value may be a shape or the 'null' value. The 'nullable' attribute was introduced in OAS schema >= 3.0 and has been deprecated in OAS schema >= 3.1. /// - public partial class NullableShape : IEquatable, IValidatableObject + public partial class NullableShape : IValidatableObject { /// /// Initializes a new instance of the class. /// /// - public NullableShape(Triangle triangle) + [JsonConstructor] + internal NullableShape(Triangle triangle) { Triangle = triangle; } @@ -44,7 +44,8 @@ namespace Org.OpenAPITools.Model /// Initializes a new instance of the class. /// /// - public NullableShape(Quadrilateral quadrilateral) + [JsonConstructor] + internal NullableShape(Quadrilateral quadrilateral) { Quadrilateral = quadrilateral; } @@ -52,18 +53,18 @@ namespace Org.OpenAPITools.Model /// /// Gets or Sets Triangle /// - public Triangle Triangle { get; set; } + public Triangle? Triangle { get; set; } /// /// Gets or Sets Quadrilateral /// - public Quadrilateral Quadrilateral { get; set; } + public Quadrilateral? Quadrilateral { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -77,44 +78,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as NullableShape).AreEqual; - } - - /// - /// Returns true if NullableShape instances are equal - /// - /// Instance of NullableShape to be compared - /// Boolean - public bool Equals(NullableShape? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -141,13 +104,6 @@ namespace Org.OpenAPITools.Model /// public class NullableShapeJsonConverter : JsonConverter { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof(NullableShape).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -160,9 +116,11 @@ namespace Org.OpenAPITools.Model { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); + JsonTokenType startingTokenType = reader.TokenType; + Utf8JsonReader triangleReader = reader; bool triangleDeserialized = Client.ClientUtils.TryDeserialize(ref triangleReader, options, out Triangle? triangle); @@ -172,16 +130,21 @@ namespace Org.OpenAPITools.Model while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string? propertyName = reader.GetString(); reader.Read(); switch (propertyName) { + default: + break; } } } @@ -202,6 +165,12 @@ namespace Org.OpenAPITools.Model /// /// /// - public override void Write(Utf8JsonWriter writer, NullableShape nullableShape, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, NullableShape nullableShape, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + + writer.WriteEndObject(); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/NumberOnly.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/NumberOnly.cs index 6f413c0fca..74e98b9b32 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/NumberOnly.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/NumberOnly.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,14 +28,24 @@ namespace Org.OpenAPITools.Model /// /// NumberOnly /// - public partial class NumberOnly : IEquatable, IValidatableObject + public partial class NumberOnly : IValidatableObject { /// /// Initializes a new instance of the class. /// /// justNumber - public NumberOnly(decimal? justNumber = default) + [JsonConstructor] + public NumberOnly(decimal justNumber) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (justNumber == null) + throw new ArgumentNullException("justNumber is a required property for NumberOnly and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + JustNumber = justNumber; } @@ -44,13 +53,13 @@ namespace Org.OpenAPITools.Model /// Gets or Sets JustNumber /// [JsonPropertyName("JustNumber")] - public decimal? JustNumber { get; set; } + public decimal JustNumber { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -65,45 +74,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as NumberOnly).AreEqual; - } - - /// - /// Returns true if NumberOnly instances are equal - /// - /// Instance of NumberOnly to be compared - /// Boolean - public bool Equals(NumberOnly? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.JustNumber.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -115,4 +85,71 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type NumberOnly + /// + public class NumberOnlyJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override NumberOnly Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + decimal justNumber = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "JustNumber": + justNumber = reader.GetInt32(); + break; + default: + break; + } + } + } + + return new NumberOnly(justNumber); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, NumberOnly numberOnly, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteNumber("JustNumber", (int)numberOnly.JustNumber); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs index bcaaa47303..1e365b2c6d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,55 +28,74 @@ namespace Org.OpenAPITools.Model /// /// ObjectWithDeprecatedFields /// - public partial class ObjectWithDeprecatedFields : IEquatable, IValidatableObject + public partial class ObjectWithDeprecatedFields : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// uuid - /// id - /// deprecatedRef /// bars - public ObjectWithDeprecatedFields(string? uuid = default, decimal? id = default, DeprecatedObject? deprecatedRef = default, List? bars = default) + /// deprecatedRef + /// id + /// uuid + [JsonConstructor] + public ObjectWithDeprecatedFields(List bars, DeprecatedObject deprecatedRef, decimal id, string uuid) { - Uuid = uuid; - Id = id; - DeprecatedRef = deprecatedRef; +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (uuid == null) + throw new ArgumentNullException("uuid is a required property for ObjectWithDeprecatedFields and cannot be null."); + + if (id == null) + throw new ArgumentNullException("id is a required property for ObjectWithDeprecatedFields and cannot be null."); + + if (deprecatedRef == null) + throw new ArgumentNullException("deprecatedRef is a required property for ObjectWithDeprecatedFields and cannot be null."); + + if (bars == null) + throw new ArgumentNullException("bars is a required property for ObjectWithDeprecatedFields and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + Bars = bars; + DeprecatedRef = deprecatedRef; + Id = id; + Uuid = uuid; } - /// - /// Gets or Sets Uuid - /// - [JsonPropertyName("uuid")] - public string? Uuid { get; set; } - - /// - /// Gets or Sets Id - /// - [JsonPropertyName("id")] - [Obsolete] - public decimal? Id { get; set; } - - /// - /// Gets or Sets DeprecatedRef - /// - [JsonPropertyName("deprecatedRef")] - [Obsolete] - public DeprecatedObject? DeprecatedRef { get; set; } - /// /// Gets or Sets Bars /// [JsonPropertyName("bars")] [Obsolete] - public List? Bars { get; set; } + public List Bars { get; set; } + + /// + /// Gets or Sets DeprecatedRef + /// + [JsonPropertyName("deprecatedRef")] + [Obsolete] + public DeprecatedObject DeprecatedRef { get; set; } + + /// + /// Gets or Sets Id + /// + [JsonPropertyName("id")] + [Obsolete] + public decimal Id { get; set; } + + /// + /// Gets or Sets Uuid + /// + [JsonPropertyName("uuid")] + public string Uuid { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -87,65 +105,14 @@ namespace Org.OpenAPITools.Model { StringBuilder sb = new StringBuilder(); sb.Append("class ObjectWithDeprecatedFields {\n"); - sb.Append(" Uuid: ").Append(Uuid).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" DeprecatedRef: ").Append(DeprecatedRef).Append("\n"); sb.Append(" Bars: ").Append(Bars).Append("\n"); + sb.Append(" DeprecatedRef: ").Append(DeprecatedRef).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Uuid: ").Append(Uuid).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as ObjectWithDeprecatedFields).AreEqual; - } - - /// - /// Returns true if ObjectWithDeprecatedFields instances are equal - /// - /// Instance of ObjectWithDeprecatedFields to be compared - /// Boolean - public bool Equals(ObjectWithDeprecatedFields? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Uuid != null) - { - hashCode = (hashCode * 59) + this.Uuid.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - if (this.DeprecatedRef != null) - { - hashCode = (hashCode * 59) + this.DeprecatedRef.GetHashCode(); - } - if (this.Bars != null) - { - hashCode = (hashCode * 59) + this.Bars.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -157,4 +124,88 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type ObjectWithDeprecatedFields + /// + public class ObjectWithDeprecatedFieldsJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override ObjectWithDeprecatedFields Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + List bars = default; + DeprecatedObject deprecatedRef = default; + decimal id = default; + string uuid = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "bars": + bars = JsonSerializer.Deserialize>(ref reader, options); + break; + case "deprecatedRef": + deprecatedRef = JsonSerializer.Deserialize(ref reader, options); + break; + case "id": + id = reader.GetInt32(); + break; + case "uuid": + uuid = reader.GetString(); + break; + default: + break; + } + } + } + + return new ObjectWithDeprecatedFields(bars, deprecatedRef, id, uuid); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ObjectWithDeprecatedFields objectWithDeprecatedFields, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WritePropertyName("bars"); + JsonSerializer.Serialize(writer, objectWithDeprecatedFields.Bars, options); + writer.WritePropertyName("deprecatedRef"); + JsonSerializer.Serialize(writer, objectWithDeprecatedFields.DeprecatedRef, options); + writer.WriteNumber("id", (int)objectWithDeprecatedFields.Id); + writer.WriteString("uuid", objectWithDeprecatedFields.Uuid); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Order.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Order.cs index 14f4d8e4b8..9d1751019b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Order.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Order.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,7 +28,7 @@ namespace Org.OpenAPITools.Model /// /// Order /// - public partial class Order : IEquatable, IValidatableObject + public partial class Order : IValidatableObject { /// /// Initializes a new instance of the class. @@ -40,8 +39,33 @@ namespace Org.OpenAPITools.Model /// shipDate /// Order Status /// complete (default to false) - public Order(long? id = default, long? petId = default, int? quantity = default, DateTime? shipDate = default, StatusEnum? status = default, bool? complete = false) + [JsonConstructor] + public Order(long id, long petId, int quantity, DateTime shipDate, StatusEnum status, bool complete = false) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (id == null) + throw new ArgumentNullException("id is a required property for Order and cannot be null."); + + if (petId == null) + throw new ArgumentNullException("petId is a required property for Order and cannot be null."); + + if (quantity == null) + throw new ArgumentNullException("quantity is a required property for Order and cannot be null."); + + if (shipDate == null) + throw new ArgumentNullException("shipDate is a required property for Order and cannot be null."); + + if (status == null) + throw new ArgumentNullException("status is a required property for Order and cannot be null."); + + if (complete == null) + throw new ArgumentNullException("complete is a required property for Order and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + Id = id; PetId = petId; Quantity = quantity; @@ -59,65 +83,101 @@ namespace Org.OpenAPITools.Model /// /// Enum Placed for value: placed /// - [EnumMember(Value = "placed")] Placed = 1, /// /// Enum Approved for value: approved /// - [EnumMember(Value = "approved")] Approved = 2, /// /// Enum Delivered for value: delivered /// - [EnumMember(Value = "delivered")] Delivered = 3 } + /// + /// Returns a StatusEnum + /// + /// + /// + public static StatusEnum StatusEnumFromString(string value) + { + if (value == "placed") + return StatusEnum.Placed; + + if (value == "approved") + return StatusEnum.Approved; + + if (value == "delivered") + return StatusEnum.Delivered; + + throw new NotImplementedException($"Could not convert value to type StatusEnum: '{value}'"); + } + + /// + /// Returns equivalent json value + /// + /// + /// + /// + public static string StatusEnumToJsonValue(StatusEnum value) + { + if (value == StatusEnum.Placed) + return "placed"; + + if (value == StatusEnum.Approved) + return "approved"; + + if (value == StatusEnum.Delivered) + return "delivered"; + + throw new NotImplementedException($"Value could not be handled: '{value}'"); + } + /// /// Order Status /// /// Order Status [JsonPropertyName("status")] - public StatusEnum? Status { get; set; } + public StatusEnum Status { get; set; } /// /// Gets or Sets Id /// [JsonPropertyName("id")] - public long? Id { get; set; } + public long Id { get; set; } /// /// Gets or Sets PetId /// [JsonPropertyName("petId")] - public long? PetId { get; set; } + public long PetId { get; set; } /// /// Gets or Sets Quantity /// [JsonPropertyName("quantity")] - public int? Quantity { get; set; } + public int Quantity { get; set; } /// /// Gets or Sets ShipDate /// [JsonPropertyName("shipDate")] - public DateTime? ShipDate { get; set; } + public DateTime ShipDate { get; set; } /// /// Gets or Sets Complete /// [JsonPropertyName("complete")] - public bool? Complete { get; set; } + public bool Complete { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -137,53 +197,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Order).AreEqual; - } - - /// - /// Returns true if Order instances are equal - /// - /// Instance of Order to be compared - /// Boolean - public bool Equals(Order? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - hashCode = (hashCode * 59) + this.PetId.GetHashCode(); - hashCode = (hashCode * 59) + this.Quantity.GetHashCode(); - if (this.ShipDate != null) - { - hashCode = (hashCode * 59) + this.ShipDate.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - hashCode = (hashCode * 59) + this.Complete.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -195,4 +208,102 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type Order + /// + public class OrderJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override Order Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + long id = default; + long petId = default; + int quantity = default; + DateTime shipDate = default; + Order.StatusEnum status = default; + bool complete = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "id": + id = reader.GetInt64(); + break; + case "petId": + petId = reader.GetInt64(); + break; + case "quantity": + quantity = reader.GetInt32(); + break; + case "shipDate": + shipDate = JsonSerializer.Deserialize(ref reader, options); + break; + case "status": + string statusRawValue = reader.GetString(); + status = Order.StatusEnumFromString(statusRawValue); + break; + case "complete": + complete = reader.GetBoolean(); + break; + default: + break; + } + } + } + + return new Order(id, petId, quantity, shipDate, status, complete); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Order order, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteNumber("id", (int)order.Id); + writer.WriteNumber("petId", (int)order.PetId); + writer.WriteNumber("quantity", (int)order.Quantity); + writer.WritePropertyName("shipDate"); + JsonSerializer.Serialize(writer, order.ShipDate, options); + var statusRawValue = Order.StatusEnumToJsonValue(order.Status); + if (statusRawValue != null) + writer.WriteString("status", statusRawValue); + else + writer.WriteNull("status"); + writer.WriteBoolean("complete", order.Complete); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/OuterComposite.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/OuterComposite.cs index f4d199456b..337e12f7c1 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/OuterComposite.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/OuterComposite.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,44 +28,60 @@ namespace Org.OpenAPITools.Model /// /// OuterComposite /// - public partial class OuterComposite : IEquatable, IValidatableObject + public partial class OuterComposite : IValidatableObject { /// /// Initializes a new instance of the class. /// + /// myBoolean /// myNumber /// myString - /// myBoolean - public OuterComposite(decimal? myNumber = default, string? myString = default, bool? myBoolean = default) + [JsonConstructor] + public OuterComposite(bool myBoolean, decimal myNumber, string myString) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (myNumber == null) + throw new ArgumentNullException("myNumber is a required property for OuterComposite and cannot be null."); + + if (myString == null) + throw new ArgumentNullException("myString is a required property for OuterComposite and cannot be null."); + + if (myBoolean == null) + throw new ArgumentNullException("myBoolean is a required property for OuterComposite and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + MyBoolean = myBoolean; MyNumber = myNumber; MyString = myString; - MyBoolean = myBoolean; } - /// - /// Gets or Sets MyNumber - /// - [JsonPropertyName("my_number")] - public decimal? MyNumber { get; set; } - - /// - /// Gets or Sets MyString - /// - [JsonPropertyName("my_string")] - public string? MyString { get; set; } - /// /// Gets or Sets MyBoolean /// [JsonPropertyName("my_boolean")] - public bool? MyBoolean { get; set; } + public bool MyBoolean { get; set; } + + /// + /// Gets or Sets MyNumber + /// + [JsonPropertyName("my_number")] + public decimal MyNumber { get; set; } + + /// + /// Gets or Sets MyString + /// + [JsonPropertyName("my_string")] + public string MyString { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -76,57 +91,13 @@ namespace Org.OpenAPITools.Model { StringBuilder sb = new StringBuilder(); sb.Append("class OuterComposite {\n"); + sb.Append(" MyBoolean: ").Append(MyBoolean).Append("\n"); sb.Append(" MyNumber: ").Append(MyNumber).Append("\n"); sb.Append(" MyString: ").Append(MyString).Append("\n"); - sb.Append(" MyBoolean: ").Append(MyBoolean).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as OuterComposite).AreEqual; - } - - /// - /// Returns true if OuterComposite instances are equal - /// - /// Instance of OuterComposite to be compared - /// Boolean - public bool Equals(OuterComposite? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.MyNumber.GetHashCode(); - if (this.MyString != null) - { - hashCode = (hashCode * 59) + this.MyString.GetHashCode(); - } - hashCode = (hashCode * 59) + this.MyBoolean.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -138,4 +109,81 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type OuterComposite + /// + public class OuterCompositeJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override OuterComposite Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + bool myBoolean = default; + decimal myNumber = default; + string myString = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "my_boolean": + myBoolean = reader.GetBoolean(); + break; + case "my_number": + myNumber = reader.GetInt32(); + break; + case "my_string": + myString = reader.GetString(); + break; + default: + break; + } + } + } + + return new OuterComposite(myBoolean, myNumber, myString); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, OuterComposite outerComposite, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteBoolean("my_boolean", outerComposite.MyBoolean); + writer.WriteNumber("my_number", (int)outerComposite.MyNumber); + writer.WriteString("my_string", outerComposite.MyString); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/OuterEnum.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/OuterEnum.cs index 8a82c64020..da207e9182 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/OuterEnum.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/OuterEnum.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -34,20 +33,129 @@ namespace Org.OpenAPITools.Model /// /// Enum Placed for value: placed /// - [EnumMember(Value = "placed")] Placed = 1, /// /// Enum Approved for value: approved /// - [EnumMember(Value = "approved")] Approved = 2, /// /// Enum Delivered for value: delivered /// - [EnumMember(Value = "delivered")] Delivered = 3 } + + public class OuterEnumConverter : JsonConverter + { + public static OuterEnum FromString(string value) + { + if (value == "placed") + return OuterEnum.Placed; + + if (value == "approved") + return OuterEnum.Approved; + + if (value == "delivered") + return OuterEnum.Delivered; + + throw new NotImplementedException($"Could not convert value to type OuterEnum: '{value}'"); + } + + public static OuterEnum? FromStringOrDefault(string value) + { + if (value == "placed") + return OuterEnum.Placed; + + if (value == "approved") + return OuterEnum.Approved; + + if (value == "delivered") + return OuterEnum.Delivered; + + return null; + } + + public static string ToJsonValue(OuterEnum value) + { + if (value == OuterEnum.Placed) + return "placed"; + + if (value == OuterEnum.Approved) + return "approved"; + + if (value == OuterEnum.Delivered) + return "delivered"; + + throw new NotImplementedException($"Value could not be handled: '{value}'"); + } + + /// + /// Returns a from the Json object + /// + /// + /// + /// + /// + public override OuterEnum Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + OuterEnum? result = OuterEnumConverter.FromString(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the OuterEnum to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, OuterEnum outerEnum, JsonSerializerOptions options) + { + writer.WriteStringValue(outerEnum.ToString()); + } + } + + public class OuterEnumNullableConverter : JsonConverter + { + /// + /// Returns a OuterEnum from the Json object + /// + /// + /// + /// + /// + public override OuterEnum? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + if (rawValue == null) + return null; + + OuterEnum? result = OuterEnumConverter.FromString(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, OuterEnum? outerEnum, JsonSerializerOptions options) + { + writer.WriteStringValue(outerEnum?.ToString() ?? "null"); + } + } + } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs index edee830828..039b5e9cd3 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -34,20 +33,129 @@ namespace Org.OpenAPITools.Model /// /// Enum Placed for value: placed /// - [EnumMember(Value = "placed")] Placed = 1, /// /// Enum Approved for value: approved /// - [EnumMember(Value = "approved")] Approved = 2, /// /// Enum Delivered for value: delivered /// - [EnumMember(Value = "delivered")] Delivered = 3 } + + public class OuterEnumDefaultValueConverter : JsonConverter + { + public static OuterEnumDefaultValue FromString(string value) + { + if (value == "placed") + return OuterEnumDefaultValue.Placed; + + if (value == "approved") + return OuterEnumDefaultValue.Approved; + + if (value == "delivered") + return OuterEnumDefaultValue.Delivered; + + throw new NotImplementedException($"Could not convert value to type OuterEnumDefaultValue: '{value}'"); + } + + public static OuterEnumDefaultValue? FromStringOrDefault(string value) + { + if (value == "placed") + return OuterEnumDefaultValue.Placed; + + if (value == "approved") + return OuterEnumDefaultValue.Approved; + + if (value == "delivered") + return OuterEnumDefaultValue.Delivered; + + return null; + } + + public static string ToJsonValue(OuterEnumDefaultValue value) + { + if (value == OuterEnumDefaultValue.Placed) + return "placed"; + + if (value == OuterEnumDefaultValue.Approved) + return "approved"; + + if (value == OuterEnumDefaultValue.Delivered) + return "delivered"; + + throw new NotImplementedException($"Value could not be handled: '{value}'"); + } + + /// + /// Returns a from the Json object + /// + /// + /// + /// + /// + public override OuterEnumDefaultValue Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + OuterEnumDefaultValue? result = OuterEnumDefaultValueConverter.FromString(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the OuterEnumDefaultValue to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, OuterEnumDefaultValue outerEnumDefaultValue, JsonSerializerOptions options) + { + writer.WriteStringValue(outerEnumDefaultValue.ToString()); + } + } + + public class OuterEnumDefaultValueNullableConverter : JsonConverter + { + /// + /// Returns a OuterEnumDefaultValue from the Json object + /// + /// + /// + /// + /// + public override OuterEnumDefaultValue? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + if (rawValue == null) + return null; + + OuterEnumDefaultValue? result = OuterEnumDefaultValueConverter.FromString(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, OuterEnumDefaultValue? outerEnumDefaultValue, JsonSerializerOptions options) + { + writer.WriteStringValue(outerEnumDefaultValue?.ToString() ?? "null"); + } + } + } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/OuterEnumInteger.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/OuterEnumInteger.cs index b1e9dc142e..7878340efd 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/OuterEnumInteger.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/OuterEnumInteger.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -47,4 +46,107 @@ namespace Org.OpenAPITools.Model NUMBER_2 = 2 } + + public class OuterEnumIntegerConverter : JsonConverter + { + public static OuterEnumInteger FromString(string value) + { + if (value == (0).ToString()) + return OuterEnumInteger.NUMBER_0; + + if (value == (1).ToString()) + return OuterEnumInteger.NUMBER_1; + + if (value == (2).ToString()) + return OuterEnumInteger.NUMBER_2; + + throw new NotImplementedException($"Could not convert value to type OuterEnumInteger: '{value}'"); + } + + public static OuterEnumInteger? FromStringOrDefault(string value) + { + if (value == (0).ToString()) + return OuterEnumInteger.NUMBER_0; + + if (value == (1).ToString()) + return OuterEnumInteger.NUMBER_1; + + if (value == (2).ToString()) + return OuterEnumInteger.NUMBER_2; + + return null; + } + + public static int ToJsonValue(OuterEnumInteger value) + { + return (int) value; + } + + /// + /// Returns a from the Json object + /// + /// + /// + /// + /// + public override OuterEnumInteger Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + OuterEnumInteger? result = OuterEnumIntegerConverter.FromString(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the OuterEnumInteger to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, OuterEnumInteger outerEnumInteger, JsonSerializerOptions options) + { + writer.WriteStringValue(outerEnumInteger.ToString()); + } + } + + public class OuterEnumIntegerNullableConverter : JsonConverter + { + /// + /// Returns a OuterEnumInteger from the Json object + /// + /// + /// + /// + /// + public override OuterEnumInteger? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + if (rawValue == null) + return null; + + OuterEnumInteger? result = OuterEnumIntegerConverter.FromString(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, OuterEnumInteger? outerEnumInteger, JsonSerializerOptions options) + { + writer.WriteStringValue(outerEnumInteger?.ToString() ?? "null"); + } + } + } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs index 1167271da6..a64d3596f3 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -47,4 +46,107 @@ namespace Org.OpenAPITools.Model NUMBER_2 = 2 } + + public class OuterEnumIntegerDefaultValueConverter : JsonConverter + { + public static OuterEnumIntegerDefaultValue FromString(string value) + { + if (value == (0).ToString()) + return OuterEnumIntegerDefaultValue.NUMBER_0; + + if (value == (1).ToString()) + return OuterEnumIntegerDefaultValue.NUMBER_1; + + if (value == (2).ToString()) + return OuterEnumIntegerDefaultValue.NUMBER_2; + + throw new NotImplementedException($"Could not convert value to type OuterEnumIntegerDefaultValue: '{value}'"); + } + + public static OuterEnumIntegerDefaultValue? FromStringOrDefault(string value) + { + if (value == (0).ToString()) + return OuterEnumIntegerDefaultValue.NUMBER_0; + + if (value == (1).ToString()) + return OuterEnumIntegerDefaultValue.NUMBER_1; + + if (value == (2).ToString()) + return OuterEnumIntegerDefaultValue.NUMBER_2; + + return null; + } + + public static int ToJsonValue(OuterEnumIntegerDefaultValue value) + { + return (int) value; + } + + /// + /// Returns a from the Json object + /// + /// + /// + /// + /// + public override OuterEnumIntegerDefaultValue Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + OuterEnumIntegerDefaultValue? result = OuterEnumIntegerDefaultValueConverter.FromString(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the OuterEnumIntegerDefaultValue to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue, JsonSerializerOptions options) + { + writer.WriteStringValue(outerEnumIntegerDefaultValue.ToString()); + } + } + + public class OuterEnumIntegerDefaultValueNullableConverter : JsonConverter + { + /// + /// Returns a OuterEnumIntegerDefaultValue from the Json object + /// + /// + /// + /// + /// + public override OuterEnumIntegerDefaultValue? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + if (rawValue == null) + return null; + + OuterEnumIntegerDefaultValue? result = OuterEnumIntegerDefaultValueConverter.FromString(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, OuterEnumIntegerDefaultValue? outerEnumIntegerDefaultValue, JsonSerializerOptions options) + { + writer.WriteStringValue(outerEnumIntegerDefaultValue?.ToString() ?? "null"); + } + } + } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ParentPet.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ParentPet.cs index 58475dcfe2..75b8e36449 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ParentPet.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ParentPet.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,13 +28,14 @@ namespace Org.OpenAPITools.Model /// /// ParentPet /// - public partial class ParentPet : GrandparentAnimal, IEquatable + public partial class ParentPet : GrandparentAnimal, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// petType (required) - public ParentPet(string petType) : base(petType) + /// petType + [JsonConstructor] + internal ParentPet(string petType) : base(petType) { } @@ -51,40 +51,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as ParentPet).AreEqual; - } - - /// - /// Returns true if ParentPet instances are equal - /// - /// Instance of ParentPet to be compared - /// Boolean - public bool Equals(ParentPet? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - return hashCode; - } - } - } /// @@ -92,13 +58,6 @@ namespace Org.OpenAPITools.Model /// public class ParentPetJsonConverter : JsonConverter { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof(ParentPet).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -111,17 +70,22 @@ namespace Org.OpenAPITools.Model { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); - string? petType = default; + JsonTokenType startingTokenType = reader.TokenType; + + string petType = default; while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string? propertyName = reader.GetString(); reader.Read(); @@ -131,6 +95,8 @@ namespace Org.OpenAPITools.Model case "pet_type": petType = reader.GetString(); break; + default: + break; } } } @@ -145,6 +111,13 @@ namespace Org.OpenAPITools.Model /// /// /// - public override void Write(Utf8JsonWriter writer, ParentPet parentPet, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, ParentPet parentPet, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("pet_type", parentPet.PetType); + + writer.WriteEndObject(); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Pet.cs index 1694a5311e..616786dd13 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Pet.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,31 +28,50 @@ namespace Org.OpenAPITools.Model /// /// Pet /// - public partial class Pet : IEquatable, IValidatableObject + public partial class Pet : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// name (required) - /// photoUrls (required) - /// id /// category - /// tags + /// id + /// name + /// photoUrls /// pet status in the store - public Pet(string name, List photoUrls, long? id = default, Category? category = default, List? tags = default, StatusEnum? status = default) + /// tags + [JsonConstructor] + public Pet(Category category, long id, string name, List photoUrls, StatusEnum status, List tags) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (id == null) + throw new ArgumentNullException("id is a required property for Pet and cannot be null."); + + if (category == null) + throw new ArgumentNullException("category is a required property for Pet and cannot be null."); + if (name == null) throw new ArgumentNullException("name is a required property for Pet and cannot be null."); if (photoUrls == null) throw new ArgumentNullException("photoUrls is a required property for Pet and cannot be null."); + if (tags == null) + throw new ArgumentNullException("tags is a required property for Pet and cannot be null."); + + if (status == null) + throw new ArgumentNullException("status is a required property for Pet and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + Category = category; + Id = id; Name = name; PhotoUrls = photoUrls; - Id = id; - Category = category; - Tags = tags; Status = status; + Tags = tags; } /// @@ -65,29 +83,77 @@ namespace Org.OpenAPITools.Model /// /// Enum Available for value: available /// - [EnumMember(Value = "available")] Available = 1, /// /// Enum Pending for value: pending /// - [EnumMember(Value = "pending")] Pending = 2, /// /// Enum Sold for value: sold /// - [EnumMember(Value = "sold")] Sold = 3 } + /// + /// Returns a StatusEnum + /// + /// + /// + public static StatusEnum StatusEnumFromString(string value) + { + if (value == "available") + return StatusEnum.Available; + + if (value == "pending") + return StatusEnum.Pending; + + if (value == "sold") + return StatusEnum.Sold; + + throw new NotImplementedException($"Could not convert value to type StatusEnum: '{value}'"); + } + + /// + /// Returns equivalent json value + /// + /// + /// + /// + public static string StatusEnumToJsonValue(StatusEnum value) + { + if (value == StatusEnum.Available) + return "available"; + + if (value == StatusEnum.Pending) + return "pending"; + + if (value == StatusEnum.Sold) + return "sold"; + + throw new NotImplementedException($"Value could not be handled: '{value}'"); + } + /// /// pet status in the store /// /// pet status in the store [JsonPropertyName("status")] - public StatusEnum? Status { get; set; } + public StatusEnum Status { get; set; } + + /// + /// Gets or Sets Category + /// + [JsonPropertyName("category")] + public Category Category { get; set; } + + /// + /// Gets or Sets Id + /// + [JsonPropertyName("id")] + public long Id { get; set; } /// /// Gets or Sets Name @@ -101,29 +167,17 @@ namespace Org.OpenAPITools.Model [JsonPropertyName("photoUrls")] public List PhotoUrls { get; set; } - /// - /// Gets or Sets Id - /// - [JsonPropertyName("id")] - public long? Id { get; set; } - - /// - /// Gets or Sets Category - /// - [JsonPropertyName("category")] - public Category? Category { get; set; } - /// /// Gets or Sets Tags /// [JsonPropertyName("tags")] - public List? Tags { get; set; } + public List Tags { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -133,72 +187,16 @@ namespace Org.OpenAPITools.Model { StringBuilder sb = new StringBuilder(); sb.Append("class Pet {\n"); + sb.Append(" Category: ").Append(Category).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); sb.Append(" Name: ").Append(Name).Append("\n"); sb.Append(" PhotoUrls: ").Append(PhotoUrls).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Category: ").Append(Category).Append("\n"); - sb.Append(" Tags: ").Append(Tags).Append("\n"); sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" Tags: ").Append(Tags).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Pet).AreEqual; - } - - /// - /// Returns true if Pet instances are equal - /// - /// Instance of Pet to be compared - /// Boolean - public bool Equals(Pet? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.PhotoUrls != null) - { - hashCode = (hashCode * 59) + this.PhotoUrls.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - if (this.Category != null) - { - hashCode = (hashCode * 59) + this.Category.GetHashCode(); - } - if (this.Tags != null) - { - hashCode = (hashCode * 59) + this.Tags.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -210,4 +208,104 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type Pet + /// + public class PetJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override Pet Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + Category category = default; + long id = default; + string name = default; + List photoUrls = default; + Pet.StatusEnum status = default; + List tags = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "category": + category = JsonSerializer.Deserialize(ref reader, options); + break; + case "id": + id = reader.GetInt64(); + break; + case "name": + name = reader.GetString(); + break; + case "photoUrls": + photoUrls = JsonSerializer.Deserialize>(ref reader, options); + break; + case "status": + string statusRawValue = reader.GetString(); + status = Pet.StatusEnumFromString(statusRawValue); + break; + case "tags": + tags = JsonSerializer.Deserialize>(ref reader, options); + break; + default: + break; + } + } + } + + return new Pet(category, id, name, photoUrls, status, tags); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Pet pet, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WritePropertyName("category"); + JsonSerializer.Serialize(writer, pet.Category, options); + writer.WriteNumber("id", (int)pet.Id); + writer.WriteString("name", pet.Name); + writer.WritePropertyName("photoUrls"); + JsonSerializer.Serialize(writer, pet.PhotoUrls, options); + var statusRawValue = Pet.StatusEnumToJsonValue(pet.Status); + if (statusRawValue != null) + writer.WriteString("status", statusRawValue); + else + writer.WriteNull("status"); + writer.WritePropertyName("tags"); + JsonSerializer.Serialize(writer, pet.Tags, options); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Pig.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Pig.cs index e80f7c4c37..94f70a36a3 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Pig.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Pig.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,13 +28,14 @@ namespace Org.OpenAPITools.Model /// /// Pig /// - public partial class Pig : IEquatable, IValidatableObject + public partial class Pig : IValidatableObject { /// /// Initializes a new instance of the class. /// /// - public Pig(BasquePig basquePig) + [JsonConstructor] + internal Pig(BasquePig basquePig) { BasquePig = basquePig; } @@ -44,7 +44,8 @@ namespace Org.OpenAPITools.Model /// Initializes a new instance of the class. /// /// - public Pig(DanishPig danishPig) + [JsonConstructor] + internal Pig(DanishPig danishPig) { DanishPig = danishPig; } @@ -52,18 +53,18 @@ namespace Org.OpenAPITools.Model /// /// Gets or Sets BasquePig /// - public BasquePig BasquePig { get; set; } + public BasquePig? BasquePig { get; set; } /// /// Gets or Sets DanishPig /// - public DanishPig DanishPig { get; set; } + public DanishPig? DanishPig { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -77,44 +78,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Pig).AreEqual; - } - - /// - /// Returns true if Pig instances are equal - /// - /// Instance of Pig to be compared - /// Boolean - public bool Equals(Pig? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -141,13 +104,6 @@ namespace Org.OpenAPITools.Model /// public class PigJsonConverter : JsonConverter { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof(Pig).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -160,9 +116,11 @@ namespace Org.OpenAPITools.Model { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); + JsonTokenType startingTokenType = reader.TokenType; + Utf8JsonReader basquePigReader = reader; bool basquePigDeserialized = Client.ClientUtils.TryDeserialize(ref basquePigReader, options, out BasquePig? basquePig); @@ -172,16 +130,21 @@ namespace Org.OpenAPITools.Model while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string? propertyName = reader.GetString(); reader.Read(); switch (propertyName) { + default: + break; } } } @@ -202,6 +165,12 @@ namespace Org.OpenAPITools.Model /// /// /// - public override void Write(Utf8JsonWriter writer, Pig pig, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, Pig pig, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + + writer.WriteEndObject(); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/PolymorphicProperty.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/PolymorphicProperty.cs index b9bc60379a..a58cc27f94 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/PolymorphicProperty.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/PolymorphicProperty.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,13 +28,14 @@ namespace Org.OpenAPITools.Model /// /// PolymorphicProperty /// - public partial class PolymorphicProperty : IEquatable, IValidatableObject + public partial class PolymorphicProperty : IValidatableObject { /// /// Initializes a new instance of the class. /// /// - public PolymorphicProperty(bool _bool) + [JsonConstructor] + internal PolymorphicProperty(bool _bool) { Bool = _bool; } @@ -44,7 +44,8 @@ namespace Org.OpenAPITools.Model /// Initializes a new instance of the class. /// /// - public PolymorphicProperty(string _string) + [JsonConstructor] + internal PolymorphicProperty(string _string) { String = _string; } @@ -53,7 +54,8 @@ namespace Org.OpenAPITools.Model /// Initializes a new instance of the class. /// /// - public PolymorphicProperty(Object _object) + [JsonConstructor] + internal PolymorphicProperty(Object _object) { Object = _object; } @@ -62,7 +64,8 @@ namespace Org.OpenAPITools.Model /// Initializes a new instance of the class. /// /// - public PolymorphicProperty(List liststring) + [JsonConstructor] + internal PolymorphicProperty(List liststring) { Liststring = liststring; } @@ -70,28 +73,28 @@ namespace Org.OpenAPITools.Model /// /// Gets or Sets Bool /// - public bool Bool { get; set; } + public bool? Bool { get; set; } /// /// Gets or Sets String /// - public string String { get; set; } + public string? String { get; set; } /// /// Gets or Sets Object /// - public Object Object { get; set; } + public Object? Object { get; set; } /// /// Gets or Sets Liststring /// - public List Liststring { get; set; } + public List? Liststring { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -105,44 +108,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as PolymorphicProperty).AreEqual; - } - - /// - /// Returns true if PolymorphicProperty instances are equal - /// - /// Instance of PolymorphicProperty to be compared - /// Boolean - public bool Equals(PolymorphicProperty? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -159,13 +124,6 @@ namespace Org.OpenAPITools.Model /// public class PolymorphicPropertyJsonConverter : JsonConverter { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof(PolymorphicProperty).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -178,9 +136,11 @@ namespace Org.OpenAPITools.Model { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); + JsonTokenType startingTokenType = reader.TokenType; + Utf8JsonReader _boolReader = reader; bool _boolDeserialized = Client.ClientUtils.TryDeserialize(ref _boolReader, options, out bool _bool); @@ -196,16 +156,21 @@ namespace Org.OpenAPITools.Model while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string? propertyName = reader.GetString(); reader.Read(); switch (propertyName) { + default: + break; } } } @@ -232,6 +197,12 @@ namespace Org.OpenAPITools.Model /// /// /// - public override void Write(Utf8JsonWriter writer, PolymorphicProperty polymorphicProperty, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, PolymorphicProperty polymorphicProperty, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + + writer.WriteEndObject(); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Quadrilateral.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Quadrilateral.cs index ba1b3e0177..51a2353b1b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Quadrilateral.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Quadrilateral.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,13 +28,14 @@ namespace Org.OpenAPITools.Model /// /// Quadrilateral /// - public partial class Quadrilateral : IEquatable, IValidatableObject + public partial class Quadrilateral : IValidatableObject { /// /// Initializes a new instance of the class. /// /// - public Quadrilateral(SimpleQuadrilateral simpleQuadrilateral) + [JsonConstructor] + internal Quadrilateral(SimpleQuadrilateral simpleQuadrilateral) { SimpleQuadrilateral = simpleQuadrilateral; } @@ -44,7 +44,8 @@ namespace Org.OpenAPITools.Model /// Initializes a new instance of the class. /// /// - public Quadrilateral(ComplexQuadrilateral complexQuadrilateral) + [JsonConstructor] + internal Quadrilateral(ComplexQuadrilateral complexQuadrilateral) { ComplexQuadrilateral = complexQuadrilateral; } @@ -52,18 +53,18 @@ namespace Org.OpenAPITools.Model /// /// Gets or Sets SimpleQuadrilateral /// - public SimpleQuadrilateral SimpleQuadrilateral { get; set; } + public SimpleQuadrilateral? SimpleQuadrilateral { get; set; } /// /// Gets or Sets ComplexQuadrilateral /// - public ComplexQuadrilateral ComplexQuadrilateral { get; set; } + public ComplexQuadrilateral? ComplexQuadrilateral { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -77,44 +78,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Quadrilateral).AreEqual; - } - - /// - /// Returns true if Quadrilateral instances are equal - /// - /// Instance of Quadrilateral to be compared - /// Boolean - public bool Equals(Quadrilateral? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -141,13 +104,6 @@ namespace Org.OpenAPITools.Model /// public class QuadrilateralJsonConverter : JsonConverter { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof(Quadrilateral).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -160,9 +116,11 @@ namespace Org.OpenAPITools.Model { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); + JsonTokenType startingTokenType = reader.TokenType; + Utf8JsonReader simpleQuadrilateralReader = reader; bool simpleQuadrilateralDeserialized = Client.ClientUtils.TryDeserialize(ref simpleQuadrilateralReader, options, out SimpleQuadrilateral? simpleQuadrilateral); @@ -172,16 +130,21 @@ namespace Org.OpenAPITools.Model while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string? propertyName = reader.GetString(); reader.Read(); switch (propertyName) { + default: + break; } } } @@ -202,6 +165,12 @@ namespace Org.OpenAPITools.Model /// /// /// - public override void Write(Utf8JsonWriter writer, Quadrilateral quadrilateral, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, Quadrilateral quadrilateral, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + + writer.WriteEndObject(); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs index 0aadff208b..164f877885 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,17 +28,24 @@ namespace Org.OpenAPITools.Model /// /// QuadrilateralInterface /// - public partial class QuadrilateralInterface : IEquatable, IValidatableObject + public partial class QuadrilateralInterface : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// quadrilateralType (required) + /// quadrilateralType + [JsonConstructor] public QuadrilateralInterface(string quadrilateralType) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + if (quadrilateralType == null) throw new ArgumentNullException("quadrilateralType is a required property for QuadrilateralInterface and cannot be null."); +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + QuadrilateralType = quadrilateralType; } @@ -53,7 +59,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -68,48 +74,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as QuadrilateralInterface).AreEqual; - } - - /// - /// Returns true if QuadrilateralInterface instances are equal - /// - /// Instance of QuadrilateralInterface to be compared - /// Boolean - public bool Equals(QuadrilateralInterface? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.QuadrilateralType != null) - { - hashCode = (hashCode * 59) + this.QuadrilateralType.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -121,4 +85,71 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type QuadrilateralInterface + /// + public class QuadrilateralInterfaceJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override QuadrilateralInterface Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string quadrilateralType = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "quadrilateralType": + quadrilateralType = reader.GetString(); + break; + default: + break; + } + } + } + + return new QuadrilateralInterface(quadrilateralType); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, QuadrilateralInterface quadrilateralInterface, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("quadrilateralType", quadrilateralInterface.QuadrilateralType); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs index 431c19694a..55936865c0 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,15 +28,28 @@ namespace Org.OpenAPITools.Model /// /// ReadOnlyFirst /// - public partial class ReadOnlyFirst : IEquatable, IValidatableObject + public partial class ReadOnlyFirst : IEquatable, IValidatableObject { /// /// Initializes a new instance of the class. /// /// bar /// baz - public ReadOnlyFirst(string? bar = default, string? baz = default) + [JsonConstructor] + public ReadOnlyFirst(string bar, string baz) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (bar == null) + throw new ArgumentNullException("bar is a required property for ReadOnlyFirst and cannot be null."); + + if (baz == null) + throw new ArgumentNullException("baz is a required property for ReadOnlyFirst and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + Bar = bar; Baz = baz; } @@ -46,19 +58,19 @@ namespace Org.OpenAPITools.Model /// Gets or Sets Bar /// [JsonPropertyName("bar")] - public string? Bar { get; private set; } + public string Bar { get; } /// /// Gets or Sets Baz /// [JsonPropertyName("baz")] - public string? Baz { get; set; } + public string Baz { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -104,22 +116,12 @@ namespace Org.OpenAPITools.Model unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Bar != null) - { - hashCode = (hashCode * 59) + this.Bar.GetHashCode(); - } - if (this.Baz != null) - { - hashCode = (hashCode * 59) + this.Baz.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } + hashCode = (hashCode * 59) + Bar.GetHashCode(); + hashCode = (hashCode * 59) + AdditionalProperties.GetHashCode(); + return hashCode; } } - /// /// To validate all properties of the instance /// @@ -131,4 +133,76 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type ReadOnlyFirst + /// + public class ReadOnlyFirstJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override ReadOnlyFirst Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string bar = default; + string baz = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "bar": + bar = reader.GetString(); + break; + case "baz": + baz = reader.GetString(); + break; + default: + break; + } + } + } + + return new ReadOnlyFirst(bar, baz); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ReadOnlyFirst readOnlyFirst, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("bar", readOnlyFirst.Bar); + writer.WriteString("baz", readOnlyFirst.Baz); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Return.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Return.cs index 9c1b60d879..7007eff776 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Return.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Return.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,14 +28,24 @@ namespace Org.OpenAPITools.Model /// /// Model for testing reserved words /// - public partial class Return : IEquatable, IValidatableObject + public partial class Return : IValidatableObject { /// /// Initializes a new instance of the class. /// /// returnProperty - public Return(int? returnProperty = default) + [JsonConstructor] + public Return(int returnProperty) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (returnProperty == null) + throw new ArgumentNullException("returnProperty is a required property for Return and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + ReturnProperty = returnProperty; } @@ -44,13 +53,13 @@ namespace Org.OpenAPITools.Model /// Gets or Sets ReturnProperty /// [JsonPropertyName("return")] - public int? ReturnProperty { get; set; } + public int ReturnProperty { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -65,45 +74,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Return).AreEqual; - } - - /// - /// Returns true if Return instances are equal - /// - /// Instance of Return to be compared - /// Boolean - public bool Equals(Return? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.ReturnProperty.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -115,4 +85,71 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type Return + /// + public class ReturnJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override Return Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + int returnProperty = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "return": + returnProperty = reader.GetInt32(); + break; + default: + break; + } + } + } + + return new Return(returnProperty); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Return _return, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteNumber("return", (int)_return.ReturnProperty); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ScaleneTriangle.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ScaleneTriangle.cs index 6fcceeb242..3d964b902c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ScaleneTriangle.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ScaleneTriangle.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,14 +28,15 @@ namespace Org.OpenAPITools.Model /// /// ScaleneTriangle /// - public partial class ScaleneTriangle : IEquatable, IValidatableObject + public partial class ScaleneTriangle : IValidatableObject { /// /// Initializes a new instance of the class. /// /// /// - public ScaleneTriangle(ShapeInterface shapeInterface, TriangleInterface triangleInterface) + [JsonConstructor] + internal ScaleneTriangle(ShapeInterface shapeInterface, TriangleInterface triangleInterface) { ShapeInterface = shapeInterface; TriangleInterface = triangleInterface; @@ -56,7 +56,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -70,44 +70,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as ScaleneTriangle).AreEqual; - } - - /// - /// Returns true if ScaleneTriangle instances are equal - /// - /// Instance of ScaleneTriangle to be compared - /// Boolean - public bool Equals(ScaleneTriangle? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -124,13 +86,6 @@ namespace Org.OpenAPITools.Model /// public class ScaleneTriangleJsonConverter : JsonConverter { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof(ScaleneTriangle).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -143,28 +98,35 @@ namespace Org.OpenAPITools.Model { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); + JsonTokenType startingTokenType = reader.TokenType; + Utf8JsonReader shapeInterfaceReader = reader; - bool shapeInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref shapeInterfaceReader, options, out ShapeInterface? shapeInterface); + bool shapeInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref reader, options, out ShapeInterface? shapeInterface); Utf8JsonReader triangleInterfaceReader = reader; - bool triangleInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref triangleInterfaceReader, options, out TriangleInterface? triangleInterface); + bool triangleInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref reader, options, out TriangleInterface? triangleInterface); while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string? propertyName = reader.GetString(); reader.Read(); switch (propertyName) { + default: + break; } } } @@ -179,6 +141,12 @@ namespace Org.OpenAPITools.Model /// /// /// - public override void Write(Utf8JsonWriter writer, ScaleneTriangle scaleneTriangle, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, ScaleneTriangle scaleneTriangle, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + + writer.WriteEndObject(); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Shape.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Shape.cs index 5f34a45232..eaa601f77f 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Shape.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Shape.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,17 +28,24 @@ namespace Org.OpenAPITools.Model /// /// Shape /// - public partial class Shape : IEquatable, IValidatableObject + public partial class Shape : IValidatableObject { /// /// Initializes a new instance of the class. /// /// - /// quadrilateralType (required) + /// quadrilateralType + [JsonConstructor] public Shape(Triangle triangle, string quadrilateralType) { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + if (quadrilateralType == null) - throw new ArgumentNullException("quadrilateralType is a required property for Shape and cannot be null."); + throw new ArgumentNullException(nameof(QuadrilateralType)); + + #pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' Triangle = triangle; QuadrilateralType = quadrilateralType; @@ -49,11 +55,18 @@ namespace Org.OpenAPITools.Model /// Initializes a new instance of the class. /// /// - /// quadrilateralType (required) + /// quadrilateralType + [JsonConstructor] public Shape(Quadrilateral quadrilateral, string quadrilateralType) { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + if (quadrilateralType == null) - throw new ArgumentNullException("quadrilateralType is a required property for Shape and cannot be null."); + throw new ArgumentNullException(nameof(QuadrilateralType)); + + #pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' Quadrilateral = quadrilateral; QuadrilateralType = quadrilateralType; @@ -62,12 +75,12 @@ namespace Org.OpenAPITools.Model /// /// Gets or Sets Triangle /// - public Triangle Triangle { get; set; } + public Triangle? Triangle { get; set; } /// /// Gets or Sets Quadrilateral /// - public Quadrilateral Quadrilateral { get; set; } + public Quadrilateral? Quadrilateral { get; set; } /// /// Gets or Sets QuadrilateralType @@ -79,7 +92,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -94,48 +107,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Shape).AreEqual; - } - - /// - /// Returns true if Shape instances are equal - /// - /// Instance of Shape to be compared - /// Boolean - public bool Equals(Shape? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.QuadrilateralType != null) - { - hashCode = (hashCode * 59) + this.QuadrilateralType.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -162,13 +133,6 @@ namespace Org.OpenAPITools.Model /// public class ShapeJsonConverter : JsonConverter { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof(Shape).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -181,23 +145,28 @@ namespace Org.OpenAPITools.Model { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); + JsonTokenType startingTokenType = reader.TokenType; + Utf8JsonReader triangleReader = reader; bool triangleDeserialized = Client.ClientUtils.TryDeserialize(ref triangleReader, options, out Triangle? triangle); Utf8JsonReader quadrilateralReader = reader; bool quadrilateralDeserialized = Client.ClientUtils.TryDeserialize(ref quadrilateralReader, options, out Quadrilateral? quadrilateral); - string? quadrilateralType = default; + string quadrilateralType = default; while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string? propertyName = reader.GetString(); reader.Read(); @@ -207,6 +176,8 @@ namespace Org.OpenAPITools.Model case "quadrilateralType": quadrilateralType = reader.GetString(); break; + default: + break; } } } @@ -227,6 +198,13 @@ namespace Org.OpenAPITools.Model /// /// /// - public override void Write(Utf8JsonWriter writer, Shape shape, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, Shape shape, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("quadrilateralType", shape.QuadrilateralType); + + writer.WriteEndObject(); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ShapeInterface.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ShapeInterface.cs index 37871f3dc2..e526918eec 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ShapeInterface.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ShapeInterface.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,17 +28,24 @@ namespace Org.OpenAPITools.Model /// /// ShapeInterface /// - public partial class ShapeInterface : IEquatable, IValidatableObject + public partial class ShapeInterface : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// shapeType (required) + /// shapeType + [JsonConstructor] public ShapeInterface(string shapeType) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + if (shapeType == null) throw new ArgumentNullException("shapeType is a required property for ShapeInterface and cannot be null."); +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + ShapeType = shapeType; } @@ -53,7 +59,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -68,48 +74,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as ShapeInterface).AreEqual; - } - - /// - /// Returns true if ShapeInterface instances are equal - /// - /// Instance of ShapeInterface to be compared - /// Boolean - public bool Equals(ShapeInterface? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ShapeType != null) - { - hashCode = (hashCode * 59) + this.ShapeType.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -121,4 +85,71 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type ShapeInterface + /// + public class ShapeInterfaceJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override ShapeInterface Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string shapeType = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "shapeType": + shapeType = reader.GetString(); + break; + default: + break; + } + } + } + + return new ShapeInterface(shapeType); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ShapeInterface shapeInterface, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("shapeType", shapeInterface.ShapeType); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ShapeOrNull.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ShapeOrNull.cs index 171347cda2..ce6ae1c2a0 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ShapeOrNull.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/ShapeOrNull.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,17 +28,24 @@ namespace Org.OpenAPITools.Model /// /// The value may be a shape or the 'null' value. This is introduced in OAS schema >= 3.1. /// - public partial class ShapeOrNull : IEquatable, IValidatableObject + public partial class ShapeOrNull : IValidatableObject { /// /// Initializes a new instance of the class. /// /// - /// quadrilateralType (required) + /// quadrilateralType + [JsonConstructor] public ShapeOrNull(Triangle triangle, string quadrilateralType) { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + if (quadrilateralType == null) - throw new ArgumentNullException("quadrilateralType is a required property for ShapeOrNull and cannot be null."); + throw new ArgumentNullException(nameof(QuadrilateralType)); + + #pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' Triangle = triangle; QuadrilateralType = quadrilateralType; @@ -49,11 +55,18 @@ namespace Org.OpenAPITools.Model /// Initializes a new instance of the class. /// /// - /// quadrilateralType (required) + /// quadrilateralType + [JsonConstructor] public ShapeOrNull(Quadrilateral quadrilateral, string quadrilateralType) { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + if (quadrilateralType == null) - throw new ArgumentNullException("quadrilateralType is a required property for ShapeOrNull and cannot be null."); + throw new ArgumentNullException(nameof(QuadrilateralType)); + + #pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' Quadrilateral = quadrilateral; QuadrilateralType = quadrilateralType; @@ -62,12 +75,12 @@ namespace Org.OpenAPITools.Model /// /// Gets or Sets Triangle /// - public Triangle Triangle { get; set; } + public Triangle? Triangle { get; set; } /// /// Gets or Sets Quadrilateral /// - public Quadrilateral Quadrilateral { get; set; } + public Quadrilateral? Quadrilateral { get; set; } /// /// Gets or Sets QuadrilateralType @@ -79,7 +92,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -94,48 +107,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as ShapeOrNull).AreEqual; - } - - /// - /// Returns true if ShapeOrNull instances are equal - /// - /// Instance of ShapeOrNull to be compared - /// Boolean - public bool Equals(ShapeOrNull? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.QuadrilateralType != null) - { - hashCode = (hashCode * 59) + this.QuadrilateralType.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -162,13 +133,6 @@ namespace Org.OpenAPITools.Model /// public class ShapeOrNullJsonConverter : JsonConverter { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof(ShapeOrNull).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -181,23 +145,28 @@ namespace Org.OpenAPITools.Model { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); + JsonTokenType startingTokenType = reader.TokenType; + Utf8JsonReader triangleReader = reader; bool triangleDeserialized = Client.ClientUtils.TryDeserialize(ref triangleReader, options, out Triangle? triangle); Utf8JsonReader quadrilateralReader = reader; bool quadrilateralDeserialized = Client.ClientUtils.TryDeserialize(ref quadrilateralReader, options, out Quadrilateral? quadrilateral); - string? quadrilateralType = default; + string quadrilateralType = default; while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string? propertyName = reader.GetString(); reader.Read(); @@ -207,6 +176,8 @@ namespace Org.OpenAPITools.Model case "quadrilateralType": quadrilateralType = reader.GetString(); break; + default: + break; } } } @@ -227,6 +198,13 @@ namespace Org.OpenAPITools.Model /// /// /// - public override void Write(Utf8JsonWriter writer, ShapeOrNull shapeOrNull, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, ShapeOrNull shapeOrNull, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("quadrilateralType", shapeOrNull.QuadrilateralType); + + writer.WriteEndObject(); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs index d5565e094c..c92989e133 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,14 +28,15 @@ namespace Org.OpenAPITools.Model /// /// SimpleQuadrilateral /// - public partial class SimpleQuadrilateral : IEquatable, IValidatableObject + public partial class SimpleQuadrilateral : IValidatableObject { /// /// Initializes a new instance of the class. /// /// /// - public SimpleQuadrilateral(ShapeInterface shapeInterface, QuadrilateralInterface quadrilateralInterface) + [JsonConstructor] + internal SimpleQuadrilateral(ShapeInterface shapeInterface, QuadrilateralInterface quadrilateralInterface) { ShapeInterface = shapeInterface; QuadrilateralInterface = quadrilateralInterface; @@ -56,7 +56,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -70,44 +70,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as SimpleQuadrilateral).AreEqual; - } - - /// - /// Returns true if SimpleQuadrilateral instances are equal - /// - /// Instance of SimpleQuadrilateral to be compared - /// Boolean - public bool Equals(SimpleQuadrilateral? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -124,13 +86,6 @@ namespace Org.OpenAPITools.Model /// public class SimpleQuadrilateralJsonConverter : JsonConverter { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof(SimpleQuadrilateral).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -143,28 +98,35 @@ namespace Org.OpenAPITools.Model { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); + JsonTokenType startingTokenType = reader.TokenType; + Utf8JsonReader shapeInterfaceReader = reader; - bool shapeInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref shapeInterfaceReader, options, out ShapeInterface? shapeInterface); + bool shapeInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref reader, options, out ShapeInterface? shapeInterface); Utf8JsonReader quadrilateralInterfaceReader = reader; - bool quadrilateralInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref quadrilateralInterfaceReader, options, out QuadrilateralInterface? quadrilateralInterface); + bool quadrilateralInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref reader, options, out QuadrilateralInterface? quadrilateralInterface); while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string? propertyName = reader.GetString(); reader.Read(); switch (propertyName) { + default: + break; } } } @@ -179,6 +141,12 @@ namespace Org.OpenAPITools.Model /// /// /// - public override void Write(Utf8JsonWriter writer, SimpleQuadrilateral simpleQuadrilateral, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, SimpleQuadrilateral simpleQuadrilateral, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + + writer.WriteEndObject(); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/SpecialModelName.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/SpecialModelName.cs index 6d7d21215b..b1e359b577 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/SpecialModelName.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/SpecialModelName.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,36 +28,49 @@ namespace Org.OpenAPITools.Model /// /// SpecialModelName /// - public partial class SpecialModelName : IEquatable, IValidatableObject + public partial class SpecialModelName : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// specialPropertyName /// specialModelNameProperty - public SpecialModelName(long? specialPropertyName = default, string? specialModelNameProperty = default) + /// specialPropertyName + [JsonConstructor] + public SpecialModelName(string specialModelNameProperty, long specialPropertyName) { - SpecialPropertyName = specialPropertyName; - SpecialModelNameProperty = specialModelNameProperty; - } +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' - /// - /// Gets or Sets SpecialPropertyName - /// - [JsonPropertyName("$special[property.name]")] - public long? SpecialPropertyName { get; set; } + if (specialPropertyName == null) + throw new ArgumentNullException("specialPropertyName is a required property for SpecialModelName and cannot be null."); + + if (specialModelNameProperty == null) + throw new ArgumentNullException("specialModelNameProperty is a required property for SpecialModelName and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + SpecialModelNameProperty = specialModelNameProperty; + SpecialPropertyName = specialPropertyName; + } /// /// Gets or Sets SpecialModelNameProperty /// [JsonPropertyName("_special_model.name_")] - public string? SpecialModelNameProperty { get; set; } + public string SpecialModelNameProperty { get; set; } + + /// + /// Gets or Sets SpecialPropertyName + /// + [JsonPropertyName("$special[property.name]")] + public long SpecialPropertyName { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -68,55 +80,12 @@ namespace Org.OpenAPITools.Model { StringBuilder sb = new StringBuilder(); sb.Append("class SpecialModelName {\n"); - sb.Append(" SpecialPropertyName: ").Append(SpecialPropertyName).Append("\n"); sb.Append(" SpecialModelNameProperty: ").Append(SpecialModelNameProperty).Append("\n"); + sb.Append(" SpecialPropertyName: ").Append(SpecialPropertyName).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as SpecialModelName).AreEqual; - } - - /// - /// Returns true if SpecialModelName instances are equal - /// - /// Instance of SpecialModelName to be compared - /// Boolean - public bool Equals(SpecialModelName? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.SpecialPropertyName.GetHashCode(); - if (this.SpecialModelNameProperty != null) - { - hashCode = (hashCode * 59) + this.SpecialModelNameProperty.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -128,4 +97,76 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type SpecialModelName + /// + public class SpecialModelNameJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override SpecialModelName Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string specialModelNameProperty = default; + long specialPropertyName = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "_special_model.name_": + specialModelNameProperty = reader.GetString(); + break; + case "$special[property.name]": + specialPropertyName = reader.GetInt64(); + break; + default: + break; + } + } + } + + return new SpecialModelName(specialModelNameProperty, specialPropertyName); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, SpecialModelName specialModelName, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("_special_model.name_", specialModelName.SpecialModelNameProperty); + writer.WriteNumber("$special[property.name]", (int)specialModelName.SpecialPropertyName); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Tag.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Tag.cs index 69236717eb..7f02e8846f 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Tag.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Tag.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,15 +28,28 @@ namespace Org.OpenAPITools.Model /// /// Tag /// - public partial class Tag : IEquatable, IValidatableObject + public partial class Tag : IValidatableObject { /// /// Initializes a new instance of the class. /// /// id /// name - public Tag(long? id = default, string? name = default) + [JsonConstructor] + public Tag(long id, string name) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (id == null) + throw new ArgumentNullException("id is a required property for Tag and cannot be null."); + + if (name == null) + throw new ArgumentNullException("name is a required property for Tag and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + Id = id; Name = name; } @@ -46,19 +58,19 @@ namespace Org.OpenAPITools.Model /// Gets or Sets Id /// [JsonPropertyName("id")] - public long? Id { get; set; } + public long Id { get; set; } /// /// Gets or Sets Name /// [JsonPropertyName("name")] - public string? Name { get; set; } + public string Name { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -74,49 +86,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Tag).AreEqual; - } - - /// - /// Returns true if Tag instances are equal - /// - /// Instance of Tag to be compared - /// Boolean - public bool Equals(Tag? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -128,4 +97,76 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type Tag + /// + public class TagJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override Tag Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + long id = default; + string name = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "id": + id = reader.GetInt64(); + break; + case "name": + name = reader.GetString(); + break; + default: + break; + } + } + } + + return new Tag(id, name); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Tag tag, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteNumber("id", (int)tag.Id); + writer.WriteString("name", tag.Name); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Triangle.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Triangle.cs index 5d502172b9..0c9ca60f65 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Triangle.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Triangle.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,21 +28,28 @@ namespace Org.OpenAPITools.Model /// /// Triangle /// - public partial class Triangle : IEquatable, IValidatableObject + public partial class Triangle : IValidatableObject { /// /// Initializes a new instance of the class. /// /// - /// shapeType (required) - /// triangleType (required) + /// shapeType + /// triangleType + [JsonConstructor] public Triangle(EquilateralTriangle equilateralTriangle, string shapeType, string triangleType) { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + if (shapeType == null) - throw new ArgumentNullException("shapeType is a required property for Triangle and cannot be null."); + throw new ArgumentNullException(nameof(ShapeType)); if (triangleType == null) - throw new ArgumentNullException("triangleType is a required property for Triangle and cannot be null."); + throw new ArgumentNullException(nameof(TriangleType)); + + #pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' EquilateralTriangle = equilateralTriangle; ShapeType = shapeType; @@ -54,15 +60,22 @@ namespace Org.OpenAPITools.Model /// Initializes a new instance of the class. /// /// - /// shapeType (required) - /// triangleType (required) + /// shapeType + /// triangleType + [JsonConstructor] public Triangle(IsoscelesTriangle isoscelesTriangle, string shapeType, string triangleType) { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + if (shapeType == null) - throw new ArgumentNullException("shapeType is a required property for Triangle and cannot be null."); + throw new ArgumentNullException(nameof(ShapeType)); if (triangleType == null) - throw new ArgumentNullException("triangleType is a required property for Triangle and cannot be null."); + throw new ArgumentNullException(nameof(TriangleType)); + + #pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' IsoscelesTriangle = isoscelesTriangle; ShapeType = shapeType; @@ -73,15 +86,22 @@ namespace Org.OpenAPITools.Model /// Initializes a new instance of the class. /// /// - /// shapeType (required) - /// triangleType (required) + /// shapeType + /// triangleType + [JsonConstructor] public Triangle(ScaleneTriangle scaleneTriangle, string shapeType, string triangleType) { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + if (shapeType == null) - throw new ArgumentNullException("shapeType is a required property for Triangle and cannot be null."); + throw new ArgumentNullException(nameof(ShapeType)); if (triangleType == null) - throw new ArgumentNullException("triangleType is a required property for Triangle and cannot be null."); + throw new ArgumentNullException(nameof(TriangleType)); + + #pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' ScaleneTriangle = scaleneTriangle; ShapeType = shapeType; @@ -91,17 +111,17 @@ namespace Org.OpenAPITools.Model /// /// Gets or Sets EquilateralTriangle /// - public EquilateralTriangle EquilateralTriangle { get; set; } + public EquilateralTriangle? EquilateralTriangle { get; set; } /// /// Gets or Sets IsoscelesTriangle /// - public IsoscelesTriangle IsoscelesTriangle { get; set; } + public IsoscelesTriangle? IsoscelesTriangle { get; set; } /// /// Gets or Sets ScaleneTriangle /// - public ScaleneTriangle ScaleneTriangle { get; set; } + public ScaleneTriangle? ScaleneTriangle { get; set; } /// /// Gets or Sets ShapeType @@ -119,7 +139,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -135,52 +155,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Triangle).AreEqual; - } - - /// - /// Returns true if Triangle instances are equal - /// - /// Instance of Triangle to be compared - /// Boolean - public bool Equals(Triangle? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ShapeType != null) - { - hashCode = (hashCode * 59) + this.ShapeType.GetHashCode(); - } - if (this.TriangleType != null) - { - hashCode = (hashCode * 59) + this.TriangleType.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -207,13 +181,6 @@ namespace Org.OpenAPITools.Model /// public class TriangleJsonConverter : JsonConverter { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof(Triangle).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -226,9 +193,11 @@ namespace Org.OpenAPITools.Model { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); + JsonTokenType startingTokenType = reader.TokenType; + Utf8JsonReader equilateralTriangleReader = reader; bool equilateralTriangleDeserialized = Client.ClientUtils.TryDeserialize(ref equilateralTriangleReader, options, out EquilateralTriangle? equilateralTriangle); @@ -238,15 +207,18 @@ namespace Org.OpenAPITools.Model Utf8JsonReader scaleneTriangleReader = reader; bool scaleneTriangleDeserialized = Client.ClientUtils.TryDeserialize(ref scaleneTriangleReader, options, out ScaleneTriangle? scaleneTriangle); - string? shapeType = default; - string? triangleType = default; + string shapeType = default; + string triangleType = default; while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string? propertyName = reader.GetString(); reader.Read(); @@ -259,6 +231,8 @@ namespace Org.OpenAPITools.Model case "triangleType": triangleType = reader.GetString(); break; + default: + break; } } } @@ -282,6 +256,14 @@ namespace Org.OpenAPITools.Model /// /// /// - public override void Write(Utf8JsonWriter writer, Triangle triangle, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, Triangle triangle, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("shapeType", triangle.ShapeType); + writer.WriteString("triangleType", triangle.TriangleType); + + writer.WriteEndObject(); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/TriangleInterface.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/TriangleInterface.cs index f6d4c31c8c..f8c40ffa61 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/TriangleInterface.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/TriangleInterface.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,17 +28,24 @@ namespace Org.OpenAPITools.Model /// /// TriangleInterface /// - public partial class TriangleInterface : IEquatable, IValidatableObject + public partial class TriangleInterface : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// triangleType (required) + /// triangleType + [JsonConstructor] public TriangleInterface(string triangleType) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + if (triangleType == null) throw new ArgumentNullException("triangleType is a required property for TriangleInterface and cannot be null."); +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + TriangleType = triangleType; } @@ -53,7 +59,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -68,48 +74,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as TriangleInterface).AreEqual; - } - - /// - /// Returns true if TriangleInterface instances are equal - /// - /// Instance of TriangleInterface to be compared - /// Boolean - public bool Equals(TriangleInterface? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.TriangleType != null) - { - hashCode = (hashCode * 59) + this.TriangleType.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -121,4 +85,71 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type TriangleInterface + /// + public class TriangleInterfaceJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override TriangleInterface Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string triangleType = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "triangleType": + triangleType = reader.GetString(); + break; + default: + break; + } + } + } + + return new TriangleInterface(triangleType); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, TriangleInterface triangleInterface, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("triangleType", triangleInterface.TriangleType); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/User.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/User.cs index 1cf4f172ec..f882dcb4c5 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/User.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/User.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,101 +28,128 @@ namespace Org.OpenAPITools.Model /// /// User /// - public partial class User : IEquatable, IValidatableObject + public partial class User : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// id - /// username - /// firstName - /// lastName /// email + /// firstName + /// id + /// lastName + /// test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. /// password /// phone /// User Status - /// test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. - /// test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. + /// username /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389 /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values. - public User(long? id = default, string? username = default, string? firstName = default, string? lastName = default, string? email = default, string? password = default, string? phone = default, int? userStatus = default, Object? objectWithNoDeclaredProps = default, Object? objectWithNoDeclaredPropsNullable = default, Object? anyTypeProp = default, Object? anyTypePropNullable = default) + /// test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. + [JsonConstructor] + public User(string email, string firstName, long id, string lastName, Object objectWithNoDeclaredProps, string password, string phone, int userStatus, string username, Object? anyTypeProp = default, Object? anyTypePropNullable = default, Object? objectWithNoDeclaredPropsNullable = default) { - Id = id; - Username = username; - FirstName = firstName; - LastName = lastName; +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (id == null) + throw new ArgumentNullException("id is a required property for User and cannot be null."); + + if (username == null) + throw new ArgumentNullException("username is a required property for User and cannot be null."); + + if (firstName == null) + throw new ArgumentNullException("firstName is a required property for User and cannot be null."); + + if (lastName == null) + throw new ArgumentNullException("lastName is a required property for User and cannot be null."); + + if (email == null) + throw new ArgumentNullException("email is a required property for User and cannot be null."); + + if (password == null) + throw new ArgumentNullException("password is a required property for User and cannot be null."); + + if (phone == null) + throw new ArgumentNullException("phone is a required property for User and cannot be null."); + + if (userStatus == null) + throw new ArgumentNullException("userStatus is a required property for User and cannot be null."); + + if (objectWithNoDeclaredProps == null) + throw new ArgumentNullException("objectWithNoDeclaredProps is a required property for User and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + Email = email; + FirstName = firstName; + Id = id; + LastName = lastName; + ObjectWithNoDeclaredProps = objectWithNoDeclaredProps; Password = password; Phone = phone; UserStatus = userStatus; - ObjectWithNoDeclaredProps = objectWithNoDeclaredProps; - ObjectWithNoDeclaredPropsNullable = objectWithNoDeclaredPropsNullable; + Username = username; AnyTypeProp = anyTypeProp; AnyTypePropNullable = anyTypePropNullable; + ObjectWithNoDeclaredPropsNullable = objectWithNoDeclaredPropsNullable; } - /// - /// Gets or Sets Id - /// - [JsonPropertyName("id")] - public long? Id { get; set; } - - /// - /// Gets or Sets Username - /// - [JsonPropertyName("username")] - public string? Username { get; set; } - - /// - /// Gets or Sets FirstName - /// - [JsonPropertyName("firstName")] - public string? FirstName { get; set; } - - /// - /// Gets or Sets LastName - /// - [JsonPropertyName("lastName")] - public string? LastName { get; set; } - /// /// Gets or Sets Email /// [JsonPropertyName("email")] - public string? Email { get; set; } + public string Email { get; set; } /// - /// Gets or Sets Password + /// Gets or Sets FirstName /// - [JsonPropertyName("password")] - public string? Password { get; set; } + [JsonPropertyName("firstName")] + public string FirstName { get; set; } /// - /// Gets or Sets Phone + /// Gets or Sets Id /// - [JsonPropertyName("phone")] - public string? Phone { get; set; } + [JsonPropertyName("id")] + public long Id { get; set; } /// - /// User Status + /// Gets or Sets LastName /// - /// User Status - [JsonPropertyName("userStatus")] - public int? UserStatus { get; set; } + [JsonPropertyName("lastName")] + public string LastName { get; set; } /// /// test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. /// /// test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. [JsonPropertyName("objectWithNoDeclaredProps")] - public Object? ObjectWithNoDeclaredProps { get; set; } + public Object ObjectWithNoDeclaredProps { get; set; } /// - /// test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. + /// Gets or Sets Password /// - /// test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. - [JsonPropertyName("objectWithNoDeclaredPropsNullable")] - public Object? ObjectWithNoDeclaredPropsNullable { get; set; } + [JsonPropertyName("password")] + public string Password { get; set; } + + /// + /// Gets or Sets Phone + /// + [JsonPropertyName("phone")] + public string Phone { get; set; } + + /// + /// User Status + /// + /// User Status + [JsonPropertyName("userStatus")] + public int UserStatus { get; set; } + + /// + /// Gets or Sets Username + /// + [JsonPropertyName("username")] + public string Username { get; set; } /// /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389 @@ -139,11 +165,18 @@ namespace Org.OpenAPITools.Model [JsonPropertyName("anyTypePropNullable")] public Object? AnyTypePropNullable { get; set; } + /// + /// test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. + /// + /// test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. + [JsonPropertyName("objectWithNoDeclaredPropsNullable")] + public Object? ObjectWithNoDeclaredPropsNullable { get; set; } + /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -153,102 +186,22 @@ namespace Org.OpenAPITools.Model { StringBuilder sb = new StringBuilder(); sb.Append("class User {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Username: ").Append(Username).Append("\n"); - sb.Append(" FirstName: ").Append(FirstName).Append("\n"); - sb.Append(" LastName: ").Append(LastName).Append("\n"); sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append(" FirstName: ").Append(FirstName).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" LastName: ").Append(LastName).Append("\n"); + sb.Append(" ObjectWithNoDeclaredProps: ").Append(ObjectWithNoDeclaredProps).Append("\n"); sb.Append(" Password: ").Append(Password).Append("\n"); sb.Append(" Phone: ").Append(Phone).Append("\n"); sb.Append(" UserStatus: ").Append(UserStatus).Append("\n"); - sb.Append(" ObjectWithNoDeclaredProps: ").Append(ObjectWithNoDeclaredProps).Append("\n"); - sb.Append(" ObjectWithNoDeclaredPropsNullable: ").Append(ObjectWithNoDeclaredPropsNullable).Append("\n"); + sb.Append(" Username: ").Append(Username).Append("\n"); sb.Append(" AnyTypeProp: ").Append(AnyTypeProp).Append("\n"); sb.Append(" AnyTypePropNullable: ").Append(AnyTypePropNullable).Append("\n"); + sb.Append(" ObjectWithNoDeclaredPropsNullable: ").Append(ObjectWithNoDeclaredPropsNullable).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as User).AreEqual; - } - - /// - /// Returns true if User instances are equal - /// - /// Instance of User to be compared - /// Boolean - public bool Equals(User? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - if (this.Username != null) - { - hashCode = (hashCode * 59) + this.Username.GetHashCode(); - } - if (this.FirstName != null) - { - hashCode = (hashCode * 59) + this.FirstName.GetHashCode(); - } - if (this.LastName != null) - { - hashCode = (hashCode * 59) + this.LastName.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - if (this.Password != null) - { - hashCode = (hashCode * 59) + this.Password.GetHashCode(); - } - if (this.Phone != null) - { - hashCode = (hashCode * 59) + this.Phone.GetHashCode(); - } - hashCode = (hashCode * 59) + this.UserStatus.GetHashCode(); - if (this.ObjectWithNoDeclaredProps != null) - { - hashCode = (hashCode * 59) + this.ObjectWithNoDeclaredProps.GetHashCode(); - } - if (this.ObjectWithNoDeclaredPropsNullable != null) - { - hashCode = (hashCode * 59) + this.ObjectWithNoDeclaredPropsNullable.GetHashCode(); - } - if (this.AnyTypeProp != null) - { - hashCode = (hashCode * 59) + this.AnyTypeProp.GetHashCode(); - } - if (this.AnyTypePropNullable != null) - { - hashCode = (hashCode * 59) + this.AnyTypePropNullable.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -260,4 +213,130 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type User + /// + public class UserJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override User Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string email = default; + string firstName = default; + long id = default; + string lastName = default; + Object objectWithNoDeclaredProps = default; + string password = default; + string phone = default; + int userStatus = default; + string username = default; + Object anyTypeProp = default; + Object anyTypePropNullable = default; + Object objectWithNoDeclaredPropsNullable = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "email": + email = reader.GetString(); + break; + case "firstName": + firstName = reader.GetString(); + break; + case "id": + id = reader.GetInt64(); + break; + case "lastName": + lastName = reader.GetString(); + break; + case "objectWithNoDeclaredProps": + objectWithNoDeclaredProps = JsonSerializer.Deserialize(ref reader, options); + break; + case "password": + password = reader.GetString(); + break; + case "phone": + phone = reader.GetString(); + break; + case "userStatus": + userStatus = reader.GetInt32(); + break; + case "username": + username = reader.GetString(); + break; + case "anyTypeProp": + anyTypeProp = JsonSerializer.Deserialize(ref reader, options); + break; + case "anyTypePropNullable": + anyTypePropNullable = JsonSerializer.Deserialize(ref reader, options); + break; + case "objectWithNoDeclaredPropsNullable": + objectWithNoDeclaredPropsNullable = JsonSerializer.Deserialize(ref reader, options); + break; + default: + break; + } + } + } + + return new User(email, firstName, id, lastName, objectWithNoDeclaredProps, password, phone, userStatus, username, anyTypeProp, anyTypePropNullable, objectWithNoDeclaredPropsNullable); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, User user, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("email", user.Email); + writer.WriteString("firstName", user.FirstName); + writer.WriteNumber("id", (int)user.Id); + writer.WriteString("lastName", user.LastName); + writer.WritePropertyName("objectWithNoDeclaredProps"); + JsonSerializer.Serialize(writer, user.ObjectWithNoDeclaredProps, options); + writer.WriteString("password", user.Password); + writer.WriteString("phone", user.Phone); + writer.WriteNumber("userStatus", (int)user.UserStatus); + writer.WriteString("username", user.Username); + writer.WritePropertyName("anyTypeProp"); + JsonSerializer.Serialize(writer, user.AnyTypeProp, options); + writer.WritePropertyName("anyTypePropNullable"); + JsonSerializer.Serialize(writer, user.AnyTypePropNullable, options); + writer.WritePropertyName("objectWithNoDeclaredPropsNullable"); + JsonSerializer.Serialize(writer, user.ObjectWithNoDeclaredPropsNullable, options); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Whale.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Whale.cs index e8c73088da..69d35becad 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Whale.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Whale.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,19 +28,32 @@ namespace Org.OpenAPITools.Model /// /// Whale /// - public partial class Whale : IEquatable, IValidatableObject + public partial class Whale : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// className (required) + /// className /// hasBaleen /// hasTeeth - public Whale(string className, bool? hasBaleen = default, bool? hasTeeth = default) + [JsonConstructor] + public Whale(string className, bool hasBaleen, bool hasTeeth) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (hasBaleen == null) + throw new ArgumentNullException("hasBaleen is a required property for Whale and cannot be null."); + + if (hasTeeth == null) + throw new ArgumentNullException("hasTeeth is a required property for Whale and cannot be null."); + if (className == null) throw new ArgumentNullException("className is a required property for Whale and cannot be null."); +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + ClassName = className; HasBaleen = hasBaleen; HasTeeth = hasTeeth; @@ -57,19 +69,19 @@ namespace Org.OpenAPITools.Model /// Gets or Sets HasBaleen /// [JsonPropertyName("hasBaleen")] - public bool? HasBaleen { get; set; } + public bool HasBaleen { get; set; } /// /// Gets or Sets HasTeeth /// [JsonPropertyName("hasTeeth")] - public bool? HasTeeth { get; set; } + public bool HasTeeth { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -86,50 +98,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Whale).AreEqual; - } - - /// - /// Returns true if Whale instances are equal - /// - /// Instance of Whale to be compared - /// Boolean - public bool Equals(Whale? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ClassName != null) - { - hashCode = (hashCode * 59) + this.ClassName.GetHashCode(); - } - hashCode = (hashCode * 59) + this.HasBaleen.GetHashCode(); - hashCode = (hashCode * 59) + this.HasTeeth.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -141,4 +109,81 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type Whale + /// + public class WhaleJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override Whale Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string className = default; + bool hasBaleen = default; + bool hasTeeth = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "className": + className = reader.GetString(); + break; + case "hasBaleen": + hasBaleen = reader.GetBoolean(); + break; + case "hasTeeth": + hasTeeth = reader.GetBoolean(); + break; + default: + break; + } + } + } + + return new Whale(className, hasBaleen, hasTeeth); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Whale whale, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("className", whale.ClassName); + writer.WriteBoolean("hasBaleen", whale.HasBaleen); + writer.WriteBoolean("hasTeeth", whale.HasTeeth); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Zebra.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Zebra.cs index a43e56ab1d..38792dce87 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Zebra.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Model/Zebra.cs @@ -16,7 +16,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -29,18 +28,28 @@ namespace Org.OpenAPITools.Model /// /// Zebra /// - public partial class Zebra : Dictionary, IEquatable, IValidatableObject + public partial class Zebra : Dictionary, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// className (required) + /// className /// type - public Zebra(string className, TypeEnum? type = default) : base() + [JsonConstructor] + public Zebra(string className, TypeEnum type) : base() { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (type == null) + throw new ArgumentNullException("type is a required property for Zebra and cannot be null."); + if (className == null) throw new ArgumentNullException("className is a required property for Zebra and cannot be null."); +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + ClassName = className; Type = type; } @@ -53,28 +62,64 @@ namespace Org.OpenAPITools.Model /// /// Enum Plains for value: plains /// - [EnumMember(Value = "plains")] Plains = 1, /// /// Enum Mountain for value: mountain /// - [EnumMember(Value = "mountain")] Mountain = 2, /// /// Enum Grevys for value: grevys /// - [EnumMember(Value = "grevys")] Grevys = 3 } + /// + /// Returns a TypeEnum + /// + /// + /// + public static TypeEnum TypeEnumFromString(string value) + { + if (value == "plains") + return TypeEnum.Plains; + + if (value == "mountain") + return TypeEnum.Mountain; + + if (value == "grevys") + return TypeEnum.Grevys; + + throw new NotImplementedException($"Could not convert value to type TypeEnum: '{value}'"); + } + + /// + /// Returns equivalent json value + /// + /// + /// + /// + public static string TypeEnumToJsonValue(TypeEnum value) + { + if (value == TypeEnum.Plains) + return "plains"; + + if (value == TypeEnum.Mountain) + return "mountain"; + + if (value == TypeEnum.Grevys) + return "grevys"; + + throw new NotImplementedException($"Value could not be handled: '{value}'"); + } + /// /// Gets or Sets Type /// [JsonPropertyName("type")] - public TypeEnum? Type { get; set; } + public TypeEnum Type { get; set; } /// /// Gets or Sets ClassName @@ -86,7 +131,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -103,49 +148,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Zebra).AreEqual; - } - - /// - /// Returns true if Zebra instances are equal - /// - /// Instance of Zebra to be compared - /// Boolean - public bool Equals(Zebra? input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.ClassName != null) - { - hashCode = (hashCode * 59) + this.ClassName.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -157,4 +159,81 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type Zebra + /// + public class ZebraJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override Zebra Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string className = default; + Zebra.TypeEnum type = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string? propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "className": + className = reader.GetString(); + break; + case "type": + string typeRawValue = reader.GetString(); + type = Zebra.TypeEnumFromString(typeRawValue); + break; + default: + break; + } + } + } + + return new Zebra(className, type); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Zebra zebra, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("className", zebra.ClassName); + var typeRawValue = Zebra.TypeEnumToJsonValue(zebra.Type); + if (typeRawValue != null) + writer.WriteString("type", typeRawValue); + else + writer.WriteNull("type"); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Org.OpenAPITools.csproj index 88fc199939..96a7d12b51 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Org.OpenAPITools.csproj +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Org.OpenAPITools.csproj @@ -22,9 +22,9 @@ - - - + + + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/README.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/README.md new file mode 100644 index 0000000000..6b76b0ef36 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/README.md @@ -0,0 +1,260 @@ +# Created with Openapi Generator + + +## Run the following powershell command to generate the library + +```ps1 +$properties = @( + 'apiName=Api', + 'targetFramework=net7.0', + 'validatable=true', + 'nullableReferenceTypes=true', + 'hideGenerationTimestamp=true', + 'packageVersion=1.0.0', + 'packageAuthors=OpenAPI', + 'packageCompany=OpenAPI', + 'packageCopyright=No Copyright', + 'packageDescription=A library generated from a OpenAPI doc', + 'packageName=Org.OpenAPITools', + 'packageTags=', + 'packageTitle=OpenAPI Library' +) -join "," + +$global = @( + 'apiDocs=true', + 'modelDocs=true', + 'apiTests=true', + 'modelTests=true' +) -join "," + +java -jar "/openapi-generator/modules/openapi-generator-cli/target/openapi-generator-cli.jar" generate ` + -g csharp-netcore ` + -i .yaml ` + -o ` + --library generichost ` + --additional-properties $properties ` + --global-property $global ` + --git-host "github.com" ` + --git-repo-id "GIT_REPO_ID" ` + --git-user-id "GIT_USER_ID" ` + --release-note "Minor update" + # -t templates +``` + + +## Using the library in your project + +```cs +using System; +using System.Threading.Tasks; +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.DependencyInjection; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Client; +using Org.OpenAPITools.Model; + +namespace YourProject +{ + public class Program + { + public static async Task Main(string[] args) + { + var host = CreateHostBuilder(args).Build(); + var api = host.Services.GetRequiredService(); + ApiResponse foo = await api.Call123TestSpecialTagsWithHttpInfoAsync("todo"); + } + + public static IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args) + .ConfigureApi((context, options) => + { + // the type of token here depends on the api security specifications + ApiKeyToken token = new(""); + options.AddTokens(token); + + // optionally choose the method the tokens will be provided with, default is RateLimitProvider + options.UseProvider, ApiKeyToken>(); + + // the type of token here depends on the api security specifications + ApiKeyToken token = new(""); + options.AddTokens(token); + + // optionally choose the method the tokens will be provided with, default is RateLimitProvider + options.UseProvider, ApiKeyToken>(); + + // the type of token here depends on the api security specifications + ApiKeyToken token = new(""); + options.AddTokens(token); + + // optionally choose the method the tokens will be provided with, default is RateLimitProvider + options.UseProvider, ApiKeyToken>(); + + // the type of token here depends on the api security specifications + ApiKeyToken token = new(""); + options.AddTokens(token); + + // optionally choose the method the tokens will be provided with, default is RateLimitProvider + options.UseProvider, ApiKeyToken>(); + + // the type of token here depends on the api security specifications + ApiKeyToken token = new(""); + options.AddTokens(token); + + // optionally choose the method the tokens will be provided with, default is RateLimitProvider + options.UseProvider, ApiKeyToken>(); + + // the type of token here depends on the api security specifications + ApiKeyToken token = new(""); + options.AddTokens(token); + + // optionally choose the method the tokens will be provided with, default is RateLimitProvider + options.UseProvider, ApiKeyToken>(); + + options.ConfigureJsonOptions((jsonOptions) => + { + // your custom converters if any + }); + + options.AddApiHttpClients(builder: builder => builder + .AddRetryPolicy(2) + .AddTimeoutPolicy(TimeSpan.FromSeconds(5)) + .AddCircuitBreakerPolicy(10, TimeSpan.FromSeconds(30)) + // add whatever middleware you prefer + ); + }); + } +} +``` + +## Questions + +- What about HttpRequest failures and retries? + If supportsRetry is enabled, you can configure Polly in the ConfigureClients method. +- How are tokens used? + Tokens are provided by a TokenProvider class. The default is RateLimitProvider which will perform client side rate limiting. + Other providers can be used with the UseProvider method. +- Does an HttpRequest throw an error when the server response is not Ok? + It depends how you made the request. If the return type is ApiResponse no error will be thrown, though the Content property will be null. + StatusCode and ReasonPhrase will contain information about the error. + If the return type is T, then it will throw. If the return type is TOrDefault, it will return null. +- How do I validate requests and process responses? + Use the provided On and After methods in the Api class from the namespace Org.OpenAPITools.Rest.DefaultApi. + Or provide your own class by using the generic ConfigureApi method. + + +## Dependencies + +- [Microsoft.Extensions.Hosting](https://www.nuget.org/packages/Microsoft.Extensions.Hosting/) - 5.0.0 or later +- [Microsoft.Extensions.Http](https://www.nuget.org/packages/Microsoft.Extensions.Http/) - 5.0.0 or later +- [Microsoft.Extensions.Http.Polly](https://www.nuget.org/packages/Microsoft.Extensions.Http.Polly/) - 5.0.1 or later +- [Polly](https://www.nuget.org/packages/Polly/) - 7.2.3 or later +- [CompareNETObjects](https://www.nuget.org/packages/CompareNETObjects) - 4.61.0 or later +- [System.ComponentModel.Annotations](https://www.nuget.org/packages/System.ComponentModel.Annotations) - 4.7.0 or later + + +## Documentation for Authorization + +Authentication schemes defined for the API: + + +### api_key + +- **Type**: API key +- **API key parameter name**: api_key +- **Location**: HTTP header + + +### api_key_query + +- **Type**: API key +- **API key parameter name**: api_key_query +- **Location**: URL query string + + +### bearer_test + + +- **Type**: Bearer Authentication + + +### http_basic_test + + +- **Type**: HTTP basic authentication + + +### http_signature_test + + + + +### petstore_auth + + +- **Type**: OAuth +- **Flow**: implicit +- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog +- **Scopes**: +- write:pets: modify pets in your account +- read:pets: read your pets + +## Build +- SDK version: 1.0.0 +- Build package: org.openapitools.codegen.languages.CSharpNetCoreClientCodegen + +## Api Information +- appName: OpenAPI Petstore +- appVersion: 1.0.0 +- appDescription: 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 Global properties](https://openapi-generator.tech/docs/globals) +- generateAliasAsModel: +- supportingFiles: +- models: omitted for brevity +- apis: omitted for brevity +- apiDocs: true +- modelDocs: true +- apiTests: true +- modelTests: true +- withXml: + +## [OpenApi Generator Parameters](https://openapi-generator.tech/docs/generators/csharp-netcore) +- allowUnicodeIdentifiers: +- apiName: Api +- caseInsensitiveResponseHeaders: +- conditionalSerialization: false +- disallowAdditionalPropertiesIfNotPresent: false +- gitHost: github.com +- gitRepoId: GIT_REPO_ID +- gitUserId: GIT_USER_ID +- hideGenerationTimestamp: true +- interfacePrefix: I +- library: generichost +- licenseId: +- modelPropertyNaming: +- netCoreProjectFile: false +- nonPublicApi: false +- nullableReferenceTypes: true +- optionalAssemblyInfo: +- optionalEmitDefaultValues: false +- optionalMethodArgument: true +- optionalProjectFile: +- packageAuthors: OpenAPI +- packageCompany: OpenAPI +- packageCopyright: No Copyright +- packageDescription: A library generated from a OpenAPI doc +- packageGuid: {321C8C3F-0156-40C1-AE42-D59761FB9B6C} +- packageName: Org.OpenAPITools +- packageTags: +- packageTitle: OpenAPI Library +- packageVersion: 1.0.0 +- releaseNote: Minor update +- returnICollection: false +- sortParamsByRequiredFlag: +- sourceFolder: src +- targetFramework: net7.0 +- useCollection: false +- useDateTimeOffset: false +- useOneOfDiscriminatorLookup: false +- validatable: true + +This C# SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project. diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/.openapi-generator/FILES b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/.openapi-generator/FILES index cf0f5c871b..65d841c450 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/.openapi-generator/FILES +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/.openapi-generator/FILES @@ -92,31 +92,38 @@ docs/scripts/git_push.ps1 docs/scripts/git_push.sh src/Org.OpenAPITools.Test/Api/DependencyInjectionTests.cs src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj +src/Org.OpenAPITools.Test/README.md src/Org.OpenAPITools/Api/AnotherFakeApi.cs src/Org.OpenAPITools/Api/DefaultApi.cs src/Org.OpenAPITools/Api/FakeApi.cs src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs +src/Org.OpenAPITools/Api/IApi.cs src/Org.OpenAPITools/Api/PetApi.cs src/Org.OpenAPITools/Api/StoreApi.cs src/Org.OpenAPITools/Api/UserApi.cs src/Org.OpenAPITools/Client/ApiException.cs +src/Org.OpenAPITools/Client/ApiFactory.cs src/Org.OpenAPITools/Client/ApiKeyToken.cs src/Org.OpenAPITools/Client/ApiResponseEventArgs.cs src/Org.OpenAPITools/Client/ApiResponse`1.cs src/Org.OpenAPITools/Client/BasicToken.cs src/Org.OpenAPITools/Client/BearerToken.cs src/Org.OpenAPITools/Client/ClientUtils.cs +src/Org.OpenAPITools/Client/CookieContainer.cs +src/Org.OpenAPITools/Client/DateTimeJsonConverter.cs +src/Org.OpenAPITools/Client/DateTimeNullableJsonConverter.cs src/Org.OpenAPITools/Client/HostConfiguration.cs src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs src/Org.OpenAPITools/Client/HttpSigningToken.cs -src/Org.OpenAPITools/Client/IApi.cs src/Org.OpenAPITools/Client/JsonSerializerOptionsProvider.cs src/Org.OpenAPITools/Client/OAuthToken.cs -src/Org.OpenAPITools/Client/OpenAPIDateJsonConverter.cs src/Org.OpenAPITools/Client/RateLimitProvider`1.cs src/Org.OpenAPITools/Client/TokenBase.cs src/Org.OpenAPITools/Client/TokenContainer`1.cs src/Org.OpenAPITools/Client/TokenProvider`1.cs +src/Org.OpenAPITools/Extensions/IHostBuilderExtensions.cs +src/Org.OpenAPITools/Extensions/IHttpClientBuilderExtensions.cs +src/Org.OpenAPITools/Extensions/IServiceCollectionExtensions.cs src/Org.OpenAPITools/Model/Activity.cs src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs @@ -197,3 +204,4 @@ src/Org.OpenAPITools/Model/User.cs src/Org.OpenAPITools/Model/Whale.cs src/Org.OpenAPITools/Model/Zebra.cs src/Org.OpenAPITools/Org.OpenAPITools.csproj +src/Org.OpenAPITools/README.md diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/README.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/README.md index 8a401855f4..f9c1c7f746 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/README.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/README.md @@ -1,259 +1 @@ # Created with Openapi Generator - - -## Run the following powershell command to generate the library - -```ps1 -$properties = @( - 'apiName=Api', - 'targetFramework=net7.0', - 'validatable=true', - 'nullableReferenceTypes=false', - 'hideGenerationTimestamp=true', - 'packageVersion=1.0.0', - 'packageAuthors=OpenAPI', - 'packageCompany=OpenAPI', - 'packageCopyright=No Copyright', - 'packageDescription=A library generated from a OpenAPI doc', - 'packageName=Org.OpenAPITools', - 'packageTags=', - 'packageTitle=OpenAPI Library' -) -join "," - -$global = @( - 'apiDocs=true', - 'modelDocs=true', - 'apiTests=true', - 'modelTests=true' -) -join "," - -java -jar "/openapi-generator/modules/openapi-generator-cli/target/openapi-generator-cli.jar" generate ` - -g csharp-netcore ` - -i .yaml ` - -o ` - --library generichost ` - --additional-properties $properties ` - --global-property $global ` - --git-host "github.com" ` - --git-repo-id "GIT_REPO_ID" ` - --git-user-id "GIT_USER_ID" ` - --release-note "Minor update" - # -t templates -``` - - -## Using the library in your project - -```cs -using System; -using System.Threading.Tasks; -using Microsoft.Extensions.Hosting; -using Microsoft.Extensions.DependencyInjection; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace YourProject -{ - public class Program - { - public static async Task Main(string[] args) - { - var host = CreateHostBuilder(args).Build(); - var api = host.Services.GetRequiredService(); - ApiResponse foo = await api.Call123TestSpecialTagsWithHttpInfoAsync("todo"); - } - - public static IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args) - .ConfigureApi((context, options) => - { - // the type of token here depends on the api security specifications - ApiKeyToken token = new(""); - options.AddTokens(token); - - // optionally choose the method the tokens will be provided with, default is RateLimitProvider - options.UseProvider, ApiKeyToken>(); - - // the type of token here depends on the api security specifications - ApiKeyToken token = new(""); - options.AddTokens(token); - - // optionally choose the method the tokens will be provided with, default is RateLimitProvider - options.UseProvider, ApiKeyToken>(); - - // the type of token here depends on the api security specifications - ApiKeyToken token = new(""); - options.AddTokens(token); - - // optionally choose the method the tokens will be provided with, default is RateLimitProvider - options.UseProvider, ApiKeyToken>(); - - // the type of token here depends on the api security specifications - ApiKeyToken token = new(""); - options.AddTokens(token); - - // optionally choose the method the tokens will be provided with, default is RateLimitProvider - options.UseProvider, ApiKeyToken>(); - - // the type of token here depends on the api security specifications - ApiKeyToken token = new(""); - options.AddTokens(token); - - // optionally choose the method the tokens will be provided with, default is RateLimitProvider - options.UseProvider, ApiKeyToken>(); - - // the type of token here depends on the api security specifications - ApiKeyToken token = new(""); - options.AddTokens(token); - - // optionally choose the method the tokens will be provided with, default is RateLimitProvider - options.UseProvider, ApiKeyToken>(); - - options.ConfigureJsonOptions((jsonOptions) => - { - // your custom converters if any - }); - - options.AddApiHttpClients(builder: builder => builder - .AddRetryPolicy(2) - .AddTimeoutPolicy(TimeSpan.FromSeconds(5)) - .AddCircuitBreakerPolicy(10, TimeSpan.FromSeconds(30)) - // add whatever middleware you prefer - ); - }); - } -} -``` - -## Questions - -- What about HttpRequest failures and retries? - If supportsRetry is enabled, you can configure Polly in the ConfigureClients method. -- How are tokens used? - Tokens are provided by a TokenProvider class. The default is RateLimitProvider which will perform client side rate limiting. - Other providers can be used with the UseProvider method. -- Does an HttpRequest throw an error when the server response is not Ok? - It depends how you made the request. If the return type is ApiResponse no error will be thrown, though the Content property will be null. - StatusCode and ReasonPhrase will contain information about the error. - If the return type is T, then it will throw. If the return type is TOrDefault, it will return null. - - -## Dependencies - -- [Microsoft.Extensions.Hosting](https://www.nuget.org/packages/Microsoft.Extensions.Hosting/) - 5.0.0 or later -- [Microsoft.Extensions.Http](https://www.nuget.org/packages/Microsoft.Extensions.Http/) - 5.0.0 or later -- [Microsoft.Extensions.Http.Polly](https://www.nuget.org/packages/Microsoft.Extensions.Http.Polly/) - 5.0.1 or later -- [Polly](https://www.nuget.org/packages/Polly/) - 7.2.3 or later -- [Newtonsoft.Json](https://www.nuget.org/packages/Newtonsoft.Json/) - 13.0.1 or later -- [JsonSubTypes](https://www.nuget.org/packages/JsonSubTypes/) - 1.7.0 or later -- [CompareNETObjects](https://www.nuget.org/packages/CompareNETObjects) - 4.61.0 or later -- [System.ComponentModel.Annotations](https://www.nuget.org/packages/System.ComponentModel.Annotations) - 4.7.0 or later - - -## Documentation for Authorization - -Authentication schemes defined for the API: - - -### api_key - -- **Type**: API key -- **API key parameter name**: api_key -- **Location**: HTTP header - - -### api_key_query - -- **Type**: API key -- **API key parameter name**: api_key_query -- **Location**: URL query string - - -### bearer_test - - -- **Type**: Bearer Authentication - - -### http_basic_test - - -- **Type**: HTTP basic authentication - - -### http_signature_test - - - - -### petstore_auth - - -- **Type**: OAuth -- **Flow**: implicit -- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog -- **Scopes**: -- write:pets: modify pets in your account -- read:pets: read your pets - -## Build -- SDK version: 1.0.0 -- Build package: org.openapitools.codegen.languages.CSharpNetCoreClientCodegen - -## Api Information -- appName: OpenAPI Petstore -- appVersion: 1.0.0 -- appDescription: 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 Global properties](https://openapi-generator.tech/docs/globals) -- generateAliasAsModel: -- supportingFiles: -- models: omitted for brevity -- apis: omitted for brevity -- apiDocs: true -- modelDocs: true -- apiTests: true -- modelTests: true -- withXml: - -## [OpenApi Generator Parameters](https://openapi-generator.tech/docs/generators/csharp-netcore) -- allowUnicodeIdentifiers: -- apiName: Api -- caseInsensitiveResponseHeaders: -- conditionalSerialization: false -- disallowAdditionalPropertiesIfNotPresent: false -- gitHost: github.com -- gitRepoId: GIT_REPO_ID -- gitUserId: GIT_USER_ID -- hideGenerationTimestamp: true -- interfacePrefix: I -- library: generichost -- licenseId: -- modelPropertyNaming: -- netCoreProjectFile: false -- nonPublicApi: false -- nullableReferenceTypes: false -- optionalAssemblyInfo: -- optionalEmitDefaultValues: false -- optionalMethodArgument: true -- optionalProjectFile: -- packageAuthors: OpenAPI -- packageCompany: OpenAPI -- packageCopyright: No Copyright -- packageDescription: A library generated from a OpenAPI doc -- packageGuid: {321C8C3F-0156-40C1-AE42-D59761FB9B6C} -- packageName: Org.OpenAPITools -- packageTags: -- packageTitle: OpenAPI Library -- packageVersion: 1.0.0 -- releaseNote: Minor update -- returnICollection: false -- sortParamsByRequiredFlag: -- sourceFolder: src -- targetFramework: net7.0 -- useCollection: false -- useDateTimeOffset: false -- useOneOfDiscriminatorLookup: false -- validatable: true - -This C# SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project. diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/apis/FakeApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/apis/FakeApi.md index f17e38282a..b815f20b5a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/apis/FakeApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/apis/FakeApi.md @@ -631,7 +631,7 @@ No authorization required # **TestBodyWithQueryParams** -> void TestBodyWithQueryParams (string query, User user) +> void TestBodyWithQueryParams (User user, string query) @@ -652,12 +652,12 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var query = "query_example"; // string | var user = new User(); // User | + var query = "query_example"; // string | try { - apiInstance.TestBodyWithQueryParams(query, user); + apiInstance.TestBodyWithQueryParams(user, query); } catch (ApiException e) { @@ -676,7 +676,7 @@ This returns an ApiResponse object which contains the response data, status code ```csharp try { - apiInstance.TestBodyWithQueryParamsWithHttpInfo(query, user); + apiInstance.TestBodyWithQueryParamsWithHttpInfo(user, query); } catch (ApiException e) { @@ -690,8 +690,8 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **query** | **string** | | | | **user** | [**User**](User.md) | | | +| **query** | **string** | | | ### Return type @@ -807,7 +807,7 @@ No authorization required # **TestEndpointParameters** -> void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, string password = null, string callback = null, DateTime? dateTime = null) +> void TestEndpointParameters (byte[] _byte, decimal number, double _double, string patternWithoutDelimiter, DateTime? date = null, System.IO.Stream binary = null, float? _float = null, int? integer = null, int? int32 = null, long? int64 = null, string _string = null, string password = null, string callback = null, DateTime? dateTime = null) Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -834,17 +834,17 @@ namespace Example config.Password = "YOUR_PASSWORD"; var apiInstance = new FakeApi(config); + var _byte = System.Text.Encoding.ASCII.GetBytes("BYTE_ARRAY_DATA_HERE"); // byte[] | None var number = 8.14D; // decimal | None var _double = 1.2D; // double | None var patternWithoutDelimiter = "patternWithoutDelimiter_example"; // string | None - var _byte = System.Text.Encoding.ASCII.GetBytes("BYTE_ARRAY_DATA_HERE"); // byte[] | None + var date = DateTime.Parse("2013-10-20"); // DateTime? | None (optional) + var binary = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | None (optional) + var _float = 3.4F; // float? | None (optional) var integer = 56; // int? | None (optional) var int32 = 56; // int? | None (optional) var int64 = 789L; // long? | None (optional) - var _float = 3.4F; // float? | None (optional) var _string = "_string_example"; // string | None (optional) - var binary = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | None (optional) - var date = DateTime.Parse("2013-10-20"); // DateTime? | None (optional) var password = "password_example"; // string | None (optional) var callback = "callback_example"; // string | None (optional) var dateTime = DateTime.Parse(""2010-02-01T10:20:10.111110+01:00""); // DateTime? | None (optional) (default to "2010-02-01T10:20:10.111110+01:00") @@ -852,7 +852,7 @@ namespace Example try { // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - apiInstance.TestEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, password, callback, dateTime); + apiInstance.TestEndpointParameters(_byte, number, _double, patternWithoutDelimiter, date, binary, _float, integer, int32, int64, _string, password, callback, dateTime); } catch (ApiException e) { @@ -872,7 +872,7 @@ This returns an ApiResponse object which contains the response data, status code try { // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - apiInstance.TestEndpointParametersWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, password, callback, dateTime); + apiInstance.TestEndpointParametersWithHttpInfo(_byte, number, _double, patternWithoutDelimiter, date, binary, _float, integer, int32, int64, _string, password, callback, dateTime); } catch (ApiException e) { @@ -886,17 +886,17 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| +| **_byte** | **byte[]** | None | | | **number** | **decimal** | None | | | **_double** | **double** | None | | | **patternWithoutDelimiter** | **string** | None | | -| **_byte** | **byte[]** | None | | +| **date** | **DateTime?** | None | [optional] | +| **binary** | **System.IO.Stream****System.IO.Stream** | None | [optional] | +| **_float** | **float?** | None | [optional] | | **integer** | **int?** | None | [optional] | | **int32** | **int?** | None | [optional] | | **int64** | **long?** | None | [optional] | -| **_float** | **float?** | None | [optional] | | **_string** | **string** | None | [optional] | -| **binary** | **System.IO.Stream****System.IO.Stream** | None | [optional] | -| **date** | **DateTime?** | None | [optional] | | **password** | **string** | None | [optional] | | **callback** | **string** | None | [optional] | | **dateTime** | **DateTime?** | None | [optional] [default to "2010-02-01T10:20:10.111110+01:00"] | @@ -925,7 +925,7 @@ void (empty response body) # **TestEnumParameters** -> void TestEnumParameters (List enumHeaderStringArray = null, List enumQueryStringArray = null, int? enumQueryInteger = null, double? enumQueryDouble = null, string enumHeaderString = null, string enumQueryString = null, List enumFormStringArray = null, string enumFormString = null) +> void TestEnumParameters (List enumHeaderStringArray = null, List enumQueryStringArray = null, double? enumQueryDouble = null, int? enumQueryInteger = null, List enumFormStringArray = null, string enumHeaderString = null, string enumQueryString = null, string enumFormString = null) To test enum parameters @@ -950,17 +950,17 @@ namespace Example var apiInstance = new FakeApi(config); var enumHeaderStringArray = new List(); // List | Header parameter enum test (string array) (optional) var enumQueryStringArray = new List(); // List | Query parameter enum test (string array) (optional) - var enumQueryInteger = 1; // int? | Query parameter enum test (double) (optional) var enumQueryDouble = 1.1D; // double? | Query parameter enum test (double) (optional) + var enumQueryInteger = 1; // int? | Query parameter enum test (double) (optional) + var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) var enumHeaderString = "_abc"; // string | Header parameter enum test (string) (optional) (default to -efg) var enumQueryString = "_abc"; // string | Query parameter enum test (string) (optional) (default to -efg) - var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) var enumFormString = "_abc"; // string | Form parameter enum test (string) (optional) (default to -efg) try { // To test enum parameters - apiInstance.TestEnumParameters(enumHeaderStringArray, enumQueryStringArray, enumQueryInteger, enumQueryDouble, enumHeaderString, enumQueryString, enumFormStringArray, enumFormString); + apiInstance.TestEnumParameters(enumHeaderStringArray, enumQueryStringArray, enumQueryDouble, enumQueryInteger, enumFormStringArray, enumHeaderString, enumQueryString, enumFormString); } catch (ApiException e) { @@ -980,7 +980,7 @@ This returns an ApiResponse object which contains the response data, status code try { // To test enum parameters - apiInstance.TestEnumParametersWithHttpInfo(enumHeaderStringArray, enumQueryStringArray, enumQueryInteger, enumQueryDouble, enumHeaderString, enumQueryString, enumFormStringArray, enumFormString); + apiInstance.TestEnumParametersWithHttpInfo(enumHeaderStringArray, enumQueryStringArray, enumQueryDouble, enumQueryInteger, enumFormStringArray, enumHeaderString, enumQueryString, enumFormString); } catch (ApiException e) { @@ -996,11 +996,11 @@ catch (ApiException e) |------|------|-------------|-------| | **enumHeaderStringArray** | [**List<string>**](string.md) | Header parameter enum test (string array) | [optional] | | **enumQueryStringArray** | [**List<string>**](string.md) | Query parameter enum test (string array) | [optional] | -| **enumQueryInteger** | **int?** | Query parameter enum test (double) | [optional] | | **enumQueryDouble** | **double?** | Query parameter enum test (double) | [optional] | +| **enumQueryInteger** | **int?** | Query parameter enum test (double) | [optional] | +| **enumFormStringArray** | [**List<string>**](string.md) | Form parameter enum test (string array) | [optional] [default to $] | | **enumHeaderString** | **string** | Header parameter enum test (string) | [optional] [default to -efg] | | **enumQueryString** | **string** | Query parameter enum test (string) | [optional] [default to -efg] | -| **enumFormStringArray** | [**List<string>**](string.md) | Form parameter enum test (string array) | [optional] [default to $] | | **enumFormString** | **string** | Form parameter enum test (string) | [optional] [default to -efg] | ### Return type @@ -1027,7 +1027,7 @@ No authorization required # **TestGroupParameters** -> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null) +> void TestGroupParameters (bool requiredBooleanGroup, int requiredStringGroup, long requiredInt64Group, bool? booleanGroup = null, int? stringGroup = null, long? int64Group = null) Fake endpoint to test group parameters (optional) @@ -1053,17 +1053,17 @@ namespace Example config.AccessToken = "YOUR_BEARER_TOKEN"; var apiInstance = new FakeApi(config); - var requiredStringGroup = 56; // int | Required String in group parameters var requiredBooleanGroup = true; // bool | Required Boolean in group parameters + var requiredStringGroup = 56; // int | Required String in group parameters var requiredInt64Group = 789L; // long | Required Integer in group parameters - var stringGroup = 56; // int? | String in group parameters (optional) var booleanGroup = true; // bool? | Boolean in group parameters (optional) + var stringGroup = 56; // int? | String in group parameters (optional) var int64Group = 789L; // long? | Integer in group parameters (optional) try { // Fake endpoint to test group parameters (optional) - apiInstance.TestGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + apiInstance.TestGroupParameters(requiredBooleanGroup, requiredStringGroup, requiredInt64Group, booleanGroup, stringGroup, int64Group); } catch (ApiException e) { @@ -1083,7 +1083,7 @@ This returns an ApiResponse object which contains the response data, status code try { // Fake endpoint to test group parameters (optional) - apiInstance.TestGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + apiInstance.TestGroupParametersWithHttpInfo(requiredBooleanGroup, requiredStringGroup, requiredInt64Group, booleanGroup, stringGroup, int64Group); } catch (ApiException e) { @@ -1097,11 +1097,11 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **requiredStringGroup** | **int** | Required String in group parameters | | | **requiredBooleanGroup** | **bool** | Required Boolean in group parameters | | +| **requiredStringGroup** | **int** | Required String in group parameters | | | **requiredInt64Group** | **long** | Required Integer in group parameters | | -| **stringGroup** | **int?** | String in group parameters | [optional] | | **booleanGroup** | **bool?** | Boolean in group parameters | [optional] | +| **stringGroup** | **int?** | String in group parameters | [optional] | | **int64Group** | **long?** | Integer in group parameters | [optional] | ### Return type diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/apis/PetApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/apis/PetApi.md index 8ece47af9c..da6486e4cd 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/apis/PetApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/apis/PetApi.md @@ -664,7 +664,7 @@ void (empty response body) # **UploadFile** -> ApiResponse UploadFile (long petId, string additionalMetadata = null, System.IO.Stream file = null) +> ApiResponse UploadFile (long petId, System.IO.Stream file = null, string additionalMetadata = null) uploads an image @@ -689,13 +689,13 @@ namespace Example var apiInstance = new PetApi(config); var petId = 789L; // long | ID of pet to update - var additionalMetadata = "additionalMetadata_example"; // string | Additional data to pass to server (optional) var file = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | file to upload (optional) + var additionalMetadata = "additionalMetadata_example"; // string | Additional data to pass to server (optional) try { // uploads an image - ApiResponse result = apiInstance.UploadFile(petId, additionalMetadata, file); + ApiResponse result = apiInstance.UploadFile(petId, file, additionalMetadata); Debug.WriteLine(result); } catch (ApiException e) @@ -716,7 +716,7 @@ This returns an ApiResponse object which contains the response data, status code try { // uploads an image - ApiResponse response = apiInstance.UploadFileWithHttpInfo(petId, additionalMetadata, file); + ApiResponse response = apiInstance.UploadFileWithHttpInfo(petId, file, additionalMetadata); Debug.Write("Status Code: " + response.StatusCode); Debug.Write("Response Headers: " + response.Headers); Debug.Write("Response Body: " + response.Data); @@ -734,8 +734,8 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| | **petId** | **long** | ID of pet to update | | -| **additionalMetadata** | **string** | Additional data to pass to server | [optional] | | **file** | **System.IO.Stream****System.IO.Stream** | file to upload | [optional] | +| **additionalMetadata** | **string** | Additional data to pass to server | [optional] | ### Return type @@ -760,7 +760,7 @@ catch (ApiException e) # **UploadFileWithRequiredFile** -> ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, string additionalMetadata = null) +> ApiResponse UploadFileWithRequiredFile (System.IO.Stream requiredFile, long petId, string additionalMetadata = null) uploads an image (required) @@ -784,14 +784,14 @@ namespace Example config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(config); - var petId = 789L; // long | ID of pet to update var requiredFile = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | file to upload + var petId = 789L; // long | ID of pet to update var additionalMetadata = "additionalMetadata_example"; // string | Additional data to pass to server (optional) try { // uploads an image (required) - ApiResponse result = apiInstance.UploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); + ApiResponse result = apiInstance.UploadFileWithRequiredFile(requiredFile, petId, additionalMetadata); Debug.WriteLine(result); } catch (ApiException e) @@ -812,7 +812,7 @@ This returns an ApiResponse object which contains the response data, status code try { // uploads an image (required) - ApiResponse response = apiInstance.UploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata); + ApiResponse response = apiInstance.UploadFileWithRequiredFileWithHttpInfo(requiredFile, petId, additionalMetadata); Debug.Write("Status Code: " + response.StatusCode); Debug.Write("Response Headers: " + response.Headers); Debug.Write("Response Body: " + response.Data); @@ -829,8 +829,8 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **petId** | **long** | ID of pet to update | | | **requiredFile** | **System.IO.Stream****System.IO.Stream** | file to upload | | +| **petId** | **long** | ID of pet to update | | | **additionalMetadata** | **string** | Additional data to pass to server | [optional] | ### Return type diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/apis/UserApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/apis/UserApi.md index fd1c1a7d62..a862c8c112 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/apis/UserApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/apis/UserApi.md @@ -623,7 +623,7 @@ No authorization required # **UpdateUser** -> void UpdateUser (string username, User user) +> void UpdateUser (User user, string username) Updated user @@ -646,13 +646,13 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); - var username = "username_example"; // string | name that need to be deleted var user = new User(); // User | Updated user object + var username = "username_example"; // string | name that need to be deleted try { // Updated user - apiInstance.UpdateUser(username, user); + apiInstance.UpdateUser(user, username); } catch (ApiException e) { @@ -672,7 +672,7 @@ This returns an ApiResponse object which contains the response data, status code try { // Updated user - apiInstance.UpdateUserWithHttpInfo(username, user); + apiInstance.UpdateUserWithHttpInfo(user, username); } catch (ApiException e) { @@ -686,8 +686,8 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **username** | **string** | name that need to be deleted | | | **user** | [**User**](User.md) | Updated user object | | +| **username** | **string** | name that need to be deleted | | ### Return type diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/AdditionalPropertiesClass.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/AdditionalPropertiesClass.md index 1f91945000..f79869f95a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/AdditionalPropertiesClass.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/AdditionalPropertiesClass.md @@ -4,14 +4,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**MapProperty** | **Dictionary<string, string>** | | [optional] +**EmptyMap** | **Object** | an object with no declared properties and no undeclared properties, hence it's an empty map. | [optional] **MapOfMapProperty** | **Dictionary<string, Dictionary<string, string>>** | | [optional] -**Anytype1** | **Object** | | [optional] +**MapProperty** | **Dictionary<string, string>** | | [optional] **MapWithUndeclaredPropertiesAnytype1** | **Object** | | [optional] **MapWithUndeclaredPropertiesAnytype2** | **Object** | | [optional] **MapWithUndeclaredPropertiesAnytype3** | **Dictionary<string, Object>** | | [optional] -**EmptyMap** | **Object** | an object with no declared properties and no undeclared properties, hence it's an empty map. | [optional] **MapWithUndeclaredPropertiesString** | **Dictionary<string, string>** | | [optional] +**Anytype1** | **Object** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/ApiResponse.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/ApiResponse.md index bc808ceeae..d89ed1a25d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/ApiResponse.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/ApiResponse.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Code** | **int** | | [optional] -**Type** | **string** | | [optional] **Message** | **string** | | [optional] +**Type** | **string** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/ArrayTest.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/ArrayTest.md index 32365e6d4d..ed572120cd 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/ArrayTest.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/ArrayTest.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ArrayOfString** | **List<string>** | | [optional] **ArrayArrayOfInteger** | **List<List<long>>** | | [optional] **ArrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [optional] +**ArrayOfString** | **List<string>** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Capitalization.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Capitalization.md index fde98a967e..9e225c1723 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Capitalization.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Capitalization.md @@ -4,12 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**SmallCamel** | **string** | | [optional] +**ATT_NAME** | **string** | Name of the pet | [optional] **CapitalCamel** | **string** | | [optional] -**SmallSnake** | **string** | | [optional] **CapitalSnake** | **string** | | [optional] **SCAETHFlowPoints** | **string** | | [optional] -**ATT_NAME** | **string** | Name of the pet | [optional] +**SmallCamel** | **string** | | [optional] +**SmallSnake** | **string** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Category.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Category.md index c2cf3f8e91..6eb0a2e13e 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Category.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Category.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | **string** | | [default to "default-name"] **Id** | **long** | | [optional] +**Name** | **string** | | [default to "default-name"] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/ClassModel.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/ClassModel.md index bb35816c91..a098828a04 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/ClassModel.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/ClassModel.md @@ -5,7 +5,7 @@ Model for testing model with \"_class\" property Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Class** | **string** | | [optional] +**ClassProperty** | **string** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Drawing.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Drawing.md index 18117e6c93..fcee9662af 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Drawing.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Drawing.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **MainShape** | [**Shape**](Shape.md) | | [optional] **ShapeOrNull** | [**ShapeOrNull**](ShapeOrNull.md) | | [optional] -**NullableShape** | [**NullableShape**](NullableShape.md) | | [optional] **Shapes** | [**List<Shape>**](Shape.md) | | [optional] +**NullableShape** | [**NullableShape**](NullableShape.md) | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/EnumArrays.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/EnumArrays.md index 2a27962cc5..7467f67978 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/EnumArrays.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/EnumArrays.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**JustSymbol** | **string** | | [optional] **ArrayEnum** | **List<EnumArrays.ArrayEnumEnum>** | | [optional] +**JustSymbol** | **string** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/EnumTest.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/EnumTest.md index 71602270ba..53bbfe31e7 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/EnumTest.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/EnumTest.md @@ -4,15 +4,15 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**EnumStringRequired** | **string** | | -**EnumString** | **string** | | [optional] **EnumInteger** | **int** | | [optional] **EnumIntegerOnly** | **int** | | [optional] **EnumNumber** | **double** | | [optional] -**OuterEnum** | **OuterEnum** | | [optional] -**OuterEnumInteger** | **OuterEnumInteger** | | [optional] +**EnumString** | **string** | | [optional] +**EnumStringRequired** | **string** | | **OuterEnumDefaultValue** | **OuterEnumDefaultValue** | | [optional] +**OuterEnumInteger** | **OuterEnumInteger** | | [optional] **OuterEnumIntegerDefaultValue** | **OuterEnumIntegerDefaultValue** | | [optional] +**OuterEnum** | **OuterEnum** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/FooGetDefaultResponse.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/FooGetDefaultResponse.md index 47e50daca3..78c99facf5 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/FooGetDefaultResponse.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/FooGetDefaultResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**String** | [**Foo**](Foo.md) | | [optional] +**StringProperty** | [**Foo**](Foo.md) | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/FormatTest.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/FormatTest.md index 0b92c2fb10..4e34a6d18b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/FormatTest.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/FormatTest.md @@ -4,22 +4,22 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Number** | **decimal** | | -**Byte** | **byte[]** | | +**Binary** | **System.IO.Stream** | | [optional] +**ByteProperty** | **byte[]** | | **Date** | **DateTime** | | -**Password** | **string** | | -**Integer** | **int** | | [optional] +**DateTime** | **DateTime** | | [optional] +**DecimalProperty** | **decimal** | | [optional] +**DoubleProperty** | **double** | | [optional] +**FloatProperty** | **float** | | [optional] **Int32** | **int** | | [optional] **Int64** | **long** | | [optional] -**Float** | **float** | | [optional] -**Double** | **double** | | [optional] -**Decimal** | **decimal** | | [optional] -**String** | **string** | | [optional] -**Binary** | **System.IO.Stream** | | [optional] -**DateTime** | **DateTime** | | [optional] -**Uuid** | **Guid** | | [optional] +**Integer** | **int** | | [optional] +**Number** | **decimal** | | +**Password** | **string** | | **PatternWithDigits** | **string** | A string that is a 10 digit number. Can have leading zeros. | [optional] **PatternWithDigitsAndDelimiter** | **string** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [optional] +**StringProperty** | **string** | | [optional] +**Uuid** | **Guid** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/MapTest.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/MapTest.md index aaee09f787..5dd27228bb 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/MapTest.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/MapTest.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**MapMapOfString** | **Dictionary<string, Dictionary<string, string>>** | | [optional] -**MapOfEnumString** | **Dictionary<string, MapTest.InnerEnum>** | | [optional] **DirectMap** | **Dictionary<string, bool>** | | [optional] **IndirectMap** | **Dictionary<string, bool>** | | [optional] +**MapMapOfString** | **Dictionary<string, Dictionary<string, string>>** | | [optional] +**MapOfEnumString** | **Dictionary<string, MapTest.InnerEnum>** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/MixedPropertiesAndAdditionalPropertiesClass.md index 031d2b9606..0bac85a8e8 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/MixedPropertiesAndAdditionalPropertiesClass.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Uuid** | **Guid** | | [optional] **DateTime** | **DateTime** | | [optional] **Map** | [**Dictionary<string, Animal>**](Animal.md) | | [optional] +**Uuid** | **Guid** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Model200Response.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Model200Response.md index 8bc8049f46..93139e1d1a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Model200Response.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Model200Response.md @@ -5,8 +5,8 @@ Model for testing model name starting with number Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**ClassProperty** | **string** | | [optional] **Name** | **int** | | [optional] -**Class** | **string** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/ModelClient.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/ModelClient.md index 9e0e83645f..51cf0636e7 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/ModelClient.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/ModelClient.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**_Client** | **string** | | [optional] +**_ClientProperty** | **string** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Name.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Name.md index 2ee782c0c5..11f49b9fd4 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Name.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Name.md @@ -6,8 +6,8 @@ Model for testing model name same as property name Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **NameProperty** | **int** | | -**SnakeCase** | **int** | | [optional] [readonly] **Property** | **string** | | [optional] +**SnakeCase** | **int** | | [optional] [readonly] **_123Number** | **int** | | [optional] [readonly] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/NullableClass.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/NullableClass.md index d4a19d1856..ac86336ea7 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/NullableClass.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/NullableClass.md @@ -4,18 +4,18 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**IntegerProp** | **int?** | | [optional] -**NumberProp** | **decimal?** | | [optional] +**ArrayItemsNullable** | **List<Object>** | | [optional] +**ObjectItemsNullable** | **Dictionary<string, Object>** | | [optional] +**ArrayAndItemsNullableProp** | **List<Object>** | | [optional] +**ArrayNullableProp** | **List<Object>** | | [optional] **BooleanProp** | **bool?** | | [optional] -**StringProp** | **string** | | [optional] **DateProp** | **DateTime?** | | [optional] **DatetimeProp** | **DateTime?** | | [optional] -**ArrayNullableProp** | **List<Object>** | | [optional] -**ArrayAndItemsNullableProp** | **List<Object>** | | [optional] -**ArrayItemsNullable** | **List<Object>** | | [optional] -**ObjectNullableProp** | **Dictionary<string, Object>** | | [optional] +**IntegerProp** | **int?** | | [optional] +**NumberProp** | **decimal?** | | [optional] **ObjectAndItemsNullableProp** | **Dictionary<string, Object>** | | [optional] -**ObjectItemsNullable** | **Dictionary<string, Object>** | | [optional] +**ObjectNullableProp** | **Dictionary<string, Object>** | | [optional] +**StringProp** | **string** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/ObjectWithDeprecatedFields.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/ObjectWithDeprecatedFields.md index b737f7d757..9f44c24d19 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/ObjectWithDeprecatedFields.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/ObjectWithDeprecatedFields.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Uuid** | **string** | | [optional] -**Id** | **decimal** | | [optional] -**DeprecatedRef** | [**DeprecatedObject**](DeprecatedObject.md) | | [optional] **Bars** | **List<string>** | | [optional] +**DeprecatedRef** | [**DeprecatedObject**](DeprecatedObject.md) | | [optional] +**Id** | **decimal** | | [optional] +**Uuid** | **string** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/OuterComposite.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/OuterComposite.md index abf676810f..8985c59d09 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/OuterComposite.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/OuterComposite.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**MyBoolean** | **bool** | | [optional] **MyNumber** | **decimal** | | [optional] **MyString** | **string** | | [optional] -**MyBoolean** | **bool** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Pet.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Pet.md index 7de10304ab..b13bb576b4 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Pet.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/Pet.md @@ -4,12 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**Category** | [**Category**](Category.md) | | [optional] +**Id** | **long** | | [optional] **Name** | **string** | | **PhotoUrls** | **List<string>** | | -**Id** | **long** | | [optional] -**Category** | [**Category**](Category.md) | | [optional] -**Tags** | [**List<Tag>**](Tag.md) | | [optional] **Status** | **string** | pet status in the store | [optional] +**Tags** | [**List<Tag>**](Tag.md) | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/SpecialModelName.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/SpecialModelName.md index 662fa6f4a3..b48f349000 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/SpecialModelName.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/SpecialModelName.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**SpecialPropertyName** | **long** | | [optional] **SpecialModelNameProperty** | **string** | | [optional] +**SpecialPropertyName** | **long** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/User.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/User.md index a0f0d22389..455f031674 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/User.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/models/User.md @@ -4,18 +4,18 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **long** | | [optional] -**Username** | **string** | | [optional] -**FirstName** | **string** | | [optional] -**LastName** | **string** | | [optional] **Email** | **string** | | [optional] +**FirstName** | **string** | | [optional] +**Id** | **long** | | [optional] +**LastName** | **string** | | [optional] +**ObjectWithNoDeclaredProps** | **Object** | test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. | [optional] **Password** | **string** | | [optional] **Phone** | **string** | | [optional] **UserStatus** | **int** | User Status | [optional] -**ObjectWithNoDeclaredProps** | **Object** | test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. | [optional] -**ObjectWithNoDeclaredPropsNullable** | **Object** | test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. | [optional] +**Username** | **string** | | [optional] **AnyTypeProp** | **Object** | test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389 | [optional] **AnyTypePropNullable** | **Object** | test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values. | [optional] +**ObjectWithNoDeclaredPropsNullable** | **Object** | test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Api/AnotherFakeApiTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Api/AnotherFakeApiTests.cs index fea7e39428..30f54c0aab 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Api/AnotherFakeApiTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Api/AnotherFakeApiTests.cs @@ -12,7 +12,7 @@ using System.Collections.Generic; using System.Threading.Tasks; using Xunit; using Microsoft.Extensions.DependencyInjection; -using Org.OpenAPITools.Api; +using Org.OpenAPITools.IApi; using Org.OpenAPITools.Model; @@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api /// public sealed class AnotherFakeApiTests : ApiTestsBase { - private readonly IAnotherFakeApi _instance; + private readonly IApi.IAnotherFakeApi _instance; public AnotherFakeApiTests(): base(Array.Empty()) { - _instance = _host.Services.GetRequiredService(); + _instance = _host.Services.GetRequiredService(); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Api/ApiTestsBase.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Api/ApiTestsBase.cs index 88d6fc1f48..75e37de241 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Api/ApiTestsBase.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Api/ApiTestsBase.cs @@ -12,6 +12,7 @@ using System.Collections.Generic; using System.Security.Cryptography; using Microsoft.Extensions.Hosting; using Org.OpenAPITools.Client; +using Org.OpenAPITools.Extensions; /* ********************************************************************************* @@ -49,7 +50,7 @@ namespace Org.OpenAPITools.Test.Api } public static IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args) - .ConfigureApi((context, options) => + .ConfigureApi((context, services, options) => { ApiKeyToken apiKeyToken = new ApiKeyToken(context.Configuration[""], timeout: TimeSpan.FromSeconds(1)); options.AddTokens(apiKeyToken); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Api/DefaultApiTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Api/DefaultApiTests.cs index 16f60704f2..d79076dcd6 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Api/DefaultApiTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Api/DefaultApiTests.cs @@ -12,7 +12,7 @@ using System.Collections.Generic; using System.Threading.Tasks; using Xunit; using Microsoft.Extensions.DependencyInjection; -using Org.OpenAPITools.Api; +using Org.OpenAPITools.IApi; using Org.OpenAPITools.Model; @@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api /// public sealed class DefaultApiTests : ApiTestsBase { - private readonly IDefaultApi _instance; + private readonly IApi.IDefaultApi _instance; public DefaultApiTests(): base(Array.Empty()) { - _instance = _host.Services.GetRequiredService(); + _instance = _host.Services.GetRequiredService(); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Api/DependencyInjectionTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Api/DependencyInjectionTests.cs index 4eee3d2b6e..256df5697c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Api/DependencyInjectionTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Api/DependencyInjectionTests.cs @@ -13,7 +13,8 @@ using Microsoft.Extensions.DependencyInjection; using System.Collections.Generic; using System.Security.Cryptography; using Org.OpenAPITools.Client; -using Org.OpenAPITools.Api; +using Org.OpenAPITools.IApi; +using Org.OpenAPITools.Extensions; using Xunit; namespace Org.OpenAPITools.Test.Api @@ -24,7 +25,7 @@ namespace Org.OpenAPITools.Test.Api public class DependencyInjectionTest { private readonly IHost _hostUsingConfigureWithoutAClient = - Host.CreateDefaultBuilder(Array.Empty()).ConfigureApi((context, options) => + Host.CreateDefaultBuilder(Array.Empty()).ConfigureApi((context, services, options) => { ApiKeyToken apiKeyToken = new ApiKeyToken($"", timeout: TimeSpan.FromSeconds(1)); options.AddTokens(apiKeyToken); @@ -45,7 +46,7 @@ namespace Org.OpenAPITools.Test.Api .Build(); private readonly IHost _hostUsingConfigureWithAClient = - Host.CreateDefaultBuilder(Array.Empty()).ConfigureApi((context, options) => + Host.CreateDefaultBuilder(Array.Empty()).ConfigureApi((context, services, options) => { ApiKeyToken apiKeyToken = new ApiKeyToken($"", timeout: TimeSpan.FromSeconds(1)); options.AddTokens(apiKeyToken); @@ -121,25 +122,25 @@ namespace Org.OpenAPITools.Test.Api [Fact] public void ConfigureApiWithAClientTest() { - var anotherFakeApi = _hostUsingConfigureWithAClient.Services.GetRequiredService(); + var anotherFakeApi = _hostUsingConfigureWithAClient.Services.GetRequiredService(); Assert.True(anotherFakeApi.HttpClient.BaseAddress != null); - var defaultApi = _hostUsingConfigureWithAClient.Services.GetRequiredService(); + var defaultApi = _hostUsingConfigureWithAClient.Services.GetRequiredService(); Assert.True(defaultApi.HttpClient.BaseAddress != null); - var fakeApi = _hostUsingConfigureWithAClient.Services.GetRequiredService(); + var fakeApi = _hostUsingConfigureWithAClient.Services.GetRequiredService(); Assert.True(fakeApi.HttpClient.BaseAddress != null); - var fakeClassnameTags123Api = _hostUsingConfigureWithAClient.Services.GetRequiredService(); + var fakeClassnameTags123Api = _hostUsingConfigureWithAClient.Services.GetRequiredService(); Assert.True(fakeClassnameTags123Api.HttpClient.BaseAddress != null); - var petApi = _hostUsingConfigureWithAClient.Services.GetRequiredService(); + var petApi = _hostUsingConfigureWithAClient.Services.GetRequiredService(); Assert.True(petApi.HttpClient.BaseAddress != null); - var storeApi = _hostUsingConfigureWithAClient.Services.GetRequiredService(); + var storeApi = _hostUsingConfigureWithAClient.Services.GetRequiredService(); Assert.True(storeApi.HttpClient.BaseAddress != null); - var userApi = _hostUsingConfigureWithAClient.Services.GetRequiredService(); + var userApi = _hostUsingConfigureWithAClient.Services.GetRequiredService(); Assert.True(userApi.HttpClient.BaseAddress != null); } @@ -149,25 +150,25 @@ namespace Org.OpenAPITools.Test.Api [Fact] public void ConfigureApiWithoutAClientTest() { - var anotherFakeApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService(); + var anotherFakeApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService(); Assert.True(anotherFakeApi.HttpClient.BaseAddress != null); - var defaultApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService(); + var defaultApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService(); Assert.True(defaultApi.HttpClient.BaseAddress != null); - var fakeApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService(); + var fakeApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService(); Assert.True(fakeApi.HttpClient.BaseAddress != null); - var fakeClassnameTags123Api = _hostUsingConfigureWithoutAClient.Services.GetRequiredService(); + var fakeClassnameTags123Api = _hostUsingConfigureWithoutAClient.Services.GetRequiredService(); Assert.True(fakeClassnameTags123Api.HttpClient.BaseAddress != null); - var petApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService(); + var petApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService(); Assert.True(petApi.HttpClient.BaseAddress != null); - var storeApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService(); + var storeApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService(); Assert.True(storeApi.HttpClient.BaseAddress != null); - var userApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService(); + var userApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService(); Assert.True(userApi.HttpClient.BaseAddress != null); } @@ -177,25 +178,25 @@ namespace Org.OpenAPITools.Test.Api [Fact] public void AddApiWithAClientTest() { - var anotherFakeApi = _hostUsingAddWithAClient.Services.GetRequiredService(); + var anotherFakeApi = _hostUsingAddWithAClient.Services.GetRequiredService(); Assert.True(anotherFakeApi.HttpClient.BaseAddress != null); - var defaultApi = _hostUsingAddWithAClient.Services.GetRequiredService(); + var defaultApi = _hostUsingAddWithAClient.Services.GetRequiredService(); Assert.True(defaultApi.HttpClient.BaseAddress != null); - var fakeApi = _hostUsingAddWithAClient.Services.GetRequiredService(); + var fakeApi = _hostUsingAddWithAClient.Services.GetRequiredService(); Assert.True(fakeApi.HttpClient.BaseAddress != null); - var fakeClassnameTags123Api = _hostUsingAddWithAClient.Services.GetRequiredService(); + var fakeClassnameTags123Api = _hostUsingAddWithAClient.Services.GetRequiredService(); Assert.True(fakeClassnameTags123Api.HttpClient.BaseAddress != null); - var petApi = _hostUsingAddWithAClient.Services.GetRequiredService(); + var petApi = _hostUsingAddWithAClient.Services.GetRequiredService(); Assert.True(petApi.HttpClient.BaseAddress != null); - var storeApi = _hostUsingAddWithAClient.Services.GetRequiredService(); + var storeApi = _hostUsingAddWithAClient.Services.GetRequiredService(); Assert.True(storeApi.HttpClient.BaseAddress != null); - var userApi = _hostUsingAddWithAClient.Services.GetRequiredService(); + var userApi = _hostUsingAddWithAClient.Services.GetRequiredService(); Assert.True(userApi.HttpClient.BaseAddress != null); } @@ -205,25 +206,25 @@ namespace Org.OpenAPITools.Test.Api [Fact] public void AddApiWithoutAClientTest() { - var anotherFakeApi = _hostUsingAddWithoutAClient.Services.GetRequiredService(); + var anotherFakeApi = _hostUsingAddWithoutAClient.Services.GetRequiredService(); Assert.True(anotherFakeApi.HttpClient.BaseAddress != null); - var defaultApi = _hostUsingAddWithoutAClient.Services.GetRequiredService(); + var defaultApi = _hostUsingAddWithoutAClient.Services.GetRequiredService(); Assert.True(defaultApi.HttpClient.BaseAddress != null); - var fakeApi = _hostUsingAddWithoutAClient.Services.GetRequiredService(); + var fakeApi = _hostUsingAddWithoutAClient.Services.GetRequiredService(); Assert.True(fakeApi.HttpClient.BaseAddress != null); - var fakeClassnameTags123Api = _hostUsingAddWithoutAClient.Services.GetRequiredService(); + var fakeClassnameTags123Api = _hostUsingAddWithoutAClient.Services.GetRequiredService(); Assert.True(fakeClassnameTags123Api.HttpClient.BaseAddress != null); - var petApi = _hostUsingAddWithoutAClient.Services.GetRequiredService(); + var petApi = _hostUsingAddWithoutAClient.Services.GetRequiredService(); Assert.True(petApi.HttpClient.BaseAddress != null); - var storeApi = _hostUsingAddWithoutAClient.Services.GetRequiredService(); + var storeApi = _hostUsingAddWithoutAClient.Services.GetRequiredService(); Assert.True(storeApi.HttpClient.BaseAddress != null); - var userApi = _hostUsingAddWithoutAClient.Services.GetRequiredService(); + var userApi = _hostUsingAddWithoutAClient.Services.GetRequiredService(); Assert.True(userApi.HttpClient.BaseAddress != null); } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs index b70f2a8adc..4c965120e6 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs @@ -12,7 +12,7 @@ using System.Collections.Generic; using System.Threading.Tasks; using Xunit; using Microsoft.Extensions.DependencyInjection; -using Org.OpenAPITools.Api; +using Org.OpenAPITools.IApi; using Org.OpenAPITools.Model; @@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api /// public sealed class FakeApiTests : ApiTestsBase { - private readonly IFakeApi _instance; + private readonly IApi.IFakeApi _instance; public FakeApiTests(): base(Array.Empty()) { - _instance = _host.Services.GetRequiredService(); + _instance = _host.Services.GetRequiredService(); } @@ -131,9 +131,9 @@ namespace Org.OpenAPITools.Test.Api [Fact (Skip = "not implemented")] public async Task TestBodyWithQueryParamsAsyncTest() { - string query = default; User user = default; - await _instance.TestBodyWithQueryParamsAsync(query, user); + string query = default; + await _instance.TestBodyWithQueryParamsAsync(user, query); } /// @@ -153,21 +153,21 @@ namespace Org.OpenAPITools.Test.Api [Fact (Skip = "not implemented")] public async Task TestEndpointParametersAsyncTest() { + byte[] _byte = default; decimal number = default; double _double = default; string patternWithoutDelimiter = default; - byte[] _byte = default; + DateTime? date = default; + System.IO.Stream binary = default; + float? _float = default; int? integer = default; int? int32 = default; long? int64 = default; - float? _float = default; string _string = default; - System.IO.Stream binary = default; - DateTime? date = default; string password = default; string callback = default; DateTime? dateTime = default; - await _instance.TestEndpointParametersAsync(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, password, callback, dateTime); + await _instance.TestEndpointParametersAsync(_byte, number, _double, patternWithoutDelimiter, date, binary, _float, integer, int32, int64, _string, password, callback, dateTime); } /// @@ -178,13 +178,13 @@ namespace Org.OpenAPITools.Test.Api { List enumHeaderStringArray = default; List enumQueryStringArray = default; - int? enumQueryInteger = default; double? enumQueryDouble = default; + int? enumQueryInteger = default; + List enumFormStringArray = default; string enumHeaderString = default; string enumQueryString = default; - List enumFormStringArray = default; string enumFormString = default; - await _instance.TestEnumParametersAsync(enumHeaderStringArray, enumQueryStringArray, enumQueryInteger, enumQueryDouble, enumHeaderString, enumQueryString, enumFormStringArray, enumFormString); + await _instance.TestEnumParametersAsync(enumHeaderStringArray, enumQueryStringArray, enumQueryDouble, enumQueryInteger, enumFormStringArray, enumHeaderString, enumQueryString, enumFormString); } /// @@ -193,13 +193,13 @@ namespace Org.OpenAPITools.Test.Api [Fact (Skip = "not implemented")] public async Task TestGroupParametersAsyncTest() { - int requiredStringGroup = default; bool requiredBooleanGroup = default; + int requiredStringGroup = default; long requiredInt64Group = default; - int? stringGroup = default; bool? booleanGroup = default; + int? stringGroup = default; long? int64Group = default; - await _instance.TestGroupParametersAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + await _instance.TestGroupParametersAsync(requiredBooleanGroup, requiredStringGroup, requiredInt64Group, booleanGroup, stringGroup, int64Group); } /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Api/FakeClassnameTags123ApiTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Api/FakeClassnameTags123ApiTests.cs index 0e8d44fe98..5a34bf585f 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Api/FakeClassnameTags123ApiTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Api/FakeClassnameTags123ApiTests.cs @@ -12,7 +12,7 @@ using System.Collections.Generic; using System.Threading.Tasks; using Xunit; using Microsoft.Extensions.DependencyInjection; -using Org.OpenAPITools.Api; +using Org.OpenAPITools.IApi; using Org.OpenAPITools.Model; @@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api /// public sealed class FakeClassnameTags123ApiTests : ApiTestsBase { - private readonly IFakeClassnameTags123Api _instance; + private readonly IApi.IFakeClassnameTags123Api _instance; public FakeClassnameTags123ApiTests(): base(Array.Empty()) { - _instance = _host.Services.GetRequiredService(); + _instance = _host.Services.GetRequiredService(); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Api/PetApiTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Api/PetApiTests.cs index 92922eda1b..8ebf3b80bf 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Api/PetApiTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Api/PetApiTests.cs @@ -12,7 +12,7 @@ using System.Collections.Generic; using System.Threading.Tasks; using Xunit; using Microsoft.Extensions.DependencyInjection; -using Org.OpenAPITools.Api; +using Org.OpenAPITools.IApi; using Org.OpenAPITools.Model; @@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api /// public sealed class PetApiTests : ApiTestsBase { - private readonly IPetApi _instance; + private readonly IApi.IPetApi _instance; public PetApiTests(): base(Array.Empty()) { - _instance = _host.Services.GetRequiredService(); + _instance = _host.Services.GetRequiredService(); } @@ -134,9 +134,9 @@ namespace Org.OpenAPITools.Test.Api public async Task UploadFileAsyncTest() { long petId = default; - string additionalMetadata = default; System.IO.Stream file = default; - var response = await _instance.UploadFileAsync(petId, additionalMetadata, file); + string additionalMetadata = default; + var response = await _instance.UploadFileAsync(petId, file, additionalMetadata); Assert.IsType(response); } @@ -146,10 +146,10 @@ namespace Org.OpenAPITools.Test.Api [Fact (Skip = "not implemented")] public async Task UploadFileWithRequiredFileAsyncTest() { - long petId = default; System.IO.Stream requiredFile = default; + long petId = default; string additionalMetadata = default; - var response = await _instance.UploadFileWithRequiredFileAsync(petId, requiredFile, additionalMetadata); + var response = await _instance.UploadFileWithRequiredFileAsync(requiredFile, petId, additionalMetadata); Assert.IsType(response); } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Api/StoreApiTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Api/StoreApiTests.cs index 98748893e3..679d648838 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Api/StoreApiTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Api/StoreApiTests.cs @@ -12,7 +12,7 @@ using System.Collections.Generic; using System.Threading.Tasks; using Xunit; using Microsoft.Extensions.DependencyInjection; -using Org.OpenAPITools.Api; +using Org.OpenAPITools.IApi; using Org.OpenAPITools.Model; @@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api /// public sealed class StoreApiTests : ApiTestsBase { - private readonly IStoreApi _instance; + private readonly IApi.IStoreApi _instance; public StoreApiTests(): base(Array.Empty()) { - _instance = _host.Services.GetRequiredService(); + _instance = _host.Services.GetRequiredService(); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Api/UserApiTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Api/UserApiTests.cs index 0df256733a..b8006066fa 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Api/UserApiTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Api/UserApiTests.cs @@ -12,7 +12,7 @@ using System.Collections.Generic; using System.Threading.Tasks; using Xunit; using Microsoft.Extensions.DependencyInjection; -using Org.OpenAPITools.Api; +using Org.OpenAPITools.IApi; using Org.OpenAPITools.Model; @@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api /// public sealed class UserApiTests : ApiTestsBase { - private readonly IUserApi _instance; + private readonly IApi.IUserApi _instance; public UserApiTests(): base(Array.Empty()) { - _instance = _host.Services.GetRequiredService(); + _instance = _host.Services.GetRequiredService(); } @@ -129,9 +129,9 @@ namespace Org.OpenAPITools.Test.Api [Fact (Skip = "not implemented")] public async Task UpdateUserAsyncTest() { - string username = default; User user = default; - await _instance.UpdateUserAsync(username, user); + string username = default; + await _instance.UpdateUserAsync(user, username); } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ActivityOutputElementRepresentationTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ActivityOutputElementRepresentationTests.cs index f211a64884..174a7e333a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ActivityOutputElementRepresentationTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ActivityOutputElementRepresentationTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ActivityTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ActivityTests.cs index afe9e846ee..c7479a3c34 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ActivityTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ActivityTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesClassTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesClassTests.cs index 9ab029ed09..95bd159350 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesClassTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesClassTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -57,12 +56,12 @@ namespace Org.OpenAPITools.Test.Model /// - /// Test the property 'MapProperty' + /// Test the property 'EmptyMap' /// [Fact] - public void MapPropertyTest() + public void EmptyMapTest() { - // TODO unit test for the property 'MapProperty' + // TODO unit test for the property 'EmptyMap' } /// /// Test the property 'MapOfMapProperty' @@ -73,12 +72,12 @@ namespace Org.OpenAPITools.Test.Model // TODO unit test for the property 'MapOfMapProperty' } /// - /// Test the property 'Anytype1' + /// Test the property 'MapProperty' /// [Fact] - public void Anytype1Test() + public void MapPropertyTest() { - // TODO unit test for the property 'Anytype1' + // TODO unit test for the property 'MapProperty' } /// /// Test the property 'MapWithUndeclaredPropertiesAnytype1' @@ -105,14 +104,6 @@ namespace Org.OpenAPITools.Test.Model // TODO unit test for the property 'MapWithUndeclaredPropertiesAnytype3' } /// - /// Test the property 'EmptyMap' - /// - [Fact] - public void EmptyMapTest() - { - // TODO unit test for the property 'EmptyMap' - } - /// /// Test the property 'MapWithUndeclaredPropertiesString' /// [Fact] @@ -120,6 +111,14 @@ namespace Org.OpenAPITools.Test.Model { // TODO unit test for the property 'MapWithUndeclaredPropertiesString' } + /// + /// Test the property 'Anytype1' + /// + [Fact] + public void Anytype1Test() + { + // TODO unit test for the property 'Anytype1' + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/AnimalTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/AnimalTests.cs index ced34a4faa..8c38ac47af 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/AnimalTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/AnimalTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ApiResponseTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ApiResponseTests.cs index 2a2e098e60..a2a9a2d49d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ApiResponseTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ApiResponseTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -65,14 +64,6 @@ namespace Org.OpenAPITools.Test.Model // TODO unit test for the property 'Code' } /// - /// Test the property 'Type' - /// - [Fact] - public void TypeTest() - { - // TODO unit test for the property 'Type' - } - /// /// Test the property 'Message' /// [Fact] @@ -80,6 +71,14 @@ namespace Org.OpenAPITools.Test.Model { // TODO unit test for the property 'Message' } + /// + /// Test the property 'Type' + /// + [Fact] + public void TypeTest() + { + // TODO unit test for the property 'Type' + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/AppleReqTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/AppleReqTests.cs index f945f65936..0610780d65 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/AppleReqTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/AppleReqTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/AppleTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/AppleTests.cs index 468d60184a..e0bd59e773 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/AppleTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/AppleTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ArrayOfArrayOfNumberOnlyTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ArrayOfArrayOfNumberOnlyTests.cs index 0b259d7d39..8f046a0bf6 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ArrayOfArrayOfNumberOnlyTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ArrayOfArrayOfNumberOnlyTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ArrayOfNumberOnlyTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ArrayOfNumberOnlyTests.cs index 27f312ad25..53b2fe30fd 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ArrayOfNumberOnlyTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ArrayOfNumberOnlyTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ArrayTestTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ArrayTestTests.cs index a433e8c87c..df87ba3aaa 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ArrayTestTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ArrayTestTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -56,14 +55,6 @@ namespace Org.OpenAPITools.Test.Model } - /// - /// Test the property 'ArrayOfString' - /// - [Fact] - public void ArrayOfStringTest() - { - // TODO unit test for the property 'ArrayOfString' - } /// /// Test the property 'ArrayArrayOfInteger' /// @@ -80,6 +71,14 @@ namespace Org.OpenAPITools.Test.Model { // TODO unit test for the property 'ArrayArrayOfModel' } + /// + /// Test the property 'ArrayOfString' + /// + [Fact] + public void ArrayOfStringTest() + { + // TODO unit test for the property 'ArrayOfString' + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/BananaReqTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/BananaReqTests.cs index 8a6eeb82ee..6f31ba2029 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/BananaReqTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/BananaReqTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/BananaTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/BananaTests.cs index 8d8cc376b0..6cb6c62ffd 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/BananaTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/BananaTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/BasquePigTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/BasquePigTests.cs index 3cdccaa759..9798a17577 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/BasquePigTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/BasquePigTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/CapitalizationTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/CapitalizationTests.cs index 185c83666f..b84c7c85a7 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/CapitalizationTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/CapitalizationTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -57,12 +56,12 @@ namespace Org.OpenAPITools.Test.Model /// - /// Test the property 'SmallCamel' + /// Test the property 'ATT_NAME' /// [Fact] - public void SmallCamelTest() + public void ATT_NAMETest() { - // TODO unit test for the property 'SmallCamel' + // TODO unit test for the property 'ATT_NAME' } /// /// Test the property 'CapitalCamel' @@ -73,14 +72,6 @@ namespace Org.OpenAPITools.Test.Model // TODO unit test for the property 'CapitalCamel' } /// - /// Test the property 'SmallSnake' - /// - [Fact] - public void SmallSnakeTest() - { - // TODO unit test for the property 'SmallSnake' - } - /// /// Test the property 'CapitalSnake' /// [Fact] @@ -97,12 +88,20 @@ namespace Org.OpenAPITools.Test.Model // TODO unit test for the property 'SCAETHFlowPoints' } /// - /// Test the property 'ATT_NAME' + /// Test the property 'SmallCamel' /// [Fact] - public void ATT_NAMETest() + public void SmallCamelTest() { - // TODO unit test for the property 'ATT_NAME' + // TODO unit test for the property 'SmallCamel' + } + /// + /// Test the property 'SmallSnake' + /// + [Fact] + public void SmallSnakeTest() + { + // TODO unit test for the property 'SmallSnake' } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/CatAllOfTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/CatAllOfTests.cs index fb51c28489..3498bb0c15 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/CatAllOfTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/CatAllOfTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/CatTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/CatTests.cs index 9c3c48ffef..402a476d07 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/CatTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/CatTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/CategoryTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/CategoryTests.cs index 621877aa97..822f8241fa 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/CategoryTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/CategoryTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -56,14 +55,6 @@ namespace Org.OpenAPITools.Test.Model } - /// - /// Test the property 'Name' - /// - [Fact] - public void NameTest() - { - // TODO unit test for the property 'Name' - } /// /// Test the property 'Id' /// @@ -72,6 +63,14 @@ namespace Org.OpenAPITools.Test.Model { // TODO unit test for the property 'Id' } + /// + /// Test the property 'Name' + /// + [Fact] + public void NameTest() + { + // TODO unit test for the property 'Name' + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ChildCatAllOfTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ChildCatAllOfTests.cs index 49a5393249..d4de4c4741 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ChildCatAllOfTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ChildCatAllOfTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ChildCatTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ChildCatTests.cs index 0fe3ebfa06..f1b0aa1005 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ChildCatTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ChildCatTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ClassModelTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ClassModelTests.cs index d29472e83a..2e6c120d8f 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ClassModelTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ClassModelTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -57,12 +56,12 @@ namespace Org.OpenAPITools.Test.Model /// - /// Test the property 'Class' + /// Test the property 'ClassProperty' /// [Fact] - public void ClassTest() + public void ClassPropertyTest() { - // TODO unit test for the property 'Class' + // TODO unit test for the property 'ClassProperty' } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ComplexQuadrilateralTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ComplexQuadrilateralTests.cs index 6c50fe7aab..3f2f96e73a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ComplexQuadrilateralTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ComplexQuadrilateralTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/DanishPigTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/DanishPigTests.cs index 572d9bffa7..087d38674b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/DanishPigTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/DanishPigTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/DeprecatedObjectTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/DeprecatedObjectTests.cs index 1da5f4011c..85ecbfdda5 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/DeprecatedObjectTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/DeprecatedObjectTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/DogAllOfTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/DogAllOfTests.cs index b22a444209..1e86d76150 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/DogAllOfTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/DogAllOfTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/DogTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/DogTests.cs index bf906f01bc..ef2eabfca3 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/DogTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/DogTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/DrawingTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/DrawingTests.cs index 0709ad9eeb..c38867cb5a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/DrawingTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/DrawingTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -73,14 +72,6 @@ namespace Org.OpenAPITools.Test.Model // TODO unit test for the property 'ShapeOrNull' } /// - /// Test the property 'NullableShape' - /// - [Fact] - public void NullableShapeTest() - { - // TODO unit test for the property 'NullableShape' - } - /// /// Test the property 'Shapes' /// [Fact] @@ -88,6 +79,14 @@ namespace Org.OpenAPITools.Test.Model { // TODO unit test for the property 'Shapes' } + /// + /// Test the property 'NullableShape' + /// + [Fact] + public void NullableShapeTest() + { + // TODO unit test for the property 'NullableShape' + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/EnumArraysTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/EnumArraysTests.cs index 5779ca2947..ee3d000f32 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/EnumArraysTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/EnumArraysTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -56,14 +55,6 @@ namespace Org.OpenAPITools.Test.Model } - /// - /// Test the property 'JustSymbol' - /// - [Fact] - public void JustSymbolTest() - { - // TODO unit test for the property 'JustSymbol' - } /// /// Test the property 'ArrayEnum' /// @@ -72,6 +63,14 @@ namespace Org.OpenAPITools.Test.Model { // TODO unit test for the property 'ArrayEnum' } + /// + /// Test the property 'JustSymbol' + /// + [Fact] + public void JustSymbolTest() + { + // TODO unit test for the property 'JustSymbol' + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/EnumClassTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/EnumClassTests.cs index a17738c5cb..e2fc2d0228 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/EnumClassTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/EnumClassTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/EnumTestTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/EnumTestTests.cs index a22c39ca84..60e3aca92b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/EnumTestTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/EnumTestTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -56,22 +55,6 @@ namespace Org.OpenAPITools.Test.Model } - /// - /// Test the property 'EnumStringRequired' - /// - [Fact] - public void EnumStringRequiredTest() - { - // TODO unit test for the property 'EnumStringRequired' - } - /// - /// Test the property 'EnumString' - /// - [Fact] - public void EnumStringTest() - { - // TODO unit test for the property 'EnumString' - } /// /// Test the property 'EnumInteger' /// @@ -97,20 +80,20 @@ namespace Org.OpenAPITools.Test.Model // TODO unit test for the property 'EnumNumber' } /// - /// Test the property 'OuterEnum' + /// Test the property 'EnumString' /// [Fact] - public void OuterEnumTest() + public void EnumStringTest() { - // TODO unit test for the property 'OuterEnum' + // TODO unit test for the property 'EnumString' } /// - /// Test the property 'OuterEnumInteger' + /// Test the property 'EnumStringRequired' /// [Fact] - public void OuterEnumIntegerTest() + public void EnumStringRequiredTest() { - // TODO unit test for the property 'OuterEnumInteger' + // TODO unit test for the property 'EnumStringRequired' } /// /// Test the property 'OuterEnumDefaultValue' @@ -121,6 +104,14 @@ namespace Org.OpenAPITools.Test.Model // TODO unit test for the property 'OuterEnumDefaultValue' } /// + /// Test the property 'OuterEnumInteger' + /// + [Fact] + public void OuterEnumIntegerTest() + { + // TODO unit test for the property 'OuterEnumInteger' + } + /// /// Test the property 'OuterEnumIntegerDefaultValue' /// [Fact] @@ -128,6 +119,14 @@ namespace Org.OpenAPITools.Test.Model { // TODO unit test for the property 'OuterEnumIntegerDefaultValue' } + /// + /// Test the property 'OuterEnum' + /// + [Fact] + public void OuterEnumTest() + { + // TODO unit test for the property 'OuterEnum' + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/EquilateralTriangleTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/EquilateralTriangleTests.cs index 9ca755c4b0..9ab78a5977 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/EquilateralTriangleTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/EquilateralTriangleTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/FileSchemaTestClassTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/FileSchemaTestClassTests.cs index 9f45b4fe89..9836a779bf 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/FileSchemaTestClassTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/FileSchemaTestClassTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/FileTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/FileTests.cs index 761bb72a84..4f0e7079bc 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/FileTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/FileTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/FooGetDefaultResponseTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/FooGetDefaultResponseTests.cs index 0154d52841..b7313941a6 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/FooGetDefaultResponseTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/FooGetDefaultResponseTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -57,12 +56,12 @@ namespace Org.OpenAPITools.Test.Model /// - /// Test the property 'String' + /// Test the property 'StringProperty' /// [Fact] - public void StringTest() + public void StringPropertyTest() { - // TODO unit test for the property 'String' + // TODO unit test for the property 'StringProperty' } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/FooTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/FooTests.cs index 0b6ed52edb..c0bdf85f9b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/FooTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/FooTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs index 707847bbcd..d3a978bdc4 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -57,20 +56,20 @@ namespace Org.OpenAPITools.Test.Model /// - /// Test the property 'Number' + /// Test the property 'Binary' /// [Fact] - public void NumberTest() + public void BinaryTest() { - // TODO unit test for the property 'Number' + // TODO unit test for the property 'Binary' } /// - /// Test the property 'Byte' + /// Test the property 'ByteProperty' /// [Fact] - public void ByteTest() + public void BytePropertyTest() { - // TODO unit test for the property 'Byte' + // TODO unit test for the property 'ByteProperty' } /// /// Test the property 'Date' @@ -81,20 +80,36 @@ namespace Org.OpenAPITools.Test.Model // TODO unit test for the property 'Date' } /// - /// Test the property 'Password' + /// Test the property 'DateTime' /// [Fact] - public void PasswordTest() + public void DateTimeTest() { - // TODO unit test for the property 'Password' + // TODO unit test for the property 'DateTime' } /// - /// Test the property 'Integer' + /// Test the property 'DecimalProperty' /// [Fact] - public void IntegerTest() + public void DecimalPropertyTest() { - // TODO unit test for the property 'Integer' + // TODO unit test for the property 'DecimalProperty' + } + /// + /// Test the property 'DoubleProperty' + /// + [Fact] + public void DoublePropertyTest() + { + // TODO unit test for the property 'DoubleProperty' + } + /// + /// Test the property 'FloatProperty' + /// + [Fact] + public void FloatPropertyTest() + { + // TODO unit test for the property 'FloatProperty' } /// /// Test the property 'Int32' @@ -113,60 +128,28 @@ namespace Org.OpenAPITools.Test.Model // TODO unit test for the property 'Int64' } /// - /// Test the property 'Float' + /// Test the property 'Integer' /// [Fact] - public void FloatTest() + public void IntegerTest() { - // TODO unit test for the property 'Float' + // TODO unit test for the property 'Integer' } /// - /// Test the property 'Double' + /// Test the property 'Number' /// [Fact] - public void DoubleTest() + public void NumberTest() { - // TODO unit test for the property 'Double' + // TODO unit test for the property 'Number' } /// - /// Test the property 'Decimal' + /// Test the property 'Password' /// [Fact] - public void DecimalTest() + public void PasswordTest() { - // TODO unit test for the property 'Decimal' - } - /// - /// Test the property 'String' - /// - [Fact] - public void StringTest() - { - // TODO unit test for the property 'String' - } - /// - /// Test the property 'Binary' - /// - [Fact] - public void BinaryTest() - { - // TODO unit test for the property 'Binary' - } - /// - /// Test the property 'DateTime' - /// - [Fact] - public void DateTimeTest() - { - // TODO unit test for the property 'DateTime' - } - /// - /// Test the property 'Uuid' - /// - [Fact] - public void UuidTest() - { - // TODO unit test for the property 'Uuid' + // TODO unit test for the property 'Password' } /// /// Test the property 'PatternWithDigits' @@ -184,6 +167,22 @@ namespace Org.OpenAPITools.Test.Model { // TODO unit test for the property 'PatternWithDigitsAndDelimiter' } + /// + /// Test the property 'StringProperty' + /// + [Fact] + public void StringPropertyTest() + { + // TODO unit test for the property 'StringProperty' + } + /// + /// Test the property 'Uuid' + /// + [Fact] + public void UuidTest() + { + // TODO unit test for the property 'Uuid' + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/FruitReqTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/FruitReqTests.cs index 3a0b55b93e..3ef884e59c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/FruitReqTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/FruitReqTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/FruitTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/FruitTests.cs index ddc424d56e..9ab6b7f278 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/FruitTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/FruitTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/GmFruitTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/GmFruitTests.cs index cbd35f9173..036c5641cf 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/GmFruitTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/GmFruitTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/GrandparentAnimalTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/GrandparentAnimalTests.cs index faa4930944..182cf7350b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/GrandparentAnimalTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/GrandparentAnimalTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/HasOnlyReadOnlyTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/HasOnlyReadOnlyTests.cs index 651a9f0ce3..d9a07efcf9 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/HasOnlyReadOnlyTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/HasOnlyReadOnlyTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/HealthCheckResultTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/HealthCheckResultTests.cs index 857190a333..d29edf5dd1 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/HealthCheckResultTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/HealthCheckResultTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/IsoscelesTriangleTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/IsoscelesTriangleTests.cs index 8e0dae9342..2fed6f0b4c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/IsoscelesTriangleTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/IsoscelesTriangleTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ListTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ListTests.cs index 2ed828d052..398a464492 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ListTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ListTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/MammalTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/MammalTests.cs index 6477ab950f..0889d80a70 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/MammalTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/MammalTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/MapTestTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/MapTestTests.cs index 20036e1c90..0dc95aa6b2 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/MapTestTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/MapTestTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -56,22 +55,6 @@ namespace Org.OpenAPITools.Test.Model } - /// - /// Test the property 'MapMapOfString' - /// - [Fact] - public void MapMapOfStringTest() - { - // TODO unit test for the property 'MapMapOfString' - } - /// - /// Test the property 'MapOfEnumString' - /// - [Fact] - public void MapOfEnumStringTest() - { - // TODO unit test for the property 'MapOfEnumString' - } /// /// Test the property 'DirectMap' /// @@ -88,6 +71,22 @@ namespace Org.OpenAPITools.Test.Model { // TODO unit test for the property 'IndirectMap' } + /// + /// Test the property 'MapMapOfString' + /// + [Fact] + public void MapMapOfStringTest() + { + // TODO unit test for the property 'MapMapOfString' + } + /// + /// Test the property 'MapOfEnumString' + /// + [Fact] + public void MapOfEnumStringTest() + { + // TODO unit test for the property 'MapOfEnumString' + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/MixedPropertiesAndAdditionalPropertiesClassTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/MixedPropertiesAndAdditionalPropertiesClassTests.cs index f56cd715f4..d94f882e0a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/MixedPropertiesAndAdditionalPropertiesClassTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/MixedPropertiesAndAdditionalPropertiesClassTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -56,14 +55,6 @@ namespace Org.OpenAPITools.Test.Model } - /// - /// Test the property 'Uuid' - /// - [Fact] - public void UuidTest() - { - // TODO unit test for the property 'Uuid' - } /// /// Test the property 'DateTime' /// @@ -80,6 +71,14 @@ namespace Org.OpenAPITools.Test.Model { // TODO unit test for the property 'Map' } + /// + /// Test the property 'Uuid' + /// + [Fact] + public void UuidTest() + { + // TODO unit test for the property 'Uuid' + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/Model200ResponseTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/Model200ResponseTests.cs index e25478618f..31f2a75431 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/Model200ResponseTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/Model200ResponseTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -56,6 +55,14 @@ namespace Org.OpenAPITools.Test.Model } + /// + /// Test the property 'ClassProperty' + /// + [Fact] + public void ClassPropertyTest() + { + // TODO unit test for the property 'ClassProperty' + } /// /// Test the property 'Name' /// @@ -64,14 +71,6 @@ namespace Org.OpenAPITools.Test.Model { // TODO unit test for the property 'Name' } - /// - /// Test the property 'Class' - /// - [Fact] - public void ClassTest() - { - // TODO unit test for the property 'Class' - } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ModelClientTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ModelClientTests.cs index 24a9e26315..40b3700ce9 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ModelClientTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ModelClientTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -57,12 +56,12 @@ namespace Org.OpenAPITools.Test.Model /// - /// Test the property '_Client' + /// Test the property '_ClientProperty' /// [Fact] - public void _ClientTest() + public void _ClientPropertyTest() { - // TODO unit test for the property '_Client' + // TODO unit test for the property '_ClientProperty' } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/NameTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/NameTests.cs index 61f8ad1137..523b3e050a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/NameTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/NameTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -65,14 +64,6 @@ namespace Org.OpenAPITools.Test.Model // TODO unit test for the property 'NameProperty' } /// - /// Test the property 'SnakeCase' - /// - [Fact] - public void SnakeCaseTest() - { - // TODO unit test for the property 'SnakeCase' - } - /// /// Test the property 'Property' /// [Fact] @@ -81,6 +72,14 @@ namespace Org.OpenAPITools.Test.Model // TODO unit test for the property 'Property' } /// + /// Test the property 'SnakeCase' + /// + [Fact] + public void SnakeCaseTest() + { + // TODO unit test for the property 'SnakeCase' + } + /// /// Test the property '_123Number' /// [Fact] diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/NullableClassTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/NullableClassTests.cs index 8f00505612..adf7c14f13 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/NullableClassTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/NullableClassTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -57,20 +56,36 @@ namespace Org.OpenAPITools.Test.Model /// - /// Test the property 'IntegerProp' + /// Test the property 'ArrayItemsNullable' /// [Fact] - public void IntegerPropTest() + public void ArrayItemsNullableTest() { - // TODO unit test for the property 'IntegerProp' + // TODO unit test for the property 'ArrayItemsNullable' } /// - /// Test the property 'NumberProp' + /// Test the property 'ObjectItemsNullable' /// [Fact] - public void NumberPropTest() + public void ObjectItemsNullableTest() { - // TODO unit test for the property 'NumberProp' + // TODO unit test for the property 'ObjectItemsNullable' + } + /// + /// Test the property 'ArrayAndItemsNullableProp' + /// + [Fact] + public void ArrayAndItemsNullablePropTest() + { + // TODO unit test for the property 'ArrayAndItemsNullableProp' + } + /// + /// Test the property 'ArrayNullableProp' + /// + [Fact] + public void ArrayNullablePropTest() + { + // TODO unit test for the property 'ArrayNullableProp' } /// /// Test the property 'BooleanProp' @@ -81,14 +96,6 @@ namespace Org.OpenAPITools.Test.Model // TODO unit test for the property 'BooleanProp' } /// - /// Test the property 'StringProp' - /// - [Fact] - public void StringPropTest() - { - // TODO unit test for the property 'StringProp' - } - /// /// Test the property 'DateProp' /// [Fact] @@ -105,36 +112,20 @@ namespace Org.OpenAPITools.Test.Model // TODO unit test for the property 'DatetimeProp' } /// - /// Test the property 'ArrayNullableProp' + /// Test the property 'IntegerProp' /// [Fact] - public void ArrayNullablePropTest() + public void IntegerPropTest() { - // TODO unit test for the property 'ArrayNullableProp' + // TODO unit test for the property 'IntegerProp' } /// - /// Test the property 'ArrayAndItemsNullableProp' + /// Test the property 'NumberProp' /// [Fact] - public void ArrayAndItemsNullablePropTest() + public void NumberPropTest() { - // TODO unit test for the property 'ArrayAndItemsNullableProp' - } - /// - /// Test the property 'ArrayItemsNullable' - /// - [Fact] - public void ArrayItemsNullableTest() - { - // TODO unit test for the property 'ArrayItemsNullable' - } - /// - /// Test the property 'ObjectNullableProp' - /// - [Fact] - public void ObjectNullablePropTest() - { - // TODO unit test for the property 'ObjectNullableProp' + // TODO unit test for the property 'NumberProp' } /// /// Test the property 'ObjectAndItemsNullableProp' @@ -145,12 +136,20 @@ namespace Org.OpenAPITools.Test.Model // TODO unit test for the property 'ObjectAndItemsNullableProp' } /// - /// Test the property 'ObjectItemsNullable' + /// Test the property 'ObjectNullableProp' /// [Fact] - public void ObjectItemsNullableTest() + public void ObjectNullablePropTest() { - // TODO unit test for the property 'ObjectItemsNullable' + // TODO unit test for the property 'ObjectNullableProp' + } + /// + /// Test the property 'StringProp' + /// + [Fact] + public void StringPropTest() + { + // TODO unit test for the property 'StringProp' } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/NullableShapeTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/NullableShapeTests.cs index 8202ef6391..734d03e5e7 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/NullableShapeTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/NullableShapeTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/NumberOnlyTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/NumberOnlyTests.cs index 3a06cb020b..5db923c1d3 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/NumberOnlyTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/NumberOnlyTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ObjectWithDeprecatedFieldsTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ObjectWithDeprecatedFieldsTests.cs index 82f93fab48..9e9b651f81 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ObjectWithDeprecatedFieldsTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ObjectWithDeprecatedFieldsTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -57,20 +56,12 @@ namespace Org.OpenAPITools.Test.Model /// - /// Test the property 'Uuid' + /// Test the property 'Bars' /// [Fact] - public void UuidTest() + public void BarsTest() { - // TODO unit test for the property 'Uuid' - } - /// - /// Test the property 'Id' - /// - [Fact] - public void IdTest() - { - // TODO unit test for the property 'Id' + // TODO unit test for the property 'Bars' } /// /// Test the property 'DeprecatedRef' @@ -81,12 +72,20 @@ namespace Org.OpenAPITools.Test.Model // TODO unit test for the property 'DeprecatedRef' } /// - /// Test the property 'Bars' + /// Test the property 'Id' /// [Fact] - public void BarsTest() + public void IdTest() { - // TODO unit test for the property 'Bars' + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'Uuid' + /// + [Fact] + public void UuidTest() + { + // TODO unit test for the property 'Uuid' } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/OrderTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/OrderTests.cs index cf5c561c54..10682e72f2 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/OrderTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/OrderTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/OuterCompositeTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/OuterCompositeTests.cs index 2efda0db59..8c176d9f94 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/OuterCompositeTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/OuterCompositeTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -56,6 +55,14 @@ namespace Org.OpenAPITools.Test.Model } + /// + /// Test the property 'MyBoolean' + /// + [Fact] + public void MyBooleanTest() + { + // TODO unit test for the property 'MyBoolean' + } /// /// Test the property 'MyNumber' /// @@ -72,14 +79,6 @@ namespace Org.OpenAPITools.Test.Model { // TODO unit test for the property 'MyString' } - /// - /// Test the property 'MyBoolean' - /// - [Fact] - public void MyBooleanTest() - { - // TODO unit test for the property 'MyBoolean' - } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/OuterEnumDefaultValueTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/OuterEnumDefaultValueTests.cs index 986fff774c..9f6d8b52b6 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/OuterEnumDefaultValueTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/OuterEnumDefaultValueTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/OuterEnumIntegerDefaultValueTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/OuterEnumIntegerDefaultValueTests.cs index 015d5dab94..e51365edb2 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/OuterEnumIntegerDefaultValueTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/OuterEnumIntegerDefaultValueTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/OuterEnumIntegerTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/OuterEnumIntegerTests.cs index 385e899110..36e6a060f9 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/OuterEnumIntegerTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/OuterEnumIntegerTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/OuterEnumTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/OuterEnumTests.cs index f47304767b..b38c693d1a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/OuterEnumTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/OuterEnumTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ParentPetTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ParentPetTests.cs index 1e17568ed3..34cae43eac 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ParentPetTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ParentPetTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/PetTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/PetTests.cs index 28ea4d8478..66cfbf7bdb 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/PetTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/PetTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -56,6 +55,22 @@ namespace Org.OpenAPITools.Test.Model } + /// + /// Test the property 'Category' + /// + [Fact] + public void CategoryTest() + { + // TODO unit test for the property 'Category' + } + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } /// /// Test the property 'Name' /// @@ -73,20 +88,12 @@ namespace Org.OpenAPITools.Test.Model // TODO unit test for the property 'PhotoUrls' } /// - /// Test the property 'Id' + /// Test the property 'Status' /// [Fact] - public void IdTest() + public void StatusTest() { - // TODO unit test for the property 'Id' - } - /// - /// Test the property 'Category' - /// - [Fact] - public void CategoryTest() - { - // TODO unit test for the property 'Category' + // TODO unit test for the property 'Status' } /// /// Test the property 'Tags' @@ -96,14 +103,6 @@ namespace Org.OpenAPITools.Test.Model { // TODO unit test for the property 'Tags' } - /// - /// Test the property 'Status' - /// - [Fact] - public void StatusTest() - { - // TODO unit test for the property 'Status' - } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/PigTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/PigTests.cs index a66befe8f5..0e85eabf16 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/PigTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/PigTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/PolymorphicPropertyTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/PolymorphicPropertyTests.cs index eff3c6ddc9..98aad34f4b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/PolymorphicPropertyTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/PolymorphicPropertyTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/QuadrilateralInterfaceTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/QuadrilateralInterfaceTests.cs index 6eef9f4c81..42243bd29c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/QuadrilateralInterfaceTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/QuadrilateralInterfaceTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/QuadrilateralTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/QuadrilateralTests.cs index 3d62673d09..e15b2c5c74 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/QuadrilateralTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/QuadrilateralTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ReadOnlyFirstTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ReadOnlyFirstTests.cs index dc3d0fad54..7e99972f26 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ReadOnlyFirstTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ReadOnlyFirstTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ReturnTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ReturnTests.cs index 65fa199fe3..9969564490 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ReturnTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ReturnTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ScaleneTriangleTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ScaleneTriangleTests.cs index 018dffb596..cad95d2963 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ScaleneTriangleTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ScaleneTriangleTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ShapeInterfaceTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ShapeInterfaceTests.cs index 7bd0bc86f9..3129f3775c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ShapeInterfaceTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ShapeInterfaceTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ShapeOrNullTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ShapeOrNullTests.cs index ef56435764..a33da20eda 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ShapeOrNullTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ShapeOrNullTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ShapeTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ShapeTests.cs index 783a9657ed..b2d995af50 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ShapeTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ShapeTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/SimpleQuadrilateralTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/SimpleQuadrilateralTests.cs index 3bcd65e792..0221971c07 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/SimpleQuadrilateralTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/SimpleQuadrilateralTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/SpecialModelNameTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/SpecialModelNameTests.cs index 91682a7afd..1a5bb10af8 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/SpecialModelNameTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/SpecialModelNameTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -56,14 +55,6 @@ namespace Org.OpenAPITools.Test.Model } - /// - /// Test the property 'SpecialPropertyName' - /// - [Fact] - public void SpecialPropertyNameTest() - { - // TODO unit test for the property 'SpecialPropertyName' - } /// /// Test the property 'SpecialModelNameProperty' /// @@ -72,6 +63,14 @@ namespace Org.OpenAPITools.Test.Model { // TODO unit test for the property 'SpecialModelNameProperty' } + /// + /// Test the property 'SpecialPropertyName' + /// + [Fact] + public void SpecialPropertyNameTest() + { + // TODO unit test for the property 'SpecialPropertyName' + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/TagTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/TagTests.cs index 6d56232d0a..92a5f82365 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/TagTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/TagTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/TriangleInterfaceTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/TriangleInterfaceTests.cs index fba65470be..924d6b42d7 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/TriangleInterfaceTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/TriangleInterfaceTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/TriangleTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/TriangleTests.cs index bdaab0b479..9701da6a54 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/TriangleTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/TriangleTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/UserTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/UserTests.cs index a7b095e4c2..a464c80c84 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/UserTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/UserTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -57,20 +56,12 @@ namespace Org.OpenAPITools.Test.Model /// - /// Test the property 'Id' + /// Test the property 'Email' /// [Fact] - public void IdTest() + public void EmailTest() { - // TODO unit test for the property 'Id' - } - /// - /// Test the property 'Username' - /// - [Fact] - public void UsernameTest() - { - // TODO unit test for the property 'Username' + // TODO unit test for the property 'Email' } /// /// Test the property 'FirstName' @@ -81,6 +72,14 @@ namespace Org.OpenAPITools.Test.Model // TODO unit test for the property 'FirstName' } /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// /// Test the property 'LastName' /// [Fact] @@ -89,12 +88,12 @@ namespace Org.OpenAPITools.Test.Model // TODO unit test for the property 'LastName' } /// - /// Test the property 'Email' + /// Test the property 'ObjectWithNoDeclaredProps' /// [Fact] - public void EmailTest() + public void ObjectWithNoDeclaredPropsTest() { - // TODO unit test for the property 'Email' + // TODO unit test for the property 'ObjectWithNoDeclaredProps' } /// /// Test the property 'Password' @@ -121,20 +120,12 @@ namespace Org.OpenAPITools.Test.Model // TODO unit test for the property 'UserStatus' } /// - /// Test the property 'ObjectWithNoDeclaredProps' + /// Test the property 'Username' /// [Fact] - public void ObjectWithNoDeclaredPropsTest() + public void UsernameTest() { - // TODO unit test for the property 'ObjectWithNoDeclaredProps' - } - /// - /// Test the property 'ObjectWithNoDeclaredPropsNullable' - /// - [Fact] - public void ObjectWithNoDeclaredPropsNullableTest() - { - // TODO unit test for the property 'ObjectWithNoDeclaredPropsNullable' + // TODO unit test for the property 'Username' } /// /// Test the property 'AnyTypeProp' @@ -152,6 +143,14 @@ namespace Org.OpenAPITools.Test.Model { // TODO unit test for the property 'AnyTypePropNullable' } + /// + /// Test the property 'ObjectWithNoDeclaredPropsNullable' + /// + [Fact] + public void ObjectWithNoDeclaredPropsNullableTest() + { + // TODO unit test for the property 'ObjectWithNoDeclaredPropsNullable' + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/WhaleTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/WhaleTests.cs index 9b82c29c8f..91a7b21f21 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/WhaleTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/WhaleTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ZebraTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ZebraTests.cs index 39e0561fe0..08b1c6056c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ZebraTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Model/ZebraTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj index 8d17c12883..4611b7d5ec 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj @@ -8,13 +8,12 @@ - + - + - diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/README.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools.Test/README.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/AnotherFakeApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/AnotherFakeApi.cs index 428a326e69..7bca5fd0e1 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/AnotherFakeApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/AnotherFakeApi.cs @@ -19,10 +19,11 @@ using System.Text.Json; using Org.OpenAPITools.Client; using Org.OpenAPITools.Model; -namespace Org.OpenAPITools.Api +namespace Org.OpenAPITools.IApi { /// /// Represents a collection of functions to interact with the API endpoints + /// This class is registered as transient. /// public interface IAnotherFakeApi : IApi { @@ -48,21 +49,19 @@ namespace Org.OpenAPITools.Api /// client model /// Cancellation Token to cancel the request. /// Task of ApiResponse<ModelClient> - Task Call123TestSpecialTagsAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null); } + Task Call123TestSpecialTagsAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null); + } +} +namespace Org.OpenAPITools.Api +{ /// /// Represents a collection of functions to interact with the API endpoints /// - public partial class AnotherFakeApi : IAnotherFakeApi + public partial class AnotherFakeApi : IApi.IAnotherFakeApi { private JsonSerializerOptions _jsonSerializerOptions; - /// - /// An event to track the health of the server. - /// If you store these event args, be sure to purge old event args to prevent a memory leak. - /// - public event ClientUtils.EventHandler ApiResponded; - /// /// The logger /// @@ -119,6 +118,15 @@ namespace Org.OpenAPITools.Api OauthTokenProvider = oauthTokenProvider; } + /// + /// Logs the api response + /// + /// + protected virtual void OnApiResponded(ApiResponseEventArgs args) + { + Logger.LogInformation("{0,-9} | {1} | {3}", (args.ReceivedAt - args.RequestedAt).TotalSeconds, args.HttpStatus, args.Path); + } + /// /// To test special tags To test special tags and operation ID starting with number /// @@ -159,6 +167,46 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual ModelClient OnCall123TestSpecialTags(ModelClient modelClient) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (modelClient == null) + throw new ArgumentNullException(nameof(modelClient)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return modelClient; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterCall123TestSpecialTags(ApiResponse apiResponse, ModelClient modelClient) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorCall123TestSpecialTags(Exception exception, string pathFormat, string path, ModelClient modelClient) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// To test special tags To test special tags and operation ID starting with number /// @@ -168,18 +216,14 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> Call123TestSpecialTagsWithHttpInfoAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (modelClient == null) - throw new ArgumentNullException(nameof(modelClient)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + modelClient = OnCall123TestSpecialTags(modelClient); using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -189,6 +233,8 @@ namespace Org.OpenAPITools.Api ? request.Content = new StreamContent(stream) : request.Content = new StringContent(JsonSerializer.Serialize(modelClient, _jsonSerializerOptions)); + + request.RequestUri = uriBuilder.Uri; string[] contentTypes = new string[] { @@ -198,7 +244,7 @@ namespace Org.OpenAPITools.Api string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); string[] accepts = new string[] { "application/json" @@ -208,31 +254,24 @@ namespace Org.OpenAPITools.Api if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - + request.Method = HttpMethod.Patch; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/another-fake/dummy", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/another-fake/dummy")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterCall123TestSpecialTags(apiResponse, modelClient); + } return apiResponse; } @@ -240,8 +279,9 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorCall123TestSpecialTags(e, "/another-fake/dummy", uriBuilder.Path, modelClient); throw; } - } } + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/DefaultApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/DefaultApi.cs index 78cd568166..708148c438 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/DefaultApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/DefaultApi.cs @@ -19,10 +19,11 @@ using System.Text.Json; using Org.OpenAPITools.Client; using Org.OpenAPITools.Model; -namespace Org.OpenAPITools.Api +namespace Org.OpenAPITools.IApi { /// /// Represents a collection of functions to interact with the API endpoints + /// This class is registered as transient. /// public interface IDefaultApi : IApi { @@ -46,21 +47,19 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Cancellation Token to cancel the request. /// Task of ApiResponse<FooGetDefaultResponse> - Task FooGetAsync(System.Threading.CancellationToken? cancellationToken = null); } + Task FooGetAsync(System.Threading.CancellationToken? cancellationToken = null); + } +} +namespace Org.OpenAPITools.Api +{ /// /// Represents a collection of functions to interact with the API endpoints /// - public partial class DefaultApi : IDefaultApi + public partial class DefaultApi : IApi.IDefaultApi { private JsonSerializerOptions _jsonSerializerOptions; - /// - /// An event to track the health of the server. - /// If you store these event args, be sure to purge old event args to prevent a memory leak. - /// - public event ClientUtils.EventHandler ApiResponded; - /// /// The logger /// @@ -117,6 +116,15 @@ namespace Org.OpenAPITools.Api OauthTokenProvider = oauthTokenProvider; } + /// + /// Logs the api response + /// + /// + protected virtual void OnApiResponded(ApiResponseEventArgs args) + { + Logger.LogInformation("{0,-9} | {1} | {3}", (args.ReceivedAt - args.RequestedAt).TotalSeconds, args.HttpStatus, args.Path); + } + /// /// /// @@ -155,6 +163,34 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + protected virtual void OnFooGet() + { + return; + } + + /// + /// Processes the server response + /// + /// + protected virtual void AfterFooGet(ApiResponse apiResponse) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + protected virtual void OnErrorFooGet(Exception exception, string pathFormat, string path) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// /// @@ -163,16 +199,21 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> FooGetWithHttpInfoAsync(System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { + OnFooGet(); + using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/foo"; + + request.RequestUri = uriBuilder.Uri; string[] accepts = new string[] { @@ -183,31 +224,24 @@ namespace Org.OpenAPITools.Api if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - + request.Method = HttpMethod.Get; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/foo", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/foo")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterFooGet(apiResponse); + } return apiResponse; } @@ -215,8 +249,9 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorFooGet(e, "/foo", uriBuilder.Path); throw; } - } } + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/FakeApi.cs index 0f8c448ecd..0c0b289c53 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/FakeApi.cs @@ -19,10 +19,11 @@ using System.Text.Json; using Org.OpenAPITools.Client; using Org.OpenAPITools.Model; -namespace Org.OpenAPITools.Api +namespace Org.OpenAPITools.IApi { /// /// Represents a collection of functions to interact with the API endpoints + /// This class is registered as transient. /// public interface IFakeApi : IApi { @@ -47,6 +48,7 @@ namespace Org.OpenAPITools.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse<HealthCheckResult> Task FakeHealthGetAsync(System.Threading.CancellationToken? cancellationToken = null); + /// /// /// @@ -70,6 +72,7 @@ namespace Org.OpenAPITools.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse<bool> Task FakeOuterBooleanSerializeAsync(bool? body = null, System.Threading.CancellationToken? cancellationToken = null); + /// /// /// @@ -93,6 +96,7 @@ namespace Org.OpenAPITools.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse<OuterComposite> Task FakeOuterCompositeSerializeAsync(OuterComposite outerComposite = null, System.Threading.CancellationToken? cancellationToken = null); + /// /// /// @@ -116,6 +120,7 @@ namespace Org.OpenAPITools.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse<decimal> Task FakeOuterNumberSerializeAsync(decimal? body = null, System.Threading.CancellationToken? cancellationToken = null); + /// /// /// @@ -139,6 +144,7 @@ namespace Org.OpenAPITools.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse<string> Task FakeOuterStringSerializeAsync(string body = null, System.Threading.CancellationToken? cancellationToken = null); + /// /// Array of Enums /// @@ -160,6 +166,7 @@ namespace Org.OpenAPITools.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse<List<OuterEnum>> Task> GetArrayOfEnumsAsync(System.Threading.CancellationToken? cancellationToken = null); + /// /// /// @@ -183,18 +190,6 @@ namespace Org.OpenAPITools.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task TestBodyWithFileSchemaAsync(FileSchemaTestClass fileSchemaTestClass, System.Threading.CancellationToken? cancellationToken = null); - /// - /// - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel the request. - /// Task<ApiResponse<object>> - Task> TestBodyWithQueryParamsWithHttpInfoAsync(string query, User user, System.Threading.CancellationToken? cancellationToken = null); /// /// @@ -203,11 +198,25 @@ namespace Org.OpenAPITools.Api /// /// /// Thrown when fails to make API call - /// /// + /// + /// Cancellation Token to cancel the request. + /// Task<ApiResponse<object>> + Task> TestBodyWithQueryParamsWithHttpInfoAsync(User user, string query, System.Threading.CancellationToken? cancellationToken = null); + + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> - Task TestBodyWithQueryParamsAsync(string query, User user, System.Threading.CancellationToken? cancellationToken = null); + Task TestBodyWithQueryParamsAsync(User user, string query, System.Threading.CancellationToken? cancellationToken = null); + /// /// To test \"client\" model /// @@ -231,30 +240,6 @@ namespace Org.OpenAPITools.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse<ModelClient> Task TestClientModelAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null); - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// Thrown when fails to make API call - /// None - /// None - /// None - /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") - /// Cancellation Token to cancel the request. - /// Task<ApiResponse<object>> - Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, string password = null, string callback = null, DateTime? dateTime = null, System.Threading.CancellationToken? cancellationToken = null); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -263,41 +248,48 @@ namespace Org.OpenAPITools.Api /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call + /// None /// None /// None /// None - /// None + /// None (optional) + /// None (optional) + /// None (optional) /// None (optional) /// None (optional) /// None (optional) - /// None (optional) /// None (optional) - /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") + /// Cancellation Token to cancel the request. + /// Task<ApiResponse<object>> + Task> TestEndpointParametersWithHttpInfoAsync(byte[] _byte, decimal number, double _double, string patternWithoutDelimiter, DateTime? date = null, System.IO.Stream binary = null, float? _float = null, int? integer = null, int? int32 = null, long? int64 = null, string _string = null, string password = null, string callback = null, DateTime? dateTime = null, System.Threading.CancellationToken? cancellationToken = null); + + /// + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// + /// + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// + /// Thrown when fails to make API call + /// None + /// None + /// None + /// None /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) /// None (optional) /// None (optional) /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> - Task TestEndpointParametersAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, string password = null, string callback = null, DateTime? dateTime = null, System.Threading.CancellationToken? cancellationToken = null); - /// - /// To test enum parameters - /// - /// - /// To test enum parameters - /// - /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (double) (optional) - /// Query parameter enum test (double) (optional) - /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string) (optional, default to -efg) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) - /// Cancellation Token to cancel the request. - /// Task<ApiResponse<object>> - Task> TestEnumParametersWithHttpInfoAsync(List enumHeaderStringArray = null, List enumQueryStringArray = null, int? enumQueryInteger = null, double? enumQueryDouble = null, string enumHeaderString = null, string enumQueryString = null, List enumFormStringArray = null, string enumFormString = null, System.Threading.CancellationToken? cancellationToken = null); + Task TestEndpointParametersAsync(byte[] _byte, decimal number, double _double, string patternWithoutDelimiter, DateTime? date = null, System.IO.Stream binary = null, float? _float = null, int? integer = null, int? int32 = null, long? int64 = null, string _string = null, string password = null, string callback = null, DateTime? dateTime = null, System.Threading.CancellationToken? cancellationToken = null); /// /// To test enum parameters @@ -308,31 +300,34 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Header parameter enum test (string array) (optional) /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) + /// Query parameter enum test (double) (optional) + /// Form parameter enum test (string array) (optional, default to $) /// Header parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (string) (optional, default to -efg) + /// Form parameter enum test (string) (optional, default to -efg) + /// Cancellation Token to cancel the request. + /// Task<ApiResponse<object>> + Task> TestEnumParametersWithHttpInfoAsync(List enumHeaderStringArray = null, List enumQueryStringArray = null, double? enumQueryDouble = null, int? enumQueryInteger = null, List enumFormStringArray = null, string enumHeaderString = null, string enumQueryString = null, string enumFormString = null, System.Threading.CancellationToken? cancellationToken = null); + + /// + /// To test enum parameters + /// + /// + /// To test enum parameters + /// + /// Thrown when fails to make API call + /// Header parameter enum test (string array) (optional) + /// Query parameter enum test (string array) (optional) + /// Query parameter enum test (double) (optional) + /// Query parameter enum test (double) (optional) /// Form parameter enum test (string array) (optional, default to $) + /// Header parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (string) (optional, default to -efg) /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> - Task TestEnumParametersAsync(List enumHeaderStringArray = null, List enumQueryStringArray = null, int? enumQueryInteger = null, double? enumQueryDouble = null, string enumHeaderString = null, string enumQueryString = null, List enumFormStringArray = null, string enumFormString = null, System.Threading.CancellationToken? cancellationToken = null); - /// - /// Fake endpoint to test group parameters (optional) - /// - /// - /// Fake endpoint to test group parameters (optional) - /// - /// Thrown when fails to make API call - /// Required String in group parameters - /// Required Boolean in group parameters - /// Required Integer in group parameters - /// String in group parameters (optional) - /// Boolean in group parameters (optional) - /// Integer in group parameters (optional) - /// Cancellation Token to cancel the request. - /// Task<ApiResponse<object>> - Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null, System.Threading.CancellationToken? cancellationToken = null); + Task TestEnumParametersAsync(List enumHeaderStringArray = null, List enumQueryStringArray = null, double? enumQueryDouble = null, int? enumQueryInteger = null, List enumFormStringArray = null, string enumHeaderString = null, string enumQueryString = null, string enumFormString = null, System.Threading.CancellationToken? cancellationToken = null); /// /// Fake endpoint to test group parameters (optional) @@ -341,15 +336,33 @@ namespace Org.OpenAPITools.Api /// Fake endpoint to test group parameters (optional) /// /// Thrown when fails to make API call - /// Required String in group parameters /// Required Boolean in group parameters + /// Required String in group parameters /// Required Integer in group parameters - /// String in group parameters (optional) /// Boolean in group parameters (optional) + /// String in group parameters (optional) + /// Integer in group parameters (optional) + /// Cancellation Token to cancel the request. + /// Task<ApiResponse<object>> + Task> TestGroupParametersWithHttpInfoAsync(bool requiredBooleanGroup, int requiredStringGroup, long requiredInt64Group, bool? booleanGroup = null, int? stringGroup = null, long? int64Group = null, System.Threading.CancellationToken? cancellationToken = null); + + /// + /// Fake endpoint to test group parameters (optional) + /// + /// + /// Fake endpoint to test group parameters (optional) + /// + /// Thrown when fails to make API call + /// Required Boolean in group parameters + /// Required String in group parameters + /// Required Integer in group parameters + /// Boolean in group parameters (optional) + /// String in group parameters (optional) /// Integer in group parameters (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> - Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null, System.Threading.CancellationToken? cancellationToken = null); + Task TestGroupParametersAsync(bool requiredBooleanGroup, int requiredStringGroup, long requiredInt64Group, bool? booleanGroup = null, int? stringGroup = null, long? int64Group = null, System.Threading.CancellationToken? cancellationToken = null); + /// /// test inline additionalProperties /// @@ -373,6 +386,7 @@ namespace Org.OpenAPITools.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task TestInlineAdditionalPropertiesAsync(Dictionary requestBody, System.Threading.CancellationToken? cancellationToken = null); + /// /// test json serialization of form data /// @@ -398,6 +412,7 @@ namespace Org.OpenAPITools.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task TestJsonFormDataAsync(string param, string param2, System.Threading.CancellationToken? cancellationToken = null); + /// /// /// @@ -428,21 +443,19 @@ namespace Org.OpenAPITools.Api /// /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> - Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, System.Threading.CancellationToken? cancellationToken = null); } + Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, System.Threading.CancellationToken? cancellationToken = null); + } +} +namespace Org.OpenAPITools.Api +{ /// /// Represents a collection of functions to interact with the API endpoints /// - public partial class FakeApi : IFakeApi + public partial class FakeApi : IApi.IFakeApi { private JsonSerializerOptions _jsonSerializerOptions; - /// - /// An event to track the health of the server. - /// If you store these event args, be sure to purge old event args to prevent a memory leak. - /// - public event ClientUtils.EventHandler ApiResponded; - /// /// The logger /// @@ -499,6 +512,15 @@ namespace Org.OpenAPITools.Api OauthTokenProvider = oauthTokenProvider; } + /// + /// Logs the api response + /// + /// + protected virtual void OnApiResponded(ApiResponseEventArgs args) + { + Logger.LogInformation("{0,-9} | {1} | {3}", (args.ReceivedAt - args.RequestedAt).TotalSeconds, args.HttpStatus, args.Path); + } + /// /// Health check endpoint /// @@ -537,6 +559,34 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + protected virtual void OnFakeHealthGet() + { + return; + } + + /// + /// Processes the server response + /// + /// + protected virtual void AfterFakeHealthGet(ApiResponse apiResponse) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + protected virtual void OnErrorFakeHealthGet(Exception exception, string pathFormat, string path) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Health check endpoint /// @@ -545,16 +595,21 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> FakeHealthGetWithHttpInfoAsync(System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { + OnFakeHealthGet(); + using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/fake/health"; + + request.RequestUri = uriBuilder.Uri; string[] accepts = new string[] { @@ -565,31 +620,24 @@ namespace Org.OpenAPITools.Api if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - + request.Method = HttpMethod.Get; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/health", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/health")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterFakeHealthGet(apiResponse); + } return apiResponse; } @@ -597,7 +645,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorFakeHealthGet(e, "/fake/health", uriBuilder.Path); throw; } } @@ -621,6 +669,37 @@ namespace Org.OpenAPITools.Api return result.Content; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual bool? OnFakeOuterBooleanSerialize(bool? body) + { + return body; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterFakeOuterBooleanSerialize(ApiResponse apiResponse, bool? body) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorFakeOuterBooleanSerialize(Exception exception, string pathFormat, string path, bool? body) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Test serialization of outer boolean types /// @@ -630,11 +709,14 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> FakeOuterBooleanSerializeWithHttpInfoAsync(bool? body = null, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { + body = OnFakeOuterBooleanSerialize(body); + using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -644,6 +726,8 @@ namespace Org.OpenAPITools.Api ? request.Content = new StreamContent(stream) : request.Content = new StringContent(JsonSerializer.Serialize(body, _jsonSerializerOptions)); + + request.RequestUri = uriBuilder.Uri; string[] contentTypes = new string[] { @@ -653,7 +737,7 @@ namespace Org.OpenAPITools.Api string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); string[] accepts = new string[] { "*/*" @@ -663,31 +747,24 @@ namespace Org.OpenAPITools.Api if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - + request.Method = HttpMethod.Post; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/outer/boolean", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/outer/boolean")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterFakeOuterBooleanSerialize(apiResponse, body); + } return apiResponse; } @@ -695,7 +772,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorFakeOuterBooleanSerialize(e, "/fake/outer/boolean", uriBuilder.Path, body); throw; } } @@ -740,6 +817,37 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual OuterComposite OnFakeOuterCompositeSerialize(OuterComposite outerComposite) + { + return outerComposite; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterFakeOuterCompositeSerialize(ApiResponse apiResponse, OuterComposite outerComposite) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorFakeOuterCompositeSerialize(Exception exception, string pathFormat, string path, OuterComposite outerComposite) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Test serialization of object with outer number type /// @@ -749,11 +857,14 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> FakeOuterCompositeSerializeWithHttpInfoAsync(OuterComposite outerComposite = null, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { + outerComposite = OnFakeOuterCompositeSerialize(outerComposite); + using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -763,6 +874,8 @@ namespace Org.OpenAPITools.Api ? request.Content = new StreamContent(stream) : request.Content = new StringContent(JsonSerializer.Serialize(outerComposite, _jsonSerializerOptions)); + + request.RequestUri = uriBuilder.Uri; string[] contentTypes = new string[] { @@ -772,7 +885,7 @@ namespace Org.OpenAPITools.Api string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); string[] accepts = new string[] { "*/*" @@ -782,31 +895,24 @@ namespace Org.OpenAPITools.Api if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - + request.Method = HttpMethod.Post; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/outer/composite", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/outer/composite")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterFakeOuterCompositeSerialize(apiResponse, outerComposite); + } return apiResponse; } @@ -814,7 +920,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorFakeOuterCompositeSerialize(e, "/fake/outer/composite", uriBuilder.Path, outerComposite); throw; } } @@ -838,6 +944,37 @@ namespace Org.OpenAPITools.Api return result.Content; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual decimal? OnFakeOuterNumberSerialize(decimal? body) + { + return body; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterFakeOuterNumberSerialize(ApiResponse apiResponse, decimal? body) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorFakeOuterNumberSerialize(Exception exception, string pathFormat, string path, decimal? body) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Test serialization of outer number types /// @@ -847,11 +984,14 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> FakeOuterNumberSerializeWithHttpInfoAsync(decimal? body = null, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { + body = OnFakeOuterNumberSerialize(body); + using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -861,6 +1001,8 @@ namespace Org.OpenAPITools.Api ? request.Content = new StreamContent(stream) : request.Content = new StringContent(JsonSerializer.Serialize(body, _jsonSerializerOptions)); + + request.RequestUri = uriBuilder.Uri; string[] contentTypes = new string[] { @@ -870,7 +1012,7 @@ namespace Org.OpenAPITools.Api string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); string[] accepts = new string[] { "*/*" @@ -880,31 +1022,24 @@ namespace Org.OpenAPITools.Api if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - + request.Method = HttpMethod.Post; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/outer/number", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/outer/number")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterFakeOuterNumberSerialize(apiResponse, body); + } return apiResponse; } @@ -912,7 +1047,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorFakeOuterNumberSerialize(e, "/fake/outer/number", uriBuilder.Path, body); throw; } } @@ -936,6 +1071,37 @@ namespace Org.OpenAPITools.Api return result.Content; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual string OnFakeOuterStringSerialize(string body) + { + return body; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterFakeOuterStringSerialize(ApiResponse apiResponse, string body) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorFakeOuterStringSerialize(Exception exception, string pathFormat, string path, string body) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Test serialization of outer string types /// @@ -945,11 +1111,14 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> FakeOuterStringSerializeWithHttpInfoAsync(string body = null, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { + body = OnFakeOuterStringSerialize(body); + using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -959,6 +1128,8 @@ namespace Org.OpenAPITools.Api ? request.Content = new StreamContent(stream) : request.Content = new StringContent(JsonSerializer.Serialize(body, _jsonSerializerOptions)); + + request.RequestUri = uriBuilder.Uri; string[] contentTypes = new string[] { @@ -968,7 +1139,7 @@ namespace Org.OpenAPITools.Api string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); string[] accepts = new string[] { "*/*" @@ -978,31 +1149,24 @@ namespace Org.OpenAPITools.Api if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - + request.Method = HttpMethod.Post; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/outer/string", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/outer/string")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterFakeOuterStringSerialize(apiResponse, body); + } return apiResponse; } @@ -1010,7 +1174,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorFakeOuterStringSerialize(e, "/fake/outer/string", uriBuilder.Path, body); throw; } } @@ -1053,6 +1217,34 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + protected virtual void OnGetArrayOfEnums() + { + return; + } + + /// + /// Processes the server response + /// + /// + protected virtual void AfterGetArrayOfEnums(ApiResponse> apiResponse) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + protected virtual void OnErrorGetArrayOfEnums(Exception exception, string pathFormat, string path) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Array of Enums /// @@ -1061,16 +1253,21 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task>> GetArrayOfEnumsWithHttpInfoAsync(System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { + OnGetArrayOfEnums(); + using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/fake/array-of-enums"; + + request.RequestUri = uriBuilder.Uri; string[] accepts = new string[] { @@ -1081,31 +1278,24 @@ namespace Org.OpenAPITools.Api if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - + request.Method = HttpMethod.Get; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/array-of-enums", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/array-of-enums")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse> apiResponse = new ApiResponse>(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize>(apiResponse.RawContent, _jsonSerializerOptions); + AfterGetArrayOfEnums(apiResponse); + } return apiResponse; } @@ -1113,7 +1303,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorGetArrayOfEnums(e, "/fake/array-of-enums", uriBuilder.Path); throw; } } @@ -1158,6 +1348,46 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual FileSchemaTestClass OnTestBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (fileSchemaTestClass == null) + throw new ArgumentNullException(nameof(fileSchemaTestClass)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return fileSchemaTestClass; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterTestBodyWithFileSchema(ApiResponse apiResponse, FileSchemaTestClass fileSchemaTestClass) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorTestBodyWithFileSchema(Exception exception, string pathFormat, string path, FileSchemaTestClass fileSchemaTestClass) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// For this test, the body for this request much reference a schema named `File`. /// @@ -1167,18 +1397,14 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> TestBodyWithFileSchemaWithHttpInfoAsync(FileSchemaTestClass fileSchemaTestClass, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (fileSchemaTestClass == null) - throw new ArgumentNullException(nameof(fileSchemaTestClass)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + fileSchemaTestClass = OnTestBodyWithFileSchema(fileSchemaTestClass); using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -1188,6 +1414,8 @@ namespace Org.OpenAPITools.Api ? request.Content = new StreamContent(stream) : request.Content = new StringContent(JsonSerializer.Serialize(fileSchemaTestClass, _jsonSerializerOptions)); + + request.RequestUri = uriBuilder.Uri; string[] contentTypes = new string[] { @@ -1197,32 +1425,25 @@ namespace Org.OpenAPITools.Api string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); request.Method = HttpMethod.Put; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/body-with-file-schema", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/body-with-file-schema")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterTestBodyWithFileSchema(apiResponse, fileSchemaTestClass); + } return apiResponse; } @@ -1230,7 +1451,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorTestBodyWithFileSchema(e, "/fake/body-with-file-schema", uriBuilder.Path, fileSchemaTestClass); throw; } } @@ -1239,13 +1460,13 @@ namespace Org.OpenAPITools.Api /// /// /// Thrown when fails to make API call - /// /// + /// /// Cancellation Token to cancel the request. /// <> - public async Task TestBodyWithQueryParamsAsync(string query, User user, System.Threading.CancellationToken? cancellationToken = null) + public async Task TestBodyWithQueryParamsAsync(User user, string query, System.Threading.CancellationToken? cancellationToken = null) { - ApiResponse result = await TestBodyWithQueryParamsWithHttpInfoAsync(query, user, cancellationToken).ConfigureAwait(false); + ApiResponse result = await TestBodyWithQueryParamsWithHttpInfoAsync(user, query, cancellationToken).ConfigureAwait(false); if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); @@ -1257,16 +1478,16 @@ namespace Org.OpenAPITools.Api /// /// /// Thrown when fails to make API call - /// /// + /// /// Cancellation Token to cancel the request. /// <> - public async Task TestBodyWithQueryParamsOrDefaultAsync(string query, User user, System.Threading.CancellationToken? cancellationToken = null) + public async Task TestBodyWithQueryParamsOrDefaultAsync(User user, string query, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = null; try { - result = await TestBodyWithQueryParamsWithHttpInfoAsync(query, user, cancellationToken).ConfigureAwait(false); + result = await TestBodyWithQueryParamsWithHttpInfoAsync(user, query, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -1277,31 +1498,72 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + /// + protected virtual (User, string) OnTestBodyWithQueryParams(User user, string query) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (user == null) + throw new ArgumentNullException(nameof(user)); + + if (query == null) + throw new ArgumentNullException(nameof(query)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return (user, query); + } + + /// + /// Processes the server response + /// + /// + /// + /// + protected virtual void AfterTestBodyWithQueryParams(ApiResponse apiResponse, User user, string query) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + /// + protected virtual void OnErrorTestBodyWithQueryParams(Exception exception, string pathFormat, string path, User user, string query) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// /// /// Thrown when fails to make API call - /// /// + /// /// Cancellation Token to cancel the request. /// <> where T : - public async Task> TestBodyWithQueryParamsWithHttpInfoAsync(string query, User user, System.Threading.CancellationToken? cancellationToken = null) + public async Task> TestBodyWithQueryParamsWithHttpInfoAsync(User user, string query, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (query == null) - throw new ArgumentNullException(nameof(query)); - - if (user == null) - throw new ArgumentNullException(nameof(user)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + var validatedParameters = OnTestBodyWithQueryParams(user, query); + user = validatedParameters.Item1; + query = validatedParameters.Item2; using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -1317,6 +1579,8 @@ namespace Org.OpenAPITools.Api ? request.Content = new StreamContent(stream) : request.Content = new StringContent(JsonSerializer.Serialize(user, _jsonSerializerOptions)); + + request.RequestUri = uriBuilder.Uri; string[] contentTypes = new string[] { @@ -1326,32 +1590,25 @@ namespace Org.OpenAPITools.Api string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); request.Method = HttpMethod.Put; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/body-with-query-params", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/body-with-query-params")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterTestBodyWithQueryParams(apiResponse, user, query); + } return apiResponse; } @@ -1359,7 +1616,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorTestBodyWithQueryParams(e, "/fake/body-with-query-params", uriBuilder.Path, user, query); throw; } } @@ -1404,6 +1661,46 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual ModelClient OnTestClientModel(ModelClient modelClient) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (modelClient == null) + throw new ArgumentNullException(nameof(modelClient)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return modelClient; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterTestClientModel(ApiResponse apiResponse, ModelClient modelClient) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorTestClientModel(Exception exception, string pathFormat, string path, ModelClient modelClient) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// To test \"client\" model To test \"client\" model /// @@ -1413,18 +1710,14 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> TestClientModelWithHttpInfoAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (modelClient == null) - throw new ArgumentNullException(nameof(modelClient)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + modelClient = OnTestClientModel(modelClient); using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -1434,6 +1727,8 @@ namespace Org.OpenAPITools.Api ? request.Content = new StreamContent(stream) : request.Content = new StringContent(JsonSerializer.Serialize(modelClient, _jsonSerializerOptions)); + + request.RequestUri = uriBuilder.Uri; string[] contentTypes = new string[] { @@ -1443,7 +1738,7 @@ namespace Org.OpenAPITools.Api string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); string[] accepts = new string[] { "application/json" @@ -1453,31 +1748,24 @@ namespace Org.OpenAPITools.Api if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - + request.Method = HttpMethod.Patch; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterTestClientModel(apiResponse, modelClient); + } return apiResponse; } @@ -1485,7 +1773,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorTestClientModel(e, "/fake", uriBuilder.Path, modelClient); throw; } } @@ -1494,25 +1782,25 @@ namespace Org.OpenAPITools.Api /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call + /// None /// None /// None /// None - /// None + /// None (optional) + /// None (optional) + /// None (optional) /// None (optional) /// None (optional) /// None (optional) - /// None (optional) /// None (optional) - /// None (optional) - /// None (optional) /// None (optional) /// None (optional) /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// Cancellation Token to cancel the request. /// <> - public async Task TestEndpointParametersAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, string password = null, string callback = null, DateTime? dateTime = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task TestEndpointParametersAsync(byte[] _byte, decimal number, double _double, string patternWithoutDelimiter, DateTime? date = null, System.IO.Stream binary = null, float? _float = null, int? integer = null, int? int32 = null, long? int64 = null, string _string = null, string password = null, string callback = null, DateTime? dateTime = null, System.Threading.CancellationToken? cancellationToken = null) { - ApiResponse result = await TestEndpointParametersWithHttpInfoAsync(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, password, callback, dateTime, cancellationToken).ConfigureAwait(false); + ApiResponse result = await TestEndpointParametersWithHttpInfoAsync(_byte, number, _double, patternWithoutDelimiter, date, binary, _float, integer, int32, int64, _string, password, callback, dateTime, cancellationToken).ConfigureAwait(false); if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); @@ -1524,28 +1812,28 @@ namespace Org.OpenAPITools.Api /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call + /// None /// None /// None /// None - /// None + /// None (optional) + /// None (optional) + /// None (optional) /// None (optional) /// None (optional) /// None (optional) - /// None (optional) /// None (optional) - /// None (optional) - /// None (optional) /// None (optional) /// None (optional) /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// Cancellation Token to cancel the request. /// <> - public async Task TestEndpointParametersOrDefaultAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, string password = null, string callback = null, DateTime? dateTime = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task TestEndpointParametersOrDefaultAsync(byte[] _byte, decimal number, double _double, string patternWithoutDelimiter, DateTime? date = null, System.IO.Stream binary = null, float? _float = null, int? integer = null, int? int32 = null, long? int64 = null, string _string = null, string password = null, string callback = null, DateTime? dateTime = null, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = null; try { - result = await TestEndpointParametersWithHttpInfoAsync(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, password, callback, dateTime, cancellationToken).ConfigureAwait(false); + result = await TestEndpointParametersWithHttpInfoAsync(_byte, number, _double, patternWithoutDelimiter, date, binary, _float, integer, int32, int64, _string, password, callback, dateTime, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -1556,43 +1844,138 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + protected virtual (byte[], decimal, double, string, DateTime?, System.IO.Stream, float?, int?, int?, long?, string, string, string, DateTime?) OnTestEndpointParameters(byte[] _byte, decimal number, double _double, string patternWithoutDelimiter, DateTime? date, System.IO.Stream binary, float? _float, int? integer, int? int32, long? int64, string _string, string password, string callback, DateTime? dateTime) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (_byte == null) + throw new ArgumentNullException(nameof(_byte)); + + if (number == null) + throw new ArgumentNullException(nameof(number)); + + if (_double == null) + throw new ArgumentNullException(nameof(_double)); + + if (patternWithoutDelimiter == null) + throw new ArgumentNullException(nameof(patternWithoutDelimiter)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return (_byte, number, _double, patternWithoutDelimiter, date, binary, _float, integer, int32, int64, _string, password, callback, dateTime); + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + protected virtual void AfterTestEndpointParameters(ApiResponse apiResponse, byte[] _byte, decimal number, double _double, string patternWithoutDelimiter, DateTime? date, System.IO.Stream binary, float? _float, int? integer, int? int32, long? int64, string _string, string password, string callback, DateTime? dateTime) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + protected virtual void OnErrorTestEndpointParameters(Exception exception, string pathFormat, string path, byte[] _byte, decimal number, double _double, string patternWithoutDelimiter, DateTime? date, System.IO.Stream binary, float? _float, int? integer, int? int32, long? int64, string _string, string password, string callback, DateTime? dateTime) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call + /// None /// None /// None /// None - /// None + /// None (optional) + /// None (optional) + /// None (optional) /// None (optional) /// None (optional) /// None (optional) - /// None (optional) /// None (optional) - /// None (optional) - /// None (optional) /// None (optional) /// None (optional) /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// Cancellation Token to cancel the request. /// <> where T : - public async Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, string password = null, string callback = null, DateTime? dateTime = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task> TestEndpointParametersWithHttpInfoAsync(byte[] _byte, decimal number, double _double, string patternWithoutDelimiter, DateTime? date = null, System.IO.Stream binary = null, float? _float = null, int? integer = null, int? int32 = null, long? int64 = null, string _string = null, string password = null, string callback = null, DateTime? dateTime = null, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (patternWithoutDelimiter == null) - throw new ArgumentNullException(nameof(patternWithoutDelimiter)); - - if (_byte == null) - throw new ArgumentNullException(nameof(_byte)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + var validatedParameters = OnTestEndpointParameters(_byte, number, _double, patternWithoutDelimiter, date, binary, _float, integer, int32, int64, _string, password, callback, dateTime); + _byte = validatedParameters.Item1; + number = validatedParameters.Item2; + _double = validatedParameters.Item3; + patternWithoutDelimiter = validatedParameters.Item4; + date = validatedParameters.Item5; + binary = validatedParameters.Item6; + _float = validatedParameters.Item7; + integer = validatedParameters.Item8; + int32 = validatedParameters.Item9; + int64 = validatedParameters.Item10; + _string = validatedParameters.Item11; + password = validatedParameters.Item12; + callback = validatedParameters.Item13; + dateTime = validatedParameters.Item14; using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -1606,13 +1989,28 @@ namespace Org.OpenAPITools.Api multipartContent.Add(new FormUrlEncodedContent(formParams)); + formParams.Add(new KeyValuePair("byte", ClientUtils.ParameterToString(_byte))); + + + formParams.Add(new KeyValuePair("number", ClientUtils.ParameterToString(number))); + + formParams.Add(new KeyValuePair("double", ClientUtils.ParameterToString(_double))); + + formParams.Add(new KeyValuePair("pattern_without_delimiter", ClientUtils.ParameterToString(patternWithoutDelimiter))); - formParams.Add(new KeyValuePair("byte", ClientUtils.ParameterToString(_byte))); + if (date != null) + formParams.Add(new KeyValuePair("date", ClientUtils.ParameterToString(date))); + + if (binary != null) + multipartContent.Add(new StreamContent(binary)); + + if (_float != null) + formParams.Add(new KeyValuePair("float", ClientUtils.ParameterToString(_float))); if (integer != null) formParams.Add(new KeyValuePair("integer", ClientUtils.ParameterToString(integer))); @@ -1623,18 +2021,9 @@ namespace Org.OpenAPITools.Api if (int64 != null) formParams.Add(new KeyValuePair("int64", ClientUtils.ParameterToString(int64))); - if (_float != null) - formParams.Add(new KeyValuePair("float", ClientUtils.ParameterToString(_float))); - if (_string != null) formParams.Add(new KeyValuePair("string", ClientUtils.ParameterToString(_string))); - if (binary != null) - multipartContent.Add(new StreamContent(binary)); - - if (date != null) - formParams.Add(new KeyValuePair("date", ClientUtils.ParameterToString(date))); - if (password != null) formParams.Add(new KeyValuePair("password", ClientUtils.ParameterToString(password))); @@ -1646,6 +2035,8 @@ namespace Org.OpenAPITools.Api List tokens = new List(); + + request.RequestUri = uriBuilder.Uri; BasicToken basicToken = (BasicToken) await BasicTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); @@ -1661,32 +2052,25 @@ namespace Org.OpenAPITools.Api string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); request.Method = HttpMethod.Post; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterTestEndpointParameters(apiResponse, _byte, number, _double, patternWithoutDelimiter, date, binary, _float, integer, int32, int64, _string, password, callback, dateTime); + } else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -1697,7 +2081,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorTestEndpointParameters(e, "/fake", uriBuilder.Path, _byte, number, _double, patternWithoutDelimiter, date, binary, _float, integer, int32, int64, _string, password, callback, dateTime); throw; } } @@ -1708,17 +2092,17 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Header parameter enum test (string array) (optional) /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) + /// Query parameter enum test (double) (optional) + /// Form parameter enum test (string array) (optional, default to $) /// Header parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (string) (optional, default to -efg) - /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel the request. /// <> - public async Task TestEnumParametersAsync(List enumHeaderStringArray = null, List enumQueryStringArray = null, int? enumQueryInteger = null, double? enumQueryDouble = null, string enumHeaderString = null, string enumQueryString = null, List enumFormStringArray = null, string enumFormString = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task TestEnumParametersAsync(List enumHeaderStringArray = null, List enumQueryStringArray = null, double? enumQueryDouble = null, int? enumQueryInteger = null, List enumFormStringArray = null, string enumHeaderString = null, string enumQueryString = null, string enumFormString = null, System.Threading.CancellationToken? cancellationToken = null) { - ApiResponse result = await TestEnumParametersWithHttpInfoAsync(enumHeaderStringArray, enumQueryStringArray, enumQueryInteger, enumQueryDouble, enumHeaderString, enumQueryString, enumFormStringArray, enumFormString, cancellationToken).ConfigureAwait(false); + ApiResponse result = await TestEnumParametersWithHttpInfoAsync(enumHeaderStringArray, enumQueryStringArray, enumQueryDouble, enumQueryInteger, enumFormStringArray, enumHeaderString, enumQueryString, enumFormString, cancellationToken).ConfigureAwait(false); if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); @@ -1732,20 +2116,20 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Header parameter enum test (string array) (optional) /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) + /// Query parameter enum test (double) (optional) + /// Form parameter enum test (string array) (optional, default to $) /// Header parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (string) (optional, default to -efg) - /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel the request. /// <> - public async Task TestEnumParametersOrDefaultAsync(List enumHeaderStringArray = null, List enumQueryStringArray = null, int? enumQueryInteger = null, double? enumQueryDouble = null, string enumHeaderString = null, string enumQueryString = null, List enumFormStringArray = null, string enumFormString = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task TestEnumParametersOrDefaultAsync(List enumHeaderStringArray = null, List enumQueryStringArray = null, double? enumQueryDouble = null, int? enumQueryInteger = null, List enumFormStringArray = null, string enumHeaderString = null, string enumQueryString = null, string enumFormString = null, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = null; try { - result = await TestEnumParametersWithHttpInfoAsync(enumHeaderStringArray, enumQueryStringArray, enumQueryInteger, enumQueryDouble, enumHeaderString, enumQueryString, enumFormStringArray, enumFormString, cancellationToken).ConfigureAwait(false); + result = await TestEnumParametersWithHttpInfoAsync(enumHeaderStringArray, enumQueryStringArray, enumQueryDouble, enumQueryInteger, enumFormStringArray, enumHeaderString, enumQueryString, enumFormString, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -1756,27 +2140,90 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + protected virtual (List, List, double?, int?, List, string, string, string) OnTestEnumParameters(List enumHeaderStringArray, List enumQueryStringArray, double? enumQueryDouble, int? enumQueryInteger, List enumFormStringArray, string enumHeaderString, string enumQueryString, string enumFormString) + { + return (enumHeaderStringArray, enumQueryStringArray, enumQueryDouble, enumQueryInteger, enumFormStringArray, enumHeaderString, enumQueryString, enumFormString); + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + protected virtual void AfterTestEnumParameters(ApiResponse apiResponse, List enumHeaderStringArray, List enumQueryStringArray, double? enumQueryDouble, int? enumQueryInteger, List enumFormStringArray, string enumHeaderString, string enumQueryString, string enumFormString) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + protected virtual void OnErrorTestEnumParameters(Exception exception, string pathFormat, string path, List enumHeaderStringArray, List enumQueryStringArray, double? enumQueryDouble, int? enumQueryInteger, List enumFormStringArray, string enumHeaderString, string enumQueryString, string enumFormString) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// To test enum parameters To test enum parameters /// /// Thrown when fails to make API call /// Header parameter enum test (string array) (optional) /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) + /// Query parameter enum test (double) (optional) + /// Form parameter enum test (string array) (optional, default to $) /// Header parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (string) (optional, default to -efg) - /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel the request. /// <> where T : - public async Task> TestEnumParametersWithHttpInfoAsync(List enumHeaderStringArray = null, List enumQueryStringArray = null, int? enumQueryInteger = null, double? enumQueryDouble = null, string enumHeaderString = null, string enumQueryString = null, List enumFormStringArray = null, string enumFormString = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task> TestEnumParametersWithHttpInfoAsync(List enumHeaderStringArray = null, List enumQueryStringArray = null, double? enumQueryDouble = null, int? enumQueryInteger = null, List enumFormStringArray = null, string enumHeaderString = null, string enumQueryString = null, string enumFormString = null, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { + var validatedParameters = OnTestEnumParameters(enumHeaderStringArray, enumQueryStringArray, enumQueryDouble, enumQueryInteger, enumFormStringArray, enumHeaderString, enumQueryString, enumFormString); + enumHeaderStringArray = validatedParameters.Item1; + enumQueryStringArray = validatedParameters.Item2; + enumQueryDouble = validatedParameters.Item3; + enumQueryInteger = validatedParameters.Item4; + enumFormStringArray = validatedParameters.Item5; + enumHeaderString = validatedParameters.Item6; + enumQueryString = validatedParameters.Item7; + enumFormString = validatedParameters.Item8; + using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -1786,12 +2233,12 @@ namespace Org.OpenAPITools.Api if (enumQueryStringArray != null) parseQueryString["enum_query_string_array"] = Uri.EscapeDataString(enumQueryStringArray.ToString()); - if (enumQueryInteger != null) - parseQueryString["enum_query_integer"] = Uri.EscapeDataString(enumQueryInteger.ToString()); - if (enumQueryDouble != null) parseQueryString["enum_query_double"] = Uri.EscapeDataString(enumQueryDouble.ToString()); + if (enumQueryInteger != null) + parseQueryString["enum_query_integer"] = Uri.EscapeDataString(enumQueryInteger.ToString()); + if (enumQueryString != null) parseQueryString["enum_query_string"] = Uri.EscapeDataString(enumQueryString.ToString()); @@ -1809,14 +2256,14 @@ namespace Org.OpenAPITools.Api List> formParams = new List>(); - multipartContent.Add(new FormUrlEncodedContent(formParams)); - - if (enumFormStringArray != null) + multipartContent.Add(new FormUrlEncodedContent(formParams)); if (enumFormStringArray != null) formParams.Add(new KeyValuePair("enum_form_string_array", ClientUtils.ParameterToString(enumFormStringArray))); if (enumFormString != null) formParams.Add(new KeyValuePair("enum_form_string", ClientUtils.ParameterToString(enumFormString))); + + request.RequestUri = uriBuilder.Uri; string[] contentTypes = new string[] { @@ -1826,32 +2273,25 @@ namespace Org.OpenAPITools.Api string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); request.Method = HttpMethod.Get; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterTestEnumParameters(apiResponse, enumHeaderStringArray, enumQueryStringArray, enumQueryDouble, enumQueryInteger, enumFormStringArray, enumHeaderString, enumQueryString, enumFormString); + } return apiResponse; } @@ -1859,7 +2299,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorTestEnumParameters(e, "/fake", uriBuilder.Path, enumHeaderStringArray, enumQueryStringArray, enumQueryDouble, enumQueryInteger, enumFormStringArray, enumHeaderString, enumQueryString, enumFormString); throw; } } @@ -1868,17 +2308,17 @@ namespace Org.OpenAPITools.Api /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) /// /// Thrown when fails to make API call - /// Required String in group parameters /// Required Boolean in group parameters + /// Required String in group parameters /// Required Integer in group parameters - /// String in group parameters (optional) /// Boolean in group parameters (optional) + /// String in group parameters (optional) /// Integer in group parameters (optional) /// Cancellation Token to cancel the request. /// <> - public async Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task TestGroupParametersAsync(bool requiredBooleanGroup, int requiredStringGroup, long requiredInt64Group, bool? booleanGroup = null, int? stringGroup = null, long? int64Group = null, System.Threading.CancellationToken? cancellationToken = null) { - ApiResponse result = await TestGroupParametersWithHttpInfoAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, cancellationToken).ConfigureAwait(false); + ApiResponse result = await TestGroupParametersWithHttpInfoAsync(requiredBooleanGroup, requiredStringGroup, requiredInt64Group, booleanGroup, stringGroup, int64Group, cancellationToken).ConfigureAwait(false); if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); @@ -1890,20 +2330,20 @@ namespace Org.OpenAPITools.Api /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) /// /// Thrown when fails to make API call - /// Required String in group parameters /// Required Boolean in group parameters + /// Required String in group parameters /// Required Integer in group parameters - /// String in group parameters (optional) /// Boolean in group parameters (optional) + /// String in group parameters (optional) /// Integer in group parameters (optional) /// Cancellation Token to cancel the request. /// <> - public async Task TestGroupParametersOrDefaultAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task TestGroupParametersOrDefaultAsync(bool requiredBooleanGroup, int requiredStringGroup, long requiredInt64Group, bool? booleanGroup = null, int? stringGroup = null, long? int64Group = null, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = null; try { - result = await TestGroupParametersWithHttpInfoAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, cancellationToken).ConfigureAwait(false); + result = await TestGroupParametersWithHttpInfoAsync(requiredBooleanGroup, requiredStringGroup, requiredInt64Group, booleanGroup, stringGroup, int64Group, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -1914,29 +2354,95 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + /// + /// + /// + /// + /// + protected virtual (bool, int, long, bool?, int?, long?) OnTestGroupParameters(bool requiredBooleanGroup, int requiredStringGroup, long requiredInt64Group, bool? booleanGroup, int? stringGroup, long? int64Group) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (requiredBooleanGroup == null) + throw new ArgumentNullException(nameof(requiredBooleanGroup)); + + if (requiredStringGroup == null) + throw new ArgumentNullException(nameof(requiredStringGroup)); + + if (requiredInt64Group == null) + throw new ArgumentNullException(nameof(requiredInt64Group)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return (requiredBooleanGroup, requiredStringGroup, requiredInt64Group, booleanGroup, stringGroup, int64Group); + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + /// + /// + /// + protected virtual void AfterTestGroupParameters(ApiResponse apiResponse, bool requiredBooleanGroup, int requiredStringGroup, long requiredInt64Group, bool? booleanGroup, int? stringGroup, long? int64Group) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + protected virtual void OnErrorTestGroupParameters(Exception exception, string pathFormat, string path, bool requiredBooleanGroup, int requiredStringGroup, long requiredInt64Group, bool? booleanGroup, int? stringGroup, long? int64Group) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) /// /// Thrown when fails to make API call - /// Required String in group parameters /// Required Boolean in group parameters + /// Required String in group parameters /// Required Integer in group parameters - /// String in group parameters (optional) /// Boolean in group parameters (optional) + /// String in group parameters (optional) /// Integer in group parameters (optional) /// Cancellation Token to cancel the request. /// <> where T : - public async Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task> TestGroupParametersWithHttpInfoAsync(bool requiredBooleanGroup, int requiredStringGroup, long requiredInt64Group, bool? booleanGroup = null, int? stringGroup = null, long? int64Group = null, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + var validatedParameters = OnTestGroupParameters(requiredBooleanGroup, requiredStringGroup, requiredInt64Group, booleanGroup, stringGroup, int64Group); + requiredBooleanGroup = validatedParameters.Item1; + requiredStringGroup = validatedParameters.Item2; + requiredInt64Group = validatedParameters.Item3; + booleanGroup = validatedParameters.Item4; + stringGroup = validatedParameters.Item5; + int64Group = validatedParameters.Item6; using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -1962,6 +2468,8 @@ namespace Org.OpenAPITools.Api List tokens = new List(); + + request.RequestUri = uriBuilder.Uri; BearerToken bearerToken = (BearerToken) await BearerTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); @@ -1972,28 +2480,21 @@ namespace Org.OpenAPITools.Api request.Method = HttpMethod.Delete; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterTestGroupParameters(apiResponse, requiredBooleanGroup, requiredStringGroup, requiredInt64Group, booleanGroup, stringGroup, int64Group); + } else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -2004,7 +2505,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorTestGroupParameters(e, "/fake", uriBuilder.Path, requiredBooleanGroup, requiredStringGroup, requiredInt64Group, booleanGroup, stringGroup, int64Group); throw; } } @@ -2049,6 +2550,46 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual Dictionary OnTestInlineAdditionalProperties(Dictionary requestBody) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (requestBody == null) + throw new ArgumentNullException(nameof(requestBody)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return requestBody; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterTestInlineAdditionalProperties(ApiResponse apiResponse, Dictionary requestBody) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorTestInlineAdditionalProperties(Exception exception, string pathFormat, string path, Dictionary requestBody) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// test inline additionalProperties /// @@ -2058,18 +2599,14 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> TestInlineAdditionalPropertiesWithHttpInfoAsync(Dictionary requestBody, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (requestBody == null) - throw new ArgumentNullException(nameof(requestBody)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + requestBody = OnTestInlineAdditionalProperties(requestBody); using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -2079,6 +2616,8 @@ namespace Org.OpenAPITools.Api ? request.Content = new StreamContent(stream) : request.Content = new StringContent(JsonSerializer.Serialize(requestBody, _jsonSerializerOptions)); + + request.RequestUri = uriBuilder.Uri; string[] contentTypes = new string[] { @@ -2088,32 +2627,25 @@ namespace Org.OpenAPITools.Api string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); request.Method = HttpMethod.Post; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/inline-additionalProperties", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/inline-additionalProperties")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterTestInlineAdditionalProperties(apiResponse, requestBody); + } return apiResponse; } @@ -2121,7 +2653,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorTestInlineAdditionalProperties(e, "/fake/inline-additionalProperties", uriBuilder.Path, requestBody); throw; } } @@ -2168,6 +2700,52 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + /// + protected virtual (string, string) OnTestJsonFormData(string param, string param2) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (param == null) + throw new ArgumentNullException(nameof(param)); + + if (param2 == null) + throw new ArgumentNullException(nameof(param2)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return (param, param2); + } + + /// + /// Processes the server response + /// + /// + /// + /// + protected virtual void AfterTestJsonFormData(ApiResponse apiResponse, string param, string param2) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + /// + protected virtual void OnErrorTestJsonFormData(Exception exception, string pathFormat, string path, string param, string param2) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// test json serialization of form data /// @@ -2178,21 +2756,16 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> TestJsonFormDataWithHttpInfoAsync(string param, string param2, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (param == null) - throw new ArgumentNullException(nameof(param)); - - if (param2 == null) - throw new ArgumentNullException(nameof(param2)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + var validatedParameters = OnTestJsonFormData(param, param2); + param = validatedParameters.Item1; + param2 = validatedParameters.Item2; using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -2208,8 +2781,12 @@ namespace Org.OpenAPITools.Api formParams.Add(new KeyValuePair("param", ClientUtils.ParameterToString(param))); + + formParams.Add(new KeyValuePair("param2", ClientUtils.ParameterToString(param2))); + + request.RequestUri = uriBuilder.Uri; string[] contentTypes = new string[] { @@ -2219,32 +2796,25 @@ namespace Org.OpenAPITools.Api string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); request.Method = HttpMethod.Get; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/jsonFormData", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/jsonFormData")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterTestJsonFormData(apiResponse, param, param2); + } return apiResponse; } @@ -2252,7 +2822,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorTestJsonFormData(e, "/fake/jsonFormData", uriBuilder.Path, param, param2); throw; } } @@ -2305,6 +2875,70 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + /// + /// + /// + /// + protected virtual (List, List, List, List, List) OnTestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (pipe == null) + throw new ArgumentNullException(nameof(pipe)); + + if (ioutil == null) + throw new ArgumentNullException(nameof(ioutil)); + + if (http == null) + throw new ArgumentNullException(nameof(http)); + + if (url == null) + throw new ArgumentNullException(nameof(url)); + + if (context == null) + throw new ArgumentNullException(nameof(context)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return (pipe, ioutil, http, url, context); + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + /// + /// + protected virtual void AfterTestQueryParameterCollectionFormat(ApiResponse apiResponse, List pipe, List ioutil, List http, List url, List context) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + /// + /// + /// + /// + protected virtual void OnErrorTestQueryParameterCollectionFormat(Exception exception, string pathFormat, string path, List pipe, List ioutil, List http, List url, List context) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// To test the collection format in query parameters /// @@ -2318,30 +2952,19 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> TestQueryParameterCollectionFormatWithHttpInfoAsync(List pipe, List ioutil, List http, List url, List context, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (pipe == null) - throw new ArgumentNullException(nameof(pipe)); - - if (ioutil == null) - throw new ArgumentNullException(nameof(ioutil)); - - if (http == null) - throw new ArgumentNullException(nameof(http)); - - if (url == null) - throw new ArgumentNullException(nameof(url)); - - if (context == null) - throw new ArgumentNullException(nameof(context)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + var validatedParameters = OnTestQueryParameterCollectionFormat(pipe, ioutil, http, url, context); + pipe = validatedParameters.Item1; + ioutil = validatedParameters.Item2; + http = validatedParameters.Item3; + url = validatedParameters.Item4; + context = validatedParameters.Item5; using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -2357,32 +2980,27 @@ namespace Org.OpenAPITools.Api uriBuilder.Query = parseQueryString.ToString(); + + request.RequestUri = uriBuilder.Uri; request.Method = HttpMethod.Put; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/test-query-parameters", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/test-query-parameters")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterTestQueryParameterCollectionFormat(apiResponse, pipe, ioutil, http, url, context); + } return apiResponse; } @@ -2390,8 +3008,9 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorTestQueryParameterCollectionFormat(e, "/fake/test-query-parameters", uriBuilder.Path, pipe, ioutil, http, url, context); throw; } - } } + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs index 321be9fcde..07d8973b74 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs @@ -19,10 +19,11 @@ using System.Text.Json; using Org.OpenAPITools.Client; using Org.OpenAPITools.Model; -namespace Org.OpenAPITools.Api +namespace Org.OpenAPITools.IApi { /// /// Represents a collection of functions to interact with the API endpoints + /// This class is registered as transient. /// public interface IFakeClassnameTags123Api : IApi { @@ -48,21 +49,19 @@ namespace Org.OpenAPITools.Api /// client model /// Cancellation Token to cancel the request. /// Task of ApiResponse<ModelClient> - Task TestClassnameAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null); } + Task TestClassnameAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null); + } +} +namespace Org.OpenAPITools.Api +{ /// /// Represents a collection of functions to interact with the API endpoints /// - public partial class FakeClassnameTags123Api : IFakeClassnameTags123Api + public partial class FakeClassnameTags123Api : IApi.IFakeClassnameTags123Api { private JsonSerializerOptions _jsonSerializerOptions; - /// - /// An event to track the health of the server. - /// If you store these event args, be sure to purge old event args to prevent a memory leak. - /// - public event ClientUtils.EventHandler ApiResponded; - /// /// The logger /// @@ -119,6 +118,15 @@ namespace Org.OpenAPITools.Api OauthTokenProvider = oauthTokenProvider; } + /// + /// Logs the api response + /// + /// + protected virtual void OnApiResponded(ApiResponseEventArgs args) + { + Logger.LogInformation("{0,-9} | {1} | {3}", (args.ReceivedAt - args.RequestedAt).TotalSeconds, args.HttpStatus, args.Path); + } + /// /// To test class name in snake case To test class name in snake case /// @@ -159,6 +167,46 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual ModelClient OnTestClassname(ModelClient modelClient) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (modelClient == null) + throw new ArgumentNullException(nameof(modelClient)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return modelClient; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterTestClassname(ApiResponse apiResponse, ModelClient modelClient) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorTestClassname(Exception exception, string pathFormat, string path, ModelClient modelClient) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// To test class name in snake case To test class name in snake case /// @@ -168,26 +216,22 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> TestClassnameWithHttpInfoAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (modelClient == null) - throw new ArgumentNullException(nameof(modelClient)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + modelClient = OnTestClassname(modelClient); using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/fake_classname_test"; - System.Collections.Specialized.NameValueCollection parseQueryString = System.Web.HttpUtility.ParseQueryString(string.Empty); - request.Content = (modelClient as object) is System.IO.Stream stream + + System.Collections.Specialized.NameValueCollection parseQueryString = System.Web.HttpUtility.ParseQueryString(string.Empty); request.Content = (modelClient as object) is System.IO.Stream stream ? request.Content = new StreamContent(stream) : request.Content = new StringContent(JsonSerializer.Serialize(modelClient, _jsonSerializerOptions)); @@ -210,7 +254,7 @@ namespace Org.OpenAPITools.Api string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); string[] accepts = new string[] { "application/json" @@ -220,31 +264,24 @@ namespace Org.OpenAPITools.Api if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - + request.Method = HttpMethod.Patch; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake_classname_test", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake_classname_test")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterTestClassname(apiResponse, modelClient); + } else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -255,8 +292,9 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorTestClassname(e, "/fake_classname_test", uriBuilder.Path, modelClient); throw; } - } } + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/IApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/IApi.cs new file mode 100644 index 0000000000..038f19bcfa --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/IApi.cs @@ -0,0 +1,15 @@ +using System.Net.Http; + +namespace Org.OpenAPITools.IApi +{ + /// + /// Any Api client + /// + public interface IApi + { + /// + /// The HttpClient + /// + HttpClient HttpClient { get; } + } +} \ No newline at end of file diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/PetApi.cs index 53546aadb1..33b932d41a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/PetApi.cs @@ -19,10 +19,11 @@ using System.Text.Json; using Org.OpenAPITools.Client; using Org.OpenAPITools.Model; -namespace Org.OpenAPITools.Api +namespace Org.OpenAPITools.IApi { /// /// Represents a collection of functions to interact with the API endpoints + /// This class is registered as transient. /// public interface IPetApi : IApi { @@ -49,6 +50,7 @@ namespace Org.OpenAPITools.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task AddPetAsync(Pet pet, System.Threading.CancellationToken? cancellationToken = null); + /// /// Deletes a pet /// @@ -74,6 +76,7 @@ namespace Org.OpenAPITools.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task DeletePetAsync(long petId, string apiKey = null, System.Threading.CancellationToken? cancellationToken = null); + /// /// Finds Pets by status /// @@ -97,6 +100,7 @@ namespace Org.OpenAPITools.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse<List<Pet>> Task> FindPetsByStatusAsync(List status, System.Threading.CancellationToken? cancellationToken = null); + /// /// Finds Pets by tags /// @@ -120,6 +124,7 @@ namespace Org.OpenAPITools.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse<List<Pet>> Task> FindPetsByTagsAsync(List tags, System.Threading.CancellationToken? cancellationToken = null); + /// /// Find pet by ID /// @@ -143,6 +148,7 @@ namespace Org.OpenAPITools.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse<Pet> Task GetPetByIdAsync(long petId, System.Threading.CancellationToken? cancellationToken = null); + /// /// Update an existing pet /// @@ -166,6 +172,7 @@ namespace Org.OpenAPITools.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task UpdatePetAsync(Pet pet, System.Threading.CancellationToken? cancellationToken = null); + /// /// Updates a pet in the store with form data /// @@ -193,19 +200,6 @@ namespace Org.OpenAPITools.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task UpdatePetWithFormAsync(long petId, string name = null, string status = null, System.Threading.CancellationToken? cancellationToken = null); - /// - /// uploads an image - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// Additional data to pass to server (optional) - /// file to upload (optional) - /// Cancellation Token to cancel the request. - /// Task<ApiResponse<ApiResponse>> - Task> UploadFileWithHttpInfoAsync(long petId, string additionalMetadata = null, System.IO.Stream file = null, System.Threading.CancellationToken? cancellationToken = null); /// /// uploads an image @@ -215,24 +209,25 @@ namespace Org.OpenAPITools.Api /// /// Thrown when fails to make API call /// ID of pet to update - /// Additional data to pass to server (optional) /// file to upload (optional) - /// Cancellation Token to cancel the request. - /// Task of ApiResponse<ApiResponse> - Task UploadFileAsync(long petId, string additionalMetadata = null, System.IO.Stream file = null, System.Threading.CancellationToken? cancellationToken = null); - /// - /// uploads an image (required) - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload /// Additional data to pass to server (optional) /// Cancellation Token to cancel the request. /// Task<ApiResponse<ApiResponse>> - Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null); + Task> UploadFileWithHttpInfoAsync(long petId, System.IO.Stream file = null, string additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null); + + /// + /// uploads an image + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload (optional) + /// Additional data to pass to server (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse<ApiResponse> + Task UploadFileAsync(long petId, System.IO.Stream file = null, string additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null); /// /// uploads an image (required) @@ -241,26 +236,38 @@ namespace Org.OpenAPITools.Api /// /// /// Thrown when fails to make API call - /// ID of pet to update /// file to upload + /// ID of pet to update + /// Additional data to pass to server (optional) + /// Cancellation Token to cancel the request. + /// Task<ApiResponse<ApiResponse>> + Task> UploadFileWithRequiredFileWithHttpInfoAsync(System.IO.Stream requiredFile, long petId, string additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null); + + /// + /// uploads an image (required) + /// + /// + /// + /// + /// Thrown when fails to make API call + /// file to upload + /// ID of pet to update /// Additional data to pass to server (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse<ApiResponse> - Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null); } + Task UploadFileWithRequiredFileAsync(System.IO.Stream requiredFile, long petId, string additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null); + } +} +namespace Org.OpenAPITools.Api +{ /// /// Represents a collection of functions to interact with the API endpoints /// - public partial class PetApi : IPetApi + public partial class PetApi : IApi.IPetApi { private JsonSerializerOptions _jsonSerializerOptions; - /// - /// An event to track the health of the server. - /// If you store these event args, be sure to purge old event args to prevent a memory leak. - /// - public event ClientUtils.EventHandler ApiResponded; - /// /// The logger /// @@ -317,6 +324,15 @@ namespace Org.OpenAPITools.Api OauthTokenProvider = oauthTokenProvider; } + /// + /// Logs the api response + /// + /// + protected virtual void OnApiResponded(ApiResponseEventArgs args) + { + Logger.LogInformation("{0,-9} | {1} | {3}", (args.ReceivedAt - args.RequestedAt).TotalSeconds, args.HttpStatus, args.Path); + } + /// /// Add a new pet to the store /// @@ -357,6 +373,46 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual Pet OnAddPet(Pet pet) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (pet == null) + throw new ArgumentNullException(nameof(pet)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return pet; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterAddPet(ApiResponse apiResponse, Pet pet) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorAddPet(Exception exception, string pathFormat, string path, Pet pet) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Add a new pet to the store /// @@ -366,22 +422,18 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> AddPetWithHttpInfoAsync(Pet pet, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (pet == null) - throw new ArgumentNullException(nameof(pet)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + pet = OnAddPet(pet); using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); - uriBuilder.Host = HttpClient.BaseAddress.Host; - uriBuilder.Port = HttpClient.BaseAddress.Port; - uriBuilder.Scheme = ClientUtils.SCHEME; - uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/pet"; + var url = request.RequestUri = new Uri("http://petstore.swagger.io/v2"); + uriBuilder.Host = url.Authority; + uriBuilder.Scheme = url.Scheme; + uriBuilder.Path = url.AbsolutePath; request.Content = (pet as object) is System.IO.Stream stream ? request.Content = new StreamContent(stream) @@ -389,6 +441,8 @@ namespace Org.OpenAPITools.Api List tokens = new List(); + + request.RequestUri = uriBuilder.Uri; HttpSignatureToken signatureToken = (HttpSignatureToken) await HttpSignatureTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); @@ -413,32 +467,25 @@ namespace Org.OpenAPITools.Api string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); request.Method = HttpMethod.Post; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/pet", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/pet")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterAddPet(apiResponse, pet); + } else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -452,7 +499,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorAddPet(e, "/pet", uriBuilder.Path, pet); throw; } } @@ -499,6 +546,49 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + /// + protected virtual (long, string) OnDeletePet(long petId, string apiKey) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (petId == null) + throw new ArgumentNullException(nameof(petId)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return (petId, apiKey); + } + + /// + /// Processes the server response + /// + /// + /// + /// + protected virtual void AfterDeletePet(ApiResponse apiResponse, long petId, string apiKey) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + /// + protected virtual void OnErrorDeletePet(Exception exception, string pathFormat, string path, long petId, string apiKey) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Deletes a pet /// @@ -509,26 +599,28 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> DeletePetWithHttpInfoAsync(long petId, string apiKey = null, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + var validatedParameters = OnDeletePet(petId, apiKey); + petId = validatedParameters.Item1; + apiKey = validatedParameters.Item2; using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/pet/{petId}"; - uriBuilder.Path = uriBuilder.Path.Replace("%7BpetId%7D", Uri.EscapeDataString(petId.ToString())); - if (apiKey != null) + uriBuilder.Path = uriBuilder.Path.Replace("%7BpetId%7D", Uri.EscapeDataString(petId.ToString())); if (apiKey != null) request.Headers.Add("api_key", ClientUtils.ParameterToString(apiKey)); List tokens = new List(); + + request.RequestUri = uriBuilder.Uri; OAuthToken oauthToken = (OAuthToken) await OauthTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); @@ -539,28 +631,21 @@ namespace Org.OpenAPITools.Api request.Method = HttpMethod.Delete; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/pet/{petId}", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/pet/{petId}")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterDeletePet(apiResponse, petId, apiKey); + } else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -571,7 +656,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorDeletePet(e, "/pet/{petId}", uriBuilder.Path, petId, apiKey); throw; } } @@ -616,6 +701,46 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual List OnFindPetsByStatus(List status) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (status == null) + throw new ArgumentNullException(nameof(status)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return status; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterFindPetsByStatus(ApiResponse> apiResponse, List status) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorFindPetsByStatus(Exception exception, string pathFormat, string path, List status) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Finds Pets by status Multiple status values can be provided with comma separated strings /// @@ -625,18 +750,14 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task>> FindPetsByStatusWithHttpInfoAsync(List status, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (status == null) - throw new ArgumentNullException(nameof(status)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + status = OnFindPetsByStatus(status); using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -650,6 +771,8 @@ namespace Org.OpenAPITools.Api List tokens = new List(); + + request.RequestUri = uriBuilder.Uri; HttpSignatureToken signatureToken = (HttpSignatureToken) await HttpSignatureTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); @@ -675,31 +798,24 @@ namespace Org.OpenAPITools.Api if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - + request.Method = HttpMethod.Get; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/pet/findByStatus", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/pet/findByStatus")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse> apiResponse = new ApiResponse>(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize>(apiResponse.RawContent, _jsonSerializerOptions); + AfterFindPetsByStatus(apiResponse, status); + } else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -713,7 +829,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorFindPetsByStatus(e, "/pet/findByStatus", uriBuilder.Path, status); throw; } } @@ -758,6 +874,46 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual List OnFindPetsByTags(List tags) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (tags == null) + throw new ArgumentNullException(nameof(tags)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return tags; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterFindPetsByTags(ApiResponse> apiResponse, List tags) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorFindPetsByTags(Exception exception, string pathFormat, string path, List tags) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. /// @@ -767,18 +923,14 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task>> FindPetsByTagsWithHttpInfoAsync(List tags, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (tags == null) - throw new ArgumentNullException(nameof(tags)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + tags = OnFindPetsByTags(tags); using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -792,6 +944,8 @@ namespace Org.OpenAPITools.Api List tokens = new List(); + + request.RequestUri = uriBuilder.Uri; HttpSignatureToken signatureToken = (HttpSignatureToken) await HttpSignatureTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); @@ -817,31 +971,24 @@ namespace Org.OpenAPITools.Api if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - + request.Method = HttpMethod.Get; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/pet/findByTags", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/pet/findByTags")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse> apiResponse = new ApiResponse>(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize>(apiResponse.RawContent, _jsonSerializerOptions); + AfterFindPetsByTags(apiResponse, tags); + } else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -855,7 +1002,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorFindPetsByTags(e, "/pet/findByTags", uriBuilder.Path, tags); throw; } } @@ -900,6 +1047,46 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual long OnGetPetById(long petId) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (petId == null) + throw new ArgumentNullException(nameof(petId)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return petId; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterGetPetById(ApiResponse apiResponse, long petId) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorGetPetById(Exception exception, string pathFormat, string path, long petId) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Find pet by ID Returns a single pet /// @@ -909,22 +1096,20 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> GetPetByIdWithHttpInfoAsync(long petId, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + petId = OnGetPetById(petId); using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/pet/{petId}"; - uriBuilder.Path = uriBuilder.Path.Replace("%7BpetId%7D", Uri.EscapeDataString(petId.ToString())); - List tokens = new List(); + uriBuilder.Path = uriBuilder.Path.Replace("%7BpetId%7D", Uri.EscapeDataString(petId.ToString())); List tokens = new List(); ApiKeyToken apiKey = (ApiKeyToken) await ApiKeyProvider.GetAsync(cancellationToken).ConfigureAwait(false); @@ -943,31 +1128,24 @@ namespace Org.OpenAPITools.Api if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - + request.Method = HttpMethod.Get; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/pet/{petId}", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/pet/{petId}")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterGetPetById(apiResponse, petId); + } else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -978,7 +1156,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorGetPetById(e, "/pet/{petId}", uriBuilder.Path, petId); throw; } } @@ -1023,6 +1201,46 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual Pet OnUpdatePet(Pet pet) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (pet == null) + throw new ArgumentNullException(nameof(pet)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return pet; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterUpdatePet(ApiResponse apiResponse, Pet pet) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorUpdatePet(Exception exception, string pathFormat, string path, Pet pet) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Update an existing pet /// @@ -1032,22 +1250,18 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> UpdatePetWithHttpInfoAsync(Pet pet, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (pet == null) - throw new ArgumentNullException(nameof(pet)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + pet = OnUpdatePet(pet); using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); - uriBuilder.Host = HttpClient.BaseAddress.Host; - uriBuilder.Port = HttpClient.BaseAddress.Port; - uriBuilder.Scheme = ClientUtils.SCHEME; - uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/pet"; + var url = request.RequestUri = new Uri("http://petstore.swagger.io/v2"); + uriBuilder.Host = url.Authority; + uriBuilder.Scheme = url.Scheme; + uriBuilder.Path = url.AbsolutePath; request.Content = (pet as object) is System.IO.Stream stream ? request.Content = new StreamContent(stream) @@ -1055,6 +1269,8 @@ namespace Org.OpenAPITools.Api List tokens = new List(); + + request.RequestUri = uriBuilder.Uri; HttpSignatureToken signatureToken = (HttpSignatureToken) await HttpSignatureTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); @@ -1079,32 +1295,25 @@ namespace Org.OpenAPITools.Api string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); request.Method = HttpMethod.Put; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/pet", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/pet")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterUpdatePet(apiResponse, pet); + } else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -1118,7 +1327,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorUpdatePet(e, "/pet", uriBuilder.Path, pet); throw; } } @@ -1167,6 +1376,52 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + /// + /// + protected virtual (long, string, string) OnUpdatePetWithForm(long petId, string name, string status) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (petId == null) + throw new ArgumentNullException(nameof(petId)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return (petId, name, status); + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void AfterUpdatePetWithForm(ApiResponse apiResponse, long petId, string name, string status) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + /// + /// + protected virtual void OnErrorUpdatePetWithForm(Exception exception, string pathFormat, string path, long petId, string name, string status) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Updates a pet in the store with form data /// @@ -1178,30 +1433,29 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> UpdatePetWithFormWithHttpInfoAsync(long petId, string name = null, string status = null, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + var validatedParameters = OnUpdatePetWithForm(petId, name, status); + petId = validatedParameters.Item1; + name = validatedParameters.Item2; + status = validatedParameters.Item3; using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/pet/{petId}"; - uriBuilder.Path = uriBuilder.Path.Replace("%7BpetId%7D", Uri.EscapeDataString(petId.ToString())); - MultipartContent multipartContent = new MultipartContent(); + uriBuilder.Path = uriBuilder.Path.Replace("%7BpetId%7D", Uri.EscapeDataString(petId.ToString())); MultipartContent multipartContent = new MultipartContent(); request.Content = multipartContent; List> formParams = new List>(); - multipartContent.Add(new FormUrlEncodedContent(formParams)); - - if (name != null) + multipartContent.Add(new FormUrlEncodedContent(formParams)); if (name != null) formParams.Add(new KeyValuePair("name", ClientUtils.ParameterToString(name))); if (status != null) @@ -1209,6 +1463,8 @@ namespace Org.OpenAPITools.Api List tokens = new List(); + + request.RequestUri = uriBuilder.Uri; OAuthToken oauthToken = (OAuthToken) await OauthTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); @@ -1224,32 +1480,25 @@ namespace Org.OpenAPITools.Api string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); request.Method = HttpMethod.Post; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/pet/{petId}", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/pet/{petId}")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterUpdatePetWithForm(apiResponse, petId, name, status); + } else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -1260,7 +1509,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorUpdatePetWithForm(e, "/pet/{petId}", uriBuilder.Path, petId, name, status); throw; } } @@ -1270,13 +1519,13 @@ namespace Org.OpenAPITools.Api /// /// Thrown when fails to make API call /// ID of pet to update - /// Additional data to pass to server (optional) /// file to upload (optional) + /// Additional data to pass to server (optional) /// Cancellation Token to cancel the request. /// <> - public async Task UploadFileAsync(long petId, string additionalMetadata = null, System.IO.Stream file = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task UploadFileAsync(long petId, System.IO.Stream file = null, string additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null) { - ApiResponse result = await UploadFileWithHttpInfoAsync(petId, additionalMetadata, file, cancellationToken).ConfigureAwait(false); + ApiResponse result = await UploadFileWithHttpInfoAsync(petId, file, additionalMetadata, cancellationToken).ConfigureAwait(false); if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); @@ -1289,16 +1538,16 @@ namespace Org.OpenAPITools.Api /// /// Thrown when fails to make API call /// ID of pet to update - /// Additional data to pass to server (optional) /// file to upload (optional) + /// Additional data to pass to server (optional) /// Cancellation Token to cancel the request. /// <> - public async Task UploadFileOrDefaultAsync(long petId, string additionalMetadata = null, System.IO.Stream file = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task UploadFileOrDefaultAsync(long petId, System.IO.Stream file = null, string additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = null; try { - result = await UploadFileWithHttpInfoAsync(petId, additionalMetadata, file, cancellationToken).ConfigureAwait(false); + result = await UploadFileWithHttpInfoAsync(petId, file, additionalMetadata, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -1309,48 +1558,95 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + /// + /// + protected virtual (long, System.IO.Stream, string) OnUploadFile(long petId, System.IO.Stream file, string additionalMetadata) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (petId == null) + throw new ArgumentNullException(nameof(petId)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return (petId, file, additionalMetadata); + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void AfterUploadFile(ApiResponse apiResponse, long petId, System.IO.Stream file, string additionalMetadata) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + /// + /// + protected virtual void OnErrorUploadFile(Exception exception, string pathFormat, string path, long petId, System.IO.Stream file, string additionalMetadata) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// uploads an image /// /// Thrown when fails to make API call /// ID of pet to update - /// Additional data to pass to server (optional) /// file to upload (optional) + /// Additional data to pass to server (optional) /// Cancellation Token to cancel the request. /// <> where T : - public async Task> UploadFileWithHttpInfoAsync(long petId, string additionalMetadata = null, System.IO.Stream file = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task> UploadFileWithHttpInfoAsync(long petId, System.IO.Stream file = null, string additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + var validatedParameters = OnUploadFile(petId, file, additionalMetadata); + petId = validatedParameters.Item1; + file = validatedParameters.Item2; + additionalMetadata = validatedParameters.Item3; using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/pet/{petId}/uploadImage"; - uriBuilder.Path = uriBuilder.Path.Replace("%7BpetId%7D", Uri.EscapeDataString(petId.ToString())); - MultipartContent multipartContent = new MultipartContent(); + uriBuilder.Path = uriBuilder.Path.Replace("%7BpetId%7D", Uri.EscapeDataString(petId.ToString())); MultipartContent multipartContent = new MultipartContent(); request.Content = multipartContent; List> formParams = new List>(); - multipartContent.Add(new FormUrlEncodedContent(formParams)); + multipartContent.Add(new FormUrlEncodedContent(formParams)); if (file != null) + multipartContent.Add(new StreamContent(file)); if (additionalMetadata != null) formParams.Add(new KeyValuePair("additionalMetadata", ClientUtils.ParameterToString(additionalMetadata))); - if (file != null) - multipartContent.Add(new StreamContent(file)); - List tokens = new List(); + + request.RequestUri = uriBuilder.Uri; OAuthToken oauthToken = (OAuthToken) await OauthTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); @@ -1366,7 +1662,7 @@ namespace Org.OpenAPITools.Api string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); string[] accepts = new string[] { "application/json" @@ -1376,31 +1672,24 @@ namespace Org.OpenAPITools.Api if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - + request.Method = HttpMethod.Post; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/pet/{petId}/uploadImage", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/pet/{petId}/uploadImage")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterUploadFile(apiResponse, petId, file, additionalMetadata); + } else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -1411,7 +1700,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorUploadFile(e, "/pet/{petId}/uploadImage", uriBuilder.Path, petId, file, additionalMetadata); throw; } } @@ -1420,14 +1709,14 @@ namespace Org.OpenAPITools.Api /// uploads an image (required) /// /// Thrown when fails to make API call - /// ID of pet to update /// file to upload + /// ID of pet to update /// Additional data to pass to server (optional) /// Cancellation Token to cancel the request. /// <> - public async Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task UploadFileWithRequiredFileAsync(System.IO.Stream requiredFile, long petId, string additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null) { - ApiResponse result = await UploadFileWithRequiredFileWithHttpInfoAsync(petId, requiredFile, additionalMetadata, cancellationToken).ConfigureAwait(false); + ApiResponse result = await UploadFileWithRequiredFileWithHttpInfoAsync(requiredFile, petId, additionalMetadata, cancellationToken).ConfigureAwait(false); if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); @@ -1439,17 +1728,17 @@ namespace Org.OpenAPITools.Api /// uploads an image (required) /// /// Thrown when fails to make API call - /// ID of pet to update /// file to upload + /// ID of pet to update /// Additional data to pass to server (optional) /// Cancellation Token to cancel the request. /// <> - public async Task UploadFileWithRequiredFileOrDefaultAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task UploadFileWithRequiredFileOrDefaultAsync(System.IO.Stream requiredFile, long petId, string additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = null; try { - result = await UploadFileWithRequiredFileWithHttpInfoAsync(petId, requiredFile, additionalMetadata, cancellationToken).ConfigureAwait(false); + result = await UploadFileWithRequiredFileWithHttpInfoAsync(requiredFile, petId, additionalMetadata, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -1460,50 +1749,97 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + /// + /// + protected virtual (System.IO.Stream, long, string) OnUploadFileWithRequiredFile(System.IO.Stream requiredFile, long petId, string additionalMetadata) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (requiredFile == null) + throw new ArgumentNullException(nameof(requiredFile)); + + if (petId == null) + throw new ArgumentNullException(nameof(petId)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return (requiredFile, petId, additionalMetadata); + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void AfterUploadFileWithRequiredFile(ApiResponse apiResponse, System.IO.Stream requiredFile, long petId, string additionalMetadata) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + /// + /// + protected virtual void OnErrorUploadFileWithRequiredFile(Exception exception, string pathFormat, string path, System.IO.Stream requiredFile, long petId, string additionalMetadata) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// uploads an image (required) /// /// Thrown when fails to make API call - /// ID of pet to update /// file to upload + /// ID of pet to update /// Additional data to pass to server (optional) /// Cancellation Token to cancel the request. /// <> where T : - public async Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task> UploadFileWithRequiredFileWithHttpInfoAsync(System.IO.Stream requiredFile, long petId, string additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (requiredFile == null) - throw new ArgumentNullException(nameof(requiredFile)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + var validatedParameters = OnUploadFileWithRequiredFile(requiredFile, petId, additionalMetadata); + requiredFile = validatedParameters.Item1; + petId = validatedParameters.Item2; + additionalMetadata = validatedParameters.Item3; using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/fake/{petId}/uploadImageWithRequiredFile"; - uriBuilder.Path = uriBuilder.Path.Replace("%7BpetId%7D", Uri.EscapeDataString(petId.ToString())); - MultipartContent multipartContent = new MultipartContent(); + uriBuilder.Path = uriBuilder.Path.Replace("%7BpetId%7D", Uri.EscapeDataString(petId.ToString())); MultipartContent multipartContent = new MultipartContent(); request.Content = multipartContent; List> formParams = new List>(); - multipartContent.Add(new FormUrlEncodedContent(formParams)); - - multipartContent.Add(new StreamContent(requiredFile)); + multipartContent.Add(new FormUrlEncodedContent(formParams)); multipartContent.Add(new StreamContent(requiredFile)); if (additionalMetadata != null) formParams.Add(new KeyValuePair("additionalMetadata", ClientUtils.ParameterToString(additionalMetadata))); List tokens = new List(); + + request.RequestUri = uriBuilder.Uri; OAuthToken oauthToken = (OAuthToken) await OauthTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); @@ -1519,7 +1855,7 @@ namespace Org.OpenAPITools.Api string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); string[] accepts = new string[] { "application/json", @@ -1530,31 +1866,24 @@ namespace Org.OpenAPITools.Api if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - + request.Method = HttpMethod.Post; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/{petId}/uploadImageWithRequiredFile", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/{petId}/uploadImageWithRequiredFile")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterUploadFileWithRequiredFile(apiResponse, requiredFile, petId, additionalMetadata); + } else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -1565,8 +1894,9 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorUploadFileWithRequiredFile(e, "/fake/{petId}/uploadImageWithRequiredFile", uriBuilder.Path, requiredFile, petId, additionalMetadata); throw; } - } } + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/StoreApi.cs index e8a5a11078..168268cb80 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/StoreApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/StoreApi.cs @@ -19,10 +19,11 @@ using System.Text.Json; using Org.OpenAPITools.Client; using Org.OpenAPITools.Model; -namespace Org.OpenAPITools.Api +namespace Org.OpenAPITools.IApi { /// /// Represents a collection of functions to interact with the API endpoints + /// This class is registered as transient. /// public interface IStoreApi : IApi { @@ -49,6 +50,7 @@ namespace Org.OpenAPITools.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task DeleteOrderAsync(string orderId, System.Threading.CancellationToken? cancellationToken = null); + /// /// Returns pet inventories by status /// @@ -70,6 +72,7 @@ namespace Org.OpenAPITools.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse<Dictionary<string, int>> Task> GetInventoryAsync(System.Threading.CancellationToken? cancellationToken = null); + /// /// Find purchase order by ID /// @@ -93,6 +96,7 @@ namespace Org.OpenAPITools.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse<Order> Task GetOrderByIdAsync(long orderId, System.Threading.CancellationToken? cancellationToken = null); + /// /// Place an order for a pet /// @@ -115,21 +119,19 @@ namespace Org.OpenAPITools.Api /// order placed for purchasing the pet /// Cancellation Token to cancel the request. /// Task of ApiResponse<Order> - Task PlaceOrderAsync(Order order, System.Threading.CancellationToken? cancellationToken = null); } + Task PlaceOrderAsync(Order order, System.Threading.CancellationToken? cancellationToken = null); + } +} +namespace Org.OpenAPITools.Api +{ /// /// Represents a collection of functions to interact with the API endpoints /// - public partial class StoreApi : IStoreApi + public partial class StoreApi : IApi.IStoreApi { private JsonSerializerOptions _jsonSerializerOptions; - /// - /// An event to track the health of the server. - /// If you store these event args, be sure to purge old event args to prevent a memory leak. - /// - public event ClientUtils.EventHandler ApiResponded; - /// /// The logger /// @@ -186,6 +188,15 @@ namespace Org.OpenAPITools.Api OauthTokenProvider = oauthTokenProvider; } + /// + /// Logs the api response + /// + /// + protected virtual void OnApiResponded(ApiResponseEventArgs args) + { + Logger.LogInformation("{0,-9} | {1} | {3}", (args.ReceivedAt - args.RequestedAt).TotalSeconds, args.HttpStatus, args.Path); + } + /// /// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors /// @@ -226,6 +237,46 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual string OnDeleteOrder(string orderId) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (orderId == null) + throw new ArgumentNullException(nameof(orderId)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return orderId; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterDeleteOrder(ApiResponse apiResponse, string orderId) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorDeleteOrder(Exception exception, string pathFormat, string path, string orderId) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors /// @@ -235,50 +286,40 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> DeleteOrderWithHttpInfoAsync(string orderId, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (orderId == null) - throw new ArgumentNullException(nameof(orderId)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + orderId = OnDeleteOrder(orderId); using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/store/order/{order_id}"; + uriBuilder.Path = uriBuilder.Path.Replace("%7Border_id%7D", Uri.EscapeDataString(orderId.ToString())); request.RequestUri = uriBuilder.Uri; request.Method = HttpMethod.Delete; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/store/order/{order_id}", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/store/order/{order_id}")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterDeleteOrder(apiResponse, orderId); + } return apiResponse; } @@ -286,7 +327,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorDeleteOrder(e, "/store/order/{order_id}", uriBuilder.Path, orderId); throw; } } @@ -309,6 +350,34 @@ namespace Org.OpenAPITools.Api return result.Content; } + /// + /// Validates the request parameters + /// + /// + protected virtual void OnGetInventory() + { + return; + } + + /// + /// Processes the server response + /// + /// + protected virtual void AfterGetInventory(ApiResponse> apiResponse) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + protected virtual void OnErrorGetInventory(Exception exception, string pathFormat, string path) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Returns pet inventories by status Returns a map of status codes to quantities /// @@ -317,11 +386,14 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task>> GetInventoryWithHttpInfoAsync(System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { + OnGetInventory(); + using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -345,31 +417,24 @@ namespace Org.OpenAPITools.Api if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - + request.Method = HttpMethod.Get; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/store/inventory", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/store/inventory")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse> apiResponse = new ApiResponse>(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize>(apiResponse.RawContent, _jsonSerializerOptions); + AfterGetInventory(apiResponse); + } else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -380,7 +445,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorGetInventory(e, "/store/inventory", uriBuilder.Path); throw; } } @@ -425,6 +490,46 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual long OnGetOrderById(long orderId) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (orderId == null) + throw new ArgumentNullException(nameof(orderId)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return orderId; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterGetOrderById(ApiResponse apiResponse, long orderId) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorGetOrderById(Exception exception, string pathFormat, string path, long orderId) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// @@ -434,19 +539,19 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> GetOrderByIdWithHttpInfoAsync(long orderId, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + orderId = OnGetOrderById(orderId); using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/store/order/{order_id}"; + uriBuilder.Path = uriBuilder.Path.Replace("%7Border_id%7D", Uri.EscapeDataString(orderId.ToString())); request.RequestUri = uriBuilder.Uri; @@ -460,31 +565,24 @@ namespace Org.OpenAPITools.Api if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - + request.Method = HttpMethod.Get; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/store/order/{order_id}", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/store/order/{order_id}")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterGetOrderById(apiResponse, orderId); + } return apiResponse; } @@ -492,7 +590,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorGetOrderById(e, "/store/order/{order_id}", uriBuilder.Path, orderId); throw; } } @@ -537,6 +635,46 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual Order OnPlaceOrder(Order order) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (order == null) + throw new ArgumentNullException(nameof(order)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return order; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterPlaceOrder(ApiResponse apiResponse, Order order) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorPlaceOrder(Exception exception, string pathFormat, string path, Order order) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Place an order for a pet /// @@ -546,18 +684,14 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> PlaceOrderWithHttpInfoAsync(Order order, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (order == null) - throw new ArgumentNullException(nameof(order)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + order = OnPlaceOrder(order); using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -567,6 +701,8 @@ namespace Org.OpenAPITools.Api ? request.Content = new StreamContent(stream) : request.Content = new StringContent(JsonSerializer.Serialize(order, _jsonSerializerOptions)); + + request.RequestUri = uriBuilder.Uri; string[] contentTypes = new string[] { @@ -576,7 +712,7 @@ namespace Org.OpenAPITools.Api string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); string[] accepts = new string[] { "application/xml", @@ -587,31 +723,24 @@ namespace Org.OpenAPITools.Api if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - + request.Method = HttpMethod.Post; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/store/order", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/store/order")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterPlaceOrder(apiResponse, order); + } return apiResponse; } @@ -619,8 +748,9 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorPlaceOrder(e, "/store/order", uriBuilder.Path, order); throw; } - } } + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/UserApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/UserApi.cs index 4c1b0c6846..541b8c8315 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/UserApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/UserApi.cs @@ -19,10 +19,11 @@ using System.Text.Json; using Org.OpenAPITools.Client; using Org.OpenAPITools.Model; -namespace Org.OpenAPITools.Api +namespace Org.OpenAPITools.IApi { /// /// Represents a collection of functions to interact with the API endpoints + /// This class is registered as transient. /// public interface IUserApi : IApi { @@ -49,6 +50,7 @@ namespace Org.OpenAPITools.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task CreateUserAsync(User user, System.Threading.CancellationToken? cancellationToken = null); + /// /// Creates list of users with given input array /// @@ -72,6 +74,7 @@ namespace Org.OpenAPITools.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task CreateUsersWithArrayInputAsync(List user, System.Threading.CancellationToken? cancellationToken = null); + /// /// Creates list of users with given input array /// @@ -95,6 +98,7 @@ namespace Org.OpenAPITools.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task CreateUsersWithListInputAsync(List user, System.Threading.CancellationToken? cancellationToken = null); + /// /// Delete user /// @@ -118,6 +122,7 @@ namespace Org.OpenAPITools.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task DeleteUserAsync(string username, System.Threading.CancellationToken? cancellationToken = null); + /// /// Get user by user name /// @@ -141,6 +146,7 @@ namespace Org.OpenAPITools.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse<User> Task GetUserByNameAsync(string username, System.Threading.CancellationToken? cancellationToken = null); + /// /// Logs user into the system /// @@ -166,6 +172,7 @@ namespace Org.OpenAPITools.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse<string> Task LoginUserAsync(string username, string password, System.Threading.CancellationToken? cancellationToken = null); + /// /// Logs out current logged in user session /// @@ -187,6 +194,7 @@ namespace Org.OpenAPITools.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task LogoutUserAsync(System.Threading.CancellationToken? cancellationToken = null); + /// /// Updated user /// @@ -194,11 +202,11 @@ namespace Org.OpenAPITools.Api /// This can only be done by the logged in user. /// /// Thrown when fails to make API call - /// name that need to be deleted /// Updated user object + /// name that need to be deleted /// Cancellation Token to cancel the request. /// Task<ApiResponse<object>> - Task> UpdateUserWithHttpInfoAsync(string username, User user, System.Threading.CancellationToken? cancellationToken = null); + Task> UpdateUserWithHttpInfoAsync(User user, string username, System.Threading.CancellationToken? cancellationToken = null); /// /// Updated user @@ -207,25 +215,23 @@ namespace Org.OpenAPITools.Api /// This can only be done by the logged in user. /// /// Thrown when fails to make API call - /// name that need to be deleted /// Updated user object + /// name that need to be deleted /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> - Task UpdateUserAsync(string username, User user, System.Threading.CancellationToken? cancellationToken = null); } + Task UpdateUserAsync(User user, string username, System.Threading.CancellationToken? cancellationToken = null); + } +} +namespace Org.OpenAPITools.Api +{ /// /// Represents a collection of functions to interact with the API endpoints /// - public partial class UserApi : IUserApi + public partial class UserApi : IApi.IUserApi { private JsonSerializerOptions _jsonSerializerOptions; - /// - /// An event to track the health of the server. - /// If you store these event args, be sure to purge old event args to prevent a memory leak. - /// - public event ClientUtils.EventHandler ApiResponded; - /// /// The logger /// @@ -282,6 +288,15 @@ namespace Org.OpenAPITools.Api OauthTokenProvider = oauthTokenProvider; } + /// + /// Logs the api response + /// + /// + protected virtual void OnApiResponded(ApiResponseEventArgs args) + { + Logger.LogInformation("{0,-9} | {1} | {3}", (args.ReceivedAt - args.RequestedAt).TotalSeconds, args.HttpStatus, args.Path); + } + /// /// Create user This can only be done by the logged in user. /// @@ -322,6 +337,46 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual User OnCreateUser(User user) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (user == null) + throw new ArgumentNullException(nameof(user)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return user; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterCreateUser(ApiResponse apiResponse, User user) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorCreateUser(Exception exception, string pathFormat, string path, User user) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Create user This can only be done by the logged in user. /// @@ -331,18 +386,14 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> CreateUserWithHttpInfoAsync(User user, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (user == null) - throw new ArgumentNullException(nameof(user)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + user = OnCreateUser(user); using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -352,6 +403,8 @@ namespace Org.OpenAPITools.Api ? request.Content = new StreamContent(stream) : request.Content = new StringContent(JsonSerializer.Serialize(user, _jsonSerializerOptions)); + + request.RequestUri = uriBuilder.Uri; string[] contentTypes = new string[] { @@ -361,32 +414,25 @@ namespace Org.OpenAPITools.Api string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); request.Method = HttpMethod.Post; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/user", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/user")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterCreateUser(apiResponse, user); + } return apiResponse; } @@ -394,7 +440,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorCreateUser(e, "/user", uriBuilder.Path, user); throw; } } @@ -439,6 +485,46 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual List OnCreateUsersWithArrayInput(List user) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (user == null) + throw new ArgumentNullException(nameof(user)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return user; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterCreateUsersWithArrayInput(ApiResponse apiResponse, List user) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorCreateUsersWithArrayInput(Exception exception, string pathFormat, string path, List user) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Creates list of users with given input array /// @@ -448,18 +534,14 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> CreateUsersWithArrayInputWithHttpInfoAsync(List user, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (user == null) - throw new ArgumentNullException(nameof(user)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + user = OnCreateUsersWithArrayInput(user); using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -469,6 +551,8 @@ namespace Org.OpenAPITools.Api ? request.Content = new StreamContent(stream) : request.Content = new StringContent(JsonSerializer.Serialize(user, _jsonSerializerOptions)); + + request.RequestUri = uriBuilder.Uri; string[] contentTypes = new string[] { @@ -478,32 +562,25 @@ namespace Org.OpenAPITools.Api string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); request.Method = HttpMethod.Post; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/user/createWithArray", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/user/createWithArray")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterCreateUsersWithArrayInput(apiResponse, user); + } return apiResponse; } @@ -511,7 +588,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorCreateUsersWithArrayInput(e, "/user/createWithArray", uriBuilder.Path, user); throw; } } @@ -556,6 +633,46 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual List OnCreateUsersWithListInput(List user) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (user == null) + throw new ArgumentNullException(nameof(user)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return user; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterCreateUsersWithListInput(ApiResponse apiResponse, List user) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorCreateUsersWithListInput(Exception exception, string pathFormat, string path, List user) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Creates list of users with given input array /// @@ -565,18 +682,14 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> CreateUsersWithListInputWithHttpInfoAsync(List user, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (user == null) - throw new ArgumentNullException(nameof(user)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + user = OnCreateUsersWithListInput(user); using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -586,6 +699,8 @@ namespace Org.OpenAPITools.Api ? request.Content = new StreamContent(stream) : request.Content = new StringContent(JsonSerializer.Serialize(user, _jsonSerializerOptions)); + + request.RequestUri = uriBuilder.Uri; string[] contentTypes = new string[] { @@ -595,32 +710,25 @@ namespace Org.OpenAPITools.Api string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); request.Method = HttpMethod.Post; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/user/createWithList", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/user/createWithList")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterCreateUsersWithListInput(apiResponse, user); + } return apiResponse; } @@ -628,7 +736,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorCreateUsersWithListInput(e, "/user/createWithList", uriBuilder.Path, user); throw; } } @@ -673,6 +781,46 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual string OnDeleteUser(string username) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (username == null) + throw new ArgumentNullException(nameof(username)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return username; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterDeleteUser(ApiResponse apiResponse, string username) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorDeleteUser(Exception exception, string pathFormat, string path, string username) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Delete user This can only be done by the logged in user. /// @@ -682,50 +830,40 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> DeleteUserWithHttpInfoAsync(string username, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (username == null) - throw new ArgumentNullException(nameof(username)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + username = OnDeleteUser(username); using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/user/{username}"; + uriBuilder.Path = uriBuilder.Path.Replace("%7Busername%7D", Uri.EscapeDataString(username.ToString())); request.RequestUri = uriBuilder.Uri; request.Method = HttpMethod.Delete; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/user/{username}", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/user/{username}")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterDeleteUser(apiResponse, username); + } return apiResponse; } @@ -733,7 +871,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorDeleteUser(e, "/user/{username}", uriBuilder.Path, username); throw; } } @@ -778,6 +916,46 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual string OnGetUserByName(string username) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (username == null) + throw new ArgumentNullException(nameof(username)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return username; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterGetUserByName(ApiResponse apiResponse, string username) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorGetUserByName(Exception exception, string pathFormat, string path, string username) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Get user by user name /// @@ -787,22 +965,19 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> GetUserByNameWithHttpInfoAsync(string username, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (username == null) - throw new ArgumentNullException(nameof(username)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + username = OnGetUserByName(username); using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/user/{username}"; + uriBuilder.Path = uriBuilder.Path.Replace("%7Busername%7D", Uri.EscapeDataString(username.ToString())); request.RequestUri = uriBuilder.Uri; @@ -816,31 +991,24 @@ namespace Org.OpenAPITools.Api if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - + request.Method = HttpMethod.Get; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/user/{username}", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/user/{username}")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterGetUserByName(apiResponse, username); + } return apiResponse; } @@ -848,7 +1016,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorGetUserByName(e, "/user/{username}", uriBuilder.Path, username); throw; } } @@ -873,6 +1041,52 @@ namespace Org.OpenAPITools.Api return result.Content; } + /// + /// Validates the request parameters + /// + /// + /// + /// + protected virtual (string, string) OnLoginUser(string username, string password) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (username == null) + throw new ArgumentNullException(nameof(username)); + + if (password == null) + throw new ArgumentNullException(nameof(password)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return (username, password); + } + + /// + /// Processes the server response + /// + /// + /// + /// + protected virtual void AfterLoginUser(ApiResponse apiResponse, string username, string password) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + /// + protected virtual void OnErrorLoginUser(Exception exception, string pathFormat, string path, string username, string password) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Logs user into the system /// @@ -883,21 +1097,16 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> LoginUserWithHttpInfoAsync(string username, string password, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (username == null) - throw new ArgumentNullException(nameof(username)); - - if (password == null) - throw new ArgumentNullException(nameof(password)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + var validatedParameters = OnLoginUser(username, password); + username = validatedParameters.Item1; + password = validatedParameters.Item2; using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -910,6 +1119,8 @@ namespace Org.OpenAPITools.Api uriBuilder.Query = parseQueryString.ToString(); + + request.RequestUri = uriBuilder.Uri; string[] accepts = new string[] { @@ -921,31 +1132,24 @@ namespace Org.OpenAPITools.Api if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - + request.Method = HttpMethod.Get; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/user/login", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/user/login")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterLoginUser(apiResponse, username, password); + } return apiResponse; } @@ -953,7 +1157,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorLoginUser(e, "/user/login", uriBuilder.Path, username, password); throw; } } @@ -996,6 +1200,34 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + protected virtual void OnLogoutUser() + { + return; + } + + /// + /// Processes the server response + /// + /// + protected virtual void AfterLogoutUser(ApiResponse apiResponse) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + protected virtual void OnErrorLogoutUser(Exception exception, string pathFormat, string path) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Logs out current logged in user session /// @@ -1004,42 +1236,40 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> LogoutUserWithHttpInfoAsync(System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { + OnLogoutUser(); + using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/user/logout"; + + request.RequestUri = uriBuilder.Uri; request.Method = HttpMethod.Get; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/user/logout", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/user/logout")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterLogoutUser(apiResponse); + } return apiResponse; } @@ -1047,7 +1277,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorLogoutUser(e, "/user/logout", uriBuilder.Path); throw; } } @@ -1056,13 +1286,13 @@ namespace Org.OpenAPITools.Api /// Updated user This can only be done by the logged in user. /// /// Thrown when fails to make API call - /// name that need to be deleted /// Updated user object + /// name that need to be deleted /// Cancellation Token to cancel the request. /// <> - public async Task UpdateUserAsync(string username, User user, System.Threading.CancellationToken? cancellationToken = null) + public async Task UpdateUserAsync(User user, string username, System.Threading.CancellationToken? cancellationToken = null) { - ApiResponse result = await UpdateUserWithHttpInfoAsync(username, user, cancellationToken).ConfigureAwait(false); + ApiResponse result = await UpdateUserWithHttpInfoAsync(user, username, cancellationToken).ConfigureAwait(false); if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); @@ -1074,16 +1304,16 @@ namespace Org.OpenAPITools.Api /// Updated user This can only be done by the logged in user. /// /// Thrown when fails to make API call - /// name that need to be deleted /// Updated user object + /// name that need to be deleted /// Cancellation Token to cancel the request. /// <> - public async Task UpdateUserOrDefaultAsync(string username, User user, System.Threading.CancellationToken? cancellationToken = null) + public async Task UpdateUserOrDefaultAsync(User user, string username, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = null; try { - result = await UpdateUserWithHttpInfoAsync(username, user, cancellationToken).ConfigureAwait(false); + result = await UpdateUserWithHttpInfoAsync(user, username, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -1094,41 +1324,83 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + /// + protected virtual (User, string) OnUpdateUser(User user, string username) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (user == null) + throw new ArgumentNullException(nameof(user)); + + if (username == null) + throw new ArgumentNullException(nameof(username)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return (user, username); + } + + /// + /// Processes the server response + /// + /// + /// + /// + protected virtual void AfterUpdateUser(ApiResponse apiResponse, User user, string username) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + /// + protected virtual void OnErrorUpdateUser(Exception exception, string pathFormat, string path, User user, string username) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Updated user This can only be done by the logged in user. /// /// Thrown when fails to make API call - /// name that need to be deleted /// Updated user object + /// name that need to be deleted /// Cancellation Token to cancel the request. /// <> where T : - public async Task> UpdateUserWithHttpInfoAsync(string username, User user, System.Threading.CancellationToken? cancellationToken = null) + public async Task> UpdateUserWithHttpInfoAsync(User user, string username, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (username == null) - throw new ArgumentNullException(nameof(username)); - - if (user == null) - throw new ArgumentNullException(nameof(user)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + var validatedParameters = OnUpdateUser(user, username); + user = validatedParameters.Item1; + username = validatedParameters.Item2; using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/user/{username}"; - uriBuilder.Path = uriBuilder.Path.Replace("%7Busername%7D", Uri.EscapeDataString(username.ToString())); - request.Content = (user as object) is System.IO.Stream stream + uriBuilder.Path = uriBuilder.Path.Replace("%7Busername%7D", Uri.EscapeDataString(username.ToString())); request.Content = (user as object) is System.IO.Stream stream ? request.Content = new StreamContent(stream) : request.Content = new StringContent(JsonSerializer.Serialize(user, _jsonSerializerOptions)); + + request.RequestUri = uriBuilder.Uri; string[] contentTypes = new string[] { @@ -1138,32 +1410,25 @@ namespace Org.OpenAPITools.Api string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); request.Method = HttpMethod.Put; + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/user/{username}", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/user/{username}")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterUpdateUser(apiResponse, user, username); + } return apiResponse; } @@ -1171,8 +1436,9 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorUpdateUser(e, "/user/{username}", uriBuilder.Path, user, username); throw; } - } } + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/ApiFactory.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/ApiFactory.cs new file mode 100644 index 0000000000..7757b89c19 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/ApiFactory.cs @@ -0,0 +1,49 @@ +using System; +using Microsoft.Extensions.DependencyInjection; + + +namespace Org.OpenAPITools.Client +{ + /// + /// An IApiFactory interface + /// + public interface IApiFactory + { + /// + /// A method to create an IApi of type IResult + /// + /// + /// + IResult Create() where IResult : IApi.IApi; + } + + /// + /// An ApiFactory + /// + public class ApiFactory : IApiFactory + { + /// + /// The service provider + /// + public IServiceProvider Services { get; } + + /// + /// Initializes a new instance of the class. + /// + /// + public ApiFactory(IServiceProvider services) + { + Services = services; + } + + /// + /// A method to create an IApi of type IResult + /// + /// + /// + public IResult Create() where IResult : IApi.IApi + { + return Services.GetRequiredService(); + } + } +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/ApiKeyToken.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/ApiKeyToken.cs index f63fd59332..5cc9c25492 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/ApiKeyToken.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/ApiKeyToken.cs @@ -16,22 +16,12 @@ namespace Org.OpenAPITools.Client /// /// /// - /// + /// public ApiKeyToken(string value, string prefix = "Bearer ", TimeSpan? timeout = null) : base(timeout) { _raw = $"{ prefix }{ value }"; } - /// - /// Places the token in the cookie. - /// - /// - /// - public virtual void UseInCookie(System.Net.Http.HttpRequestMessage request, string cookieName) - { - request.Headers.Add("Cookie", $"{ cookieName }=_raw"); - } - /// /// Places the token in the header. /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/ApiResponseEventArgs.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/ApiResponseEventArgs.cs index e5da600032..f87e53e8b0 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/ApiResponseEventArgs.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/ApiResponseEventArgs.cs @@ -12,35 +12,46 @@ namespace Org.OpenAPITools.Client /// The time the request was sent. /// public DateTime RequestedAt { get; } + /// /// The time the response was received. /// public DateTime ReceivedAt { get; } + /// /// The HttpStatusCode received. /// public HttpStatusCode HttpStatus { get; } + /// /// The path requested. /// - public string Path { get; } + public string PathFormat { get; } + /// /// The elapsed time from request to response. /// public TimeSpan ToTimeSpan => this.ReceivedAt - this.RequestedAt; + /// + /// The path + /// + public string Path { get; } + /// /// The event args used to track server health. /// /// /// /// + /// /// - public ApiResponseEventArgs(DateTime requestedAt, DateTime receivedAt, HttpStatusCode httpStatus, string path) + public ApiResponseEventArgs(DateTime requestedAt, DateTime receivedAt, HttpStatusCode httpStatus, string pathFormat, string path) { RequestedAt = requestedAt; ReceivedAt = receivedAt; HttpStatus = httpStatus; + PathFormat = pathFormat; Path = path; } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/ApiResponse`1.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/ApiResponse`1.cs index 3bae0aaa6a..0a8a0769c1 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/ApiResponse`1.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/ApiResponse`1.cs @@ -34,6 +34,11 @@ namespace Org.OpenAPITools.Client /// The raw content of this response /// string RawContent { get; } + + /// + /// The DateTime when the request was retrieved. + /// + DateTime DownloadedAt { get; } } /// @@ -41,12 +46,10 @@ namespace Org.OpenAPITools.Client /// public partial class ApiResponse : IApiResponse { - #region Properties - /// /// The deserialized content /// - public T Content { get; set; } + public T Content { get; internal set; } /// /// Gets or sets the status code (HTTP status code) @@ -82,7 +85,10 @@ namespace Org.OpenAPITools.Client /// public System.Net.Http.Headers.HttpResponseHeaders Headers { get; } - #endregion Properties + /// + /// The DateTime when the request was retrieved. + /// + public DateTime DownloadedAt { get; } = DateTime.UtcNow; /// /// Construct the response using an HttpResponseMessage diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/ClientUtils.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/ClientUtils.cs index 4ac8055d7d..2d16402e3e 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/ClientUtils.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/ClientUtils.cs @@ -10,16 +10,9 @@ using System; using System.IO; using System.Linq; -using System.Net.Http; using System.Text; using System.Text.Json; using System.Text.RegularExpressions; -using Microsoft.Extensions.Hosting; -using Microsoft.Extensions.DependencyInjection; -using Polly.Timeout; -using Polly.Extensions.Http; -using Polly; -using Org.OpenAPITools.Api; using KellermanSoftware.CompareNetObjects; namespace Org.OpenAPITools.Client @@ -280,114 +273,5 @@ namespace Org.OpenAPITools.Client /// The format to use for DateTime serialization /// public const string ISO8601_DATETIME_FORMAT = "o"; - - /// - /// Add the api to your host builder. - /// - /// - /// - public static IHostBuilder ConfigureApi(this IHostBuilder builder, Action options) - { - builder.ConfigureServices((context, services) => - { - HostConfiguration config = new HostConfiguration(services); - - options(context, config); - - AddApi(services, config); - }); - - return builder; - } - - /// - /// Add the api to your host builder. - /// - /// - /// - public static void AddApi(this IServiceCollection services, Action options) - { - HostConfiguration config = new HostConfiguration(services); - options(config); - AddApi(services, config); - } - - private static void AddApi(IServiceCollection services, HostConfiguration host) - { - if (!host.HttpClientsAdded) - host.AddApiHttpClients(); - - // ensure that a token provider was provided for this token type - // if not, default to RateLimitProvider - var containerServices = services.Where(s => s.ServiceType.IsGenericType && - s.ServiceType.GetGenericTypeDefinition().IsAssignableFrom(typeof(TokenContainer<>))).ToArray(); - - foreach(var containerService in containerServices) - { - var tokenType = containerService.ServiceType.GenericTypeArguments[0]; - - var provider = services.FirstOrDefault(s => s.ServiceType.IsAssignableFrom(typeof(TokenProvider<>).MakeGenericType(tokenType))); - - if (provider == null) - { - services.AddSingleton(typeof(RateLimitProvider<>).MakeGenericType(tokenType)); - services.AddSingleton(typeof(TokenProvider<>).MakeGenericType(tokenType), - s => s.GetRequiredService(typeof(RateLimitProvider<>).MakeGenericType(tokenType))); - } - } - } - - /// - /// Adds a Polly retry policy to your clients. - /// - /// - /// - /// - public static IHttpClientBuilder AddRetryPolicy(this IHttpClientBuilder client, int retries) - { - client.AddPolicyHandler(RetryPolicy(retries)); - - return client; - } - - /// - /// Adds a Polly timeout policy to your clients. - /// - /// - /// - /// - public static IHttpClientBuilder AddTimeoutPolicy(this IHttpClientBuilder client, TimeSpan timeout) - { - client.AddPolicyHandler(TimeoutPolicy(timeout)); - - return client; - } - - /// - /// Adds a Polly circiut breaker to your clients. - /// - /// - /// - /// - /// - public static IHttpClientBuilder AddCircuitBreakerPolicy(this IHttpClientBuilder client, int handledEventsAllowedBeforeBreaking, TimeSpan durationOfBreak) - { - client.AddTransientHttpErrorPolicy(builder => CircuitBreakerPolicy(builder, handledEventsAllowedBeforeBreaking, durationOfBreak)); - - return client; - } - - private static Polly.Retry.AsyncRetryPolicy RetryPolicy(int retries) - => HttpPolicyExtensions - .HandleTransientHttpError() - .Or() - .RetryAsync(retries); - - private static AsyncTimeoutPolicy TimeoutPolicy(TimeSpan timeout) - => Policy.TimeoutAsync(timeout); - - private static Polly.CircuitBreaker.AsyncCircuitBreakerPolicy CircuitBreakerPolicy( - PolicyBuilder builder, int handledEventsAllowedBeforeBreaking, TimeSpan durationOfBreak) - => builder.CircuitBreakerAsync(handledEventsAllowedBeforeBreaking, durationOfBreak); } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/CookieContainer.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/CookieContainer.cs new file mode 100644 index 0000000000..da94287dab --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/CookieContainer.cs @@ -0,0 +1,18 @@ +// + +using System.Linq; +using System.Collections.Generic; + +namespace Org.OpenAPITools.Client +{ + /// + /// A class containing a CookieContainer + /// + public sealed class CookieContainer + { + /// + /// The collection of tokens + /// + public System.Net.CookieContainer Value { get; } = new System.Net.CookieContainer(); + } +} \ No newline at end of file diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/DateTimeJsonConverter.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/DateTimeJsonConverter.cs new file mode 100644 index 0000000000..47daa5b77e --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/DateTimeJsonConverter.cs @@ -0,0 +1,71 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Globalization; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Org.OpenAPITools.Client +{ + /// + /// Formatter for 'date' openapi formats ss defined by full-date - RFC3339 + /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types + /// + public class DateTimeJsonConverter : JsonConverter + { + public static readonly string[] FORMATS = { + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'ffffffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'ffffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'ffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ssK", + "yyyyMMddTHHmmss.fffffffK", + "yyyyMMddTHHmmss.ffffffK", + "yyyyMMddTHHmmss.fffffK", + "yyyyMMddTHHmmss.ffffK", + "yyyyMMddTHHmmss.fffK", + "yyyyMMddTHHmmss.ffK", + "yyyyMMddTHHmmss.fK", + "yyyyMMddTHHmmssK", + }; + + /// + /// Returns a DateTime from the Json object + /// + /// + /// + /// + /// + public override DateTime Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { + if (reader.TokenType == JsonTokenType.Null) + throw new NotSupportedException(); + + string value = reader.GetString(); + + foreach(string format in FORMATS) + if (DateTime.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateTime result)) + return result; + + throw new NotSupportedException(); + } + + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, DateTime dateTimeValue, JsonSerializerOptions options) => + writer.WriteStringValue(dateTimeValue.ToString(FORMATS[0], CultureInfo.InvariantCulture)); + } +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/DateTimeNullableJsonConverter.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/DateTimeNullableJsonConverter.cs new file mode 100644 index 0000000000..02d9e10ba7 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/DateTimeNullableJsonConverter.cs @@ -0,0 +1,76 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Globalization; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Org.OpenAPITools.Client +{ + /// + /// Formatter for 'date' openapi formats ss defined by full-date - RFC3339 + /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types + /// + public class DateTimeNullableJsonConverter : JsonConverter + { + public static readonly string[] FORMATS = { + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'ffffffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'ffffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'ffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ssK", + "yyyyMMddTHHmmss.fffffffK", + "yyyyMMddTHHmmss.ffffffK", + "yyyyMMddTHHmmss.fffffK", + "yyyyMMddTHHmmss.ffffK", + "yyyyMMddTHHmmss.fffK", + "yyyyMMddTHHmmss.ffK", + "yyyyMMddTHHmmss.fK", + "yyyyMMddTHHmmssK", + }; + + /// + /// Returns a DateTime from the Json object + /// + /// + /// + /// + /// + public override DateTime? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { + if (reader.TokenType == JsonTokenType.Null) + return null; + + string value = reader.GetString(); + + foreach(string format in FORMATS) + if (DateTime.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateTime result)) + return result; + + return null; + } + + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, DateTime? dateTimeValue, JsonSerializerOptions options) + { + if (dateTimeValue == null) + writer.WriteNullValue(); + else + writer.WriteStringValue(dateTimeValue.Value.ToString(FORMATS[0], CultureInfo.InvariantCulture)); + } + } +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/HostConfiguration.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/HostConfiguration.cs index e3200ba239..49dd0278de 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/HostConfiguration.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/HostConfiguration.cs @@ -14,7 +14,6 @@ using System.Text.Json; using System.Text.Json.Serialization; using System.Net.Http; using Microsoft.Extensions.DependencyInjection; -using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; namespace Org.OpenAPITools.Client @@ -22,10 +21,17 @@ namespace Org.OpenAPITools.Client /// /// Provides hosting configuration for Org.OpenAPITools /// - public class HostConfiguration + public class HostConfiguration + where TAnotherFakeApi : class, IApi.IAnotherFakeApi + where TDefaultApi : class, IApi.IDefaultApi + where TFakeApi : class, IApi.IFakeApi + where TFakeClassnameTags123Api : class, IApi.IFakeClassnameTags123Api + where TPetApi : class, IApi.IPetApi + where TStoreApi : class, IApi.IStoreApi + where TUserApi : class, IApi.IUserApi { private readonly IServiceCollection _services; - private JsonSerializerOptions _jsonOptions = new JsonSerializerOptions(); + private readonly JsonSerializerOptions _jsonOptions = new JsonSerializerOptions(); internal bool HttpClientsAdded { get; private set; } @@ -37,35 +43,101 @@ namespace Org.OpenAPITools.Client { _services = services; _jsonOptions.Converters.Add(new JsonStringEnumConverter()); - _jsonOptions.Converters.Add(new OpenAPIDateJsonConverter()); + _jsonOptions.Converters.Add(new DateTimeJsonConverter()); + _jsonOptions.Converters.Add(new DateTimeNullableJsonConverter()); + _jsonOptions.Converters.Add(new ActivityJsonConverter()); + _jsonOptions.Converters.Add(new ActivityOutputElementRepresentationJsonConverter()); + _jsonOptions.Converters.Add(new AdditionalPropertiesClassJsonConverter()); + _jsonOptions.Converters.Add(new AnimalJsonConverter()); + _jsonOptions.Converters.Add(new ApiResponseJsonConverter()); + _jsonOptions.Converters.Add(new AppleJsonConverter()); + _jsonOptions.Converters.Add(new AppleReqJsonConverter()); + _jsonOptions.Converters.Add(new ArrayOfArrayOfNumberOnlyJsonConverter()); + _jsonOptions.Converters.Add(new ArrayOfNumberOnlyJsonConverter()); + _jsonOptions.Converters.Add(new ArrayTestJsonConverter()); + _jsonOptions.Converters.Add(new BananaJsonConverter()); + _jsonOptions.Converters.Add(new BananaReqJsonConverter()); + _jsonOptions.Converters.Add(new BasquePigJsonConverter()); + _jsonOptions.Converters.Add(new CapitalizationJsonConverter()); _jsonOptions.Converters.Add(new CatJsonConverter()); + _jsonOptions.Converters.Add(new CatAllOfJsonConverter()); + _jsonOptions.Converters.Add(new CategoryJsonConverter()); _jsonOptions.Converters.Add(new ChildCatJsonConverter()); + _jsonOptions.Converters.Add(new ChildCatAllOfJsonConverter()); + _jsonOptions.Converters.Add(new ClassModelJsonConverter()); _jsonOptions.Converters.Add(new ComplexQuadrilateralJsonConverter()); + _jsonOptions.Converters.Add(new DanishPigJsonConverter()); + _jsonOptions.Converters.Add(new DeprecatedObjectJsonConverter()); _jsonOptions.Converters.Add(new DogJsonConverter()); + _jsonOptions.Converters.Add(new DogAllOfJsonConverter()); + _jsonOptions.Converters.Add(new DrawingJsonConverter()); + _jsonOptions.Converters.Add(new EnumArraysJsonConverter()); + _jsonOptions.Converters.Add(new EnumClassConverter()); + _jsonOptions.Converters.Add(new EnumClassNullableConverter()); + _jsonOptions.Converters.Add(new EnumTestJsonConverter()); _jsonOptions.Converters.Add(new EquilateralTriangleJsonConverter()); + _jsonOptions.Converters.Add(new FileJsonConverter()); + _jsonOptions.Converters.Add(new FileSchemaTestClassJsonConverter()); + _jsonOptions.Converters.Add(new FooJsonConverter()); + _jsonOptions.Converters.Add(new FooGetDefaultResponseJsonConverter()); + _jsonOptions.Converters.Add(new FormatTestJsonConverter()); _jsonOptions.Converters.Add(new FruitJsonConverter()); _jsonOptions.Converters.Add(new FruitReqJsonConverter()); _jsonOptions.Converters.Add(new GmFruitJsonConverter()); + _jsonOptions.Converters.Add(new GrandparentAnimalJsonConverter()); + _jsonOptions.Converters.Add(new HasOnlyReadOnlyJsonConverter()); + _jsonOptions.Converters.Add(new HealthCheckResultJsonConverter()); _jsonOptions.Converters.Add(new IsoscelesTriangleJsonConverter()); + _jsonOptions.Converters.Add(new ListJsonConverter()); _jsonOptions.Converters.Add(new MammalJsonConverter()); + _jsonOptions.Converters.Add(new MapTestJsonConverter()); + _jsonOptions.Converters.Add(new MixedPropertiesAndAdditionalPropertiesClassJsonConverter()); + _jsonOptions.Converters.Add(new Model200ResponseJsonConverter()); + _jsonOptions.Converters.Add(new ModelClientJsonConverter()); + _jsonOptions.Converters.Add(new NameJsonConverter()); + _jsonOptions.Converters.Add(new NullableClassJsonConverter()); _jsonOptions.Converters.Add(new NullableShapeJsonConverter()); + _jsonOptions.Converters.Add(new NumberOnlyJsonConverter()); + _jsonOptions.Converters.Add(new ObjectWithDeprecatedFieldsJsonConverter()); + _jsonOptions.Converters.Add(new OrderJsonConverter()); + _jsonOptions.Converters.Add(new OuterCompositeJsonConverter()); + _jsonOptions.Converters.Add(new OuterEnumConverter()); + _jsonOptions.Converters.Add(new OuterEnumNullableConverter()); + _jsonOptions.Converters.Add(new OuterEnumDefaultValueConverter()); + _jsonOptions.Converters.Add(new OuterEnumDefaultValueNullableConverter()); + _jsonOptions.Converters.Add(new OuterEnumIntegerConverter()); + _jsonOptions.Converters.Add(new OuterEnumIntegerNullableConverter()); + _jsonOptions.Converters.Add(new OuterEnumIntegerDefaultValueConverter()); + _jsonOptions.Converters.Add(new OuterEnumIntegerDefaultValueNullableConverter()); _jsonOptions.Converters.Add(new ParentPetJsonConverter()); + _jsonOptions.Converters.Add(new PetJsonConverter()); _jsonOptions.Converters.Add(new PigJsonConverter()); _jsonOptions.Converters.Add(new PolymorphicPropertyJsonConverter()); _jsonOptions.Converters.Add(new QuadrilateralJsonConverter()); + _jsonOptions.Converters.Add(new QuadrilateralInterfaceJsonConverter()); + _jsonOptions.Converters.Add(new ReadOnlyFirstJsonConverter()); + _jsonOptions.Converters.Add(new ReturnJsonConverter()); _jsonOptions.Converters.Add(new ScaleneTriangleJsonConverter()); _jsonOptions.Converters.Add(new ShapeJsonConverter()); + _jsonOptions.Converters.Add(new ShapeInterfaceJsonConverter()); _jsonOptions.Converters.Add(new ShapeOrNullJsonConverter()); _jsonOptions.Converters.Add(new SimpleQuadrilateralJsonConverter()); + _jsonOptions.Converters.Add(new SpecialModelNameJsonConverter()); + _jsonOptions.Converters.Add(new TagJsonConverter()); _jsonOptions.Converters.Add(new TriangleJsonConverter()); + _jsonOptions.Converters.Add(new TriangleInterfaceJsonConverter()); + _jsonOptions.Converters.Add(new UserJsonConverter()); + _jsonOptions.Converters.Add(new WhaleJsonConverter()); + _jsonOptions.Converters.Add(new ZebraJsonConverter()); _services.AddSingleton(new JsonSerializerOptionsProvider(_jsonOptions)); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); + _services.AddSingleton(); + _services.AddTransient(); + _services.AddTransient(); + _services.AddTransient(); + _services.AddTransient(); + _services.AddTransient(); + _services.AddTransient(); + _services.AddTransient(); } /// @@ -74,29 +146,22 @@ namespace Org.OpenAPITools.Client /// /// /// - public HostConfiguration AddApiHttpClients + public HostConfiguration AddApiHttpClients ( Action client = null, Action builder = null) - where TAnotherFakeApi : class, IAnotherFakeApi - where TDefaultApi : class, IDefaultApi - where TFakeApi : class, IFakeApi - where TFakeClassnameTags123Api : class, IFakeClassnameTags123Api - where TPetApi : class, IPetApi - where TStoreApi : class, IStoreApi - where TUserApi : class, IUserApi { if (client == null) client = c => c.BaseAddress = new Uri(ClientUtils.BASE_ADDRESS); List builders = new List(); - - builders.Add(_services.AddHttpClient(client)); - builders.Add(_services.AddHttpClient(client)); - builders.Add(_services.AddHttpClient(client)); - builders.Add(_services.AddHttpClient(client)); - builders.Add(_services.AddHttpClient(client)); - builders.Add(_services.AddHttpClient(client)); - builders.Add(_services.AddHttpClient(client)); + + builders.Add(_services.AddHttpClient(client)); + builders.Add(_services.AddHttpClient(client)); + builders.Add(_services.AddHttpClient(client)); + builders.Add(_services.AddHttpClient(client)); + builders.Add(_services.AddHttpClient(client)); + builders.Add(_services.AddHttpClient(client)); + builders.Add(_services.AddHttpClient(client)); if (builder != null) foreach (IHttpClientBuilder instance in builders) @@ -107,25 +172,12 @@ namespace Org.OpenAPITools.Client return this; } - /// - /// Configures the HttpClients. - /// - /// - /// - /// - public HostConfiguration AddApiHttpClients(Action client = null, Action builder = null) - { - AddApiHttpClients(client, builder); - - return this; - } - /// /// Configures the JsonSerializerSettings /// /// /// - public HostConfiguration ConfigureJsonOptions(Action options) + public HostConfiguration ConfigureJsonOptions(Action options) { options(_jsonOptions); @@ -138,7 +190,7 @@ namespace Org.OpenAPITools.Client /// /// /// - public HostConfiguration AddTokens(TTokenBase token) where TTokenBase : TokenBase + public HostConfiguration AddTokens(TTokenBase token) where TTokenBase : TokenBase { return AddTokens(new TTokenBase[]{ token }); } @@ -149,7 +201,7 @@ namespace Org.OpenAPITools.Client /// /// /// - public HostConfiguration AddTokens(IEnumerable tokens) where TTokenBase : TokenBase + public HostConfiguration AddTokens(IEnumerable tokens) where TTokenBase : TokenBase { TokenContainer container = new TokenContainer(tokens); _services.AddSingleton(services => container); @@ -163,7 +215,7 @@ namespace Org.OpenAPITools.Client /// /// /// - public HostConfiguration UseProvider() + public HostConfiguration UseProvider() where TTokenProvider : TokenProvider where TTokenBase : TokenBase { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/IApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/IApi.cs deleted file mode 100644 index bd74ad34fd..0000000000 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/IApi.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System.Net.Http; - -namespace Org.OpenAPITools.Client -{ - /// - /// Any Api client - /// - public interface IApi - { - /// - /// The HttpClient - /// - HttpClient HttpClient { get; } - - /// - /// An event to track the health of the server. - /// If you store these event args, be sure to purge old event args to prevent a memory leak. - /// - event ClientUtils.EventHandler ApiResponded; - } -} \ No newline at end of file diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/OpenAPIDateJsonConverter.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/OpenAPIDateJsonConverter.cs deleted file mode 100644 index a280076c5a..0000000000 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Client/OpenAPIDateJsonConverter.cs +++ /dev/null @@ -1,42 +0,0 @@ -/* - * OpenAPI Petstore - * - * 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://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Globalization; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Org.OpenAPITools.Client -{ - /// - /// Formatter for 'date' openapi formats ss defined by full-date - RFC3339 - /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types - /// - public class OpenAPIDateJsonConverter : JsonConverter - { - /// - /// Returns a DateTime from the Json object - /// - /// - /// - /// - /// - public override DateTime Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => - DateTime.ParseExact(reader.GetString(), "yyyy-MM-dd", CultureInfo.InvariantCulture); - - /// - /// Writes the DateTime to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, DateTime dateTimeValue, JsonSerializerOptions options) => - writer.WriteStringValue(dateTimeValue.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture)); - } -} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Extensions/IHostBuilderExtensions.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Extensions/IHostBuilderExtensions.cs new file mode 100644 index 0000000000..deefb4ab70 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Extensions/IHostBuilderExtensions.cs @@ -0,0 +1,57 @@ +/* + * OpenAPI Petstore + * + * 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://github.com/openapitools/openapi-generator.git + */ + +using System; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Org.OpenAPITools.Client; +using Org.OpenAPITools.Api; + +namespace Org.OpenAPITools.Extensions +{ + /// + /// Extension methods for IHostBuilder + /// + public static class IHostBuilderExtensions + { + /// + /// Add the api to your host builder. + /// + /// + /// + public static IHostBuilder ConfigureApi(this IHostBuilder builder, Action> options) + where TAnotherFakeApi : class, IApi.IAnotherFakeApi + where TDefaultApi : class, IApi.IDefaultApi + where TFakeApi : class, IApi.IFakeApi + where TFakeClassnameTags123Api : class, IApi.IFakeClassnameTags123Api + where TPetApi : class, IApi.IPetApi + where TStoreApi : class, IApi.IStoreApi + where TUserApi : class, IApi.IUserApi + { + builder.ConfigureServices((context, services) => + { + HostConfiguration config = new HostConfiguration(services); + + options(context, services, config); + + IServiceCollectionExtensions.AddApi(services, config); + }); + + return builder; + } + + /// + /// Add the api to your host builder. + /// + /// + /// + public static IHostBuilder ConfigureApi(this IHostBuilder builder, Action> options) + => ConfigureApi(builder, options); + } +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Extensions/IHttpClientBuilderExtensions.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Extensions/IHttpClientBuilderExtensions.cs new file mode 100644 index 0000000000..a204267fa6 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Extensions/IHttpClientBuilderExtensions.cs @@ -0,0 +1,77 @@ +/* + * OpenAPI Petstore + * + * 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://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Net.Http; +using Microsoft.Extensions.DependencyInjection; +using Polly.Timeout; +using Polly.Extensions.Http; +using Polly; + +namespace Org.OpenAPITools.Extensions +{ + /// + /// Extension methods for IHttpClientBuilder + /// + public static class IHttpClientBuilderExtensions + { + /// + /// Adds a Polly retry policy to your clients. + /// + /// + /// + /// + public static IHttpClientBuilder AddRetryPolicy(this IHttpClientBuilder client, int retries) + { + client.AddPolicyHandler(RetryPolicy(retries)); + + return client; + } + + /// + /// Adds a Polly timeout policy to your clients. + /// + /// + /// + /// + public static IHttpClientBuilder AddTimeoutPolicy(this IHttpClientBuilder client, TimeSpan timeout) + { + client.AddPolicyHandler(TimeoutPolicy(timeout)); + + return client; + } + + /// + /// Adds a Polly circiut breaker to your clients. + /// + /// + /// + /// + /// + public static IHttpClientBuilder AddCircuitBreakerPolicy(this IHttpClientBuilder client, int handledEventsAllowedBeforeBreaking, TimeSpan durationOfBreak) + { + client.AddTransientHttpErrorPolicy(builder => CircuitBreakerPolicy(builder, handledEventsAllowedBeforeBreaking, durationOfBreak)); + + return client; + } + + private static Polly.Retry.AsyncRetryPolicy RetryPolicy(int retries) + => HttpPolicyExtensions + .HandleTransientHttpError() + .Or() + .RetryAsync(retries); + + private static AsyncTimeoutPolicy TimeoutPolicy(TimeSpan timeout) + => Policy.TimeoutAsync(timeout); + + private static Polly.CircuitBreaker.AsyncCircuitBreakerPolicy CircuitBreakerPolicy( + PolicyBuilder builder, int handledEventsAllowedBeforeBreaking, TimeSpan durationOfBreak) + => builder.CircuitBreakerAsync(handledEventsAllowedBeforeBreaking, durationOfBreak); + } +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Extensions/IServiceCollectionExtensions.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Extensions/IServiceCollectionExtensions.cs new file mode 100644 index 0000000000..b7cfb5f6f9 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Extensions/IServiceCollectionExtensions.cs @@ -0,0 +1,88 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using Microsoft.Extensions.DependencyInjection; +using Org.OpenAPITools.Client; +using Org.OpenAPITools.Api; + +namespace Org.OpenAPITools.Extensions +{ + /// + /// Extension methods for IServiceCollection + /// + public static class IServiceCollectionExtensions + { + /// + /// Add the api to your host builder. + /// + /// + /// + public static void AddApi(this IServiceCollection services, Action> options) + where TAnotherFakeApi : class, IApi.IAnotherFakeApi + where TDefaultApi : class, IApi.IDefaultApi + where TFakeApi : class, IApi.IFakeApi + where TFakeClassnameTags123Api : class, IApi.IFakeClassnameTags123Api + where TPetApi : class, IApi.IPetApi + where TStoreApi : class, IApi.IStoreApi + where TUserApi : class, IApi.IUserApi + { + HostConfiguration config = new HostConfiguration(services); + options(config); + AddApi(services, config); + } + + /// + /// Add the api to your host builder. + /// + /// + /// + public static void AddApi(this IServiceCollection services, Action> options) + { + HostConfiguration config = new HostConfiguration(services); + options(config); + AddApi(services, config); + } + + internal static void AddApi(IServiceCollection services, HostConfiguration host) + where TAnotherFakeApi : class, IApi.IAnotherFakeApi + where TDefaultApi : class, IApi.IDefaultApi + where TFakeApi : class, IApi.IFakeApi + where TFakeClassnameTags123Api : class, IApi.IFakeClassnameTags123Api + where TPetApi : class, IApi.IPetApi + where TStoreApi : class, IApi.IStoreApi + where TUserApi : class, IApi.IUserApi + { + if (!host.HttpClientsAdded) + host.AddApiHttpClients(); + + services.AddSingleton(); + + // ensure that a token provider was provided for this token type + // if not, default to RateLimitProvider + var containerServices = services.Where(s => s.ServiceType.IsGenericType && + s.ServiceType.GetGenericTypeDefinition().IsAssignableFrom(typeof(TokenContainer<>))).ToArray(); + + foreach(var containerService in containerServices) + { + var tokenType = containerService.ServiceType.GenericTypeArguments[0]; + + var provider = services.FirstOrDefault(s => s.ServiceType.IsAssignableFrom(typeof(TokenProvider<>).MakeGenericType(tokenType))); + + if (provider == null) + { + services.AddSingleton(typeof(RateLimitProvider<>).MakeGenericType(tokenType)); + services.AddSingleton(typeof(TokenProvider<>).MakeGenericType(tokenType), + s => s.GetRequiredService(typeof(RateLimitProvider<>).MakeGenericType(tokenType))); + } + } + } + } +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Activity.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Activity.cs index 68647a4ae1..35452f5ff8 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Activity.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Activity.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,14 +26,24 @@ namespace Org.OpenAPITools.Model /// /// test map of maps /// - public partial class Activity : IEquatable, IValidatableObject + public partial class Activity : IValidatableObject { /// /// Initializes a new instance of the class. /// /// activityOutputs - public Activity(Dictionary> activityOutputs = default) + [JsonConstructor] + public Activity(Dictionary> activityOutputs) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (activityOutputs == null) + throw new ArgumentNullException("activityOutputs is a required property for Activity and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + ActivityOutputs = activityOutputs; } @@ -48,7 +57,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -63,48 +72,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Activity).AreEqual; - } - - /// - /// Returns true if Activity instances are equal - /// - /// Instance of Activity to be compared - /// Boolean - public bool Equals(Activity input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ActivityOutputs != null) - { - hashCode = (hashCode * 59) + this.ActivityOutputs.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -116,4 +83,72 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type Activity + /// + public class ActivityJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override Activity Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + Dictionary> activityOutputs = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "activity_outputs": + activityOutputs = JsonSerializer.Deserialize>>(ref reader, options); + break; + default: + break; + } + } + } + + return new Activity(activityOutputs); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Activity activity, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WritePropertyName("activity_outputs"); + JsonSerializer.Serialize(writer, activity.ActivityOutputs, options); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs index ed290bab60..31ae89912f 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,15 +26,28 @@ namespace Org.OpenAPITools.Model /// /// ActivityOutputElementRepresentation /// - public partial class ActivityOutputElementRepresentation : IEquatable, IValidatableObject + public partial class ActivityOutputElementRepresentation : IValidatableObject { /// /// Initializes a new instance of the class. /// /// prop1 /// prop2 - public ActivityOutputElementRepresentation(string prop1 = default, Object prop2 = default) + [JsonConstructor] + public ActivityOutputElementRepresentation(string prop1, Object prop2) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (prop1 == null) + throw new ArgumentNullException("prop1 is a required property for ActivityOutputElementRepresentation and cannot be null."); + + if (prop2 == null) + throw new ArgumentNullException("prop2 is a required property for ActivityOutputElementRepresentation and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + Prop1 = prop1; Prop2 = prop2; } @@ -56,7 +68,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -72,52 +84,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as ActivityOutputElementRepresentation).AreEqual; - } - - /// - /// Returns true if ActivityOutputElementRepresentation instances are equal - /// - /// Instance of ActivityOutputElementRepresentation to be compared - /// Boolean - public bool Equals(ActivityOutputElementRepresentation input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Prop1 != null) - { - hashCode = (hashCode * 59) + this.Prop1.GetHashCode(); - } - if (this.Prop2 != null) - { - hashCode = (hashCode * 59) + this.Prop2.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -129,4 +95,77 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type ActivityOutputElementRepresentation + /// + public class ActivityOutputElementRepresentationJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override ActivityOutputElementRepresentation Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string prop1 = default; + Object prop2 = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "prop1": + prop1 = reader.GetString(); + break; + case "prop2": + prop2 = JsonSerializer.Deserialize(ref reader, options); + break; + default: + break; + } + } + } + + return new ActivityOutputElementRepresentation(prop1, prop2); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ActivityOutputElementRepresentation activityOutputElementRepresentation, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("prop1", activityOutputElementRepresentation.Prop1); + writer.WritePropertyName("prop2"); + JsonSerializer.Serialize(writer, activityOutputElementRepresentation.Prop2, options); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs index 25b11f890f..5682c09e84 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,36 +26,65 @@ namespace Org.OpenAPITools.Model /// /// AdditionalPropertiesClass /// - public partial class AdditionalPropertiesClass : IEquatable, IValidatableObject + public partial class AdditionalPropertiesClass : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// mapProperty + /// an object with no declared properties and no undeclared properties, hence it's an empty map. /// mapOfMapProperty - /// anytype1 + /// mapProperty /// mapWithUndeclaredPropertiesAnytype1 /// mapWithUndeclaredPropertiesAnytype2 /// mapWithUndeclaredPropertiesAnytype3 - /// an object with no declared properties and no undeclared properties, hence it's an empty map. /// mapWithUndeclaredPropertiesString - public AdditionalPropertiesClass(Dictionary mapProperty = default, Dictionary> mapOfMapProperty = default, Object anytype1 = default, Object mapWithUndeclaredPropertiesAnytype1 = default, Object mapWithUndeclaredPropertiesAnytype2 = default, Dictionary mapWithUndeclaredPropertiesAnytype3 = default, Object emptyMap = default, Dictionary mapWithUndeclaredPropertiesString = default) + /// anytype1 + [JsonConstructor] + public AdditionalPropertiesClass(Object emptyMap, Dictionary> mapOfMapProperty, Dictionary mapProperty, Object mapWithUndeclaredPropertiesAnytype1, Object mapWithUndeclaredPropertiesAnytype2, Dictionary mapWithUndeclaredPropertiesAnytype3, Dictionary mapWithUndeclaredPropertiesString, Object anytype1 = default) { - MapProperty = mapProperty; +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (mapProperty == null) + throw new ArgumentNullException("mapProperty is a required property for AdditionalPropertiesClass and cannot be null."); + + if (mapOfMapProperty == null) + throw new ArgumentNullException("mapOfMapProperty is a required property for AdditionalPropertiesClass and cannot be null."); + + if (mapWithUndeclaredPropertiesAnytype1 == null) + throw new ArgumentNullException("mapWithUndeclaredPropertiesAnytype1 is a required property for AdditionalPropertiesClass and cannot be null."); + + if (mapWithUndeclaredPropertiesAnytype2 == null) + throw new ArgumentNullException("mapWithUndeclaredPropertiesAnytype2 is a required property for AdditionalPropertiesClass and cannot be null."); + + if (mapWithUndeclaredPropertiesAnytype3 == null) + throw new ArgumentNullException("mapWithUndeclaredPropertiesAnytype3 is a required property for AdditionalPropertiesClass and cannot be null."); + + if (emptyMap == null) + throw new ArgumentNullException("emptyMap is a required property for AdditionalPropertiesClass and cannot be null."); + + if (mapWithUndeclaredPropertiesString == null) + throw new ArgumentNullException("mapWithUndeclaredPropertiesString is a required property for AdditionalPropertiesClass and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + EmptyMap = emptyMap; MapOfMapProperty = mapOfMapProperty; - Anytype1 = anytype1; + MapProperty = mapProperty; MapWithUndeclaredPropertiesAnytype1 = mapWithUndeclaredPropertiesAnytype1; MapWithUndeclaredPropertiesAnytype2 = mapWithUndeclaredPropertiesAnytype2; MapWithUndeclaredPropertiesAnytype3 = mapWithUndeclaredPropertiesAnytype3; - EmptyMap = emptyMap; MapWithUndeclaredPropertiesString = mapWithUndeclaredPropertiesString; + Anytype1 = anytype1; } /// - /// Gets or Sets MapProperty + /// an object with no declared properties and no undeclared properties, hence it's an empty map. /// - [JsonPropertyName("map_property")] - public Dictionary MapProperty { get; set; } + /// an object with no declared properties and no undeclared properties, hence it's an empty map. + [JsonPropertyName("empty_map")] + public Object EmptyMap { get; set; } /// /// Gets or Sets MapOfMapProperty @@ -65,10 +93,10 @@ namespace Org.OpenAPITools.Model public Dictionary> MapOfMapProperty { get; set; } /// - /// Gets or Sets Anytype1 + /// Gets or Sets MapProperty /// - [JsonPropertyName("anytype_1")] - public Object Anytype1 { get; set; } + [JsonPropertyName("map_property")] + public Dictionary MapProperty { get; set; } /// /// Gets or Sets MapWithUndeclaredPropertiesAnytype1 @@ -88,24 +116,23 @@ namespace Org.OpenAPITools.Model [JsonPropertyName("map_with_undeclared_properties_anytype_3")] public Dictionary MapWithUndeclaredPropertiesAnytype3 { get; set; } - /// - /// an object with no declared properties and no undeclared properties, hence it's an empty map. - /// - /// an object with no declared properties and no undeclared properties, hence it's an empty map. - [JsonPropertyName("empty_map")] - public Object EmptyMap { get; set; } - /// /// Gets or Sets MapWithUndeclaredPropertiesString /// [JsonPropertyName("map_with_undeclared_properties_string")] public Dictionary MapWithUndeclaredPropertiesString { get; set; } + /// + /// Gets or Sets Anytype1 + /// + [JsonPropertyName("anytype_1")] + public Object Anytype1 { get; set; } + /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -115,88 +142,18 @@ namespace Org.OpenAPITools.Model { StringBuilder sb = new StringBuilder(); sb.Append("class AdditionalPropertiesClass {\n"); - sb.Append(" MapProperty: ").Append(MapProperty).Append("\n"); + sb.Append(" EmptyMap: ").Append(EmptyMap).Append("\n"); sb.Append(" MapOfMapProperty: ").Append(MapOfMapProperty).Append("\n"); - sb.Append(" Anytype1: ").Append(Anytype1).Append("\n"); + sb.Append(" MapProperty: ").Append(MapProperty).Append("\n"); sb.Append(" MapWithUndeclaredPropertiesAnytype1: ").Append(MapWithUndeclaredPropertiesAnytype1).Append("\n"); sb.Append(" MapWithUndeclaredPropertiesAnytype2: ").Append(MapWithUndeclaredPropertiesAnytype2).Append("\n"); sb.Append(" MapWithUndeclaredPropertiesAnytype3: ").Append(MapWithUndeclaredPropertiesAnytype3).Append("\n"); - sb.Append(" EmptyMap: ").Append(EmptyMap).Append("\n"); sb.Append(" MapWithUndeclaredPropertiesString: ").Append(MapWithUndeclaredPropertiesString).Append("\n"); + sb.Append(" Anytype1: ").Append(Anytype1).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as AdditionalPropertiesClass).AreEqual; - } - - /// - /// Returns true if AdditionalPropertiesClass instances are equal - /// - /// Instance of AdditionalPropertiesClass to be compared - /// Boolean - public bool Equals(AdditionalPropertiesClass input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.MapProperty != null) - { - hashCode = (hashCode * 59) + this.MapProperty.GetHashCode(); - } - if (this.MapOfMapProperty != null) - { - hashCode = (hashCode * 59) + this.MapOfMapProperty.GetHashCode(); - } - if (this.Anytype1 != null) - { - hashCode = (hashCode * 59) + this.Anytype1.GetHashCode(); - } - if (this.MapWithUndeclaredPropertiesAnytype1 != null) - { - hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesAnytype1.GetHashCode(); - } - if (this.MapWithUndeclaredPropertiesAnytype2 != null) - { - hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesAnytype2.GetHashCode(); - } - if (this.MapWithUndeclaredPropertiesAnytype3 != null) - { - hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesAnytype3.GetHashCode(); - } - if (this.EmptyMap != null) - { - hashCode = (hashCode * 59) + this.EmptyMap.GetHashCode(); - } - if (this.MapWithUndeclaredPropertiesString != null) - { - hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesString.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -208,4 +165,114 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type AdditionalPropertiesClass + /// + public class AdditionalPropertiesClassJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override AdditionalPropertiesClass Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + Object emptyMap = default; + Dictionary> mapOfMapProperty = default; + Dictionary mapProperty = default; + Object mapWithUndeclaredPropertiesAnytype1 = default; + Object mapWithUndeclaredPropertiesAnytype2 = default; + Dictionary mapWithUndeclaredPropertiesAnytype3 = default; + Dictionary mapWithUndeclaredPropertiesString = default; + Object anytype1 = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "empty_map": + emptyMap = JsonSerializer.Deserialize(ref reader, options); + break; + case "map_of_map_property": + mapOfMapProperty = JsonSerializer.Deserialize>>(ref reader, options); + break; + case "map_property": + mapProperty = JsonSerializer.Deserialize>(ref reader, options); + break; + case "map_with_undeclared_properties_anytype_1": + mapWithUndeclaredPropertiesAnytype1 = JsonSerializer.Deserialize(ref reader, options); + break; + case "map_with_undeclared_properties_anytype_2": + mapWithUndeclaredPropertiesAnytype2 = JsonSerializer.Deserialize(ref reader, options); + break; + case "map_with_undeclared_properties_anytype_3": + mapWithUndeclaredPropertiesAnytype3 = JsonSerializer.Deserialize>(ref reader, options); + break; + case "map_with_undeclared_properties_string": + mapWithUndeclaredPropertiesString = JsonSerializer.Deserialize>(ref reader, options); + break; + case "anytype_1": + anytype1 = JsonSerializer.Deserialize(ref reader, options); + break; + default: + break; + } + } + } + + return new AdditionalPropertiesClass(emptyMap, mapOfMapProperty, mapProperty, mapWithUndeclaredPropertiesAnytype1, mapWithUndeclaredPropertiesAnytype2, mapWithUndeclaredPropertiesAnytype3, mapWithUndeclaredPropertiesString, anytype1); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, AdditionalPropertiesClass additionalPropertiesClass, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WritePropertyName("empty_map"); + JsonSerializer.Serialize(writer, additionalPropertiesClass.EmptyMap, options); + writer.WritePropertyName("map_of_map_property"); + JsonSerializer.Serialize(writer, additionalPropertiesClass.MapOfMapProperty, options); + writer.WritePropertyName("map_property"); + JsonSerializer.Serialize(writer, additionalPropertiesClass.MapProperty, options); + writer.WritePropertyName("map_with_undeclared_properties_anytype_1"); + JsonSerializer.Serialize(writer, additionalPropertiesClass.MapWithUndeclaredPropertiesAnytype1, options); + writer.WritePropertyName("map_with_undeclared_properties_anytype_2"); + JsonSerializer.Serialize(writer, additionalPropertiesClass.MapWithUndeclaredPropertiesAnytype2, options); + writer.WritePropertyName("map_with_undeclared_properties_anytype_3"); + JsonSerializer.Serialize(writer, additionalPropertiesClass.MapWithUndeclaredPropertiesAnytype3, options); + writer.WritePropertyName("map_with_undeclared_properties_string"); + JsonSerializer.Serialize(writer, additionalPropertiesClass.MapWithUndeclaredPropertiesString, options); + writer.WritePropertyName("anytype_1"); + JsonSerializer.Serialize(writer, additionalPropertiesClass.Anytype1, options); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Animal.cs index 4d287b1d2f..122d4658dd 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Animal.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,18 +26,28 @@ namespace Org.OpenAPITools.Model /// /// Animal /// - public partial class Animal : IEquatable, IValidatableObject + public partial class Animal : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// className (required) + /// className /// color (default to "red") + [JsonConstructor] public Animal(string className, string color = "red") { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + if (className == null) throw new ArgumentNullException("className is a required property for Animal and cannot be null."); + if (color == null) + throw new ArgumentNullException("color is a required property for Animal and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + ClassName = className; Color = color; } @@ -59,7 +68,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -75,52 +84,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Animal).AreEqual; - } - - /// - /// Returns true if Animal instances are equal - /// - /// Instance of Animal to be compared - /// Boolean - public bool Equals(Animal input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ClassName != null) - { - hashCode = (hashCode * 59) + this.ClassName.GetHashCode(); - } - if (this.Color != null) - { - hashCode = (hashCode * 59) + this.Color.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -142,4 +105,76 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type Animal + /// + public class AnimalJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override Animal Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string className = default; + string color = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "className": + className = reader.GetString(); + break; + case "color": + color = reader.GetString(); + break; + default: + break; + } + } + } + + return new Animal(className, color); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Animal animal, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("className", animal.ClassName); + writer.WriteString("color", animal.Color); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ApiResponse.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ApiResponse.cs index 9410088a41..fba4da0924 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ApiResponse.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ApiResponse.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,19 +26,35 @@ namespace Org.OpenAPITools.Model /// /// ApiResponse /// - public partial class ApiResponse : IEquatable, IValidatableObject + public partial class ApiResponse : IValidatableObject { /// /// Initializes a new instance of the class. /// /// code - /// type /// message - public ApiResponse(int code = default, string type = default, string message = default) + /// type + [JsonConstructor] + public ApiResponse(int code, string message, string type) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (code == null) + throw new ArgumentNullException("code is a required property for ApiResponse and cannot be null."); + + if (type == null) + throw new ArgumentNullException("type is a required property for ApiResponse and cannot be null."); + + if (message == null) + throw new ArgumentNullException("message is a required property for ApiResponse and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + Code = code; - Type = type; Message = message; + Type = type; } /// @@ -48,23 +63,23 @@ namespace Org.OpenAPITools.Model [JsonPropertyName("code")] public int Code { get; set; } - /// - /// Gets or Sets Type - /// - [JsonPropertyName("type")] - public string Type { get; set; } - /// /// Gets or Sets Message /// [JsonPropertyName("message")] public string Message { get; set; } + /// + /// Gets or Sets Type + /// + [JsonPropertyName("type")] + public string Type { get; set; } + /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -75,59 +90,12 @@ namespace Org.OpenAPITools.Model StringBuilder sb = new StringBuilder(); sb.Append("class ApiResponse {\n"); sb.Append(" Code: ").Append(Code).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append(" Message: ").Append(Message).Append("\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as ApiResponse).AreEqual; - } - - /// - /// Returns true if ApiResponse instances are equal - /// - /// Instance of ApiResponse to be compared - /// Boolean - public bool Equals(ApiResponse input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Code.GetHashCode(); - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - if (this.Message != null) - { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -139,4 +107,81 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type ApiResponse + /// + public class ApiResponseJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override ApiResponse Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + int code = default; + string message = default; + string type = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "code": + code = reader.GetInt32(); + break; + case "message": + message = reader.GetString(); + break; + case "type": + type = reader.GetString(); + break; + default: + break; + } + } + } + + return new ApiResponse(code, message, type); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ApiResponse apiResponse, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteNumber("code", (int)apiResponse.Code); + writer.WriteString("message", apiResponse.Message); + writer.WriteString("type", apiResponse.Type); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Apple.cs index d6a9cf5029..2d5443fbd5 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Apple.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,15 +26,28 @@ namespace Org.OpenAPITools.Model /// /// Apple /// - public partial class Apple : IEquatable, IValidatableObject + public partial class Apple : IValidatableObject { /// /// Initializes a new instance of the class. /// /// cultivar /// origin - public Apple(string cultivar = default, string origin = default) + [JsonConstructor] + public Apple(string cultivar, string origin) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (cultivar == null) + throw new ArgumentNullException("cultivar is a required property for Apple and cannot be null."); + + if (origin == null) + throw new ArgumentNullException("origin is a required property for Apple and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + Cultivar = cultivar; Origin = origin; } @@ -56,7 +68,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -72,52 +84,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Apple).AreEqual; - } - - /// - /// Returns true if Apple instances are equal - /// - /// Instance of Apple to be compared - /// Boolean - public bool Equals(Apple input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Cultivar != null) - { - hashCode = (hashCode * 59) + this.Cultivar.GetHashCode(); - } - if (this.Origin != null) - { - hashCode = (hashCode * 59) + this.Origin.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -143,4 +109,76 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type Apple + /// + public class AppleJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override Apple Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string cultivar = default; + string origin = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "cultivar": + cultivar = reader.GetString(); + break; + case "origin": + origin = reader.GetString(); + break; + default: + break; + } + } + } + + return new Apple(cultivar, origin); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Apple apple, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("cultivar", apple.Cultivar); + writer.WriteString("origin", apple.Origin); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/AppleReq.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/AppleReq.cs index 48e37cc0aa..bae73be324 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/AppleReq.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/AppleReq.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,18 +26,28 @@ namespace Org.OpenAPITools.Model /// /// AppleReq /// - public partial class AppleReq : IEquatable, IValidatableObject + public partial class AppleReq : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// cultivar (required) + /// cultivar /// mealy - public AppleReq(string cultivar, bool mealy = default) + [JsonConstructor] + public AppleReq(string cultivar, bool mealy) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + if (cultivar == null) throw new ArgumentNullException("cultivar is a required property for AppleReq and cannot be null."); + if (mealy == null) + throw new ArgumentNullException("mealy is a required property for AppleReq and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + Cultivar = cultivar; Mealy = mealy; } @@ -68,45 +77,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as AppleReq).AreEqual; - } - - /// - /// Returns true if AppleReq instances are equal - /// - /// Instance of AppleReq to be compared - /// Boolean - public bool Equals(AppleReq input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Cultivar != null) - { - hashCode = (hashCode * 59) + this.Cultivar.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Mealy.GetHashCode(); - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -118,4 +88,76 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type AppleReq + /// + public class AppleReqJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override AppleReq Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string cultivar = default; + bool mealy = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "cultivar": + cultivar = reader.GetString(); + break; + case "mealy": + mealy = reader.GetBoolean(); + break; + default: + break; + } + } + } + + return new AppleReq(cultivar, mealy); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, AppleReq appleReq, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("cultivar", appleReq.Cultivar); + writer.WriteBoolean("mealy", appleReq.Mealy); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs index 256a6b596a..ea6a1f3cab 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,14 +26,24 @@ namespace Org.OpenAPITools.Model /// /// ArrayOfArrayOfNumberOnly /// - public partial class ArrayOfArrayOfNumberOnly : IEquatable, IValidatableObject + public partial class ArrayOfArrayOfNumberOnly : IValidatableObject { /// /// Initializes a new instance of the class. /// /// arrayArrayNumber - public ArrayOfArrayOfNumberOnly(List> arrayArrayNumber = default) + [JsonConstructor] + public ArrayOfArrayOfNumberOnly(List> arrayArrayNumber) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (arrayArrayNumber == null) + throw new ArgumentNullException("arrayArrayNumber is a required property for ArrayOfArrayOfNumberOnly and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + ArrayArrayNumber = arrayArrayNumber; } @@ -48,7 +57,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -63,48 +72,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as ArrayOfArrayOfNumberOnly).AreEqual; - } - - /// - /// Returns true if ArrayOfArrayOfNumberOnly instances are equal - /// - /// Instance of ArrayOfArrayOfNumberOnly to be compared - /// Boolean - public bool Equals(ArrayOfArrayOfNumberOnly input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ArrayArrayNumber != null) - { - hashCode = (hashCode * 59) + this.ArrayArrayNumber.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -116,4 +83,72 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type ArrayOfArrayOfNumberOnly + /// + public class ArrayOfArrayOfNumberOnlyJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override ArrayOfArrayOfNumberOnly Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + List> arrayArrayNumber = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "ArrayArrayNumber": + arrayArrayNumber = JsonSerializer.Deserialize>>(ref reader, options); + break; + default: + break; + } + } + } + + return new ArrayOfArrayOfNumberOnly(arrayArrayNumber); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ArrayOfArrayOfNumberOnly arrayOfArrayOfNumberOnly, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WritePropertyName("ArrayArrayNumber"); + JsonSerializer.Serialize(writer, arrayOfArrayOfNumberOnly.ArrayArrayNumber, options); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs index 6c462dddf1..c09645642c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,14 +26,24 @@ namespace Org.OpenAPITools.Model /// /// ArrayOfNumberOnly /// - public partial class ArrayOfNumberOnly : IEquatable, IValidatableObject + public partial class ArrayOfNumberOnly : IValidatableObject { /// /// Initializes a new instance of the class. /// /// arrayNumber - public ArrayOfNumberOnly(List arrayNumber = default) + [JsonConstructor] + public ArrayOfNumberOnly(List arrayNumber) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (arrayNumber == null) + throw new ArgumentNullException("arrayNumber is a required property for ArrayOfNumberOnly and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + ArrayNumber = arrayNumber; } @@ -48,7 +57,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -63,48 +72,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as ArrayOfNumberOnly).AreEqual; - } - - /// - /// Returns true if ArrayOfNumberOnly instances are equal - /// - /// Instance of ArrayOfNumberOnly to be compared - /// Boolean - public bool Equals(ArrayOfNumberOnly input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ArrayNumber != null) - { - hashCode = (hashCode * 59) + this.ArrayNumber.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -116,4 +83,72 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type ArrayOfNumberOnly + /// + public class ArrayOfNumberOnlyJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override ArrayOfNumberOnly Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + List arrayNumber = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "ArrayNumber": + arrayNumber = JsonSerializer.Deserialize>(ref reader, options); + break; + default: + break; + } + } + } + + return new ArrayOfNumberOnly(arrayNumber); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ArrayOfNumberOnly arrayOfNumberOnly, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WritePropertyName("ArrayNumber"); + JsonSerializer.Serialize(writer, arrayOfNumberOnly.ArrayNumber, options); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ArrayTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ArrayTest.cs index f9872d7010..ef26590ab3 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ArrayTest.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ArrayTest.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,27 +26,37 @@ namespace Org.OpenAPITools.Model /// /// ArrayTest /// - public partial class ArrayTest : IEquatable, IValidatableObject + public partial class ArrayTest : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// arrayOfString /// arrayArrayOfInteger /// arrayArrayOfModel - public ArrayTest(List arrayOfString = default, List> arrayArrayOfInteger = default, List> arrayArrayOfModel = default) + /// arrayOfString + [JsonConstructor] + public ArrayTest(List> arrayArrayOfInteger, List> arrayArrayOfModel, List arrayOfString) { - ArrayOfString = arrayOfString; +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (arrayOfString == null) + throw new ArgumentNullException("arrayOfString is a required property for ArrayTest and cannot be null."); + + if (arrayArrayOfInteger == null) + throw new ArgumentNullException("arrayArrayOfInteger is a required property for ArrayTest and cannot be null."); + + if (arrayArrayOfModel == null) + throw new ArgumentNullException("arrayArrayOfModel is a required property for ArrayTest and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + ArrayArrayOfInteger = arrayArrayOfInteger; ArrayArrayOfModel = arrayArrayOfModel; + ArrayOfString = arrayOfString; } - /// - /// Gets or Sets ArrayOfString - /// - [JsonPropertyName("array_of_string")] - public List ArrayOfString { get; set; } - /// /// Gets or Sets ArrayArrayOfInteger /// @@ -60,11 +69,17 @@ namespace Org.OpenAPITools.Model [JsonPropertyName("array_array_of_model")] public List> ArrayArrayOfModel { get; set; } + /// + /// Gets or Sets ArrayOfString + /// + [JsonPropertyName("array_of_string")] + public List ArrayOfString { get; set; } + /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -74,63 +89,13 @@ namespace Org.OpenAPITools.Model { StringBuilder sb = new StringBuilder(); sb.Append("class ArrayTest {\n"); - sb.Append(" ArrayOfString: ").Append(ArrayOfString).Append("\n"); sb.Append(" ArrayArrayOfInteger: ").Append(ArrayArrayOfInteger).Append("\n"); sb.Append(" ArrayArrayOfModel: ").Append(ArrayArrayOfModel).Append("\n"); + sb.Append(" ArrayOfString: ").Append(ArrayOfString).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as ArrayTest).AreEqual; - } - - /// - /// Returns true if ArrayTest instances are equal - /// - /// Instance of ArrayTest to be compared - /// Boolean - public bool Equals(ArrayTest input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ArrayOfString != null) - { - hashCode = (hashCode * 59) + this.ArrayOfString.GetHashCode(); - } - if (this.ArrayArrayOfInteger != null) - { - hashCode = (hashCode * 59) + this.ArrayArrayOfInteger.GetHashCode(); - } - if (this.ArrayArrayOfModel != null) - { - hashCode = (hashCode * 59) + this.ArrayArrayOfModel.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -142,4 +107,84 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type ArrayTest + /// + public class ArrayTestJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override ArrayTest Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + List> arrayArrayOfInteger = default; + List> arrayArrayOfModel = default; + List arrayOfString = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "array_array_of_integer": + arrayArrayOfInteger = JsonSerializer.Deserialize>>(ref reader, options); + break; + case "array_array_of_model": + arrayArrayOfModel = JsonSerializer.Deserialize>>(ref reader, options); + break; + case "array_of_string": + arrayOfString = JsonSerializer.Deserialize>(ref reader, options); + break; + default: + break; + } + } + } + + return new ArrayTest(arrayArrayOfInteger, arrayArrayOfModel, arrayOfString); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ArrayTest arrayTest, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WritePropertyName("array_array_of_integer"); + JsonSerializer.Serialize(writer, arrayTest.ArrayArrayOfInteger, options); + writer.WritePropertyName("array_array_of_model"); + JsonSerializer.Serialize(writer, arrayTest.ArrayArrayOfModel, options); + writer.WritePropertyName("array_of_string"); + JsonSerializer.Serialize(writer, arrayTest.ArrayOfString, options); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Banana.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Banana.cs index 3192691eb7..129aec2d59 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Banana.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Banana.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,14 +26,24 @@ namespace Org.OpenAPITools.Model /// /// Banana /// - public partial class Banana : IEquatable, IValidatableObject + public partial class Banana : IValidatableObject { /// /// Initializes a new instance of the class. /// /// lengthCm - public Banana(decimal lengthCm = default) + [JsonConstructor] + public Banana(decimal lengthCm) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (lengthCm == null) + throw new ArgumentNullException("lengthCm is a required property for Banana and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + LengthCm = lengthCm; } @@ -48,7 +57,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -63,45 +72,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Banana).AreEqual; - } - - /// - /// Returns true if Banana instances are equal - /// - /// Instance of Banana to be compared - /// Boolean - public bool Equals(Banana input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.LengthCm.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -113,4 +83,71 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type Banana + /// + public class BananaJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override Banana Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + decimal lengthCm = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "lengthCm": + lengthCm = reader.GetInt32(); + break; + default: + break; + } + } + } + + return new Banana(lengthCm); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Banana banana, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteNumber("lengthCm", (int)banana.LengthCm); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/BananaReq.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/BananaReq.cs index 95ea0488f2..1ef87ba099 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/BananaReq.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/BananaReq.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,18 +26,28 @@ namespace Org.OpenAPITools.Model /// /// BananaReq /// - public partial class BananaReq : IEquatable, IValidatableObject + public partial class BananaReq : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// lengthCm (required) + /// lengthCm /// sweet - public BananaReq(decimal lengthCm, bool sweet = default) + [JsonConstructor] + public BananaReq(decimal lengthCm, bool sweet) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + if (lengthCm == null) throw new ArgumentNullException("lengthCm is a required property for BananaReq and cannot be null."); + if (sweet == null) + throw new ArgumentNullException("sweet is a required property for BananaReq and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + LengthCm = lengthCm; Sweet = sweet; } @@ -68,42 +77,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as BananaReq).AreEqual; - } - - /// - /// Returns true if BananaReq instances are equal - /// - /// Instance of BananaReq to be compared - /// Boolean - public bool Equals(BananaReq input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.LengthCm.GetHashCode(); - hashCode = (hashCode * 59) + this.Sweet.GetHashCode(); - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -115,4 +88,76 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type BananaReq + /// + public class BananaReqJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override BananaReq Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + decimal lengthCm = default; + bool sweet = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "lengthCm": + lengthCm = reader.GetInt32(); + break; + case "sweet": + sweet = reader.GetBoolean(); + break; + default: + break; + } + } + } + + return new BananaReq(lengthCm, sweet); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, BananaReq bananaReq, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteNumber("lengthCm", (int)bananaReq.LengthCm); + writer.WriteBoolean("sweet", bananaReq.Sweet); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/BasquePig.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/BasquePig.cs index fc19bc1927..de3bca6d08 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/BasquePig.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/BasquePig.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,17 +26,24 @@ namespace Org.OpenAPITools.Model /// /// BasquePig /// - public partial class BasquePig : IEquatable, IValidatableObject + public partial class BasquePig : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// className (required) + /// className + [JsonConstructor] public BasquePig(string className) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + if (className == null) throw new ArgumentNullException("className is a required property for BasquePig and cannot be null."); +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + ClassName = className; } @@ -51,7 +57,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -66,48 +72,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as BasquePig).AreEqual; - } - - /// - /// Returns true if BasquePig instances are equal - /// - /// Instance of BasquePig to be compared - /// Boolean - public bool Equals(BasquePig input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ClassName != null) - { - hashCode = (hashCode * 59) + this.ClassName.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -119,4 +83,71 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type BasquePig + /// + public class BasquePigJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override BasquePig Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string className = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "className": + className = reader.GetString(); + break; + default: + break; + } + } + } + + return new BasquePig(className); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, BasquePig basquePig, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("className", basquePig.ClassName); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Capitalization.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Capitalization.cs index 92d9249496..0d25bc7061 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Capitalization.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Capitalization.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,32 +26,58 @@ namespace Org.OpenAPITools.Model /// /// Capitalization /// - public partial class Capitalization : IEquatable, IValidatableObject + public partial class Capitalization : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// smallCamel + /// Name of the pet /// capitalCamel - /// smallSnake /// capitalSnake /// sCAETHFlowPoints - /// Name of the pet - public Capitalization(string smallCamel = default, string capitalCamel = default, string smallSnake = default, string capitalSnake = default, string sCAETHFlowPoints = default, string aTTNAME = default) + /// smallCamel + /// smallSnake + [JsonConstructor] + public Capitalization(string aTTNAME, string capitalCamel, string capitalSnake, string sCAETHFlowPoints, string smallCamel, string smallSnake) { - SmallCamel = smallCamel; +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (smallCamel == null) + throw new ArgumentNullException("smallCamel is a required property for Capitalization and cannot be null."); + + if (capitalCamel == null) + throw new ArgumentNullException("capitalCamel is a required property for Capitalization and cannot be null."); + + if (smallSnake == null) + throw new ArgumentNullException("smallSnake is a required property for Capitalization and cannot be null."); + + if (capitalSnake == null) + throw new ArgumentNullException("capitalSnake is a required property for Capitalization and cannot be null."); + + if (sCAETHFlowPoints == null) + throw new ArgumentNullException("sCAETHFlowPoints is a required property for Capitalization and cannot be null."); + + if (aTTNAME == null) + throw new ArgumentNullException("aTTNAME is a required property for Capitalization and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + ATT_NAME = aTTNAME; CapitalCamel = capitalCamel; - SmallSnake = smallSnake; CapitalSnake = capitalSnake; SCAETHFlowPoints = sCAETHFlowPoints; - ATT_NAME = aTTNAME; + SmallCamel = smallCamel; + SmallSnake = smallSnake; } /// - /// Gets or Sets SmallCamel + /// Name of the pet /// - [JsonPropertyName("smallCamel")] - public string SmallCamel { get; set; } + /// Name of the pet + [JsonPropertyName("ATT_NAME")] + public string ATT_NAME { get; set; } /// /// Gets or Sets CapitalCamel @@ -60,12 +85,6 @@ namespace Org.OpenAPITools.Model [JsonPropertyName("CapitalCamel")] public string CapitalCamel { get; set; } - /// - /// Gets or Sets SmallSnake - /// - [JsonPropertyName("small_Snake")] - public string SmallSnake { get; set; } - /// /// Gets or Sets CapitalSnake /// @@ -79,17 +98,22 @@ namespace Org.OpenAPITools.Model public string SCAETHFlowPoints { get; set; } /// - /// Name of the pet + /// Gets or Sets SmallCamel /// - /// Name of the pet - [JsonPropertyName("ATT_NAME")] - public string ATT_NAME { get; set; } + [JsonPropertyName("smallCamel")] + public string SmallCamel { get; set; } + + /// + /// Gets or Sets SmallSnake + /// + [JsonPropertyName("small_Snake")] + public string SmallSnake { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -99,78 +123,16 @@ namespace Org.OpenAPITools.Model { StringBuilder sb = new StringBuilder(); sb.Append("class Capitalization {\n"); - sb.Append(" SmallCamel: ").Append(SmallCamel).Append("\n"); + sb.Append(" ATT_NAME: ").Append(ATT_NAME).Append("\n"); sb.Append(" CapitalCamel: ").Append(CapitalCamel).Append("\n"); - sb.Append(" SmallSnake: ").Append(SmallSnake).Append("\n"); sb.Append(" CapitalSnake: ").Append(CapitalSnake).Append("\n"); sb.Append(" SCAETHFlowPoints: ").Append(SCAETHFlowPoints).Append("\n"); - sb.Append(" ATT_NAME: ").Append(ATT_NAME).Append("\n"); + sb.Append(" SmallCamel: ").Append(SmallCamel).Append("\n"); + sb.Append(" SmallSnake: ").Append(SmallSnake).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Capitalization).AreEqual; - } - - /// - /// Returns true if Capitalization instances are equal - /// - /// Instance of Capitalization to be compared - /// Boolean - public bool Equals(Capitalization input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.SmallCamel != null) - { - hashCode = (hashCode * 59) + this.SmallCamel.GetHashCode(); - } - if (this.CapitalCamel != null) - { - hashCode = (hashCode * 59) + this.CapitalCamel.GetHashCode(); - } - if (this.SmallSnake != null) - { - hashCode = (hashCode * 59) + this.SmallSnake.GetHashCode(); - } - if (this.CapitalSnake != null) - { - hashCode = (hashCode * 59) + this.CapitalSnake.GetHashCode(); - } - if (this.SCAETHFlowPoints != null) - { - hashCode = (hashCode * 59) + this.SCAETHFlowPoints.GetHashCode(); - } - if (this.ATT_NAME != null) - { - hashCode = (hashCode * 59) + this.ATT_NAME.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -182,4 +144,96 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type Capitalization + /// + public class CapitalizationJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override Capitalization Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string aTTNAME = default; + string capitalCamel = default; + string capitalSnake = default; + string sCAETHFlowPoints = default; + string smallCamel = default; + string smallSnake = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "ATT_NAME": + aTTNAME = reader.GetString(); + break; + case "CapitalCamel": + capitalCamel = reader.GetString(); + break; + case "Capital_Snake": + capitalSnake = reader.GetString(); + break; + case "SCA_ETH_Flow_Points": + sCAETHFlowPoints = reader.GetString(); + break; + case "smallCamel": + smallCamel = reader.GetString(); + break; + case "small_Snake": + smallSnake = reader.GetString(); + break; + default: + break; + } + } + } + + return new Capitalization(aTTNAME, capitalCamel, capitalSnake, sCAETHFlowPoints, smallCamel, smallSnake); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Capitalization capitalization, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("ATT_NAME", capitalization.ATT_NAME); + writer.WriteString("CapitalCamel", capitalization.CapitalCamel); + writer.WriteString("Capital_Snake", capitalization.CapitalSnake); + writer.WriteString("SCA_ETH_Flow_Points", capitalization.SCAETHFlowPoints); + writer.WriteString("smallCamel", capitalization.SmallCamel); + writer.WriteString("small_Snake", capitalization.SmallSnake); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Cat.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Cat.cs index b8c35dd406..462e1e3d6e 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Cat.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Cat.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,16 +26,17 @@ namespace Org.OpenAPITools.Model /// /// Cat /// - public partial class Cat : Animal, IEquatable + public partial class Cat : Animal, IValidatableObject { /// /// Initializes a new instance of the class. /// /// /// - /// className (required) + /// className /// color (default to "red") - public Cat(Dictionary dictionary, CatAllOf catAllOf, string className, string color = "red") : base(className, color) + [JsonConstructor] + internal Cat(Dictionary dictionary, CatAllOf catAllOf, string className, string color = "red") : base(className, color) { Dictionary = dictionary; CatAllOf = catAllOf; @@ -64,40 +64,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Cat).AreEqual; - } - - /// - /// Returns true if Cat instances are equal - /// - /// Instance of Cat to be compared - /// Boolean - public bool Equals(Cat input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - return hashCode; - } - } - } /// @@ -105,13 +71,6 @@ namespace Org.OpenAPITools.Model /// public class CatJsonConverter : JsonConverter { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof(Cat).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -124,24 +83,29 @@ namespace Org.OpenAPITools.Model { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); + JsonTokenType startingTokenType = reader.TokenType; + Utf8JsonReader dictionaryReader = reader; - bool dictionaryDeserialized = Client.ClientUtils.TryDeserialize>(ref dictionaryReader, options, out Dictionary dictionary); + bool dictionaryDeserialized = Client.ClientUtils.TryDeserialize>(ref reader, options, out Dictionary dictionary); Utf8JsonReader catAllOfReader = reader; - bool catAllOfDeserialized = Client.ClientUtils.TryDeserialize(ref catAllOfReader, options, out CatAllOf catAllOf); + bool catAllOfDeserialized = Client.ClientUtils.TryDeserialize(ref reader, options, out CatAllOf catAllOf); string className = default; string color = default; while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string propertyName = reader.GetString(); reader.Read(); @@ -154,6 +118,8 @@ namespace Org.OpenAPITools.Model case "color": color = reader.GetString(); break; + default: + break; } } } @@ -168,6 +134,14 @@ namespace Org.OpenAPITools.Model /// /// /// - public override void Write(Utf8JsonWriter writer, Cat cat, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, Cat cat, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("className", cat.ClassName); + writer.WriteString("color", cat.Color); + + writer.WriteEndObject(); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/CatAllOf.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/CatAllOf.cs index f1f19c6c88..bdda428981 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/CatAllOf.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/CatAllOf.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,14 +26,24 @@ namespace Org.OpenAPITools.Model /// /// CatAllOf /// - public partial class CatAllOf : IEquatable, IValidatableObject + public partial class CatAllOf : IValidatableObject { /// /// Initializes a new instance of the class. /// /// declawed - public CatAllOf(bool declawed = default) + [JsonConstructor] + public CatAllOf(bool declawed) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (declawed == null) + throw new ArgumentNullException("declawed is a required property for CatAllOf and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + Declawed = declawed; } @@ -48,7 +57,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -63,45 +72,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as CatAllOf).AreEqual; - } - - /// - /// Returns true if CatAllOf instances are equal - /// - /// Instance of CatAllOf to be compared - /// Boolean - public bool Equals(CatAllOf input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Declawed.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -113,4 +83,71 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type CatAllOf + /// + public class CatAllOfJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override CatAllOf Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + bool declawed = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "declawed": + declawed = reader.GetBoolean(); + break; + default: + break; + } + } + } + + return new CatAllOf(declawed); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, CatAllOf catAllOf, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteBoolean("declawed", catAllOf.Declawed); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Category.cs index be6a1620b1..0a34203a8a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Category.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,27 +26,31 @@ namespace Org.OpenAPITools.Model /// /// Category /// - public partial class Category : IEquatable, IValidatableObject + public partial class Category : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// name (required) (default to "default-name") /// id - public Category(string name = "default-name", long id = default) + /// name (default to "default-name") + [JsonConstructor] + public Category(long id, string name = "default-name") { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (id == null) + throw new ArgumentNullException("id is a required property for Category and cannot be null."); + if (name == null) throw new ArgumentNullException("name is a required property for Category and cannot be null."); - Name = name; - Id = id; - } +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' - /// - /// Gets or Sets Name - /// - [JsonPropertyName("name")] - public string Name { get; set; } + Id = id; + Name = name; + } /// /// Gets or Sets Id @@ -55,11 +58,17 @@ namespace Org.OpenAPITools.Model [JsonPropertyName("id")] public long Id { get; set; } + /// + /// Gets or Sets Name + /// + [JsonPropertyName("name")] + public string Name { get; set; } + /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -69,55 +78,12 @@ namespace Org.OpenAPITools.Model { StringBuilder sb = new StringBuilder(); sb.Append("class Category {\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Category).AreEqual; - } - - /// - /// Returns true if Category instances are equal - /// - /// Instance of Category to be compared - /// Boolean - public bool Equals(Category input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -129,4 +95,76 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type Category + /// + public class CategoryJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override Category Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + long id = default; + string name = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "id": + id = reader.GetInt64(); + break; + case "name": + name = reader.GetString(); + break; + default: + break; + } + } + } + + return new Category(id, name); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Category category, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteNumber("id", (int)category.Id); + writer.WriteString("name", category.Name); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ChildCat.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ChildCat.cs index 5245528adb..eac43e2327 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ChildCat.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ChildCat.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,14 +26,15 @@ namespace Org.OpenAPITools.Model /// /// ChildCat /// - public partial class ChildCat : ParentPet, IEquatable + public partial class ChildCat : ParentPet, IValidatableObject { /// /// Initializes a new instance of the class. /// /// - /// petType (required) - public ChildCat(ChildCatAllOf childCatAllOf, string petType) : base(petType) + /// petType + [JsonConstructor] + internal ChildCat(ChildCatAllOf childCatAllOf, string petType) : base(petType) { ChildCatAllOf = childCatAllOf; } @@ -56,40 +56,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as ChildCat).AreEqual; - } - - /// - /// Returns true if ChildCat instances are equal - /// - /// Instance of ChildCat to be compared - /// Boolean - public bool Equals(ChildCat input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - return hashCode; - } - } - } /// @@ -97,13 +63,6 @@ namespace Org.OpenAPITools.Model /// public class ChildCatJsonConverter : JsonConverter { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof(ChildCat).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -116,20 +75,25 @@ namespace Org.OpenAPITools.Model { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); + JsonTokenType startingTokenType = reader.TokenType; + Utf8JsonReader childCatAllOfReader = reader; - bool childCatAllOfDeserialized = Client.ClientUtils.TryDeserialize(ref childCatAllOfReader, options, out ChildCatAllOf childCatAllOf); + bool childCatAllOfDeserialized = Client.ClientUtils.TryDeserialize(ref reader, options, out ChildCatAllOf childCatAllOf); string petType = default; while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string propertyName = reader.GetString(); reader.Read(); @@ -139,6 +103,8 @@ namespace Org.OpenAPITools.Model case "pet_type": petType = reader.GetString(); break; + default: + break; } } } @@ -153,6 +119,13 @@ namespace Org.OpenAPITools.Model /// /// /// - public override void Write(Utf8JsonWriter writer, ChildCat childCat, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, ChildCat childCat, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("pet_type", childCat.PetType); + + writer.WriteEndObject(); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ChildCatAllOf.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ChildCatAllOf.cs index bc601c217b..6b768fcd1e 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ChildCatAllOf.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ChildCatAllOf.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,15 +26,28 @@ namespace Org.OpenAPITools.Model /// /// ChildCatAllOf /// - public partial class ChildCatAllOf : IEquatable, IValidatableObject + public partial class ChildCatAllOf : IValidatableObject { /// /// Initializes a new instance of the class. /// /// name /// petType (default to PetTypeEnum.ChildCat) - public ChildCatAllOf(string name = default, PetTypeEnum petType = PetTypeEnum.ChildCat) + [JsonConstructor] + public ChildCatAllOf(string name, PetTypeEnum petType = PetTypeEnum.ChildCat) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (name == null) + throw new ArgumentNullException("name is a required property for ChildCatAllOf and cannot be null."); + + if (petType == null) + throw new ArgumentNullException("petType is a required property for ChildCatAllOf and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + Name = name; PetType = petType; } @@ -48,11 +60,37 @@ namespace Org.OpenAPITools.Model /// /// Enum ChildCat for value: ChildCat /// - [EnumMember(Value = "ChildCat")] ChildCat = 1 } + /// + /// Returns a PetTypeEnum + /// + /// + /// + public static PetTypeEnum PetTypeEnumFromString(string value) + { + if (value == "ChildCat") + return PetTypeEnum.ChildCat; + + throw new NotImplementedException($"Could not convert value to type PetTypeEnum: '{value}'"); + } + + /// + /// Returns equivalent json value + /// + /// + /// + /// + public static string PetTypeEnumToJsonValue(PetTypeEnum value) + { + if (value == PetTypeEnum.ChildCat) + return "ChildCat"; + + throw new NotImplementedException($"Value could not be handled: '{value}'"); + } + /// /// Gets or Sets PetType /// @@ -69,7 +107,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -85,49 +123,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as ChildCatAllOf).AreEqual; - } - - /// - /// Returns true if ChildCatAllOf instances are equal - /// - /// Instance of ChildCatAllOf to be compared - /// Boolean - public bool Equals(ChildCatAllOf input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PetType.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -139,4 +134,81 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type ChildCatAllOf + /// + public class ChildCatAllOfJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override ChildCatAllOf Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string name = default; + ChildCatAllOf.PetTypeEnum petType = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "name": + name = reader.GetString(); + break; + case "pet_type": + string petTypeRawValue = reader.GetString(); + petType = ChildCatAllOf.PetTypeEnumFromString(petTypeRawValue); + break; + default: + break; + } + } + } + + return new ChildCatAllOf(name, petType); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ChildCatAllOf childCatAllOf, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("name", childCatAllOf.Name); + var petTypeRawValue = ChildCatAllOf.PetTypeEnumToJsonValue(childCatAllOf.PetType); + if (petTypeRawValue != null) + writer.WriteString("pet_type", petTypeRawValue); + else + writer.WriteNull("pet_type"); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ClassModel.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ClassModel.cs index 84a40d9489..be70d0da28 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ClassModel.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ClassModel.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,28 +26,38 @@ namespace Org.OpenAPITools.Model /// /// Model for testing model with \"_class\" property /// - public partial class ClassModel : IEquatable, IValidatableObject + public partial class ClassModel : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// _class - public ClassModel(string _class = default) + /// classProperty + [JsonConstructor] + public ClassModel(string classProperty) { - Class = _class; +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (classProperty == null) + throw new ArgumentNullException("classProperty is a required property for ClassModel and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + ClassProperty = classProperty; } /// - /// Gets or Sets Class + /// Gets or Sets ClassProperty /// [JsonPropertyName("_class")] - public string Class { get; set; } + public string ClassProperty { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -58,53 +67,11 @@ namespace Org.OpenAPITools.Model { StringBuilder sb = new StringBuilder(); sb.Append("class ClassModel {\n"); - sb.Append(" Class: ").Append(Class).Append("\n"); + sb.Append(" ClassProperty: ").Append(ClassProperty).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as ClassModel).AreEqual; - } - - /// - /// Returns true if ClassModel instances are equal - /// - /// Instance of ClassModel to be compared - /// Boolean - public bool Equals(ClassModel input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Class != null) - { - hashCode = (hashCode * 59) + this.Class.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -116,4 +83,71 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type ClassModel + /// + public class ClassModelJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override ClassModel Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string classProperty = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "_class": + classProperty = reader.GetString(); + break; + default: + break; + } + } + } + + return new ClassModel(classProperty); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ClassModel classModel, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("_class", classModel.ClassProperty); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs index 2ec6fa15f3..b4c3977c99 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,14 +26,15 @@ namespace Org.OpenAPITools.Model /// /// ComplexQuadrilateral /// - public partial class ComplexQuadrilateral : IEquatable, IValidatableObject + public partial class ComplexQuadrilateral : IValidatableObject { /// /// Initializes a new instance of the class. /// /// /// - public ComplexQuadrilateral(ShapeInterface shapeInterface, QuadrilateralInterface quadrilateralInterface) + [JsonConstructor] + internal ComplexQuadrilateral(ShapeInterface shapeInterface, QuadrilateralInterface quadrilateralInterface) { ShapeInterface = shapeInterface; QuadrilateralInterface = quadrilateralInterface; @@ -54,7 +54,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -68,44 +68,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as ComplexQuadrilateral).AreEqual; - } - - /// - /// Returns true if ComplexQuadrilateral instances are equal - /// - /// Instance of ComplexQuadrilateral to be compared - /// Boolean - public bool Equals(ComplexQuadrilateral input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -122,13 +84,6 @@ namespace Org.OpenAPITools.Model /// public class ComplexQuadrilateralJsonConverter : JsonConverter { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof(ComplexQuadrilateral).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -141,28 +96,35 @@ namespace Org.OpenAPITools.Model { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); + JsonTokenType startingTokenType = reader.TokenType; + Utf8JsonReader shapeInterfaceReader = reader; - bool shapeInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref shapeInterfaceReader, options, out ShapeInterface shapeInterface); + bool shapeInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref reader, options, out ShapeInterface shapeInterface); Utf8JsonReader quadrilateralInterfaceReader = reader; - bool quadrilateralInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref quadrilateralInterfaceReader, options, out QuadrilateralInterface quadrilateralInterface); + bool quadrilateralInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref reader, options, out QuadrilateralInterface quadrilateralInterface); while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string propertyName = reader.GetString(); reader.Read(); switch (propertyName) { + default: + break; } } } @@ -177,6 +139,12 @@ namespace Org.OpenAPITools.Model /// /// /// - public override void Write(Utf8JsonWriter writer, ComplexQuadrilateral complexQuadrilateral, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, ComplexQuadrilateral complexQuadrilateral, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + + writer.WriteEndObject(); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/DanishPig.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/DanishPig.cs index fdcd66cce7..f0d02bc0b0 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/DanishPig.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/DanishPig.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,17 +26,24 @@ namespace Org.OpenAPITools.Model /// /// DanishPig /// - public partial class DanishPig : IEquatable, IValidatableObject + public partial class DanishPig : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// className (required) + /// className + [JsonConstructor] public DanishPig(string className) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + if (className == null) throw new ArgumentNullException("className is a required property for DanishPig and cannot be null."); +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + ClassName = className; } @@ -51,7 +57,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -66,48 +72,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as DanishPig).AreEqual; - } - - /// - /// Returns true if DanishPig instances are equal - /// - /// Instance of DanishPig to be compared - /// Boolean - public bool Equals(DanishPig input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ClassName != null) - { - hashCode = (hashCode * 59) + this.ClassName.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -119,4 +83,71 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type DanishPig + /// + public class DanishPigJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override DanishPig Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string className = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "className": + className = reader.GetString(); + break; + default: + break; + } + } + } + + return new DanishPig(className); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, DanishPig danishPig, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("className", danishPig.ClassName); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/DeprecatedObject.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/DeprecatedObject.cs index d04aa00655..c5e0f5e2ca 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/DeprecatedObject.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/DeprecatedObject.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,14 +26,24 @@ namespace Org.OpenAPITools.Model /// /// DeprecatedObject /// - public partial class DeprecatedObject : IEquatable, IValidatableObject + public partial class DeprecatedObject : IValidatableObject { /// /// Initializes a new instance of the class. /// /// name - public DeprecatedObject(string name = default) + [JsonConstructor] + public DeprecatedObject(string name) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (name == null) + throw new ArgumentNullException("name is a required property for DeprecatedObject and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + Name = name; } @@ -48,7 +57,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -63,48 +72,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as DeprecatedObject).AreEqual; - } - - /// - /// Returns true if DeprecatedObject instances are equal - /// - /// Instance of DeprecatedObject to be compared - /// Boolean - public bool Equals(DeprecatedObject input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -116,4 +83,71 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type DeprecatedObject + /// + public class DeprecatedObjectJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override DeprecatedObject Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string name = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "name": + name = reader.GetString(); + break; + default: + break; + } + } + } + + return new DeprecatedObject(name); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, DeprecatedObject deprecatedObject, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("name", deprecatedObject.Name); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Dog.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Dog.cs index e00bc00421..ad3da1cfd7 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Dog.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Dog.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,15 +26,16 @@ namespace Org.OpenAPITools.Model /// /// Dog /// - public partial class Dog : Animal, IEquatable + public partial class Dog : Animal, IValidatableObject { /// /// Initializes a new instance of the class. /// /// - /// className (required) + /// className /// color (default to "red") - public Dog(DogAllOf dogAllOf, string className, string color = "red") : base(className, color) + [JsonConstructor] + internal Dog(DogAllOf dogAllOf, string className, string color = "red") : base(className, color) { DogAllOf = dogAllOf; } @@ -57,40 +57,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Dog).AreEqual; - } - - /// - /// Returns true if Dog instances are equal - /// - /// Instance of Dog to be compared - /// Boolean - public bool Equals(Dog input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - return hashCode; - } - } - } /// @@ -98,13 +64,6 @@ namespace Org.OpenAPITools.Model /// public class DogJsonConverter : JsonConverter { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof(Dog).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -117,21 +76,26 @@ namespace Org.OpenAPITools.Model { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); + JsonTokenType startingTokenType = reader.TokenType; + Utf8JsonReader dogAllOfReader = reader; - bool dogAllOfDeserialized = Client.ClientUtils.TryDeserialize(ref dogAllOfReader, options, out DogAllOf dogAllOf); + bool dogAllOfDeserialized = Client.ClientUtils.TryDeserialize(ref reader, options, out DogAllOf dogAllOf); string className = default; string color = default; while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string propertyName = reader.GetString(); reader.Read(); @@ -144,6 +108,8 @@ namespace Org.OpenAPITools.Model case "color": color = reader.GetString(); break; + default: + break; } } } @@ -158,6 +124,14 @@ namespace Org.OpenAPITools.Model /// /// /// - public override void Write(Utf8JsonWriter writer, Dog dog, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, Dog dog, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("className", dog.ClassName); + writer.WriteString("color", dog.Color); + + writer.WriteEndObject(); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/DogAllOf.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/DogAllOf.cs index e35252fa26..2e3092d06b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/DogAllOf.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/DogAllOf.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,14 +26,24 @@ namespace Org.OpenAPITools.Model /// /// DogAllOf /// - public partial class DogAllOf : IEquatable, IValidatableObject + public partial class DogAllOf : IValidatableObject { /// /// Initializes a new instance of the class. /// /// breed - public DogAllOf(string breed = default) + [JsonConstructor] + public DogAllOf(string breed) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (breed == null) + throw new ArgumentNullException("breed is a required property for DogAllOf and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + Breed = breed; } @@ -48,7 +57,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -63,48 +72,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as DogAllOf).AreEqual; - } - - /// - /// Returns true if DogAllOf instances are equal - /// - /// Instance of DogAllOf to be compared - /// Boolean - public bool Equals(DogAllOf input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Breed != null) - { - hashCode = (hashCode * 59) + this.Breed.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -116,4 +83,71 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type DogAllOf + /// + public class DogAllOfJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override DogAllOf Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string breed = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "breed": + breed = reader.GetString(); + break; + default: + break; + } + } + } + + return new DogAllOf(breed); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, DogAllOf dogAllOf, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("breed", dogAllOf.Breed); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Drawing.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Drawing.cs index 4cb653c55d..6de00f1950 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Drawing.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Drawing.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,21 +26,37 @@ namespace Org.OpenAPITools.Model /// /// Drawing /// - public partial class Drawing : Dictionary, IEquatable, IValidatableObject + public partial class Drawing : Dictionary, IValidatableObject { /// /// Initializes a new instance of the class. /// /// mainShape /// shapeOrNull - /// nullableShape /// shapes - public Drawing(Shape mainShape = default, ShapeOrNull shapeOrNull = default, NullableShape nullableShape = default, List shapes = default) : base() + /// nullableShape + [JsonConstructor] + public Drawing(Shape mainShape, ShapeOrNull shapeOrNull, List shapes, NullableShape nullableShape = default) : base() { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (mainShape == null) + throw new ArgumentNullException("mainShape is a required property for Drawing and cannot be null."); + + if (shapeOrNull == null) + throw new ArgumentNullException("shapeOrNull is a required property for Drawing and cannot be null."); + + if (shapes == null) + throw new ArgumentNullException("shapes is a required property for Drawing and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + MainShape = mainShape; ShapeOrNull = shapeOrNull; - NullableShape = nullableShape; Shapes = shapes; + NullableShape = nullableShape; } /// @@ -56,18 +71,18 @@ namespace Org.OpenAPITools.Model [JsonPropertyName("shapeOrNull")] public ShapeOrNull ShapeOrNull { get; set; } - /// - /// Gets or Sets NullableShape - /// - [JsonPropertyName("nullableShape")] - public NullableShape NullableShape { get; set; } - /// /// Gets or Sets Shapes /// [JsonPropertyName("shapes")] public List Shapes { get; set; } + /// + /// Gets or Sets NullableShape + /// + [JsonPropertyName("nullableShape")] + public NullableShape NullableShape { get; set; } + /// /// Returns the string presentation of the object /// @@ -79,61 +94,11 @@ namespace Org.OpenAPITools.Model sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); sb.Append(" MainShape: ").Append(MainShape).Append("\n"); sb.Append(" ShapeOrNull: ").Append(ShapeOrNull).Append("\n"); - sb.Append(" NullableShape: ").Append(NullableShape).Append("\n"); sb.Append(" Shapes: ").Append(Shapes).Append("\n"); + sb.Append(" NullableShape: ").Append(NullableShape).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Drawing).AreEqual; - } - - /// - /// Returns true if Drawing instances are equal - /// - /// Instance of Drawing to be compared - /// Boolean - public bool Equals(Drawing input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.MainShape != null) - { - hashCode = (hashCode * 59) + this.MainShape.GetHashCode(); - } - if (this.ShapeOrNull != null) - { - hashCode = (hashCode * 59) + this.ShapeOrNull.GetHashCode(); - } - if (this.NullableShape != null) - { - hashCode = (hashCode * 59) + this.NullableShape.GetHashCode(); - } - if (this.Shapes != null) - { - hashCode = (hashCode * 59) + this.Shapes.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -145,4 +110,90 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type Drawing + /// + public class DrawingJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override Drawing Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + Shape mainShape = default; + ShapeOrNull shapeOrNull = default; + List shapes = default; + NullableShape nullableShape = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "mainShape": + mainShape = JsonSerializer.Deserialize(ref reader, options); + break; + case "shapeOrNull": + shapeOrNull = JsonSerializer.Deserialize(ref reader, options); + break; + case "shapes": + shapes = JsonSerializer.Deserialize>(ref reader, options); + break; + case "nullableShape": + nullableShape = JsonSerializer.Deserialize(ref reader, options); + break; + default: + break; + } + } + } + + return new Drawing(mainShape, shapeOrNull, shapes, nullableShape); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Drawing drawing, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WritePropertyName("mainShape"); + JsonSerializer.Serialize(writer, drawing.MainShape, options); + writer.WritePropertyName("shapeOrNull"); + JsonSerializer.Serialize(writer, drawing.ShapeOrNull, options); + writer.WritePropertyName("shapes"); + JsonSerializer.Serialize(writer, drawing.Shapes, options); + writer.WritePropertyName("nullableShape"); + JsonSerializer.Serialize(writer, drawing.NullableShape, options); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/EnumArrays.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/EnumArrays.cs index 92f07ad2ee..c6dcd8b5b2 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/EnumArrays.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/EnumArrays.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,17 +26,80 @@ namespace Org.OpenAPITools.Model /// /// EnumArrays /// - public partial class EnumArrays : IEquatable, IValidatableObject + public partial class EnumArrays : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// justSymbol /// arrayEnum - public EnumArrays(JustSymbolEnum justSymbol = default, List arrayEnum = default) + /// justSymbol + [JsonConstructor] + public EnumArrays(List arrayEnum, JustSymbolEnum justSymbol) { - JustSymbol = justSymbol; +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (justSymbol == null) + throw new ArgumentNullException("justSymbol is a required property for EnumArrays and cannot be null."); + + if (arrayEnum == null) + throw new ArgumentNullException("arrayEnum is a required property for EnumArrays and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + ArrayEnum = arrayEnum; + JustSymbol = justSymbol; + } + + /// + /// Defines ArrayEnum + /// + public enum ArrayEnumEnum + { + /// + /// Enum Fish for value: fish + /// + Fish = 1, + + /// + /// Enum Crab for value: crab + /// + Crab = 2 + + } + + /// + /// Returns a ArrayEnumEnum + /// + /// + /// + public static ArrayEnumEnum ArrayEnumEnumFromString(string value) + { + if (value == "fish") + return ArrayEnumEnum.Fish; + + if (value == "crab") + return ArrayEnumEnum.Crab; + + throw new NotImplementedException($"Could not convert value to type ArrayEnumEnum: '{value}'"); + } + + /// + /// Returns equivalent json value + /// + /// + /// + /// + public static string ArrayEnumEnumToJsonValue(ArrayEnumEnum value) + { + if (value == ArrayEnumEnum.Fish) + return "fish"; + + if (value == ArrayEnumEnum.Crab) + return "crab"; + + throw new NotImplementedException($"Value could not be handled: '{value}'"); } /// @@ -48,42 +110,54 @@ namespace Org.OpenAPITools.Model /// /// Enum GreaterThanOrEqualTo for value: >= /// - [EnumMember(Value = ">=")] GreaterThanOrEqualTo = 1, /// /// Enum Dollar for value: $ /// - [EnumMember(Value = "$")] Dollar = 2 } + /// + /// Returns a JustSymbolEnum + /// + /// + /// + public static JustSymbolEnum JustSymbolEnumFromString(string value) + { + if (value == ">=") + return JustSymbolEnum.GreaterThanOrEqualTo; + + if (value == "$") + return JustSymbolEnum.Dollar; + + throw new NotImplementedException($"Could not convert value to type JustSymbolEnum: '{value}'"); + } + + /// + /// Returns equivalent json value + /// + /// + /// + /// + public static string JustSymbolEnumToJsonValue(JustSymbolEnum value) + { + if (value == JustSymbolEnum.GreaterThanOrEqualTo) + return ">="; + + if (value == JustSymbolEnum.Dollar) + return "$"; + + throw new NotImplementedException($"Value could not be handled: '{value}'"); + } + /// /// Gets or Sets JustSymbol /// [JsonPropertyName("just_symbol")] public JustSymbolEnum JustSymbol { get; set; } - /// - /// Defines ArrayEnum - /// - public enum ArrayEnumEnum - { - /// - /// Enum Fish for value: fish - /// - [EnumMember(Value = "fish")] - Fish = 1, - - /// - /// Enum Crab for value: crab - /// - [EnumMember(Value = "crab")] - Crab = 2 - - } - /// /// Gets or Sets ArrayEnum /// @@ -94,7 +168,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -104,55 +178,12 @@ namespace Org.OpenAPITools.Model { StringBuilder sb = new StringBuilder(); sb.Append("class EnumArrays {\n"); - sb.Append(" JustSymbol: ").Append(JustSymbol).Append("\n"); sb.Append(" ArrayEnum: ").Append(ArrayEnum).Append("\n"); + sb.Append(" JustSymbol: ").Append(JustSymbol).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as EnumArrays).AreEqual; - } - - /// - /// Returns true if EnumArrays instances are equal - /// - /// Instance of EnumArrays to be compared - /// Boolean - public bool Equals(EnumArrays input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.JustSymbol.GetHashCode(); - if (this.ArrayEnum != null) - { - hashCode = (hashCode * 59) + this.ArrayEnum.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -164,4 +195,82 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type EnumArrays + /// + public class EnumArraysJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override EnumArrays Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + List arrayEnum = default; + EnumArrays.JustSymbolEnum justSymbol = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "array_enum": + arrayEnum = JsonSerializer.Deserialize>(ref reader, options); + break; + case "just_symbol": + string justSymbolRawValue = reader.GetString(); + justSymbol = EnumArrays.JustSymbolEnumFromString(justSymbolRawValue); + break; + default: + break; + } + } + } + + return new EnumArrays(arrayEnum, justSymbol); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, EnumArrays enumArrays, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WritePropertyName("array_enum"); + JsonSerializer.Serialize(writer, enumArrays.ArrayEnum, options); + var justSymbolRawValue = EnumArrays.JustSymbolEnumToJsonValue(enumArrays.JustSymbol); + if (justSymbolRawValue != null) + writer.WriteString("just_symbol", justSymbolRawValue); + else + writer.WriteNull("just_symbol"); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/EnumClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/EnumClass.cs index 390f7f6ea5..ac9fc84aad 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/EnumClass.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/EnumClass.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -32,20 +31,129 @@ namespace Org.OpenAPITools.Model /// /// Enum Abc for value: _abc /// - [EnumMember(Value = "_abc")] Abc = 1, /// /// Enum Efg for value: -efg /// - [EnumMember(Value = "-efg")] Efg = 2, /// /// Enum Xyz for value: (xyz) /// - [EnumMember(Value = "(xyz)")] Xyz = 3 } + + public class EnumClassConverter : JsonConverter + { + public static EnumClass FromString(string value) + { + if (value == "_abc") + return EnumClass.Abc; + + if (value == "-efg") + return EnumClass.Efg; + + if (value == "(xyz)") + return EnumClass.Xyz; + + throw new NotImplementedException($"Could not convert value to type EnumClass: '{value}'"); + } + + public static EnumClass? FromStringOrDefault(string value) + { + if (value == "_abc") + return EnumClass.Abc; + + if (value == "-efg") + return EnumClass.Efg; + + if (value == "(xyz)") + return EnumClass.Xyz; + + return null; + } + + public static string ToJsonValue(EnumClass value) + { + if (value == EnumClass.Abc) + return "_abc"; + + if (value == EnumClass.Efg) + return "-efg"; + + if (value == EnumClass.Xyz) + return "(xyz)"; + + throw new NotImplementedException($"Value could not be handled: '{value}'"); + } + + /// + /// Returns a from the Json object + /// + /// + /// + /// + /// + public override EnumClass Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string rawValue = reader.GetString(); + + EnumClass? result = EnumClassConverter.FromString(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the EnumClass to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, EnumClass enumClass, JsonSerializerOptions options) + { + writer.WriteStringValue(enumClass.ToString()); + } + } + + public class EnumClassNullableConverter : JsonConverter + { + /// + /// Returns a EnumClass from the Json object + /// + /// + /// + /// + /// + public override EnumClass? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string rawValue = reader.GetString(); + + if (rawValue == null) + return null; + + EnumClass? result = EnumClassConverter.FromString(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, EnumClass? enumClass, JsonSerializerOptions options) + { + writer.WriteStringValue(enumClass?.ToString() ?? "null"); + } + } + } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/EnumTest.cs index 273116bc03..42b07a1407 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/EnumTest.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,98 +26,64 @@ namespace Org.OpenAPITools.Model /// /// EnumTest /// - public partial class EnumTest : IEquatable, IValidatableObject + public partial class EnumTest : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// enumStringRequired (required) - /// enumString /// enumInteger /// enumIntegerOnly /// enumNumber - /// outerEnum - /// outerEnumInteger + /// enumString + /// enumStringRequired /// outerEnumDefaultValue + /// outerEnumInteger /// outerEnumIntegerDefaultValue - public EnumTest(EnumStringRequiredEnum enumStringRequired, EnumStringEnum enumString = default, EnumIntegerEnum enumInteger = default, EnumIntegerOnlyEnum enumIntegerOnly = default, EnumNumberEnum enumNumber = default, OuterEnum outerEnum = default, OuterEnumInteger outerEnumInteger = default, OuterEnumDefaultValue outerEnumDefaultValue = default, OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue = default) + /// outerEnum + [JsonConstructor] + public EnumTest(EnumIntegerEnum enumInteger, EnumIntegerOnlyEnum enumIntegerOnly, EnumNumberEnum enumNumber, EnumStringEnum enumString, EnumStringRequiredEnum enumStringRequired, OuterEnumDefaultValue outerEnumDefaultValue, OuterEnumInteger outerEnumInteger, OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue, OuterEnum? outerEnum = default) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (enumString == null) + throw new ArgumentNullException("enumString is a required property for EnumTest and cannot be null."); + if (enumStringRequired == null) throw new ArgumentNullException("enumStringRequired is a required property for EnumTest and cannot be null."); - EnumStringRequired = enumStringRequired; - EnumString = enumString; + if (enumInteger == null) + throw new ArgumentNullException("enumInteger is a required property for EnumTest and cannot be null."); + + if (enumIntegerOnly == null) + throw new ArgumentNullException("enumIntegerOnly is a required property for EnumTest and cannot be null."); + + if (enumNumber == null) + throw new ArgumentNullException("enumNumber is a required property for EnumTest and cannot be null."); + + if (outerEnumInteger == null) + throw new ArgumentNullException("outerEnumInteger is a required property for EnumTest and cannot be null."); + + if (outerEnumDefaultValue == null) + throw new ArgumentNullException("outerEnumDefaultValue is a required property for EnumTest and cannot be null."); + + if (outerEnumIntegerDefaultValue == null) + throw new ArgumentNullException("outerEnumIntegerDefaultValue is a required property for EnumTest and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + EnumInteger = enumInteger; EnumIntegerOnly = enumIntegerOnly; EnumNumber = enumNumber; - OuterEnum = outerEnum; - OuterEnumInteger = outerEnumInteger; + EnumString = enumString; + EnumStringRequired = enumStringRequired; OuterEnumDefaultValue = outerEnumDefaultValue; + OuterEnumInteger = outerEnumInteger; OuterEnumIntegerDefaultValue = outerEnumIntegerDefaultValue; + OuterEnum = outerEnum; } - /// - /// Defines EnumStringRequired - /// - public enum EnumStringRequiredEnum - { - /// - /// Enum UPPER for value: UPPER - /// - [EnumMember(Value = "UPPER")] - UPPER = 1, - - /// - /// Enum Lower for value: lower - /// - [EnumMember(Value = "lower")] - Lower = 2, - - /// - /// Enum Empty for value: - /// - [EnumMember(Value = "")] - Empty = 3 - - } - - /// - /// Gets or Sets EnumStringRequired - /// - [JsonPropertyName("enum_string_required")] - public EnumStringRequiredEnum EnumStringRequired { get; set; } - - /// - /// Defines EnumString - /// - public enum EnumStringEnum - { - /// - /// Enum UPPER for value: UPPER - /// - [EnumMember(Value = "UPPER")] - UPPER = 1, - - /// - /// Enum Lower for value: lower - /// - [EnumMember(Value = "lower")] - Lower = 2, - - /// - /// Enum Empty for value: - /// - [EnumMember(Value = "")] - Empty = 3 - - } - - /// - /// Gets or Sets EnumString - /// - [JsonPropertyName("enum_string")] - public EnumStringEnum EnumString { get; set; } - /// /// Defines EnumInteger /// @@ -136,6 +101,33 @@ namespace Org.OpenAPITools.Model } + /// + /// Returns a EnumIntegerEnum + /// + /// + /// + public static EnumIntegerEnum EnumIntegerEnumFromString(string value) + { + if (value == (1).ToString()) + return EnumIntegerEnum.NUMBER_1; + + if (value == (-1).ToString()) + return EnumIntegerEnum.NUMBER_MINUS_1; + + throw new NotImplementedException($"Could not convert value to type EnumIntegerEnum: '{value}'"); + } + + /// + /// Returns equivalent json value + /// + /// + /// + /// + public static int EnumIntegerEnumToJsonValue(EnumIntegerEnum value) + { + return (int) value; + } + /// /// Gets or Sets EnumInteger /// @@ -159,6 +151,33 @@ namespace Org.OpenAPITools.Model } + /// + /// Returns a EnumIntegerOnlyEnum + /// + /// + /// + public static EnumIntegerOnlyEnum EnumIntegerOnlyEnumFromString(string value) + { + if (value == (2).ToString()) + return EnumIntegerOnlyEnum.NUMBER_2; + + if (value == (-2).ToString()) + return EnumIntegerOnlyEnum.NUMBER_MINUS_2; + + throw new NotImplementedException($"Could not convert value to type EnumIntegerOnlyEnum: '{value}'"); + } + + /// + /// Returns equivalent json value + /// + /// + /// + /// + public static int EnumIntegerOnlyEnumToJsonValue(EnumIntegerOnlyEnum value) + { + return (int) value; + } + /// /// Gets or Sets EnumIntegerOnly /// @@ -173,17 +192,48 @@ namespace Org.OpenAPITools.Model /// /// Enum NUMBER_1_DOT_1 for value: 1.1 /// - [EnumMember(Value = "1.1")] NUMBER_1_DOT_1 = 1, /// /// Enum NUMBER_MINUS_1_DOT_2 for value: -1.2 /// - [EnumMember(Value = "-1.2")] NUMBER_MINUS_1_DOT_2 = 2 } + /// + /// Returns a EnumNumberEnum + /// + /// + /// + public static EnumNumberEnum EnumNumberEnumFromString(string value) + { + if (value == "1.1") + return EnumNumberEnum.NUMBER_1_DOT_1; + + if (value == "-1.2") + return EnumNumberEnum.NUMBER_MINUS_1_DOT_2; + + throw new NotImplementedException($"Could not convert value to type EnumNumberEnum: '{value}'"); + } + + /// + /// Returns equivalent json value + /// + /// + /// + /// + public static string EnumNumberEnumToJsonValue(EnumNumberEnum value) + { + if (value == EnumNumberEnum.NUMBER_1_DOT_1) + return "1.1"; + + if (value == EnumNumberEnum.NUMBER_MINUS_1_DOT_2) + return "-1.2"; + + throw new NotImplementedException($"Value could not be handled: '{value}'"); + } + /// /// Gets or Sets EnumNumber /// @@ -191,16 +241,138 @@ namespace Org.OpenAPITools.Model public EnumNumberEnum EnumNumber { get; set; } /// - /// Gets or Sets OuterEnum + /// Defines EnumString /// - [JsonPropertyName("outerEnum")] - public OuterEnum OuterEnum { get; set; } + public enum EnumStringEnum + { + /// + /// Enum UPPER for value: UPPER + /// + UPPER = 1, + + /// + /// Enum Lower for value: lower + /// + Lower = 2, + + /// + /// Enum Empty for value: + /// + Empty = 3 + + } /// - /// Gets or Sets OuterEnumInteger + /// Returns a EnumStringEnum /// - [JsonPropertyName("outerEnumInteger")] - public OuterEnumInteger OuterEnumInteger { get; set; } + /// + /// + public static EnumStringEnum EnumStringEnumFromString(string value) + { + if (value == "UPPER") + return EnumStringEnum.UPPER; + + if (value == "lower") + return EnumStringEnum.Lower; + + if (value == "") + return EnumStringEnum.Empty; + + throw new NotImplementedException($"Could not convert value to type EnumStringEnum: '{value}'"); + } + + /// + /// Returns equivalent json value + /// + /// + /// + /// + public static string EnumStringEnumToJsonValue(EnumStringEnum value) + { + if (value == EnumStringEnum.UPPER) + return "UPPER"; + + if (value == EnumStringEnum.Lower) + return "lower"; + + if (value == EnumStringEnum.Empty) + return ""; + + throw new NotImplementedException($"Value could not be handled: '{value}'"); + } + + /// + /// Gets or Sets EnumString + /// + [JsonPropertyName("enum_string")] + public EnumStringEnum EnumString { get; set; } + + /// + /// Defines EnumStringRequired + /// + public enum EnumStringRequiredEnum + { + /// + /// Enum UPPER for value: UPPER + /// + UPPER = 1, + + /// + /// Enum Lower for value: lower + /// + Lower = 2, + + /// + /// Enum Empty for value: + /// + Empty = 3 + + } + + /// + /// Returns a EnumStringRequiredEnum + /// + /// + /// + public static EnumStringRequiredEnum EnumStringRequiredEnumFromString(string value) + { + if (value == "UPPER") + return EnumStringRequiredEnum.UPPER; + + if (value == "lower") + return EnumStringRequiredEnum.Lower; + + if (value == "") + return EnumStringRequiredEnum.Empty; + + throw new NotImplementedException($"Could not convert value to type EnumStringRequiredEnum: '{value}'"); + } + + /// + /// Returns equivalent json value + /// + /// + /// + /// + public static string EnumStringRequiredEnumToJsonValue(EnumStringRequiredEnum value) + { + if (value == EnumStringRequiredEnum.UPPER) + return "UPPER"; + + if (value == EnumStringRequiredEnum.Lower) + return "lower"; + + if (value == EnumStringRequiredEnum.Empty) + return ""; + + throw new NotImplementedException($"Value could not be handled: '{value}'"); + } + + /// + /// Gets or Sets EnumStringRequired + /// + [JsonPropertyName("enum_string_required")] + public EnumStringRequiredEnum EnumStringRequired { get; set; } /// /// Gets or Sets OuterEnumDefaultValue @@ -208,17 +380,29 @@ namespace Org.OpenAPITools.Model [JsonPropertyName("outerEnumDefaultValue")] public OuterEnumDefaultValue OuterEnumDefaultValue { get; set; } + /// + /// Gets or Sets OuterEnumInteger + /// + [JsonPropertyName("outerEnumInteger")] + public OuterEnumInteger OuterEnumInteger { get; set; } + /// /// Gets or Sets OuterEnumIntegerDefaultValue /// [JsonPropertyName("outerEnumIntegerDefaultValue")] public OuterEnumIntegerDefaultValue OuterEnumIntegerDefaultValue { get; set; } + /// + /// Gets or Sets OuterEnum + /// + [JsonPropertyName("outerEnum")] + public OuterEnum? OuterEnum { get; set; } + /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -228,66 +412,19 @@ namespace Org.OpenAPITools.Model { StringBuilder sb = new StringBuilder(); sb.Append("class EnumTest {\n"); - sb.Append(" EnumStringRequired: ").Append(EnumStringRequired).Append("\n"); - sb.Append(" EnumString: ").Append(EnumString).Append("\n"); sb.Append(" EnumInteger: ").Append(EnumInteger).Append("\n"); sb.Append(" EnumIntegerOnly: ").Append(EnumIntegerOnly).Append("\n"); sb.Append(" EnumNumber: ").Append(EnumNumber).Append("\n"); - sb.Append(" OuterEnum: ").Append(OuterEnum).Append("\n"); - sb.Append(" OuterEnumInteger: ").Append(OuterEnumInteger).Append("\n"); + sb.Append(" EnumString: ").Append(EnumString).Append("\n"); + sb.Append(" EnumStringRequired: ").Append(EnumStringRequired).Append("\n"); sb.Append(" OuterEnumDefaultValue: ").Append(OuterEnumDefaultValue).Append("\n"); + sb.Append(" OuterEnumInteger: ").Append(OuterEnumInteger).Append("\n"); sb.Append(" OuterEnumIntegerDefaultValue: ").Append(OuterEnumIntegerDefaultValue).Append("\n"); + sb.Append(" OuterEnum: ").Append(OuterEnum).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as EnumTest).AreEqual; - } - - /// - /// Returns true if EnumTest instances are equal - /// - /// Instance of EnumTest to be compared - /// Boolean - public bool Equals(EnumTest input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.EnumStringRequired.GetHashCode(); - hashCode = (hashCode * 59) + this.EnumString.GetHashCode(); - hashCode = (hashCode * 59) + this.EnumInteger.GetHashCode(); - hashCode = (hashCode * 59) + this.EnumIntegerOnly.GetHashCode(); - hashCode = (hashCode * 59) + this.EnumNumber.GetHashCode(); - hashCode = (hashCode * 59) + this.OuterEnum.GetHashCode(); - hashCode = (hashCode * 59) + this.OuterEnumInteger.GetHashCode(); - hashCode = (hashCode * 59) + this.OuterEnumDefaultValue.GetHashCode(); - hashCode = (hashCode * 59) + this.OuterEnumIntegerDefaultValue.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -299,4 +436,143 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type EnumTest + /// + public class EnumTestJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override EnumTest Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + EnumTest.EnumIntegerEnum enumInteger = default; + EnumTest.EnumIntegerOnlyEnum enumIntegerOnly = default; + EnumTest.EnumNumberEnum enumNumber = default; + EnumTest.EnumStringEnum enumString = default; + EnumTest.EnumStringRequiredEnum enumStringRequired = default; + OuterEnumDefaultValue outerEnumDefaultValue = default; + OuterEnumInteger outerEnumInteger = default; + OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue = default; + OuterEnum? outerEnum = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "enum_integer": + enumInteger = (EnumTest.EnumIntegerEnum) reader.GetInt32(); + break; + case "enum_integer_only": + enumIntegerOnly = (EnumTest.EnumIntegerOnlyEnum) reader.GetInt32(); + break; + case "enum_number": + enumNumber = (EnumTest.EnumNumberEnum) reader.GetInt32(); + break; + case "enum_string": + string enumStringRawValue = reader.GetString(); + enumString = EnumTest.EnumStringEnumFromString(enumStringRawValue); + break; + case "enum_string_required": + string enumStringRequiredRawValue = reader.GetString(); + enumStringRequired = EnumTest.EnumStringRequiredEnumFromString(enumStringRequiredRawValue); + break; + case "outerEnumDefaultValue": + string outerEnumDefaultValueRawValue = reader.GetString(); + outerEnumDefaultValue = OuterEnumDefaultValueConverter.FromString(outerEnumDefaultValueRawValue); + break; + case "outerEnumInteger": + string outerEnumIntegerRawValue = reader.GetString(); + outerEnumInteger = OuterEnumIntegerConverter.FromString(outerEnumIntegerRawValue); + break; + case "outerEnumIntegerDefaultValue": + string outerEnumIntegerDefaultValueRawValue = reader.GetString(); + outerEnumIntegerDefaultValue = OuterEnumIntegerDefaultValueConverter.FromString(outerEnumIntegerDefaultValueRawValue); + break; + case "outerEnum": + string outerEnumRawValue = reader.GetString(); + outerEnum = OuterEnumConverter.FromStringOrDefault(outerEnumRawValue); + break; + default: + break; + } + } + } + + return new EnumTest(enumInteger, enumIntegerOnly, enumNumber, enumString, enumStringRequired, outerEnumDefaultValue, outerEnumInteger, outerEnumIntegerDefaultValue, outerEnum); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, EnumTest enumTest, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteNumber("enum_integer", (int)enumTest.EnumInteger); + writer.WriteNumber("enum_integer_only", (int)enumTest.EnumIntegerOnly); + writer.WriteNumber("enum_number", (int)enumTest.EnumNumber); + var enumStringRawValue = EnumTest.EnumStringEnumToJsonValue(enumTest.EnumString); + if (enumStringRawValue != null) + writer.WriteString("enum_string", enumStringRawValue); + else + writer.WriteNull("enum_string"); + var enumStringRequiredRawValue = EnumTest.EnumStringRequiredEnumToJsonValue(enumTest.EnumStringRequired); + if (enumStringRequiredRawValue != null) + writer.WriteString("enum_string_required", enumStringRequiredRawValue); + else + writer.WriteNull("enum_string_required"); + var outerEnumDefaultValueRawValue = OuterEnumDefaultValueConverter.ToJsonValue(enumTest.OuterEnumDefaultValue); + if (outerEnumDefaultValueRawValue != null) + writer.WriteString("outerEnumDefaultValue", outerEnumDefaultValueRawValue); + else + writer.WriteNull("outerEnumDefaultValue"); + var outerEnumIntegerRawValue = OuterEnumIntegerConverter.ToJsonValue(enumTest.OuterEnumInteger); + if (outerEnumIntegerRawValue != null) + writer.WriteNumber("outerEnumInteger", outerEnumIntegerRawValue); + else + writer.WriteNull("outerEnumInteger"); + var outerEnumIntegerDefaultValueRawValue = OuterEnumIntegerDefaultValueConverter.ToJsonValue(enumTest.OuterEnumIntegerDefaultValue); + if (outerEnumIntegerDefaultValueRawValue != null) + writer.WriteNumber("outerEnumIntegerDefaultValue", outerEnumIntegerDefaultValueRawValue); + else + writer.WriteNull("outerEnumIntegerDefaultValue"); + if (enumTest.OuterEnum == null) + writer.WriteNull("outerEnum"); + var outerEnumRawValue = OuterEnumConverter.ToJsonValue(enumTest.OuterEnum.Value); + if (outerEnumRawValue != null) + writer.WriteString("outerEnum", outerEnumRawValue); + else + writer.WriteNull("outerEnum"); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/EquilateralTriangle.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/EquilateralTriangle.cs index e6fc1aa4f3..c4d54d076a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/EquilateralTriangle.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/EquilateralTriangle.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,14 +26,15 @@ namespace Org.OpenAPITools.Model /// /// EquilateralTriangle /// - public partial class EquilateralTriangle : IEquatable, IValidatableObject + public partial class EquilateralTriangle : IValidatableObject { /// /// Initializes a new instance of the class. /// /// /// - public EquilateralTriangle(ShapeInterface shapeInterface, TriangleInterface triangleInterface) + [JsonConstructor] + internal EquilateralTriangle(ShapeInterface shapeInterface, TriangleInterface triangleInterface) { ShapeInterface = shapeInterface; TriangleInterface = triangleInterface; @@ -54,7 +54,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -68,44 +68,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as EquilateralTriangle).AreEqual; - } - - /// - /// Returns true if EquilateralTriangle instances are equal - /// - /// Instance of EquilateralTriangle to be compared - /// Boolean - public bool Equals(EquilateralTriangle input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -122,13 +84,6 @@ namespace Org.OpenAPITools.Model /// public class EquilateralTriangleJsonConverter : JsonConverter { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof(EquilateralTriangle).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -141,28 +96,35 @@ namespace Org.OpenAPITools.Model { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); + JsonTokenType startingTokenType = reader.TokenType; + Utf8JsonReader shapeInterfaceReader = reader; - bool shapeInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref shapeInterfaceReader, options, out ShapeInterface shapeInterface); + bool shapeInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref reader, options, out ShapeInterface shapeInterface); Utf8JsonReader triangleInterfaceReader = reader; - bool triangleInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref triangleInterfaceReader, options, out TriangleInterface triangleInterface); + bool triangleInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref reader, options, out TriangleInterface triangleInterface); while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string propertyName = reader.GetString(); reader.Read(); switch (propertyName) { + default: + break; } } } @@ -177,6 +139,12 @@ namespace Org.OpenAPITools.Model /// /// /// - public override void Write(Utf8JsonWriter writer, EquilateralTriangle equilateralTriangle, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, EquilateralTriangle equilateralTriangle, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + + writer.WriteEndObject(); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/File.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/File.cs index 86163355ea..5762b5a528 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/File.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/File.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,14 +26,24 @@ namespace Org.OpenAPITools.Model /// /// Must be named `File` for test. /// - public partial class File : IEquatable, IValidatableObject + public partial class File : IValidatableObject { /// /// Initializes a new instance of the class. /// /// Test capitalization - public File(string sourceURI = default) + [JsonConstructor] + public File(string sourceURI) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (sourceURI == null) + throw new ArgumentNullException("sourceURI is a required property for File and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + SourceURI = sourceURI; } @@ -49,7 +58,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -64,48 +73,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as File).AreEqual; - } - - /// - /// Returns true if File instances are equal - /// - /// Instance of File to be compared - /// Boolean - public bool Equals(File input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.SourceURI != null) - { - hashCode = (hashCode * 59) + this.SourceURI.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -117,4 +84,71 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type File + /// + public class FileJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override File Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string sourceURI = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "sourceURI": + sourceURI = reader.GetString(); + break; + default: + break; + } + } + } + + return new File(sourceURI); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, File file, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("sourceURI", file.SourceURI); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs index 366ead31ee..d71951f5df 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,15 +26,28 @@ namespace Org.OpenAPITools.Model /// /// FileSchemaTestClass /// - public partial class FileSchemaTestClass : IEquatable, IValidatableObject + public partial class FileSchemaTestClass : IValidatableObject { /// /// Initializes a new instance of the class. /// /// file /// files - public FileSchemaTestClass(File file = default, List files = default) + [JsonConstructor] + public FileSchemaTestClass(File file, List files) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (file == null) + throw new ArgumentNullException("file is a required property for FileSchemaTestClass and cannot be null."); + + if (files == null) + throw new ArgumentNullException("files is a required property for FileSchemaTestClass and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + File = file; Files = files; } @@ -56,7 +68,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -72,52 +84,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as FileSchemaTestClass).AreEqual; - } - - /// - /// Returns true if FileSchemaTestClass instances are equal - /// - /// Instance of FileSchemaTestClass to be compared - /// Boolean - public bool Equals(FileSchemaTestClass input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.File != null) - { - hashCode = (hashCode * 59) + this.File.GetHashCode(); - } - if (this.Files != null) - { - hashCode = (hashCode * 59) + this.Files.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -129,4 +95,78 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type FileSchemaTestClass + /// + public class FileSchemaTestClassJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override FileSchemaTestClass Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + File file = default; + List files = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "file": + file = JsonSerializer.Deserialize(ref reader, options); + break; + case "files": + files = JsonSerializer.Deserialize>(ref reader, options); + break; + default: + break; + } + } + } + + return new FileSchemaTestClass(file, files); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, FileSchemaTestClass fileSchemaTestClass, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WritePropertyName("file"); + JsonSerializer.Serialize(writer, fileSchemaTestClass.File, options); + writer.WritePropertyName("files"); + JsonSerializer.Serialize(writer, fileSchemaTestClass.Files, options); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Foo.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Foo.cs index 8be5cfe140..57810a84fe 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Foo.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Foo.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,14 +26,24 @@ namespace Org.OpenAPITools.Model /// /// Foo /// - public partial class Foo : IEquatable, IValidatableObject + public partial class Foo : IValidatableObject { /// /// Initializes a new instance of the class. /// /// bar (default to "bar") + [JsonConstructor] public Foo(string bar = "bar") { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (bar == null) + throw new ArgumentNullException("bar is a required property for Foo and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + Bar = bar; } @@ -48,7 +57,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -63,48 +72,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Foo).AreEqual; - } - - /// - /// Returns true if Foo instances are equal - /// - /// Instance of Foo to be compared - /// Boolean - public bool Equals(Foo input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Bar != null) - { - hashCode = (hashCode * 59) + this.Bar.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -116,4 +83,71 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type Foo + /// + public class FooJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override Foo Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string bar = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "bar": + bar = reader.GetString(); + break; + default: + break; + } + } + } + + return new Foo(bar); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Foo foo, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("bar", foo.Bar); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs index e32cb9257e..a17a59ac54 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,28 +26,38 @@ namespace Org.OpenAPITools.Model /// /// FooGetDefaultResponse /// - public partial class FooGetDefaultResponse : IEquatable, IValidatableObject + public partial class FooGetDefaultResponse : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// _string - public FooGetDefaultResponse(Foo _string = default) + /// stringProperty + [JsonConstructor] + public FooGetDefaultResponse(Foo stringProperty) { - String = _string; +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (stringProperty == null) + throw new ArgumentNullException("stringProperty is a required property for FooGetDefaultResponse and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + StringProperty = stringProperty; } /// - /// Gets or Sets String + /// Gets or Sets StringProperty /// [JsonPropertyName("string")] - public Foo String { get; set; } + public Foo StringProperty { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -58,53 +67,11 @@ namespace Org.OpenAPITools.Model { StringBuilder sb = new StringBuilder(); sb.Append("class FooGetDefaultResponse {\n"); - sb.Append(" String: ").Append(String).Append("\n"); + sb.Append(" StringProperty: ").Append(StringProperty).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as FooGetDefaultResponse).AreEqual; - } - - /// - /// Returns true if FooGetDefaultResponse instances are equal - /// - /// Instance of FooGetDefaultResponse to be compared - /// Boolean - public bool Equals(FooGetDefaultResponse input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.String != null) - { - hashCode = (hashCode * 59) + this.String.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -116,4 +83,72 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type FooGetDefaultResponse + /// + public class FooGetDefaultResponseJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override FooGetDefaultResponse Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + Foo stringProperty = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "string": + stringProperty = JsonSerializer.Deserialize(ref reader, options); + break; + default: + break; + } + } + } + + return new FooGetDefaultResponse(stringProperty); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, FooGetDefaultResponse fooGetDefaultResponse, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WritePropertyName("string"); + JsonSerializer.Serialize(writer, fooGetDefaultResponse.StringProperty, options); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/FormatTest.cs index a767556f46..f3b4b2a994 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/FormatTest.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,70 +26,113 @@ namespace Org.OpenAPITools.Model /// /// FormatTest /// - public partial class FormatTest : IEquatable, IValidatableObject + public partial class FormatTest : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// number (required) - /// _byte (required) - /// date (required) - /// password (required) - /// integer + /// binary + /// byteProperty + /// date + /// dateTime + /// decimalProperty + /// doubleProperty + /// floatProperty /// int32 /// int64 - /// _float - /// _double - /// _decimal - /// _string - /// binary - /// dateTime - /// uuid + /// integer + /// number + /// password /// A string that is a 10 digit number. Can have leading zeros. /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. - public FormatTest(decimal number, byte[] _byte, DateTime date, string password, int integer = default, int int32 = default, long int64 = default, float _float = default, double _double = default, decimal _decimal = default, string _string = default, System.IO.Stream binary = default, DateTime dateTime = default, Guid uuid = default, string patternWithDigits = default, string patternWithDigitsAndDelimiter = default) + /// stringProperty + /// uuid + [JsonConstructor] + public FormatTest(System.IO.Stream binary, byte[] byteProperty, DateTime date, DateTime dateTime, decimal decimalProperty, double doubleProperty, float floatProperty, int int32, long int64, int integer, decimal number, string password, string patternWithDigits, string patternWithDigitsAndDelimiter, string stringProperty, Guid uuid) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (integer == null) + throw new ArgumentNullException("integer is a required property for FormatTest and cannot be null."); + + if (int32 == null) + throw new ArgumentNullException("int32 is a required property for FormatTest and cannot be null."); + + if (int64 == null) + throw new ArgumentNullException("int64 is a required property for FormatTest and cannot be null."); + if (number == null) throw new ArgumentNullException("number is a required property for FormatTest and cannot be null."); - if (_byte == null) - throw new ArgumentNullException("_byte is a required property for FormatTest and cannot be null."); + if (floatProperty == null) + throw new ArgumentNullException("floatProperty is a required property for FormatTest and cannot be null."); + + if (doubleProperty == null) + throw new ArgumentNullException("doubleProperty is a required property for FormatTest and cannot be null."); + + if (decimalProperty == null) + throw new ArgumentNullException("decimalProperty is a required property for FormatTest and cannot be null."); + + if (stringProperty == null) + throw new ArgumentNullException("stringProperty is a required property for FormatTest and cannot be null."); + + if (byteProperty == null) + throw new ArgumentNullException("byteProperty is a required property for FormatTest and cannot be null."); + + if (binary == null) + throw new ArgumentNullException("binary is a required property for FormatTest and cannot be null."); if (date == null) throw new ArgumentNullException("date is a required property for FormatTest and cannot be null."); + if (dateTime == null) + throw new ArgumentNullException("dateTime is a required property for FormatTest and cannot be null."); + + if (uuid == null) + throw new ArgumentNullException("uuid is a required property for FormatTest and cannot be null."); + if (password == null) throw new ArgumentNullException("password is a required property for FormatTest and cannot be null."); - Number = number; - Byte = _byte; + if (patternWithDigits == null) + throw new ArgumentNullException("patternWithDigits is a required property for FormatTest and cannot be null."); + + if (patternWithDigitsAndDelimiter == null) + throw new ArgumentNullException("patternWithDigitsAndDelimiter is a required property for FormatTest and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + Binary = binary; + ByteProperty = byteProperty; Date = date; - Password = password; - Integer = integer; + DateTime = dateTime; + DecimalProperty = decimalProperty; + DoubleProperty = doubleProperty; + FloatProperty = floatProperty; Int32 = int32; Int64 = int64; - Float = _float; - Double = _double; - Decimal = _decimal; - String = _string; - Binary = binary; - DateTime = dateTime; - Uuid = uuid; + Integer = integer; + Number = number; + Password = password; PatternWithDigits = patternWithDigits; PatternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; + StringProperty = stringProperty; + Uuid = uuid; } /// - /// Gets or Sets Number + /// Gets or Sets Binary /// - [JsonPropertyName("number")] - public decimal Number { get; set; } + [JsonPropertyName("binary")] + public System.IO.Stream Binary { get; set; } /// - /// Gets or Sets Byte + /// Gets or Sets ByteProperty /// [JsonPropertyName("byte")] - public byte[] Byte { get; set; } + public byte[] ByteProperty { get; set; } /// /// Gets or Sets Date @@ -99,16 +141,28 @@ namespace Org.OpenAPITools.Model public DateTime Date { get; set; } /// - /// Gets or Sets Password + /// Gets or Sets DateTime /// - [JsonPropertyName("password")] - public string Password { get; set; } + [JsonPropertyName("dateTime")] + public DateTime DateTime { get; set; } /// - /// Gets or Sets Integer + /// Gets or Sets DecimalProperty /// - [JsonPropertyName("integer")] - public int Integer { get; set; } + [JsonPropertyName("decimal")] + public decimal DecimalProperty { get; set; } + + /// + /// Gets or Sets DoubleProperty + /// + [JsonPropertyName("double")] + public double DoubleProperty { get; set; } + + /// + /// Gets or Sets FloatProperty + /// + [JsonPropertyName("float")] + public float FloatProperty { get; set; } /// /// Gets or Sets Int32 @@ -123,46 +177,22 @@ namespace Org.OpenAPITools.Model public long Int64 { get; set; } /// - /// Gets or Sets Float + /// Gets or Sets Integer /// - [JsonPropertyName("float")] - public float Float { get; set; } + [JsonPropertyName("integer")] + public int Integer { get; set; } /// - /// Gets or Sets Double + /// Gets or Sets Number /// - [JsonPropertyName("double")] - public double Double { get; set; } + [JsonPropertyName("number")] + public decimal Number { get; set; } /// - /// Gets or Sets Decimal + /// Gets or Sets Password /// - [JsonPropertyName("decimal")] - public decimal Decimal { get; set; } - - /// - /// Gets or Sets String - /// - [JsonPropertyName("string")] - public string String { get; set; } - - /// - /// Gets or Sets Binary - /// - [JsonPropertyName("binary")] - public System.IO.Stream Binary { get; set; } - - /// - /// Gets or Sets DateTime - /// - [JsonPropertyName("dateTime")] - public DateTime DateTime { get; set; } - - /// - /// Gets or Sets Uuid - /// - [JsonPropertyName("uuid")] - public Guid Uuid { get; set; } + [JsonPropertyName("password")] + public string Password { get; set; } /// /// A string that is a 10 digit number. Can have leading zeros. @@ -178,11 +208,23 @@ namespace Org.OpenAPITools.Model [JsonPropertyName("pattern_with_digits_and_delimiter")] public string PatternWithDigitsAndDelimiter { get; set; } + /// + /// Gets or Sets StringProperty + /// + [JsonPropertyName("string")] + public string StringProperty { get; set; } + + /// + /// Gets or Sets Uuid + /// + [JsonPropertyName("uuid")] + public Guid Uuid { get; set; } + /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -192,107 +234,26 @@ namespace Org.OpenAPITools.Model { StringBuilder sb = new StringBuilder(); sb.Append("class FormatTest {\n"); - sb.Append(" Number: ").Append(Number).Append("\n"); - sb.Append(" Byte: ").Append(Byte).Append("\n"); + sb.Append(" Binary: ").Append(Binary).Append("\n"); + sb.Append(" ByteProperty: ").Append(ByteProperty).Append("\n"); sb.Append(" Date: ").Append(Date).Append("\n"); - sb.Append(" Password: ").Append(Password).Append("\n"); - sb.Append(" Integer: ").Append(Integer).Append("\n"); + sb.Append(" DateTime: ").Append(DateTime).Append("\n"); + sb.Append(" DecimalProperty: ").Append(DecimalProperty).Append("\n"); + sb.Append(" DoubleProperty: ").Append(DoubleProperty).Append("\n"); + sb.Append(" FloatProperty: ").Append(FloatProperty).Append("\n"); sb.Append(" Int32: ").Append(Int32).Append("\n"); sb.Append(" Int64: ").Append(Int64).Append("\n"); - sb.Append(" Float: ").Append(Float).Append("\n"); - sb.Append(" Double: ").Append(Double).Append("\n"); - sb.Append(" Decimal: ").Append(Decimal).Append("\n"); - sb.Append(" String: ").Append(String).Append("\n"); - sb.Append(" Binary: ").Append(Binary).Append("\n"); - sb.Append(" DateTime: ").Append(DateTime).Append("\n"); - sb.Append(" Uuid: ").Append(Uuid).Append("\n"); + sb.Append(" Integer: ").Append(Integer).Append("\n"); + sb.Append(" Number: ").Append(Number).Append("\n"); + sb.Append(" Password: ").Append(Password).Append("\n"); sb.Append(" PatternWithDigits: ").Append(PatternWithDigits).Append("\n"); sb.Append(" PatternWithDigitsAndDelimiter: ").Append(PatternWithDigitsAndDelimiter).Append("\n"); + sb.Append(" StringProperty: ").Append(StringProperty).Append("\n"); + sb.Append(" Uuid: ").Append(Uuid).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as FormatTest).AreEqual; - } - - /// - /// Returns true if FormatTest instances are equal - /// - /// Instance of FormatTest to be compared - /// Boolean - public bool Equals(FormatTest input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Number.GetHashCode(); - if (this.Byte != null) - { - hashCode = (hashCode * 59) + this.Byte.GetHashCode(); - } - if (this.Date != null) - { - hashCode = (hashCode * 59) + this.Date.GetHashCode(); - } - if (this.Password != null) - { - hashCode = (hashCode * 59) + this.Password.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Integer.GetHashCode(); - hashCode = (hashCode * 59) + this.Int32.GetHashCode(); - hashCode = (hashCode * 59) + this.Int64.GetHashCode(); - hashCode = (hashCode * 59) + this.Float.GetHashCode(); - hashCode = (hashCode * 59) + this.Double.GetHashCode(); - hashCode = (hashCode * 59) + this.Decimal.GetHashCode(); - if (this.String != null) - { - hashCode = (hashCode * 59) + this.String.GetHashCode(); - } - if (this.Binary != null) - { - hashCode = (hashCode * 59) + this.Binary.GetHashCode(); - } - if (this.DateTime != null) - { - hashCode = (hashCode * 59) + this.DateTime.GetHashCode(); - } - if (this.Uuid != null) - { - hashCode = (hashCode * 59) + this.Uuid.GetHashCode(); - } - if (this.PatternWithDigits != null) - { - hashCode = (hashCode * 59) + this.PatternWithDigits.GetHashCode(); - } - if (this.PatternWithDigitsAndDelimiter != null) - { - hashCode = (hashCode * 59) + this.PatternWithDigitsAndDelimiter.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -300,6 +261,54 @@ namespace Org.OpenAPITools.Model /// Validation Result public IEnumerable Validate(ValidationContext validationContext) { + // DoubleProperty (double) maximum + if (this.DoubleProperty > (double)123.4) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for DoubleProperty, must be a value less than or equal to 123.4.", new [] { "DoubleProperty" }); + } + + // DoubleProperty (double) minimum + if (this.DoubleProperty < (double)67.8) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for DoubleProperty, must be a value greater than or equal to 67.8.", new [] { "DoubleProperty" }); + } + + // FloatProperty (float) maximum + if (this.FloatProperty > (float)987.6) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for FloatProperty, must be a value less than or equal to 987.6.", new [] { "FloatProperty" }); + } + + // FloatProperty (float) minimum + if (this.FloatProperty < (float)54.3) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for FloatProperty, must be a value greater than or equal to 54.3.", new [] { "FloatProperty" }); + } + + // Int32 (int) maximum + if (this.Int32 > (int)200) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Int32, must be a value less than or equal to 200.", new [] { "Int32" }); + } + + // Int32 (int) minimum + if (this.Int32 < (int)20) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Int32, must be a value greater than or equal to 20.", new [] { "Int32" }); + } + + // Integer (int) maximum + if (this.Integer > (int)100) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Integer, must be a value less than or equal to 100.", new [] { "Integer" }); + } + + // Integer (int) minimum + if (this.Integer < (int)10) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Integer, must be a value greater than or equal to 10.", new [] { "Integer" }); + } + // Number (decimal) maximum if (this.Number > (decimal)543.2) { @@ -324,61 +333,6 @@ namespace Org.OpenAPITools.Model yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Password, length must be greater than 10.", new [] { "Password" }); } - // Integer (int) maximum - if (this.Integer > (int)100) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Integer, must be a value less than or equal to 100.", new [] { "Integer" }); - } - - // Integer (int) minimum - if (this.Integer < (int)10) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Integer, must be a value greater than or equal to 10.", new [] { "Integer" }); - } - - // Int32 (int) maximum - if (this.Int32 > (int)200) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Int32, must be a value less than or equal to 200.", new [] { "Int32" }); - } - - // Int32 (int) minimum - if (this.Int32 < (int)20) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Int32, must be a value greater than or equal to 20.", new [] { "Int32" }); - } - - // Float (float) maximum - if (this.Float > (float)987.6) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Float, must be a value less than or equal to 987.6.", new [] { "Float" }); - } - - // Float (float) minimum - if (this.Float < (float)54.3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Float, must be a value greater than or equal to 54.3.", new [] { "Float" }); - } - - // Double (double) maximum - if (this.Double > (double)123.4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Double, must be a value less than or equal to 123.4.", new [] { "Double" }); - } - - // Double (double) minimum - if (this.Double < (double)67.8) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Double, must be a value greater than or equal to 67.8.", new [] { "Double" }); - } - - // String (string) pattern - Regex regexString = new Regex(@"[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); - if (false == regexString.Match(this.String).Success) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for String, must match a pattern of " + regexString, new [] { "String" }); - } - // PatternWithDigits (string) pattern Regex regexPatternWithDigits = new Regex(@"^\\d{10}$", RegexOptions.CultureInvariant); if (false == regexPatternWithDigits.Match(this.PatternWithDigits).Success) @@ -393,8 +347,162 @@ namespace Org.OpenAPITools.Model yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PatternWithDigitsAndDelimiter, must match a pattern of " + regexPatternWithDigitsAndDelimiter, new [] { "PatternWithDigitsAndDelimiter" }); } + // StringProperty (string) pattern + Regex regexStringProperty = new Regex(@"[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); + if (false == regexStringProperty.Match(this.StringProperty).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StringProperty, must match a pattern of " + regexStringProperty, new [] { "StringProperty" }); + } + yield break; } } + /// + /// A Json converter for type FormatTest + /// + public class FormatTestJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override FormatTest Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + System.IO.Stream binary = default; + byte[] byteProperty = default; + DateTime date = default; + DateTime dateTime = default; + decimal decimalProperty = default; + double doubleProperty = default; + float floatProperty = default; + int int32 = default; + long int64 = default; + int integer = default; + decimal number = default; + string password = default; + string patternWithDigits = default; + string patternWithDigitsAndDelimiter = default; + string stringProperty = default; + Guid uuid = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "binary": + binary = JsonSerializer.Deserialize(ref reader, options); + break; + case "byte": + byteProperty = JsonSerializer.Deserialize(ref reader, options); + break; + case "date": + date = JsonSerializer.Deserialize(ref reader, options); + break; + case "dateTime": + dateTime = JsonSerializer.Deserialize(ref reader, options); + break; + case "decimal": + decimalProperty = JsonSerializer.Deserialize(ref reader, options); + break; + case "double": + doubleProperty = reader.GetDouble(); + break; + case "float": + floatProperty = (float)reader.GetDouble(); + break; + case "int32": + int32 = reader.GetInt32(); + break; + case "int64": + int64 = reader.GetInt64(); + break; + case "integer": + integer = reader.GetInt32(); + break; + case "number": + number = reader.GetInt32(); + break; + case "password": + password = reader.GetString(); + break; + case "pattern_with_digits": + patternWithDigits = reader.GetString(); + break; + case "pattern_with_digits_and_delimiter": + patternWithDigitsAndDelimiter = reader.GetString(); + break; + case "string": + stringProperty = reader.GetString(); + break; + case "uuid": + uuid = reader.GetGuid(); + break; + default: + break; + } + } + } + + return new FormatTest(binary, byteProperty, date, dateTime, decimalProperty, doubleProperty, floatProperty, int32, int64, integer, number, password, patternWithDigits, patternWithDigitsAndDelimiter, stringProperty, uuid); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, FormatTest formatTest, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WritePropertyName("binary"); + JsonSerializer.Serialize(writer, formatTest.Binary, options); + writer.WritePropertyName("byte"); + JsonSerializer.Serialize(writer, formatTest.ByteProperty, options); + writer.WritePropertyName("date"); + JsonSerializer.Serialize(writer, formatTest.Date, options); + writer.WritePropertyName("dateTime"); + JsonSerializer.Serialize(writer, formatTest.DateTime, options); + writer.WritePropertyName("decimal"); + JsonSerializer.Serialize(writer, formatTest.DecimalProperty, options); + writer.WriteNumber("double", (int)formatTest.DoubleProperty); + writer.WriteNumber("float", (int)formatTest.FloatProperty); + writer.WriteNumber("int32", (int)formatTest.Int32); + writer.WriteNumber("int64", (int)formatTest.Int64); + writer.WriteNumber("integer", (int)formatTest.Integer); + writer.WriteNumber("number", (int)formatTest.Number); + writer.WriteString("password", formatTest.Password); + writer.WriteString("pattern_with_digits", formatTest.PatternWithDigits); + writer.WriteString("pattern_with_digits_and_delimiter", formatTest.PatternWithDigitsAndDelimiter); + writer.WriteString("string", formatTest.StringProperty); + writer.WriteString("uuid", formatTest.Uuid); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Fruit.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Fruit.cs index 95c5248844..3a8b95bb06 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Fruit.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Fruit.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,15 +26,25 @@ namespace Org.OpenAPITools.Model /// /// Fruit /// - public partial class Fruit : IEquatable, IValidatableObject + public partial class Fruit : IValidatableObject { /// /// Initializes a new instance of the class. /// /// /// color - public Fruit(Apple apple, string color = default) + [JsonConstructor] + public Fruit(Apple apple, string color) { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (color == null) + throw new ArgumentNullException(nameof(Color)); + + #pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + Apple = apple; Color = color; } @@ -45,8 +54,18 @@ namespace Org.OpenAPITools.Model /// /// /// color - public Fruit(Banana banana, string color = default) + [JsonConstructor] + public Fruit(Banana banana, string color) { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (color == null) + throw new ArgumentNullException(nameof(Color)); + + #pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + Banana = banana; Color = color; } @@ -79,44 +98,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Fruit).AreEqual; - } - - /// - /// Returns true if Fruit instances are equal - /// - /// Instance of Fruit to be compared - /// Boolean - public bool Equals(Fruit input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Color != null) - { - hashCode = (hashCode * 59) + this.Color.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -133,13 +114,6 @@ namespace Org.OpenAPITools.Model /// public class FruitJsonConverter : JsonConverter { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof(Fruit).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -152,9 +126,11 @@ namespace Org.OpenAPITools.Model { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); + JsonTokenType startingTokenType = reader.TokenType; + Utf8JsonReader appleReader = reader; bool appleDeserialized = Client.ClientUtils.TryDeserialize(ref appleReader, options, out Apple apple); @@ -165,10 +141,13 @@ namespace Org.OpenAPITools.Model while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string propertyName = reader.GetString(); reader.Read(); @@ -178,6 +157,8 @@ namespace Org.OpenAPITools.Model case "color": color = reader.GetString(); break; + default: + break; } } } @@ -198,6 +179,13 @@ namespace Org.OpenAPITools.Model /// /// /// - public override void Write(Utf8JsonWriter writer, Fruit fruit, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, Fruit fruit, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("color", fruit.Color); + + writer.WriteEndObject(); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/FruitReq.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/FruitReq.cs index f5abf19875..9418bf9a96 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/FruitReq.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/FruitReq.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,13 +26,14 @@ namespace Org.OpenAPITools.Model /// /// FruitReq /// - public partial class FruitReq : IEquatable, IValidatableObject + public partial class FruitReq : IValidatableObject { /// /// Initializes a new instance of the class. /// /// - public FruitReq(AppleReq appleReq) + [JsonConstructor] + internal FruitReq(AppleReq appleReq) { AppleReq = appleReq; } @@ -42,7 +42,8 @@ namespace Org.OpenAPITools.Model /// Initializes a new instance of the class. /// /// - public FruitReq(BananaReq bananaReq) + [JsonConstructor] + internal FruitReq(BananaReq bananaReq) { BananaReq = bananaReq; } @@ -68,40 +69,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as FruitReq).AreEqual; - } - - /// - /// Returns true if FruitReq instances are equal - /// - /// Instance of FruitReq to be compared - /// Boolean - public bool Equals(FruitReq input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -118,13 +85,6 @@ namespace Org.OpenAPITools.Model /// public class FruitReqJsonConverter : JsonConverter { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof(FruitReq).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -137,9 +97,11 @@ namespace Org.OpenAPITools.Model { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); + JsonTokenType startingTokenType = reader.TokenType; + Utf8JsonReader appleReqReader = reader; bool appleReqDeserialized = Client.ClientUtils.TryDeserialize(ref appleReqReader, options, out AppleReq appleReq); @@ -149,16 +111,21 @@ namespace Org.OpenAPITools.Model while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string propertyName = reader.GetString(); reader.Read(); switch (propertyName) { + default: + break; } } } @@ -179,6 +146,12 @@ namespace Org.OpenAPITools.Model /// /// /// - public override void Write(Utf8JsonWriter writer, FruitReq fruitReq, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, FruitReq fruitReq, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + + writer.WriteEndObject(); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/GmFruit.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/GmFruit.cs index 3b4ac35867..cc28f46c42 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/GmFruit.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/GmFruit.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,7 +26,7 @@ namespace Org.OpenAPITools.Model /// /// GmFruit /// - public partial class GmFruit : IEquatable, IValidatableObject + public partial class GmFruit : IValidatableObject { /// /// Initializes a new instance of the class. @@ -35,8 +34,18 @@ namespace Org.OpenAPITools.Model /// /// /// color - public GmFruit(Apple apple, Banana banana, string color = default) + [JsonConstructor] + public GmFruit(Apple apple, Banana banana, string color) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (color == null) + throw new ArgumentNullException("color is a required property for GmFruit and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + Apple = Apple; Banana = Banana; Color = color; @@ -70,44 +79,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as GmFruit).AreEqual; - } - - /// - /// Returns true if GmFruit instances are equal - /// - /// Instance of GmFruit to be compared - /// Boolean - public bool Equals(GmFruit input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Color != null) - { - hashCode = (hashCode * 59) + this.Color.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -124,13 +95,6 @@ namespace Org.OpenAPITools.Model /// public class GmFruitJsonConverter : JsonConverter { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof(GmFruit).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -143,9 +107,11 @@ namespace Org.OpenAPITools.Model { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); + JsonTokenType startingTokenType = reader.TokenType; + Utf8JsonReader appleReader = reader; bool appleDeserialized = Client.ClientUtils.TryDeserialize(ref appleReader, options, out Apple apple); @@ -156,10 +122,13 @@ namespace Org.OpenAPITools.Model while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string propertyName = reader.GetString(); reader.Read(); @@ -169,6 +138,8 @@ namespace Org.OpenAPITools.Model case "color": color = reader.GetString(); break; + default: + break; } } } @@ -183,6 +154,13 @@ namespace Org.OpenAPITools.Model /// /// /// - public override void Write(Utf8JsonWriter writer, GmFruit gmFruit, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, GmFruit gmFruit, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("color", gmFruit.Color); + + writer.WriteEndObject(); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/GrandparentAnimal.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/GrandparentAnimal.cs index c880e6711e..1557d82e53 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/GrandparentAnimal.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/GrandparentAnimal.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,17 +26,24 @@ namespace Org.OpenAPITools.Model /// /// GrandparentAnimal /// - public partial class GrandparentAnimal : IEquatable, IValidatableObject + public partial class GrandparentAnimal : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// petType (required) + /// petType + [JsonConstructor] public GrandparentAnimal(string petType) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + if (petType == null) throw new ArgumentNullException("petType is a required property for GrandparentAnimal and cannot be null."); +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + PetType = petType; } @@ -51,7 +57,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -66,48 +72,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as GrandparentAnimal).AreEqual; - } - - /// - /// Returns true if GrandparentAnimal instances are equal - /// - /// Instance of GrandparentAnimal to be compared - /// Boolean - public bool Equals(GrandparentAnimal input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.PetType != null) - { - hashCode = (hashCode * 59) + this.PetType.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -129,4 +93,71 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type GrandparentAnimal + /// + public class GrandparentAnimalJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override GrandparentAnimal Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string petType = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "pet_type": + petType = reader.GetString(); + break; + default: + break; + } + } + } + + return new GrandparentAnimal(petType); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, GrandparentAnimal grandparentAnimal, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("pet_type", grandparentAnimal.PetType); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs index 849a4886c3..c0e8044b40 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -34,8 +33,21 @@ namespace Org.OpenAPITools.Model /// /// bar /// foo - public HasOnlyReadOnly(string bar = default, string foo = default) + [JsonConstructor] + internal HasOnlyReadOnly(string bar, string foo) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (bar == null) + throw new ArgumentNullException("bar is a required property for HasOnlyReadOnly and cannot be null."); + + if (foo == null) + throw new ArgumentNullException("foo is a required property for HasOnlyReadOnly and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + Bar = bar; Foo = foo; } @@ -44,19 +56,19 @@ namespace Org.OpenAPITools.Model /// Gets or Sets Bar /// [JsonPropertyName("bar")] - public string Bar { get; private set; } + public string Bar { get; } /// /// Gets or Sets Foo /// [JsonPropertyName("foo")] - public string Foo { get; private set; } + public string Foo { get; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -102,22 +114,13 @@ namespace Org.OpenAPITools.Model unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Bar != null) - { - hashCode = (hashCode * 59) + this.Bar.GetHashCode(); - } - if (this.Foo != null) - { - hashCode = (hashCode * 59) + this.Foo.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } + hashCode = (hashCode * 59) + Bar.GetHashCode(); + hashCode = (hashCode * 59) + Foo.GetHashCode(); + hashCode = (hashCode * 59) + AdditionalProperties.GetHashCode(); + return hashCode; } } - /// /// To validate all properties of the instance /// @@ -129,4 +132,76 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type HasOnlyReadOnly + /// + public class HasOnlyReadOnlyJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override HasOnlyReadOnly Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string bar = default; + string foo = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "bar": + bar = reader.GetString(); + break; + case "foo": + foo = reader.GetString(); + break; + default: + break; + } + } + } + + return new HasOnlyReadOnly(bar, foo); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, HasOnlyReadOnly hasOnlyReadOnly, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("bar", hasOnlyReadOnly.Bar); + writer.WriteString("foo", hasOnlyReadOnly.Foo); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/HealthCheckResult.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/HealthCheckResult.cs index f66a3e132f..2f0e472f63 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/HealthCheckResult.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/HealthCheckResult.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,12 +26,13 @@ namespace Org.OpenAPITools.Model /// /// Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. /// - public partial class HealthCheckResult : IEquatable, IValidatableObject + public partial class HealthCheckResult : IValidatableObject { /// /// Initializes a new instance of the class. /// /// nullableMessage + [JsonConstructor] public HealthCheckResult(string nullableMessage = default) { NullableMessage = nullableMessage; @@ -48,7 +48,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -63,48 +63,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as HealthCheckResult).AreEqual; - } - - /// - /// Returns true if HealthCheckResult instances are equal - /// - /// Instance of HealthCheckResult to be compared - /// Boolean - public bool Equals(HealthCheckResult input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.NullableMessage != null) - { - hashCode = (hashCode * 59) + this.NullableMessage.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -116,4 +74,71 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type HealthCheckResult + /// + public class HealthCheckResultJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override HealthCheckResult Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string nullableMessage = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "NullableMessage": + nullableMessage = reader.GetString(); + break; + default: + break; + } + } + } + + return new HealthCheckResult(nullableMessage); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, HealthCheckResult healthCheckResult, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("NullableMessage", healthCheckResult.NullableMessage); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs index d1371b46bf..45bfcd4f84 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,14 +26,15 @@ namespace Org.OpenAPITools.Model /// /// IsoscelesTriangle /// - public partial class IsoscelesTriangle : IEquatable, IValidatableObject + public partial class IsoscelesTriangle : IValidatableObject { /// /// Initializes a new instance of the class. /// /// /// - public IsoscelesTriangle(ShapeInterface shapeInterface, TriangleInterface triangleInterface) + [JsonConstructor] + internal IsoscelesTriangle(ShapeInterface shapeInterface, TriangleInterface triangleInterface) { ShapeInterface = shapeInterface; TriangleInterface = triangleInterface; @@ -61,40 +61,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as IsoscelesTriangle).AreEqual; - } - - /// - /// Returns true if IsoscelesTriangle instances are equal - /// - /// Instance of IsoscelesTriangle to be compared - /// Boolean - public bool Equals(IsoscelesTriangle input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -111,13 +77,6 @@ namespace Org.OpenAPITools.Model /// public class IsoscelesTriangleJsonConverter : JsonConverter { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof(IsoscelesTriangle).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -130,28 +89,35 @@ namespace Org.OpenAPITools.Model { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); + JsonTokenType startingTokenType = reader.TokenType; + Utf8JsonReader shapeInterfaceReader = reader; - bool shapeInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref shapeInterfaceReader, options, out ShapeInterface shapeInterface); + bool shapeInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref reader, options, out ShapeInterface shapeInterface); Utf8JsonReader triangleInterfaceReader = reader; - bool triangleInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref triangleInterfaceReader, options, out TriangleInterface triangleInterface); + bool triangleInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref reader, options, out TriangleInterface triangleInterface); while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string propertyName = reader.GetString(); reader.Read(); switch (propertyName) { + default: + break; } } } @@ -166,6 +132,12 @@ namespace Org.OpenAPITools.Model /// /// /// - public override void Write(Utf8JsonWriter writer, IsoscelesTriangle isoscelesTriangle, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, IsoscelesTriangle isoscelesTriangle, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + + writer.WriteEndObject(); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/List.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/List.cs index 7a3e133f69..654d498a9c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/List.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/List.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,14 +26,24 @@ namespace Org.OpenAPITools.Model /// /// List /// - public partial class List : IEquatable, IValidatableObject + public partial class List : IValidatableObject { /// /// Initializes a new instance of the class. /// /// _123list - public List(string _123list = default) + [JsonConstructor] + public List(string _123list) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (_123list == null) + throw new ArgumentNullException("_123list is a required property for List and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + _123List = _123list; } @@ -48,7 +57,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -63,48 +72,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as List).AreEqual; - } - - /// - /// Returns true if List instances are equal - /// - /// Instance of List to be compared - /// Boolean - public bool Equals(List input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this._123List != null) - { - hashCode = (hashCode * 59) + this._123List.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -116,4 +83,71 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type List + /// + public class ListJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override List Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string _123list = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "123-list": + _123list = reader.GetString(); + break; + default: + break; + } + } + } + + return new List(_123list); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, List list, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("123-list", list._123List); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Mammal.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Mammal.cs index f29770cdfe..87e28b32ff 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Mammal.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Mammal.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,13 +26,14 @@ namespace Org.OpenAPITools.Model /// /// Mammal /// - public partial class Mammal : IEquatable, IValidatableObject + public partial class Mammal : IValidatableObject { /// /// Initializes a new instance of the class. /// /// - public Mammal(Whale whale) + [JsonConstructor] + internal Mammal(Whale whale) { Whale = whale; } @@ -42,7 +42,8 @@ namespace Org.OpenAPITools.Model /// Initializes a new instance of the class. /// /// - public Mammal(Zebra zebra) + [JsonConstructor] + internal Mammal(Zebra zebra) { Zebra = zebra; } @@ -51,7 +52,8 @@ namespace Org.OpenAPITools.Model /// Initializes a new instance of the class. /// /// - public Mammal(Pig pig) + [JsonConstructor] + internal Mammal(Pig pig) { Pig = pig; } @@ -75,7 +77,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -89,44 +91,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Mammal).AreEqual; - } - - /// - /// Returns true if Mammal instances are equal - /// - /// Instance of Mammal to be compared - /// Boolean - public bool Equals(Mammal input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -153,13 +117,6 @@ namespace Org.OpenAPITools.Model /// public class MammalJsonConverter : JsonConverter { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof(Mammal).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -172,9 +129,11 @@ namespace Org.OpenAPITools.Model { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); + JsonTokenType startingTokenType = reader.TokenType; + Utf8JsonReader whaleReader = reader; bool whaleDeserialized = Client.ClientUtils.TryDeserialize(ref whaleReader, options, out Whale whale); @@ -187,16 +146,21 @@ namespace Org.OpenAPITools.Model while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string propertyName = reader.GetString(); reader.Read(); switch (propertyName) { + default: + break; } } } @@ -220,6 +184,12 @@ namespace Org.OpenAPITools.Model /// /// /// - public override void Write(Utf8JsonWriter writer, Mammal mammal, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, Mammal mammal, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + + writer.WriteEndObject(); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/MapTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/MapTest.cs index 2cf624e2af..777120531d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/MapTest.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/MapTest.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,21 +26,40 @@ namespace Org.OpenAPITools.Model /// /// MapTest /// - public partial class MapTest : IEquatable, IValidatableObject + public partial class MapTest : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// mapMapOfString - /// mapOfEnumString /// directMap /// indirectMap - public MapTest(Dictionary> mapMapOfString = default, Dictionary mapOfEnumString = default, Dictionary directMap = default, Dictionary indirectMap = default) + /// mapMapOfString + /// mapOfEnumString + [JsonConstructor] + public MapTest(Dictionary directMap, Dictionary indirectMap, Dictionary> mapMapOfString, Dictionary mapOfEnumString) { - MapMapOfString = mapMapOfString; - MapOfEnumString = mapOfEnumString; +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (mapMapOfString == null) + throw new ArgumentNullException("mapMapOfString is a required property for MapTest and cannot be null."); + + if (mapOfEnumString == null) + throw new ArgumentNullException("mapOfEnumString is a required property for MapTest and cannot be null."); + + if (directMap == null) + throw new ArgumentNullException("directMap is a required property for MapTest and cannot be null."); + + if (indirectMap == null) + throw new ArgumentNullException("indirectMap is a required property for MapTest and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + DirectMap = directMap; IndirectMap = indirectMap; + MapMapOfString = mapMapOfString; + MapOfEnumString = mapOfEnumString; } /// @@ -52,28 +70,47 @@ namespace Org.OpenAPITools.Model /// /// Enum UPPER for value: UPPER /// - [EnumMember(Value = "UPPER")] UPPER = 1, /// /// Enum Lower for value: lower /// - [EnumMember(Value = "lower")] Lower = 2 } /// - /// Gets or Sets MapMapOfString + /// Returns a InnerEnum /// - [JsonPropertyName("map_map_of_string")] - public Dictionary> MapMapOfString { get; set; } + /// + /// + public static InnerEnum InnerEnumFromString(string value) + { + if (value == "UPPER") + return InnerEnum.UPPER; + + if (value == "lower") + return InnerEnum.Lower; + + throw new NotImplementedException($"Could not convert value to type InnerEnum: '{value}'"); + } /// - /// Gets or Sets MapOfEnumString + /// Returns equivalent json value /// - [JsonPropertyName("map_of_enum_string")] - public Dictionary MapOfEnumString { get; set; } + /// + /// + /// + public static string InnerEnumToJsonValue(InnerEnum value) + { + if (value == InnerEnum.UPPER) + return "UPPER"; + + if (value == InnerEnum.Lower) + return "lower"; + + throw new NotImplementedException($"Value could not be handled: '{value}'"); + } /// /// Gets or Sets DirectMap @@ -87,11 +124,23 @@ namespace Org.OpenAPITools.Model [JsonPropertyName("indirect_map")] public Dictionary IndirectMap { get; set; } + /// + /// Gets or Sets MapMapOfString + /// + [JsonPropertyName("map_map_of_string")] + public Dictionary> MapMapOfString { get; set; } + + /// + /// Gets or Sets MapOfEnumString + /// + [JsonPropertyName("map_of_enum_string")] + public Dictionary MapOfEnumString { get; set; } + /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -101,68 +150,14 @@ namespace Org.OpenAPITools.Model { StringBuilder sb = new StringBuilder(); sb.Append("class MapTest {\n"); - sb.Append(" MapMapOfString: ").Append(MapMapOfString).Append("\n"); - sb.Append(" MapOfEnumString: ").Append(MapOfEnumString).Append("\n"); sb.Append(" DirectMap: ").Append(DirectMap).Append("\n"); sb.Append(" IndirectMap: ").Append(IndirectMap).Append("\n"); + sb.Append(" MapMapOfString: ").Append(MapMapOfString).Append("\n"); + sb.Append(" MapOfEnumString: ").Append(MapOfEnumString).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as MapTest).AreEqual; - } - - /// - /// Returns true if MapTest instances are equal - /// - /// Instance of MapTest to be compared - /// Boolean - public bool Equals(MapTest input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.MapMapOfString != null) - { - hashCode = (hashCode * 59) + this.MapMapOfString.GetHashCode(); - } - if (this.MapOfEnumString != null) - { - hashCode = (hashCode * 59) + this.MapOfEnumString.GetHashCode(); - } - if (this.DirectMap != null) - { - hashCode = (hashCode * 59) + this.DirectMap.GetHashCode(); - } - if (this.IndirectMap != null) - { - hashCode = (hashCode * 59) + this.IndirectMap.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -174,4 +169,90 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type MapTest + /// + public class MapTestJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override MapTest Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + Dictionary directMap = default; + Dictionary indirectMap = default; + Dictionary> mapMapOfString = default; + Dictionary mapOfEnumString = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "direct_map": + directMap = JsonSerializer.Deserialize>(ref reader, options); + break; + case "indirect_map": + indirectMap = JsonSerializer.Deserialize>(ref reader, options); + break; + case "map_map_of_string": + mapMapOfString = JsonSerializer.Deserialize>>(ref reader, options); + break; + case "map_of_enum_string": + mapOfEnumString = JsonSerializer.Deserialize>(ref reader, options); + break; + default: + break; + } + } + } + + return new MapTest(directMap, indirectMap, mapMapOfString, mapOfEnumString); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, MapTest mapTest, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WritePropertyName("direct_map"); + JsonSerializer.Serialize(writer, mapTest.DirectMap, options); + writer.WritePropertyName("indirect_map"); + JsonSerializer.Serialize(writer, mapTest.IndirectMap, options); + writer.WritePropertyName("map_map_of_string"); + JsonSerializer.Serialize(writer, mapTest.MapMapOfString, options); + writer.WritePropertyName("map_of_enum_string"); + JsonSerializer.Serialize(writer, mapTest.MapOfEnumString, options); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs index 68b2ea60b7..4806980e33 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,27 +26,37 @@ namespace Org.OpenAPITools.Model /// /// MixedPropertiesAndAdditionalPropertiesClass /// - public partial class MixedPropertiesAndAdditionalPropertiesClass : IEquatable, IValidatableObject + public partial class MixedPropertiesAndAdditionalPropertiesClass : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// uuid /// dateTime /// map - public MixedPropertiesAndAdditionalPropertiesClass(Guid uuid = default, DateTime dateTime = default, Dictionary map = default) + /// uuid + [JsonConstructor] + public MixedPropertiesAndAdditionalPropertiesClass(DateTime dateTime, Dictionary map, Guid uuid) { - Uuid = uuid; +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (uuid == null) + throw new ArgumentNullException("uuid is a required property for MixedPropertiesAndAdditionalPropertiesClass and cannot be null."); + + if (dateTime == null) + throw new ArgumentNullException("dateTime is a required property for MixedPropertiesAndAdditionalPropertiesClass and cannot be null."); + + if (map == null) + throw new ArgumentNullException("map is a required property for MixedPropertiesAndAdditionalPropertiesClass and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + DateTime = dateTime; Map = map; + Uuid = uuid; } - /// - /// Gets or Sets Uuid - /// - [JsonPropertyName("uuid")] - public Guid Uuid { get; set; } - /// /// Gets or Sets DateTime /// @@ -60,11 +69,17 @@ namespace Org.OpenAPITools.Model [JsonPropertyName("map")] public Dictionary Map { get; set; } + /// + /// Gets or Sets Uuid + /// + [JsonPropertyName("uuid")] + public Guid Uuid { get; set; } + /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -74,63 +89,13 @@ namespace Org.OpenAPITools.Model { StringBuilder sb = new StringBuilder(); sb.Append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.Append(" Uuid: ").Append(Uuid).Append("\n"); sb.Append(" DateTime: ").Append(DateTime).Append("\n"); sb.Append(" Map: ").Append(Map).Append("\n"); + sb.Append(" Uuid: ").Append(Uuid).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as MixedPropertiesAndAdditionalPropertiesClass).AreEqual; - } - - /// - /// Returns true if MixedPropertiesAndAdditionalPropertiesClass instances are equal - /// - /// Instance of MixedPropertiesAndAdditionalPropertiesClass to be compared - /// Boolean - public bool Equals(MixedPropertiesAndAdditionalPropertiesClass input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Uuid != null) - { - hashCode = (hashCode * 59) + this.Uuid.GetHashCode(); - } - if (this.DateTime != null) - { - hashCode = (hashCode * 59) + this.DateTime.GetHashCode(); - } - if (this.Map != null) - { - hashCode = (hashCode * 59) + this.Map.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -142,4 +107,83 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type MixedPropertiesAndAdditionalPropertiesClass + /// + public class MixedPropertiesAndAdditionalPropertiesClassJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override MixedPropertiesAndAdditionalPropertiesClass Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + DateTime dateTime = default; + Dictionary map = default; + Guid uuid = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "dateTime": + dateTime = JsonSerializer.Deserialize(ref reader, options); + break; + case "map": + map = JsonSerializer.Deserialize>(ref reader, options); + break; + case "uuid": + uuid = reader.GetGuid(); + break; + default: + break; + } + } + } + + return new MixedPropertiesAndAdditionalPropertiesClass(dateTime, map, uuid); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, MixedPropertiesAndAdditionalPropertiesClass mixedPropertiesAndAdditionalPropertiesClass, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WritePropertyName("dateTime"); + JsonSerializer.Serialize(writer, mixedPropertiesAndAdditionalPropertiesClass.DateTime, options); + writer.WritePropertyName("map"); + JsonSerializer.Serialize(writer, mixedPropertiesAndAdditionalPropertiesClass.Map, options); + writer.WriteString("uuid", mixedPropertiesAndAdditionalPropertiesClass.Uuid); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Model200Response.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Model200Response.cs index 6662b2edac..eca0214cd8 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Model200Response.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Model200Response.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,36 +26,49 @@ namespace Org.OpenAPITools.Model /// /// Model for testing model name starting with number /// - public partial class Model200Response : IEquatable, IValidatableObject + public partial class Model200Response : IValidatableObject { /// /// Initializes a new instance of the class. /// + /// classProperty /// name - /// _class - public Model200Response(int name = default, string _class = default) + [JsonConstructor] + public Model200Response(string classProperty, int name) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (name == null) + throw new ArgumentNullException("name is a required property for Model200Response and cannot be null."); + + if (classProperty == null) + throw new ArgumentNullException("classProperty is a required property for Model200Response and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + ClassProperty = classProperty; Name = name; - Class = _class; } + /// + /// Gets or Sets ClassProperty + /// + [JsonPropertyName("class")] + public string ClassProperty { get; set; } + /// /// Gets or Sets Name /// [JsonPropertyName("name")] public int Name { get; set; } - /// - /// Gets or Sets Class - /// - [JsonPropertyName("class")] - public string Class { get; set; } - /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -66,55 +78,12 @@ namespace Org.OpenAPITools.Model { StringBuilder sb = new StringBuilder(); sb.Append("class Model200Response {\n"); + sb.Append(" ClassProperty: ").Append(ClassProperty).Append("\n"); sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Class: ").Append(Class).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Model200Response).AreEqual; - } - - /// - /// Returns true if Model200Response instances are equal - /// - /// Instance of Model200Response to be compared - /// Boolean - public bool Equals(Model200Response input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - if (this.Class != null) - { - hashCode = (hashCode * 59) + this.Class.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -126,4 +95,76 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type Model200Response + /// + public class Model200ResponseJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override Model200Response Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string classProperty = default; + int name = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "class": + classProperty = reader.GetString(); + break; + case "name": + name = reader.GetInt32(); + break; + default: + break; + } + } + } + + return new Model200Response(classProperty, name); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Model200Response model200Response, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("class", model200Response.ClassProperty); + writer.WriteNumber("name", (int)model200Response.Name); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ModelClient.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ModelClient.cs index 7bc5c681bb..dc243ef72f 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ModelClient.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ModelClient.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,28 +26,38 @@ namespace Org.OpenAPITools.Model /// /// ModelClient /// - public partial class ModelClient : IEquatable, IValidatableObject + public partial class ModelClient : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// _client - public ModelClient(string _client = default) + /// clientProperty + [JsonConstructor] + public ModelClient(string clientProperty) { - _Client = _client; +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (clientProperty == null) + throw new ArgumentNullException("clientProperty is a required property for ModelClient and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + _ClientProperty = clientProperty; } /// - /// Gets or Sets _Client + /// Gets or Sets _ClientProperty /// [JsonPropertyName("client")] - public string _Client { get; set; } + public string _ClientProperty { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -58,53 +67,11 @@ namespace Org.OpenAPITools.Model { StringBuilder sb = new StringBuilder(); sb.Append("class ModelClient {\n"); - sb.Append(" _Client: ").Append(_Client).Append("\n"); + sb.Append(" _ClientProperty: ").Append(_ClientProperty).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as ModelClient).AreEqual; - } - - /// - /// Returns true if ModelClient instances are equal - /// - /// Instance of ModelClient to be compared - /// Boolean - public bool Equals(ModelClient input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this._Client != null) - { - hashCode = (hashCode * 59) + this._Client.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -116,4 +83,71 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type ModelClient + /// + public class ModelClientJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override ModelClient Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string clientProperty = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "client": + clientProperty = reader.GetString(); + break; + default: + break; + } + } + } + + return new ModelClient(clientProperty); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ModelClient modelClient, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("client", modelClient._ClientProperty); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Name.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Name.cs index 95d35d993b..3e927732b7 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Name.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Name.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -32,18 +31,34 @@ namespace Org.OpenAPITools.Model /// /// Initializes a new instance of the class. /// - /// nameProperty (required) - /// snakeCase + /// nameProperty /// property + /// snakeCase /// _123number - public Name(int nameProperty, int snakeCase = default, string property = default, int _123number = default) + [JsonConstructor] + public Name(int nameProperty, string property, int snakeCase, int _123number) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + if (nameProperty == null) throw new ArgumentNullException("nameProperty is a required property for Name and cannot be null."); + if (snakeCase == null) + throw new ArgumentNullException("snakeCase is a required property for Name and cannot be null."); + + if (property == null) + throw new ArgumentNullException("property is a required property for Name and cannot be null."); + + if (_123number == null) + throw new ArgumentNullException("_123number is a required property for Name and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + NameProperty = nameProperty; - SnakeCase = snakeCase; Property = property; + SnakeCase = snakeCase; _123Number = _123number; } @@ -53,29 +68,29 @@ namespace Org.OpenAPITools.Model [JsonPropertyName("name")] public int NameProperty { get; set; } - /// - /// Gets or Sets SnakeCase - /// - [JsonPropertyName("snake_case")] - public int SnakeCase { get; private set; } - /// /// Gets or Sets Property /// [JsonPropertyName("property")] public string Property { get; set; } + /// + /// Gets or Sets SnakeCase + /// + [JsonPropertyName("snake_case")] + public int SnakeCase { get; } + /// /// Gets or Sets _123Number /// [JsonPropertyName("123Number")] - public int _123Number { get; private set; } + public int _123Number { get; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -86,8 +101,8 @@ namespace Org.OpenAPITools.Model StringBuilder sb = new StringBuilder(); sb.Append("class Name {\n"); sb.Append(" NameProperty: ").Append(NameProperty).Append("\n"); - sb.Append(" SnakeCase: ").Append(SnakeCase).Append("\n"); sb.Append(" Property: ").Append(Property).Append("\n"); + sb.Append(" SnakeCase: ").Append(SnakeCase).Append("\n"); sb.Append(" _123Number: ").Append(_123Number).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); @@ -123,21 +138,13 @@ namespace Org.OpenAPITools.Model unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.NameProperty.GetHashCode(); - hashCode = (hashCode * 59) + this.SnakeCase.GetHashCode(); - if (this.Property != null) - { - hashCode = (hashCode * 59) + this.Property.GetHashCode(); - } - hashCode = (hashCode * 59) + this._123Number.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } + hashCode = (hashCode * 59) + SnakeCase.GetHashCode(); + hashCode = (hashCode * 59) + _123Number.GetHashCode(); + hashCode = (hashCode * 59) + AdditionalProperties.GetHashCode(); + return hashCode; } } - /// /// To validate all properties of the instance /// @@ -149,4 +156,86 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type Name + /// + public class NameJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override Name Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + int nameProperty = default; + string property = default; + int snakeCase = default; + int _123number = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "name": + nameProperty = reader.GetInt32(); + break; + case "property": + property = reader.GetString(); + break; + case "snake_case": + snakeCase = reader.GetInt32(); + break; + case "123Number": + _123number = reader.GetInt32(); + break; + default: + break; + } + } + } + + return new Name(nameProperty, property, snakeCase, _123number); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Name name, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteNumber("name", (int)name.NameProperty); + writer.WriteString("property", name.Property); + writer.WriteNumber("snake_case", (int)name.SnakeCase); + writer.WriteNumber("123Number", (int)name._123Number); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/NullableClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/NullableClass.cs index 9bc3748822..0dbf928e05 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/NullableClass.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/NullableClass.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,50 +26,75 @@ namespace Org.OpenAPITools.Model /// /// NullableClass /// - public partial class NullableClass : Dictionary, IEquatable, IValidatableObject + public partial class NullableClass : Dictionary, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// integerProp - /// numberProp + /// arrayItemsNullable + /// objectItemsNullable + /// arrayAndItemsNullableProp + /// arrayNullableProp /// booleanProp - /// stringProp /// dateProp /// datetimeProp - /// arrayNullableProp - /// arrayAndItemsNullableProp - /// arrayItemsNullable - /// objectNullableProp + /// integerProp + /// numberProp /// objectAndItemsNullableProp - /// objectItemsNullable - public NullableClass(int? integerProp = default, decimal? numberProp = default, bool? booleanProp = default, string stringProp = default, DateTime? dateProp = default, DateTime? datetimeProp = default, List arrayNullableProp = default, List arrayAndItemsNullableProp = default, List arrayItemsNullable = default, Dictionary objectNullableProp = default, Dictionary objectAndItemsNullableProp = default, Dictionary objectItemsNullable = default) : base() + /// objectNullableProp + /// stringProp + [JsonConstructor] + public NullableClass(List arrayItemsNullable, Dictionary objectItemsNullable, List arrayAndItemsNullableProp = default, List arrayNullableProp = default, bool? booleanProp = default, DateTime? dateProp = default, DateTime? datetimeProp = default, int? integerProp = default, decimal? numberProp = default, Dictionary objectAndItemsNullableProp = default, Dictionary objectNullableProp = default, string stringProp = default) : base() { - IntegerProp = integerProp; - NumberProp = numberProp; +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (arrayItemsNullable == null) + throw new ArgumentNullException("arrayItemsNullable is a required property for NullableClass and cannot be null."); + + if (objectItemsNullable == null) + throw new ArgumentNullException("objectItemsNullable is a required property for NullableClass and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + ArrayItemsNullable = arrayItemsNullable; + ObjectItemsNullable = objectItemsNullable; + ArrayAndItemsNullableProp = arrayAndItemsNullableProp; + ArrayNullableProp = arrayNullableProp; BooleanProp = booleanProp; - StringProp = stringProp; DateProp = dateProp; DatetimeProp = datetimeProp; - ArrayNullableProp = arrayNullableProp; - ArrayAndItemsNullableProp = arrayAndItemsNullableProp; - ArrayItemsNullable = arrayItemsNullable; - ObjectNullableProp = objectNullableProp; + IntegerProp = integerProp; + NumberProp = numberProp; ObjectAndItemsNullableProp = objectAndItemsNullableProp; - ObjectItemsNullable = objectItemsNullable; + ObjectNullableProp = objectNullableProp; + StringProp = stringProp; } /// - /// Gets or Sets IntegerProp + /// Gets or Sets ArrayItemsNullable /// - [JsonPropertyName("integer_prop")] - public int? IntegerProp { get; set; } + [JsonPropertyName("array_items_nullable")] + public List ArrayItemsNullable { get; set; } /// - /// Gets or Sets NumberProp + /// Gets or Sets ObjectItemsNullable /// - [JsonPropertyName("number_prop")] - public decimal? NumberProp { get; set; } + [JsonPropertyName("object_items_nullable")] + public Dictionary ObjectItemsNullable { get; set; } + + /// + /// Gets or Sets ArrayAndItemsNullableProp + /// + [JsonPropertyName("array_and_items_nullable_prop")] + public List ArrayAndItemsNullableProp { get; set; } + + /// + /// Gets or Sets ArrayNullableProp + /// + [JsonPropertyName("array_nullable_prop")] + public List ArrayNullableProp { get; set; } /// /// Gets or Sets BooleanProp @@ -78,12 +102,6 @@ namespace Org.OpenAPITools.Model [JsonPropertyName("boolean_prop")] public bool? BooleanProp { get; set; } - /// - /// Gets or Sets StringProp - /// - [JsonPropertyName("string_prop")] - public string StringProp { get; set; } - /// /// Gets or Sets DateProp /// @@ -97,28 +115,16 @@ namespace Org.OpenAPITools.Model public DateTime? DatetimeProp { get; set; } /// - /// Gets or Sets ArrayNullableProp + /// Gets or Sets IntegerProp /// - [JsonPropertyName("array_nullable_prop")] - public List ArrayNullableProp { get; set; } + [JsonPropertyName("integer_prop")] + public int? IntegerProp { get; set; } /// - /// Gets or Sets ArrayAndItemsNullableProp + /// Gets or Sets NumberProp /// - [JsonPropertyName("array_and_items_nullable_prop")] - public List ArrayAndItemsNullableProp { get; set; } - - /// - /// Gets or Sets ArrayItemsNullable - /// - [JsonPropertyName("array_items_nullable")] - public List ArrayItemsNullable { get; set; } - - /// - /// Gets or Sets ObjectNullableProp - /// - [JsonPropertyName("object_nullable_prop")] - public Dictionary ObjectNullableProp { get; set; } + [JsonPropertyName("number_prop")] + public decimal? NumberProp { get; set; } /// /// Gets or Sets ObjectAndItemsNullableProp @@ -127,10 +133,16 @@ namespace Org.OpenAPITools.Model public Dictionary ObjectAndItemsNullableProp { get; set; } /// - /// Gets or Sets ObjectItemsNullable + /// Gets or Sets ObjectNullableProp /// - [JsonPropertyName("object_items_nullable")] - public Dictionary ObjectItemsNullable { get; set; } + [JsonPropertyName("object_nullable_prop")] + public Dictionary ObjectNullableProp { get; set; } + + /// + /// Gets or Sets StringProp + /// + [JsonPropertyName("string_prop")] + public string StringProp { get; set; } /// /// Returns the string presentation of the object @@ -141,103 +153,21 @@ namespace Org.OpenAPITools.Model StringBuilder sb = new StringBuilder(); sb.Append("class NullableClass {\n"); sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" IntegerProp: ").Append(IntegerProp).Append("\n"); - sb.Append(" NumberProp: ").Append(NumberProp).Append("\n"); + sb.Append(" ArrayItemsNullable: ").Append(ArrayItemsNullable).Append("\n"); + sb.Append(" ObjectItemsNullable: ").Append(ObjectItemsNullable).Append("\n"); + sb.Append(" ArrayAndItemsNullableProp: ").Append(ArrayAndItemsNullableProp).Append("\n"); + sb.Append(" ArrayNullableProp: ").Append(ArrayNullableProp).Append("\n"); sb.Append(" BooleanProp: ").Append(BooleanProp).Append("\n"); - sb.Append(" StringProp: ").Append(StringProp).Append("\n"); sb.Append(" DateProp: ").Append(DateProp).Append("\n"); sb.Append(" DatetimeProp: ").Append(DatetimeProp).Append("\n"); - sb.Append(" ArrayNullableProp: ").Append(ArrayNullableProp).Append("\n"); - sb.Append(" ArrayAndItemsNullableProp: ").Append(ArrayAndItemsNullableProp).Append("\n"); - sb.Append(" ArrayItemsNullable: ").Append(ArrayItemsNullable).Append("\n"); - sb.Append(" ObjectNullableProp: ").Append(ObjectNullableProp).Append("\n"); + sb.Append(" IntegerProp: ").Append(IntegerProp).Append("\n"); + sb.Append(" NumberProp: ").Append(NumberProp).Append("\n"); sb.Append(" ObjectAndItemsNullableProp: ").Append(ObjectAndItemsNullableProp).Append("\n"); - sb.Append(" ObjectItemsNullable: ").Append(ObjectItemsNullable).Append("\n"); + sb.Append(" ObjectNullableProp: ").Append(ObjectNullableProp).Append("\n"); + sb.Append(" StringProp: ").Append(StringProp).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as NullableClass).AreEqual; - } - - /// - /// Returns true if NullableClass instances are equal - /// - /// Instance of NullableClass to be compared - /// Boolean - public bool Equals(NullableClass input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.IntegerProp != null) - { - hashCode = (hashCode * 59) + this.IntegerProp.GetHashCode(); - } - if (this.NumberProp != null) - { - hashCode = (hashCode * 59) + this.NumberProp.GetHashCode(); - } - if (this.BooleanProp != null) - { - hashCode = (hashCode * 59) + this.BooleanProp.GetHashCode(); - } - if (this.StringProp != null) - { - hashCode = (hashCode * 59) + this.StringProp.GetHashCode(); - } - if (this.DateProp != null) - { - hashCode = (hashCode * 59) + this.DateProp.GetHashCode(); - } - if (this.DatetimeProp != null) - { - hashCode = (hashCode * 59) + this.DatetimeProp.GetHashCode(); - } - if (this.ArrayNullableProp != null) - { - hashCode = (hashCode * 59) + this.ArrayNullableProp.GetHashCode(); - } - if (this.ArrayAndItemsNullableProp != null) - { - hashCode = (hashCode * 59) + this.ArrayAndItemsNullableProp.GetHashCode(); - } - if (this.ArrayItemsNullable != null) - { - hashCode = (hashCode * 59) + this.ArrayItemsNullable.GetHashCode(); - } - if (this.ObjectNullableProp != null) - { - hashCode = (hashCode * 59) + this.ObjectNullableProp.GetHashCode(); - } - if (this.ObjectAndItemsNullableProp != null) - { - hashCode = (hashCode * 59) + this.ObjectAndItemsNullableProp.GetHashCode(); - } - if (this.ObjectItemsNullable != null) - { - hashCode = (hashCode * 59) + this.ObjectItemsNullable.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -249,4 +179,145 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type NullableClass + /// + public class NullableClassJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override NullableClass Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + List arrayItemsNullable = default; + Dictionary objectItemsNullable = default; + List arrayAndItemsNullableProp = default; + List arrayNullableProp = default; + bool? booleanProp = default; + DateTime? dateProp = default; + DateTime? datetimeProp = default; + int? integerProp = default; + decimal? numberProp = default; + Dictionary objectAndItemsNullableProp = default; + Dictionary objectNullableProp = default; + string stringProp = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "array_items_nullable": + arrayItemsNullable = JsonSerializer.Deserialize>(ref reader, options); + break; + case "object_items_nullable": + objectItemsNullable = JsonSerializer.Deserialize>(ref reader, options); + break; + case "array_and_items_nullable_prop": + arrayAndItemsNullableProp = JsonSerializer.Deserialize>(ref reader, options); + break; + case "array_nullable_prop": + arrayNullableProp = JsonSerializer.Deserialize>(ref reader, options); + break; + case "boolean_prop": + booleanProp = reader.GetBoolean(); + break; + case "date_prop": + dateProp = JsonSerializer.Deserialize(ref reader, options); + break; + case "datetime_prop": + datetimeProp = JsonSerializer.Deserialize(ref reader, options); + break; + case "integer_prop": + if (reader.TokenType != JsonTokenType.Null) + integerProp = reader.GetInt32(); + break; + case "number_prop": + if (reader.TokenType != JsonTokenType.Null) + numberProp = reader.GetInt32(); + break; + case "object_and_items_nullable_prop": + objectAndItemsNullableProp = JsonSerializer.Deserialize>(ref reader, options); + break; + case "object_nullable_prop": + objectNullableProp = JsonSerializer.Deserialize>(ref reader, options); + break; + case "string_prop": + stringProp = reader.GetString(); + break; + default: + break; + } + } + } + + return new NullableClass(arrayItemsNullable, objectItemsNullable, arrayAndItemsNullableProp, arrayNullableProp, booleanProp, dateProp, datetimeProp, integerProp, numberProp, objectAndItemsNullableProp, objectNullableProp, stringProp); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, NullableClass nullableClass, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WritePropertyName("array_items_nullable"); + JsonSerializer.Serialize(writer, nullableClass.ArrayItemsNullable, options); + writer.WritePropertyName("object_items_nullable"); + JsonSerializer.Serialize(writer, nullableClass.ObjectItemsNullable, options); + writer.WritePropertyName("array_and_items_nullable_prop"); + JsonSerializer.Serialize(writer, nullableClass.ArrayAndItemsNullableProp, options); + writer.WritePropertyName("array_nullable_prop"); + JsonSerializer.Serialize(writer, nullableClass.ArrayNullableProp, options); + if (nullableClass.BooleanProp != null) + writer.WriteBoolean("boolean_prop", nullableClass.BooleanProp.Value); + else + writer.WriteNull("boolean_prop"); + writer.WritePropertyName("date_prop"); + JsonSerializer.Serialize(writer, nullableClass.DateProp, options); + writer.WritePropertyName("datetime_prop"); + JsonSerializer.Serialize(writer, nullableClass.DatetimeProp, options); + if (nullableClass.IntegerProp != null) + writer.WriteNumber("integer_prop", (int)nullableClass.IntegerProp.Value); + else + writer.WriteNull("integer_prop"); + if (nullableClass.NumberProp != null) + writer.WriteNumber("number_prop", (int)nullableClass.NumberProp.Value); + else + writer.WriteNull("number_prop"); + writer.WritePropertyName("object_and_items_nullable_prop"); + JsonSerializer.Serialize(writer, nullableClass.ObjectAndItemsNullableProp, options); + writer.WritePropertyName("object_nullable_prop"); + JsonSerializer.Serialize(writer, nullableClass.ObjectNullableProp, options); + writer.WriteString("string_prop", nullableClass.StringProp); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/NullableShape.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/NullableShape.cs index 5ef1763454..bcd4b60c1d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/NullableShape.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/NullableShape.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,13 +26,14 @@ namespace Org.OpenAPITools.Model /// /// The value may be a shape or the 'null' value. The 'nullable' attribute was introduced in OAS schema >= 3.0 and has been deprecated in OAS schema >= 3.1. /// - public partial class NullableShape : IEquatable, IValidatableObject + public partial class NullableShape : IValidatableObject { /// /// Initializes a new instance of the class. /// /// - public NullableShape(Triangle triangle) + [JsonConstructor] + internal NullableShape(Triangle triangle) { Triangle = triangle; } @@ -42,7 +42,8 @@ namespace Org.OpenAPITools.Model /// Initializes a new instance of the class. /// /// - public NullableShape(Quadrilateral quadrilateral) + [JsonConstructor] + internal NullableShape(Quadrilateral quadrilateral) { Quadrilateral = quadrilateral; } @@ -61,7 +62,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -75,44 +76,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as NullableShape).AreEqual; - } - - /// - /// Returns true if NullableShape instances are equal - /// - /// Instance of NullableShape to be compared - /// Boolean - public bool Equals(NullableShape input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -139,13 +102,6 @@ namespace Org.OpenAPITools.Model /// public class NullableShapeJsonConverter : JsonConverter { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof(NullableShape).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -158,9 +114,11 @@ namespace Org.OpenAPITools.Model { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); + JsonTokenType startingTokenType = reader.TokenType; + Utf8JsonReader triangleReader = reader; bool triangleDeserialized = Client.ClientUtils.TryDeserialize(ref triangleReader, options, out Triangle triangle); @@ -170,16 +128,21 @@ namespace Org.OpenAPITools.Model while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string propertyName = reader.GetString(); reader.Read(); switch (propertyName) { + default: + break; } } } @@ -200,6 +163,12 @@ namespace Org.OpenAPITools.Model /// /// /// - public override void Write(Utf8JsonWriter writer, NullableShape nullableShape, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, NullableShape nullableShape, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + + writer.WriteEndObject(); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/NumberOnly.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/NumberOnly.cs index 64f6395b60..035a084d72 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/NumberOnly.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/NumberOnly.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,14 +26,24 @@ namespace Org.OpenAPITools.Model /// /// NumberOnly /// - public partial class NumberOnly : IEquatable, IValidatableObject + public partial class NumberOnly : IValidatableObject { /// /// Initializes a new instance of the class. /// /// justNumber - public NumberOnly(decimal justNumber = default) + [JsonConstructor] + public NumberOnly(decimal justNumber) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (justNumber == null) + throw new ArgumentNullException("justNumber is a required property for NumberOnly and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + JustNumber = justNumber; } @@ -48,7 +57,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -63,45 +72,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as NumberOnly).AreEqual; - } - - /// - /// Returns true if NumberOnly instances are equal - /// - /// Instance of NumberOnly to be compared - /// Boolean - public bool Equals(NumberOnly input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.JustNumber.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -113,4 +83,71 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type NumberOnly + /// + public class NumberOnlyJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override NumberOnly Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + decimal justNumber = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "JustNumber": + justNumber = reader.GetInt32(); + break; + default: + break; + } + } + } + + return new NumberOnly(justNumber); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, NumberOnly numberOnly, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteNumber("JustNumber", (int)numberOnly.JustNumber); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs index 817af80674..26f0d3f5fa 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,43 +26,42 @@ namespace Org.OpenAPITools.Model /// /// ObjectWithDeprecatedFields /// - public partial class ObjectWithDeprecatedFields : IEquatable, IValidatableObject + public partial class ObjectWithDeprecatedFields : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// uuid - /// id - /// deprecatedRef /// bars - public ObjectWithDeprecatedFields(string uuid = default, decimal id = default, DeprecatedObject deprecatedRef = default, List bars = default) + /// deprecatedRef + /// id + /// uuid + [JsonConstructor] + public ObjectWithDeprecatedFields(List bars, DeprecatedObject deprecatedRef, decimal id, string uuid) { - Uuid = uuid; - Id = id; - DeprecatedRef = deprecatedRef; +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (uuid == null) + throw new ArgumentNullException("uuid is a required property for ObjectWithDeprecatedFields and cannot be null."); + + if (id == null) + throw new ArgumentNullException("id is a required property for ObjectWithDeprecatedFields and cannot be null."); + + if (deprecatedRef == null) + throw new ArgumentNullException("deprecatedRef is a required property for ObjectWithDeprecatedFields and cannot be null."); + + if (bars == null) + throw new ArgumentNullException("bars is a required property for ObjectWithDeprecatedFields and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + Bars = bars; + DeprecatedRef = deprecatedRef; + Id = id; + Uuid = uuid; } - /// - /// Gets or Sets Uuid - /// - [JsonPropertyName("uuid")] - public string Uuid { get; set; } - - /// - /// Gets or Sets Id - /// - [JsonPropertyName("id")] - [Obsolete] - public decimal Id { get; set; } - - /// - /// Gets or Sets DeprecatedRef - /// - [JsonPropertyName("deprecatedRef")] - [Obsolete] - public DeprecatedObject DeprecatedRef { get; set; } - /// /// Gets or Sets Bars /// @@ -71,11 +69,31 @@ namespace Org.OpenAPITools.Model [Obsolete] public List Bars { get; set; } + /// + /// Gets or Sets DeprecatedRef + /// + [JsonPropertyName("deprecatedRef")] + [Obsolete] + public DeprecatedObject DeprecatedRef { get; set; } + + /// + /// Gets or Sets Id + /// + [JsonPropertyName("id")] + [Obsolete] + public decimal Id { get; set; } + + /// + /// Gets or Sets Uuid + /// + [JsonPropertyName("uuid")] + public string Uuid { get; set; } + /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -85,65 +103,14 @@ namespace Org.OpenAPITools.Model { StringBuilder sb = new StringBuilder(); sb.Append("class ObjectWithDeprecatedFields {\n"); - sb.Append(" Uuid: ").Append(Uuid).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" DeprecatedRef: ").Append(DeprecatedRef).Append("\n"); sb.Append(" Bars: ").Append(Bars).Append("\n"); + sb.Append(" DeprecatedRef: ").Append(DeprecatedRef).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Uuid: ").Append(Uuid).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as ObjectWithDeprecatedFields).AreEqual; - } - - /// - /// Returns true if ObjectWithDeprecatedFields instances are equal - /// - /// Instance of ObjectWithDeprecatedFields to be compared - /// Boolean - public bool Equals(ObjectWithDeprecatedFields input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Uuid != null) - { - hashCode = (hashCode * 59) + this.Uuid.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - if (this.DeprecatedRef != null) - { - hashCode = (hashCode * 59) + this.DeprecatedRef.GetHashCode(); - } - if (this.Bars != null) - { - hashCode = (hashCode * 59) + this.Bars.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -155,4 +122,88 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type ObjectWithDeprecatedFields + /// + public class ObjectWithDeprecatedFieldsJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override ObjectWithDeprecatedFields Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + List bars = default; + DeprecatedObject deprecatedRef = default; + decimal id = default; + string uuid = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "bars": + bars = JsonSerializer.Deserialize>(ref reader, options); + break; + case "deprecatedRef": + deprecatedRef = JsonSerializer.Deserialize(ref reader, options); + break; + case "id": + id = reader.GetInt32(); + break; + case "uuid": + uuid = reader.GetString(); + break; + default: + break; + } + } + } + + return new ObjectWithDeprecatedFields(bars, deprecatedRef, id, uuid); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ObjectWithDeprecatedFields objectWithDeprecatedFields, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WritePropertyName("bars"); + JsonSerializer.Serialize(writer, objectWithDeprecatedFields.Bars, options); + writer.WritePropertyName("deprecatedRef"); + JsonSerializer.Serialize(writer, objectWithDeprecatedFields.DeprecatedRef, options); + writer.WriteNumber("id", (int)objectWithDeprecatedFields.Id); + writer.WriteString("uuid", objectWithDeprecatedFields.Uuid); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Order.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Order.cs index 2fef14a9c5..62777359e7 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Order.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Order.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,7 +26,7 @@ namespace Org.OpenAPITools.Model /// /// Order /// - public partial class Order : IEquatable, IValidatableObject + public partial class Order : IValidatableObject { /// /// Initializes a new instance of the class. @@ -38,8 +37,33 @@ namespace Org.OpenAPITools.Model /// shipDate /// Order Status /// complete (default to false) - public Order(long id = default, long petId = default, int quantity = default, DateTime shipDate = default, StatusEnum status = default, bool complete = false) + [JsonConstructor] + public Order(long id, long petId, int quantity, DateTime shipDate, StatusEnum status, bool complete = false) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (id == null) + throw new ArgumentNullException("id is a required property for Order and cannot be null."); + + if (petId == null) + throw new ArgumentNullException("petId is a required property for Order and cannot be null."); + + if (quantity == null) + throw new ArgumentNullException("quantity is a required property for Order and cannot be null."); + + if (shipDate == null) + throw new ArgumentNullException("shipDate is a required property for Order and cannot be null."); + + if (status == null) + throw new ArgumentNullException("status is a required property for Order and cannot be null."); + + if (complete == null) + throw new ArgumentNullException("complete is a required property for Order and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + Id = id; PetId = petId; Quantity = quantity; @@ -57,23 +81,59 @@ namespace Org.OpenAPITools.Model /// /// Enum Placed for value: placed /// - [EnumMember(Value = "placed")] Placed = 1, /// /// Enum Approved for value: approved /// - [EnumMember(Value = "approved")] Approved = 2, /// /// Enum Delivered for value: delivered /// - [EnumMember(Value = "delivered")] Delivered = 3 } + /// + /// Returns a StatusEnum + /// + /// + /// + public static StatusEnum StatusEnumFromString(string value) + { + if (value == "placed") + return StatusEnum.Placed; + + if (value == "approved") + return StatusEnum.Approved; + + if (value == "delivered") + return StatusEnum.Delivered; + + throw new NotImplementedException($"Could not convert value to type StatusEnum: '{value}'"); + } + + /// + /// Returns equivalent json value + /// + /// + /// + /// + public static string StatusEnumToJsonValue(StatusEnum value) + { + if (value == StatusEnum.Placed) + return "placed"; + + if (value == StatusEnum.Approved) + return "approved"; + + if (value == StatusEnum.Delivered) + return "delivered"; + + throw new NotImplementedException($"Value could not be handled: '{value}'"); + } + /// /// Order Status /// @@ -115,7 +175,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -135,53 +195,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Order).AreEqual; - } - - /// - /// Returns true if Order instances are equal - /// - /// Instance of Order to be compared - /// Boolean - public bool Equals(Order input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - hashCode = (hashCode * 59) + this.PetId.GetHashCode(); - hashCode = (hashCode * 59) + this.Quantity.GetHashCode(); - if (this.ShipDate != null) - { - hashCode = (hashCode * 59) + this.ShipDate.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - hashCode = (hashCode * 59) + this.Complete.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -193,4 +206,102 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type Order + /// + public class OrderJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override Order Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + long id = default; + long petId = default; + int quantity = default; + DateTime shipDate = default; + Order.StatusEnum status = default; + bool complete = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "id": + id = reader.GetInt64(); + break; + case "petId": + petId = reader.GetInt64(); + break; + case "quantity": + quantity = reader.GetInt32(); + break; + case "shipDate": + shipDate = JsonSerializer.Deserialize(ref reader, options); + break; + case "status": + string statusRawValue = reader.GetString(); + status = Order.StatusEnumFromString(statusRawValue); + break; + case "complete": + complete = reader.GetBoolean(); + break; + default: + break; + } + } + } + + return new Order(id, petId, quantity, shipDate, status, complete); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Order order, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteNumber("id", (int)order.Id); + writer.WriteNumber("petId", (int)order.PetId); + writer.WriteNumber("quantity", (int)order.Quantity); + writer.WritePropertyName("shipDate"); + JsonSerializer.Serialize(writer, order.ShipDate, options); + var statusRawValue = Order.StatusEnumToJsonValue(order.Status); + if (statusRawValue != null) + writer.WriteString("status", statusRawValue); + else + writer.WriteNull("status"); + writer.WriteBoolean("complete", order.Complete); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/OuterComposite.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/OuterComposite.cs index 390b308657..13f5f05b58 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/OuterComposite.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/OuterComposite.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,21 +26,43 @@ namespace Org.OpenAPITools.Model /// /// OuterComposite /// - public partial class OuterComposite : IEquatable, IValidatableObject + public partial class OuterComposite : IValidatableObject { /// /// Initializes a new instance of the class. /// + /// myBoolean /// myNumber /// myString - /// myBoolean - public OuterComposite(decimal myNumber = default, string myString = default, bool myBoolean = default) + [JsonConstructor] + public OuterComposite(bool myBoolean, decimal myNumber, string myString) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (myNumber == null) + throw new ArgumentNullException("myNumber is a required property for OuterComposite and cannot be null."); + + if (myString == null) + throw new ArgumentNullException("myString is a required property for OuterComposite and cannot be null."); + + if (myBoolean == null) + throw new ArgumentNullException("myBoolean is a required property for OuterComposite and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + MyBoolean = myBoolean; MyNumber = myNumber; MyString = myString; - MyBoolean = myBoolean; } + /// + /// Gets or Sets MyBoolean + /// + [JsonPropertyName("my_boolean")] + public bool MyBoolean { get; set; } + /// /// Gets or Sets MyNumber /// @@ -54,17 +75,11 @@ namespace Org.OpenAPITools.Model [JsonPropertyName("my_string")] public string MyString { get; set; } - /// - /// Gets or Sets MyBoolean - /// - [JsonPropertyName("my_boolean")] - public bool MyBoolean { get; set; } - /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -74,57 +89,13 @@ namespace Org.OpenAPITools.Model { StringBuilder sb = new StringBuilder(); sb.Append("class OuterComposite {\n"); + sb.Append(" MyBoolean: ").Append(MyBoolean).Append("\n"); sb.Append(" MyNumber: ").Append(MyNumber).Append("\n"); sb.Append(" MyString: ").Append(MyString).Append("\n"); - sb.Append(" MyBoolean: ").Append(MyBoolean).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as OuterComposite).AreEqual; - } - - /// - /// Returns true if OuterComposite instances are equal - /// - /// Instance of OuterComposite to be compared - /// Boolean - public bool Equals(OuterComposite input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.MyNumber.GetHashCode(); - if (this.MyString != null) - { - hashCode = (hashCode * 59) + this.MyString.GetHashCode(); - } - hashCode = (hashCode * 59) + this.MyBoolean.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -136,4 +107,81 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type OuterComposite + /// + public class OuterCompositeJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override OuterComposite Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + bool myBoolean = default; + decimal myNumber = default; + string myString = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "my_boolean": + myBoolean = reader.GetBoolean(); + break; + case "my_number": + myNumber = reader.GetInt32(); + break; + case "my_string": + myString = reader.GetString(); + break; + default: + break; + } + } + } + + return new OuterComposite(myBoolean, myNumber, myString); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, OuterComposite outerComposite, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteBoolean("my_boolean", outerComposite.MyBoolean); + writer.WriteNumber("my_number", (int)outerComposite.MyNumber); + writer.WriteString("my_string", outerComposite.MyString); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/OuterEnum.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/OuterEnum.cs index 8496c41332..31e3049659 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/OuterEnum.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/OuterEnum.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -32,20 +31,129 @@ namespace Org.OpenAPITools.Model /// /// Enum Placed for value: placed /// - [EnumMember(Value = "placed")] Placed = 1, /// /// Enum Approved for value: approved /// - [EnumMember(Value = "approved")] Approved = 2, /// /// Enum Delivered for value: delivered /// - [EnumMember(Value = "delivered")] Delivered = 3 } + + public class OuterEnumConverter : JsonConverter + { + public static OuterEnum FromString(string value) + { + if (value == "placed") + return OuterEnum.Placed; + + if (value == "approved") + return OuterEnum.Approved; + + if (value == "delivered") + return OuterEnum.Delivered; + + throw new NotImplementedException($"Could not convert value to type OuterEnum: '{value}'"); + } + + public static OuterEnum? FromStringOrDefault(string value) + { + if (value == "placed") + return OuterEnum.Placed; + + if (value == "approved") + return OuterEnum.Approved; + + if (value == "delivered") + return OuterEnum.Delivered; + + return null; + } + + public static string ToJsonValue(OuterEnum value) + { + if (value == OuterEnum.Placed) + return "placed"; + + if (value == OuterEnum.Approved) + return "approved"; + + if (value == OuterEnum.Delivered) + return "delivered"; + + throw new NotImplementedException($"Value could not be handled: '{value}'"); + } + + /// + /// Returns a from the Json object + /// + /// + /// + /// + /// + public override OuterEnum Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string rawValue = reader.GetString(); + + OuterEnum? result = OuterEnumConverter.FromString(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the OuterEnum to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, OuterEnum outerEnum, JsonSerializerOptions options) + { + writer.WriteStringValue(outerEnum.ToString()); + } + } + + public class OuterEnumNullableConverter : JsonConverter + { + /// + /// Returns a OuterEnum from the Json object + /// + /// + /// + /// + /// + public override OuterEnum? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string rawValue = reader.GetString(); + + if (rawValue == null) + return null; + + OuterEnum? result = OuterEnumConverter.FromString(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, OuterEnum? outerEnum, JsonSerializerOptions options) + { + writer.WriteStringValue(outerEnum?.ToString() ?? "null"); + } + } + } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs index b0f9d099e2..d3f7db5b4f 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -32,20 +31,129 @@ namespace Org.OpenAPITools.Model /// /// Enum Placed for value: placed /// - [EnumMember(Value = "placed")] Placed = 1, /// /// Enum Approved for value: approved /// - [EnumMember(Value = "approved")] Approved = 2, /// /// Enum Delivered for value: delivered /// - [EnumMember(Value = "delivered")] Delivered = 3 } + + public class OuterEnumDefaultValueConverter : JsonConverter + { + public static OuterEnumDefaultValue FromString(string value) + { + if (value == "placed") + return OuterEnumDefaultValue.Placed; + + if (value == "approved") + return OuterEnumDefaultValue.Approved; + + if (value == "delivered") + return OuterEnumDefaultValue.Delivered; + + throw new NotImplementedException($"Could not convert value to type OuterEnumDefaultValue: '{value}'"); + } + + public static OuterEnumDefaultValue? FromStringOrDefault(string value) + { + if (value == "placed") + return OuterEnumDefaultValue.Placed; + + if (value == "approved") + return OuterEnumDefaultValue.Approved; + + if (value == "delivered") + return OuterEnumDefaultValue.Delivered; + + return null; + } + + public static string ToJsonValue(OuterEnumDefaultValue value) + { + if (value == OuterEnumDefaultValue.Placed) + return "placed"; + + if (value == OuterEnumDefaultValue.Approved) + return "approved"; + + if (value == OuterEnumDefaultValue.Delivered) + return "delivered"; + + throw new NotImplementedException($"Value could not be handled: '{value}'"); + } + + /// + /// Returns a from the Json object + /// + /// + /// + /// + /// + public override OuterEnumDefaultValue Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string rawValue = reader.GetString(); + + OuterEnumDefaultValue? result = OuterEnumDefaultValueConverter.FromString(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the OuterEnumDefaultValue to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, OuterEnumDefaultValue outerEnumDefaultValue, JsonSerializerOptions options) + { + writer.WriteStringValue(outerEnumDefaultValue.ToString()); + } + } + + public class OuterEnumDefaultValueNullableConverter : JsonConverter + { + /// + /// Returns a OuterEnumDefaultValue from the Json object + /// + /// + /// + /// + /// + public override OuterEnumDefaultValue? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string rawValue = reader.GetString(); + + if (rawValue == null) + return null; + + OuterEnumDefaultValue? result = OuterEnumDefaultValueConverter.FromString(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, OuterEnumDefaultValue? outerEnumDefaultValue, JsonSerializerOptions options) + { + writer.WriteStringValue(outerEnumDefaultValue?.ToString() ?? "null"); + } + } + } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/OuterEnumInteger.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/OuterEnumInteger.cs index 56069346c2..e704048b8c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/OuterEnumInteger.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/OuterEnumInteger.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -45,4 +44,107 @@ namespace Org.OpenAPITools.Model NUMBER_2 = 2 } + + public class OuterEnumIntegerConverter : JsonConverter + { + public static OuterEnumInteger FromString(string value) + { + if (value == (0).ToString()) + return OuterEnumInteger.NUMBER_0; + + if (value == (1).ToString()) + return OuterEnumInteger.NUMBER_1; + + if (value == (2).ToString()) + return OuterEnumInteger.NUMBER_2; + + throw new NotImplementedException($"Could not convert value to type OuterEnumInteger: '{value}'"); + } + + public static OuterEnumInteger? FromStringOrDefault(string value) + { + if (value == (0).ToString()) + return OuterEnumInteger.NUMBER_0; + + if (value == (1).ToString()) + return OuterEnumInteger.NUMBER_1; + + if (value == (2).ToString()) + return OuterEnumInteger.NUMBER_2; + + return null; + } + + public static int ToJsonValue(OuterEnumInteger value) + { + return (int) value; + } + + /// + /// Returns a from the Json object + /// + /// + /// + /// + /// + public override OuterEnumInteger Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string rawValue = reader.GetString(); + + OuterEnumInteger? result = OuterEnumIntegerConverter.FromString(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the OuterEnumInteger to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, OuterEnumInteger outerEnumInteger, JsonSerializerOptions options) + { + writer.WriteStringValue(outerEnumInteger.ToString()); + } + } + + public class OuterEnumIntegerNullableConverter : JsonConverter + { + /// + /// Returns a OuterEnumInteger from the Json object + /// + /// + /// + /// + /// + public override OuterEnumInteger? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string rawValue = reader.GetString(); + + if (rawValue == null) + return null; + + OuterEnumInteger? result = OuterEnumIntegerConverter.FromString(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, OuterEnumInteger? outerEnumInteger, JsonSerializerOptions options) + { + writer.WriteStringValue(outerEnumInteger?.ToString() ?? "null"); + } + } + } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs index e80f88f51f..8e559a7975 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -45,4 +44,107 @@ namespace Org.OpenAPITools.Model NUMBER_2 = 2 } + + public class OuterEnumIntegerDefaultValueConverter : JsonConverter + { + public static OuterEnumIntegerDefaultValue FromString(string value) + { + if (value == (0).ToString()) + return OuterEnumIntegerDefaultValue.NUMBER_0; + + if (value == (1).ToString()) + return OuterEnumIntegerDefaultValue.NUMBER_1; + + if (value == (2).ToString()) + return OuterEnumIntegerDefaultValue.NUMBER_2; + + throw new NotImplementedException($"Could not convert value to type OuterEnumIntegerDefaultValue: '{value}'"); + } + + public static OuterEnumIntegerDefaultValue? FromStringOrDefault(string value) + { + if (value == (0).ToString()) + return OuterEnumIntegerDefaultValue.NUMBER_0; + + if (value == (1).ToString()) + return OuterEnumIntegerDefaultValue.NUMBER_1; + + if (value == (2).ToString()) + return OuterEnumIntegerDefaultValue.NUMBER_2; + + return null; + } + + public static int ToJsonValue(OuterEnumIntegerDefaultValue value) + { + return (int) value; + } + + /// + /// Returns a from the Json object + /// + /// + /// + /// + /// + public override OuterEnumIntegerDefaultValue Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string rawValue = reader.GetString(); + + OuterEnumIntegerDefaultValue? result = OuterEnumIntegerDefaultValueConverter.FromString(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the OuterEnumIntegerDefaultValue to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue, JsonSerializerOptions options) + { + writer.WriteStringValue(outerEnumIntegerDefaultValue.ToString()); + } + } + + public class OuterEnumIntegerDefaultValueNullableConverter : JsonConverter + { + /// + /// Returns a OuterEnumIntegerDefaultValue from the Json object + /// + /// + /// + /// + /// + public override OuterEnumIntegerDefaultValue? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string rawValue = reader.GetString(); + + if (rawValue == null) + return null; + + OuterEnumIntegerDefaultValue? result = OuterEnumIntegerDefaultValueConverter.FromString(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, OuterEnumIntegerDefaultValue? outerEnumIntegerDefaultValue, JsonSerializerOptions options) + { + writer.WriteStringValue(outerEnumIntegerDefaultValue?.ToString() ?? "null"); + } + } + } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ParentPet.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ParentPet.cs index 244b3b9384..fa0bfd0120 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ParentPet.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ParentPet.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,13 +26,14 @@ namespace Org.OpenAPITools.Model /// /// ParentPet /// - public partial class ParentPet : GrandparentAnimal, IEquatable + public partial class ParentPet : GrandparentAnimal, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// petType (required) - public ParentPet(string petType) : base(petType) + /// petType + [JsonConstructor] + internal ParentPet(string petType) : base(petType) { } @@ -49,40 +49,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as ParentPet).AreEqual; - } - - /// - /// Returns true if ParentPet instances are equal - /// - /// Instance of ParentPet to be compared - /// Boolean - public bool Equals(ParentPet input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - return hashCode; - } - } - } /// @@ -90,13 +56,6 @@ namespace Org.OpenAPITools.Model /// public class ParentPetJsonConverter : JsonConverter { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof(ParentPet).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -109,17 +68,22 @@ namespace Org.OpenAPITools.Model { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); + JsonTokenType startingTokenType = reader.TokenType; + string petType = default; while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string propertyName = reader.GetString(); reader.Read(); @@ -129,6 +93,8 @@ namespace Org.OpenAPITools.Model case "pet_type": petType = reader.GetString(); break; + default: + break; } } } @@ -143,6 +109,13 @@ namespace Org.OpenAPITools.Model /// /// /// - public override void Write(Utf8JsonWriter writer, ParentPet parentPet, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, ParentPet parentPet, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("pet_type", parentPet.PetType); + + writer.WriteEndObject(); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Pet.cs index 0091def60e..ad0e158779 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Pet.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,31 +26,50 @@ namespace Org.OpenAPITools.Model /// /// Pet /// - public partial class Pet : IEquatable, IValidatableObject + public partial class Pet : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// name (required) - /// photoUrls (required) - /// id /// category - /// tags + /// id + /// name + /// photoUrls /// pet status in the store - public Pet(string name, List photoUrls, long id = default, Category category = default, List tags = default, StatusEnum status = default) + /// tags + [JsonConstructor] + public Pet(Category category, long id, string name, List photoUrls, StatusEnum status, List tags) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (id == null) + throw new ArgumentNullException("id is a required property for Pet and cannot be null."); + + if (category == null) + throw new ArgumentNullException("category is a required property for Pet and cannot be null."); + if (name == null) throw new ArgumentNullException("name is a required property for Pet and cannot be null."); if (photoUrls == null) throw new ArgumentNullException("photoUrls is a required property for Pet and cannot be null."); + if (tags == null) + throw new ArgumentNullException("tags is a required property for Pet and cannot be null."); + + if (status == null) + throw new ArgumentNullException("status is a required property for Pet and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + Category = category; + Id = id; Name = name; PhotoUrls = photoUrls; - Id = id; - Category = category; - Tags = tags; Status = status; + Tags = tags; } /// @@ -63,23 +81,59 @@ namespace Org.OpenAPITools.Model /// /// Enum Available for value: available /// - [EnumMember(Value = "available")] Available = 1, /// /// Enum Pending for value: pending /// - [EnumMember(Value = "pending")] Pending = 2, /// /// Enum Sold for value: sold /// - [EnumMember(Value = "sold")] Sold = 3 } + /// + /// Returns a StatusEnum + /// + /// + /// + public static StatusEnum StatusEnumFromString(string value) + { + if (value == "available") + return StatusEnum.Available; + + if (value == "pending") + return StatusEnum.Pending; + + if (value == "sold") + return StatusEnum.Sold; + + throw new NotImplementedException($"Could not convert value to type StatusEnum: '{value}'"); + } + + /// + /// Returns equivalent json value + /// + /// + /// + /// + public static string StatusEnumToJsonValue(StatusEnum value) + { + if (value == StatusEnum.Available) + return "available"; + + if (value == StatusEnum.Pending) + return "pending"; + + if (value == StatusEnum.Sold) + return "sold"; + + throw new NotImplementedException($"Value could not be handled: '{value}'"); + } + /// /// pet status in the store /// @@ -87,6 +141,18 @@ namespace Org.OpenAPITools.Model [JsonPropertyName("status")] public StatusEnum Status { get; set; } + /// + /// Gets or Sets Category + /// + [JsonPropertyName("category")] + public Category Category { get; set; } + + /// + /// Gets or Sets Id + /// + [JsonPropertyName("id")] + public long Id { get; set; } + /// /// Gets or Sets Name /// @@ -99,18 +165,6 @@ namespace Org.OpenAPITools.Model [JsonPropertyName("photoUrls")] public List PhotoUrls { get; set; } - /// - /// Gets or Sets Id - /// - [JsonPropertyName("id")] - public long Id { get; set; } - - /// - /// Gets or Sets Category - /// - [JsonPropertyName("category")] - public Category Category { get; set; } - /// /// Gets or Sets Tags /// @@ -121,7 +175,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -131,72 +185,16 @@ namespace Org.OpenAPITools.Model { StringBuilder sb = new StringBuilder(); sb.Append("class Pet {\n"); + sb.Append(" Category: ").Append(Category).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); sb.Append(" Name: ").Append(Name).Append("\n"); sb.Append(" PhotoUrls: ").Append(PhotoUrls).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Category: ").Append(Category).Append("\n"); - sb.Append(" Tags: ").Append(Tags).Append("\n"); sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" Tags: ").Append(Tags).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Pet).AreEqual; - } - - /// - /// Returns true if Pet instances are equal - /// - /// Instance of Pet to be compared - /// Boolean - public bool Equals(Pet input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.PhotoUrls != null) - { - hashCode = (hashCode * 59) + this.PhotoUrls.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - if (this.Category != null) - { - hashCode = (hashCode * 59) + this.Category.GetHashCode(); - } - if (this.Tags != null) - { - hashCode = (hashCode * 59) + this.Tags.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -208,4 +206,104 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type Pet + /// + public class PetJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override Pet Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + Category category = default; + long id = default; + string name = default; + List photoUrls = default; + Pet.StatusEnum status = default; + List tags = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "category": + category = JsonSerializer.Deserialize(ref reader, options); + break; + case "id": + id = reader.GetInt64(); + break; + case "name": + name = reader.GetString(); + break; + case "photoUrls": + photoUrls = JsonSerializer.Deserialize>(ref reader, options); + break; + case "status": + string statusRawValue = reader.GetString(); + status = Pet.StatusEnumFromString(statusRawValue); + break; + case "tags": + tags = JsonSerializer.Deserialize>(ref reader, options); + break; + default: + break; + } + } + } + + return new Pet(category, id, name, photoUrls, status, tags); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Pet pet, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WritePropertyName("category"); + JsonSerializer.Serialize(writer, pet.Category, options); + writer.WriteNumber("id", (int)pet.Id); + writer.WriteString("name", pet.Name); + writer.WritePropertyName("photoUrls"); + JsonSerializer.Serialize(writer, pet.PhotoUrls, options); + var statusRawValue = Pet.StatusEnumToJsonValue(pet.Status); + if (statusRawValue != null) + writer.WriteString("status", statusRawValue); + else + writer.WriteNull("status"); + writer.WritePropertyName("tags"); + JsonSerializer.Serialize(writer, pet.Tags, options); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Pig.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Pig.cs index 4eb947b014..b2292d1331 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Pig.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Pig.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,13 +26,14 @@ namespace Org.OpenAPITools.Model /// /// Pig /// - public partial class Pig : IEquatable, IValidatableObject + public partial class Pig : IValidatableObject { /// /// Initializes a new instance of the class. /// /// - public Pig(BasquePig basquePig) + [JsonConstructor] + internal Pig(BasquePig basquePig) { BasquePig = basquePig; } @@ -42,7 +42,8 @@ namespace Org.OpenAPITools.Model /// Initializes a new instance of the class. /// /// - public Pig(DanishPig danishPig) + [JsonConstructor] + internal Pig(DanishPig danishPig) { DanishPig = danishPig; } @@ -61,7 +62,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -75,44 +76,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Pig).AreEqual; - } - - /// - /// Returns true if Pig instances are equal - /// - /// Instance of Pig to be compared - /// Boolean - public bool Equals(Pig input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -139,13 +102,6 @@ namespace Org.OpenAPITools.Model /// public class PigJsonConverter : JsonConverter { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof(Pig).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -158,9 +114,11 @@ namespace Org.OpenAPITools.Model { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); + JsonTokenType startingTokenType = reader.TokenType; + Utf8JsonReader basquePigReader = reader; bool basquePigDeserialized = Client.ClientUtils.TryDeserialize(ref basquePigReader, options, out BasquePig basquePig); @@ -170,16 +128,21 @@ namespace Org.OpenAPITools.Model while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string propertyName = reader.GetString(); reader.Read(); switch (propertyName) { + default: + break; } } } @@ -200,6 +163,12 @@ namespace Org.OpenAPITools.Model /// /// /// - public override void Write(Utf8JsonWriter writer, Pig pig, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, Pig pig, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + + writer.WriteEndObject(); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/PolymorphicProperty.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/PolymorphicProperty.cs index 1152b4e63f..e7a0314545 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/PolymorphicProperty.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/PolymorphicProperty.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,13 +26,14 @@ namespace Org.OpenAPITools.Model /// /// PolymorphicProperty /// - public partial class PolymorphicProperty : IEquatable, IValidatableObject + public partial class PolymorphicProperty : IValidatableObject { /// /// Initializes a new instance of the class. /// /// - public PolymorphicProperty(bool _bool) + [JsonConstructor] + internal PolymorphicProperty(bool _bool) { Bool = _bool; } @@ -42,7 +42,8 @@ namespace Org.OpenAPITools.Model /// Initializes a new instance of the class. /// /// - public PolymorphicProperty(string _string) + [JsonConstructor] + internal PolymorphicProperty(string _string) { String = _string; } @@ -51,7 +52,8 @@ namespace Org.OpenAPITools.Model /// Initializes a new instance of the class. /// /// - public PolymorphicProperty(Object _object) + [JsonConstructor] + internal PolymorphicProperty(Object _object) { Object = _object; } @@ -60,7 +62,8 @@ namespace Org.OpenAPITools.Model /// Initializes a new instance of the class. /// /// - public PolymorphicProperty(List liststring) + [JsonConstructor] + internal PolymorphicProperty(List liststring) { Liststring = liststring; } @@ -89,7 +92,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -103,44 +106,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as PolymorphicProperty).AreEqual; - } - - /// - /// Returns true if PolymorphicProperty instances are equal - /// - /// Instance of PolymorphicProperty to be compared - /// Boolean - public bool Equals(PolymorphicProperty input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -157,13 +122,6 @@ namespace Org.OpenAPITools.Model /// public class PolymorphicPropertyJsonConverter : JsonConverter { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof(PolymorphicProperty).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -176,9 +134,11 @@ namespace Org.OpenAPITools.Model { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); + JsonTokenType startingTokenType = reader.TokenType; + Utf8JsonReader _boolReader = reader; bool _boolDeserialized = Client.ClientUtils.TryDeserialize(ref _boolReader, options, out bool _bool); @@ -194,16 +154,21 @@ namespace Org.OpenAPITools.Model while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string propertyName = reader.GetString(); reader.Read(); switch (propertyName) { + default: + break; } } } @@ -230,6 +195,12 @@ namespace Org.OpenAPITools.Model /// /// /// - public override void Write(Utf8JsonWriter writer, PolymorphicProperty polymorphicProperty, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, PolymorphicProperty polymorphicProperty, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + + writer.WriteEndObject(); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Quadrilateral.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Quadrilateral.cs index 47e72d44ab..d1dcd22b8e 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Quadrilateral.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Quadrilateral.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,13 +26,14 @@ namespace Org.OpenAPITools.Model /// /// Quadrilateral /// - public partial class Quadrilateral : IEquatable, IValidatableObject + public partial class Quadrilateral : IValidatableObject { /// /// Initializes a new instance of the class. /// /// - public Quadrilateral(SimpleQuadrilateral simpleQuadrilateral) + [JsonConstructor] + internal Quadrilateral(SimpleQuadrilateral simpleQuadrilateral) { SimpleQuadrilateral = simpleQuadrilateral; } @@ -42,7 +42,8 @@ namespace Org.OpenAPITools.Model /// Initializes a new instance of the class. /// /// - public Quadrilateral(ComplexQuadrilateral complexQuadrilateral) + [JsonConstructor] + internal Quadrilateral(ComplexQuadrilateral complexQuadrilateral) { ComplexQuadrilateral = complexQuadrilateral; } @@ -61,7 +62,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -75,44 +76,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Quadrilateral).AreEqual; - } - - /// - /// Returns true if Quadrilateral instances are equal - /// - /// Instance of Quadrilateral to be compared - /// Boolean - public bool Equals(Quadrilateral input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -139,13 +102,6 @@ namespace Org.OpenAPITools.Model /// public class QuadrilateralJsonConverter : JsonConverter { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof(Quadrilateral).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -158,9 +114,11 @@ namespace Org.OpenAPITools.Model { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); + JsonTokenType startingTokenType = reader.TokenType; + Utf8JsonReader simpleQuadrilateralReader = reader; bool simpleQuadrilateralDeserialized = Client.ClientUtils.TryDeserialize(ref simpleQuadrilateralReader, options, out SimpleQuadrilateral simpleQuadrilateral); @@ -170,16 +128,21 @@ namespace Org.OpenAPITools.Model while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string propertyName = reader.GetString(); reader.Read(); switch (propertyName) { + default: + break; } } } @@ -200,6 +163,12 @@ namespace Org.OpenAPITools.Model /// /// /// - public override void Write(Utf8JsonWriter writer, Quadrilateral quadrilateral, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, Quadrilateral quadrilateral, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + + writer.WriteEndObject(); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs index 046b9050ba..6faf1ddd50 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,17 +26,24 @@ namespace Org.OpenAPITools.Model /// /// QuadrilateralInterface /// - public partial class QuadrilateralInterface : IEquatable, IValidatableObject + public partial class QuadrilateralInterface : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// quadrilateralType (required) + /// quadrilateralType + [JsonConstructor] public QuadrilateralInterface(string quadrilateralType) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + if (quadrilateralType == null) throw new ArgumentNullException("quadrilateralType is a required property for QuadrilateralInterface and cannot be null."); +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + QuadrilateralType = quadrilateralType; } @@ -51,7 +57,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -66,48 +72,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as QuadrilateralInterface).AreEqual; - } - - /// - /// Returns true if QuadrilateralInterface instances are equal - /// - /// Instance of QuadrilateralInterface to be compared - /// Boolean - public bool Equals(QuadrilateralInterface input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.QuadrilateralType != null) - { - hashCode = (hashCode * 59) + this.QuadrilateralType.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -119,4 +83,71 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type QuadrilateralInterface + /// + public class QuadrilateralInterfaceJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override QuadrilateralInterface Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string quadrilateralType = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "quadrilateralType": + quadrilateralType = reader.GetString(); + break; + default: + break; + } + } + } + + return new QuadrilateralInterface(quadrilateralType); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, QuadrilateralInterface quadrilateralInterface, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("quadrilateralType", quadrilateralInterface.QuadrilateralType); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs index 3589a97ed6..d81d94a35f 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -34,8 +33,21 @@ namespace Org.OpenAPITools.Model /// /// bar /// baz - public ReadOnlyFirst(string bar = default, string baz = default) + [JsonConstructor] + public ReadOnlyFirst(string bar, string baz) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (bar == null) + throw new ArgumentNullException("bar is a required property for ReadOnlyFirst and cannot be null."); + + if (baz == null) + throw new ArgumentNullException("baz is a required property for ReadOnlyFirst and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + Bar = bar; Baz = baz; } @@ -44,7 +56,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets Bar /// [JsonPropertyName("bar")] - public string Bar { get; private set; } + public string Bar { get; } /// /// Gets or Sets Baz @@ -56,7 +68,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -102,22 +114,12 @@ namespace Org.OpenAPITools.Model unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Bar != null) - { - hashCode = (hashCode * 59) + this.Bar.GetHashCode(); - } - if (this.Baz != null) - { - hashCode = (hashCode * 59) + this.Baz.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } + hashCode = (hashCode * 59) + Bar.GetHashCode(); + hashCode = (hashCode * 59) + AdditionalProperties.GetHashCode(); + return hashCode; } } - /// /// To validate all properties of the instance /// @@ -129,4 +131,76 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type ReadOnlyFirst + /// + public class ReadOnlyFirstJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override ReadOnlyFirst Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string bar = default; + string baz = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "bar": + bar = reader.GetString(); + break; + case "baz": + baz = reader.GetString(); + break; + default: + break; + } + } + } + + return new ReadOnlyFirst(bar, baz); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ReadOnlyFirst readOnlyFirst, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("bar", readOnlyFirst.Bar); + writer.WriteString("baz", readOnlyFirst.Baz); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Return.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Return.cs index 2b73710ad8..b560dc903b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Return.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Return.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,14 +26,24 @@ namespace Org.OpenAPITools.Model /// /// Model for testing reserved words /// - public partial class Return : IEquatable, IValidatableObject + public partial class Return : IValidatableObject { /// /// Initializes a new instance of the class. /// /// returnProperty - public Return(int returnProperty = default) + [JsonConstructor] + public Return(int returnProperty) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (returnProperty == null) + throw new ArgumentNullException("returnProperty is a required property for Return and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + ReturnProperty = returnProperty; } @@ -48,7 +57,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -63,45 +72,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Return).AreEqual; - } - - /// - /// Returns true if Return instances are equal - /// - /// Instance of Return to be compared - /// Boolean - public bool Equals(Return input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.ReturnProperty.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -113,4 +83,71 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type Return + /// + public class ReturnJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override Return Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + int returnProperty = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "return": + returnProperty = reader.GetInt32(); + break; + default: + break; + } + } + } + + return new Return(returnProperty); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Return _return, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteNumber("return", (int)_return.ReturnProperty); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ScaleneTriangle.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ScaleneTriangle.cs index 72568e1e01..7654a4f8a0 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ScaleneTriangle.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ScaleneTriangle.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,14 +26,15 @@ namespace Org.OpenAPITools.Model /// /// ScaleneTriangle /// - public partial class ScaleneTriangle : IEquatable, IValidatableObject + public partial class ScaleneTriangle : IValidatableObject { /// /// Initializes a new instance of the class. /// /// /// - public ScaleneTriangle(ShapeInterface shapeInterface, TriangleInterface triangleInterface) + [JsonConstructor] + internal ScaleneTriangle(ShapeInterface shapeInterface, TriangleInterface triangleInterface) { ShapeInterface = shapeInterface; TriangleInterface = triangleInterface; @@ -54,7 +54,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -68,44 +68,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as ScaleneTriangle).AreEqual; - } - - /// - /// Returns true if ScaleneTriangle instances are equal - /// - /// Instance of ScaleneTriangle to be compared - /// Boolean - public bool Equals(ScaleneTriangle input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -122,13 +84,6 @@ namespace Org.OpenAPITools.Model /// public class ScaleneTriangleJsonConverter : JsonConverter { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof(ScaleneTriangle).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -141,28 +96,35 @@ namespace Org.OpenAPITools.Model { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); + JsonTokenType startingTokenType = reader.TokenType; + Utf8JsonReader shapeInterfaceReader = reader; - bool shapeInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref shapeInterfaceReader, options, out ShapeInterface shapeInterface); + bool shapeInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref reader, options, out ShapeInterface shapeInterface); Utf8JsonReader triangleInterfaceReader = reader; - bool triangleInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref triangleInterfaceReader, options, out TriangleInterface triangleInterface); + bool triangleInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref reader, options, out TriangleInterface triangleInterface); while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string propertyName = reader.GetString(); reader.Read(); switch (propertyName) { + default: + break; } } } @@ -177,6 +139,12 @@ namespace Org.OpenAPITools.Model /// /// /// - public override void Write(Utf8JsonWriter writer, ScaleneTriangle scaleneTriangle, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, ScaleneTriangle scaleneTriangle, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + + writer.WriteEndObject(); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Shape.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Shape.cs index e2cf8fb7cc..7412f32e61 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Shape.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Shape.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,17 +26,24 @@ namespace Org.OpenAPITools.Model /// /// Shape /// - public partial class Shape : IEquatable, IValidatableObject + public partial class Shape : IValidatableObject { /// /// Initializes a new instance of the class. /// /// - /// quadrilateralType (required) + /// quadrilateralType + [JsonConstructor] public Shape(Triangle triangle, string quadrilateralType) { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + if (quadrilateralType == null) - throw new ArgumentNullException("quadrilateralType is a required property for Shape and cannot be null."); + throw new ArgumentNullException(nameof(QuadrilateralType)); + + #pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' Triangle = triangle; QuadrilateralType = quadrilateralType; @@ -47,11 +53,18 @@ namespace Org.OpenAPITools.Model /// Initializes a new instance of the class. /// /// - /// quadrilateralType (required) + /// quadrilateralType + [JsonConstructor] public Shape(Quadrilateral quadrilateral, string quadrilateralType) { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + if (quadrilateralType == null) - throw new ArgumentNullException("quadrilateralType is a required property for Shape and cannot be null."); + throw new ArgumentNullException(nameof(QuadrilateralType)); + + #pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' Quadrilateral = quadrilateral; QuadrilateralType = quadrilateralType; @@ -77,7 +90,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -92,48 +105,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Shape).AreEqual; - } - - /// - /// Returns true if Shape instances are equal - /// - /// Instance of Shape to be compared - /// Boolean - public bool Equals(Shape input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.QuadrilateralType != null) - { - hashCode = (hashCode * 59) + this.QuadrilateralType.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -160,13 +131,6 @@ namespace Org.OpenAPITools.Model /// public class ShapeJsonConverter : JsonConverter { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof(Shape).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -179,9 +143,11 @@ namespace Org.OpenAPITools.Model { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); + JsonTokenType startingTokenType = reader.TokenType; + Utf8JsonReader triangleReader = reader; bool triangleDeserialized = Client.ClientUtils.TryDeserialize(ref triangleReader, options, out Triangle triangle); @@ -192,10 +158,13 @@ namespace Org.OpenAPITools.Model while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string propertyName = reader.GetString(); reader.Read(); @@ -205,6 +174,8 @@ namespace Org.OpenAPITools.Model case "quadrilateralType": quadrilateralType = reader.GetString(); break; + default: + break; } } } @@ -225,6 +196,13 @@ namespace Org.OpenAPITools.Model /// /// /// - public override void Write(Utf8JsonWriter writer, Shape shape, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, Shape shape, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("quadrilateralType", shape.QuadrilateralType); + + writer.WriteEndObject(); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ShapeInterface.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ShapeInterface.cs index 5d0ab8ec9c..b6a27e5efc 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ShapeInterface.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ShapeInterface.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,17 +26,24 @@ namespace Org.OpenAPITools.Model /// /// ShapeInterface /// - public partial class ShapeInterface : IEquatable, IValidatableObject + public partial class ShapeInterface : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// shapeType (required) + /// shapeType + [JsonConstructor] public ShapeInterface(string shapeType) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + if (shapeType == null) throw new ArgumentNullException("shapeType is a required property for ShapeInterface and cannot be null."); +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + ShapeType = shapeType; } @@ -51,7 +57,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -66,48 +72,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as ShapeInterface).AreEqual; - } - - /// - /// Returns true if ShapeInterface instances are equal - /// - /// Instance of ShapeInterface to be compared - /// Boolean - public bool Equals(ShapeInterface input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ShapeType != null) - { - hashCode = (hashCode * 59) + this.ShapeType.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -119,4 +83,71 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type ShapeInterface + /// + public class ShapeInterfaceJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override ShapeInterface Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string shapeType = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "shapeType": + shapeType = reader.GetString(); + break; + default: + break; + } + } + } + + return new ShapeInterface(shapeType); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ShapeInterface shapeInterface, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("shapeType", shapeInterface.ShapeType); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ShapeOrNull.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ShapeOrNull.cs index 375f4d4907..64971919ee 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ShapeOrNull.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/ShapeOrNull.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,17 +26,24 @@ namespace Org.OpenAPITools.Model /// /// The value may be a shape or the 'null' value. This is introduced in OAS schema >= 3.1. /// - public partial class ShapeOrNull : IEquatable, IValidatableObject + public partial class ShapeOrNull : IValidatableObject { /// /// Initializes a new instance of the class. /// /// - /// quadrilateralType (required) + /// quadrilateralType + [JsonConstructor] public ShapeOrNull(Triangle triangle, string quadrilateralType) { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + if (quadrilateralType == null) - throw new ArgumentNullException("quadrilateralType is a required property for ShapeOrNull and cannot be null."); + throw new ArgumentNullException(nameof(QuadrilateralType)); + + #pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' Triangle = triangle; QuadrilateralType = quadrilateralType; @@ -47,11 +53,18 @@ namespace Org.OpenAPITools.Model /// Initializes a new instance of the class. /// /// - /// quadrilateralType (required) + /// quadrilateralType + [JsonConstructor] public ShapeOrNull(Quadrilateral quadrilateral, string quadrilateralType) { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + if (quadrilateralType == null) - throw new ArgumentNullException("quadrilateralType is a required property for ShapeOrNull and cannot be null."); + throw new ArgumentNullException(nameof(QuadrilateralType)); + + #pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' Quadrilateral = quadrilateral; QuadrilateralType = quadrilateralType; @@ -77,7 +90,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -92,48 +105,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as ShapeOrNull).AreEqual; - } - - /// - /// Returns true if ShapeOrNull instances are equal - /// - /// Instance of ShapeOrNull to be compared - /// Boolean - public bool Equals(ShapeOrNull input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.QuadrilateralType != null) - { - hashCode = (hashCode * 59) + this.QuadrilateralType.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -160,13 +131,6 @@ namespace Org.OpenAPITools.Model /// public class ShapeOrNullJsonConverter : JsonConverter { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof(ShapeOrNull).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -179,9 +143,11 @@ namespace Org.OpenAPITools.Model { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); + JsonTokenType startingTokenType = reader.TokenType; + Utf8JsonReader triangleReader = reader; bool triangleDeserialized = Client.ClientUtils.TryDeserialize(ref triangleReader, options, out Triangle triangle); @@ -192,10 +158,13 @@ namespace Org.OpenAPITools.Model while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string propertyName = reader.GetString(); reader.Read(); @@ -205,6 +174,8 @@ namespace Org.OpenAPITools.Model case "quadrilateralType": quadrilateralType = reader.GetString(); break; + default: + break; } } } @@ -225,6 +196,13 @@ namespace Org.OpenAPITools.Model /// /// /// - public override void Write(Utf8JsonWriter writer, ShapeOrNull shapeOrNull, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, ShapeOrNull shapeOrNull, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("quadrilateralType", shapeOrNull.QuadrilateralType); + + writer.WriteEndObject(); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs index ee6d8ef182..feb4017722 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,14 +26,15 @@ namespace Org.OpenAPITools.Model /// /// SimpleQuadrilateral /// - public partial class SimpleQuadrilateral : IEquatable, IValidatableObject + public partial class SimpleQuadrilateral : IValidatableObject { /// /// Initializes a new instance of the class. /// /// /// - public SimpleQuadrilateral(ShapeInterface shapeInterface, QuadrilateralInterface quadrilateralInterface) + [JsonConstructor] + internal SimpleQuadrilateral(ShapeInterface shapeInterface, QuadrilateralInterface quadrilateralInterface) { ShapeInterface = shapeInterface; QuadrilateralInterface = quadrilateralInterface; @@ -54,7 +54,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -68,44 +68,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as SimpleQuadrilateral).AreEqual; - } - - /// - /// Returns true if SimpleQuadrilateral instances are equal - /// - /// Instance of SimpleQuadrilateral to be compared - /// Boolean - public bool Equals(SimpleQuadrilateral input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -122,13 +84,6 @@ namespace Org.OpenAPITools.Model /// public class SimpleQuadrilateralJsonConverter : JsonConverter { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof(SimpleQuadrilateral).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -141,28 +96,35 @@ namespace Org.OpenAPITools.Model { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); + JsonTokenType startingTokenType = reader.TokenType; + Utf8JsonReader shapeInterfaceReader = reader; - bool shapeInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref shapeInterfaceReader, options, out ShapeInterface shapeInterface); + bool shapeInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref reader, options, out ShapeInterface shapeInterface); Utf8JsonReader quadrilateralInterfaceReader = reader; - bool quadrilateralInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref quadrilateralInterfaceReader, options, out QuadrilateralInterface quadrilateralInterface); + bool quadrilateralInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref reader, options, out QuadrilateralInterface quadrilateralInterface); while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string propertyName = reader.GetString(); reader.Read(); switch (propertyName) { + default: + break; } } } @@ -177,6 +139,12 @@ namespace Org.OpenAPITools.Model /// /// /// - public override void Write(Utf8JsonWriter writer, SimpleQuadrilateral simpleQuadrilateral, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, SimpleQuadrilateral simpleQuadrilateral, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + + writer.WriteEndObject(); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/SpecialModelName.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/SpecialModelName.cs index 35fc0efd1c..db14149490 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/SpecialModelName.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/SpecialModelName.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,24 +26,31 @@ namespace Org.OpenAPITools.Model /// /// SpecialModelName /// - public partial class SpecialModelName : IEquatable, IValidatableObject + public partial class SpecialModelName : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// specialPropertyName /// specialModelNameProperty - public SpecialModelName(long specialPropertyName = default, string specialModelNameProperty = default) + /// specialPropertyName + [JsonConstructor] + public SpecialModelName(string specialModelNameProperty, long specialPropertyName) { - SpecialPropertyName = specialPropertyName; - SpecialModelNameProperty = specialModelNameProperty; - } +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' - /// - /// Gets or Sets SpecialPropertyName - /// - [JsonPropertyName("$special[property.name]")] - public long SpecialPropertyName { get; set; } + if (specialPropertyName == null) + throw new ArgumentNullException("specialPropertyName is a required property for SpecialModelName and cannot be null."); + + if (specialModelNameProperty == null) + throw new ArgumentNullException("specialModelNameProperty is a required property for SpecialModelName and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + SpecialModelNameProperty = specialModelNameProperty; + SpecialPropertyName = specialPropertyName; + } /// /// Gets or Sets SpecialModelNameProperty @@ -52,11 +58,17 @@ namespace Org.OpenAPITools.Model [JsonPropertyName("_special_model.name_")] public string SpecialModelNameProperty { get; set; } + /// + /// Gets or Sets SpecialPropertyName + /// + [JsonPropertyName("$special[property.name]")] + public long SpecialPropertyName { get; set; } + /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -66,55 +78,12 @@ namespace Org.OpenAPITools.Model { StringBuilder sb = new StringBuilder(); sb.Append("class SpecialModelName {\n"); - sb.Append(" SpecialPropertyName: ").Append(SpecialPropertyName).Append("\n"); sb.Append(" SpecialModelNameProperty: ").Append(SpecialModelNameProperty).Append("\n"); + sb.Append(" SpecialPropertyName: ").Append(SpecialPropertyName).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as SpecialModelName).AreEqual; - } - - /// - /// Returns true if SpecialModelName instances are equal - /// - /// Instance of SpecialModelName to be compared - /// Boolean - public bool Equals(SpecialModelName input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.SpecialPropertyName.GetHashCode(); - if (this.SpecialModelNameProperty != null) - { - hashCode = (hashCode * 59) + this.SpecialModelNameProperty.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -126,4 +95,76 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type SpecialModelName + /// + public class SpecialModelNameJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override SpecialModelName Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string specialModelNameProperty = default; + long specialPropertyName = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "_special_model.name_": + specialModelNameProperty = reader.GetString(); + break; + case "$special[property.name]": + specialPropertyName = reader.GetInt64(); + break; + default: + break; + } + } + } + + return new SpecialModelName(specialModelNameProperty, specialPropertyName); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, SpecialModelName specialModelName, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("_special_model.name_", specialModelName.SpecialModelNameProperty); + writer.WriteNumber("$special[property.name]", (int)specialModelName.SpecialPropertyName); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Tag.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Tag.cs index fcc38c0b3a..51a80012fe 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Tag.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Tag.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,15 +26,28 @@ namespace Org.OpenAPITools.Model /// /// Tag /// - public partial class Tag : IEquatable, IValidatableObject + public partial class Tag : IValidatableObject { /// /// Initializes a new instance of the class. /// /// id /// name - public Tag(long id = default, string name = default) + [JsonConstructor] + public Tag(long id, string name) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (id == null) + throw new ArgumentNullException("id is a required property for Tag and cannot be null."); + + if (name == null) + throw new ArgumentNullException("name is a required property for Tag and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + Id = id; Name = name; } @@ -56,7 +68,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -72,49 +84,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Tag).AreEqual; - } - - /// - /// Returns true if Tag instances are equal - /// - /// Instance of Tag to be compared - /// Boolean - public bool Equals(Tag input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -126,4 +95,76 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type Tag + /// + public class TagJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override Tag Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + long id = default; + string name = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "id": + id = reader.GetInt64(); + break; + case "name": + name = reader.GetString(); + break; + default: + break; + } + } + } + + return new Tag(id, name); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Tag tag, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteNumber("id", (int)tag.Id); + writer.WriteString("name", tag.Name); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Triangle.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Triangle.cs index f799b7c43b..6f5eae3cca 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Triangle.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Triangle.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,21 +26,28 @@ namespace Org.OpenAPITools.Model /// /// Triangle /// - public partial class Triangle : IEquatable, IValidatableObject + public partial class Triangle : IValidatableObject { /// /// Initializes a new instance of the class. /// /// - /// shapeType (required) - /// triangleType (required) + /// shapeType + /// triangleType + [JsonConstructor] public Triangle(EquilateralTriangle equilateralTriangle, string shapeType, string triangleType) { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + if (shapeType == null) - throw new ArgumentNullException("shapeType is a required property for Triangle and cannot be null."); + throw new ArgumentNullException(nameof(ShapeType)); if (triangleType == null) - throw new ArgumentNullException("triangleType is a required property for Triangle and cannot be null."); + throw new ArgumentNullException(nameof(TriangleType)); + + #pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' EquilateralTriangle = equilateralTriangle; ShapeType = shapeType; @@ -52,15 +58,22 @@ namespace Org.OpenAPITools.Model /// Initializes a new instance of the class. /// /// - /// shapeType (required) - /// triangleType (required) + /// shapeType + /// triangleType + [JsonConstructor] public Triangle(IsoscelesTriangle isoscelesTriangle, string shapeType, string triangleType) { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + if (shapeType == null) - throw new ArgumentNullException("shapeType is a required property for Triangle and cannot be null."); + throw new ArgumentNullException(nameof(ShapeType)); if (triangleType == null) - throw new ArgumentNullException("triangleType is a required property for Triangle and cannot be null."); + throw new ArgumentNullException(nameof(TriangleType)); + + #pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' IsoscelesTriangle = isoscelesTriangle; ShapeType = shapeType; @@ -71,15 +84,22 @@ namespace Org.OpenAPITools.Model /// Initializes a new instance of the class. /// /// - /// shapeType (required) - /// triangleType (required) + /// shapeType + /// triangleType + [JsonConstructor] public Triangle(ScaleneTriangle scaleneTriangle, string shapeType, string triangleType) { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + if (shapeType == null) - throw new ArgumentNullException("shapeType is a required property for Triangle and cannot be null."); + throw new ArgumentNullException(nameof(ShapeType)); if (triangleType == null) - throw new ArgumentNullException("triangleType is a required property for Triangle and cannot be null."); + throw new ArgumentNullException(nameof(TriangleType)); + + #pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' ScaleneTriangle = scaleneTriangle; ShapeType = shapeType; @@ -117,7 +137,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -133,52 +153,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Triangle).AreEqual; - } - - /// - /// Returns true if Triangle instances are equal - /// - /// Instance of Triangle to be compared - /// Boolean - public bool Equals(Triangle input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ShapeType != null) - { - hashCode = (hashCode * 59) + this.ShapeType.GetHashCode(); - } - if (this.TriangleType != null) - { - hashCode = (hashCode * 59) + this.TriangleType.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -205,13 +179,6 @@ namespace Org.OpenAPITools.Model /// public class TriangleJsonConverter : JsonConverter { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof(Triangle).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -224,9 +191,11 @@ namespace Org.OpenAPITools.Model { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); + JsonTokenType startingTokenType = reader.TokenType; + Utf8JsonReader equilateralTriangleReader = reader; bool equilateralTriangleDeserialized = Client.ClientUtils.TryDeserialize(ref equilateralTriangleReader, options, out EquilateralTriangle equilateralTriangle); @@ -241,10 +210,13 @@ namespace Org.OpenAPITools.Model while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string propertyName = reader.GetString(); reader.Read(); @@ -257,6 +229,8 @@ namespace Org.OpenAPITools.Model case "triangleType": triangleType = reader.GetString(); break; + default: + break; } } } @@ -280,6 +254,14 @@ namespace Org.OpenAPITools.Model /// /// /// - public override void Write(Utf8JsonWriter writer, Triangle triangle, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, Triangle triangle, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("shapeType", triangle.ShapeType); + writer.WriteString("triangleType", triangle.TriangleType); + + writer.WriteEndObject(); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/TriangleInterface.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/TriangleInterface.cs index f7b06bf05a..882d2b9e42 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/TriangleInterface.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/TriangleInterface.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,17 +26,24 @@ namespace Org.OpenAPITools.Model /// /// TriangleInterface /// - public partial class TriangleInterface : IEquatable, IValidatableObject + public partial class TriangleInterface : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// triangleType (required) + /// triangleType + [JsonConstructor] public TriangleInterface(string triangleType) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + if (triangleType == null) throw new ArgumentNullException("triangleType is a required property for TriangleInterface and cannot be null."); +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + TriangleType = triangleType; } @@ -51,7 +57,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -66,48 +72,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as TriangleInterface).AreEqual; - } - - /// - /// Returns true if TriangleInterface instances are equal - /// - /// Instance of TriangleInterface to be compared - /// Boolean - public bool Equals(TriangleInterface input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.TriangleType != null) - { - hashCode = (hashCode * 59) + this.TriangleType.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -119,4 +83,71 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type TriangleInterface + /// + public class TriangleInterfaceJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override TriangleInterface Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string triangleType = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "triangleType": + triangleType = reader.GetString(); + break; + default: + break; + } + } + } + + return new TriangleInterface(triangleType); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, TriangleInterface triangleInterface, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("triangleType", triangleInterface.TriangleType); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/User.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/User.cs index 38a79e975d..a92270295a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/User.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/User.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,50 +26,78 @@ namespace Org.OpenAPITools.Model /// /// User /// - public partial class User : IEquatable, IValidatableObject + public partial class User : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// id - /// username - /// firstName - /// lastName /// email + /// firstName + /// id + /// lastName + /// test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. /// password /// phone /// User Status - /// test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. - /// test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. + /// username /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389 /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values. - public User(long id = default, string username = default, string firstName = default, string lastName = default, string email = default, string password = default, string phone = default, int userStatus = default, Object objectWithNoDeclaredProps = default, Object objectWithNoDeclaredPropsNullable = default, Object anyTypeProp = default, Object anyTypePropNullable = default) + /// test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. + [JsonConstructor] + public User(string email, string firstName, long id, string lastName, Object objectWithNoDeclaredProps, string password, string phone, int userStatus, string username, Object anyTypeProp = default, Object anyTypePropNullable = default, Object objectWithNoDeclaredPropsNullable = default) { - Id = id; - Username = username; - FirstName = firstName; - LastName = lastName; +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (id == null) + throw new ArgumentNullException("id is a required property for User and cannot be null."); + + if (username == null) + throw new ArgumentNullException("username is a required property for User and cannot be null."); + + if (firstName == null) + throw new ArgumentNullException("firstName is a required property for User and cannot be null."); + + if (lastName == null) + throw new ArgumentNullException("lastName is a required property for User and cannot be null."); + + if (email == null) + throw new ArgumentNullException("email is a required property for User and cannot be null."); + + if (password == null) + throw new ArgumentNullException("password is a required property for User and cannot be null."); + + if (phone == null) + throw new ArgumentNullException("phone is a required property for User and cannot be null."); + + if (userStatus == null) + throw new ArgumentNullException("userStatus is a required property for User and cannot be null."); + + if (objectWithNoDeclaredProps == null) + throw new ArgumentNullException("objectWithNoDeclaredProps is a required property for User and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + Email = email; + FirstName = firstName; + Id = id; + LastName = lastName; + ObjectWithNoDeclaredProps = objectWithNoDeclaredProps; Password = password; Phone = phone; UserStatus = userStatus; - ObjectWithNoDeclaredProps = objectWithNoDeclaredProps; - ObjectWithNoDeclaredPropsNullable = objectWithNoDeclaredPropsNullable; + Username = username; AnyTypeProp = anyTypeProp; AnyTypePropNullable = anyTypePropNullable; + ObjectWithNoDeclaredPropsNullable = objectWithNoDeclaredPropsNullable; } /// - /// Gets or Sets Id + /// Gets or Sets Email /// - [JsonPropertyName("id")] - public long Id { get; set; } - - /// - /// Gets or Sets Username - /// - [JsonPropertyName("username")] - public string Username { get; set; } + [JsonPropertyName("email")] + public string Email { get; set; } /// /// Gets or Sets FirstName @@ -78,6 +105,12 @@ namespace Org.OpenAPITools.Model [JsonPropertyName("firstName")] public string FirstName { get; set; } + /// + /// Gets or Sets Id + /// + [JsonPropertyName("id")] + public long Id { get; set; } + /// /// Gets or Sets LastName /// @@ -85,10 +118,11 @@ namespace Org.OpenAPITools.Model public string LastName { get; set; } /// - /// Gets or Sets Email + /// test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. /// - [JsonPropertyName("email")] - public string Email { get; set; } + /// test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. + [JsonPropertyName("objectWithNoDeclaredProps")] + public Object ObjectWithNoDeclaredProps { get; set; } /// /// Gets or Sets Password @@ -110,18 +144,10 @@ namespace Org.OpenAPITools.Model public int UserStatus { get; set; } /// - /// test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. + /// Gets or Sets Username /// - /// test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. - [JsonPropertyName("objectWithNoDeclaredProps")] - public Object ObjectWithNoDeclaredProps { get; set; } - - /// - /// test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. - /// - /// test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. - [JsonPropertyName("objectWithNoDeclaredPropsNullable")] - public Object ObjectWithNoDeclaredPropsNullable { get; set; } + [JsonPropertyName("username")] + public string Username { get; set; } /// /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389 @@ -137,11 +163,18 @@ namespace Org.OpenAPITools.Model [JsonPropertyName("anyTypePropNullable")] public Object AnyTypePropNullable { get; set; } + /// + /// test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. + /// + /// test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. + [JsonPropertyName("objectWithNoDeclaredPropsNullable")] + public Object ObjectWithNoDeclaredPropsNullable { get; set; } + /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -151,102 +184,22 @@ namespace Org.OpenAPITools.Model { StringBuilder sb = new StringBuilder(); sb.Append("class User {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Username: ").Append(Username).Append("\n"); - sb.Append(" FirstName: ").Append(FirstName).Append("\n"); - sb.Append(" LastName: ").Append(LastName).Append("\n"); sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append(" FirstName: ").Append(FirstName).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" LastName: ").Append(LastName).Append("\n"); + sb.Append(" ObjectWithNoDeclaredProps: ").Append(ObjectWithNoDeclaredProps).Append("\n"); sb.Append(" Password: ").Append(Password).Append("\n"); sb.Append(" Phone: ").Append(Phone).Append("\n"); sb.Append(" UserStatus: ").Append(UserStatus).Append("\n"); - sb.Append(" ObjectWithNoDeclaredProps: ").Append(ObjectWithNoDeclaredProps).Append("\n"); - sb.Append(" ObjectWithNoDeclaredPropsNullable: ").Append(ObjectWithNoDeclaredPropsNullable).Append("\n"); + sb.Append(" Username: ").Append(Username).Append("\n"); sb.Append(" AnyTypeProp: ").Append(AnyTypeProp).Append("\n"); sb.Append(" AnyTypePropNullable: ").Append(AnyTypePropNullable).Append("\n"); + sb.Append(" ObjectWithNoDeclaredPropsNullable: ").Append(ObjectWithNoDeclaredPropsNullable).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as User).AreEqual; - } - - /// - /// Returns true if User instances are equal - /// - /// Instance of User to be compared - /// Boolean - public bool Equals(User input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - if (this.Username != null) - { - hashCode = (hashCode * 59) + this.Username.GetHashCode(); - } - if (this.FirstName != null) - { - hashCode = (hashCode * 59) + this.FirstName.GetHashCode(); - } - if (this.LastName != null) - { - hashCode = (hashCode * 59) + this.LastName.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - if (this.Password != null) - { - hashCode = (hashCode * 59) + this.Password.GetHashCode(); - } - if (this.Phone != null) - { - hashCode = (hashCode * 59) + this.Phone.GetHashCode(); - } - hashCode = (hashCode * 59) + this.UserStatus.GetHashCode(); - if (this.ObjectWithNoDeclaredProps != null) - { - hashCode = (hashCode * 59) + this.ObjectWithNoDeclaredProps.GetHashCode(); - } - if (this.ObjectWithNoDeclaredPropsNullable != null) - { - hashCode = (hashCode * 59) + this.ObjectWithNoDeclaredPropsNullable.GetHashCode(); - } - if (this.AnyTypeProp != null) - { - hashCode = (hashCode * 59) + this.AnyTypeProp.GetHashCode(); - } - if (this.AnyTypePropNullable != null) - { - hashCode = (hashCode * 59) + this.AnyTypePropNullable.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -258,4 +211,130 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type User + /// + public class UserJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override User Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string email = default; + string firstName = default; + long id = default; + string lastName = default; + Object objectWithNoDeclaredProps = default; + string password = default; + string phone = default; + int userStatus = default; + string username = default; + Object anyTypeProp = default; + Object anyTypePropNullable = default; + Object objectWithNoDeclaredPropsNullable = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "email": + email = reader.GetString(); + break; + case "firstName": + firstName = reader.GetString(); + break; + case "id": + id = reader.GetInt64(); + break; + case "lastName": + lastName = reader.GetString(); + break; + case "objectWithNoDeclaredProps": + objectWithNoDeclaredProps = JsonSerializer.Deserialize(ref reader, options); + break; + case "password": + password = reader.GetString(); + break; + case "phone": + phone = reader.GetString(); + break; + case "userStatus": + userStatus = reader.GetInt32(); + break; + case "username": + username = reader.GetString(); + break; + case "anyTypeProp": + anyTypeProp = JsonSerializer.Deserialize(ref reader, options); + break; + case "anyTypePropNullable": + anyTypePropNullable = JsonSerializer.Deserialize(ref reader, options); + break; + case "objectWithNoDeclaredPropsNullable": + objectWithNoDeclaredPropsNullable = JsonSerializer.Deserialize(ref reader, options); + break; + default: + break; + } + } + } + + return new User(email, firstName, id, lastName, objectWithNoDeclaredProps, password, phone, userStatus, username, anyTypeProp, anyTypePropNullable, objectWithNoDeclaredPropsNullable); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, User user, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("email", user.Email); + writer.WriteString("firstName", user.FirstName); + writer.WriteNumber("id", (int)user.Id); + writer.WriteString("lastName", user.LastName); + writer.WritePropertyName("objectWithNoDeclaredProps"); + JsonSerializer.Serialize(writer, user.ObjectWithNoDeclaredProps, options); + writer.WriteString("password", user.Password); + writer.WriteString("phone", user.Phone); + writer.WriteNumber("userStatus", (int)user.UserStatus); + writer.WriteString("username", user.Username); + writer.WritePropertyName("anyTypeProp"); + JsonSerializer.Serialize(writer, user.AnyTypeProp, options); + writer.WritePropertyName("anyTypePropNullable"); + JsonSerializer.Serialize(writer, user.AnyTypePropNullable, options); + writer.WritePropertyName("objectWithNoDeclaredPropsNullable"); + JsonSerializer.Serialize(writer, user.ObjectWithNoDeclaredPropsNullable, options); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Whale.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Whale.cs index 57c3ddbd8d..598bedad22 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Whale.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Whale.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,19 +26,32 @@ namespace Org.OpenAPITools.Model /// /// Whale /// - public partial class Whale : IEquatable, IValidatableObject + public partial class Whale : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// className (required) + /// className /// hasBaleen /// hasTeeth - public Whale(string className, bool hasBaleen = default, bool hasTeeth = default) + [JsonConstructor] + public Whale(string className, bool hasBaleen, bool hasTeeth) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (hasBaleen == null) + throw new ArgumentNullException("hasBaleen is a required property for Whale and cannot be null."); + + if (hasTeeth == null) + throw new ArgumentNullException("hasTeeth is a required property for Whale and cannot be null."); + if (className == null) throw new ArgumentNullException("className is a required property for Whale and cannot be null."); +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + ClassName = className; HasBaleen = hasBaleen; HasTeeth = hasTeeth; @@ -67,7 +79,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -84,50 +96,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Whale).AreEqual; - } - - /// - /// Returns true if Whale instances are equal - /// - /// Instance of Whale to be compared - /// Boolean - public bool Equals(Whale input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ClassName != null) - { - hashCode = (hashCode * 59) + this.ClassName.GetHashCode(); - } - hashCode = (hashCode * 59) + this.HasBaleen.GetHashCode(); - hashCode = (hashCode * 59) + this.HasTeeth.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -139,4 +107,81 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type Whale + /// + public class WhaleJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override Whale Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string className = default; + bool hasBaleen = default; + bool hasTeeth = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "className": + className = reader.GetString(); + break; + case "hasBaleen": + hasBaleen = reader.GetBoolean(); + break; + case "hasTeeth": + hasTeeth = reader.GetBoolean(); + break; + default: + break; + } + } + } + + return new Whale(className, hasBaleen, hasTeeth); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Whale whale, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("className", whale.ClassName); + writer.WriteBoolean("hasBaleen", whale.HasBaleen); + writer.WriteBoolean("hasTeeth", whale.HasTeeth); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Zebra.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Zebra.cs index 452c2fe8b7..df74e95ec6 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Zebra.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Model/Zebra.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,18 +26,28 @@ namespace Org.OpenAPITools.Model /// /// Zebra /// - public partial class Zebra : Dictionary, IEquatable, IValidatableObject + public partial class Zebra : Dictionary, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// className (required) + /// className /// type - public Zebra(string className, TypeEnum type = default) : base() + [JsonConstructor] + public Zebra(string className, TypeEnum type) : base() { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (type == null) + throw new ArgumentNullException("type is a required property for Zebra and cannot be null."); + if (className == null) throw new ArgumentNullException("className is a required property for Zebra and cannot be null."); +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + ClassName = className; Type = type; } @@ -51,23 +60,59 @@ namespace Org.OpenAPITools.Model /// /// Enum Plains for value: plains /// - [EnumMember(Value = "plains")] Plains = 1, /// /// Enum Mountain for value: mountain /// - [EnumMember(Value = "mountain")] Mountain = 2, /// /// Enum Grevys for value: grevys /// - [EnumMember(Value = "grevys")] Grevys = 3 } + /// + /// Returns a TypeEnum + /// + /// + /// + public static TypeEnum TypeEnumFromString(string value) + { + if (value == "plains") + return TypeEnum.Plains; + + if (value == "mountain") + return TypeEnum.Mountain; + + if (value == "grevys") + return TypeEnum.Grevys; + + throw new NotImplementedException($"Could not convert value to type TypeEnum: '{value}'"); + } + + /// + /// Returns equivalent json value + /// + /// + /// + /// + public static string TypeEnumToJsonValue(TypeEnum value) + { + if (value == TypeEnum.Plains) + return "plains"; + + if (value == TypeEnum.Mountain) + return "mountain"; + + if (value == TypeEnum.Grevys) + return "grevys"; + + throw new NotImplementedException($"Value could not be handled: '{value}'"); + } + /// /// Gets or Sets Type /// @@ -84,7 +129,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -101,49 +146,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Zebra).AreEqual; - } - - /// - /// Returns true if Zebra instances are equal - /// - /// Instance of Zebra to be compared - /// Boolean - public bool Equals(Zebra input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.ClassName != null) - { - hashCode = (hashCode * 59) + this.ClassName.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -155,4 +157,81 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type Zebra + /// + public class ZebraJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override Zebra Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string className = default; + Zebra.TypeEnum type = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "className": + className = reader.GetString(); + break; + case "type": + string typeRawValue = reader.GetString(); + type = Zebra.TypeEnumFromString(typeRawValue); + break; + default: + break; + } + } + } + + return new Zebra(className, type); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Zebra zebra, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("className", zebra.ClassName); + var typeRawValue = Zebra.TypeEnumToJsonValue(zebra.Type); + if (typeRawValue != null) + writer.WriteString("type", typeRawValue); + else + writer.WriteNull("type"); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Org.OpenAPITools.csproj index 5fce68767c..c1f59011db 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Org.OpenAPITools.csproj +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Org.OpenAPITools.csproj @@ -21,9 +21,9 @@ - - - + + + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/README.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/README.md new file mode 100644 index 0000000000..e792f49600 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/README.md @@ -0,0 +1,260 @@ +# Created with Openapi Generator + + +## Run the following powershell command to generate the library + +```ps1 +$properties = @( + 'apiName=Api', + 'targetFramework=net7.0', + 'validatable=true', + 'nullableReferenceTypes=false', + 'hideGenerationTimestamp=true', + 'packageVersion=1.0.0', + 'packageAuthors=OpenAPI', + 'packageCompany=OpenAPI', + 'packageCopyright=No Copyright', + 'packageDescription=A library generated from a OpenAPI doc', + 'packageName=Org.OpenAPITools', + 'packageTags=', + 'packageTitle=OpenAPI Library' +) -join "," + +$global = @( + 'apiDocs=true', + 'modelDocs=true', + 'apiTests=true', + 'modelTests=true' +) -join "," + +java -jar "/openapi-generator/modules/openapi-generator-cli/target/openapi-generator-cli.jar" generate ` + -g csharp-netcore ` + -i .yaml ` + -o ` + --library generichost ` + --additional-properties $properties ` + --global-property $global ` + --git-host "github.com" ` + --git-repo-id "GIT_REPO_ID" ` + --git-user-id "GIT_USER_ID" ` + --release-note "Minor update" + # -t templates +``` + + +## Using the library in your project + +```cs +using System; +using System.Threading.Tasks; +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.DependencyInjection; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Client; +using Org.OpenAPITools.Model; + +namespace YourProject +{ + public class Program + { + public static async Task Main(string[] args) + { + var host = CreateHostBuilder(args).Build(); + var api = host.Services.GetRequiredService(); + ApiResponse foo = await api.Call123TestSpecialTagsWithHttpInfoAsync("todo"); + } + + public static IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args) + .ConfigureApi((context, options) => + { + // the type of token here depends on the api security specifications + ApiKeyToken token = new(""); + options.AddTokens(token); + + // optionally choose the method the tokens will be provided with, default is RateLimitProvider + options.UseProvider, ApiKeyToken>(); + + // the type of token here depends on the api security specifications + ApiKeyToken token = new(""); + options.AddTokens(token); + + // optionally choose the method the tokens will be provided with, default is RateLimitProvider + options.UseProvider, ApiKeyToken>(); + + // the type of token here depends on the api security specifications + ApiKeyToken token = new(""); + options.AddTokens(token); + + // optionally choose the method the tokens will be provided with, default is RateLimitProvider + options.UseProvider, ApiKeyToken>(); + + // the type of token here depends on the api security specifications + ApiKeyToken token = new(""); + options.AddTokens(token); + + // optionally choose the method the tokens will be provided with, default is RateLimitProvider + options.UseProvider, ApiKeyToken>(); + + // the type of token here depends on the api security specifications + ApiKeyToken token = new(""); + options.AddTokens(token); + + // optionally choose the method the tokens will be provided with, default is RateLimitProvider + options.UseProvider, ApiKeyToken>(); + + // the type of token here depends on the api security specifications + ApiKeyToken token = new(""); + options.AddTokens(token); + + // optionally choose the method the tokens will be provided with, default is RateLimitProvider + options.UseProvider, ApiKeyToken>(); + + options.ConfigureJsonOptions((jsonOptions) => + { + // your custom converters if any + }); + + options.AddApiHttpClients(builder: builder => builder + .AddRetryPolicy(2) + .AddTimeoutPolicy(TimeSpan.FromSeconds(5)) + .AddCircuitBreakerPolicy(10, TimeSpan.FromSeconds(30)) + // add whatever middleware you prefer + ); + }); + } +} +``` + +## Questions + +- What about HttpRequest failures and retries? + If supportsRetry is enabled, you can configure Polly in the ConfigureClients method. +- How are tokens used? + Tokens are provided by a TokenProvider class. The default is RateLimitProvider which will perform client side rate limiting. + Other providers can be used with the UseProvider method. +- Does an HttpRequest throw an error when the server response is not Ok? + It depends how you made the request. If the return type is ApiResponse no error will be thrown, though the Content property will be null. + StatusCode and ReasonPhrase will contain information about the error. + If the return type is T, then it will throw. If the return type is TOrDefault, it will return null. +- How do I validate requests and process responses? + Use the provided On and After methods in the Api class from the namespace Org.OpenAPITools.Rest.DefaultApi. + Or provide your own class by using the generic ConfigureApi method. + + +## Dependencies + +- [Microsoft.Extensions.Hosting](https://www.nuget.org/packages/Microsoft.Extensions.Hosting/) - 5.0.0 or later +- [Microsoft.Extensions.Http](https://www.nuget.org/packages/Microsoft.Extensions.Http/) - 5.0.0 or later +- [Microsoft.Extensions.Http.Polly](https://www.nuget.org/packages/Microsoft.Extensions.Http.Polly/) - 5.0.1 or later +- [Polly](https://www.nuget.org/packages/Polly/) - 7.2.3 or later +- [CompareNETObjects](https://www.nuget.org/packages/CompareNETObjects) - 4.61.0 or later +- [System.ComponentModel.Annotations](https://www.nuget.org/packages/System.ComponentModel.Annotations) - 4.7.0 or later + + +## Documentation for Authorization + +Authentication schemes defined for the API: + + +### api_key + +- **Type**: API key +- **API key parameter name**: api_key +- **Location**: HTTP header + + +### api_key_query + +- **Type**: API key +- **API key parameter name**: api_key_query +- **Location**: URL query string + + +### bearer_test + + +- **Type**: Bearer Authentication + + +### http_basic_test + + +- **Type**: HTTP basic authentication + + +### http_signature_test + + + + +### petstore_auth + + +- **Type**: OAuth +- **Flow**: implicit +- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog +- **Scopes**: +- write:pets: modify pets in your account +- read:pets: read your pets + +## Build +- SDK version: 1.0.0 +- Build package: org.openapitools.codegen.languages.CSharpNetCoreClientCodegen + +## Api Information +- appName: OpenAPI Petstore +- appVersion: 1.0.0 +- appDescription: 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 Global properties](https://openapi-generator.tech/docs/globals) +- generateAliasAsModel: +- supportingFiles: +- models: omitted for brevity +- apis: omitted for brevity +- apiDocs: true +- modelDocs: true +- apiTests: true +- modelTests: true +- withXml: + +## [OpenApi Generator Parameters](https://openapi-generator.tech/docs/generators/csharp-netcore) +- allowUnicodeIdentifiers: +- apiName: Api +- caseInsensitiveResponseHeaders: +- conditionalSerialization: false +- disallowAdditionalPropertiesIfNotPresent: false +- gitHost: github.com +- gitRepoId: GIT_REPO_ID +- gitUserId: GIT_USER_ID +- hideGenerationTimestamp: true +- interfacePrefix: I +- library: generichost +- licenseId: +- modelPropertyNaming: +- netCoreProjectFile: false +- nonPublicApi: false +- nullableReferenceTypes: false +- optionalAssemblyInfo: +- optionalEmitDefaultValues: false +- optionalMethodArgument: true +- optionalProjectFile: +- packageAuthors: OpenAPI +- packageCompany: OpenAPI +- packageCopyright: No Copyright +- packageDescription: A library generated from a OpenAPI doc +- packageGuid: {321C8C3F-0156-40C1-AE42-D59761FB9B6C} +- packageName: Org.OpenAPITools +- packageTags: +- packageTitle: OpenAPI Library +- packageVersion: 1.0.0 +- releaseNote: Minor update +- returnICollection: false +- sortParamsByRequiredFlag: +- sourceFolder: src +- targetFramework: net7.0 +- useCollection: false +- useDateTimeOffset: false +- useOneOfDiscriminatorLookup: false +- validatable: true + +This C# SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project. diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/.openapi-generator/FILES b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/.openapi-generator/FILES index cf0f5c871b..65d841c450 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/.openapi-generator/FILES +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/.openapi-generator/FILES @@ -92,31 +92,38 @@ docs/scripts/git_push.ps1 docs/scripts/git_push.sh src/Org.OpenAPITools.Test/Api/DependencyInjectionTests.cs src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj +src/Org.OpenAPITools.Test/README.md src/Org.OpenAPITools/Api/AnotherFakeApi.cs src/Org.OpenAPITools/Api/DefaultApi.cs src/Org.OpenAPITools/Api/FakeApi.cs src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs +src/Org.OpenAPITools/Api/IApi.cs src/Org.OpenAPITools/Api/PetApi.cs src/Org.OpenAPITools/Api/StoreApi.cs src/Org.OpenAPITools/Api/UserApi.cs src/Org.OpenAPITools/Client/ApiException.cs +src/Org.OpenAPITools/Client/ApiFactory.cs src/Org.OpenAPITools/Client/ApiKeyToken.cs src/Org.OpenAPITools/Client/ApiResponseEventArgs.cs src/Org.OpenAPITools/Client/ApiResponse`1.cs src/Org.OpenAPITools/Client/BasicToken.cs src/Org.OpenAPITools/Client/BearerToken.cs src/Org.OpenAPITools/Client/ClientUtils.cs +src/Org.OpenAPITools/Client/CookieContainer.cs +src/Org.OpenAPITools/Client/DateTimeJsonConverter.cs +src/Org.OpenAPITools/Client/DateTimeNullableJsonConverter.cs src/Org.OpenAPITools/Client/HostConfiguration.cs src/Org.OpenAPITools/Client/HttpSigningConfiguration.cs src/Org.OpenAPITools/Client/HttpSigningToken.cs -src/Org.OpenAPITools/Client/IApi.cs src/Org.OpenAPITools/Client/JsonSerializerOptionsProvider.cs src/Org.OpenAPITools/Client/OAuthToken.cs -src/Org.OpenAPITools/Client/OpenAPIDateJsonConverter.cs src/Org.OpenAPITools/Client/RateLimitProvider`1.cs src/Org.OpenAPITools/Client/TokenBase.cs src/Org.OpenAPITools/Client/TokenContainer`1.cs src/Org.OpenAPITools/Client/TokenProvider`1.cs +src/Org.OpenAPITools/Extensions/IHostBuilderExtensions.cs +src/Org.OpenAPITools/Extensions/IHttpClientBuilderExtensions.cs +src/Org.OpenAPITools/Extensions/IServiceCollectionExtensions.cs src/Org.OpenAPITools/Model/Activity.cs src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs @@ -197,3 +204,4 @@ src/Org.OpenAPITools/Model/User.cs src/Org.OpenAPITools/Model/Whale.cs src/Org.OpenAPITools/Model/Zebra.cs src/Org.OpenAPITools/Org.OpenAPITools.csproj +src/Org.OpenAPITools/README.md diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/README.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/README.md index a8ac54da0c..f9c1c7f746 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/README.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/README.md @@ -1,259 +1 @@ # Created with Openapi Generator - - -## Run the following powershell command to generate the library - -```ps1 -$properties = @( - 'apiName=Api', - 'targetFramework=netstandard2.0', - 'validatable=true', - 'nullableReferenceTypes=', - 'hideGenerationTimestamp=true', - 'packageVersion=1.0.0', - 'packageAuthors=OpenAPI', - 'packageCompany=OpenAPI', - 'packageCopyright=No Copyright', - 'packageDescription=A library generated from a OpenAPI doc', - 'packageName=Org.OpenAPITools', - 'packageTags=', - 'packageTitle=OpenAPI Library' -) -join "," - -$global = @( - 'apiDocs=true', - 'modelDocs=true', - 'apiTests=true', - 'modelTests=true' -) -join "," - -java -jar "/openapi-generator/modules/openapi-generator-cli/target/openapi-generator-cli.jar" generate ` - -g csharp-netcore ` - -i .yaml ` - -o ` - --library generichost ` - --additional-properties $properties ` - --global-property $global ` - --git-host "github.com" ` - --git-repo-id "GIT_REPO_ID" ` - --git-user-id "GIT_USER_ID" ` - --release-note "Minor update" - # -t templates -``` - - -## Using the library in your project - -```cs -using System; -using System.Threading.Tasks; -using Microsoft.Extensions.Hosting; -using Microsoft.Extensions.DependencyInjection; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace YourProject -{ - public class Program - { - public static async Task Main(string[] args) - { - var host = CreateHostBuilder(args).Build(); - var api = host.Services.GetRequiredService(); - ApiResponse foo = await api.Call123TestSpecialTagsWithHttpInfoAsync("todo"); - } - - public static IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args) - .ConfigureApi((context, options) => - { - // the type of token here depends on the api security specifications - ApiKeyToken token = new(""); - options.AddTokens(token); - - // optionally choose the method the tokens will be provided with, default is RateLimitProvider - options.UseProvider, ApiKeyToken>(); - - // the type of token here depends on the api security specifications - ApiKeyToken token = new(""); - options.AddTokens(token); - - // optionally choose the method the tokens will be provided with, default is RateLimitProvider - options.UseProvider, ApiKeyToken>(); - - // the type of token here depends on the api security specifications - ApiKeyToken token = new(""); - options.AddTokens(token); - - // optionally choose the method the tokens will be provided with, default is RateLimitProvider - options.UseProvider, ApiKeyToken>(); - - // the type of token here depends on the api security specifications - ApiKeyToken token = new(""); - options.AddTokens(token); - - // optionally choose the method the tokens will be provided with, default is RateLimitProvider - options.UseProvider, ApiKeyToken>(); - - // the type of token here depends on the api security specifications - ApiKeyToken token = new(""); - options.AddTokens(token); - - // optionally choose the method the tokens will be provided with, default is RateLimitProvider - options.UseProvider, ApiKeyToken>(); - - // the type of token here depends on the api security specifications - ApiKeyToken token = new(""); - options.AddTokens(token); - - // optionally choose the method the tokens will be provided with, default is RateLimitProvider - options.UseProvider, ApiKeyToken>(); - - options.ConfigureJsonOptions((jsonOptions) => - { - // your custom converters if any - }); - - options.AddApiHttpClients(builder: builder => builder - .AddRetryPolicy(2) - .AddTimeoutPolicy(TimeSpan.FromSeconds(5)) - .AddCircuitBreakerPolicy(10, TimeSpan.FromSeconds(30)) - // add whatever middleware you prefer - ); - }); - } -} -``` - -## Questions - -- What about HttpRequest failures and retries? - If supportsRetry is enabled, you can configure Polly in the ConfigureClients method. -- How are tokens used? - Tokens are provided by a TokenProvider class. The default is RateLimitProvider which will perform client side rate limiting. - Other providers can be used with the UseProvider method. -- Does an HttpRequest throw an error when the server response is not Ok? - It depends how you made the request. If the return type is ApiResponse no error will be thrown, though the Content property will be null. - StatusCode and ReasonPhrase will contain information about the error. - If the return type is T, then it will throw. If the return type is TOrDefault, it will return null. - - -## Dependencies - -- [Microsoft.Extensions.Hosting](https://www.nuget.org/packages/Microsoft.Extensions.Hosting/) - 5.0.0 or later -- [Microsoft.Extensions.Http](https://www.nuget.org/packages/Microsoft.Extensions.Http/) - 5.0.0 or later -- [Microsoft.Extensions.Http.Polly](https://www.nuget.org/packages/Microsoft.Extensions.Http.Polly/) - 5.0.1 or later -- [Polly](https://www.nuget.org/packages/Polly/) - 7.2.3 or later -- [Newtonsoft.Json](https://www.nuget.org/packages/Newtonsoft.Json/) - 13.0.1 or later -- [JsonSubTypes](https://www.nuget.org/packages/JsonSubTypes/) - 1.7.0 or later -- [CompareNETObjects](https://www.nuget.org/packages/CompareNETObjects) - 4.61.0 or later -- [System.ComponentModel.Annotations](https://www.nuget.org/packages/System.ComponentModel.Annotations) - 4.7.0 or later - - -## Documentation for Authorization - -Authentication schemes defined for the API: - - -### api_key - -- **Type**: API key -- **API key parameter name**: api_key -- **Location**: HTTP header - - -### api_key_query - -- **Type**: API key -- **API key parameter name**: api_key_query -- **Location**: URL query string - - -### bearer_test - - -- **Type**: Bearer Authentication - - -### http_basic_test - - -- **Type**: HTTP basic authentication - - -### http_signature_test - - - - -### petstore_auth - - -- **Type**: OAuth -- **Flow**: implicit -- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog -- **Scopes**: -- write:pets: modify pets in your account -- read:pets: read your pets - -## Build -- SDK version: 1.0.0 -- Build package: org.openapitools.codegen.languages.CSharpNetCoreClientCodegen - -## Api Information -- appName: OpenAPI Petstore -- appVersion: 1.0.0 -- appDescription: 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 Global properties](https://openapi-generator.tech/docs/globals) -- generateAliasAsModel: -- supportingFiles: -- models: omitted for brevity -- apis: omitted for brevity -- apiDocs: true -- modelDocs: true -- apiTests: true -- modelTests: true -- withXml: - -## [OpenApi Generator Parameters](https://openapi-generator.tech/docs/generators/csharp-netcore) -- allowUnicodeIdentifiers: -- apiName: Api -- caseInsensitiveResponseHeaders: -- conditionalSerialization: false -- disallowAdditionalPropertiesIfNotPresent: false -- gitHost: github.com -- gitRepoId: GIT_REPO_ID -- gitUserId: GIT_USER_ID -- hideGenerationTimestamp: true -- interfacePrefix: I -- library: generichost -- licenseId: -- modelPropertyNaming: -- netCoreProjectFile: false -- nonPublicApi: false -- nullableReferenceTypes: -- optionalAssemblyInfo: -- optionalEmitDefaultValues: false -- optionalMethodArgument: true -- optionalProjectFile: -- packageAuthors: OpenAPI -- packageCompany: OpenAPI -- packageCopyright: No Copyright -- packageDescription: A library generated from a OpenAPI doc -- packageGuid: {321C8C3F-0156-40C1-AE42-D59761FB9B6C} -- packageName: Org.OpenAPITools -- packageTags: -- packageTitle: OpenAPI Library -- packageVersion: 1.0.0 -- releaseNote: Minor update -- returnICollection: false -- sortParamsByRequiredFlag: -- sourceFolder: src -- targetFramework: netstandard2.0 -- useCollection: false -- useDateTimeOffset: false -- useOneOfDiscriminatorLookup: false -- validatable: true - -This C# SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project. diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/apis/FakeApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/apis/FakeApi.md index f17e38282a..b815f20b5a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/apis/FakeApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/apis/FakeApi.md @@ -631,7 +631,7 @@ No authorization required # **TestBodyWithQueryParams** -> void TestBodyWithQueryParams (string query, User user) +> void TestBodyWithQueryParams (User user, string query) @@ -652,12 +652,12 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new FakeApi(config); - var query = "query_example"; // string | var user = new User(); // User | + var query = "query_example"; // string | try { - apiInstance.TestBodyWithQueryParams(query, user); + apiInstance.TestBodyWithQueryParams(user, query); } catch (ApiException e) { @@ -676,7 +676,7 @@ This returns an ApiResponse object which contains the response data, status code ```csharp try { - apiInstance.TestBodyWithQueryParamsWithHttpInfo(query, user); + apiInstance.TestBodyWithQueryParamsWithHttpInfo(user, query); } catch (ApiException e) { @@ -690,8 +690,8 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **query** | **string** | | | | **user** | [**User**](User.md) | | | +| **query** | **string** | | | ### Return type @@ -807,7 +807,7 @@ No authorization required # **TestEndpointParameters** -> void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, string password = null, string callback = null, DateTime? dateTime = null) +> void TestEndpointParameters (byte[] _byte, decimal number, double _double, string patternWithoutDelimiter, DateTime? date = null, System.IO.Stream binary = null, float? _float = null, int? integer = null, int? int32 = null, long? int64 = null, string _string = null, string password = null, string callback = null, DateTime? dateTime = null) Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -834,17 +834,17 @@ namespace Example config.Password = "YOUR_PASSWORD"; var apiInstance = new FakeApi(config); + var _byte = System.Text.Encoding.ASCII.GetBytes("BYTE_ARRAY_DATA_HERE"); // byte[] | None var number = 8.14D; // decimal | None var _double = 1.2D; // double | None var patternWithoutDelimiter = "patternWithoutDelimiter_example"; // string | None - var _byte = System.Text.Encoding.ASCII.GetBytes("BYTE_ARRAY_DATA_HERE"); // byte[] | None + var date = DateTime.Parse("2013-10-20"); // DateTime? | None (optional) + var binary = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | None (optional) + var _float = 3.4F; // float? | None (optional) var integer = 56; // int? | None (optional) var int32 = 56; // int? | None (optional) var int64 = 789L; // long? | None (optional) - var _float = 3.4F; // float? | None (optional) var _string = "_string_example"; // string | None (optional) - var binary = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | None (optional) - var date = DateTime.Parse("2013-10-20"); // DateTime? | None (optional) var password = "password_example"; // string | None (optional) var callback = "callback_example"; // string | None (optional) var dateTime = DateTime.Parse(""2010-02-01T10:20:10.111110+01:00""); // DateTime? | None (optional) (default to "2010-02-01T10:20:10.111110+01:00") @@ -852,7 +852,7 @@ namespace Example try { // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - apiInstance.TestEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, password, callback, dateTime); + apiInstance.TestEndpointParameters(_byte, number, _double, patternWithoutDelimiter, date, binary, _float, integer, int32, int64, _string, password, callback, dateTime); } catch (ApiException e) { @@ -872,7 +872,7 @@ This returns an ApiResponse object which contains the response data, status code try { // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - apiInstance.TestEndpointParametersWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, password, callback, dateTime); + apiInstance.TestEndpointParametersWithHttpInfo(_byte, number, _double, patternWithoutDelimiter, date, binary, _float, integer, int32, int64, _string, password, callback, dateTime); } catch (ApiException e) { @@ -886,17 +886,17 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| +| **_byte** | **byte[]** | None | | | **number** | **decimal** | None | | | **_double** | **double** | None | | | **patternWithoutDelimiter** | **string** | None | | -| **_byte** | **byte[]** | None | | +| **date** | **DateTime?** | None | [optional] | +| **binary** | **System.IO.Stream****System.IO.Stream** | None | [optional] | +| **_float** | **float?** | None | [optional] | | **integer** | **int?** | None | [optional] | | **int32** | **int?** | None | [optional] | | **int64** | **long?** | None | [optional] | -| **_float** | **float?** | None | [optional] | | **_string** | **string** | None | [optional] | -| **binary** | **System.IO.Stream****System.IO.Stream** | None | [optional] | -| **date** | **DateTime?** | None | [optional] | | **password** | **string** | None | [optional] | | **callback** | **string** | None | [optional] | | **dateTime** | **DateTime?** | None | [optional] [default to "2010-02-01T10:20:10.111110+01:00"] | @@ -925,7 +925,7 @@ void (empty response body) # **TestEnumParameters** -> void TestEnumParameters (List enumHeaderStringArray = null, List enumQueryStringArray = null, int? enumQueryInteger = null, double? enumQueryDouble = null, string enumHeaderString = null, string enumQueryString = null, List enumFormStringArray = null, string enumFormString = null) +> void TestEnumParameters (List enumHeaderStringArray = null, List enumQueryStringArray = null, double? enumQueryDouble = null, int? enumQueryInteger = null, List enumFormStringArray = null, string enumHeaderString = null, string enumQueryString = null, string enumFormString = null) To test enum parameters @@ -950,17 +950,17 @@ namespace Example var apiInstance = new FakeApi(config); var enumHeaderStringArray = new List(); // List | Header parameter enum test (string array) (optional) var enumQueryStringArray = new List(); // List | Query parameter enum test (string array) (optional) - var enumQueryInteger = 1; // int? | Query parameter enum test (double) (optional) var enumQueryDouble = 1.1D; // double? | Query parameter enum test (double) (optional) + var enumQueryInteger = 1; // int? | Query parameter enum test (double) (optional) + var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) var enumHeaderString = "_abc"; // string | Header parameter enum test (string) (optional) (default to -efg) var enumQueryString = "_abc"; // string | Query parameter enum test (string) (optional) (default to -efg) - var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) var enumFormString = "_abc"; // string | Form parameter enum test (string) (optional) (default to -efg) try { // To test enum parameters - apiInstance.TestEnumParameters(enumHeaderStringArray, enumQueryStringArray, enumQueryInteger, enumQueryDouble, enumHeaderString, enumQueryString, enumFormStringArray, enumFormString); + apiInstance.TestEnumParameters(enumHeaderStringArray, enumQueryStringArray, enumQueryDouble, enumQueryInteger, enumFormStringArray, enumHeaderString, enumQueryString, enumFormString); } catch (ApiException e) { @@ -980,7 +980,7 @@ This returns an ApiResponse object which contains the response data, status code try { // To test enum parameters - apiInstance.TestEnumParametersWithHttpInfo(enumHeaderStringArray, enumQueryStringArray, enumQueryInteger, enumQueryDouble, enumHeaderString, enumQueryString, enumFormStringArray, enumFormString); + apiInstance.TestEnumParametersWithHttpInfo(enumHeaderStringArray, enumQueryStringArray, enumQueryDouble, enumQueryInteger, enumFormStringArray, enumHeaderString, enumQueryString, enumFormString); } catch (ApiException e) { @@ -996,11 +996,11 @@ catch (ApiException e) |------|------|-------------|-------| | **enumHeaderStringArray** | [**List<string>**](string.md) | Header parameter enum test (string array) | [optional] | | **enumQueryStringArray** | [**List<string>**](string.md) | Query parameter enum test (string array) | [optional] | -| **enumQueryInteger** | **int?** | Query parameter enum test (double) | [optional] | | **enumQueryDouble** | **double?** | Query parameter enum test (double) | [optional] | +| **enumQueryInteger** | **int?** | Query parameter enum test (double) | [optional] | +| **enumFormStringArray** | [**List<string>**](string.md) | Form parameter enum test (string array) | [optional] [default to $] | | **enumHeaderString** | **string** | Header parameter enum test (string) | [optional] [default to -efg] | | **enumQueryString** | **string** | Query parameter enum test (string) | [optional] [default to -efg] | -| **enumFormStringArray** | [**List<string>**](string.md) | Form parameter enum test (string array) | [optional] [default to $] | | **enumFormString** | **string** | Form parameter enum test (string) | [optional] [default to -efg] | ### Return type @@ -1027,7 +1027,7 @@ No authorization required # **TestGroupParameters** -> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null) +> void TestGroupParameters (bool requiredBooleanGroup, int requiredStringGroup, long requiredInt64Group, bool? booleanGroup = null, int? stringGroup = null, long? int64Group = null) Fake endpoint to test group parameters (optional) @@ -1053,17 +1053,17 @@ namespace Example config.AccessToken = "YOUR_BEARER_TOKEN"; var apiInstance = new FakeApi(config); - var requiredStringGroup = 56; // int | Required String in group parameters var requiredBooleanGroup = true; // bool | Required Boolean in group parameters + var requiredStringGroup = 56; // int | Required String in group parameters var requiredInt64Group = 789L; // long | Required Integer in group parameters - var stringGroup = 56; // int? | String in group parameters (optional) var booleanGroup = true; // bool? | Boolean in group parameters (optional) + var stringGroup = 56; // int? | String in group parameters (optional) var int64Group = 789L; // long? | Integer in group parameters (optional) try { // Fake endpoint to test group parameters (optional) - apiInstance.TestGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + apiInstance.TestGroupParameters(requiredBooleanGroup, requiredStringGroup, requiredInt64Group, booleanGroup, stringGroup, int64Group); } catch (ApiException e) { @@ -1083,7 +1083,7 @@ This returns an ApiResponse object which contains the response data, status code try { // Fake endpoint to test group parameters (optional) - apiInstance.TestGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + apiInstance.TestGroupParametersWithHttpInfo(requiredBooleanGroup, requiredStringGroup, requiredInt64Group, booleanGroup, stringGroup, int64Group); } catch (ApiException e) { @@ -1097,11 +1097,11 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **requiredStringGroup** | **int** | Required String in group parameters | | | **requiredBooleanGroup** | **bool** | Required Boolean in group parameters | | +| **requiredStringGroup** | **int** | Required String in group parameters | | | **requiredInt64Group** | **long** | Required Integer in group parameters | | -| **stringGroup** | **int?** | String in group parameters | [optional] | | **booleanGroup** | **bool?** | Boolean in group parameters | [optional] | +| **stringGroup** | **int?** | String in group parameters | [optional] | | **int64Group** | **long?** | Integer in group parameters | [optional] | ### Return type diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/apis/PetApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/apis/PetApi.md index 8ece47af9c..da6486e4cd 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/apis/PetApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/apis/PetApi.md @@ -664,7 +664,7 @@ void (empty response body) # **UploadFile** -> ApiResponse UploadFile (long petId, string additionalMetadata = null, System.IO.Stream file = null) +> ApiResponse UploadFile (long petId, System.IO.Stream file = null, string additionalMetadata = null) uploads an image @@ -689,13 +689,13 @@ namespace Example var apiInstance = new PetApi(config); var petId = 789L; // long | ID of pet to update - var additionalMetadata = "additionalMetadata_example"; // string | Additional data to pass to server (optional) var file = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | file to upload (optional) + var additionalMetadata = "additionalMetadata_example"; // string | Additional data to pass to server (optional) try { // uploads an image - ApiResponse result = apiInstance.UploadFile(petId, additionalMetadata, file); + ApiResponse result = apiInstance.UploadFile(petId, file, additionalMetadata); Debug.WriteLine(result); } catch (ApiException e) @@ -716,7 +716,7 @@ This returns an ApiResponse object which contains the response data, status code try { // uploads an image - ApiResponse response = apiInstance.UploadFileWithHttpInfo(petId, additionalMetadata, file); + ApiResponse response = apiInstance.UploadFileWithHttpInfo(petId, file, additionalMetadata); Debug.Write("Status Code: " + response.StatusCode); Debug.Write("Response Headers: " + response.Headers); Debug.Write("Response Body: " + response.Data); @@ -734,8 +734,8 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| | **petId** | **long** | ID of pet to update | | -| **additionalMetadata** | **string** | Additional data to pass to server | [optional] | | **file** | **System.IO.Stream****System.IO.Stream** | file to upload | [optional] | +| **additionalMetadata** | **string** | Additional data to pass to server | [optional] | ### Return type @@ -760,7 +760,7 @@ catch (ApiException e) # **UploadFileWithRequiredFile** -> ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, string additionalMetadata = null) +> ApiResponse UploadFileWithRequiredFile (System.IO.Stream requiredFile, long petId, string additionalMetadata = null) uploads an image (required) @@ -784,14 +784,14 @@ namespace Example config.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new PetApi(config); - var petId = 789L; // long | ID of pet to update var requiredFile = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | file to upload + var petId = 789L; // long | ID of pet to update var additionalMetadata = "additionalMetadata_example"; // string | Additional data to pass to server (optional) try { // uploads an image (required) - ApiResponse result = apiInstance.UploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); + ApiResponse result = apiInstance.UploadFileWithRequiredFile(requiredFile, petId, additionalMetadata); Debug.WriteLine(result); } catch (ApiException e) @@ -812,7 +812,7 @@ This returns an ApiResponse object which contains the response data, status code try { // uploads an image (required) - ApiResponse response = apiInstance.UploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata); + ApiResponse response = apiInstance.UploadFileWithRequiredFileWithHttpInfo(requiredFile, petId, additionalMetadata); Debug.Write("Status Code: " + response.StatusCode); Debug.Write("Response Headers: " + response.Headers); Debug.Write("Response Body: " + response.Data); @@ -829,8 +829,8 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **petId** | **long** | ID of pet to update | | | **requiredFile** | **System.IO.Stream****System.IO.Stream** | file to upload | | +| **petId** | **long** | ID of pet to update | | | **additionalMetadata** | **string** | Additional data to pass to server | [optional] | ### Return type diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/apis/UserApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/apis/UserApi.md index fd1c1a7d62..a862c8c112 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/apis/UserApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/apis/UserApi.md @@ -623,7 +623,7 @@ No authorization required # **UpdateUser** -> void UpdateUser (string username, User user) +> void UpdateUser (User user, string username) Updated user @@ -646,13 +646,13 @@ namespace Example Configuration config = new Configuration(); config.BasePath = "http://petstore.swagger.io:80/v2"; var apiInstance = new UserApi(config); - var username = "username_example"; // string | name that need to be deleted var user = new User(); // User | Updated user object + var username = "username_example"; // string | name that need to be deleted try { // Updated user - apiInstance.UpdateUser(username, user); + apiInstance.UpdateUser(user, username); } catch (ApiException e) { @@ -672,7 +672,7 @@ This returns an ApiResponse object which contains the response data, status code try { // Updated user - apiInstance.UpdateUserWithHttpInfo(username, user); + apiInstance.UpdateUserWithHttpInfo(user, username); } catch (ApiException e) { @@ -686,8 +686,8 @@ catch (ApiException e) | Name | Type | Description | Notes | |------|------|-------------|-------| -| **username** | **string** | name that need to be deleted | | | **user** | [**User**](User.md) | Updated user object | | +| **username** | **string** | name that need to be deleted | | ### Return type diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/AdditionalPropertiesClass.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/AdditionalPropertiesClass.md index 1f91945000..f79869f95a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/AdditionalPropertiesClass.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/AdditionalPropertiesClass.md @@ -4,14 +4,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**MapProperty** | **Dictionary<string, string>** | | [optional] +**EmptyMap** | **Object** | an object with no declared properties and no undeclared properties, hence it's an empty map. | [optional] **MapOfMapProperty** | **Dictionary<string, Dictionary<string, string>>** | | [optional] -**Anytype1** | **Object** | | [optional] +**MapProperty** | **Dictionary<string, string>** | | [optional] **MapWithUndeclaredPropertiesAnytype1** | **Object** | | [optional] **MapWithUndeclaredPropertiesAnytype2** | **Object** | | [optional] **MapWithUndeclaredPropertiesAnytype3** | **Dictionary<string, Object>** | | [optional] -**EmptyMap** | **Object** | an object with no declared properties and no undeclared properties, hence it's an empty map. | [optional] **MapWithUndeclaredPropertiesString** | **Dictionary<string, string>** | | [optional] +**Anytype1** | **Object** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/ApiResponse.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/ApiResponse.md index bc808ceeae..d89ed1a25d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/ApiResponse.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/ApiResponse.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Code** | **int** | | [optional] -**Type** | **string** | | [optional] **Message** | **string** | | [optional] +**Type** | **string** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/ArrayTest.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/ArrayTest.md index 32365e6d4d..ed572120cd 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/ArrayTest.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/ArrayTest.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ArrayOfString** | **List<string>** | | [optional] **ArrayArrayOfInteger** | **List<List<long>>** | | [optional] **ArrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [optional] +**ArrayOfString** | **List<string>** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Capitalization.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Capitalization.md index fde98a967e..9e225c1723 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Capitalization.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Capitalization.md @@ -4,12 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**SmallCamel** | **string** | | [optional] +**ATT_NAME** | **string** | Name of the pet | [optional] **CapitalCamel** | **string** | | [optional] -**SmallSnake** | **string** | | [optional] **CapitalSnake** | **string** | | [optional] **SCAETHFlowPoints** | **string** | | [optional] -**ATT_NAME** | **string** | Name of the pet | [optional] +**SmallCamel** | **string** | | [optional] +**SmallSnake** | **string** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Category.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Category.md index c2cf3f8e91..6eb0a2e13e 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Category.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Category.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | **string** | | [default to "default-name"] **Id** | **long** | | [optional] +**Name** | **string** | | [default to "default-name"] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/ClassModel.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/ClassModel.md index bb35816c91..a098828a04 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/ClassModel.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/ClassModel.md @@ -5,7 +5,7 @@ Model for testing model with \"_class\" property Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Class** | **string** | | [optional] +**ClassProperty** | **string** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Drawing.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Drawing.md index 18117e6c93..fcee9662af 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Drawing.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Drawing.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **MainShape** | [**Shape**](Shape.md) | | [optional] **ShapeOrNull** | [**ShapeOrNull**](ShapeOrNull.md) | | [optional] -**NullableShape** | [**NullableShape**](NullableShape.md) | | [optional] **Shapes** | [**List<Shape>**](Shape.md) | | [optional] +**NullableShape** | [**NullableShape**](NullableShape.md) | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/EnumArrays.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/EnumArrays.md index 2a27962cc5..7467f67978 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/EnumArrays.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/EnumArrays.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**JustSymbol** | **string** | | [optional] **ArrayEnum** | **List<EnumArrays.ArrayEnumEnum>** | | [optional] +**JustSymbol** | **string** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/EnumTest.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/EnumTest.md index 71602270ba..53bbfe31e7 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/EnumTest.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/EnumTest.md @@ -4,15 +4,15 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**EnumStringRequired** | **string** | | -**EnumString** | **string** | | [optional] **EnumInteger** | **int** | | [optional] **EnumIntegerOnly** | **int** | | [optional] **EnumNumber** | **double** | | [optional] -**OuterEnum** | **OuterEnum** | | [optional] -**OuterEnumInteger** | **OuterEnumInteger** | | [optional] +**EnumString** | **string** | | [optional] +**EnumStringRequired** | **string** | | **OuterEnumDefaultValue** | **OuterEnumDefaultValue** | | [optional] +**OuterEnumInteger** | **OuterEnumInteger** | | [optional] **OuterEnumIntegerDefaultValue** | **OuterEnumIntegerDefaultValue** | | [optional] +**OuterEnum** | **OuterEnum** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/FooGetDefaultResponse.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/FooGetDefaultResponse.md index 47e50daca3..78c99facf5 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/FooGetDefaultResponse.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/FooGetDefaultResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**String** | [**Foo**](Foo.md) | | [optional] +**StringProperty** | [**Foo**](Foo.md) | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/FormatTest.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/FormatTest.md index 0b92c2fb10..4e34a6d18b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/FormatTest.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/FormatTest.md @@ -4,22 +4,22 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Number** | **decimal** | | -**Byte** | **byte[]** | | +**Binary** | **System.IO.Stream** | | [optional] +**ByteProperty** | **byte[]** | | **Date** | **DateTime** | | -**Password** | **string** | | -**Integer** | **int** | | [optional] +**DateTime** | **DateTime** | | [optional] +**DecimalProperty** | **decimal** | | [optional] +**DoubleProperty** | **double** | | [optional] +**FloatProperty** | **float** | | [optional] **Int32** | **int** | | [optional] **Int64** | **long** | | [optional] -**Float** | **float** | | [optional] -**Double** | **double** | | [optional] -**Decimal** | **decimal** | | [optional] -**String** | **string** | | [optional] -**Binary** | **System.IO.Stream** | | [optional] -**DateTime** | **DateTime** | | [optional] -**Uuid** | **Guid** | | [optional] +**Integer** | **int** | | [optional] +**Number** | **decimal** | | +**Password** | **string** | | **PatternWithDigits** | **string** | A string that is a 10 digit number. Can have leading zeros. | [optional] **PatternWithDigitsAndDelimiter** | **string** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [optional] +**StringProperty** | **string** | | [optional] +**Uuid** | **Guid** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/MapTest.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/MapTest.md index aaee09f787..5dd27228bb 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/MapTest.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/MapTest.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**MapMapOfString** | **Dictionary<string, Dictionary<string, string>>** | | [optional] -**MapOfEnumString** | **Dictionary<string, MapTest.InnerEnum>** | | [optional] **DirectMap** | **Dictionary<string, bool>** | | [optional] **IndirectMap** | **Dictionary<string, bool>** | | [optional] +**MapMapOfString** | **Dictionary<string, Dictionary<string, string>>** | | [optional] +**MapOfEnumString** | **Dictionary<string, MapTest.InnerEnum>** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/MixedPropertiesAndAdditionalPropertiesClass.md index 031d2b9606..0bac85a8e8 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/MixedPropertiesAndAdditionalPropertiesClass.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Uuid** | **Guid** | | [optional] **DateTime** | **DateTime** | | [optional] **Map** | [**Dictionary<string, Animal>**](Animal.md) | | [optional] +**Uuid** | **Guid** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Model200Response.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Model200Response.md index 8bc8049f46..93139e1d1a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Model200Response.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Model200Response.md @@ -5,8 +5,8 @@ Model for testing model name starting with number Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**ClassProperty** | **string** | | [optional] **Name** | **int** | | [optional] -**Class** | **string** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/ModelClient.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/ModelClient.md index 9e0e83645f..51cf0636e7 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/ModelClient.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/ModelClient.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**_Client** | **string** | | [optional] +**_ClientProperty** | **string** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Name.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Name.md index 2ee782c0c5..11f49b9fd4 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Name.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Name.md @@ -6,8 +6,8 @@ Model for testing model name same as property name Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **NameProperty** | **int** | | -**SnakeCase** | **int** | | [optional] [readonly] **Property** | **string** | | [optional] +**SnakeCase** | **int** | | [optional] [readonly] **_123Number** | **int** | | [optional] [readonly] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/NullableClass.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/NullableClass.md index d4a19d1856..ac86336ea7 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/NullableClass.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/NullableClass.md @@ -4,18 +4,18 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**IntegerProp** | **int?** | | [optional] -**NumberProp** | **decimal?** | | [optional] +**ArrayItemsNullable** | **List<Object>** | | [optional] +**ObjectItemsNullable** | **Dictionary<string, Object>** | | [optional] +**ArrayAndItemsNullableProp** | **List<Object>** | | [optional] +**ArrayNullableProp** | **List<Object>** | | [optional] **BooleanProp** | **bool?** | | [optional] -**StringProp** | **string** | | [optional] **DateProp** | **DateTime?** | | [optional] **DatetimeProp** | **DateTime?** | | [optional] -**ArrayNullableProp** | **List<Object>** | | [optional] -**ArrayAndItemsNullableProp** | **List<Object>** | | [optional] -**ArrayItemsNullable** | **List<Object>** | | [optional] -**ObjectNullableProp** | **Dictionary<string, Object>** | | [optional] +**IntegerProp** | **int?** | | [optional] +**NumberProp** | **decimal?** | | [optional] **ObjectAndItemsNullableProp** | **Dictionary<string, Object>** | | [optional] -**ObjectItemsNullable** | **Dictionary<string, Object>** | | [optional] +**ObjectNullableProp** | **Dictionary<string, Object>** | | [optional] +**StringProp** | **string** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/ObjectWithDeprecatedFields.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/ObjectWithDeprecatedFields.md index b737f7d757..9f44c24d19 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/ObjectWithDeprecatedFields.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/ObjectWithDeprecatedFields.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Uuid** | **string** | | [optional] -**Id** | **decimal** | | [optional] -**DeprecatedRef** | [**DeprecatedObject**](DeprecatedObject.md) | | [optional] **Bars** | **List<string>** | | [optional] +**DeprecatedRef** | [**DeprecatedObject**](DeprecatedObject.md) | | [optional] +**Id** | **decimal** | | [optional] +**Uuid** | **string** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/OuterComposite.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/OuterComposite.md index abf676810f..8985c59d09 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/OuterComposite.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/OuterComposite.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**MyBoolean** | **bool** | | [optional] **MyNumber** | **decimal** | | [optional] **MyString** | **string** | | [optional] -**MyBoolean** | **bool** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Pet.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Pet.md index 7de10304ab..b13bb576b4 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Pet.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/Pet.md @@ -4,12 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**Category** | [**Category**](Category.md) | | [optional] +**Id** | **long** | | [optional] **Name** | **string** | | **PhotoUrls** | **List<string>** | | -**Id** | **long** | | [optional] -**Category** | [**Category**](Category.md) | | [optional] -**Tags** | [**List<Tag>**](Tag.md) | | [optional] **Status** | **string** | pet status in the store | [optional] +**Tags** | [**List<Tag>**](Tag.md) | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/SpecialModelName.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/SpecialModelName.md index 662fa6f4a3..b48f349000 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/SpecialModelName.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/SpecialModelName.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**SpecialPropertyName** | **long** | | [optional] **SpecialModelNameProperty** | **string** | | [optional] +**SpecialPropertyName** | **long** | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/User.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/User.md index a0f0d22389..455f031674 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/User.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/models/User.md @@ -4,18 +4,18 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **long** | | [optional] -**Username** | **string** | | [optional] -**FirstName** | **string** | | [optional] -**LastName** | **string** | | [optional] **Email** | **string** | | [optional] +**FirstName** | **string** | | [optional] +**Id** | **long** | | [optional] +**LastName** | **string** | | [optional] +**ObjectWithNoDeclaredProps** | **Object** | test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. | [optional] **Password** | **string** | | [optional] **Phone** | **string** | | [optional] **UserStatus** | **int** | User Status | [optional] -**ObjectWithNoDeclaredProps** | **Object** | test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. | [optional] -**ObjectWithNoDeclaredPropsNullable** | **Object** | test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. | [optional] +**Username** | **string** | | [optional] **AnyTypeProp** | **Object** | test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389 | [optional] **AnyTypePropNullable** | **Object** | test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values. | [optional] +**ObjectWithNoDeclaredPropsNullable** | **Object** | test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Api/AnotherFakeApiTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Api/AnotherFakeApiTests.cs index fea7e39428..30f54c0aab 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Api/AnotherFakeApiTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Api/AnotherFakeApiTests.cs @@ -12,7 +12,7 @@ using System.Collections.Generic; using System.Threading.Tasks; using Xunit; using Microsoft.Extensions.DependencyInjection; -using Org.OpenAPITools.Api; +using Org.OpenAPITools.IApi; using Org.OpenAPITools.Model; @@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api /// public sealed class AnotherFakeApiTests : ApiTestsBase { - private readonly IAnotherFakeApi _instance; + private readonly IApi.IAnotherFakeApi _instance; public AnotherFakeApiTests(): base(Array.Empty()) { - _instance = _host.Services.GetRequiredService(); + _instance = _host.Services.GetRequiredService(); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Api/ApiTestsBase.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Api/ApiTestsBase.cs index 88d6fc1f48..75e37de241 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Api/ApiTestsBase.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Api/ApiTestsBase.cs @@ -12,6 +12,7 @@ using System.Collections.Generic; using System.Security.Cryptography; using Microsoft.Extensions.Hosting; using Org.OpenAPITools.Client; +using Org.OpenAPITools.Extensions; /* ********************************************************************************* @@ -49,7 +50,7 @@ namespace Org.OpenAPITools.Test.Api } public static IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args) - .ConfigureApi((context, options) => + .ConfigureApi((context, services, options) => { ApiKeyToken apiKeyToken = new ApiKeyToken(context.Configuration[""], timeout: TimeSpan.FromSeconds(1)); options.AddTokens(apiKeyToken); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Api/DefaultApiTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Api/DefaultApiTests.cs index 16f60704f2..d79076dcd6 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Api/DefaultApiTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Api/DefaultApiTests.cs @@ -12,7 +12,7 @@ using System.Collections.Generic; using System.Threading.Tasks; using Xunit; using Microsoft.Extensions.DependencyInjection; -using Org.OpenAPITools.Api; +using Org.OpenAPITools.IApi; using Org.OpenAPITools.Model; @@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api /// public sealed class DefaultApiTests : ApiTestsBase { - private readonly IDefaultApi _instance; + private readonly IApi.IDefaultApi _instance; public DefaultApiTests(): base(Array.Empty()) { - _instance = _host.Services.GetRequiredService(); + _instance = _host.Services.GetRequiredService(); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Api/DependencyInjectionTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Api/DependencyInjectionTests.cs index 4eee3d2b6e..256df5697c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Api/DependencyInjectionTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Api/DependencyInjectionTests.cs @@ -13,7 +13,8 @@ using Microsoft.Extensions.DependencyInjection; using System.Collections.Generic; using System.Security.Cryptography; using Org.OpenAPITools.Client; -using Org.OpenAPITools.Api; +using Org.OpenAPITools.IApi; +using Org.OpenAPITools.Extensions; using Xunit; namespace Org.OpenAPITools.Test.Api @@ -24,7 +25,7 @@ namespace Org.OpenAPITools.Test.Api public class DependencyInjectionTest { private readonly IHost _hostUsingConfigureWithoutAClient = - Host.CreateDefaultBuilder(Array.Empty()).ConfigureApi((context, options) => + Host.CreateDefaultBuilder(Array.Empty()).ConfigureApi((context, services, options) => { ApiKeyToken apiKeyToken = new ApiKeyToken($"", timeout: TimeSpan.FromSeconds(1)); options.AddTokens(apiKeyToken); @@ -45,7 +46,7 @@ namespace Org.OpenAPITools.Test.Api .Build(); private readonly IHost _hostUsingConfigureWithAClient = - Host.CreateDefaultBuilder(Array.Empty()).ConfigureApi((context, options) => + Host.CreateDefaultBuilder(Array.Empty()).ConfigureApi((context, services, options) => { ApiKeyToken apiKeyToken = new ApiKeyToken($"", timeout: TimeSpan.FromSeconds(1)); options.AddTokens(apiKeyToken); @@ -121,25 +122,25 @@ namespace Org.OpenAPITools.Test.Api [Fact] public void ConfigureApiWithAClientTest() { - var anotherFakeApi = _hostUsingConfigureWithAClient.Services.GetRequiredService(); + var anotherFakeApi = _hostUsingConfigureWithAClient.Services.GetRequiredService(); Assert.True(anotherFakeApi.HttpClient.BaseAddress != null); - var defaultApi = _hostUsingConfigureWithAClient.Services.GetRequiredService(); + var defaultApi = _hostUsingConfigureWithAClient.Services.GetRequiredService(); Assert.True(defaultApi.HttpClient.BaseAddress != null); - var fakeApi = _hostUsingConfigureWithAClient.Services.GetRequiredService(); + var fakeApi = _hostUsingConfigureWithAClient.Services.GetRequiredService(); Assert.True(fakeApi.HttpClient.BaseAddress != null); - var fakeClassnameTags123Api = _hostUsingConfigureWithAClient.Services.GetRequiredService(); + var fakeClassnameTags123Api = _hostUsingConfigureWithAClient.Services.GetRequiredService(); Assert.True(fakeClassnameTags123Api.HttpClient.BaseAddress != null); - var petApi = _hostUsingConfigureWithAClient.Services.GetRequiredService(); + var petApi = _hostUsingConfigureWithAClient.Services.GetRequiredService(); Assert.True(petApi.HttpClient.BaseAddress != null); - var storeApi = _hostUsingConfigureWithAClient.Services.GetRequiredService(); + var storeApi = _hostUsingConfigureWithAClient.Services.GetRequiredService(); Assert.True(storeApi.HttpClient.BaseAddress != null); - var userApi = _hostUsingConfigureWithAClient.Services.GetRequiredService(); + var userApi = _hostUsingConfigureWithAClient.Services.GetRequiredService(); Assert.True(userApi.HttpClient.BaseAddress != null); } @@ -149,25 +150,25 @@ namespace Org.OpenAPITools.Test.Api [Fact] public void ConfigureApiWithoutAClientTest() { - var anotherFakeApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService(); + var anotherFakeApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService(); Assert.True(anotherFakeApi.HttpClient.BaseAddress != null); - var defaultApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService(); + var defaultApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService(); Assert.True(defaultApi.HttpClient.BaseAddress != null); - var fakeApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService(); + var fakeApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService(); Assert.True(fakeApi.HttpClient.BaseAddress != null); - var fakeClassnameTags123Api = _hostUsingConfigureWithoutAClient.Services.GetRequiredService(); + var fakeClassnameTags123Api = _hostUsingConfigureWithoutAClient.Services.GetRequiredService(); Assert.True(fakeClassnameTags123Api.HttpClient.BaseAddress != null); - var petApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService(); + var petApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService(); Assert.True(petApi.HttpClient.BaseAddress != null); - var storeApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService(); + var storeApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService(); Assert.True(storeApi.HttpClient.BaseAddress != null); - var userApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService(); + var userApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService(); Assert.True(userApi.HttpClient.BaseAddress != null); } @@ -177,25 +178,25 @@ namespace Org.OpenAPITools.Test.Api [Fact] public void AddApiWithAClientTest() { - var anotherFakeApi = _hostUsingAddWithAClient.Services.GetRequiredService(); + var anotherFakeApi = _hostUsingAddWithAClient.Services.GetRequiredService(); Assert.True(anotherFakeApi.HttpClient.BaseAddress != null); - var defaultApi = _hostUsingAddWithAClient.Services.GetRequiredService(); + var defaultApi = _hostUsingAddWithAClient.Services.GetRequiredService(); Assert.True(defaultApi.HttpClient.BaseAddress != null); - var fakeApi = _hostUsingAddWithAClient.Services.GetRequiredService(); + var fakeApi = _hostUsingAddWithAClient.Services.GetRequiredService(); Assert.True(fakeApi.HttpClient.BaseAddress != null); - var fakeClassnameTags123Api = _hostUsingAddWithAClient.Services.GetRequiredService(); + var fakeClassnameTags123Api = _hostUsingAddWithAClient.Services.GetRequiredService(); Assert.True(fakeClassnameTags123Api.HttpClient.BaseAddress != null); - var petApi = _hostUsingAddWithAClient.Services.GetRequiredService(); + var petApi = _hostUsingAddWithAClient.Services.GetRequiredService(); Assert.True(petApi.HttpClient.BaseAddress != null); - var storeApi = _hostUsingAddWithAClient.Services.GetRequiredService(); + var storeApi = _hostUsingAddWithAClient.Services.GetRequiredService(); Assert.True(storeApi.HttpClient.BaseAddress != null); - var userApi = _hostUsingAddWithAClient.Services.GetRequiredService(); + var userApi = _hostUsingAddWithAClient.Services.GetRequiredService(); Assert.True(userApi.HttpClient.BaseAddress != null); } @@ -205,25 +206,25 @@ namespace Org.OpenAPITools.Test.Api [Fact] public void AddApiWithoutAClientTest() { - var anotherFakeApi = _hostUsingAddWithoutAClient.Services.GetRequiredService(); + var anotherFakeApi = _hostUsingAddWithoutAClient.Services.GetRequiredService(); Assert.True(anotherFakeApi.HttpClient.BaseAddress != null); - var defaultApi = _hostUsingAddWithoutAClient.Services.GetRequiredService(); + var defaultApi = _hostUsingAddWithoutAClient.Services.GetRequiredService(); Assert.True(defaultApi.HttpClient.BaseAddress != null); - var fakeApi = _hostUsingAddWithoutAClient.Services.GetRequiredService(); + var fakeApi = _hostUsingAddWithoutAClient.Services.GetRequiredService(); Assert.True(fakeApi.HttpClient.BaseAddress != null); - var fakeClassnameTags123Api = _hostUsingAddWithoutAClient.Services.GetRequiredService(); + var fakeClassnameTags123Api = _hostUsingAddWithoutAClient.Services.GetRequiredService(); Assert.True(fakeClassnameTags123Api.HttpClient.BaseAddress != null); - var petApi = _hostUsingAddWithoutAClient.Services.GetRequiredService(); + var petApi = _hostUsingAddWithoutAClient.Services.GetRequiredService(); Assert.True(petApi.HttpClient.BaseAddress != null); - var storeApi = _hostUsingAddWithoutAClient.Services.GetRequiredService(); + var storeApi = _hostUsingAddWithoutAClient.Services.GetRequiredService(); Assert.True(storeApi.HttpClient.BaseAddress != null); - var userApi = _hostUsingAddWithoutAClient.Services.GetRequiredService(); + var userApi = _hostUsingAddWithoutAClient.Services.GetRequiredService(); Assert.True(userApi.HttpClient.BaseAddress != null); } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs index b70f2a8adc..4c965120e6 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs @@ -12,7 +12,7 @@ using System.Collections.Generic; using System.Threading.Tasks; using Xunit; using Microsoft.Extensions.DependencyInjection; -using Org.OpenAPITools.Api; +using Org.OpenAPITools.IApi; using Org.OpenAPITools.Model; @@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api /// public sealed class FakeApiTests : ApiTestsBase { - private readonly IFakeApi _instance; + private readonly IApi.IFakeApi _instance; public FakeApiTests(): base(Array.Empty()) { - _instance = _host.Services.GetRequiredService(); + _instance = _host.Services.GetRequiredService(); } @@ -131,9 +131,9 @@ namespace Org.OpenAPITools.Test.Api [Fact (Skip = "not implemented")] public async Task TestBodyWithQueryParamsAsyncTest() { - string query = default; User user = default; - await _instance.TestBodyWithQueryParamsAsync(query, user); + string query = default; + await _instance.TestBodyWithQueryParamsAsync(user, query); } /// @@ -153,21 +153,21 @@ namespace Org.OpenAPITools.Test.Api [Fact (Skip = "not implemented")] public async Task TestEndpointParametersAsyncTest() { + byte[] _byte = default; decimal number = default; double _double = default; string patternWithoutDelimiter = default; - byte[] _byte = default; + DateTime? date = default; + System.IO.Stream binary = default; + float? _float = default; int? integer = default; int? int32 = default; long? int64 = default; - float? _float = default; string _string = default; - System.IO.Stream binary = default; - DateTime? date = default; string password = default; string callback = default; DateTime? dateTime = default; - await _instance.TestEndpointParametersAsync(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, password, callback, dateTime); + await _instance.TestEndpointParametersAsync(_byte, number, _double, patternWithoutDelimiter, date, binary, _float, integer, int32, int64, _string, password, callback, dateTime); } /// @@ -178,13 +178,13 @@ namespace Org.OpenAPITools.Test.Api { List enumHeaderStringArray = default; List enumQueryStringArray = default; - int? enumQueryInteger = default; double? enumQueryDouble = default; + int? enumQueryInteger = default; + List enumFormStringArray = default; string enumHeaderString = default; string enumQueryString = default; - List enumFormStringArray = default; string enumFormString = default; - await _instance.TestEnumParametersAsync(enumHeaderStringArray, enumQueryStringArray, enumQueryInteger, enumQueryDouble, enumHeaderString, enumQueryString, enumFormStringArray, enumFormString); + await _instance.TestEnumParametersAsync(enumHeaderStringArray, enumQueryStringArray, enumQueryDouble, enumQueryInteger, enumFormStringArray, enumHeaderString, enumQueryString, enumFormString); } /// @@ -193,13 +193,13 @@ namespace Org.OpenAPITools.Test.Api [Fact (Skip = "not implemented")] public async Task TestGroupParametersAsyncTest() { - int requiredStringGroup = default; bool requiredBooleanGroup = default; + int requiredStringGroup = default; long requiredInt64Group = default; - int? stringGroup = default; bool? booleanGroup = default; + int? stringGroup = default; long? int64Group = default; - await _instance.TestGroupParametersAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); + await _instance.TestGroupParametersAsync(requiredBooleanGroup, requiredStringGroup, requiredInt64Group, booleanGroup, stringGroup, int64Group); } /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Api/FakeClassnameTags123ApiTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Api/FakeClassnameTags123ApiTests.cs index 0e8d44fe98..5a34bf585f 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Api/FakeClassnameTags123ApiTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Api/FakeClassnameTags123ApiTests.cs @@ -12,7 +12,7 @@ using System.Collections.Generic; using System.Threading.Tasks; using Xunit; using Microsoft.Extensions.DependencyInjection; -using Org.OpenAPITools.Api; +using Org.OpenAPITools.IApi; using Org.OpenAPITools.Model; @@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api /// public sealed class FakeClassnameTags123ApiTests : ApiTestsBase { - private readonly IFakeClassnameTags123Api _instance; + private readonly IApi.IFakeClassnameTags123Api _instance; public FakeClassnameTags123ApiTests(): base(Array.Empty()) { - _instance = _host.Services.GetRequiredService(); + _instance = _host.Services.GetRequiredService(); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Api/PetApiTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Api/PetApiTests.cs index 92922eda1b..8ebf3b80bf 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Api/PetApiTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Api/PetApiTests.cs @@ -12,7 +12,7 @@ using System.Collections.Generic; using System.Threading.Tasks; using Xunit; using Microsoft.Extensions.DependencyInjection; -using Org.OpenAPITools.Api; +using Org.OpenAPITools.IApi; using Org.OpenAPITools.Model; @@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api /// public sealed class PetApiTests : ApiTestsBase { - private readonly IPetApi _instance; + private readonly IApi.IPetApi _instance; public PetApiTests(): base(Array.Empty()) { - _instance = _host.Services.GetRequiredService(); + _instance = _host.Services.GetRequiredService(); } @@ -134,9 +134,9 @@ namespace Org.OpenAPITools.Test.Api public async Task UploadFileAsyncTest() { long petId = default; - string additionalMetadata = default; System.IO.Stream file = default; - var response = await _instance.UploadFileAsync(petId, additionalMetadata, file); + string additionalMetadata = default; + var response = await _instance.UploadFileAsync(petId, file, additionalMetadata); Assert.IsType(response); } @@ -146,10 +146,10 @@ namespace Org.OpenAPITools.Test.Api [Fact (Skip = "not implemented")] public async Task UploadFileWithRequiredFileAsyncTest() { - long petId = default; System.IO.Stream requiredFile = default; + long petId = default; string additionalMetadata = default; - var response = await _instance.UploadFileWithRequiredFileAsync(petId, requiredFile, additionalMetadata); + var response = await _instance.UploadFileWithRequiredFileAsync(requiredFile, petId, additionalMetadata); Assert.IsType(response); } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Api/StoreApiTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Api/StoreApiTests.cs index 98748893e3..679d648838 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Api/StoreApiTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Api/StoreApiTests.cs @@ -12,7 +12,7 @@ using System.Collections.Generic; using System.Threading.Tasks; using Xunit; using Microsoft.Extensions.DependencyInjection; -using Org.OpenAPITools.Api; +using Org.OpenAPITools.IApi; using Org.OpenAPITools.Model; @@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api /// public sealed class StoreApiTests : ApiTestsBase { - private readonly IStoreApi _instance; + private readonly IApi.IStoreApi _instance; public StoreApiTests(): base(Array.Empty()) { - _instance = _host.Services.GetRequiredService(); + _instance = _host.Services.GetRequiredService(); } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Api/UserApiTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Api/UserApiTests.cs index 0df256733a..b8006066fa 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Api/UserApiTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Api/UserApiTests.cs @@ -12,7 +12,7 @@ using System.Collections.Generic; using System.Threading.Tasks; using Xunit; using Microsoft.Extensions.DependencyInjection; -using Org.OpenAPITools.Api; +using Org.OpenAPITools.IApi; using Org.OpenAPITools.Model; @@ -43,11 +43,11 @@ namespace Org.OpenAPITools.Test.Api /// public sealed class UserApiTests : ApiTestsBase { - private readonly IUserApi _instance; + private readonly IApi.IUserApi _instance; public UserApiTests(): base(Array.Empty()) { - _instance = _host.Services.GetRequiredService(); + _instance = _host.Services.GetRequiredService(); } @@ -129,9 +129,9 @@ namespace Org.OpenAPITools.Test.Api [Fact (Skip = "not implemented")] public async Task UpdateUserAsyncTest() { - string username = default; User user = default; - await _instance.UpdateUserAsync(username, user); + string username = default; + await _instance.UpdateUserAsync(user, username); } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ActivityOutputElementRepresentationTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ActivityOutputElementRepresentationTests.cs index f211a64884..174a7e333a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ActivityOutputElementRepresentationTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ActivityOutputElementRepresentationTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ActivityTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ActivityTests.cs index afe9e846ee..c7479a3c34 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ActivityTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ActivityTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesClassTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesClassTests.cs index 9ab029ed09..95bd159350 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesClassTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesClassTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -57,12 +56,12 @@ namespace Org.OpenAPITools.Test.Model /// - /// Test the property 'MapProperty' + /// Test the property 'EmptyMap' /// [Fact] - public void MapPropertyTest() + public void EmptyMapTest() { - // TODO unit test for the property 'MapProperty' + // TODO unit test for the property 'EmptyMap' } /// /// Test the property 'MapOfMapProperty' @@ -73,12 +72,12 @@ namespace Org.OpenAPITools.Test.Model // TODO unit test for the property 'MapOfMapProperty' } /// - /// Test the property 'Anytype1' + /// Test the property 'MapProperty' /// [Fact] - public void Anytype1Test() + public void MapPropertyTest() { - // TODO unit test for the property 'Anytype1' + // TODO unit test for the property 'MapProperty' } /// /// Test the property 'MapWithUndeclaredPropertiesAnytype1' @@ -105,14 +104,6 @@ namespace Org.OpenAPITools.Test.Model // TODO unit test for the property 'MapWithUndeclaredPropertiesAnytype3' } /// - /// Test the property 'EmptyMap' - /// - [Fact] - public void EmptyMapTest() - { - // TODO unit test for the property 'EmptyMap' - } - /// /// Test the property 'MapWithUndeclaredPropertiesString' /// [Fact] @@ -120,6 +111,14 @@ namespace Org.OpenAPITools.Test.Model { // TODO unit test for the property 'MapWithUndeclaredPropertiesString' } + /// + /// Test the property 'Anytype1' + /// + [Fact] + public void Anytype1Test() + { + // TODO unit test for the property 'Anytype1' + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/AnimalTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/AnimalTests.cs index ced34a4faa..8c38ac47af 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/AnimalTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/AnimalTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ApiResponseTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ApiResponseTests.cs index 2a2e098e60..a2a9a2d49d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ApiResponseTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ApiResponseTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -65,14 +64,6 @@ namespace Org.OpenAPITools.Test.Model // TODO unit test for the property 'Code' } /// - /// Test the property 'Type' - /// - [Fact] - public void TypeTest() - { - // TODO unit test for the property 'Type' - } - /// /// Test the property 'Message' /// [Fact] @@ -80,6 +71,14 @@ namespace Org.OpenAPITools.Test.Model { // TODO unit test for the property 'Message' } + /// + /// Test the property 'Type' + /// + [Fact] + public void TypeTest() + { + // TODO unit test for the property 'Type' + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/AppleReqTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/AppleReqTests.cs index f945f65936..0610780d65 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/AppleReqTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/AppleReqTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/AppleTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/AppleTests.cs index 468d60184a..e0bd59e773 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/AppleTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/AppleTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ArrayOfArrayOfNumberOnlyTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ArrayOfArrayOfNumberOnlyTests.cs index 0b259d7d39..8f046a0bf6 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ArrayOfArrayOfNumberOnlyTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ArrayOfArrayOfNumberOnlyTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ArrayOfNumberOnlyTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ArrayOfNumberOnlyTests.cs index 27f312ad25..53b2fe30fd 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ArrayOfNumberOnlyTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ArrayOfNumberOnlyTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ArrayTestTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ArrayTestTests.cs index a433e8c87c..df87ba3aaa 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ArrayTestTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ArrayTestTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -56,14 +55,6 @@ namespace Org.OpenAPITools.Test.Model } - /// - /// Test the property 'ArrayOfString' - /// - [Fact] - public void ArrayOfStringTest() - { - // TODO unit test for the property 'ArrayOfString' - } /// /// Test the property 'ArrayArrayOfInteger' /// @@ -80,6 +71,14 @@ namespace Org.OpenAPITools.Test.Model { // TODO unit test for the property 'ArrayArrayOfModel' } + /// + /// Test the property 'ArrayOfString' + /// + [Fact] + public void ArrayOfStringTest() + { + // TODO unit test for the property 'ArrayOfString' + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/BananaReqTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/BananaReqTests.cs index 8a6eeb82ee..6f31ba2029 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/BananaReqTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/BananaReqTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/BananaTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/BananaTests.cs index 8d8cc376b0..6cb6c62ffd 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/BananaTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/BananaTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/BasquePigTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/BasquePigTests.cs index 3cdccaa759..9798a17577 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/BasquePigTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/BasquePigTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/CapitalizationTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/CapitalizationTests.cs index 185c83666f..b84c7c85a7 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/CapitalizationTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/CapitalizationTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -57,12 +56,12 @@ namespace Org.OpenAPITools.Test.Model /// - /// Test the property 'SmallCamel' + /// Test the property 'ATT_NAME' /// [Fact] - public void SmallCamelTest() + public void ATT_NAMETest() { - // TODO unit test for the property 'SmallCamel' + // TODO unit test for the property 'ATT_NAME' } /// /// Test the property 'CapitalCamel' @@ -73,14 +72,6 @@ namespace Org.OpenAPITools.Test.Model // TODO unit test for the property 'CapitalCamel' } /// - /// Test the property 'SmallSnake' - /// - [Fact] - public void SmallSnakeTest() - { - // TODO unit test for the property 'SmallSnake' - } - /// /// Test the property 'CapitalSnake' /// [Fact] @@ -97,12 +88,20 @@ namespace Org.OpenAPITools.Test.Model // TODO unit test for the property 'SCAETHFlowPoints' } /// - /// Test the property 'ATT_NAME' + /// Test the property 'SmallCamel' /// [Fact] - public void ATT_NAMETest() + public void SmallCamelTest() { - // TODO unit test for the property 'ATT_NAME' + // TODO unit test for the property 'SmallCamel' + } + /// + /// Test the property 'SmallSnake' + /// + [Fact] + public void SmallSnakeTest() + { + // TODO unit test for the property 'SmallSnake' } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/CatAllOfTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/CatAllOfTests.cs index fb51c28489..3498bb0c15 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/CatAllOfTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/CatAllOfTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/CatTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/CatTests.cs index 9c3c48ffef..402a476d07 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/CatTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/CatTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/CategoryTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/CategoryTests.cs index 621877aa97..822f8241fa 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/CategoryTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/CategoryTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -56,14 +55,6 @@ namespace Org.OpenAPITools.Test.Model } - /// - /// Test the property 'Name' - /// - [Fact] - public void NameTest() - { - // TODO unit test for the property 'Name' - } /// /// Test the property 'Id' /// @@ -72,6 +63,14 @@ namespace Org.OpenAPITools.Test.Model { // TODO unit test for the property 'Id' } + /// + /// Test the property 'Name' + /// + [Fact] + public void NameTest() + { + // TODO unit test for the property 'Name' + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ChildCatAllOfTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ChildCatAllOfTests.cs index 49a5393249..d4de4c4741 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ChildCatAllOfTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ChildCatAllOfTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ChildCatTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ChildCatTests.cs index 0fe3ebfa06..f1b0aa1005 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ChildCatTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ChildCatTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ClassModelTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ClassModelTests.cs index d29472e83a..2e6c120d8f 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ClassModelTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ClassModelTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -57,12 +56,12 @@ namespace Org.OpenAPITools.Test.Model /// - /// Test the property 'Class' + /// Test the property 'ClassProperty' /// [Fact] - public void ClassTest() + public void ClassPropertyTest() { - // TODO unit test for the property 'Class' + // TODO unit test for the property 'ClassProperty' } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ComplexQuadrilateralTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ComplexQuadrilateralTests.cs index 6c50fe7aab..3f2f96e73a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ComplexQuadrilateralTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ComplexQuadrilateralTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/DanishPigTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/DanishPigTests.cs index 572d9bffa7..087d38674b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/DanishPigTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/DanishPigTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/DeprecatedObjectTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/DeprecatedObjectTests.cs index 1da5f4011c..85ecbfdda5 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/DeprecatedObjectTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/DeprecatedObjectTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/DogAllOfTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/DogAllOfTests.cs index b22a444209..1e86d76150 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/DogAllOfTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/DogAllOfTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/DogTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/DogTests.cs index bf906f01bc..ef2eabfca3 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/DogTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/DogTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/DrawingTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/DrawingTests.cs index 0709ad9eeb..c38867cb5a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/DrawingTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/DrawingTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -73,14 +72,6 @@ namespace Org.OpenAPITools.Test.Model // TODO unit test for the property 'ShapeOrNull' } /// - /// Test the property 'NullableShape' - /// - [Fact] - public void NullableShapeTest() - { - // TODO unit test for the property 'NullableShape' - } - /// /// Test the property 'Shapes' /// [Fact] @@ -88,6 +79,14 @@ namespace Org.OpenAPITools.Test.Model { // TODO unit test for the property 'Shapes' } + /// + /// Test the property 'NullableShape' + /// + [Fact] + public void NullableShapeTest() + { + // TODO unit test for the property 'NullableShape' + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/EnumArraysTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/EnumArraysTests.cs index 5779ca2947..ee3d000f32 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/EnumArraysTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/EnumArraysTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -56,14 +55,6 @@ namespace Org.OpenAPITools.Test.Model } - /// - /// Test the property 'JustSymbol' - /// - [Fact] - public void JustSymbolTest() - { - // TODO unit test for the property 'JustSymbol' - } /// /// Test the property 'ArrayEnum' /// @@ -72,6 +63,14 @@ namespace Org.OpenAPITools.Test.Model { // TODO unit test for the property 'ArrayEnum' } + /// + /// Test the property 'JustSymbol' + /// + [Fact] + public void JustSymbolTest() + { + // TODO unit test for the property 'JustSymbol' + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/EnumClassTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/EnumClassTests.cs index a17738c5cb..e2fc2d0228 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/EnumClassTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/EnumClassTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/EnumTestTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/EnumTestTests.cs index a22c39ca84..60e3aca92b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/EnumTestTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/EnumTestTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -56,22 +55,6 @@ namespace Org.OpenAPITools.Test.Model } - /// - /// Test the property 'EnumStringRequired' - /// - [Fact] - public void EnumStringRequiredTest() - { - // TODO unit test for the property 'EnumStringRequired' - } - /// - /// Test the property 'EnumString' - /// - [Fact] - public void EnumStringTest() - { - // TODO unit test for the property 'EnumString' - } /// /// Test the property 'EnumInteger' /// @@ -97,20 +80,20 @@ namespace Org.OpenAPITools.Test.Model // TODO unit test for the property 'EnumNumber' } /// - /// Test the property 'OuterEnum' + /// Test the property 'EnumString' /// [Fact] - public void OuterEnumTest() + public void EnumStringTest() { - // TODO unit test for the property 'OuterEnum' + // TODO unit test for the property 'EnumString' } /// - /// Test the property 'OuterEnumInteger' + /// Test the property 'EnumStringRequired' /// [Fact] - public void OuterEnumIntegerTest() + public void EnumStringRequiredTest() { - // TODO unit test for the property 'OuterEnumInteger' + // TODO unit test for the property 'EnumStringRequired' } /// /// Test the property 'OuterEnumDefaultValue' @@ -121,6 +104,14 @@ namespace Org.OpenAPITools.Test.Model // TODO unit test for the property 'OuterEnumDefaultValue' } /// + /// Test the property 'OuterEnumInteger' + /// + [Fact] + public void OuterEnumIntegerTest() + { + // TODO unit test for the property 'OuterEnumInteger' + } + /// /// Test the property 'OuterEnumIntegerDefaultValue' /// [Fact] @@ -128,6 +119,14 @@ namespace Org.OpenAPITools.Test.Model { // TODO unit test for the property 'OuterEnumIntegerDefaultValue' } + /// + /// Test the property 'OuterEnum' + /// + [Fact] + public void OuterEnumTest() + { + // TODO unit test for the property 'OuterEnum' + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/EquilateralTriangleTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/EquilateralTriangleTests.cs index 9ca755c4b0..9ab78a5977 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/EquilateralTriangleTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/EquilateralTriangleTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/FileSchemaTestClassTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/FileSchemaTestClassTests.cs index 9f45b4fe89..9836a779bf 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/FileSchemaTestClassTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/FileSchemaTestClassTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/FileTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/FileTests.cs index 761bb72a84..4f0e7079bc 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/FileTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/FileTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/FooGetDefaultResponseTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/FooGetDefaultResponseTests.cs index 0154d52841..b7313941a6 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/FooGetDefaultResponseTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/FooGetDefaultResponseTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -57,12 +56,12 @@ namespace Org.OpenAPITools.Test.Model /// - /// Test the property 'String' + /// Test the property 'StringProperty' /// [Fact] - public void StringTest() + public void StringPropertyTest() { - // TODO unit test for the property 'String' + // TODO unit test for the property 'StringProperty' } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/FooTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/FooTests.cs index 0b6ed52edb..c0bdf85f9b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/FooTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/FooTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs index 707847bbcd..d3a978bdc4 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -57,20 +56,20 @@ namespace Org.OpenAPITools.Test.Model /// - /// Test the property 'Number' + /// Test the property 'Binary' /// [Fact] - public void NumberTest() + public void BinaryTest() { - // TODO unit test for the property 'Number' + // TODO unit test for the property 'Binary' } /// - /// Test the property 'Byte' + /// Test the property 'ByteProperty' /// [Fact] - public void ByteTest() + public void BytePropertyTest() { - // TODO unit test for the property 'Byte' + // TODO unit test for the property 'ByteProperty' } /// /// Test the property 'Date' @@ -81,20 +80,36 @@ namespace Org.OpenAPITools.Test.Model // TODO unit test for the property 'Date' } /// - /// Test the property 'Password' + /// Test the property 'DateTime' /// [Fact] - public void PasswordTest() + public void DateTimeTest() { - // TODO unit test for the property 'Password' + // TODO unit test for the property 'DateTime' } /// - /// Test the property 'Integer' + /// Test the property 'DecimalProperty' /// [Fact] - public void IntegerTest() + public void DecimalPropertyTest() { - // TODO unit test for the property 'Integer' + // TODO unit test for the property 'DecimalProperty' + } + /// + /// Test the property 'DoubleProperty' + /// + [Fact] + public void DoublePropertyTest() + { + // TODO unit test for the property 'DoubleProperty' + } + /// + /// Test the property 'FloatProperty' + /// + [Fact] + public void FloatPropertyTest() + { + // TODO unit test for the property 'FloatProperty' } /// /// Test the property 'Int32' @@ -113,60 +128,28 @@ namespace Org.OpenAPITools.Test.Model // TODO unit test for the property 'Int64' } /// - /// Test the property 'Float' + /// Test the property 'Integer' /// [Fact] - public void FloatTest() + public void IntegerTest() { - // TODO unit test for the property 'Float' + // TODO unit test for the property 'Integer' } /// - /// Test the property 'Double' + /// Test the property 'Number' /// [Fact] - public void DoubleTest() + public void NumberTest() { - // TODO unit test for the property 'Double' + // TODO unit test for the property 'Number' } /// - /// Test the property 'Decimal' + /// Test the property 'Password' /// [Fact] - public void DecimalTest() + public void PasswordTest() { - // TODO unit test for the property 'Decimal' - } - /// - /// Test the property 'String' - /// - [Fact] - public void StringTest() - { - // TODO unit test for the property 'String' - } - /// - /// Test the property 'Binary' - /// - [Fact] - public void BinaryTest() - { - // TODO unit test for the property 'Binary' - } - /// - /// Test the property 'DateTime' - /// - [Fact] - public void DateTimeTest() - { - // TODO unit test for the property 'DateTime' - } - /// - /// Test the property 'Uuid' - /// - [Fact] - public void UuidTest() - { - // TODO unit test for the property 'Uuid' + // TODO unit test for the property 'Password' } /// /// Test the property 'PatternWithDigits' @@ -184,6 +167,22 @@ namespace Org.OpenAPITools.Test.Model { // TODO unit test for the property 'PatternWithDigitsAndDelimiter' } + /// + /// Test the property 'StringProperty' + /// + [Fact] + public void StringPropertyTest() + { + // TODO unit test for the property 'StringProperty' + } + /// + /// Test the property 'Uuid' + /// + [Fact] + public void UuidTest() + { + // TODO unit test for the property 'Uuid' + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/FruitReqTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/FruitReqTests.cs index 3a0b55b93e..3ef884e59c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/FruitReqTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/FruitReqTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/FruitTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/FruitTests.cs index ddc424d56e..9ab6b7f278 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/FruitTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/FruitTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/GmFruitTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/GmFruitTests.cs index cbd35f9173..036c5641cf 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/GmFruitTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/GmFruitTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/GrandparentAnimalTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/GrandparentAnimalTests.cs index faa4930944..182cf7350b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/GrandparentAnimalTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/GrandparentAnimalTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/HasOnlyReadOnlyTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/HasOnlyReadOnlyTests.cs index 651a9f0ce3..d9a07efcf9 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/HasOnlyReadOnlyTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/HasOnlyReadOnlyTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/HealthCheckResultTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/HealthCheckResultTests.cs index 857190a333..d29edf5dd1 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/HealthCheckResultTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/HealthCheckResultTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/IsoscelesTriangleTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/IsoscelesTriangleTests.cs index 8e0dae9342..2fed6f0b4c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/IsoscelesTriangleTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/IsoscelesTriangleTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ListTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ListTests.cs index 2ed828d052..398a464492 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ListTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ListTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/MammalTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/MammalTests.cs index 6477ab950f..0889d80a70 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/MammalTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/MammalTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/MapTestTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/MapTestTests.cs index 20036e1c90..0dc95aa6b2 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/MapTestTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/MapTestTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -56,22 +55,6 @@ namespace Org.OpenAPITools.Test.Model } - /// - /// Test the property 'MapMapOfString' - /// - [Fact] - public void MapMapOfStringTest() - { - // TODO unit test for the property 'MapMapOfString' - } - /// - /// Test the property 'MapOfEnumString' - /// - [Fact] - public void MapOfEnumStringTest() - { - // TODO unit test for the property 'MapOfEnumString' - } /// /// Test the property 'DirectMap' /// @@ -88,6 +71,22 @@ namespace Org.OpenAPITools.Test.Model { // TODO unit test for the property 'IndirectMap' } + /// + /// Test the property 'MapMapOfString' + /// + [Fact] + public void MapMapOfStringTest() + { + // TODO unit test for the property 'MapMapOfString' + } + /// + /// Test the property 'MapOfEnumString' + /// + [Fact] + public void MapOfEnumStringTest() + { + // TODO unit test for the property 'MapOfEnumString' + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/MixedPropertiesAndAdditionalPropertiesClassTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/MixedPropertiesAndAdditionalPropertiesClassTests.cs index f56cd715f4..d94f882e0a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/MixedPropertiesAndAdditionalPropertiesClassTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/MixedPropertiesAndAdditionalPropertiesClassTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -56,14 +55,6 @@ namespace Org.OpenAPITools.Test.Model } - /// - /// Test the property 'Uuid' - /// - [Fact] - public void UuidTest() - { - // TODO unit test for the property 'Uuid' - } /// /// Test the property 'DateTime' /// @@ -80,6 +71,14 @@ namespace Org.OpenAPITools.Test.Model { // TODO unit test for the property 'Map' } + /// + /// Test the property 'Uuid' + /// + [Fact] + public void UuidTest() + { + // TODO unit test for the property 'Uuid' + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/Model200ResponseTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/Model200ResponseTests.cs index e25478618f..31f2a75431 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/Model200ResponseTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/Model200ResponseTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -56,6 +55,14 @@ namespace Org.OpenAPITools.Test.Model } + /// + /// Test the property 'ClassProperty' + /// + [Fact] + public void ClassPropertyTest() + { + // TODO unit test for the property 'ClassProperty' + } /// /// Test the property 'Name' /// @@ -64,14 +71,6 @@ namespace Org.OpenAPITools.Test.Model { // TODO unit test for the property 'Name' } - /// - /// Test the property 'Class' - /// - [Fact] - public void ClassTest() - { - // TODO unit test for the property 'Class' - } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ModelClientTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ModelClientTests.cs index 24a9e26315..40b3700ce9 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ModelClientTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ModelClientTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -57,12 +56,12 @@ namespace Org.OpenAPITools.Test.Model /// - /// Test the property '_Client' + /// Test the property '_ClientProperty' /// [Fact] - public void _ClientTest() + public void _ClientPropertyTest() { - // TODO unit test for the property '_Client' + // TODO unit test for the property '_ClientProperty' } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/NameTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/NameTests.cs index 61f8ad1137..523b3e050a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/NameTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/NameTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -65,14 +64,6 @@ namespace Org.OpenAPITools.Test.Model // TODO unit test for the property 'NameProperty' } /// - /// Test the property 'SnakeCase' - /// - [Fact] - public void SnakeCaseTest() - { - // TODO unit test for the property 'SnakeCase' - } - /// /// Test the property 'Property' /// [Fact] @@ -81,6 +72,14 @@ namespace Org.OpenAPITools.Test.Model // TODO unit test for the property 'Property' } /// + /// Test the property 'SnakeCase' + /// + [Fact] + public void SnakeCaseTest() + { + // TODO unit test for the property 'SnakeCase' + } + /// /// Test the property '_123Number' /// [Fact] diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/NullableClassTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/NullableClassTests.cs index 8f00505612..adf7c14f13 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/NullableClassTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/NullableClassTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -57,20 +56,36 @@ namespace Org.OpenAPITools.Test.Model /// - /// Test the property 'IntegerProp' + /// Test the property 'ArrayItemsNullable' /// [Fact] - public void IntegerPropTest() + public void ArrayItemsNullableTest() { - // TODO unit test for the property 'IntegerProp' + // TODO unit test for the property 'ArrayItemsNullable' } /// - /// Test the property 'NumberProp' + /// Test the property 'ObjectItemsNullable' /// [Fact] - public void NumberPropTest() + public void ObjectItemsNullableTest() { - // TODO unit test for the property 'NumberProp' + // TODO unit test for the property 'ObjectItemsNullable' + } + /// + /// Test the property 'ArrayAndItemsNullableProp' + /// + [Fact] + public void ArrayAndItemsNullablePropTest() + { + // TODO unit test for the property 'ArrayAndItemsNullableProp' + } + /// + /// Test the property 'ArrayNullableProp' + /// + [Fact] + public void ArrayNullablePropTest() + { + // TODO unit test for the property 'ArrayNullableProp' } /// /// Test the property 'BooleanProp' @@ -81,14 +96,6 @@ namespace Org.OpenAPITools.Test.Model // TODO unit test for the property 'BooleanProp' } /// - /// Test the property 'StringProp' - /// - [Fact] - public void StringPropTest() - { - // TODO unit test for the property 'StringProp' - } - /// /// Test the property 'DateProp' /// [Fact] @@ -105,36 +112,20 @@ namespace Org.OpenAPITools.Test.Model // TODO unit test for the property 'DatetimeProp' } /// - /// Test the property 'ArrayNullableProp' + /// Test the property 'IntegerProp' /// [Fact] - public void ArrayNullablePropTest() + public void IntegerPropTest() { - // TODO unit test for the property 'ArrayNullableProp' + // TODO unit test for the property 'IntegerProp' } /// - /// Test the property 'ArrayAndItemsNullableProp' + /// Test the property 'NumberProp' /// [Fact] - public void ArrayAndItemsNullablePropTest() + public void NumberPropTest() { - // TODO unit test for the property 'ArrayAndItemsNullableProp' - } - /// - /// Test the property 'ArrayItemsNullable' - /// - [Fact] - public void ArrayItemsNullableTest() - { - // TODO unit test for the property 'ArrayItemsNullable' - } - /// - /// Test the property 'ObjectNullableProp' - /// - [Fact] - public void ObjectNullablePropTest() - { - // TODO unit test for the property 'ObjectNullableProp' + // TODO unit test for the property 'NumberProp' } /// /// Test the property 'ObjectAndItemsNullableProp' @@ -145,12 +136,20 @@ namespace Org.OpenAPITools.Test.Model // TODO unit test for the property 'ObjectAndItemsNullableProp' } /// - /// Test the property 'ObjectItemsNullable' + /// Test the property 'ObjectNullableProp' /// [Fact] - public void ObjectItemsNullableTest() + public void ObjectNullablePropTest() { - // TODO unit test for the property 'ObjectItemsNullable' + // TODO unit test for the property 'ObjectNullableProp' + } + /// + /// Test the property 'StringProp' + /// + [Fact] + public void StringPropTest() + { + // TODO unit test for the property 'StringProp' } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/NullableShapeTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/NullableShapeTests.cs index 8202ef6391..734d03e5e7 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/NullableShapeTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/NullableShapeTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/NumberOnlyTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/NumberOnlyTests.cs index 3a06cb020b..5db923c1d3 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/NumberOnlyTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/NumberOnlyTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ObjectWithDeprecatedFieldsTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ObjectWithDeprecatedFieldsTests.cs index 82f93fab48..9e9b651f81 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ObjectWithDeprecatedFieldsTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ObjectWithDeprecatedFieldsTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -57,20 +56,12 @@ namespace Org.OpenAPITools.Test.Model /// - /// Test the property 'Uuid' + /// Test the property 'Bars' /// [Fact] - public void UuidTest() + public void BarsTest() { - // TODO unit test for the property 'Uuid' - } - /// - /// Test the property 'Id' - /// - [Fact] - public void IdTest() - { - // TODO unit test for the property 'Id' + // TODO unit test for the property 'Bars' } /// /// Test the property 'DeprecatedRef' @@ -81,12 +72,20 @@ namespace Org.OpenAPITools.Test.Model // TODO unit test for the property 'DeprecatedRef' } /// - /// Test the property 'Bars' + /// Test the property 'Id' /// [Fact] - public void BarsTest() + public void IdTest() { - // TODO unit test for the property 'Bars' + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'Uuid' + /// + [Fact] + public void UuidTest() + { + // TODO unit test for the property 'Uuid' } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/OrderTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/OrderTests.cs index cf5c561c54..10682e72f2 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/OrderTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/OrderTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/OuterCompositeTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/OuterCompositeTests.cs index 2efda0db59..8c176d9f94 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/OuterCompositeTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/OuterCompositeTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -56,6 +55,14 @@ namespace Org.OpenAPITools.Test.Model } + /// + /// Test the property 'MyBoolean' + /// + [Fact] + public void MyBooleanTest() + { + // TODO unit test for the property 'MyBoolean' + } /// /// Test the property 'MyNumber' /// @@ -72,14 +79,6 @@ namespace Org.OpenAPITools.Test.Model { // TODO unit test for the property 'MyString' } - /// - /// Test the property 'MyBoolean' - /// - [Fact] - public void MyBooleanTest() - { - // TODO unit test for the property 'MyBoolean' - } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/OuterEnumDefaultValueTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/OuterEnumDefaultValueTests.cs index 986fff774c..9f6d8b52b6 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/OuterEnumDefaultValueTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/OuterEnumDefaultValueTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/OuterEnumIntegerDefaultValueTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/OuterEnumIntegerDefaultValueTests.cs index 015d5dab94..e51365edb2 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/OuterEnumIntegerDefaultValueTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/OuterEnumIntegerDefaultValueTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/OuterEnumIntegerTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/OuterEnumIntegerTests.cs index 385e899110..36e6a060f9 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/OuterEnumIntegerTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/OuterEnumIntegerTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/OuterEnumTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/OuterEnumTests.cs index f47304767b..b38c693d1a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/OuterEnumTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/OuterEnumTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ParentPetTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ParentPetTests.cs index 1e17568ed3..34cae43eac 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ParentPetTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ParentPetTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/PetTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/PetTests.cs index 28ea4d8478..66cfbf7bdb 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/PetTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/PetTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -56,6 +55,22 @@ namespace Org.OpenAPITools.Test.Model } + /// + /// Test the property 'Category' + /// + [Fact] + public void CategoryTest() + { + // TODO unit test for the property 'Category' + } + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } /// /// Test the property 'Name' /// @@ -73,20 +88,12 @@ namespace Org.OpenAPITools.Test.Model // TODO unit test for the property 'PhotoUrls' } /// - /// Test the property 'Id' + /// Test the property 'Status' /// [Fact] - public void IdTest() + public void StatusTest() { - // TODO unit test for the property 'Id' - } - /// - /// Test the property 'Category' - /// - [Fact] - public void CategoryTest() - { - // TODO unit test for the property 'Category' + // TODO unit test for the property 'Status' } /// /// Test the property 'Tags' @@ -96,14 +103,6 @@ namespace Org.OpenAPITools.Test.Model { // TODO unit test for the property 'Tags' } - /// - /// Test the property 'Status' - /// - [Fact] - public void StatusTest() - { - // TODO unit test for the property 'Status' - } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/PigTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/PigTests.cs index a66befe8f5..0e85eabf16 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/PigTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/PigTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/PolymorphicPropertyTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/PolymorphicPropertyTests.cs index eff3c6ddc9..98aad34f4b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/PolymorphicPropertyTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/PolymorphicPropertyTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/QuadrilateralInterfaceTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/QuadrilateralInterfaceTests.cs index 6eef9f4c81..42243bd29c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/QuadrilateralInterfaceTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/QuadrilateralInterfaceTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/QuadrilateralTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/QuadrilateralTests.cs index 3d62673d09..e15b2c5c74 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/QuadrilateralTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/QuadrilateralTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ReadOnlyFirstTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ReadOnlyFirstTests.cs index dc3d0fad54..7e99972f26 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ReadOnlyFirstTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ReadOnlyFirstTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ReturnTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ReturnTests.cs index 65fa199fe3..9969564490 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ReturnTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ReturnTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ScaleneTriangleTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ScaleneTriangleTests.cs index 018dffb596..cad95d2963 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ScaleneTriangleTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ScaleneTriangleTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ShapeInterfaceTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ShapeInterfaceTests.cs index 7bd0bc86f9..3129f3775c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ShapeInterfaceTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ShapeInterfaceTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ShapeOrNullTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ShapeOrNullTests.cs index ef56435764..a33da20eda 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ShapeOrNullTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ShapeOrNullTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ShapeTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ShapeTests.cs index 783a9657ed..b2d995af50 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ShapeTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ShapeTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/SimpleQuadrilateralTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/SimpleQuadrilateralTests.cs index 3bcd65e792..0221971c07 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/SimpleQuadrilateralTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/SimpleQuadrilateralTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/SpecialModelNameTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/SpecialModelNameTests.cs index 91682a7afd..1a5bb10af8 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/SpecialModelNameTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/SpecialModelNameTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -56,14 +55,6 @@ namespace Org.OpenAPITools.Test.Model } - /// - /// Test the property 'SpecialPropertyName' - /// - [Fact] - public void SpecialPropertyNameTest() - { - // TODO unit test for the property 'SpecialPropertyName' - } /// /// Test the property 'SpecialModelNameProperty' /// @@ -72,6 +63,14 @@ namespace Org.OpenAPITools.Test.Model { // TODO unit test for the property 'SpecialModelNameProperty' } + /// + /// Test the property 'SpecialPropertyName' + /// + [Fact] + public void SpecialPropertyNameTest() + { + // TODO unit test for the property 'SpecialPropertyName' + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/TagTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/TagTests.cs index 6d56232d0a..92a5f82365 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/TagTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/TagTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/TriangleInterfaceTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/TriangleInterfaceTests.cs index fba65470be..924d6b42d7 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/TriangleInterfaceTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/TriangleInterfaceTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/TriangleTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/TriangleTests.cs index bdaab0b479..9701da6a54 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/TriangleTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/TriangleTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/UserTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/UserTests.cs index a7b095e4c2..a464c80c84 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/UserTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/UserTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { @@ -57,20 +56,12 @@ namespace Org.OpenAPITools.Test.Model /// - /// Test the property 'Id' + /// Test the property 'Email' /// [Fact] - public void IdTest() + public void EmailTest() { - // TODO unit test for the property 'Id' - } - /// - /// Test the property 'Username' - /// - [Fact] - public void UsernameTest() - { - // TODO unit test for the property 'Username' + // TODO unit test for the property 'Email' } /// /// Test the property 'FirstName' @@ -81,6 +72,14 @@ namespace Org.OpenAPITools.Test.Model // TODO unit test for the property 'FirstName' } /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// /// Test the property 'LastName' /// [Fact] @@ -89,12 +88,12 @@ namespace Org.OpenAPITools.Test.Model // TODO unit test for the property 'LastName' } /// - /// Test the property 'Email' + /// Test the property 'ObjectWithNoDeclaredProps' /// [Fact] - public void EmailTest() + public void ObjectWithNoDeclaredPropsTest() { - // TODO unit test for the property 'Email' + // TODO unit test for the property 'ObjectWithNoDeclaredProps' } /// /// Test the property 'Password' @@ -121,20 +120,12 @@ namespace Org.OpenAPITools.Test.Model // TODO unit test for the property 'UserStatus' } /// - /// Test the property 'ObjectWithNoDeclaredProps' + /// Test the property 'Username' /// [Fact] - public void ObjectWithNoDeclaredPropsTest() + public void UsernameTest() { - // TODO unit test for the property 'ObjectWithNoDeclaredProps' - } - /// - /// Test the property 'ObjectWithNoDeclaredPropsNullable' - /// - [Fact] - public void ObjectWithNoDeclaredPropsNullableTest() - { - // TODO unit test for the property 'ObjectWithNoDeclaredPropsNullable' + // TODO unit test for the property 'Username' } /// /// Test the property 'AnyTypeProp' @@ -152,6 +143,14 @@ namespace Org.OpenAPITools.Test.Model { // TODO unit test for the property 'AnyTypePropNullable' } + /// + /// Test the property 'ObjectWithNoDeclaredPropsNullable' + /// + [Fact] + public void ObjectWithNoDeclaredPropsNullableTest() + { + // TODO unit test for the property 'ObjectWithNoDeclaredPropsNullable' + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/WhaleTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/WhaleTests.cs index 9b82c29c8f..91a7b21f21 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/WhaleTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/WhaleTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ZebraTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ZebraTests.cs index 39e0561fe0..08b1c6056c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ZebraTests.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Model/ZebraTests.cs @@ -18,7 +18,6 @@ using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; using Org.OpenAPITools.Client; using System.Reflection; -using Newtonsoft.Json; namespace Org.OpenAPITools.Test.Model { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj index a68e9179c8..06b106b96d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj @@ -16,5 +16,4 @@ - diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/README.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools.Test/README.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/AnotherFakeApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/AnotherFakeApi.cs index b2b9905d3a..4c37cee2cd 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/AnotherFakeApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/AnotherFakeApi.cs @@ -19,10 +19,11 @@ using System.Text.Json; using Org.OpenAPITools.Client; using Org.OpenAPITools.Model; -namespace Org.OpenAPITools.Api +namespace Org.OpenAPITools.IApi { /// /// Represents a collection of functions to interact with the API endpoints + /// This class is registered as transient. /// public interface IAnotherFakeApi : IApi { @@ -48,21 +49,19 @@ namespace Org.OpenAPITools.Api /// client model /// Cancellation Token to cancel the request. /// Task of ApiResponse<ModelClient> - Task Call123TestSpecialTagsAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null); } + Task Call123TestSpecialTagsAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null); + } +} +namespace Org.OpenAPITools.Api +{ /// /// Represents a collection of functions to interact with the API endpoints /// - public partial class AnotherFakeApi : IAnotherFakeApi + public partial class AnotherFakeApi : IApi.IAnotherFakeApi { private JsonSerializerOptions _jsonSerializerOptions; - /// - /// An event to track the health of the server. - /// If you store these event args, be sure to purge old event args to prevent a memory leak. - /// - public event ClientUtils.EventHandler ApiResponded; - /// /// The logger /// @@ -119,6 +118,15 @@ namespace Org.OpenAPITools.Api OauthTokenProvider = oauthTokenProvider; } + /// + /// Logs the api response + /// + /// + protected virtual void OnApiResponded(ApiResponseEventArgs args) + { + Logger.LogInformation("{0,-9} | {1} | {3}", (args.ReceivedAt - args.RequestedAt).TotalSeconds, args.HttpStatus, args.Path); + } + /// /// To test special tags To test special tags and operation ID starting with number /// @@ -159,6 +167,46 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual ModelClient OnCall123TestSpecialTags(ModelClient modelClient) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (modelClient == null) + throw new ArgumentNullException(nameof(modelClient)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return modelClient; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterCall123TestSpecialTags(ApiResponse apiResponse, ModelClient modelClient) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorCall123TestSpecialTags(Exception exception, string pathFormat, string path, ModelClient modelClient) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// To test special tags To test special tags and operation ID starting with number /// @@ -168,18 +216,14 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> Call123TestSpecialTagsWithHttpInfoAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (modelClient == null) - throw new ArgumentNullException(nameof(modelClient)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + modelClient = OnCall123TestSpecialTags(modelClient); using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -189,6 +233,8 @@ namespace Org.OpenAPITools.Api ? request.Content = new StreamContent(stream) : request.Content = new StringContent(JsonSerializer.Serialize(modelClient, _jsonSerializerOptions)); + + request.RequestUri = uriBuilder.Uri; string[] contentTypes = new string[] { @@ -198,7 +244,7 @@ namespace Org.OpenAPITools.Api string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); string[] accepts = new string[] { "application/json" @@ -208,31 +254,24 @@ namespace Org.OpenAPITools.Api if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - + request.Method = new HttpMethod("PATCH"); + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/another-fake/dummy", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync().ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/another-fake/dummy")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterCall123TestSpecialTags(apiResponse, modelClient); + } return apiResponse; } @@ -240,8 +279,9 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorCall123TestSpecialTags(e, "/another-fake/dummy", uriBuilder.Path, modelClient); throw; } - } } + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/DefaultApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/DefaultApi.cs index 2f874775c6..fccc25399c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/DefaultApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/DefaultApi.cs @@ -19,10 +19,11 @@ using System.Text.Json; using Org.OpenAPITools.Client; using Org.OpenAPITools.Model; -namespace Org.OpenAPITools.Api +namespace Org.OpenAPITools.IApi { /// /// Represents a collection of functions to interact with the API endpoints + /// This class is registered as transient. /// public interface IDefaultApi : IApi { @@ -46,21 +47,19 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Cancellation Token to cancel the request. /// Task of ApiResponse<FooGetDefaultResponse> - Task FooGetAsync(System.Threading.CancellationToken? cancellationToken = null); } + Task FooGetAsync(System.Threading.CancellationToken? cancellationToken = null); + } +} +namespace Org.OpenAPITools.Api +{ /// /// Represents a collection of functions to interact with the API endpoints /// - public partial class DefaultApi : IDefaultApi + public partial class DefaultApi : IApi.IDefaultApi { private JsonSerializerOptions _jsonSerializerOptions; - /// - /// An event to track the health of the server. - /// If you store these event args, be sure to purge old event args to prevent a memory leak. - /// - public event ClientUtils.EventHandler ApiResponded; - /// /// The logger /// @@ -117,6 +116,15 @@ namespace Org.OpenAPITools.Api OauthTokenProvider = oauthTokenProvider; } + /// + /// Logs the api response + /// + /// + protected virtual void OnApiResponded(ApiResponseEventArgs args) + { + Logger.LogInformation("{0,-9} | {1} | {3}", (args.ReceivedAt - args.RequestedAt).TotalSeconds, args.HttpStatus, args.Path); + } + /// /// /// @@ -155,6 +163,34 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + protected virtual void OnFooGet() + { + return; + } + + /// + /// Processes the server response + /// + /// + protected virtual void AfterFooGet(ApiResponse apiResponse) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + protected virtual void OnErrorFooGet(Exception exception, string pathFormat, string path) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// /// @@ -163,16 +199,21 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> FooGetWithHttpInfoAsync(System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { + OnFooGet(); + using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/foo"; + + request.RequestUri = uriBuilder.Uri; string[] accepts = new string[] { @@ -183,31 +224,24 @@ namespace Org.OpenAPITools.Api if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - + request.Method = new HttpMethod("GET"); + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/foo", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync().ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/foo")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterFooGet(apiResponse); + } return apiResponse; } @@ -215,8 +249,9 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorFooGet(e, "/foo", uriBuilder.Path); throw; } - } } + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/FakeApi.cs index f9f02ecc21..c017ba3ecc 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/FakeApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/FakeApi.cs @@ -19,10 +19,11 @@ using System.Text.Json; using Org.OpenAPITools.Client; using Org.OpenAPITools.Model; -namespace Org.OpenAPITools.Api +namespace Org.OpenAPITools.IApi { /// /// Represents a collection of functions to interact with the API endpoints + /// This class is registered as transient. /// public interface IFakeApi : IApi { @@ -47,6 +48,7 @@ namespace Org.OpenAPITools.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse<HealthCheckResult> Task FakeHealthGetAsync(System.Threading.CancellationToken? cancellationToken = null); + /// /// /// @@ -70,6 +72,7 @@ namespace Org.OpenAPITools.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse<bool> Task FakeOuterBooleanSerializeAsync(bool? body = null, System.Threading.CancellationToken? cancellationToken = null); + /// /// /// @@ -93,6 +96,7 @@ namespace Org.OpenAPITools.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse<OuterComposite> Task FakeOuterCompositeSerializeAsync(OuterComposite outerComposite = null, System.Threading.CancellationToken? cancellationToken = null); + /// /// /// @@ -116,6 +120,7 @@ namespace Org.OpenAPITools.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse<decimal> Task FakeOuterNumberSerializeAsync(decimal? body = null, System.Threading.CancellationToken? cancellationToken = null); + /// /// /// @@ -139,6 +144,7 @@ namespace Org.OpenAPITools.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse<string> Task FakeOuterStringSerializeAsync(string body = null, System.Threading.CancellationToken? cancellationToken = null); + /// /// Array of Enums /// @@ -160,6 +166,7 @@ namespace Org.OpenAPITools.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse<List<OuterEnum>> Task> GetArrayOfEnumsAsync(System.Threading.CancellationToken? cancellationToken = null); + /// /// /// @@ -183,18 +190,6 @@ namespace Org.OpenAPITools.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task TestBodyWithFileSchemaAsync(FileSchemaTestClass fileSchemaTestClass, System.Threading.CancellationToken? cancellationToken = null); - /// - /// - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel the request. - /// Task<ApiResponse<object>> - Task> TestBodyWithQueryParamsWithHttpInfoAsync(string query, User user, System.Threading.CancellationToken? cancellationToken = null); /// /// @@ -203,11 +198,25 @@ namespace Org.OpenAPITools.Api /// /// /// Thrown when fails to make API call - /// /// + /// + /// Cancellation Token to cancel the request. + /// Task<ApiResponse<object>> + Task> TestBodyWithQueryParamsWithHttpInfoAsync(User user, string query, System.Threading.CancellationToken? cancellationToken = null); + + /// + /// + /// + /// + /// + /// + /// Thrown when fails to make API call + /// + /// /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> - Task TestBodyWithQueryParamsAsync(string query, User user, System.Threading.CancellationToken? cancellationToken = null); + Task TestBodyWithQueryParamsAsync(User user, string query, System.Threading.CancellationToken? cancellationToken = null); + /// /// To test \"client\" model /// @@ -231,30 +240,6 @@ namespace Org.OpenAPITools.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse<ModelClient> Task TestClientModelAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null); - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// Thrown when fails to make API call - /// None - /// None - /// None - /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") - /// Cancellation Token to cancel the request. - /// Task<ApiResponse<object>> - Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, string password = null, string callback = null, DateTime? dateTime = null, System.Threading.CancellationToken? cancellationToken = null); /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -263,41 +248,48 @@ namespace Org.OpenAPITools.Api /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call + /// None /// None /// None /// None - /// None + /// None (optional) + /// None (optional) + /// None (optional) /// None (optional) /// None (optional) /// None (optional) - /// None (optional) /// None (optional) - /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") + /// Cancellation Token to cancel the request. + /// Task<ApiResponse<object>> + Task> TestEndpointParametersWithHttpInfoAsync(byte[] _byte, decimal number, double _double, string patternWithoutDelimiter, DateTime? date = null, System.IO.Stream binary = null, float? _float = null, int? integer = null, int? int32 = null, long? int64 = null, string _string = null, string password = null, string callback = null, DateTime? dateTime = null, System.Threading.CancellationToken? cancellationToken = null); + + /// + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// + /// + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// + /// Thrown when fails to make API call + /// None + /// None + /// None + /// None /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) + /// None (optional) /// None (optional) /// None (optional) /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> - Task TestEndpointParametersAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, string password = null, string callback = null, DateTime? dateTime = null, System.Threading.CancellationToken? cancellationToken = null); - /// - /// To test enum parameters - /// - /// - /// To test enum parameters - /// - /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (double) (optional) - /// Query parameter enum test (double) (optional) - /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string) (optional, default to -efg) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) - /// Cancellation Token to cancel the request. - /// Task<ApiResponse<object>> - Task> TestEnumParametersWithHttpInfoAsync(List enumHeaderStringArray = null, List enumQueryStringArray = null, int? enumQueryInteger = null, double? enumQueryDouble = null, string enumHeaderString = null, string enumQueryString = null, List enumFormStringArray = null, string enumFormString = null, System.Threading.CancellationToken? cancellationToken = null); + Task TestEndpointParametersAsync(byte[] _byte, decimal number, double _double, string patternWithoutDelimiter, DateTime? date = null, System.IO.Stream binary = null, float? _float = null, int? integer = null, int? int32 = null, long? int64 = null, string _string = null, string password = null, string callback = null, DateTime? dateTime = null, System.Threading.CancellationToken? cancellationToken = null); /// /// To test enum parameters @@ -308,31 +300,34 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Header parameter enum test (string array) (optional) /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) + /// Query parameter enum test (double) (optional) + /// Form parameter enum test (string array) (optional, default to $) /// Header parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (string) (optional, default to -efg) + /// Form parameter enum test (string) (optional, default to -efg) + /// Cancellation Token to cancel the request. + /// Task<ApiResponse<object>> + Task> TestEnumParametersWithHttpInfoAsync(List enumHeaderStringArray = null, List enumQueryStringArray = null, double? enumQueryDouble = null, int? enumQueryInteger = null, List enumFormStringArray = null, string enumHeaderString = null, string enumQueryString = null, string enumFormString = null, System.Threading.CancellationToken? cancellationToken = null); + + /// + /// To test enum parameters + /// + /// + /// To test enum parameters + /// + /// Thrown when fails to make API call + /// Header parameter enum test (string array) (optional) + /// Query parameter enum test (string array) (optional) + /// Query parameter enum test (double) (optional) + /// Query parameter enum test (double) (optional) /// Form parameter enum test (string array) (optional, default to $) + /// Header parameter enum test (string) (optional, default to -efg) + /// Query parameter enum test (string) (optional, default to -efg) /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> - Task TestEnumParametersAsync(List enumHeaderStringArray = null, List enumQueryStringArray = null, int? enumQueryInteger = null, double? enumQueryDouble = null, string enumHeaderString = null, string enumQueryString = null, List enumFormStringArray = null, string enumFormString = null, System.Threading.CancellationToken? cancellationToken = null); - /// - /// Fake endpoint to test group parameters (optional) - /// - /// - /// Fake endpoint to test group parameters (optional) - /// - /// Thrown when fails to make API call - /// Required String in group parameters - /// Required Boolean in group parameters - /// Required Integer in group parameters - /// String in group parameters (optional) - /// Boolean in group parameters (optional) - /// Integer in group parameters (optional) - /// Cancellation Token to cancel the request. - /// Task<ApiResponse<object>> - Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null, System.Threading.CancellationToken? cancellationToken = null); + Task TestEnumParametersAsync(List enumHeaderStringArray = null, List enumQueryStringArray = null, double? enumQueryDouble = null, int? enumQueryInteger = null, List enumFormStringArray = null, string enumHeaderString = null, string enumQueryString = null, string enumFormString = null, System.Threading.CancellationToken? cancellationToken = null); /// /// Fake endpoint to test group parameters (optional) @@ -341,15 +336,33 @@ namespace Org.OpenAPITools.Api /// Fake endpoint to test group parameters (optional) /// /// Thrown when fails to make API call - /// Required String in group parameters /// Required Boolean in group parameters + /// Required String in group parameters /// Required Integer in group parameters - /// String in group parameters (optional) /// Boolean in group parameters (optional) + /// String in group parameters (optional) + /// Integer in group parameters (optional) + /// Cancellation Token to cancel the request. + /// Task<ApiResponse<object>> + Task> TestGroupParametersWithHttpInfoAsync(bool requiredBooleanGroup, int requiredStringGroup, long requiredInt64Group, bool? booleanGroup = null, int? stringGroup = null, long? int64Group = null, System.Threading.CancellationToken? cancellationToken = null); + + /// + /// Fake endpoint to test group parameters (optional) + /// + /// + /// Fake endpoint to test group parameters (optional) + /// + /// Thrown when fails to make API call + /// Required Boolean in group parameters + /// Required String in group parameters + /// Required Integer in group parameters + /// Boolean in group parameters (optional) + /// String in group parameters (optional) /// Integer in group parameters (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> - Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null, System.Threading.CancellationToken? cancellationToken = null); + Task TestGroupParametersAsync(bool requiredBooleanGroup, int requiredStringGroup, long requiredInt64Group, bool? booleanGroup = null, int? stringGroup = null, long? int64Group = null, System.Threading.CancellationToken? cancellationToken = null); + /// /// test inline additionalProperties /// @@ -373,6 +386,7 @@ namespace Org.OpenAPITools.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task TestInlineAdditionalPropertiesAsync(Dictionary requestBody, System.Threading.CancellationToken? cancellationToken = null); + /// /// test json serialization of form data /// @@ -398,6 +412,7 @@ namespace Org.OpenAPITools.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task TestJsonFormDataAsync(string param, string param2, System.Threading.CancellationToken? cancellationToken = null); + /// /// /// @@ -428,21 +443,19 @@ namespace Org.OpenAPITools.Api /// /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> - Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, System.Threading.CancellationToken? cancellationToken = null); } + Task TestQueryParameterCollectionFormatAsync(List pipe, List ioutil, List http, List url, List context, System.Threading.CancellationToken? cancellationToken = null); + } +} +namespace Org.OpenAPITools.Api +{ /// /// Represents a collection of functions to interact with the API endpoints /// - public partial class FakeApi : IFakeApi + public partial class FakeApi : IApi.IFakeApi { private JsonSerializerOptions _jsonSerializerOptions; - /// - /// An event to track the health of the server. - /// If you store these event args, be sure to purge old event args to prevent a memory leak. - /// - public event ClientUtils.EventHandler ApiResponded; - /// /// The logger /// @@ -499,6 +512,15 @@ namespace Org.OpenAPITools.Api OauthTokenProvider = oauthTokenProvider; } + /// + /// Logs the api response + /// + /// + protected virtual void OnApiResponded(ApiResponseEventArgs args) + { + Logger.LogInformation("{0,-9} | {1} | {3}", (args.ReceivedAt - args.RequestedAt).TotalSeconds, args.HttpStatus, args.Path); + } + /// /// Health check endpoint /// @@ -537,6 +559,34 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + protected virtual void OnFakeHealthGet() + { + return; + } + + /// + /// Processes the server response + /// + /// + protected virtual void AfterFakeHealthGet(ApiResponse apiResponse) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + protected virtual void OnErrorFakeHealthGet(Exception exception, string pathFormat, string path) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Health check endpoint /// @@ -545,16 +595,21 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> FakeHealthGetWithHttpInfoAsync(System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { + OnFakeHealthGet(); + using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/fake/health"; + + request.RequestUri = uriBuilder.Uri; string[] accepts = new string[] { @@ -565,31 +620,24 @@ namespace Org.OpenAPITools.Api if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - + request.Method = new HttpMethod("GET"); + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/health", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync().ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/health")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterFakeHealthGet(apiResponse); + } return apiResponse; } @@ -597,7 +645,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorFakeHealthGet(e, "/fake/health", uriBuilder.Path); throw; } } @@ -621,6 +669,37 @@ namespace Org.OpenAPITools.Api return result.Content; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual bool? OnFakeOuterBooleanSerialize(bool? body) + { + return body; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterFakeOuterBooleanSerialize(ApiResponse apiResponse, bool? body) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorFakeOuterBooleanSerialize(Exception exception, string pathFormat, string path, bool? body) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Test serialization of outer boolean types /// @@ -630,11 +709,14 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> FakeOuterBooleanSerializeWithHttpInfoAsync(bool? body = null, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { + body = OnFakeOuterBooleanSerialize(body); + using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -644,6 +726,8 @@ namespace Org.OpenAPITools.Api ? request.Content = new StreamContent(stream) : request.Content = new StringContent(JsonSerializer.Serialize(body, _jsonSerializerOptions)); + + request.RequestUri = uriBuilder.Uri; string[] contentTypes = new string[] { @@ -653,7 +737,7 @@ namespace Org.OpenAPITools.Api string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); string[] accepts = new string[] { "*/*" @@ -663,31 +747,24 @@ namespace Org.OpenAPITools.Api if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - + request.Method = new HttpMethod("POST"); + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/outer/boolean", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync().ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/outer/boolean")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterFakeOuterBooleanSerialize(apiResponse, body); + } return apiResponse; } @@ -695,7 +772,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorFakeOuterBooleanSerialize(e, "/fake/outer/boolean", uriBuilder.Path, body); throw; } } @@ -740,6 +817,37 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual OuterComposite OnFakeOuterCompositeSerialize(OuterComposite outerComposite) + { + return outerComposite; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterFakeOuterCompositeSerialize(ApiResponse apiResponse, OuterComposite outerComposite) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorFakeOuterCompositeSerialize(Exception exception, string pathFormat, string path, OuterComposite outerComposite) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Test serialization of object with outer number type /// @@ -749,11 +857,14 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> FakeOuterCompositeSerializeWithHttpInfoAsync(OuterComposite outerComposite = null, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { + outerComposite = OnFakeOuterCompositeSerialize(outerComposite); + using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -763,6 +874,8 @@ namespace Org.OpenAPITools.Api ? request.Content = new StreamContent(stream) : request.Content = new StringContent(JsonSerializer.Serialize(outerComposite, _jsonSerializerOptions)); + + request.RequestUri = uriBuilder.Uri; string[] contentTypes = new string[] { @@ -772,7 +885,7 @@ namespace Org.OpenAPITools.Api string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); string[] accepts = new string[] { "*/*" @@ -782,31 +895,24 @@ namespace Org.OpenAPITools.Api if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - + request.Method = new HttpMethod("POST"); + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/outer/composite", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync().ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/outer/composite")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterFakeOuterCompositeSerialize(apiResponse, outerComposite); + } return apiResponse; } @@ -814,7 +920,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorFakeOuterCompositeSerialize(e, "/fake/outer/composite", uriBuilder.Path, outerComposite); throw; } } @@ -838,6 +944,37 @@ namespace Org.OpenAPITools.Api return result.Content; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual decimal? OnFakeOuterNumberSerialize(decimal? body) + { + return body; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterFakeOuterNumberSerialize(ApiResponse apiResponse, decimal? body) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorFakeOuterNumberSerialize(Exception exception, string pathFormat, string path, decimal? body) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Test serialization of outer number types /// @@ -847,11 +984,14 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> FakeOuterNumberSerializeWithHttpInfoAsync(decimal? body = null, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { + body = OnFakeOuterNumberSerialize(body); + using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -861,6 +1001,8 @@ namespace Org.OpenAPITools.Api ? request.Content = new StreamContent(stream) : request.Content = new StringContent(JsonSerializer.Serialize(body, _jsonSerializerOptions)); + + request.RequestUri = uriBuilder.Uri; string[] contentTypes = new string[] { @@ -870,7 +1012,7 @@ namespace Org.OpenAPITools.Api string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); string[] accepts = new string[] { "*/*" @@ -880,31 +1022,24 @@ namespace Org.OpenAPITools.Api if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - + request.Method = new HttpMethod("POST"); + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/outer/number", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync().ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/outer/number")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterFakeOuterNumberSerialize(apiResponse, body); + } return apiResponse; } @@ -912,7 +1047,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorFakeOuterNumberSerialize(e, "/fake/outer/number", uriBuilder.Path, body); throw; } } @@ -936,6 +1071,37 @@ namespace Org.OpenAPITools.Api return result.Content; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual string OnFakeOuterStringSerialize(string body) + { + return body; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterFakeOuterStringSerialize(ApiResponse apiResponse, string body) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorFakeOuterStringSerialize(Exception exception, string pathFormat, string path, string body) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Test serialization of outer string types /// @@ -945,11 +1111,14 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> FakeOuterStringSerializeWithHttpInfoAsync(string body = null, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { + body = OnFakeOuterStringSerialize(body); + using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -959,6 +1128,8 @@ namespace Org.OpenAPITools.Api ? request.Content = new StreamContent(stream) : request.Content = new StringContent(JsonSerializer.Serialize(body, _jsonSerializerOptions)); + + request.RequestUri = uriBuilder.Uri; string[] contentTypes = new string[] { @@ -968,7 +1139,7 @@ namespace Org.OpenAPITools.Api string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); string[] accepts = new string[] { "*/*" @@ -978,31 +1149,24 @@ namespace Org.OpenAPITools.Api if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - + request.Method = new HttpMethod("POST"); + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/outer/string", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync().ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/outer/string")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterFakeOuterStringSerialize(apiResponse, body); + } return apiResponse; } @@ -1010,7 +1174,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorFakeOuterStringSerialize(e, "/fake/outer/string", uriBuilder.Path, body); throw; } } @@ -1053,6 +1217,34 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + protected virtual void OnGetArrayOfEnums() + { + return; + } + + /// + /// Processes the server response + /// + /// + protected virtual void AfterGetArrayOfEnums(ApiResponse> apiResponse) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + protected virtual void OnErrorGetArrayOfEnums(Exception exception, string pathFormat, string path) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Array of Enums /// @@ -1061,16 +1253,21 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task>> GetArrayOfEnumsWithHttpInfoAsync(System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { + OnGetArrayOfEnums(); + using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/fake/array-of-enums"; + + request.RequestUri = uriBuilder.Uri; string[] accepts = new string[] { @@ -1081,31 +1278,24 @@ namespace Org.OpenAPITools.Api if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - + request.Method = new HttpMethod("GET"); + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/array-of-enums", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync().ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/array-of-enums")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse> apiResponse = new ApiResponse>(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize>(apiResponse.RawContent, _jsonSerializerOptions); + AfterGetArrayOfEnums(apiResponse); + } return apiResponse; } @@ -1113,7 +1303,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorGetArrayOfEnums(e, "/fake/array-of-enums", uriBuilder.Path); throw; } } @@ -1158,6 +1348,46 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual FileSchemaTestClass OnTestBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (fileSchemaTestClass == null) + throw new ArgumentNullException(nameof(fileSchemaTestClass)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return fileSchemaTestClass; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterTestBodyWithFileSchema(ApiResponse apiResponse, FileSchemaTestClass fileSchemaTestClass) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorTestBodyWithFileSchema(Exception exception, string pathFormat, string path, FileSchemaTestClass fileSchemaTestClass) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// For this test, the body for this request much reference a schema named `File`. /// @@ -1167,18 +1397,14 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> TestBodyWithFileSchemaWithHttpInfoAsync(FileSchemaTestClass fileSchemaTestClass, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (fileSchemaTestClass == null) - throw new ArgumentNullException(nameof(fileSchemaTestClass)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + fileSchemaTestClass = OnTestBodyWithFileSchema(fileSchemaTestClass); using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -1188,6 +1414,8 @@ namespace Org.OpenAPITools.Api ? request.Content = new StreamContent(stream) : request.Content = new StringContent(JsonSerializer.Serialize(fileSchemaTestClass, _jsonSerializerOptions)); + + request.RequestUri = uriBuilder.Uri; string[] contentTypes = new string[] { @@ -1197,32 +1425,25 @@ namespace Org.OpenAPITools.Api string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); request.Method = new HttpMethod("PUT"); + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/body-with-file-schema", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync().ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/body-with-file-schema")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterTestBodyWithFileSchema(apiResponse, fileSchemaTestClass); + } return apiResponse; } @@ -1230,7 +1451,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorTestBodyWithFileSchema(e, "/fake/body-with-file-schema", uriBuilder.Path, fileSchemaTestClass); throw; } } @@ -1239,13 +1460,13 @@ namespace Org.OpenAPITools.Api /// /// /// Thrown when fails to make API call - /// /// + /// /// Cancellation Token to cancel the request. /// <> - public async Task TestBodyWithQueryParamsAsync(string query, User user, System.Threading.CancellationToken? cancellationToken = null) + public async Task TestBodyWithQueryParamsAsync(User user, string query, System.Threading.CancellationToken? cancellationToken = null) { - ApiResponse result = await TestBodyWithQueryParamsWithHttpInfoAsync(query, user, cancellationToken).ConfigureAwait(false); + ApiResponse result = await TestBodyWithQueryParamsWithHttpInfoAsync(user, query, cancellationToken).ConfigureAwait(false); if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); @@ -1257,16 +1478,16 @@ namespace Org.OpenAPITools.Api /// /// /// Thrown when fails to make API call - /// /// + /// /// Cancellation Token to cancel the request. /// <> - public async Task TestBodyWithQueryParamsOrDefaultAsync(string query, User user, System.Threading.CancellationToken? cancellationToken = null) + public async Task TestBodyWithQueryParamsOrDefaultAsync(User user, string query, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = null; try { - result = await TestBodyWithQueryParamsWithHttpInfoAsync(query, user, cancellationToken).ConfigureAwait(false); + result = await TestBodyWithQueryParamsWithHttpInfoAsync(user, query, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -1277,31 +1498,72 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + /// + protected virtual (User, string) OnTestBodyWithQueryParams(User user, string query) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (user == null) + throw new ArgumentNullException(nameof(user)); + + if (query == null) + throw new ArgumentNullException(nameof(query)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return (user, query); + } + + /// + /// Processes the server response + /// + /// + /// + /// + protected virtual void AfterTestBodyWithQueryParams(ApiResponse apiResponse, User user, string query) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + /// + protected virtual void OnErrorTestBodyWithQueryParams(Exception exception, string pathFormat, string path, User user, string query) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// /// /// Thrown when fails to make API call - /// /// + /// /// Cancellation Token to cancel the request. /// <> where T : - public async Task> TestBodyWithQueryParamsWithHttpInfoAsync(string query, User user, System.Threading.CancellationToken? cancellationToken = null) + public async Task> TestBodyWithQueryParamsWithHttpInfoAsync(User user, string query, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (query == null) - throw new ArgumentNullException(nameof(query)); - - if (user == null) - throw new ArgumentNullException(nameof(user)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + var validatedParameters = OnTestBodyWithQueryParams(user, query); + user = validatedParameters.Item1; + query = validatedParameters.Item2; using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -1317,6 +1579,8 @@ namespace Org.OpenAPITools.Api ? request.Content = new StreamContent(stream) : request.Content = new StringContent(JsonSerializer.Serialize(user, _jsonSerializerOptions)); + + request.RequestUri = uriBuilder.Uri; string[] contentTypes = new string[] { @@ -1326,32 +1590,25 @@ namespace Org.OpenAPITools.Api string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); request.Method = new HttpMethod("PUT"); + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/body-with-query-params", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync().ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/body-with-query-params")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterTestBodyWithQueryParams(apiResponse, user, query); + } return apiResponse; } @@ -1359,7 +1616,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorTestBodyWithQueryParams(e, "/fake/body-with-query-params", uriBuilder.Path, user, query); throw; } } @@ -1404,6 +1661,46 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual ModelClient OnTestClientModel(ModelClient modelClient) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (modelClient == null) + throw new ArgumentNullException(nameof(modelClient)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return modelClient; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterTestClientModel(ApiResponse apiResponse, ModelClient modelClient) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorTestClientModel(Exception exception, string pathFormat, string path, ModelClient modelClient) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// To test \"client\" model To test \"client\" model /// @@ -1413,18 +1710,14 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> TestClientModelWithHttpInfoAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (modelClient == null) - throw new ArgumentNullException(nameof(modelClient)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + modelClient = OnTestClientModel(modelClient); using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -1434,6 +1727,8 @@ namespace Org.OpenAPITools.Api ? request.Content = new StreamContent(stream) : request.Content = new StringContent(JsonSerializer.Serialize(modelClient, _jsonSerializerOptions)); + + request.RequestUri = uriBuilder.Uri; string[] contentTypes = new string[] { @@ -1443,7 +1738,7 @@ namespace Org.OpenAPITools.Api string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); string[] accepts = new string[] { "application/json" @@ -1453,31 +1748,24 @@ namespace Org.OpenAPITools.Api if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - + request.Method = new HttpMethod("PATCH"); + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync().ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterTestClientModel(apiResponse, modelClient); + } return apiResponse; } @@ -1485,7 +1773,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorTestClientModel(e, "/fake", uriBuilder.Path, modelClient); throw; } } @@ -1494,25 +1782,25 @@ namespace Org.OpenAPITools.Api /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call + /// None /// None /// None /// None - /// None + /// None (optional) + /// None (optional) + /// None (optional) /// None (optional) /// None (optional) /// None (optional) - /// None (optional) /// None (optional) - /// None (optional) - /// None (optional) /// None (optional) /// None (optional) /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// Cancellation Token to cancel the request. /// <> - public async Task TestEndpointParametersAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, string password = null, string callback = null, DateTime? dateTime = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task TestEndpointParametersAsync(byte[] _byte, decimal number, double _double, string patternWithoutDelimiter, DateTime? date = null, System.IO.Stream binary = null, float? _float = null, int? integer = null, int? int32 = null, long? int64 = null, string _string = null, string password = null, string callback = null, DateTime? dateTime = null, System.Threading.CancellationToken? cancellationToken = null) { - ApiResponse result = await TestEndpointParametersWithHttpInfoAsync(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, password, callback, dateTime, cancellationToken).ConfigureAwait(false); + ApiResponse result = await TestEndpointParametersWithHttpInfoAsync(_byte, number, _double, patternWithoutDelimiter, date, binary, _float, integer, int32, int64, _string, password, callback, dateTime, cancellationToken).ConfigureAwait(false); if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); @@ -1524,28 +1812,28 @@ namespace Org.OpenAPITools.Api /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call + /// None /// None /// None /// None - /// None + /// None (optional) + /// None (optional) + /// None (optional) /// None (optional) /// None (optional) /// None (optional) - /// None (optional) /// None (optional) - /// None (optional) - /// None (optional) /// None (optional) /// None (optional) /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// Cancellation Token to cancel the request. /// <> - public async Task TestEndpointParametersOrDefaultAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, string password = null, string callback = null, DateTime? dateTime = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task TestEndpointParametersOrDefaultAsync(byte[] _byte, decimal number, double _double, string patternWithoutDelimiter, DateTime? date = null, System.IO.Stream binary = null, float? _float = null, int? integer = null, int? int32 = null, long? int64 = null, string _string = null, string password = null, string callback = null, DateTime? dateTime = null, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = null; try { - result = await TestEndpointParametersWithHttpInfoAsync(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, password, callback, dateTime, cancellationToken).ConfigureAwait(false); + result = await TestEndpointParametersWithHttpInfoAsync(_byte, number, _double, patternWithoutDelimiter, date, binary, _float, integer, int32, int64, _string, password, callback, dateTime, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -1556,43 +1844,138 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + protected virtual (byte[], decimal, double, string, DateTime?, System.IO.Stream, float?, int?, int?, long?, string, string, string, DateTime?) OnTestEndpointParameters(byte[] _byte, decimal number, double _double, string patternWithoutDelimiter, DateTime? date, System.IO.Stream binary, float? _float, int? integer, int? int32, long? int64, string _string, string password, string callback, DateTime? dateTime) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (_byte == null) + throw new ArgumentNullException(nameof(_byte)); + + if (number == null) + throw new ArgumentNullException(nameof(number)); + + if (_double == null) + throw new ArgumentNullException(nameof(_double)); + + if (patternWithoutDelimiter == null) + throw new ArgumentNullException(nameof(patternWithoutDelimiter)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return (_byte, number, _double, patternWithoutDelimiter, date, binary, _float, integer, int32, int64, _string, password, callback, dateTime); + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + protected virtual void AfterTestEndpointParameters(ApiResponse apiResponse, byte[] _byte, decimal number, double _double, string patternWithoutDelimiter, DateTime? date, System.IO.Stream binary, float? _float, int? integer, int? int32, long? int64, string _string, string password, string callback, DateTime? dateTime) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + protected virtual void OnErrorTestEndpointParameters(Exception exception, string pathFormat, string path, byte[] _byte, decimal number, double _double, string patternWithoutDelimiter, DateTime? date, System.IO.Stream binary, float? _float, int? integer, int? int32, long? int64, string _string, string password, string callback, DateTime? dateTime) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 /// /// Thrown when fails to make API call + /// None /// None /// None /// None - /// None + /// None (optional) + /// None (optional) + /// None (optional) /// None (optional) /// None (optional) /// None (optional) - /// None (optional) /// None (optional) - /// None (optional) - /// None (optional) /// None (optional) /// None (optional) /// None (optional, default to "2010-02-01T10:20:10.111110+01:00") /// Cancellation Token to cancel the request. /// <> where T : - public async Task> TestEndpointParametersWithHttpInfoAsync(decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, string password = null, string callback = null, DateTime? dateTime = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task> TestEndpointParametersWithHttpInfoAsync(byte[] _byte, decimal number, double _double, string patternWithoutDelimiter, DateTime? date = null, System.IO.Stream binary = null, float? _float = null, int? integer = null, int? int32 = null, long? int64 = null, string _string = null, string password = null, string callback = null, DateTime? dateTime = null, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (patternWithoutDelimiter == null) - throw new ArgumentNullException(nameof(patternWithoutDelimiter)); - - if (_byte == null) - throw new ArgumentNullException(nameof(_byte)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + var validatedParameters = OnTestEndpointParameters(_byte, number, _double, patternWithoutDelimiter, date, binary, _float, integer, int32, int64, _string, password, callback, dateTime); + _byte = validatedParameters.Item1; + number = validatedParameters.Item2; + _double = validatedParameters.Item3; + patternWithoutDelimiter = validatedParameters.Item4; + date = validatedParameters.Item5; + binary = validatedParameters.Item6; + _float = validatedParameters.Item7; + integer = validatedParameters.Item8; + int32 = validatedParameters.Item9; + int64 = validatedParameters.Item10; + _string = validatedParameters.Item11; + password = validatedParameters.Item12; + callback = validatedParameters.Item13; + dateTime = validatedParameters.Item14; using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -1606,13 +1989,28 @@ namespace Org.OpenAPITools.Api multipartContent.Add(new FormUrlEncodedContent(formParams)); + formParams.Add(new KeyValuePair("byte", ClientUtils.ParameterToString(_byte))); + + + formParams.Add(new KeyValuePair("number", ClientUtils.ParameterToString(number))); + + formParams.Add(new KeyValuePair("double", ClientUtils.ParameterToString(_double))); + + formParams.Add(new KeyValuePair("pattern_without_delimiter", ClientUtils.ParameterToString(patternWithoutDelimiter))); - formParams.Add(new KeyValuePair("byte", ClientUtils.ParameterToString(_byte))); + if (date != null) + formParams.Add(new KeyValuePair("date", ClientUtils.ParameterToString(date))); + + if (binary != null) + multipartContent.Add(new StreamContent(binary)); + + if (_float != null) + formParams.Add(new KeyValuePair("float", ClientUtils.ParameterToString(_float))); if (integer != null) formParams.Add(new KeyValuePair("integer", ClientUtils.ParameterToString(integer))); @@ -1623,18 +2021,9 @@ namespace Org.OpenAPITools.Api if (int64 != null) formParams.Add(new KeyValuePair("int64", ClientUtils.ParameterToString(int64))); - if (_float != null) - formParams.Add(new KeyValuePair("float", ClientUtils.ParameterToString(_float))); - if (_string != null) formParams.Add(new KeyValuePair("string", ClientUtils.ParameterToString(_string))); - if (binary != null) - multipartContent.Add(new StreamContent(binary)); - - if (date != null) - formParams.Add(new KeyValuePair("date", ClientUtils.ParameterToString(date))); - if (password != null) formParams.Add(new KeyValuePair("password", ClientUtils.ParameterToString(password))); @@ -1646,6 +2035,8 @@ namespace Org.OpenAPITools.Api List tokens = new List(); + + request.RequestUri = uriBuilder.Uri; BasicToken basicToken = (BasicToken) await BasicTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); @@ -1661,32 +2052,25 @@ namespace Org.OpenAPITools.Api string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); request.Method = new HttpMethod("POST"); + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync().ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterTestEndpointParameters(apiResponse, _byte, number, _double, patternWithoutDelimiter, date, binary, _float, integer, int32, int64, _string, password, callback, dateTime); + } else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -1697,7 +2081,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorTestEndpointParameters(e, "/fake", uriBuilder.Path, _byte, number, _double, patternWithoutDelimiter, date, binary, _float, integer, int32, int64, _string, password, callback, dateTime); throw; } } @@ -1708,17 +2092,17 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Header parameter enum test (string array) (optional) /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) + /// Query parameter enum test (double) (optional) + /// Form parameter enum test (string array) (optional, default to $) /// Header parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (string) (optional, default to -efg) - /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel the request. /// <> - public async Task TestEnumParametersAsync(List enumHeaderStringArray = null, List enumQueryStringArray = null, int? enumQueryInteger = null, double? enumQueryDouble = null, string enumHeaderString = null, string enumQueryString = null, List enumFormStringArray = null, string enumFormString = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task TestEnumParametersAsync(List enumHeaderStringArray = null, List enumQueryStringArray = null, double? enumQueryDouble = null, int? enumQueryInteger = null, List enumFormStringArray = null, string enumHeaderString = null, string enumQueryString = null, string enumFormString = null, System.Threading.CancellationToken? cancellationToken = null) { - ApiResponse result = await TestEnumParametersWithHttpInfoAsync(enumHeaderStringArray, enumQueryStringArray, enumQueryInteger, enumQueryDouble, enumHeaderString, enumQueryString, enumFormStringArray, enumFormString, cancellationToken).ConfigureAwait(false); + ApiResponse result = await TestEnumParametersWithHttpInfoAsync(enumHeaderStringArray, enumQueryStringArray, enumQueryDouble, enumQueryInteger, enumFormStringArray, enumHeaderString, enumQueryString, enumFormString, cancellationToken).ConfigureAwait(false); if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); @@ -1732,20 +2116,20 @@ namespace Org.OpenAPITools.Api /// Thrown when fails to make API call /// Header parameter enum test (string array) (optional) /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) + /// Query parameter enum test (double) (optional) + /// Form parameter enum test (string array) (optional, default to $) /// Header parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (string) (optional, default to -efg) - /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel the request. /// <> - public async Task TestEnumParametersOrDefaultAsync(List enumHeaderStringArray = null, List enumQueryStringArray = null, int? enumQueryInteger = null, double? enumQueryDouble = null, string enumHeaderString = null, string enumQueryString = null, List enumFormStringArray = null, string enumFormString = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task TestEnumParametersOrDefaultAsync(List enumHeaderStringArray = null, List enumQueryStringArray = null, double? enumQueryDouble = null, int? enumQueryInteger = null, List enumFormStringArray = null, string enumHeaderString = null, string enumQueryString = null, string enumFormString = null, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = null; try { - result = await TestEnumParametersWithHttpInfoAsync(enumHeaderStringArray, enumQueryStringArray, enumQueryInteger, enumQueryDouble, enumHeaderString, enumQueryString, enumFormStringArray, enumFormString, cancellationToken).ConfigureAwait(false); + result = await TestEnumParametersWithHttpInfoAsync(enumHeaderStringArray, enumQueryStringArray, enumQueryDouble, enumQueryInteger, enumFormStringArray, enumHeaderString, enumQueryString, enumFormString, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -1756,27 +2140,90 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + protected virtual (List, List, double?, int?, List, string, string, string) OnTestEnumParameters(List enumHeaderStringArray, List enumQueryStringArray, double? enumQueryDouble, int? enumQueryInteger, List enumFormStringArray, string enumHeaderString, string enumQueryString, string enumFormString) + { + return (enumHeaderStringArray, enumQueryStringArray, enumQueryDouble, enumQueryInteger, enumFormStringArray, enumHeaderString, enumQueryString, enumFormString); + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + protected virtual void AfterTestEnumParameters(ApiResponse apiResponse, List enumHeaderStringArray, List enumQueryStringArray, double? enumQueryDouble, int? enumQueryInteger, List enumFormStringArray, string enumHeaderString, string enumQueryString, string enumFormString) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + protected virtual void OnErrorTestEnumParameters(Exception exception, string pathFormat, string path, List enumHeaderStringArray, List enumQueryStringArray, double? enumQueryDouble, int? enumQueryInteger, List enumFormStringArray, string enumHeaderString, string enumQueryString, string enumFormString) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// To test enum parameters To test enum parameters /// /// Thrown when fails to make API call /// Header parameter enum test (string array) (optional) /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (double) (optional) /// Query parameter enum test (double) (optional) + /// Query parameter enum test (double) (optional) + /// Form parameter enum test (string array) (optional, default to $) /// Header parameter enum test (string) (optional, default to -efg) /// Query parameter enum test (string) (optional, default to -efg) - /// Form parameter enum test (string array) (optional, default to $) /// Form parameter enum test (string) (optional, default to -efg) /// Cancellation Token to cancel the request. /// <> where T : - public async Task> TestEnumParametersWithHttpInfoAsync(List enumHeaderStringArray = null, List enumQueryStringArray = null, int? enumQueryInteger = null, double? enumQueryDouble = null, string enumHeaderString = null, string enumQueryString = null, List enumFormStringArray = null, string enumFormString = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task> TestEnumParametersWithHttpInfoAsync(List enumHeaderStringArray = null, List enumQueryStringArray = null, double? enumQueryDouble = null, int? enumQueryInteger = null, List enumFormStringArray = null, string enumHeaderString = null, string enumQueryString = null, string enumFormString = null, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { + var validatedParameters = OnTestEnumParameters(enumHeaderStringArray, enumQueryStringArray, enumQueryDouble, enumQueryInteger, enumFormStringArray, enumHeaderString, enumQueryString, enumFormString); + enumHeaderStringArray = validatedParameters.Item1; + enumQueryStringArray = validatedParameters.Item2; + enumQueryDouble = validatedParameters.Item3; + enumQueryInteger = validatedParameters.Item4; + enumFormStringArray = validatedParameters.Item5; + enumHeaderString = validatedParameters.Item6; + enumQueryString = validatedParameters.Item7; + enumFormString = validatedParameters.Item8; + using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -1786,12 +2233,12 @@ namespace Org.OpenAPITools.Api if (enumQueryStringArray != null) parseQueryString["enum_query_string_array"] = Uri.EscapeDataString(enumQueryStringArray.ToString()); - if (enumQueryInteger != null) - parseQueryString["enum_query_integer"] = Uri.EscapeDataString(enumQueryInteger.ToString()); - if (enumQueryDouble != null) parseQueryString["enum_query_double"] = Uri.EscapeDataString(enumQueryDouble.ToString()); + if (enumQueryInteger != null) + parseQueryString["enum_query_integer"] = Uri.EscapeDataString(enumQueryInteger.ToString()); + if (enumQueryString != null) parseQueryString["enum_query_string"] = Uri.EscapeDataString(enumQueryString.ToString()); @@ -1809,14 +2256,14 @@ namespace Org.OpenAPITools.Api List> formParams = new List>(); - multipartContent.Add(new FormUrlEncodedContent(formParams)); - - if (enumFormStringArray != null) + multipartContent.Add(new FormUrlEncodedContent(formParams)); if (enumFormStringArray != null) formParams.Add(new KeyValuePair("enum_form_string_array", ClientUtils.ParameterToString(enumFormStringArray))); if (enumFormString != null) formParams.Add(new KeyValuePair("enum_form_string", ClientUtils.ParameterToString(enumFormString))); + + request.RequestUri = uriBuilder.Uri; string[] contentTypes = new string[] { @@ -1826,32 +2273,25 @@ namespace Org.OpenAPITools.Api string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); request.Method = new HttpMethod("GET"); + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync().ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterTestEnumParameters(apiResponse, enumHeaderStringArray, enumQueryStringArray, enumQueryDouble, enumQueryInteger, enumFormStringArray, enumHeaderString, enumQueryString, enumFormString); + } return apiResponse; } @@ -1859,7 +2299,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorTestEnumParameters(e, "/fake", uriBuilder.Path, enumHeaderStringArray, enumQueryStringArray, enumQueryDouble, enumQueryInteger, enumFormStringArray, enumHeaderString, enumQueryString, enumFormString); throw; } } @@ -1868,17 +2308,17 @@ namespace Org.OpenAPITools.Api /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) /// /// Thrown when fails to make API call - /// Required String in group parameters /// Required Boolean in group parameters + /// Required String in group parameters /// Required Integer in group parameters - /// String in group parameters (optional) /// Boolean in group parameters (optional) + /// String in group parameters (optional) /// Integer in group parameters (optional) /// Cancellation Token to cancel the request. /// <> - public async Task TestGroupParametersAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task TestGroupParametersAsync(bool requiredBooleanGroup, int requiredStringGroup, long requiredInt64Group, bool? booleanGroup = null, int? stringGroup = null, long? int64Group = null, System.Threading.CancellationToken? cancellationToken = null) { - ApiResponse result = await TestGroupParametersWithHttpInfoAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, cancellationToken).ConfigureAwait(false); + ApiResponse result = await TestGroupParametersWithHttpInfoAsync(requiredBooleanGroup, requiredStringGroup, requiredInt64Group, booleanGroup, stringGroup, int64Group, cancellationToken).ConfigureAwait(false); if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); @@ -1890,20 +2330,20 @@ namespace Org.OpenAPITools.Api /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) /// /// Thrown when fails to make API call - /// Required String in group parameters /// Required Boolean in group parameters + /// Required String in group parameters /// Required Integer in group parameters - /// String in group parameters (optional) /// Boolean in group parameters (optional) + /// String in group parameters (optional) /// Integer in group parameters (optional) /// Cancellation Token to cancel the request. /// <> - public async Task TestGroupParametersOrDefaultAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task TestGroupParametersOrDefaultAsync(bool requiredBooleanGroup, int requiredStringGroup, long requiredInt64Group, bool? booleanGroup = null, int? stringGroup = null, long? int64Group = null, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = null; try { - result = await TestGroupParametersWithHttpInfoAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, cancellationToken).ConfigureAwait(false); + result = await TestGroupParametersWithHttpInfoAsync(requiredBooleanGroup, requiredStringGroup, requiredInt64Group, booleanGroup, stringGroup, int64Group, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -1914,29 +2354,95 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + /// + /// + /// + /// + /// + protected virtual (bool, int, long, bool?, int?, long?) OnTestGroupParameters(bool requiredBooleanGroup, int requiredStringGroup, long requiredInt64Group, bool? booleanGroup, int? stringGroup, long? int64Group) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (requiredBooleanGroup == null) + throw new ArgumentNullException(nameof(requiredBooleanGroup)); + + if (requiredStringGroup == null) + throw new ArgumentNullException(nameof(requiredStringGroup)); + + if (requiredInt64Group == null) + throw new ArgumentNullException(nameof(requiredInt64Group)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return (requiredBooleanGroup, requiredStringGroup, requiredInt64Group, booleanGroup, stringGroup, int64Group); + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + /// + /// + /// + protected virtual void AfterTestGroupParameters(ApiResponse apiResponse, bool requiredBooleanGroup, int requiredStringGroup, long requiredInt64Group, bool? booleanGroup, int? stringGroup, long? int64Group) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + protected virtual void OnErrorTestGroupParameters(Exception exception, string pathFormat, string path, bool requiredBooleanGroup, int requiredStringGroup, long requiredInt64Group, bool? booleanGroup, int? stringGroup, long? int64Group) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) /// /// Thrown when fails to make API call - /// Required String in group parameters /// Required Boolean in group parameters + /// Required String in group parameters /// Required Integer in group parameters - /// String in group parameters (optional) /// Boolean in group parameters (optional) + /// String in group parameters (optional) /// Integer in group parameters (optional) /// Cancellation Token to cancel the request. /// <> where T : - public async Task> TestGroupParametersWithHttpInfoAsync(int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task> TestGroupParametersWithHttpInfoAsync(bool requiredBooleanGroup, int requiredStringGroup, long requiredInt64Group, bool? booleanGroup = null, int? stringGroup = null, long? int64Group = null, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + var validatedParameters = OnTestGroupParameters(requiredBooleanGroup, requiredStringGroup, requiredInt64Group, booleanGroup, stringGroup, int64Group); + requiredBooleanGroup = validatedParameters.Item1; + requiredStringGroup = validatedParameters.Item2; + requiredInt64Group = validatedParameters.Item3; + booleanGroup = validatedParameters.Item4; + stringGroup = validatedParameters.Item5; + int64Group = validatedParameters.Item6; using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -1962,6 +2468,8 @@ namespace Org.OpenAPITools.Api List tokens = new List(); + + request.RequestUri = uriBuilder.Uri; BearerToken bearerToken = (BearerToken) await BearerTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); @@ -1972,28 +2480,21 @@ namespace Org.OpenAPITools.Api request.Method = new HttpMethod("DELETE"); + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync().ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterTestGroupParameters(apiResponse, requiredBooleanGroup, requiredStringGroup, requiredInt64Group, booleanGroup, stringGroup, int64Group); + } else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -2004,7 +2505,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorTestGroupParameters(e, "/fake", uriBuilder.Path, requiredBooleanGroup, requiredStringGroup, requiredInt64Group, booleanGroup, stringGroup, int64Group); throw; } } @@ -2049,6 +2550,46 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual Dictionary OnTestInlineAdditionalProperties(Dictionary requestBody) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (requestBody == null) + throw new ArgumentNullException(nameof(requestBody)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return requestBody; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterTestInlineAdditionalProperties(ApiResponse apiResponse, Dictionary requestBody) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorTestInlineAdditionalProperties(Exception exception, string pathFormat, string path, Dictionary requestBody) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// test inline additionalProperties /// @@ -2058,18 +2599,14 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> TestInlineAdditionalPropertiesWithHttpInfoAsync(Dictionary requestBody, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (requestBody == null) - throw new ArgumentNullException(nameof(requestBody)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + requestBody = OnTestInlineAdditionalProperties(requestBody); using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -2079,6 +2616,8 @@ namespace Org.OpenAPITools.Api ? request.Content = new StreamContent(stream) : request.Content = new StringContent(JsonSerializer.Serialize(requestBody, _jsonSerializerOptions)); + + request.RequestUri = uriBuilder.Uri; string[] contentTypes = new string[] { @@ -2088,32 +2627,25 @@ namespace Org.OpenAPITools.Api string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); request.Method = new HttpMethod("POST"); + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/inline-additionalProperties", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync().ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/inline-additionalProperties")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterTestInlineAdditionalProperties(apiResponse, requestBody); + } return apiResponse; } @@ -2121,7 +2653,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorTestInlineAdditionalProperties(e, "/fake/inline-additionalProperties", uriBuilder.Path, requestBody); throw; } } @@ -2168,6 +2700,52 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + /// + protected virtual (string, string) OnTestJsonFormData(string param, string param2) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (param == null) + throw new ArgumentNullException(nameof(param)); + + if (param2 == null) + throw new ArgumentNullException(nameof(param2)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return (param, param2); + } + + /// + /// Processes the server response + /// + /// + /// + /// + protected virtual void AfterTestJsonFormData(ApiResponse apiResponse, string param, string param2) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + /// + protected virtual void OnErrorTestJsonFormData(Exception exception, string pathFormat, string path, string param, string param2) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// test json serialization of form data /// @@ -2178,21 +2756,16 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> TestJsonFormDataWithHttpInfoAsync(string param, string param2, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (param == null) - throw new ArgumentNullException(nameof(param)); - - if (param2 == null) - throw new ArgumentNullException(nameof(param2)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + var validatedParameters = OnTestJsonFormData(param, param2); + param = validatedParameters.Item1; + param2 = validatedParameters.Item2; using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -2208,8 +2781,12 @@ namespace Org.OpenAPITools.Api formParams.Add(new KeyValuePair("param", ClientUtils.ParameterToString(param))); + + formParams.Add(new KeyValuePair("param2", ClientUtils.ParameterToString(param2))); + + request.RequestUri = uriBuilder.Uri; string[] contentTypes = new string[] { @@ -2219,32 +2796,25 @@ namespace Org.OpenAPITools.Api string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); request.Method = new HttpMethod("GET"); + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/jsonFormData", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync().ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/jsonFormData")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterTestJsonFormData(apiResponse, param, param2); + } return apiResponse; } @@ -2252,7 +2822,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorTestJsonFormData(e, "/fake/jsonFormData", uriBuilder.Path, param, param2); throw; } } @@ -2305,6 +2875,70 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + /// + /// + /// + /// + protected virtual (List, List, List, List, List) OnTestQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (pipe == null) + throw new ArgumentNullException(nameof(pipe)); + + if (ioutil == null) + throw new ArgumentNullException(nameof(ioutil)); + + if (http == null) + throw new ArgumentNullException(nameof(http)); + + if (url == null) + throw new ArgumentNullException(nameof(url)); + + if (context == null) + throw new ArgumentNullException(nameof(context)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return (pipe, ioutil, http, url, context); + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + /// + /// + protected virtual void AfterTestQueryParameterCollectionFormat(ApiResponse apiResponse, List pipe, List ioutil, List http, List url, List context) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + /// + /// + /// + /// + protected virtual void OnErrorTestQueryParameterCollectionFormat(Exception exception, string pathFormat, string path, List pipe, List ioutil, List http, List url, List context) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// To test the collection format in query parameters /// @@ -2318,30 +2952,19 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> TestQueryParameterCollectionFormatWithHttpInfoAsync(List pipe, List ioutil, List http, List url, List context, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (pipe == null) - throw new ArgumentNullException(nameof(pipe)); - - if (ioutil == null) - throw new ArgumentNullException(nameof(ioutil)); - - if (http == null) - throw new ArgumentNullException(nameof(http)); - - if (url == null) - throw new ArgumentNullException(nameof(url)); - - if (context == null) - throw new ArgumentNullException(nameof(context)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + var validatedParameters = OnTestQueryParameterCollectionFormat(pipe, ioutil, http, url, context); + pipe = validatedParameters.Item1; + ioutil = validatedParameters.Item2; + http = validatedParameters.Item3; + url = validatedParameters.Item4; + context = validatedParameters.Item5; using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -2357,32 +2980,27 @@ namespace Org.OpenAPITools.Api uriBuilder.Query = parseQueryString.ToString(); + + request.RequestUri = uriBuilder.Uri; request.Method = new HttpMethod("PUT"); + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/test-query-parameters", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync().ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/test-query-parameters")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterTestQueryParameterCollectionFormat(apiResponse, pipe, ioutil, http, url, context); + } return apiResponse; } @@ -2390,8 +3008,9 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorTestQueryParameterCollectionFormat(e, "/fake/test-query-parameters", uriBuilder.Path, pipe, ioutil, http, url, context); throw; } - } } + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs index 4b51987ecd..d7ae312c65 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs @@ -19,10 +19,11 @@ using System.Text.Json; using Org.OpenAPITools.Client; using Org.OpenAPITools.Model; -namespace Org.OpenAPITools.Api +namespace Org.OpenAPITools.IApi { /// /// Represents a collection of functions to interact with the API endpoints + /// This class is registered as transient. /// public interface IFakeClassnameTags123Api : IApi { @@ -48,21 +49,19 @@ namespace Org.OpenAPITools.Api /// client model /// Cancellation Token to cancel the request. /// Task of ApiResponse<ModelClient> - Task TestClassnameAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null); } + Task TestClassnameAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null); + } +} +namespace Org.OpenAPITools.Api +{ /// /// Represents a collection of functions to interact with the API endpoints /// - public partial class FakeClassnameTags123Api : IFakeClassnameTags123Api + public partial class FakeClassnameTags123Api : IApi.IFakeClassnameTags123Api { private JsonSerializerOptions _jsonSerializerOptions; - /// - /// An event to track the health of the server. - /// If you store these event args, be sure to purge old event args to prevent a memory leak. - /// - public event ClientUtils.EventHandler ApiResponded; - /// /// The logger /// @@ -119,6 +118,15 @@ namespace Org.OpenAPITools.Api OauthTokenProvider = oauthTokenProvider; } + /// + /// Logs the api response + /// + /// + protected virtual void OnApiResponded(ApiResponseEventArgs args) + { + Logger.LogInformation("{0,-9} | {1} | {3}", (args.ReceivedAt - args.RequestedAt).TotalSeconds, args.HttpStatus, args.Path); + } + /// /// To test class name in snake case To test class name in snake case /// @@ -159,6 +167,46 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual ModelClient OnTestClassname(ModelClient modelClient) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (modelClient == null) + throw new ArgumentNullException(nameof(modelClient)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return modelClient; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterTestClassname(ApiResponse apiResponse, ModelClient modelClient) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorTestClassname(Exception exception, string pathFormat, string path, ModelClient modelClient) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// To test class name in snake case To test class name in snake case /// @@ -168,26 +216,22 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> TestClassnameWithHttpInfoAsync(ModelClient modelClient, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (modelClient == null) - throw new ArgumentNullException(nameof(modelClient)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + modelClient = OnTestClassname(modelClient); using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/fake_classname_test"; - System.Collections.Specialized.NameValueCollection parseQueryString = System.Web.HttpUtility.ParseQueryString(string.Empty); - request.Content = (modelClient as object) is System.IO.Stream stream + + System.Collections.Specialized.NameValueCollection parseQueryString = System.Web.HttpUtility.ParseQueryString(string.Empty); request.Content = (modelClient as object) is System.IO.Stream stream ? request.Content = new StreamContent(stream) : request.Content = new StringContent(JsonSerializer.Serialize(modelClient, _jsonSerializerOptions)); @@ -210,7 +254,7 @@ namespace Org.OpenAPITools.Api string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); string[] accepts = new string[] { "application/json" @@ -220,31 +264,24 @@ namespace Org.OpenAPITools.Api if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - + request.Method = new HttpMethod("PATCH"); + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake_classname_test", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync().ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake_classname_test")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterTestClassname(apiResponse, modelClient); + } else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -255,8 +292,9 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorTestClassname(e, "/fake_classname_test", uriBuilder.Path, modelClient); throw; } - } } + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/IApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/IApi.cs new file mode 100644 index 0000000000..038f19bcfa --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/IApi.cs @@ -0,0 +1,15 @@ +using System.Net.Http; + +namespace Org.OpenAPITools.IApi +{ + /// + /// Any Api client + /// + public interface IApi + { + /// + /// The HttpClient + /// + HttpClient HttpClient { get; } + } +} \ No newline at end of file diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/PetApi.cs index c8249afbb4..b858b1d843 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/PetApi.cs @@ -19,10 +19,11 @@ using System.Text.Json; using Org.OpenAPITools.Client; using Org.OpenAPITools.Model; -namespace Org.OpenAPITools.Api +namespace Org.OpenAPITools.IApi { /// /// Represents a collection of functions to interact with the API endpoints + /// This class is registered as transient. /// public interface IPetApi : IApi { @@ -49,6 +50,7 @@ namespace Org.OpenAPITools.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task AddPetAsync(Pet pet, System.Threading.CancellationToken? cancellationToken = null); + /// /// Deletes a pet /// @@ -74,6 +76,7 @@ namespace Org.OpenAPITools.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task DeletePetAsync(long petId, string apiKey = null, System.Threading.CancellationToken? cancellationToken = null); + /// /// Finds Pets by status /// @@ -97,6 +100,7 @@ namespace Org.OpenAPITools.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse<List<Pet>> Task> FindPetsByStatusAsync(List status, System.Threading.CancellationToken? cancellationToken = null); + /// /// Finds Pets by tags /// @@ -120,6 +124,7 @@ namespace Org.OpenAPITools.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse<List<Pet>> Task> FindPetsByTagsAsync(List tags, System.Threading.CancellationToken? cancellationToken = null); + /// /// Find pet by ID /// @@ -143,6 +148,7 @@ namespace Org.OpenAPITools.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse<Pet> Task GetPetByIdAsync(long petId, System.Threading.CancellationToken? cancellationToken = null); + /// /// Update an existing pet /// @@ -166,6 +172,7 @@ namespace Org.OpenAPITools.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task UpdatePetAsync(Pet pet, System.Threading.CancellationToken? cancellationToken = null); + /// /// Updates a pet in the store with form data /// @@ -193,19 +200,6 @@ namespace Org.OpenAPITools.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task UpdatePetWithFormAsync(long petId, string name = null, string status = null, System.Threading.CancellationToken? cancellationToken = null); - /// - /// uploads an image - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// Additional data to pass to server (optional) - /// file to upload (optional) - /// Cancellation Token to cancel the request. - /// Task<ApiResponse<ApiResponse>> - Task> UploadFileWithHttpInfoAsync(long petId, string additionalMetadata = null, System.IO.Stream file = null, System.Threading.CancellationToken? cancellationToken = null); /// /// uploads an image @@ -215,24 +209,25 @@ namespace Org.OpenAPITools.Api /// /// Thrown when fails to make API call /// ID of pet to update - /// Additional data to pass to server (optional) /// file to upload (optional) - /// Cancellation Token to cancel the request. - /// Task of ApiResponse<ApiResponse> - Task UploadFileAsync(long petId, string additionalMetadata = null, System.IO.Stream file = null, System.Threading.CancellationToken? cancellationToken = null); - /// - /// uploads an image (required) - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload /// Additional data to pass to server (optional) /// Cancellation Token to cancel the request. /// Task<ApiResponse<ApiResponse>> - Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null); + Task> UploadFileWithHttpInfoAsync(long petId, System.IO.Stream file = null, string additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null); + + /// + /// uploads an image + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ID of pet to update + /// file to upload (optional) + /// Additional data to pass to server (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse<ApiResponse> + Task UploadFileAsync(long petId, System.IO.Stream file = null, string additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null); /// /// uploads an image (required) @@ -241,26 +236,38 @@ namespace Org.OpenAPITools.Api /// /// /// Thrown when fails to make API call - /// ID of pet to update /// file to upload + /// ID of pet to update + /// Additional data to pass to server (optional) + /// Cancellation Token to cancel the request. + /// Task<ApiResponse<ApiResponse>> + Task> UploadFileWithRequiredFileWithHttpInfoAsync(System.IO.Stream requiredFile, long petId, string additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null); + + /// + /// uploads an image (required) + /// + /// + /// + /// + /// Thrown when fails to make API call + /// file to upload + /// ID of pet to update /// Additional data to pass to server (optional) /// Cancellation Token to cancel the request. /// Task of ApiResponse<ApiResponse> - Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null); } + Task UploadFileWithRequiredFileAsync(System.IO.Stream requiredFile, long petId, string additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null); + } +} +namespace Org.OpenAPITools.Api +{ /// /// Represents a collection of functions to interact with the API endpoints /// - public partial class PetApi : IPetApi + public partial class PetApi : IApi.IPetApi { private JsonSerializerOptions _jsonSerializerOptions; - /// - /// An event to track the health of the server. - /// If you store these event args, be sure to purge old event args to prevent a memory leak. - /// - public event ClientUtils.EventHandler ApiResponded; - /// /// The logger /// @@ -317,6 +324,15 @@ namespace Org.OpenAPITools.Api OauthTokenProvider = oauthTokenProvider; } + /// + /// Logs the api response + /// + /// + protected virtual void OnApiResponded(ApiResponseEventArgs args) + { + Logger.LogInformation("{0,-9} | {1} | {3}", (args.ReceivedAt - args.RequestedAt).TotalSeconds, args.HttpStatus, args.Path); + } + /// /// Add a new pet to the store /// @@ -357,6 +373,46 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual Pet OnAddPet(Pet pet) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (pet == null) + throw new ArgumentNullException(nameof(pet)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return pet; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterAddPet(ApiResponse apiResponse, Pet pet) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorAddPet(Exception exception, string pathFormat, string path, Pet pet) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Add a new pet to the store /// @@ -366,22 +422,18 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> AddPetWithHttpInfoAsync(Pet pet, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (pet == null) - throw new ArgumentNullException(nameof(pet)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + pet = OnAddPet(pet); using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); - uriBuilder.Host = HttpClient.BaseAddress.Host; - uriBuilder.Port = HttpClient.BaseAddress.Port; - uriBuilder.Scheme = ClientUtils.SCHEME; - uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/pet"; + var url = request.RequestUri = new Uri("http://petstore.swagger.io/v2"); + uriBuilder.Host = url.Authority; + uriBuilder.Scheme = url.Scheme; + uriBuilder.Path = url.AbsolutePath; request.Content = (pet as object) is System.IO.Stream stream ? request.Content = new StreamContent(stream) @@ -389,6 +441,8 @@ namespace Org.OpenAPITools.Api List tokens = new List(); + + request.RequestUri = uriBuilder.Uri; HttpSignatureToken signatureToken = (HttpSignatureToken) await HttpSignatureTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); @@ -413,32 +467,25 @@ namespace Org.OpenAPITools.Api string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); request.Method = new HttpMethod("POST"); + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/pet", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync().ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/pet")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterAddPet(apiResponse, pet); + } else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -452,7 +499,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorAddPet(e, "/pet", uriBuilder.Path, pet); throw; } } @@ -499,6 +546,49 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + /// + protected virtual (long, string) OnDeletePet(long petId, string apiKey) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (petId == null) + throw new ArgumentNullException(nameof(petId)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return (petId, apiKey); + } + + /// + /// Processes the server response + /// + /// + /// + /// + protected virtual void AfterDeletePet(ApiResponse apiResponse, long petId, string apiKey) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + /// + protected virtual void OnErrorDeletePet(Exception exception, string pathFormat, string path, long petId, string apiKey) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Deletes a pet /// @@ -509,26 +599,28 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> DeletePetWithHttpInfoAsync(long petId, string apiKey = null, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + var validatedParameters = OnDeletePet(petId, apiKey); + petId = validatedParameters.Item1; + apiKey = validatedParameters.Item2; using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/pet/{petId}"; - uriBuilder.Path = uriBuilder.Path.Replace("%7BpetId%7D", Uri.EscapeDataString(petId.ToString())); - if (apiKey != null) + uriBuilder.Path = uriBuilder.Path.Replace("%7BpetId%7D", Uri.EscapeDataString(petId.ToString())); if (apiKey != null) request.Headers.Add("api_key", ClientUtils.ParameterToString(apiKey)); List tokens = new List(); + + request.RequestUri = uriBuilder.Uri; OAuthToken oauthToken = (OAuthToken) await OauthTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); @@ -539,28 +631,21 @@ namespace Org.OpenAPITools.Api request.Method = new HttpMethod("DELETE"); + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/pet/{petId}", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync().ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/pet/{petId}")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterDeletePet(apiResponse, petId, apiKey); + } else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -571,7 +656,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorDeletePet(e, "/pet/{petId}", uriBuilder.Path, petId, apiKey); throw; } } @@ -616,6 +701,46 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual List OnFindPetsByStatus(List status) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (status == null) + throw new ArgumentNullException(nameof(status)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return status; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterFindPetsByStatus(ApiResponse> apiResponse, List status) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorFindPetsByStatus(Exception exception, string pathFormat, string path, List status) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Finds Pets by status Multiple status values can be provided with comma separated strings /// @@ -625,18 +750,14 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task>> FindPetsByStatusWithHttpInfoAsync(List status, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (status == null) - throw new ArgumentNullException(nameof(status)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + status = OnFindPetsByStatus(status); using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -650,6 +771,8 @@ namespace Org.OpenAPITools.Api List tokens = new List(); + + request.RequestUri = uriBuilder.Uri; HttpSignatureToken signatureToken = (HttpSignatureToken) await HttpSignatureTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); @@ -675,31 +798,24 @@ namespace Org.OpenAPITools.Api if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - + request.Method = new HttpMethod("GET"); + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/pet/findByStatus", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync().ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/pet/findByStatus")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse> apiResponse = new ApiResponse>(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize>(apiResponse.RawContent, _jsonSerializerOptions); + AfterFindPetsByStatus(apiResponse, status); + } else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -713,7 +829,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorFindPetsByStatus(e, "/pet/findByStatus", uriBuilder.Path, status); throw; } } @@ -758,6 +874,46 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual List OnFindPetsByTags(List tags) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (tags == null) + throw new ArgumentNullException(nameof(tags)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return tags; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterFindPetsByTags(ApiResponse> apiResponse, List tags) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorFindPetsByTags(Exception exception, string pathFormat, string path, List tags) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. /// @@ -767,18 +923,14 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task>> FindPetsByTagsWithHttpInfoAsync(List tags, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (tags == null) - throw new ArgumentNullException(nameof(tags)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + tags = OnFindPetsByTags(tags); using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -792,6 +944,8 @@ namespace Org.OpenAPITools.Api List tokens = new List(); + + request.RequestUri = uriBuilder.Uri; HttpSignatureToken signatureToken = (HttpSignatureToken) await HttpSignatureTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); @@ -817,31 +971,24 @@ namespace Org.OpenAPITools.Api if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - + request.Method = new HttpMethod("GET"); + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/pet/findByTags", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync().ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/pet/findByTags")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse> apiResponse = new ApiResponse>(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize>(apiResponse.RawContent, _jsonSerializerOptions); + AfterFindPetsByTags(apiResponse, tags); + } else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -855,7 +1002,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorFindPetsByTags(e, "/pet/findByTags", uriBuilder.Path, tags); throw; } } @@ -900,6 +1047,46 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual long OnGetPetById(long petId) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (petId == null) + throw new ArgumentNullException(nameof(petId)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return petId; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterGetPetById(ApiResponse apiResponse, long petId) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorGetPetById(Exception exception, string pathFormat, string path, long petId) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Find pet by ID Returns a single pet /// @@ -909,22 +1096,20 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> GetPetByIdWithHttpInfoAsync(long petId, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + petId = OnGetPetById(petId); using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/pet/{petId}"; - uriBuilder.Path = uriBuilder.Path.Replace("%7BpetId%7D", Uri.EscapeDataString(petId.ToString())); - List tokens = new List(); + uriBuilder.Path = uriBuilder.Path.Replace("%7BpetId%7D", Uri.EscapeDataString(petId.ToString())); List tokens = new List(); ApiKeyToken apiKey = (ApiKeyToken) await ApiKeyProvider.GetAsync(cancellationToken).ConfigureAwait(false); @@ -943,31 +1128,24 @@ namespace Org.OpenAPITools.Api if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - + request.Method = new HttpMethod("GET"); + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/pet/{petId}", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync().ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/pet/{petId}")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterGetPetById(apiResponse, petId); + } else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -978,7 +1156,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorGetPetById(e, "/pet/{petId}", uriBuilder.Path, petId); throw; } } @@ -1023,6 +1201,46 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual Pet OnUpdatePet(Pet pet) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (pet == null) + throw new ArgumentNullException(nameof(pet)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return pet; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterUpdatePet(ApiResponse apiResponse, Pet pet) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorUpdatePet(Exception exception, string pathFormat, string path, Pet pet) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Update an existing pet /// @@ -1032,22 +1250,18 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> UpdatePetWithHttpInfoAsync(Pet pet, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (pet == null) - throw new ArgumentNullException(nameof(pet)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + pet = OnUpdatePet(pet); using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); - uriBuilder.Host = HttpClient.BaseAddress.Host; - uriBuilder.Port = HttpClient.BaseAddress.Port; - uriBuilder.Scheme = ClientUtils.SCHEME; - uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/pet"; + var url = request.RequestUri = new Uri("http://petstore.swagger.io/v2"); + uriBuilder.Host = url.Authority; + uriBuilder.Scheme = url.Scheme; + uriBuilder.Path = url.AbsolutePath; request.Content = (pet as object) is System.IO.Stream stream ? request.Content = new StreamContent(stream) @@ -1055,6 +1269,8 @@ namespace Org.OpenAPITools.Api List tokens = new List(); + + request.RequestUri = uriBuilder.Uri; HttpSignatureToken signatureToken = (HttpSignatureToken) await HttpSignatureTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); @@ -1079,32 +1295,25 @@ namespace Org.OpenAPITools.Api string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); request.Method = new HttpMethod("PUT"); + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/pet", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync().ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/pet")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterUpdatePet(apiResponse, pet); + } else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -1118,7 +1327,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorUpdatePet(e, "/pet", uriBuilder.Path, pet); throw; } } @@ -1167,6 +1376,52 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + /// + /// + protected virtual (long, string, string) OnUpdatePetWithForm(long petId, string name, string status) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (petId == null) + throw new ArgumentNullException(nameof(petId)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return (petId, name, status); + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void AfterUpdatePetWithForm(ApiResponse apiResponse, long petId, string name, string status) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + /// + /// + protected virtual void OnErrorUpdatePetWithForm(Exception exception, string pathFormat, string path, long petId, string name, string status) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Updates a pet in the store with form data /// @@ -1178,30 +1433,29 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> UpdatePetWithFormWithHttpInfoAsync(long petId, string name = null, string status = null, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + var validatedParameters = OnUpdatePetWithForm(petId, name, status); + petId = validatedParameters.Item1; + name = validatedParameters.Item2; + status = validatedParameters.Item3; using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/pet/{petId}"; - uriBuilder.Path = uriBuilder.Path.Replace("%7BpetId%7D", Uri.EscapeDataString(petId.ToString())); - MultipartContent multipartContent = new MultipartContent(); + uriBuilder.Path = uriBuilder.Path.Replace("%7BpetId%7D", Uri.EscapeDataString(petId.ToString())); MultipartContent multipartContent = new MultipartContent(); request.Content = multipartContent; List> formParams = new List>(); - multipartContent.Add(new FormUrlEncodedContent(formParams)); - - if (name != null) + multipartContent.Add(new FormUrlEncodedContent(formParams)); if (name != null) formParams.Add(new KeyValuePair("name", ClientUtils.ParameterToString(name))); if (status != null) @@ -1209,6 +1463,8 @@ namespace Org.OpenAPITools.Api List tokens = new List(); + + request.RequestUri = uriBuilder.Uri; OAuthToken oauthToken = (OAuthToken) await OauthTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); @@ -1224,32 +1480,25 @@ namespace Org.OpenAPITools.Api string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); request.Method = new HttpMethod("POST"); + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/pet/{petId}", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync().ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/pet/{petId}")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterUpdatePetWithForm(apiResponse, petId, name, status); + } else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -1260,7 +1509,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorUpdatePetWithForm(e, "/pet/{petId}", uriBuilder.Path, petId, name, status); throw; } } @@ -1270,13 +1519,13 @@ namespace Org.OpenAPITools.Api /// /// Thrown when fails to make API call /// ID of pet to update - /// Additional data to pass to server (optional) /// file to upload (optional) + /// Additional data to pass to server (optional) /// Cancellation Token to cancel the request. /// <> - public async Task UploadFileAsync(long petId, string additionalMetadata = null, System.IO.Stream file = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task UploadFileAsync(long petId, System.IO.Stream file = null, string additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null) { - ApiResponse result = await UploadFileWithHttpInfoAsync(petId, additionalMetadata, file, cancellationToken).ConfigureAwait(false); + ApiResponse result = await UploadFileWithHttpInfoAsync(petId, file, additionalMetadata, cancellationToken).ConfigureAwait(false); if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); @@ -1289,16 +1538,16 @@ namespace Org.OpenAPITools.Api /// /// Thrown when fails to make API call /// ID of pet to update - /// Additional data to pass to server (optional) /// file to upload (optional) + /// Additional data to pass to server (optional) /// Cancellation Token to cancel the request. /// <> - public async Task UploadFileOrDefaultAsync(long petId, string additionalMetadata = null, System.IO.Stream file = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task UploadFileOrDefaultAsync(long petId, System.IO.Stream file = null, string additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = null; try { - result = await UploadFileWithHttpInfoAsync(petId, additionalMetadata, file, cancellationToken).ConfigureAwait(false); + result = await UploadFileWithHttpInfoAsync(petId, file, additionalMetadata, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -1309,48 +1558,95 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + /// + /// + protected virtual (long, System.IO.Stream, string) OnUploadFile(long petId, System.IO.Stream file, string additionalMetadata) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (petId == null) + throw new ArgumentNullException(nameof(petId)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return (petId, file, additionalMetadata); + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void AfterUploadFile(ApiResponse apiResponse, long petId, System.IO.Stream file, string additionalMetadata) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + /// + /// + protected virtual void OnErrorUploadFile(Exception exception, string pathFormat, string path, long petId, System.IO.Stream file, string additionalMetadata) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// uploads an image /// /// Thrown when fails to make API call /// ID of pet to update - /// Additional data to pass to server (optional) /// file to upload (optional) + /// Additional data to pass to server (optional) /// Cancellation Token to cancel the request. /// <> where T : - public async Task> UploadFileWithHttpInfoAsync(long petId, string additionalMetadata = null, System.IO.Stream file = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task> UploadFileWithHttpInfoAsync(long petId, System.IO.Stream file = null, string additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + var validatedParameters = OnUploadFile(petId, file, additionalMetadata); + petId = validatedParameters.Item1; + file = validatedParameters.Item2; + additionalMetadata = validatedParameters.Item3; using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/pet/{petId}/uploadImage"; - uriBuilder.Path = uriBuilder.Path.Replace("%7BpetId%7D", Uri.EscapeDataString(petId.ToString())); - MultipartContent multipartContent = new MultipartContent(); + uriBuilder.Path = uriBuilder.Path.Replace("%7BpetId%7D", Uri.EscapeDataString(petId.ToString())); MultipartContent multipartContent = new MultipartContent(); request.Content = multipartContent; List> formParams = new List>(); - multipartContent.Add(new FormUrlEncodedContent(formParams)); + multipartContent.Add(new FormUrlEncodedContent(formParams)); if (file != null) + multipartContent.Add(new StreamContent(file)); if (additionalMetadata != null) formParams.Add(new KeyValuePair("additionalMetadata", ClientUtils.ParameterToString(additionalMetadata))); - if (file != null) - multipartContent.Add(new StreamContent(file)); - List tokens = new List(); + + request.RequestUri = uriBuilder.Uri; OAuthToken oauthToken = (OAuthToken) await OauthTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); @@ -1366,7 +1662,7 @@ namespace Org.OpenAPITools.Api string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); string[] accepts = new string[] { "application/json" @@ -1376,31 +1672,24 @@ namespace Org.OpenAPITools.Api if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - + request.Method = new HttpMethod("POST"); + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/pet/{petId}/uploadImage", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync().ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/pet/{petId}/uploadImage")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterUploadFile(apiResponse, petId, file, additionalMetadata); + } else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -1411,7 +1700,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorUploadFile(e, "/pet/{petId}/uploadImage", uriBuilder.Path, petId, file, additionalMetadata); throw; } } @@ -1420,14 +1709,14 @@ namespace Org.OpenAPITools.Api /// uploads an image (required) /// /// Thrown when fails to make API call - /// ID of pet to update /// file to upload + /// ID of pet to update /// Additional data to pass to server (optional) /// Cancellation Token to cancel the request. /// <> - public async Task UploadFileWithRequiredFileAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task UploadFileWithRequiredFileAsync(System.IO.Stream requiredFile, long petId, string additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null) { - ApiResponse result = await UploadFileWithRequiredFileWithHttpInfoAsync(petId, requiredFile, additionalMetadata, cancellationToken).ConfigureAwait(false); + ApiResponse result = await UploadFileWithRequiredFileWithHttpInfoAsync(requiredFile, petId, additionalMetadata, cancellationToken).ConfigureAwait(false); if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); @@ -1439,17 +1728,17 @@ namespace Org.OpenAPITools.Api /// uploads an image (required) /// /// Thrown when fails to make API call - /// ID of pet to update /// file to upload + /// ID of pet to update /// Additional data to pass to server (optional) /// Cancellation Token to cancel the request. /// <> - public async Task UploadFileWithRequiredFileOrDefaultAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task UploadFileWithRequiredFileOrDefaultAsync(System.IO.Stream requiredFile, long petId, string additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = null; try { - result = await UploadFileWithRequiredFileWithHttpInfoAsync(petId, requiredFile, additionalMetadata, cancellationToken).ConfigureAwait(false); + result = await UploadFileWithRequiredFileWithHttpInfoAsync(requiredFile, petId, additionalMetadata, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -1460,50 +1749,97 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + /// + /// + protected virtual (System.IO.Stream, long, string) OnUploadFileWithRequiredFile(System.IO.Stream requiredFile, long petId, string additionalMetadata) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (requiredFile == null) + throw new ArgumentNullException(nameof(requiredFile)); + + if (petId == null) + throw new ArgumentNullException(nameof(petId)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return (requiredFile, petId, additionalMetadata); + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void AfterUploadFileWithRequiredFile(ApiResponse apiResponse, System.IO.Stream requiredFile, long petId, string additionalMetadata) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + /// + /// + protected virtual void OnErrorUploadFileWithRequiredFile(Exception exception, string pathFormat, string path, System.IO.Stream requiredFile, long petId, string additionalMetadata) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// uploads an image (required) /// /// Thrown when fails to make API call - /// ID of pet to update /// file to upload + /// ID of pet to update /// Additional data to pass to server (optional) /// Cancellation Token to cancel the request. /// <> where T : - public async Task> UploadFileWithRequiredFileWithHttpInfoAsync(long petId, System.IO.Stream requiredFile, string additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null) + public async Task> UploadFileWithRequiredFileWithHttpInfoAsync(System.IO.Stream requiredFile, long petId, string additionalMetadata = null, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (requiredFile == null) - throw new ArgumentNullException(nameof(requiredFile)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + var validatedParameters = OnUploadFileWithRequiredFile(requiredFile, petId, additionalMetadata); + requiredFile = validatedParameters.Item1; + petId = validatedParameters.Item2; + additionalMetadata = validatedParameters.Item3; using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/fake/{petId}/uploadImageWithRequiredFile"; - uriBuilder.Path = uriBuilder.Path.Replace("%7BpetId%7D", Uri.EscapeDataString(petId.ToString())); - MultipartContent multipartContent = new MultipartContent(); + uriBuilder.Path = uriBuilder.Path.Replace("%7BpetId%7D", Uri.EscapeDataString(petId.ToString())); MultipartContent multipartContent = new MultipartContent(); request.Content = multipartContent; List> formParams = new List>(); - multipartContent.Add(new FormUrlEncodedContent(formParams)); - - multipartContent.Add(new StreamContent(requiredFile)); + multipartContent.Add(new FormUrlEncodedContent(formParams)); multipartContent.Add(new StreamContent(requiredFile)); if (additionalMetadata != null) formParams.Add(new KeyValuePair("additionalMetadata", ClientUtils.ParameterToString(additionalMetadata))); List tokens = new List(); + + request.RequestUri = uriBuilder.Uri; OAuthToken oauthToken = (OAuthToken) await OauthTokenProvider.GetAsync(cancellationToken).ConfigureAwait(false); @@ -1519,7 +1855,7 @@ namespace Org.OpenAPITools.Api string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); string[] accepts = new string[] { "application/json", @@ -1530,31 +1866,24 @@ namespace Org.OpenAPITools.Api if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - + request.Method = new HttpMethod("POST"); + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/{petId}/uploadImageWithRequiredFile", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync().ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/fake/{petId}/uploadImageWithRequiredFile")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterUploadFileWithRequiredFile(apiResponse, requiredFile, petId, additionalMetadata); + } else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -1565,8 +1894,9 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorUploadFileWithRequiredFile(e, "/fake/{petId}/uploadImageWithRequiredFile", uriBuilder.Path, requiredFile, petId, additionalMetadata); throw; } - } } + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/StoreApi.cs index a0be4ccdaf..07af6e52b7 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/StoreApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/StoreApi.cs @@ -19,10 +19,11 @@ using System.Text.Json; using Org.OpenAPITools.Client; using Org.OpenAPITools.Model; -namespace Org.OpenAPITools.Api +namespace Org.OpenAPITools.IApi { /// /// Represents a collection of functions to interact with the API endpoints + /// This class is registered as transient. /// public interface IStoreApi : IApi { @@ -49,6 +50,7 @@ namespace Org.OpenAPITools.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task DeleteOrderAsync(string orderId, System.Threading.CancellationToken? cancellationToken = null); + /// /// Returns pet inventories by status /// @@ -70,6 +72,7 @@ namespace Org.OpenAPITools.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse<Dictionary<string, int>> Task> GetInventoryAsync(System.Threading.CancellationToken? cancellationToken = null); + /// /// Find purchase order by ID /// @@ -93,6 +96,7 @@ namespace Org.OpenAPITools.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse<Order> Task GetOrderByIdAsync(long orderId, System.Threading.CancellationToken? cancellationToken = null); + /// /// Place an order for a pet /// @@ -115,21 +119,19 @@ namespace Org.OpenAPITools.Api /// order placed for purchasing the pet /// Cancellation Token to cancel the request. /// Task of ApiResponse<Order> - Task PlaceOrderAsync(Order order, System.Threading.CancellationToken? cancellationToken = null); } + Task PlaceOrderAsync(Order order, System.Threading.CancellationToken? cancellationToken = null); + } +} +namespace Org.OpenAPITools.Api +{ /// /// Represents a collection of functions to interact with the API endpoints /// - public partial class StoreApi : IStoreApi + public partial class StoreApi : IApi.IStoreApi { private JsonSerializerOptions _jsonSerializerOptions; - /// - /// An event to track the health of the server. - /// If you store these event args, be sure to purge old event args to prevent a memory leak. - /// - public event ClientUtils.EventHandler ApiResponded; - /// /// The logger /// @@ -186,6 +188,15 @@ namespace Org.OpenAPITools.Api OauthTokenProvider = oauthTokenProvider; } + /// + /// Logs the api response + /// + /// + protected virtual void OnApiResponded(ApiResponseEventArgs args) + { + Logger.LogInformation("{0,-9} | {1} | {3}", (args.ReceivedAt - args.RequestedAt).TotalSeconds, args.HttpStatus, args.Path); + } + /// /// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors /// @@ -226,6 +237,46 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual string OnDeleteOrder(string orderId) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (orderId == null) + throw new ArgumentNullException(nameof(orderId)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return orderId; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterDeleteOrder(ApiResponse apiResponse, string orderId) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorDeleteOrder(Exception exception, string pathFormat, string path, string orderId) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors /// @@ -235,50 +286,40 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> DeleteOrderWithHttpInfoAsync(string orderId, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (orderId == null) - throw new ArgumentNullException(nameof(orderId)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + orderId = OnDeleteOrder(orderId); using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/store/order/{order_id}"; + uriBuilder.Path = uriBuilder.Path.Replace("%7Border_id%7D", Uri.EscapeDataString(orderId.ToString())); request.RequestUri = uriBuilder.Uri; request.Method = new HttpMethod("DELETE"); + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/store/order/{order_id}", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync().ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/store/order/{order_id}")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterDeleteOrder(apiResponse, orderId); + } return apiResponse; } @@ -286,7 +327,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorDeleteOrder(e, "/store/order/{order_id}", uriBuilder.Path, orderId); throw; } } @@ -309,6 +350,34 @@ namespace Org.OpenAPITools.Api return result.Content; } + /// + /// Validates the request parameters + /// + /// + protected virtual void OnGetInventory() + { + return; + } + + /// + /// Processes the server response + /// + /// + protected virtual void AfterGetInventory(ApiResponse> apiResponse) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + protected virtual void OnErrorGetInventory(Exception exception, string pathFormat, string path) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Returns pet inventories by status Returns a map of status codes to quantities /// @@ -317,11 +386,14 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task>> GetInventoryWithHttpInfoAsync(System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { + OnGetInventory(); + using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -345,31 +417,24 @@ namespace Org.OpenAPITools.Api if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - + request.Method = new HttpMethod("GET"); + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/store/inventory", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync().ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/store/inventory")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse> apiResponse = new ApiResponse>(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize>(apiResponse.RawContent, _jsonSerializerOptions); + AfterGetInventory(apiResponse); + } else if (apiResponse.StatusCode == (HttpStatusCode) 429) foreach(TokenBase token in tokens) token.BeginRateLimit(); @@ -380,7 +445,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorGetInventory(e, "/store/inventory", uriBuilder.Path); throw; } } @@ -425,6 +490,46 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual long OnGetOrderById(long orderId) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (orderId == null) + throw new ArgumentNullException(nameof(orderId)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return orderId; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterGetOrderById(ApiResponse apiResponse, long orderId) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorGetOrderById(Exception exception, string pathFormat, string path, long orderId) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions /// @@ -434,19 +539,19 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> GetOrderByIdWithHttpInfoAsync(long orderId, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + orderId = OnGetOrderById(orderId); using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/store/order/{order_id}"; + uriBuilder.Path = uriBuilder.Path.Replace("%7Border_id%7D", Uri.EscapeDataString(orderId.ToString())); request.RequestUri = uriBuilder.Uri; @@ -460,31 +565,24 @@ namespace Org.OpenAPITools.Api if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - + request.Method = new HttpMethod("GET"); + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/store/order/{order_id}", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync().ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/store/order/{order_id}")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterGetOrderById(apiResponse, orderId); + } return apiResponse; } @@ -492,7 +590,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorGetOrderById(e, "/store/order/{order_id}", uriBuilder.Path, orderId); throw; } } @@ -537,6 +635,46 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual Order OnPlaceOrder(Order order) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (order == null) + throw new ArgumentNullException(nameof(order)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return order; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterPlaceOrder(ApiResponse apiResponse, Order order) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorPlaceOrder(Exception exception, string pathFormat, string path, Order order) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Place an order for a pet /// @@ -546,18 +684,14 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> PlaceOrderWithHttpInfoAsync(Order order, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (order == null) - throw new ArgumentNullException(nameof(order)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + order = OnPlaceOrder(order); using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -567,6 +701,8 @@ namespace Org.OpenAPITools.Api ? request.Content = new StreamContent(stream) : request.Content = new StringContent(JsonSerializer.Serialize(order, _jsonSerializerOptions)); + + request.RequestUri = uriBuilder.Uri; string[] contentTypes = new string[] { @@ -576,7 +712,7 @@ namespace Org.OpenAPITools.Api string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); string[] accepts = new string[] { "application/xml", @@ -587,31 +723,24 @@ namespace Org.OpenAPITools.Api if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - + request.Method = new HttpMethod("POST"); + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/store/order", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync().ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/store/order")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterPlaceOrder(apiResponse, order); + } return apiResponse; } @@ -619,8 +748,9 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorPlaceOrder(e, "/store/order", uriBuilder.Path, order); throw; } - } } + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/UserApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/UserApi.cs index 554608a79a..88d04ddaf5 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/UserApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/UserApi.cs @@ -19,10 +19,11 @@ using System.Text.Json; using Org.OpenAPITools.Client; using Org.OpenAPITools.Model; -namespace Org.OpenAPITools.Api +namespace Org.OpenAPITools.IApi { /// /// Represents a collection of functions to interact with the API endpoints + /// This class is registered as transient. /// public interface IUserApi : IApi { @@ -49,6 +50,7 @@ namespace Org.OpenAPITools.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task CreateUserAsync(User user, System.Threading.CancellationToken? cancellationToken = null); + /// /// Creates list of users with given input array /// @@ -72,6 +74,7 @@ namespace Org.OpenAPITools.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task CreateUsersWithArrayInputAsync(List user, System.Threading.CancellationToken? cancellationToken = null); + /// /// Creates list of users with given input array /// @@ -95,6 +98,7 @@ namespace Org.OpenAPITools.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task CreateUsersWithListInputAsync(List user, System.Threading.CancellationToken? cancellationToken = null); + /// /// Delete user /// @@ -118,6 +122,7 @@ namespace Org.OpenAPITools.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task DeleteUserAsync(string username, System.Threading.CancellationToken? cancellationToken = null); + /// /// Get user by user name /// @@ -141,6 +146,7 @@ namespace Org.OpenAPITools.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse<User> Task GetUserByNameAsync(string username, System.Threading.CancellationToken? cancellationToken = null); + /// /// Logs user into the system /// @@ -166,6 +172,7 @@ namespace Org.OpenAPITools.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse<string> Task LoginUserAsync(string username, string password, System.Threading.CancellationToken? cancellationToken = null); + /// /// Logs out current logged in user session /// @@ -187,6 +194,7 @@ namespace Org.OpenAPITools.Api /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> Task LogoutUserAsync(System.Threading.CancellationToken? cancellationToken = null); + /// /// Updated user /// @@ -194,11 +202,11 @@ namespace Org.OpenAPITools.Api /// This can only be done by the logged in user. /// /// Thrown when fails to make API call - /// name that need to be deleted /// Updated user object + /// name that need to be deleted /// Cancellation Token to cancel the request. /// Task<ApiResponse<object>> - Task> UpdateUserWithHttpInfoAsync(string username, User user, System.Threading.CancellationToken? cancellationToken = null); + Task> UpdateUserWithHttpInfoAsync(User user, string username, System.Threading.CancellationToken? cancellationToken = null); /// /// Updated user @@ -207,25 +215,23 @@ namespace Org.OpenAPITools.Api /// This can only be done by the logged in user. /// /// Thrown when fails to make API call - /// name that need to be deleted /// Updated user object + /// name that need to be deleted /// Cancellation Token to cancel the request. /// Task of ApiResponse<object> - Task UpdateUserAsync(string username, User user, System.Threading.CancellationToken? cancellationToken = null); } + Task UpdateUserAsync(User user, string username, System.Threading.CancellationToken? cancellationToken = null); + } +} +namespace Org.OpenAPITools.Api +{ /// /// Represents a collection of functions to interact with the API endpoints /// - public partial class UserApi : IUserApi + public partial class UserApi : IApi.IUserApi { private JsonSerializerOptions _jsonSerializerOptions; - /// - /// An event to track the health of the server. - /// If you store these event args, be sure to purge old event args to prevent a memory leak. - /// - public event ClientUtils.EventHandler ApiResponded; - /// /// The logger /// @@ -282,6 +288,15 @@ namespace Org.OpenAPITools.Api OauthTokenProvider = oauthTokenProvider; } + /// + /// Logs the api response + /// + /// + protected virtual void OnApiResponded(ApiResponseEventArgs args) + { + Logger.LogInformation("{0,-9} | {1} | {3}", (args.ReceivedAt - args.RequestedAt).TotalSeconds, args.HttpStatus, args.Path); + } + /// /// Create user This can only be done by the logged in user. /// @@ -322,6 +337,46 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual User OnCreateUser(User user) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (user == null) + throw new ArgumentNullException(nameof(user)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return user; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterCreateUser(ApiResponse apiResponse, User user) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorCreateUser(Exception exception, string pathFormat, string path, User user) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Create user This can only be done by the logged in user. /// @@ -331,18 +386,14 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> CreateUserWithHttpInfoAsync(User user, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (user == null) - throw new ArgumentNullException(nameof(user)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + user = OnCreateUser(user); using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -352,6 +403,8 @@ namespace Org.OpenAPITools.Api ? request.Content = new StreamContent(stream) : request.Content = new StringContent(JsonSerializer.Serialize(user, _jsonSerializerOptions)); + + request.RequestUri = uriBuilder.Uri; string[] contentTypes = new string[] { @@ -361,32 +414,25 @@ namespace Org.OpenAPITools.Api string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); request.Method = new HttpMethod("POST"); + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/user", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync().ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/user")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterCreateUser(apiResponse, user); + } return apiResponse; } @@ -394,7 +440,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorCreateUser(e, "/user", uriBuilder.Path, user); throw; } } @@ -439,6 +485,46 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual List OnCreateUsersWithArrayInput(List user) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (user == null) + throw new ArgumentNullException(nameof(user)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return user; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterCreateUsersWithArrayInput(ApiResponse apiResponse, List user) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorCreateUsersWithArrayInput(Exception exception, string pathFormat, string path, List user) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Creates list of users with given input array /// @@ -448,18 +534,14 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> CreateUsersWithArrayInputWithHttpInfoAsync(List user, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (user == null) - throw new ArgumentNullException(nameof(user)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + user = OnCreateUsersWithArrayInput(user); using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -469,6 +551,8 @@ namespace Org.OpenAPITools.Api ? request.Content = new StreamContent(stream) : request.Content = new StringContent(JsonSerializer.Serialize(user, _jsonSerializerOptions)); + + request.RequestUri = uriBuilder.Uri; string[] contentTypes = new string[] { @@ -478,32 +562,25 @@ namespace Org.OpenAPITools.Api string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); request.Method = new HttpMethod("POST"); + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/user/createWithArray", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync().ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/user/createWithArray")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterCreateUsersWithArrayInput(apiResponse, user); + } return apiResponse; } @@ -511,7 +588,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorCreateUsersWithArrayInput(e, "/user/createWithArray", uriBuilder.Path, user); throw; } } @@ -556,6 +633,46 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual List OnCreateUsersWithListInput(List user) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (user == null) + throw new ArgumentNullException(nameof(user)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return user; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterCreateUsersWithListInput(ApiResponse apiResponse, List user) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorCreateUsersWithListInput(Exception exception, string pathFormat, string path, List user) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Creates list of users with given input array /// @@ -565,18 +682,14 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> CreateUsersWithListInputWithHttpInfoAsync(List user, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (user == null) - throw new ArgumentNullException(nameof(user)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + user = OnCreateUsersWithListInput(user); using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -586,6 +699,8 @@ namespace Org.OpenAPITools.Api ? request.Content = new StreamContent(stream) : request.Content = new StringContent(JsonSerializer.Serialize(user, _jsonSerializerOptions)); + + request.RequestUri = uriBuilder.Uri; string[] contentTypes = new string[] { @@ -595,32 +710,25 @@ namespace Org.OpenAPITools.Api string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); request.Method = new HttpMethod("POST"); + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/user/createWithList", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync().ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/user/createWithList")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterCreateUsersWithListInput(apiResponse, user); + } return apiResponse; } @@ -628,7 +736,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorCreateUsersWithListInput(e, "/user/createWithList", uriBuilder.Path, user); throw; } } @@ -673,6 +781,46 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual string OnDeleteUser(string username) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (username == null) + throw new ArgumentNullException(nameof(username)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return username; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterDeleteUser(ApiResponse apiResponse, string username) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorDeleteUser(Exception exception, string pathFormat, string path, string username) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Delete user This can only be done by the logged in user. /// @@ -682,50 +830,40 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> DeleteUserWithHttpInfoAsync(string username, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (username == null) - throw new ArgumentNullException(nameof(username)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + username = OnDeleteUser(username); using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/user/{username}"; + uriBuilder.Path = uriBuilder.Path.Replace("%7Busername%7D", Uri.EscapeDataString(username.ToString())); request.RequestUri = uriBuilder.Uri; request.Method = new HttpMethod("DELETE"); + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/user/{username}", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync().ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/user/{username}")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterDeleteUser(apiResponse, username); + } return apiResponse; } @@ -733,7 +871,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorDeleteUser(e, "/user/{username}", uriBuilder.Path, username); throw; } } @@ -778,6 +916,46 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + protected virtual string OnGetUserByName(string username) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (username == null) + throw new ArgumentNullException(nameof(username)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return username; + } + + /// + /// Processes the server response + /// + /// + /// + protected virtual void AfterGetUserByName(ApiResponse apiResponse, string username) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + protected virtual void OnErrorGetUserByName(Exception exception, string pathFormat, string path, string username) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Get user by user name /// @@ -787,22 +965,19 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> GetUserByNameWithHttpInfoAsync(string username, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (username == null) - throw new ArgumentNullException(nameof(username)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + username = OnGetUserByName(username); using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/user/{username}"; + uriBuilder.Path = uriBuilder.Path.Replace("%7Busername%7D", Uri.EscapeDataString(username.ToString())); request.RequestUri = uriBuilder.Uri; @@ -816,31 +991,24 @@ namespace Org.OpenAPITools.Api if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - + request.Method = new HttpMethod("GET"); + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/user/{username}", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync().ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/user/{username}")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterGetUserByName(apiResponse, username); + } return apiResponse; } @@ -848,7 +1016,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorGetUserByName(e, "/user/{username}", uriBuilder.Path, username); throw; } } @@ -873,6 +1041,52 @@ namespace Org.OpenAPITools.Api return result.Content; } + /// + /// Validates the request parameters + /// + /// + /// + /// + protected virtual (string, string) OnLoginUser(string username, string password) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (username == null) + throw new ArgumentNullException(nameof(username)); + + if (password == null) + throw new ArgumentNullException(nameof(password)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return (username, password); + } + + /// + /// Processes the server response + /// + /// + /// + /// + protected virtual void AfterLoginUser(ApiResponse apiResponse, string username, string password) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + /// + protected virtual void OnErrorLoginUser(Exception exception, string pathFormat, string path, string username, string password) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Logs user into the system /// @@ -883,21 +1097,16 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> LoginUserWithHttpInfoAsync(string username, string password, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (username == null) - throw new ArgumentNullException(nameof(username)); - - if (password == null) - throw new ArgumentNullException(nameof(password)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + var validatedParameters = OnLoginUser(username, password); + username = validatedParameters.Item1; + password = validatedParameters.Item2; using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; @@ -910,6 +1119,8 @@ namespace Org.OpenAPITools.Api uriBuilder.Query = parseQueryString.ToString(); + + request.RequestUri = uriBuilder.Uri; string[] accepts = new string[] { @@ -921,31 +1132,24 @@ namespace Org.OpenAPITools.Api if (accept != null) request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); - + request.Method = new HttpMethod("GET"); + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/user/login", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync().ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/user/login")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterLoginUser(apiResponse, username, password); + } return apiResponse; } @@ -953,7 +1157,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorLoginUser(e, "/user/login", uriBuilder.Path, username, password); throw; } } @@ -996,6 +1200,34 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + protected virtual void OnLogoutUser() + { + return; + } + + /// + /// Processes the server response + /// + /// + protected virtual void AfterLogoutUser(ApiResponse apiResponse) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + protected virtual void OnErrorLogoutUser(Exception exception, string pathFormat, string path) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Logs out current logged in user session /// @@ -1004,42 +1236,40 @@ namespace Org.OpenAPITools.Api /// <> where T : public async Task> LogoutUserWithHttpInfoAsync(System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { + OnLogoutUser(); + using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/user/logout"; + + request.RequestUri = uriBuilder.Uri; request.Method = new HttpMethod("GET"); + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/user/logout", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync().ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/user/logout")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterLogoutUser(apiResponse); + } return apiResponse; } @@ -1047,7 +1277,7 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorLogoutUser(e, "/user/logout", uriBuilder.Path); throw; } } @@ -1056,13 +1286,13 @@ namespace Org.OpenAPITools.Api /// Updated user This can only be done by the logged in user. /// /// Thrown when fails to make API call - /// name that need to be deleted /// Updated user object + /// name that need to be deleted /// Cancellation Token to cancel the request. /// <> - public async Task UpdateUserAsync(string username, User user, System.Threading.CancellationToken? cancellationToken = null) + public async Task UpdateUserAsync(User user, string username, System.Threading.CancellationToken? cancellationToken = null) { - ApiResponse result = await UpdateUserWithHttpInfoAsync(username, user, cancellationToken).ConfigureAwait(false); + ApiResponse result = await UpdateUserWithHttpInfoAsync(user, username, cancellationToken).ConfigureAwait(false); if (result.Content == null) throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent); @@ -1074,16 +1304,16 @@ namespace Org.OpenAPITools.Api /// Updated user This can only be done by the logged in user. /// /// Thrown when fails to make API call - /// name that need to be deleted /// Updated user object + /// name that need to be deleted /// Cancellation Token to cancel the request. /// <> - public async Task UpdateUserOrDefaultAsync(string username, User user, System.Threading.CancellationToken? cancellationToken = null) + public async Task UpdateUserOrDefaultAsync(User user, string username, System.Threading.CancellationToken? cancellationToken = null) { ApiResponse result = null; try { - result = await UpdateUserWithHttpInfoAsync(username, user, cancellationToken).ConfigureAwait(false); + result = await UpdateUserWithHttpInfoAsync(user, username, cancellationToken).ConfigureAwait(false); } catch (Exception) { @@ -1094,41 +1324,83 @@ namespace Org.OpenAPITools.Api : null; } + /// + /// Validates the request parameters + /// + /// + /// + /// + protected virtual (User, string) OnUpdateUser(User user, string username) + { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (user == null) + throw new ArgumentNullException(nameof(user)); + + if (username == null) + throw new ArgumentNullException(nameof(username)); + + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + return (user, username); + } + + /// + /// Processes the server response + /// + /// + /// + /// + protected virtual void AfterUpdateUser(ApiResponse apiResponse, User user, string username) + { + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + /// + protected virtual void OnErrorUpdateUser(Exception exception, string pathFormat, string path, User user, string username) + { + Logger.LogError(exception, "An error occurred while sending the request to the server."); + } + /// /// Updated user This can only be done by the logged in user. /// /// Thrown when fails to make API call - /// name that need to be deleted /// Updated user object + /// name that need to be deleted /// Cancellation Token to cancel the request. /// <> where T : - public async Task> UpdateUserWithHttpInfoAsync(string username, User user, System.Threading.CancellationToken? cancellationToken = null) + public async Task> UpdateUserWithHttpInfoAsync(User user, string username, System.Threading.CancellationToken? cancellationToken = null) { + UriBuilder uriBuilder = new UriBuilder(); + try { - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' - - if (username == null) - throw new ArgumentNullException(nameof(username)); - - if (user == null) - throw new ArgumentNullException(nameof(user)); - - #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + var validatedParameters = OnUpdateUser(user, username); + user = validatedParameters.Item1; + username = validatedParameters.Item2; using (HttpRequestMessage request = new HttpRequestMessage()) { - UriBuilder uriBuilder = new UriBuilder(); uriBuilder.Host = HttpClient.BaseAddress.Host; uriBuilder.Port = HttpClient.BaseAddress.Port; uriBuilder.Scheme = ClientUtils.SCHEME; uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/user/{username}"; - uriBuilder.Path = uriBuilder.Path.Replace("%7Busername%7D", Uri.EscapeDataString(username.ToString())); - request.Content = (user as object) is System.IO.Stream stream + uriBuilder.Path = uriBuilder.Path.Replace("%7Busername%7D", Uri.EscapeDataString(username.ToString())); request.Content = (user as object) is System.IO.Stream stream ? request.Content = new StreamContent(stream) : request.Content = new StringContent(JsonSerializer.Serialize(user, _jsonSerializerOptions)); + + request.RequestUri = uriBuilder.Uri; string[] contentTypes = new string[] { @@ -1138,32 +1410,25 @@ namespace Org.OpenAPITools.Api string contentType = ClientUtils.SelectHeaderContentType(contentTypes); if (contentType != null) - request.Content.Headers.Add("ContentType", contentType); + request.Content.Headers.ContentType = new MediaTypeHeaderValue(contentType); request.Method = new HttpMethod("PUT"); + DateTime requestedAt = DateTime.UtcNow; + using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false)) { - DateTime requestedAt = DateTime.UtcNow; + OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/user/{username}", uriBuilder.Path)); string responseContent = await responseMessage.Content.ReadAsStringAsync().ConfigureAwait(false); - if (ApiResponded != null) - { - try - { - ApiResponded.Invoke(this, new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/user/{username}")); - } - catch(Exception e) - { - Logger.LogError(e, "An error occurred while invoking ApiResponded."); - } - } - ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent); if (apiResponse.IsSuccessStatusCode) + { apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions); + AfterUpdateUser(apiResponse, user, username); + } return apiResponse; } @@ -1171,8 +1436,9 @@ namespace Org.OpenAPITools.Api } catch(Exception e) { - Logger.LogError(e, "An error occurred while sending the request to the server."); + OnErrorUpdateUser(e, "/user/{username}", uriBuilder.Path, user, username); throw; } - } } + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/ApiFactory.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/ApiFactory.cs new file mode 100644 index 0000000000..7757b89c19 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/ApiFactory.cs @@ -0,0 +1,49 @@ +using System; +using Microsoft.Extensions.DependencyInjection; + + +namespace Org.OpenAPITools.Client +{ + /// + /// An IApiFactory interface + /// + public interface IApiFactory + { + /// + /// A method to create an IApi of type IResult + /// + /// + /// + IResult Create() where IResult : IApi.IApi; + } + + /// + /// An ApiFactory + /// + public class ApiFactory : IApiFactory + { + /// + /// The service provider + /// + public IServiceProvider Services { get; } + + /// + /// Initializes a new instance of the class. + /// + /// + public ApiFactory(IServiceProvider services) + { + Services = services; + } + + /// + /// A method to create an IApi of type IResult + /// + /// + /// + public IResult Create() where IResult : IApi.IApi + { + return Services.GetRequiredService(); + } + } +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/ApiKeyToken.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/ApiKeyToken.cs index f63fd59332..5cc9c25492 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/ApiKeyToken.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/ApiKeyToken.cs @@ -16,22 +16,12 @@ namespace Org.OpenAPITools.Client /// /// /// - /// + /// public ApiKeyToken(string value, string prefix = "Bearer ", TimeSpan? timeout = null) : base(timeout) { _raw = $"{ prefix }{ value }"; } - /// - /// Places the token in the cookie. - /// - /// - /// - public virtual void UseInCookie(System.Net.Http.HttpRequestMessage request, string cookieName) - { - request.Headers.Add("Cookie", $"{ cookieName }=_raw"); - } - /// /// Places the token in the header. /// diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/ApiResponseEventArgs.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/ApiResponseEventArgs.cs index e5da600032..f87e53e8b0 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/ApiResponseEventArgs.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/ApiResponseEventArgs.cs @@ -12,35 +12,46 @@ namespace Org.OpenAPITools.Client /// The time the request was sent. /// public DateTime RequestedAt { get; } + /// /// The time the response was received. /// public DateTime ReceivedAt { get; } + /// /// The HttpStatusCode received. /// public HttpStatusCode HttpStatus { get; } + /// /// The path requested. /// - public string Path { get; } + public string PathFormat { get; } + /// /// The elapsed time from request to response. /// public TimeSpan ToTimeSpan => this.ReceivedAt - this.RequestedAt; + /// + /// The path + /// + public string Path { get; } + /// /// The event args used to track server health. /// /// /// /// + /// /// - public ApiResponseEventArgs(DateTime requestedAt, DateTime receivedAt, HttpStatusCode httpStatus, string path) + public ApiResponseEventArgs(DateTime requestedAt, DateTime receivedAt, HttpStatusCode httpStatus, string pathFormat, string path) { RequestedAt = requestedAt; ReceivedAt = receivedAt; HttpStatus = httpStatus; + PathFormat = pathFormat; Path = path; } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/ApiResponse`1.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/ApiResponse`1.cs index 3bae0aaa6a..0a8a0769c1 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/ApiResponse`1.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/ApiResponse`1.cs @@ -34,6 +34,11 @@ namespace Org.OpenAPITools.Client /// The raw content of this response /// string RawContent { get; } + + /// + /// The DateTime when the request was retrieved. + /// + DateTime DownloadedAt { get; } } /// @@ -41,12 +46,10 @@ namespace Org.OpenAPITools.Client /// public partial class ApiResponse : IApiResponse { - #region Properties - /// /// The deserialized content /// - public T Content { get; set; } + public T Content { get; internal set; } /// /// Gets or sets the status code (HTTP status code) @@ -82,7 +85,10 @@ namespace Org.OpenAPITools.Client /// public System.Net.Http.Headers.HttpResponseHeaders Headers { get; } - #endregion Properties + /// + /// The DateTime when the request was retrieved. + /// + public DateTime DownloadedAt { get; } = DateTime.UtcNow; /// /// Construct the response using an HttpResponseMessage diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/ClientUtils.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/ClientUtils.cs index 8be839fed6..a6ecdf11c0 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/ClientUtils.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/ClientUtils.cs @@ -10,16 +10,9 @@ using System; using System.IO; using System.Linq; -using System.Net.Http; using System.Text; using System.Text.Json; using System.Text.RegularExpressions; -using Microsoft.Extensions.Hosting; -using Microsoft.Extensions.DependencyInjection; -using Polly.Timeout; -using Polly.Extensions.Http; -using Polly; -using Org.OpenAPITools.Api; using KellermanSoftware.CompareNetObjects; namespace Org.OpenAPITools.Client @@ -280,114 +273,5 @@ namespace Org.OpenAPITools.Client /// The format to use for DateTime serialization /// public const string ISO8601_DATETIME_FORMAT = "o"; - - /// - /// Add the api to your host builder. - /// - /// - /// - public static IHostBuilder ConfigureApi(this IHostBuilder builder, Action options) - { - builder.ConfigureServices((context, services) => - { - HostConfiguration config = new HostConfiguration(services); - - options(context, config); - - AddApi(services, config); - }); - - return builder; - } - - /// - /// Add the api to your host builder. - /// - /// - /// - public static void AddApi(this IServiceCollection services, Action options) - { - HostConfiguration config = new HostConfiguration(services); - options(config); - AddApi(services, config); - } - - private static void AddApi(IServiceCollection services, HostConfiguration host) - { - if (!host.HttpClientsAdded) - host.AddApiHttpClients(); - - // ensure that a token provider was provided for this token type - // if not, default to RateLimitProvider - var containerServices = services.Where(s => s.ServiceType.IsGenericType && - s.ServiceType.GetGenericTypeDefinition().IsAssignableFrom(typeof(TokenContainer<>))).ToArray(); - - foreach(var containerService in containerServices) - { - var tokenType = containerService.ServiceType.GenericTypeArguments[0]; - - var provider = services.FirstOrDefault(s => s.ServiceType.IsAssignableFrom(typeof(TokenProvider<>).MakeGenericType(tokenType))); - - if (provider == null) - { - services.AddSingleton(typeof(RateLimitProvider<>).MakeGenericType(tokenType)); - services.AddSingleton(typeof(TokenProvider<>).MakeGenericType(tokenType), - s => s.GetRequiredService(typeof(RateLimitProvider<>).MakeGenericType(tokenType))); - } - } - } - - /// - /// Adds a Polly retry policy to your clients. - /// - /// - /// - /// - public static IHttpClientBuilder AddRetryPolicy(this IHttpClientBuilder client, int retries) - { - client.AddPolicyHandler(RetryPolicy(retries)); - - return client; - } - - /// - /// Adds a Polly timeout policy to your clients. - /// - /// - /// - /// - public static IHttpClientBuilder AddTimeoutPolicy(this IHttpClientBuilder client, TimeSpan timeout) - { - client.AddPolicyHandler(TimeoutPolicy(timeout)); - - return client; - } - - /// - /// Adds a Polly circiut breaker to your clients. - /// - /// - /// - /// - /// - public static IHttpClientBuilder AddCircuitBreakerPolicy(this IHttpClientBuilder client, int handledEventsAllowedBeforeBreaking, TimeSpan durationOfBreak) - { - client.AddTransientHttpErrorPolicy(builder => CircuitBreakerPolicy(builder, handledEventsAllowedBeforeBreaking, durationOfBreak)); - - return client; - } - - private static Polly.Retry.AsyncRetryPolicy RetryPolicy(int retries) - => HttpPolicyExtensions - .HandleTransientHttpError() - .Or() - .RetryAsync(retries); - - private static AsyncTimeoutPolicy TimeoutPolicy(TimeSpan timeout) - => Policy.TimeoutAsync(timeout); - - private static Polly.CircuitBreaker.AsyncCircuitBreakerPolicy CircuitBreakerPolicy( - PolicyBuilder builder, int handledEventsAllowedBeforeBreaking, TimeSpan durationOfBreak) - => builder.CircuitBreakerAsync(handledEventsAllowedBeforeBreaking, durationOfBreak); } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/CookieContainer.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/CookieContainer.cs new file mode 100644 index 0000000000..da94287dab --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/CookieContainer.cs @@ -0,0 +1,18 @@ +// + +using System.Linq; +using System.Collections.Generic; + +namespace Org.OpenAPITools.Client +{ + /// + /// A class containing a CookieContainer + /// + public sealed class CookieContainer + { + /// + /// The collection of tokens + /// + public System.Net.CookieContainer Value { get; } = new System.Net.CookieContainer(); + } +} \ No newline at end of file diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/DateTimeJsonConverter.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/DateTimeJsonConverter.cs new file mode 100644 index 0000000000..47daa5b77e --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/DateTimeJsonConverter.cs @@ -0,0 +1,71 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Globalization; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Org.OpenAPITools.Client +{ + /// + /// Formatter for 'date' openapi formats ss defined by full-date - RFC3339 + /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types + /// + public class DateTimeJsonConverter : JsonConverter + { + public static readonly string[] FORMATS = { + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'ffffffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'ffffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'ffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ssK", + "yyyyMMddTHHmmss.fffffffK", + "yyyyMMddTHHmmss.ffffffK", + "yyyyMMddTHHmmss.fffffK", + "yyyyMMddTHHmmss.ffffK", + "yyyyMMddTHHmmss.fffK", + "yyyyMMddTHHmmss.ffK", + "yyyyMMddTHHmmss.fK", + "yyyyMMddTHHmmssK", + }; + + /// + /// Returns a DateTime from the Json object + /// + /// + /// + /// + /// + public override DateTime Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { + if (reader.TokenType == JsonTokenType.Null) + throw new NotSupportedException(); + + string value = reader.GetString(); + + foreach(string format in FORMATS) + if (DateTime.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateTime result)) + return result; + + throw new NotSupportedException(); + } + + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, DateTime dateTimeValue, JsonSerializerOptions options) => + writer.WriteStringValue(dateTimeValue.ToString(FORMATS[0], CultureInfo.InvariantCulture)); + } +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/DateTimeNullableJsonConverter.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/DateTimeNullableJsonConverter.cs new file mode 100644 index 0000000000..02d9e10ba7 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/DateTimeNullableJsonConverter.cs @@ -0,0 +1,76 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Globalization; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Org.OpenAPITools.Client +{ + /// + /// Formatter for 'date' openapi formats ss defined by full-date - RFC3339 + /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types + /// + public class DateTimeNullableJsonConverter : JsonConverter + { + public static readonly string[] FORMATS = { + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'ffffffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'ffffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'ffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ssK", + "yyyyMMddTHHmmss.fffffffK", + "yyyyMMddTHHmmss.ffffffK", + "yyyyMMddTHHmmss.fffffK", + "yyyyMMddTHHmmss.ffffK", + "yyyyMMddTHHmmss.fffK", + "yyyyMMddTHHmmss.ffK", + "yyyyMMddTHHmmss.fK", + "yyyyMMddTHHmmssK", + }; + + /// + /// Returns a DateTime from the Json object + /// + /// + /// + /// + /// + public override DateTime? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { + if (reader.TokenType == JsonTokenType.Null) + return null; + + string value = reader.GetString(); + + foreach(string format in FORMATS) + if (DateTime.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateTime result)) + return result; + + return null; + } + + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, DateTime? dateTimeValue, JsonSerializerOptions options) + { + if (dateTimeValue == null) + writer.WriteNullValue(); + else + writer.WriteStringValue(dateTimeValue.Value.ToString(FORMATS[0], CultureInfo.InvariantCulture)); + } + } +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/HostConfiguration.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/HostConfiguration.cs index e3200ba239..49dd0278de 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/HostConfiguration.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/HostConfiguration.cs @@ -14,7 +14,6 @@ using System.Text.Json; using System.Text.Json.Serialization; using System.Net.Http; using Microsoft.Extensions.DependencyInjection; -using Org.OpenAPITools.Api; using Org.OpenAPITools.Model; namespace Org.OpenAPITools.Client @@ -22,10 +21,17 @@ namespace Org.OpenAPITools.Client /// /// Provides hosting configuration for Org.OpenAPITools /// - public class HostConfiguration + public class HostConfiguration + where TAnotherFakeApi : class, IApi.IAnotherFakeApi + where TDefaultApi : class, IApi.IDefaultApi + where TFakeApi : class, IApi.IFakeApi + where TFakeClassnameTags123Api : class, IApi.IFakeClassnameTags123Api + where TPetApi : class, IApi.IPetApi + where TStoreApi : class, IApi.IStoreApi + where TUserApi : class, IApi.IUserApi { private readonly IServiceCollection _services; - private JsonSerializerOptions _jsonOptions = new JsonSerializerOptions(); + private readonly JsonSerializerOptions _jsonOptions = new JsonSerializerOptions(); internal bool HttpClientsAdded { get; private set; } @@ -37,35 +43,101 @@ namespace Org.OpenAPITools.Client { _services = services; _jsonOptions.Converters.Add(new JsonStringEnumConverter()); - _jsonOptions.Converters.Add(new OpenAPIDateJsonConverter()); + _jsonOptions.Converters.Add(new DateTimeJsonConverter()); + _jsonOptions.Converters.Add(new DateTimeNullableJsonConverter()); + _jsonOptions.Converters.Add(new ActivityJsonConverter()); + _jsonOptions.Converters.Add(new ActivityOutputElementRepresentationJsonConverter()); + _jsonOptions.Converters.Add(new AdditionalPropertiesClassJsonConverter()); + _jsonOptions.Converters.Add(new AnimalJsonConverter()); + _jsonOptions.Converters.Add(new ApiResponseJsonConverter()); + _jsonOptions.Converters.Add(new AppleJsonConverter()); + _jsonOptions.Converters.Add(new AppleReqJsonConverter()); + _jsonOptions.Converters.Add(new ArrayOfArrayOfNumberOnlyJsonConverter()); + _jsonOptions.Converters.Add(new ArrayOfNumberOnlyJsonConverter()); + _jsonOptions.Converters.Add(new ArrayTestJsonConverter()); + _jsonOptions.Converters.Add(new BananaJsonConverter()); + _jsonOptions.Converters.Add(new BananaReqJsonConverter()); + _jsonOptions.Converters.Add(new BasquePigJsonConverter()); + _jsonOptions.Converters.Add(new CapitalizationJsonConverter()); _jsonOptions.Converters.Add(new CatJsonConverter()); + _jsonOptions.Converters.Add(new CatAllOfJsonConverter()); + _jsonOptions.Converters.Add(new CategoryJsonConverter()); _jsonOptions.Converters.Add(new ChildCatJsonConverter()); + _jsonOptions.Converters.Add(new ChildCatAllOfJsonConverter()); + _jsonOptions.Converters.Add(new ClassModelJsonConverter()); _jsonOptions.Converters.Add(new ComplexQuadrilateralJsonConverter()); + _jsonOptions.Converters.Add(new DanishPigJsonConverter()); + _jsonOptions.Converters.Add(new DeprecatedObjectJsonConverter()); _jsonOptions.Converters.Add(new DogJsonConverter()); + _jsonOptions.Converters.Add(new DogAllOfJsonConverter()); + _jsonOptions.Converters.Add(new DrawingJsonConverter()); + _jsonOptions.Converters.Add(new EnumArraysJsonConverter()); + _jsonOptions.Converters.Add(new EnumClassConverter()); + _jsonOptions.Converters.Add(new EnumClassNullableConverter()); + _jsonOptions.Converters.Add(new EnumTestJsonConverter()); _jsonOptions.Converters.Add(new EquilateralTriangleJsonConverter()); + _jsonOptions.Converters.Add(new FileJsonConverter()); + _jsonOptions.Converters.Add(new FileSchemaTestClassJsonConverter()); + _jsonOptions.Converters.Add(new FooJsonConverter()); + _jsonOptions.Converters.Add(new FooGetDefaultResponseJsonConverter()); + _jsonOptions.Converters.Add(new FormatTestJsonConverter()); _jsonOptions.Converters.Add(new FruitJsonConverter()); _jsonOptions.Converters.Add(new FruitReqJsonConverter()); _jsonOptions.Converters.Add(new GmFruitJsonConverter()); + _jsonOptions.Converters.Add(new GrandparentAnimalJsonConverter()); + _jsonOptions.Converters.Add(new HasOnlyReadOnlyJsonConverter()); + _jsonOptions.Converters.Add(new HealthCheckResultJsonConverter()); _jsonOptions.Converters.Add(new IsoscelesTriangleJsonConverter()); + _jsonOptions.Converters.Add(new ListJsonConverter()); _jsonOptions.Converters.Add(new MammalJsonConverter()); + _jsonOptions.Converters.Add(new MapTestJsonConverter()); + _jsonOptions.Converters.Add(new MixedPropertiesAndAdditionalPropertiesClassJsonConverter()); + _jsonOptions.Converters.Add(new Model200ResponseJsonConverter()); + _jsonOptions.Converters.Add(new ModelClientJsonConverter()); + _jsonOptions.Converters.Add(new NameJsonConverter()); + _jsonOptions.Converters.Add(new NullableClassJsonConverter()); _jsonOptions.Converters.Add(new NullableShapeJsonConverter()); + _jsonOptions.Converters.Add(new NumberOnlyJsonConverter()); + _jsonOptions.Converters.Add(new ObjectWithDeprecatedFieldsJsonConverter()); + _jsonOptions.Converters.Add(new OrderJsonConverter()); + _jsonOptions.Converters.Add(new OuterCompositeJsonConverter()); + _jsonOptions.Converters.Add(new OuterEnumConverter()); + _jsonOptions.Converters.Add(new OuterEnumNullableConverter()); + _jsonOptions.Converters.Add(new OuterEnumDefaultValueConverter()); + _jsonOptions.Converters.Add(new OuterEnumDefaultValueNullableConverter()); + _jsonOptions.Converters.Add(new OuterEnumIntegerConverter()); + _jsonOptions.Converters.Add(new OuterEnumIntegerNullableConverter()); + _jsonOptions.Converters.Add(new OuterEnumIntegerDefaultValueConverter()); + _jsonOptions.Converters.Add(new OuterEnumIntegerDefaultValueNullableConverter()); _jsonOptions.Converters.Add(new ParentPetJsonConverter()); + _jsonOptions.Converters.Add(new PetJsonConverter()); _jsonOptions.Converters.Add(new PigJsonConverter()); _jsonOptions.Converters.Add(new PolymorphicPropertyJsonConverter()); _jsonOptions.Converters.Add(new QuadrilateralJsonConverter()); + _jsonOptions.Converters.Add(new QuadrilateralInterfaceJsonConverter()); + _jsonOptions.Converters.Add(new ReadOnlyFirstJsonConverter()); + _jsonOptions.Converters.Add(new ReturnJsonConverter()); _jsonOptions.Converters.Add(new ScaleneTriangleJsonConverter()); _jsonOptions.Converters.Add(new ShapeJsonConverter()); + _jsonOptions.Converters.Add(new ShapeInterfaceJsonConverter()); _jsonOptions.Converters.Add(new ShapeOrNullJsonConverter()); _jsonOptions.Converters.Add(new SimpleQuadrilateralJsonConverter()); + _jsonOptions.Converters.Add(new SpecialModelNameJsonConverter()); + _jsonOptions.Converters.Add(new TagJsonConverter()); _jsonOptions.Converters.Add(new TriangleJsonConverter()); + _jsonOptions.Converters.Add(new TriangleInterfaceJsonConverter()); + _jsonOptions.Converters.Add(new UserJsonConverter()); + _jsonOptions.Converters.Add(new WhaleJsonConverter()); + _jsonOptions.Converters.Add(new ZebraJsonConverter()); _services.AddSingleton(new JsonSerializerOptionsProvider(_jsonOptions)); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddSingleton(); + _services.AddSingleton(); + _services.AddTransient(); + _services.AddTransient(); + _services.AddTransient(); + _services.AddTransient(); + _services.AddTransient(); + _services.AddTransient(); + _services.AddTransient(); } /// @@ -74,29 +146,22 @@ namespace Org.OpenAPITools.Client /// /// /// - public HostConfiguration AddApiHttpClients + public HostConfiguration AddApiHttpClients ( Action client = null, Action builder = null) - where TAnotherFakeApi : class, IAnotherFakeApi - where TDefaultApi : class, IDefaultApi - where TFakeApi : class, IFakeApi - where TFakeClassnameTags123Api : class, IFakeClassnameTags123Api - where TPetApi : class, IPetApi - where TStoreApi : class, IStoreApi - where TUserApi : class, IUserApi { if (client == null) client = c => c.BaseAddress = new Uri(ClientUtils.BASE_ADDRESS); List builders = new List(); - - builders.Add(_services.AddHttpClient(client)); - builders.Add(_services.AddHttpClient(client)); - builders.Add(_services.AddHttpClient(client)); - builders.Add(_services.AddHttpClient(client)); - builders.Add(_services.AddHttpClient(client)); - builders.Add(_services.AddHttpClient(client)); - builders.Add(_services.AddHttpClient(client)); + + builders.Add(_services.AddHttpClient(client)); + builders.Add(_services.AddHttpClient(client)); + builders.Add(_services.AddHttpClient(client)); + builders.Add(_services.AddHttpClient(client)); + builders.Add(_services.AddHttpClient(client)); + builders.Add(_services.AddHttpClient(client)); + builders.Add(_services.AddHttpClient(client)); if (builder != null) foreach (IHttpClientBuilder instance in builders) @@ -107,25 +172,12 @@ namespace Org.OpenAPITools.Client return this; } - /// - /// Configures the HttpClients. - /// - /// - /// - /// - public HostConfiguration AddApiHttpClients(Action client = null, Action builder = null) - { - AddApiHttpClients(client, builder); - - return this; - } - /// /// Configures the JsonSerializerSettings /// /// /// - public HostConfiguration ConfigureJsonOptions(Action options) + public HostConfiguration ConfigureJsonOptions(Action options) { options(_jsonOptions); @@ -138,7 +190,7 @@ namespace Org.OpenAPITools.Client /// /// /// - public HostConfiguration AddTokens(TTokenBase token) where TTokenBase : TokenBase + public HostConfiguration AddTokens(TTokenBase token) where TTokenBase : TokenBase { return AddTokens(new TTokenBase[]{ token }); } @@ -149,7 +201,7 @@ namespace Org.OpenAPITools.Client /// /// /// - public HostConfiguration AddTokens(IEnumerable tokens) where TTokenBase : TokenBase + public HostConfiguration AddTokens(IEnumerable tokens) where TTokenBase : TokenBase { TokenContainer container = new TokenContainer(tokens); _services.AddSingleton(services => container); @@ -163,7 +215,7 @@ namespace Org.OpenAPITools.Client /// /// /// - public HostConfiguration UseProvider() + public HostConfiguration UseProvider() where TTokenProvider : TokenProvider where TTokenBase : TokenBase { diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/IApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/IApi.cs deleted file mode 100644 index bd74ad34fd..0000000000 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/IApi.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System.Net.Http; - -namespace Org.OpenAPITools.Client -{ - /// - /// Any Api client - /// - public interface IApi - { - /// - /// The HttpClient - /// - HttpClient HttpClient { get; } - - /// - /// An event to track the health of the server. - /// If you store these event args, be sure to purge old event args to prevent a memory leak. - /// - event ClientUtils.EventHandler ApiResponded; - } -} \ No newline at end of file diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/OpenAPIDateJsonConverter.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/OpenAPIDateJsonConverter.cs deleted file mode 100644 index a280076c5a..0000000000 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Client/OpenAPIDateJsonConverter.cs +++ /dev/null @@ -1,42 +0,0 @@ -/* - * OpenAPI Petstore - * - * 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://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Globalization; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Org.OpenAPITools.Client -{ - /// - /// Formatter for 'date' openapi formats ss defined by full-date - RFC3339 - /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types - /// - public class OpenAPIDateJsonConverter : JsonConverter - { - /// - /// Returns a DateTime from the Json object - /// - /// - /// - /// - /// - public override DateTime Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => - DateTime.ParseExact(reader.GetString(), "yyyy-MM-dd", CultureInfo.InvariantCulture); - - /// - /// Writes the DateTime to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, DateTime dateTimeValue, JsonSerializerOptions options) => - writer.WriteStringValue(dateTimeValue.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture)); - } -} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Extensions/IHostBuilderExtensions.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Extensions/IHostBuilderExtensions.cs new file mode 100644 index 0000000000..deefb4ab70 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Extensions/IHostBuilderExtensions.cs @@ -0,0 +1,57 @@ +/* + * OpenAPI Petstore + * + * 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://github.com/openapitools/openapi-generator.git + */ + +using System; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Org.OpenAPITools.Client; +using Org.OpenAPITools.Api; + +namespace Org.OpenAPITools.Extensions +{ + /// + /// Extension methods for IHostBuilder + /// + public static class IHostBuilderExtensions + { + /// + /// Add the api to your host builder. + /// + /// + /// + public static IHostBuilder ConfigureApi(this IHostBuilder builder, Action> options) + where TAnotherFakeApi : class, IApi.IAnotherFakeApi + where TDefaultApi : class, IApi.IDefaultApi + where TFakeApi : class, IApi.IFakeApi + where TFakeClassnameTags123Api : class, IApi.IFakeClassnameTags123Api + where TPetApi : class, IApi.IPetApi + where TStoreApi : class, IApi.IStoreApi + where TUserApi : class, IApi.IUserApi + { + builder.ConfigureServices((context, services) => + { + HostConfiguration config = new HostConfiguration(services); + + options(context, services, config); + + IServiceCollectionExtensions.AddApi(services, config); + }); + + return builder; + } + + /// + /// Add the api to your host builder. + /// + /// + /// + public static IHostBuilder ConfigureApi(this IHostBuilder builder, Action> options) + => ConfigureApi(builder, options); + } +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Extensions/IHttpClientBuilderExtensions.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Extensions/IHttpClientBuilderExtensions.cs new file mode 100644 index 0000000000..a204267fa6 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Extensions/IHttpClientBuilderExtensions.cs @@ -0,0 +1,77 @@ +/* + * OpenAPI Petstore + * + * 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://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Net.Http; +using Microsoft.Extensions.DependencyInjection; +using Polly.Timeout; +using Polly.Extensions.Http; +using Polly; + +namespace Org.OpenAPITools.Extensions +{ + /// + /// Extension methods for IHttpClientBuilder + /// + public static class IHttpClientBuilderExtensions + { + /// + /// Adds a Polly retry policy to your clients. + /// + /// + /// + /// + public static IHttpClientBuilder AddRetryPolicy(this IHttpClientBuilder client, int retries) + { + client.AddPolicyHandler(RetryPolicy(retries)); + + return client; + } + + /// + /// Adds a Polly timeout policy to your clients. + /// + /// + /// + /// + public static IHttpClientBuilder AddTimeoutPolicy(this IHttpClientBuilder client, TimeSpan timeout) + { + client.AddPolicyHandler(TimeoutPolicy(timeout)); + + return client; + } + + /// + /// Adds a Polly circiut breaker to your clients. + /// + /// + /// + /// + /// + public static IHttpClientBuilder AddCircuitBreakerPolicy(this IHttpClientBuilder client, int handledEventsAllowedBeforeBreaking, TimeSpan durationOfBreak) + { + client.AddTransientHttpErrorPolicy(builder => CircuitBreakerPolicy(builder, handledEventsAllowedBeforeBreaking, durationOfBreak)); + + return client; + } + + private static Polly.Retry.AsyncRetryPolicy RetryPolicy(int retries) + => HttpPolicyExtensions + .HandleTransientHttpError() + .Or() + .RetryAsync(retries); + + private static AsyncTimeoutPolicy TimeoutPolicy(TimeSpan timeout) + => Policy.TimeoutAsync(timeout); + + private static Polly.CircuitBreaker.AsyncCircuitBreakerPolicy CircuitBreakerPolicy( + PolicyBuilder builder, int handledEventsAllowedBeforeBreaking, TimeSpan durationOfBreak) + => builder.CircuitBreakerAsync(handledEventsAllowedBeforeBreaking, durationOfBreak); + } +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Extensions/IServiceCollectionExtensions.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Extensions/IServiceCollectionExtensions.cs new file mode 100644 index 0000000000..b7cfb5f6f9 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Extensions/IServiceCollectionExtensions.cs @@ -0,0 +1,88 @@ +/* + * OpenAPI Petstore + * + * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * + * The version of the OpenAPI document: 1.0.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Linq; +using Microsoft.Extensions.DependencyInjection; +using Org.OpenAPITools.Client; +using Org.OpenAPITools.Api; + +namespace Org.OpenAPITools.Extensions +{ + /// + /// Extension methods for IServiceCollection + /// + public static class IServiceCollectionExtensions + { + /// + /// Add the api to your host builder. + /// + /// + /// + public static void AddApi(this IServiceCollection services, Action> options) + where TAnotherFakeApi : class, IApi.IAnotherFakeApi + where TDefaultApi : class, IApi.IDefaultApi + where TFakeApi : class, IApi.IFakeApi + where TFakeClassnameTags123Api : class, IApi.IFakeClassnameTags123Api + where TPetApi : class, IApi.IPetApi + where TStoreApi : class, IApi.IStoreApi + where TUserApi : class, IApi.IUserApi + { + HostConfiguration config = new HostConfiguration(services); + options(config); + AddApi(services, config); + } + + /// + /// Add the api to your host builder. + /// + /// + /// + public static void AddApi(this IServiceCollection services, Action> options) + { + HostConfiguration config = new HostConfiguration(services); + options(config); + AddApi(services, config); + } + + internal static void AddApi(IServiceCollection services, HostConfiguration host) + where TAnotherFakeApi : class, IApi.IAnotherFakeApi + where TDefaultApi : class, IApi.IDefaultApi + where TFakeApi : class, IApi.IFakeApi + where TFakeClassnameTags123Api : class, IApi.IFakeClassnameTags123Api + where TPetApi : class, IApi.IPetApi + where TStoreApi : class, IApi.IStoreApi + where TUserApi : class, IApi.IUserApi + { + if (!host.HttpClientsAdded) + host.AddApiHttpClients(); + + services.AddSingleton(); + + // ensure that a token provider was provided for this token type + // if not, default to RateLimitProvider + var containerServices = services.Where(s => s.ServiceType.IsGenericType && + s.ServiceType.GetGenericTypeDefinition().IsAssignableFrom(typeof(TokenContainer<>))).ToArray(); + + foreach(var containerService in containerServices) + { + var tokenType = containerService.ServiceType.GenericTypeArguments[0]; + + var provider = services.FirstOrDefault(s => s.ServiceType.IsAssignableFrom(typeof(TokenProvider<>).MakeGenericType(tokenType))); + + if (provider == null) + { + services.AddSingleton(typeof(RateLimitProvider<>).MakeGenericType(tokenType)); + services.AddSingleton(typeof(TokenProvider<>).MakeGenericType(tokenType), + s => s.GetRequiredService(typeof(RateLimitProvider<>).MakeGenericType(tokenType))); + } + } + } + } +} diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Activity.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Activity.cs index 68647a4ae1..35452f5ff8 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Activity.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Activity.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,14 +26,24 @@ namespace Org.OpenAPITools.Model /// /// test map of maps /// - public partial class Activity : IEquatable, IValidatableObject + public partial class Activity : IValidatableObject { /// /// Initializes a new instance of the class. /// /// activityOutputs - public Activity(Dictionary> activityOutputs = default) + [JsonConstructor] + public Activity(Dictionary> activityOutputs) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (activityOutputs == null) + throw new ArgumentNullException("activityOutputs is a required property for Activity and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + ActivityOutputs = activityOutputs; } @@ -48,7 +57,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -63,48 +72,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Activity).AreEqual; - } - - /// - /// Returns true if Activity instances are equal - /// - /// Instance of Activity to be compared - /// Boolean - public bool Equals(Activity input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ActivityOutputs != null) - { - hashCode = (hashCode * 59) + this.ActivityOutputs.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -116,4 +83,72 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type Activity + /// + public class ActivityJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override Activity Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + Dictionary> activityOutputs = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "activity_outputs": + activityOutputs = JsonSerializer.Deserialize>>(ref reader, options); + break; + default: + break; + } + } + } + + return new Activity(activityOutputs); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Activity activity, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WritePropertyName("activity_outputs"); + JsonSerializer.Serialize(writer, activity.ActivityOutputs, options); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs index ed290bab60..31ae89912f 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ActivityOutputElementRepresentation.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,15 +26,28 @@ namespace Org.OpenAPITools.Model /// /// ActivityOutputElementRepresentation /// - public partial class ActivityOutputElementRepresentation : IEquatable, IValidatableObject + public partial class ActivityOutputElementRepresentation : IValidatableObject { /// /// Initializes a new instance of the class. /// /// prop1 /// prop2 - public ActivityOutputElementRepresentation(string prop1 = default, Object prop2 = default) + [JsonConstructor] + public ActivityOutputElementRepresentation(string prop1, Object prop2) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (prop1 == null) + throw new ArgumentNullException("prop1 is a required property for ActivityOutputElementRepresentation and cannot be null."); + + if (prop2 == null) + throw new ArgumentNullException("prop2 is a required property for ActivityOutputElementRepresentation and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + Prop1 = prop1; Prop2 = prop2; } @@ -56,7 +68,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -72,52 +84,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as ActivityOutputElementRepresentation).AreEqual; - } - - /// - /// Returns true if ActivityOutputElementRepresentation instances are equal - /// - /// Instance of ActivityOutputElementRepresentation to be compared - /// Boolean - public bool Equals(ActivityOutputElementRepresentation input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Prop1 != null) - { - hashCode = (hashCode * 59) + this.Prop1.GetHashCode(); - } - if (this.Prop2 != null) - { - hashCode = (hashCode * 59) + this.Prop2.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -129,4 +95,77 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type ActivityOutputElementRepresentation + /// + public class ActivityOutputElementRepresentationJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override ActivityOutputElementRepresentation Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string prop1 = default; + Object prop2 = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "prop1": + prop1 = reader.GetString(); + break; + case "prop2": + prop2 = JsonSerializer.Deserialize(ref reader, options); + break; + default: + break; + } + } + } + + return new ActivityOutputElementRepresentation(prop1, prop2); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ActivityOutputElementRepresentation activityOutputElementRepresentation, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("prop1", activityOutputElementRepresentation.Prop1); + writer.WritePropertyName("prop2"); + JsonSerializer.Serialize(writer, activityOutputElementRepresentation.Prop2, options); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs index 25b11f890f..5682c09e84 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,36 +26,65 @@ namespace Org.OpenAPITools.Model /// /// AdditionalPropertiesClass /// - public partial class AdditionalPropertiesClass : IEquatable, IValidatableObject + public partial class AdditionalPropertiesClass : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// mapProperty + /// an object with no declared properties and no undeclared properties, hence it's an empty map. /// mapOfMapProperty - /// anytype1 + /// mapProperty /// mapWithUndeclaredPropertiesAnytype1 /// mapWithUndeclaredPropertiesAnytype2 /// mapWithUndeclaredPropertiesAnytype3 - /// an object with no declared properties and no undeclared properties, hence it's an empty map. /// mapWithUndeclaredPropertiesString - public AdditionalPropertiesClass(Dictionary mapProperty = default, Dictionary> mapOfMapProperty = default, Object anytype1 = default, Object mapWithUndeclaredPropertiesAnytype1 = default, Object mapWithUndeclaredPropertiesAnytype2 = default, Dictionary mapWithUndeclaredPropertiesAnytype3 = default, Object emptyMap = default, Dictionary mapWithUndeclaredPropertiesString = default) + /// anytype1 + [JsonConstructor] + public AdditionalPropertiesClass(Object emptyMap, Dictionary> mapOfMapProperty, Dictionary mapProperty, Object mapWithUndeclaredPropertiesAnytype1, Object mapWithUndeclaredPropertiesAnytype2, Dictionary mapWithUndeclaredPropertiesAnytype3, Dictionary mapWithUndeclaredPropertiesString, Object anytype1 = default) { - MapProperty = mapProperty; +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (mapProperty == null) + throw new ArgumentNullException("mapProperty is a required property for AdditionalPropertiesClass and cannot be null."); + + if (mapOfMapProperty == null) + throw new ArgumentNullException("mapOfMapProperty is a required property for AdditionalPropertiesClass and cannot be null."); + + if (mapWithUndeclaredPropertiesAnytype1 == null) + throw new ArgumentNullException("mapWithUndeclaredPropertiesAnytype1 is a required property for AdditionalPropertiesClass and cannot be null."); + + if (mapWithUndeclaredPropertiesAnytype2 == null) + throw new ArgumentNullException("mapWithUndeclaredPropertiesAnytype2 is a required property for AdditionalPropertiesClass and cannot be null."); + + if (mapWithUndeclaredPropertiesAnytype3 == null) + throw new ArgumentNullException("mapWithUndeclaredPropertiesAnytype3 is a required property for AdditionalPropertiesClass and cannot be null."); + + if (emptyMap == null) + throw new ArgumentNullException("emptyMap is a required property for AdditionalPropertiesClass and cannot be null."); + + if (mapWithUndeclaredPropertiesString == null) + throw new ArgumentNullException("mapWithUndeclaredPropertiesString is a required property for AdditionalPropertiesClass and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + EmptyMap = emptyMap; MapOfMapProperty = mapOfMapProperty; - Anytype1 = anytype1; + MapProperty = mapProperty; MapWithUndeclaredPropertiesAnytype1 = mapWithUndeclaredPropertiesAnytype1; MapWithUndeclaredPropertiesAnytype2 = mapWithUndeclaredPropertiesAnytype2; MapWithUndeclaredPropertiesAnytype3 = mapWithUndeclaredPropertiesAnytype3; - EmptyMap = emptyMap; MapWithUndeclaredPropertiesString = mapWithUndeclaredPropertiesString; + Anytype1 = anytype1; } /// - /// Gets or Sets MapProperty + /// an object with no declared properties and no undeclared properties, hence it's an empty map. /// - [JsonPropertyName("map_property")] - public Dictionary MapProperty { get; set; } + /// an object with no declared properties and no undeclared properties, hence it's an empty map. + [JsonPropertyName("empty_map")] + public Object EmptyMap { get; set; } /// /// Gets or Sets MapOfMapProperty @@ -65,10 +93,10 @@ namespace Org.OpenAPITools.Model public Dictionary> MapOfMapProperty { get; set; } /// - /// Gets or Sets Anytype1 + /// Gets or Sets MapProperty /// - [JsonPropertyName("anytype_1")] - public Object Anytype1 { get; set; } + [JsonPropertyName("map_property")] + public Dictionary MapProperty { get; set; } /// /// Gets or Sets MapWithUndeclaredPropertiesAnytype1 @@ -88,24 +116,23 @@ namespace Org.OpenAPITools.Model [JsonPropertyName("map_with_undeclared_properties_anytype_3")] public Dictionary MapWithUndeclaredPropertiesAnytype3 { get; set; } - /// - /// an object with no declared properties and no undeclared properties, hence it's an empty map. - /// - /// an object with no declared properties and no undeclared properties, hence it's an empty map. - [JsonPropertyName("empty_map")] - public Object EmptyMap { get; set; } - /// /// Gets or Sets MapWithUndeclaredPropertiesString /// [JsonPropertyName("map_with_undeclared_properties_string")] public Dictionary MapWithUndeclaredPropertiesString { get; set; } + /// + /// Gets or Sets Anytype1 + /// + [JsonPropertyName("anytype_1")] + public Object Anytype1 { get; set; } + /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -115,88 +142,18 @@ namespace Org.OpenAPITools.Model { StringBuilder sb = new StringBuilder(); sb.Append("class AdditionalPropertiesClass {\n"); - sb.Append(" MapProperty: ").Append(MapProperty).Append("\n"); + sb.Append(" EmptyMap: ").Append(EmptyMap).Append("\n"); sb.Append(" MapOfMapProperty: ").Append(MapOfMapProperty).Append("\n"); - sb.Append(" Anytype1: ").Append(Anytype1).Append("\n"); + sb.Append(" MapProperty: ").Append(MapProperty).Append("\n"); sb.Append(" MapWithUndeclaredPropertiesAnytype1: ").Append(MapWithUndeclaredPropertiesAnytype1).Append("\n"); sb.Append(" MapWithUndeclaredPropertiesAnytype2: ").Append(MapWithUndeclaredPropertiesAnytype2).Append("\n"); sb.Append(" MapWithUndeclaredPropertiesAnytype3: ").Append(MapWithUndeclaredPropertiesAnytype3).Append("\n"); - sb.Append(" EmptyMap: ").Append(EmptyMap).Append("\n"); sb.Append(" MapWithUndeclaredPropertiesString: ").Append(MapWithUndeclaredPropertiesString).Append("\n"); + sb.Append(" Anytype1: ").Append(Anytype1).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as AdditionalPropertiesClass).AreEqual; - } - - /// - /// Returns true if AdditionalPropertiesClass instances are equal - /// - /// Instance of AdditionalPropertiesClass to be compared - /// Boolean - public bool Equals(AdditionalPropertiesClass input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.MapProperty != null) - { - hashCode = (hashCode * 59) + this.MapProperty.GetHashCode(); - } - if (this.MapOfMapProperty != null) - { - hashCode = (hashCode * 59) + this.MapOfMapProperty.GetHashCode(); - } - if (this.Anytype1 != null) - { - hashCode = (hashCode * 59) + this.Anytype1.GetHashCode(); - } - if (this.MapWithUndeclaredPropertiesAnytype1 != null) - { - hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesAnytype1.GetHashCode(); - } - if (this.MapWithUndeclaredPropertiesAnytype2 != null) - { - hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesAnytype2.GetHashCode(); - } - if (this.MapWithUndeclaredPropertiesAnytype3 != null) - { - hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesAnytype3.GetHashCode(); - } - if (this.EmptyMap != null) - { - hashCode = (hashCode * 59) + this.EmptyMap.GetHashCode(); - } - if (this.MapWithUndeclaredPropertiesString != null) - { - hashCode = (hashCode * 59) + this.MapWithUndeclaredPropertiesString.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -208,4 +165,114 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type AdditionalPropertiesClass + /// + public class AdditionalPropertiesClassJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override AdditionalPropertiesClass Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + Object emptyMap = default; + Dictionary> mapOfMapProperty = default; + Dictionary mapProperty = default; + Object mapWithUndeclaredPropertiesAnytype1 = default; + Object mapWithUndeclaredPropertiesAnytype2 = default; + Dictionary mapWithUndeclaredPropertiesAnytype3 = default; + Dictionary mapWithUndeclaredPropertiesString = default; + Object anytype1 = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "empty_map": + emptyMap = JsonSerializer.Deserialize(ref reader, options); + break; + case "map_of_map_property": + mapOfMapProperty = JsonSerializer.Deserialize>>(ref reader, options); + break; + case "map_property": + mapProperty = JsonSerializer.Deserialize>(ref reader, options); + break; + case "map_with_undeclared_properties_anytype_1": + mapWithUndeclaredPropertiesAnytype1 = JsonSerializer.Deserialize(ref reader, options); + break; + case "map_with_undeclared_properties_anytype_2": + mapWithUndeclaredPropertiesAnytype2 = JsonSerializer.Deserialize(ref reader, options); + break; + case "map_with_undeclared_properties_anytype_3": + mapWithUndeclaredPropertiesAnytype3 = JsonSerializer.Deserialize>(ref reader, options); + break; + case "map_with_undeclared_properties_string": + mapWithUndeclaredPropertiesString = JsonSerializer.Deserialize>(ref reader, options); + break; + case "anytype_1": + anytype1 = JsonSerializer.Deserialize(ref reader, options); + break; + default: + break; + } + } + } + + return new AdditionalPropertiesClass(emptyMap, mapOfMapProperty, mapProperty, mapWithUndeclaredPropertiesAnytype1, mapWithUndeclaredPropertiesAnytype2, mapWithUndeclaredPropertiesAnytype3, mapWithUndeclaredPropertiesString, anytype1); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, AdditionalPropertiesClass additionalPropertiesClass, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WritePropertyName("empty_map"); + JsonSerializer.Serialize(writer, additionalPropertiesClass.EmptyMap, options); + writer.WritePropertyName("map_of_map_property"); + JsonSerializer.Serialize(writer, additionalPropertiesClass.MapOfMapProperty, options); + writer.WritePropertyName("map_property"); + JsonSerializer.Serialize(writer, additionalPropertiesClass.MapProperty, options); + writer.WritePropertyName("map_with_undeclared_properties_anytype_1"); + JsonSerializer.Serialize(writer, additionalPropertiesClass.MapWithUndeclaredPropertiesAnytype1, options); + writer.WritePropertyName("map_with_undeclared_properties_anytype_2"); + JsonSerializer.Serialize(writer, additionalPropertiesClass.MapWithUndeclaredPropertiesAnytype2, options); + writer.WritePropertyName("map_with_undeclared_properties_anytype_3"); + JsonSerializer.Serialize(writer, additionalPropertiesClass.MapWithUndeclaredPropertiesAnytype3, options); + writer.WritePropertyName("map_with_undeclared_properties_string"); + JsonSerializer.Serialize(writer, additionalPropertiesClass.MapWithUndeclaredPropertiesString, options); + writer.WritePropertyName("anytype_1"); + JsonSerializer.Serialize(writer, additionalPropertiesClass.Anytype1, options); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Animal.cs index 4d287b1d2f..122d4658dd 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Animal.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Animal.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,18 +26,28 @@ namespace Org.OpenAPITools.Model /// /// Animal /// - public partial class Animal : IEquatable, IValidatableObject + public partial class Animal : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// className (required) + /// className /// color (default to "red") + [JsonConstructor] public Animal(string className, string color = "red") { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + if (className == null) throw new ArgumentNullException("className is a required property for Animal and cannot be null."); + if (color == null) + throw new ArgumentNullException("color is a required property for Animal and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + ClassName = className; Color = color; } @@ -59,7 +68,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -75,52 +84,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Animal).AreEqual; - } - - /// - /// Returns true if Animal instances are equal - /// - /// Instance of Animal to be compared - /// Boolean - public bool Equals(Animal input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ClassName != null) - { - hashCode = (hashCode * 59) + this.ClassName.GetHashCode(); - } - if (this.Color != null) - { - hashCode = (hashCode * 59) + this.Color.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -142,4 +105,76 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type Animal + /// + public class AnimalJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override Animal Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string className = default; + string color = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "className": + className = reader.GetString(); + break; + case "color": + color = reader.GetString(); + break; + default: + break; + } + } + } + + return new Animal(className, color); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Animal animal, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("className", animal.ClassName); + writer.WriteString("color", animal.Color); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ApiResponse.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ApiResponse.cs index 9410088a41..fba4da0924 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ApiResponse.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ApiResponse.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,19 +26,35 @@ namespace Org.OpenAPITools.Model /// /// ApiResponse /// - public partial class ApiResponse : IEquatable, IValidatableObject + public partial class ApiResponse : IValidatableObject { /// /// Initializes a new instance of the class. /// /// code - /// type /// message - public ApiResponse(int code = default, string type = default, string message = default) + /// type + [JsonConstructor] + public ApiResponse(int code, string message, string type) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (code == null) + throw new ArgumentNullException("code is a required property for ApiResponse and cannot be null."); + + if (type == null) + throw new ArgumentNullException("type is a required property for ApiResponse and cannot be null."); + + if (message == null) + throw new ArgumentNullException("message is a required property for ApiResponse and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + Code = code; - Type = type; Message = message; + Type = type; } /// @@ -48,23 +63,23 @@ namespace Org.OpenAPITools.Model [JsonPropertyName("code")] public int Code { get; set; } - /// - /// Gets or Sets Type - /// - [JsonPropertyName("type")] - public string Type { get; set; } - /// /// Gets or Sets Message /// [JsonPropertyName("message")] public string Message { get; set; } + /// + /// Gets or Sets Type + /// + [JsonPropertyName("type")] + public string Type { get; set; } + /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -75,59 +90,12 @@ namespace Org.OpenAPITools.Model StringBuilder sb = new StringBuilder(); sb.Append("class ApiResponse {\n"); sb.Append(" Code: ").Append(Code).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append(" Message: ").Append(Message).Append("\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as ApiResponse).AreEqual; - } - - /// - /// Returns true if ApiResponse instances are equal - /// - /// Instance of ApiResponse to be compared - /// Boolean - public bool Equals(ApiResponse input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Code.GetHashCode(); - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - if (this.Message != null) - { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -139,4 +107,81 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type ApiResponse + /// + public class ApiResponseJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override ApiResponse Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + int code = default; + string message = default; + string type = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "code": + code = reader.GetInt32(); + break; + case "message": + message = reader.GetString(); + break; + case "type": + type = reader.GetString(); + break; + default: + break; + } + } + } + + return new ApiResponse(code, message, type); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ApiResponse apiResponse, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteNumber("code", (int)apiResponse.Code); + writer.WriteString("message", apiResponse.Message); + writer.WriteString("type", apiResponse.Type); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Apple.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Apple.cs index d6a9cf5029..2d5443fbd5 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Apple.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Apple.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,15 +26,28 @@ namespace Org.OpenAPITools.Model /// /// Apple /// - public partial class Apple : IEquatable, IValidatableObject + public partial class Apple : IValidatableObject { /// /// Initializes a new instance of the class. /// /// cultivar /// origin - public Apple(string cultivar = default, string origin = default) + [JsonConstructor] + public Apple(string cultivar, string origin) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (cultivar == null) + throw new ArgumentNullException("cultivar is a required property for Apple and cannot be null."); + + if (origin == null) + throw new ArgumentNullException("origin is a required property for Apple and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + Cultivar = cultivar; Origin = origin; } @@ -56,7 +68,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -72,52 +84,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Apple).AreEqual; - } - - /// - /// Returns true if Apple instances are equal - /// - /// Instance of Apple to be compared - /// Boolean - public bool Equals(Apple input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Cultivar != null) - { - hashCode = (hashCode * 59) + this.Cultivar.GetHashCode(); - } - if (this.Origin != null) - { - hashCode = (hashCode * 59) + this.Origin.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -143,4 +109,76 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type Apple + /// + public class AppleJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override Apple Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string cultivar = default; + string origin = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "cultivar": + cultivar = reader.GetString(); + break; + case "origin": + origin = reader.GetString(); + break; + default: + break; + } + } + } + + return new Apple(cultivar, origin); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Apple apple, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("cultivar", apple.Cultivar); + writer.WriteString("origin", apple.Origin); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/AppleReq.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/AppleReq.cs index 48e37cc0aa..bae73be324 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/AppleReq.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/AppleReq.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,18 +26,28 @@ namespace Org.OpenAPITools.Model /// /// AppleReq /// - public partial class AppleReq : IEquatable, IValidatableObject + public partial class AppleReq : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// cultivar (required) + /// cultivar /// mealy - public AppleReq(string cultivar, bool mealy = default) + [JsonConstructor] + public AppleReq(string cultivar, bool mealy) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + if (cultivar == null) throw new ArgumentNullException("cultivar is a required property for AppleReq and cannot be null."); + if (mealy == null) + throw new ArgumentNullException("mealy is a required property for AppleReq and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + Cultivar = cultivar; Mealy = mealy; } @@ -68,45 +77,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as AppleReq).AreEqual; - } - - /// - /// Returns true if AppleReq instances are equal - /// - /// Instance of AppleReq to be compared - /// Boolean - public bool Equals(AppleReq input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Cultivar != null) - { - hashCode = (hashCode * 59) + this.Cultivar.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Mealy.GetHashCode(); - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -118,4 +88,76 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type AppleReq + /// + public class AppleReqJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override AppleReq Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string cultivar = default; + bool mealy = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "cultivar": + cultivar = reader.GetString(); + break; + case "mealy": + mealy = reader.GetBoolean(); + break; + default: + break; + } + } + } + + return new AppleReq(cultivar, mealy); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, AppleReq appleReq, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("cultivar", appleReq.Cultivar); + writer.WriteBoolean("mealy", appleReq.Mealy); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs index 256a6b596a..ea6a1f3cab 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,14 +26,24 @@ namespace Org.OpenAPITools.Model /// /// ArrayOfArrayOfNumberOnly /// - public partial class ArrayOfArrayOfNumberOnly : IEquatable, IValidatableObject + public partial class ArrayOfArrayOfNumberOnly : IValidatableObject { /// /// Initializes a new instance of the class. /// /// arrayArrayNumber - public ArrayOfArrayOfNumberOnly(List> arrayArrayNumber = default) + [JsonConstructor] + public ArrayOfArrayOfNumberOnly(List> arrayArrayNumber) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (arrayArrayNumber == null) + throw new ArgumentNullException("arrayArrayNumber is a required property for ArrayOfArrayOfNumberOnly and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + ArrayArrayNumber = arrayArrayNumber; } @@ -48,7 +57,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -63,48 +72,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as ArrayOfArrayOfNumberOnly).AreEqual; - } - - /// - /// Returns true if ArrayOfArrayOfNumberOnly instances are equal - /// - /// Instance of ArrayOfArrayOfNumberOnly to be compared - /// Boolean - public bool Equals(ArrayOfArrayOfNumberOnly input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ArrayArrayNumber != null) - { - hashCode = (hashCode * 59) + this.ArrayArrayNumber.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -116,4 +83,72 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type ArrayOfArrayOfNumberOnly + /// + public class ArrayOfArrayOfNumberOnlyJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override ArrayOfArrayOfNumberOnly Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + List> arrayArrayNumber = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "ArrayArrayNumber": + arrayArrayNumber = JsonSerializer.Deserialize>>(ref reader, options); + break; + default: + break; + } + } + } + + return new ArrayOfArrayOfNumberOnly(arrayArrayNumber); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ArrayOfArrayOfNumberOnly arrayOfArrayOfNumberOnly, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WritePropertyName("ArrayArrayNumber"); + JsonSerializer.Serialize(writer, arrayOfArrayOfNumberOnly.ArrayArrayNumber, options); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs index 6c462dddf1..c09645642c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,14 +26,24 @@ namespace Org.OpenAPITools.Model /// /// ArrayOfNumberOnly /// - public partial class ArrayOfNumberOnly : IEquatable, IValidatableObject + public partial class ArrayOfNumberOnly : IValidatableObject { /// /// Initializes a new instance of the class. /// /// arrayNumber - public ArrayOfNumberOnly(List arrayNumber = default) + [JsonConstructor] + public ArrayOfNumberOnly(List arrayNumber) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (arrayNumber == null) + throw new ArgumentNullException("arrayNumber is a required property for ArrayOfNumberOnly and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + ArrayNumber = arrayNumber; } @@ -48,7 +57,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -63,48 +72,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as ArrayOfNumberOnly).AreEqual; - } - - /// - /// Returns true if ArrayOfNumberOnly instances are equal - /// - /// Instance of ArrayOfNumberOnly to be compared - /// Boolean - public bool Equals(ArrayOfNumberOnly input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ArrayNumber != null) - { - hashCode = (hashCode * 59) + this.ArrayNumber.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -116,4 +83,72 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type ArrayOfNumberOnly + /// + public class ArrayOfNumberOnlyJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override ArrayOfNumberOnly Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + List arrayNumber = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "ArrayNumber": + arrayNumber = JsonSerializer.Deserialize>(ref reader, options); + break; + default: + break; + } + } + } + + return new ArrayOfNumberOnly(arrayNumber); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ArrayOfNumberOnly arrayOfNumberOnly, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WritePropertyName("ArrayNumber"); + JsonSerializer.Serialize(writer, arrayOfNumberOnly.ArrayNumber, options); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ArrayTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ArrayTest.cs index f9872d7010..ef26590ab3 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ArrayTest.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ArrayTest.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,27 +26,37 @@ namespace Org.OpenAPITools.Model /// /// ArrayTest /// - public partial class ArrayTest : IEquatable, IValidatableObject + public partial class ArrayTest : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// arrayOfString /// arrayArrayOfInteger /// arrayArrayOfModel - public ArrayTest(List arrayOfString = default, List> arrayArrayOfInteger = default, List> arrayArrayOfModel = default) + /// arrayOfString + [JsonConstructor] + public ArrayTest(List> arrayArrayOfInteger, List> arrayArrayOfModel, List arrayOfString) { - ArrayOfString = arrayOfString; +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (arrayOfString == null) + throw new ArgumentNullException("arrayOfString is a required property for ArrayTest and cannot be null."); + + if (arrayArrayOfInteger == null) + throw new ArgumentNullException("arrayArrayOfInteger is a required property for ArrayTest and cannot be null."); + + if (arrayArrayOfModel == null) + throw new ArgumentNullException("arrayArrayOfModel is a required property for ArrayTest and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + ArrayArrayOfInteger = arrayArrayOfInteger; ArrayArrayOfModel = arrayArrayOfModel; + ArrayOfString = arrayOfString; } - /// - /// Gets or Sets ArrayOfString - /// - [JsonPropertyName("array_of_string")] - public List ArrayOfString { get; set; } - /// /// Gets or Sets ArrayArrayOfInteger /// @@ -60,11 +69,17 @@ namespace Org.OpenAPITools.Model [JsonPropertyName("array_array_of_model")] public List> ArrayArrayOfModel { get; set; } + /// + /// Gets or Sets ArrayOfString + /// + [JsonPropertyName("array_of_string")] + public List ArrayOfString { get; set; } + /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -74,63 +89,13 @@ namespace Org.OpenAPITools.Model { StringBuilder sb = new StringBuilder(); sb.Append("class ArrayTest {\n"); - sb.Append(" ArrayOfString: ").Append(ArrayOfString).Append("\n"); sb.Append(" ArrayArrayOfInteger: ").Append(ArrayArrayOfInteger).Append("\n"); sb.Append(" ArrayArrayOfModel: ").Append(ArrayArrayOfModel).Append("\n"); + sb.Append(" ArrayOfString: ").Append(ArrayOfString).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as ArrayTest).AreEqual; - } - - /// - /// Returns true if ArrayTest instances are equal - /// - /// Instance of ArrayTest to be compared - /// Boolean - public bool Equals(ArrayTest input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ArrayOfString != null) - { - hashCode = (hashCode * 59) + this.ArrayOfString.GetHashCode(); - } - if (this.ArrayArrayOfInteger != null) - { - hashCode = (hashCode * 59) + this.ArrayArrayOfInteger.GetHashCode(); - } - if (this.ArrayArrayOfModel != null) - { - hashCode = (hashCode * 59) + this.ArrayArrayOfModel.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -142,4 +107,84 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type ArrayTest + /// + public class ArrayTestJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override ArrayTest Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + List> arrayArrayOfInteger = default; + List> arrayArrayOfModel = default; + List arrayOfString = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "array_array_of_integer": + arrayArrayOfInteger = JsonSerializer.Deserialize>>(ref reader, options); + break; + case "array_array_of_model": + arrayArrayOfModel = JsonSerializer.Deserialize>>(ref reader, options); + break; + case "array_of_string": + arrayOfString = JsonSerializer.Deserialize>(ref reader, options); + break; + default: + break; + } + } + } + + return new ArrayTest(arrayArrayOfInteger, arrayArrayOfModel, arrayOfString); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ArrayTest arrayTest, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WritePropertyName("array_array_of_integer"); + JsonSerializer.Serialize(writer, arrayTest.ArrayArrayOfInteger, options); + writer.WritePropertyName("array_array_of_model"); + JsonSerializer.Serialize(writer, arrayTest.ArrayArrayOfModel, options); + writer.WritePropertyName("array_of_string"); + JsonSerializer.Serialize(writer, arrayTest.ArrayOfString, options); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Banana.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Banana.cs index 3192691eb7..129aec2d59 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Banana.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Banana.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,14 +26,24 @@ namespace Org.OpenAPITools.Model /// /// Banana /// - public partial class Banana : IEquatable, IValidatableObject + public partial class Banana : IValidatableObject { /// /// Initializes a new instance of the class. /// /// lengthCm - public Banana(decimal lengthCm = default) + [JsonConstructor] + public Banana(decimal lengthCm) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (lengthCm == null) + throw new ArgumentNullException("lengthCm is a required property for Banana and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + LengthCm = lengthCm; } @@ -48,7 +57,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -63,45 +72,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Banana).AreEqual; - } - - /// - /// Returns true if Banana instances are equal - /// - /// Instance of Banana to be compared - /// Boolean - public bool Equals(Banana input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.LengthCm.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -113,4 +83,71 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type Banana + /// + public class BananaJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override Banana Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + decimal lengthCm = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "lengthCm": + lengthCm = reader.GetInt32(); + break; + default: + break; + } + } + } + + return new Banana(lengthCm); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Banana banana, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteNumber("lengthCm", (int)banana.LengthCm); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/BananaReq.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/BananaReq.cs index 95ea0488f2..1ef87ba099 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/BananaReq.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/BananaReq.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,18 +26,28 @@ namespace Org.OpenAPITools.Model /// /// BananaReq /// - public partial class BananaReq : IEquatable, IValidatableObject + public partial class BananaReq : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// lengthCm (required) + /// lengthCm /// sweet - public BananaReq(decimal lengthCm, bool sweet = default) + [JsonConstructor] + public BananaReq(decimal lengthCm, bool sweet) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + if (lengthCm == null) throw new ArgumentNullException("lengthCm is a required property for BananaReq and cannot be null."); + if (sweet == null) + throw new ArgumentNullException("sweet is a required property for BananaReq and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + LengthCm = lengthCm; Sweet = sweet; } @@ -68,42 +77,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as BananaReq).AreEqual; - } - - /// - /// Returns true if BananaReq instances are equal - /// - /// Instance of BananaReq to be compared - /// Boolean - public bool Equals(BananaReq input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.LengthCm.GetHashCode(); - hashCode = (hashCode * 59) + this.Sweet.GetHashCode(); - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -115,4 +88,76 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type BananaReq + /// + public class BananaReqJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override BananaReq Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + decimal lengthCm = default; + bool sweet = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "lengthCm": + lengthCm = reader.GetInt32(); + break; + case "sweet": + sweet = reader.GetBoolean(); + break; + default: + break; + } + } + } + + return new BananaReq(lengthCm, sweet); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, BananaReq bananaReq, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteNumber("lengthCm", (int)bananaReq.LengthCm); + writer.WriteBoolean("sweet", bananaReq.Sweet); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/BasquePig.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/BasquePig.cs index fc19bc1927..de3bca6d08 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/BasquePig.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/BasquePig.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,17 +26,24 @@ namespace Org.OpenAPITools.Model /// /// BasquePig /// - public partial class BasquePig : IEquatable, IValidatableObject + public partial class BasquePig : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// className (required) + /// className + [JsonConstructor] public BasquePig(string className) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + if (className == null) throw new ArgumentNullException("className is a required property for BasquePig and cannot be null."); +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + ClassName = className; } @@ -51,7 +57,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -66,48 +72,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as BasquePig).AreEqual; - } - - /// - /// Returns true if BasquePig instances are equal - /// - /// Instance of BasquePig to be compared - /// Boolean - public bool Equals(BasquePig input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ClassName != null) - { - hashCode = (hashCode * 59) + this.ClassName.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -119,4 +83,71 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type BasquePig + /// + public class BasquePigJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override BasquePig Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string className = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "className": + className = reader.GetString(); + break; + default: + break; + } + } + } + + return new BasquePig(className); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, BasquePig basquePig, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("className", basquePig.ClassName); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Capitalization.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Capitalization.cs index 92d9249496..0d25bc7061 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Capitalization.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Capitalization.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,32 +26,58 @@ namespace Org.OpenAPITools.Model /// /// Capitalization /// - public partial class Capitalization : IEquatable, IValidatableObject + public partial class Capitalization : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// smallCamel + /// Name of the pet /// capitalCamel - /// smallSnake /// capitalSnake /// sCAETHFlowPoints - /// Name of the pet - public Capitalization(string smallCamel = default, string capitalCamel = default, string smallSnake = default, string capitalSnake = default, string sCAETHFlowPoints = default, string aTTNAME = default) + /// smallCamel + /// smallSnake + [JsonConstructor] + public Capitalization(string aTTNAME, string capitalCamel, string capitalSnake, string sCAETHFlowPoints, string smallCamel, string smallSnake) { - SmallCamel = smallCamel; +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (smallCamel == null) + throw new ArgumentNullException("smallCamel is a required property for Capitalization and cannot be null."); + + if (capitalCamel == null) + throw new ArgumentNullException("capitalCamel is a required property for Capitalization and cannot be null."); + + if (smallSnake == null) + throw new ArgumentNullException("smallSnake is a required property for Capitalization and cannot be null."); + + if (capitalSnake == null) + throw new ArgumentNullException("capitalSnake is a required property for Capitalization and cannot be null."); + + if (sCAETHFlowPoints == null) + throw new ArgumentNullException("sCAETHFlowPoints is a required property for Capitalization and cannot be null."); + + if (aTTNAME == null) + throw new ArgumentNullException("aTTNAME is a required property for Capitalization and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + ATT_NAME = aTTNAME; CapitalCamel = capitalCamel; - SmallSnake = smallSnake; CapitalSnake = capitalSnake; SCAETHFlowPoints = sCAETHFlowPoints; - ATT_NAME = aTTNAME; + SmallCamel = smallCamel; + SmallSnake = smallSnake; } /// - /// Gets or Sets SmallCamel + /// Name of the pet /// - [JsonPropertyName("smallCamel")] - public string SmallCamel { get; set; } + /// Name of the pet + [JsonPropertyName("ATT_NAME")] + public string ATT_NAME { get; set; } /// /// Gets or Sets CapitalCamel @@ -60,12 +85,6 @@ namespace Org.OpenAPITools.Model [JsonPropertyName("CapitalCamel")] public string CapitalCamel { get; set; } - /// - /// Gets or Sets SmallSnake - /// - [JsonPropertyName("small_Snake")] - public string SmallSnake { get; set; } - /// /// Gets or Sets CapitalSnake /// @@ -79,17 +98,22 @@ namespace Org.OpenAPITools.Model public string SCAETHFlowPoints { get; set; } /// - /// Name of the pet + /// Gets or Sets SmallCamel /// - /// Name of the pet - [JsonPropertyName("ATT_NAME")] - public string ATT_NAME { get; set; } + [JsonPropertyName("smallCamel")] + public string SmallCamel { get; set; } + + /// + /// Gets or Sets SmallSnake + /// + [JsonPropertyName("small_Snake")] + public string SmallSnake { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -99,78 +123,16 @@ namespace Org.OpenAPITools.Model { StringBuilder sb = new StringBuilder(); sb.Append("class Capitalization {\n"); - sb.Append(" SmallCamel: ").Append(SmallCamel).Append("\n"); + sb.Append(" ATT_NAME: ").Append(ATT_NAME).Append("\n"); sb.Append(" CapitalCamel: ").Append(CapitalCamel).Append("\n"); - sb.Append(" SmallSnake: ").Append(SmallSnake).Append("\n"); sb.Append(" CapitalSnake: ").Append(CapitalSnake).Append("\n"); sb.Append(" SCAETHFlowPoints: ").Append(SCAETHFlowPoints).Append("\n"); - sb.Append(" ATT_NAME: ").Append(ATT_NAME).Append("\n"); + sb.Append(" SmallCamel: ").Append(SmallCamel).Append("\n"); + sb.Append(" SmallSnake: ").Append(SmallSnake).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Capitalization).AreEqual; - } - - /// - /// Returns true if Capitalization instances are equal - /// - /// Instance of Capitalization to be compared - /// Boolean - public bool Equals(Capitalization input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.SmallCamel != null) - { - hashCode = (hashCode * 59) + this.SmallCamel.GetHashCode(); - } - if (this.CapitalCamel != null) - { - hashCode = (hashCode * 59) + this.CapitalCamel.GetHashCode(); - } - if (this.SmallSnake != null) - { - hashCode = (hashCode * 59) + this.SmallSnake.GetHashCode(); - } - if (this.CapitalSnake != null) - { - hashCode = (hashCode * 59) + this.CapitalSnake.GetHashCode(); - } - if (this.SCAETHFlowPoints != null) - { - hashCode = (hashCode * 59) + this.SCAETHFlowPoints.GetHashCode(); - } - if (this.ATT_NAME != null) - { - hashCode = (hashCode * 59) + this.ATT_NAME.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -182,4 +144,96 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type Capitalization + /// + public class CapitalizationJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override Capitalization Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string aTTNAME = default; + string capitalCamel = default; + string capitalSnake = default; + string sCAETHFlowPoints = default; + string smallCamel = default; + string smallSnake = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "ATT_NAME": + aTTNAME = reader.GetString(); + break; + case "CapitalCamel": + capitalCamel = reader.GetString(); + break; + case "Capital_Snake": + capitalSnake = reader.GetString(); + break; + case "SCA_ETH_Flow_Points": + sCAETHFlowPoints = reader.GetString(); + break; + case "smallCamel": + smallCamel = reader.GetString(); + break; + case "small_Snake": + smallSnake = reader.GetString(); + break; + default: + break; + } + } + } + + return new Capitalization(aTTNAME, capitalCamel, capitalSnake, sCAETHFlowPoints, smallCamel, smallSnake); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Capitalization capitalization, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("ATT_NAME", capitalization.ATT_NAME); + writer.WriteString("CapitalCamel", capitalization.CapitalCamel); + writer.WriteString("Capital_Snake", capitalization.CapitalSnake); + writer.WriteString("SCA_ETH_Flow_Points", capitalization.SCAETHFlowPoints); + writer.WriteString("smallCamel", capitalization.SmallCamel); + writer.WriteString("small_Snake", capitalization.SmallSnake); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Cat.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Cat.cs index b8c35dd406..462e1e3d6e 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Cat.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Cat.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,16 +26,17 @@ namespace Org.OpenAPITools.Model /// /// Cat /// - public partial class Cat : Animal, IEquatable + public partial class Cat : Animal, IValidatableObject { /// /// Initializes a new instance of the class. /// /// /// - /// className (required) + /// className /// color (default to "red") - public Cat(Dictionary dictionary, CatAllOf catAllOf, string className, string color = "red") : base(className, color) + [JsonConstructor] + internal Cat(Dictionary dictionary, CatAllOf catAllOf, string className, string color = "red") : base(className, color) { Dictionary = dictionary; CatAllOf = catAllOf; @@ -64,40 +64,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Cat).AreEqual; - } - - /// - /// Returns true if Cat instances are equal - /// - /// Instance of Cat to be compared - /// Boolean - public bool Equals(Cat input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - return hashCode; - } - } - } /// @@ -105,13 +71,6 @@ namespace Org.OpenAPITools.Model /// public class CatJsonConverter : JsonConverter { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof(Cat).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -124,24 +83,29 @@ namespace Org.OpenAPITools.Model { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); + JsonTokenType startingTokenType = reader.TokenType; + Utf8JsonReader dictionaryReader = reader; - bool dictionaryDeserialized = Client.ClientUtils.TryDeserialize>(ref dictionaryReader, options, out Dictionary dictionary); + bool dictionaryDeserialized = Client.ClientUtils.TryDeserialize>(ref reader, options, out Dictionary dictionary); Utf8JsonReader catAllOfReader = reader; - bool catAllOfDeserialized = Client.ClientUtils.TryDeserialize(ref catAllOfReader, options, out CatAllOf catAllOf); + bool catAllOfDeserialized = Client.ClientUtils.TryDeserialize(ref reader, options, out CatAllOf catAllOf); string className = default; string color = default; while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string propertyName = reader.GetString(); reader.Read(); @@ -154,6 +118,8 @@ namespace Org.OpenAPITools.Model case "color": color = reader.GetString(); break; + default: + break; } } } @@ -168,6 +134,14 @@ namespace Org.OpenAPITools.Model /// /// /// - public override void Write(Utf8JsonWriter writer, Cat cat, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, Cat cat, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("className", cat.ClassName); + writer.WriteString("color", cat.Color); + + writer.WriteEndObject(); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/CatAllOf.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/CatAllOf.cs index f1f19c6c88..bdda428981 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/CatAllOf.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/CatAllOf.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,14 +26,24 @@ namespace Org.OpenAPITools.Model /// /// CatAllOf /// - public partial class CatAllOf : IEquatable, IValidatableObject + public partial class CatAllOf : IValidatableObject { /// /// Initializes a new instance of the class. /// /// declawed - public CatAllOf(bool declawed = default) + [JsonConstructor] + public CatAllOf(bool declawed) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (declawed == null) + throw new ArgumentNullException("declawed is a required property for CatAllOf and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + Declawed = declawed; } @@ -48,7 +57,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -63,45 +72,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as CatAllOf).AreEqual; - } - - /// - /// Returns true if CatAllOf instances are equal - /// - /// Instance of CatAllOf to be compared - /// Boolean - public bool Equals(CatAllOf input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Declawed.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -113,4 +83,71 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type CatAllOf + /// + public class CatAllOfJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override CatAllOf Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + bool declawed = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "declawed": + declawed = reader.GetBoolean(); + break; + default: + break; + } + } + } + + return new CatAllOf(declawed); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, CatAllOf catAllOf, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteBoolean("declawed", catAllOf.Declawed); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Category.cs index be6a1620b1..0a34203a8a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Category.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Category.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,27 +26,31 @@ namespace Org.OpenAPITools.Model /// /// Category /// - public partial class Category : IEquatable, IValidatableObject + public partial class Category : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// name (required) (default to "default-name") /// id - public Category(string name = "default-name", long id = default) + /// name (default to "default-name") + [JsonConstructor] + public Category(long id, string name = "default-name") { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (id == null) + throw new ArgumentNullException("id is a required property for Category and cannot be null."); + if (name == null) throw new ArgumentNullException("name is a required property for Category and cannot be null."); - Name = name; - Id = id; - } +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' - /// - /// Gets or Sets Name - /// - [JsonPropertyName("name")] - public string Name { get; set; } + Id = id; + Name = name; + } /// /// Gets or Sets Id @@ -55,11 +58,17 @@ namespace Org.OpenAPITools.Model [JsonPropertyName("id")] public long Id { get; set; } + /// + /// Gets or Sets Name + /// + [JsonPropertyName("name")] + public string Name { get; set; } + /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -69,55 +78,12 @@ namespace Org.OpenAPITools.Model { StringBuilder sb = new StringBuilder(); sb.Append("class Category {\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Category).AreEqual; - } - - /// - /// Returns true if Category instances are equal - /// - /// Instance of Category to be compared - /// Boolean - public bool Equals(Category input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -129,4 +95,76 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type Category + /// + public class CategoryJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override Category Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + long id = default; + string name = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "id": + id = reader.GetInt64(); + break; + case "name": + name = reader.GetString(); + break; + default: + break; + } + } + } + + return new Category(id, name); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Category category, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteNumber("id", (int)category.Id); + writer.WriteString("name", category.Name); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ChildCat.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ChildCat.cs index 5245528adb..eac43e2327 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ChildCat.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ChildCat.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,14 +26,15 @@ namespace Org.OpenAPITools.Model /// /// ChildCat /// - public partial class ChildCat : ParentPet, IEquatable + public partial class ChildCat : ParentPet, IValidatableObject { /// /// Initializes a new instance of the class. /// /// - /// petType (required) - public ChildCat(ChildCatAllOf childCatAllOf, string petType) : base(petType) + /// petType + [JsonConstructor] + internal ChildCat(ChildCatAllOf childCatAllOf, string petType) : base(petType) { ChildCatAllOf = childCatAllOf; } @@ -56,40 +56,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as ChildCat).AreEqual; - } - - /// - /// Returns true if ChildCat instances are equal - /// - /// Instance of ChildCat to be compared - /// Boolean - public bool Equals(ChildCat input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - return hashCode; - } - } - } /// @@ -97,13 +63,6 @@ namespace Org.OpenAPITools.Model /// public class ChildCatJsonConverter : JsonConverter { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof(ChildCat).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -116,20 +75,25 @@ namespace Org.OpenAPITools.Model { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); + JsonTokenType startingTokenType = reader.TokenType; + Utf8JsonReader childCatAllOfReader = reader; - bool childCatAllOfDeserialized = Client.ClientUtils.TryDeserialize(ref childCatAllOfReader, options, out ChildCatAllOf childCatAllOf); + bool childCatAllOfDeserialized = Client.ClientUtils.TryDeserialize(ref reader, options, out ChildCatAllOf childCatAllOf); string petType = default; while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string propertyName = reader.GetString(); reader.Read(); @@ -139,6 +103,8 @@ namespace Org.OpenAPITools.Model case "pet_type": petType = reader.GetString(); break; + default: + break; } } } @@ -153,6 +119,13 @@ namespace Org.OpenAPITools.Model /// /// /// - public override void Write(Utf8JsonWriter writer, ChildCat childCat, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, ChildCat childCat, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("pet_type", childCat.PetType); + + writer.WriteEndObject(); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ChildCatAllOf.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ChildCatAllOf.cs index bc601c217b..6b768fcd1e 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ChildCatAllOf.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ChildCatAllOf.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,15 +26,28 @@ namespace Org.OpenAPITools.Model /// /// ChildCatAllOf /// - public partial class ChildCatAllOf : IEquatable, IValidatableObject + public partial class ChildCatAllOf : IValidatableObject { /// /// Initializes a new instance of the class. /// /// name /// petType (default to PetTypeEnum.ChildCat) - public ChildCatAllOf(string name = default, PetTypeEnum petType = PetTypeEnum.ChildCat) + [JsonConstructor] + public ChildCatAllOf(string name, PetTypeEnum petType = PetTypeEnum.ChildCat) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (name == null) + throw new ArgumentNullException("name is a required property for ChildCatAllOf and cannot be null."); + + if (petType == null) + throw new ArgumentNullException("petType is a required property for ChildCatAllOf and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + Name = name; PetType = petType; } @@ -48,11 +60,37 @@ namespace Org.OpenAPITools.Model /// /// Enum ChildCat for value: ChildCat /// - [EnumMember(Value = "ChildCat")] ChildCat = 1 } + /// + /// Returns a PetTypeEnum + /// + /// + /// + public static PetTypeEnum PetTypeEnumFromString(string value) + { + if (value == "ChildCat") + return PetTypeEnum.ChildCat; + + throw new NotImplementedException($"Could not convert value to type PetTypeEnum: '{value}'"); + } + + /// + /// Returns equivalent json value + /// + /// + /// + /// + public static string PetTypeEnumToJsonValue(PetTypeEnum value) + { + if (value == PetTypeEnum.ChildCat) + return "ChildCat"; + + throw new NotImplementedException($"Value could not be handled: '{value}'"); + } + /// /// Gets or Sets PetType /// @@ -69,7 +107,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -85,49 +123,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as ChildCatAllOf).AreEqual; - } - - /// - /// Returns true if ChildCatAllOf instances are equal - /// - /// Instance of ChildCatAllOf to be compared - /// Boolean - public bool Equals(ChildCatAllOf input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PetType.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -139,4 +134,81 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type ChildCatAllOf + /// + public class ChildCatAllOfJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override ChildCatAllOf Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string name = default; + ChildCatAllOf.PetTypeEnum petType = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "name": + name = reader.GetString(); + break; + case "pet_type": + string petTypeRawValue = reader.GetString(); + petType = ChildCatAllOf.PetTypeEnumFromString(petTypeRawValue); + break; + default: + break; + } + } + } + + return new ChildCatAllOf(name, petType); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ChildCatAllOf childCatAllOf, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("name", childCatAllOf.Name); + var petTypeRawValue = ChildCatAllOf.PetTypeEnumToJsonValue(childCatAllOf.PetType); + if (petTypeRawValue != null) + writer.WriteString("pet_type", petTypeRawValue); + else + writer.WriteNull("pet_type"); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ClassModel.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ClassModel.cs index 84a40d9489..be70d0da28 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ClassModel.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ClassModel.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,28 +26,38 @@ namespace Org.OpenAPITools.Model /// /// Model for testing model with \"_class\" property /// - public partial class ClassModel : IEquatable, IValidatableObject + public partial class ClassModel : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// _class - public ClassModel(string _class = default) + /// classProperty + [JsonConstructor] + public ClassModel(string classProperty) { - Class = _class; +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (classProperty == null) + throw new ArgumentNullException("classProperty is a required property for ClassModel and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + ClassProperty = classProperty; } /// - /// Gets or Sets Class + /// Gets or Sets ClassProperty /// [JsonPropertyName("_class")] - public string Class { get; set; } + public string ClassProperty { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -58,53 +67,11 @@ namespace Org.OpenAPITools.Model { StringBuilder sb = new StringBuilder(); sb.Append("class ClassModel {\n"); - sb.Append(" Class: ").Append(Class).Append("\n"); + sb.Append(" ClassProperty: ").Append(ClassProperty).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as ClassModel).AreEqual; - } - - /// - /// Returns true if ClassModel instances are equal - /// - /// Instance of ClassModel to be compared - /// Boolean - public bool Equals(ClassModel input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Class != null) - { - hashCode = (hashCode * 59) + this.Class.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -116,4 +83,71 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type ClassModel + /// + public class ClassModelJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override ClassModel Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string classProperty = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "_class": + classProperty = reader.GetString(); + break; + default: + break; + } + } + } + + return new ClassModel(classProperty); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ClassModel classModel, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("_class", classModel.ClassProperty); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs index 2ec6fa15f3..b4c3977c99 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ComplexQuadrilateral.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,14 +26,15 @@ namespace Org.OpenAPITools.Model /// /// ComplexQuadrilateral /// - public partial class ComplexQuadrilateral : IEquatable, IValidatableObject + public partial class ComplexQuadrilateral : IValidatableObject { /// /// Initializes a new instance of the class. /// /// /// - public ComplexQuadrilateral(ShapeInterface shapeInterface, QuadrilateralInterface quadrilateralInterface) + [JsonConstructor] + internal ComplexQuadrilateral(ShapeInterface shapeInterface, QuadrilateralInterface quadrilateralInterface) { ShapeInterface = shapeInterface; QuadrilateralInterface = quadrilateralInterface; @@ -54,7 +54,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -68,44 +68,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as ComplexQuadrilateral).AreEqual; - } - - /// - /// Returns true if ComplexQuadrilateral instances are equal - /// - /// Instance of ComplexQuadrilateral to be compared - /// Boolean - public bool Equals(ComplexQuadrilateral input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -122,13 +84,6 @@ namespace Org.OpenAPITools.Model /// public class ComplexQuadrilateralJsonConverter : JsonConverter { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof(ComplexQuadrilateral).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -141,28 +96,35 @@ namespace Org.OpenAPITools.Model { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); + JsonTokenType startingTokenType = reader.TokenType; + Utf8JsonReader shapeInterfaceReader = reader; - bool shapeInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref shapeInterfaceReader, options, out ShapeInterface shapeInterface); + bool shapeInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref reader, options, out ShapeInterface shapeInterface); Utf8JsonReader quadrilateralInterfaceReader = reader; - bool quadrilateralInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref quadrilateralInterfaceReader, options, out QuadrilateralInterface quadrilateralInterface); + bool quadrilateralInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref reader, options, out QuadrilateralInterface quadrilateralInterface); while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string propertyName = reader.GetString(); reader.Read(); switch (propertyName) { + default: + break; } } } @@ -177,6 +139,12 @@ namespace Org.OpenAPITools.Model /// /// /// - public override void Write(Utf8JsonWriter writer, ComplexQuadrilateral complexQuadrilateral, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, ComplexQuadrilateral complexQuadrilateral, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + + writer.WriteEndObject(); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/DanishPig.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/DanishPig.cs index fdcd66cce7..f0d02bc0b0 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/DanishPig.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/DanishPig.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,17 +26,24 @@ namespace Org.OpenAPITools.Model /// /// DanishPig /// - public partial class DanishPig : IEquatable, IValidatableObject + public partial class DanishPig : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// className (required) + /// className + [JsonConstructor] public DanishPig(string className) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + if (className == null) throw new ArgumentNullException("className is a required property for DanishPig and cannot be null."); +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + ClassName = className; } @@ -51,7 +57,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -66,48 +72,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as DanishPig).AreEqual; - } - - /// - /// Returns true if DanishPig instances are equal - /// - /// Instance of DanishPig to be compared - /// Boolean - public bool Equals(DanishPig input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ClassName != null) - { - hashCode = (hashCode * 59) + this.ClassName.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -119,4 +83,71 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type DanishPig + /// + public class DanishPigJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override DanishPig Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string className = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "className": + className = reader.GetString(); + break; + default: + break; + } + } + } + + return new DanishPig(className); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, DanishPig danishPig, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("className", danishPig.ClassName); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/DeprecatedObject.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/DeprecatedObject.cs index d04aa00655..c5e0f5e2ca 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/DeprecatedObject.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/DeprecatedObject.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,14 +26,24 @@ namespace Org.OpenAPITools.Model /// /// DeprecatedObject /// - public partial class DeprecatedObject : IEquatable, IValidatableObject + public partial class DeprecatedObject : IValidatableObject { /// /// Initializes a new instance of the class. /// /// name - public DeprecatedObject(string name = default) + [JsonConstructor] + public DeprecatedObject(string name) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (name == null) + throw new ArgumentNullException("name is a required property for DeprecatedObject and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + Name = name; } @@ -48,7 +57,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -63,48 +72,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as DeprecatedObject).AreEqual; - } - - /// - /// Returns true if DeprecatedObject instances are equal - /// - /// Instance of DeprecatedObject to be compared - /// Boolean - public bool Equals(DeprecatedObject input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -116,4 +83,71 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type DeprecatedObject + /// + public class DeprecatedObjectJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override DeprecatedObject Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string name = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "name": + name = reader.GetString(); + break; + default: + break; + } + } + } + + return new DeprecatedObject(name); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, DeprecatedObject deprecatedObject, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("name", deprecatedObject.Name); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Dog.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Dog.cs index e00bc00421..ad3da1cfd7 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Dog.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Dog.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,15 +26,16 @@ namespace Org.OpenAPITools.Model /// /// Dog /// - public partial class Dog : Animal, IEquatable + public partial class Dog : Animal, IValidatableObject { /// /// Initializes a new instance of the class. /// /// - /// className (required) + /// className /// color (default to "red") - public Dog(DogAllOf dogAllOf, string className, string color = "red") : base(className, color) + [JsonConstructor] + internal Dog(DogAllOf dogAllOf, string className, string color = "red") : base(className, color) { DogAllOf = dogAllOf; } @@ -57,40 +57,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Dog).AreEqual; - } - - /// - /// Returns true if Dog instances are equal - /// - /// Instance of Dog to be compared - /// Boolean - public bool Equals(Dog input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - return hashCode; - } - } - } /// @@ -98,13 +64,6 @@ namespace Org.OpenAPITools.Model /// public class DogJsonConverter : JsonConverter { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof(Dog).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -117,21 +76,26 @@ namespace Org.OpenAPITools.Model { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); + JsonTokenType startingTokenType = reader.TokenType; + Utf8JsonReader dogAllOfReader = reader; - bool dogAllOfDeserialized = Client.ClientUtils.TryDeserialize(ref dogAllOfReader, options, out DogAllOf dogAllOf); + bool dogAllOfDeserialized = Client.ClientUtils.TryDeserialize(ref reader, options, out DogAllOf dogAllOf); string className = default; string color = default; while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string propertyName = reader.GetString(); reader.Read(); @@ -144,6 +108,8 @@ namespace Org.OpenAPITools.Model case "color": color = reader.GetString(); break; + default: + break; } } } @@ -158,6 +124,14 @@ namespace Org.OpenAPITools.Model /// /// /// - public override void Write(Utf8JsonWriter writer, Dog dog, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, Dog dog, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("className", dog.ClassName); + writer.WriteString("color", dog.Color); + + writer.WriteEndObject(); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/DogAllOf.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/DogAllOf.cs index e35252fa26..2e3092d06b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/DogAllOf.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/DogAllOf.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,14 +26,24 @@ namespace Org.OpenAPITools.Model /// /// DogAllOf /// - public partial class DogAllOf : IEquatable, IValidatableObject + public partial class DogAllOf : IValidatableObject { /// /// Initializes a new instance of the class. /// /// breed - public DogAllOf(string breed = default) + [JsonConstructor] + public DogAllOf(string breed) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (breed == null) + throw new ArgumentNullException("breed is a required property for DogAllOf and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + Breed = breed; } @@ -48,7 +57,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -63,48 +72,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as DogAllOf).AreEqual; - } - - /// - /// Returns true if DogAllOf instances are equal - /// - /// Instance of DogAllOf to be compared - /// Boolean - public bool Equals(DogAllOf input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Breed != null) - { - hashCode = (hashCode * 59) + this.Breed.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -116,4 +83,71 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type DogAllOf + /// + public class DogAllOfJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override DogAllOf Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string breed = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "breed": + breed = reader.GetString(); + break; + default: + break; + } + } + } + + return new DogAllOf(breed); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, DogAllOf dogAllOf, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("breed", dogAllOf.Breed); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Drawing.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Drawing.cs index 4cb653c55d..6de00f1950 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Drawing.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Drawing.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,21 +26,37 @@ namespace Org.OpenAPITools.Model /// /// Drawing /// - public partial class Drawing : Dictionary, IEquatable, IValidatableObject + public partial class Drawing : Dictionary, IValidatableObject { /// /// Initializes a new instance of the class. /// /// mainShape /// shapeOrNull - /// nullableShape /// shapes - public Drawing(Shape mainShape = default, ShapeOrNull shapeOrNull = default, NullableShape nullableShape = default, List shapes = default) : base() + /// nullableShape + [JsonConstructor] + public Drawing(Shape mainShape, ShapeOrNull shapeOrNull, List shapes, NullableShape nullableShape = default) : base() { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (mainShape == null) + throw new ArgumentNullException("mainShape is a required property for Drawing and cannot be null."); + + if (shapeOrNull == null) + throw new ArgumentNullException("shapeOrNull is a required property for Drawing and cannot be null."); + + if (shapes == null) + throw new ArgumentNullException("shapes is a required property for Drawing and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + MainShape = mainShape; ShapeOrNull = shapeOrNull; - NullableShape = nullableShape; Shapes = shapes; + NullableShape = nullableShape; } /// @@ -56,18 +71,18 @@ namespace Org.OpenAPITools.Model [JsonPropertyName("shapeOrNull")] public ShapeOrNull ShapeOrNull { get; set; } - /// - /// Gets or Sets NullableShape - /// - [JsonPropertyName("nullableShape")] - public NullableShape NullableShape { get; set; } - /// /// Gets or Sets Shapes /// [JsonPropertyName("shapes")] public List Shapes { get; set; } + /// + /// Gets or Sets NullableShape + /// + [JsonPropertyName("nullableShape")] + public NullableShape NullableShape { get; set; } + /// /// Returns the string presentation of the object /// @@ -79,61 +94,11 @@ namespace Org.OpenAPITools.Model sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); sb.Append(" MainShape: ").Append(MainShape).Append("\n"); sb.Append(" ShapeOrNull: ").Append(ShapeOrNull).Append("\n"); - sb.Append(" NullableShape: ").Append(NullableShape).Append("\n"); sb.Append(" Shapes: ").Append(Shapes).Append("\n"); + sb.Append(" NullableShape: ").Append(NullableShape).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Drawing).AreEqual; - } - - /// - /// Returns true if Drawing instances are equal - /// - /// Instance of Drawing to be compared - /// Boolean - public bool Equals(Drawing input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.MainShape != null) - { - hashCode = (hashCode * 59) + this.MainShape.GetHashCode(); - } - if (this.ShapeOrNull != null) - { - hashCode = (hashCode * 59) + this.ShapeOrNull.GetHashCode(); - } - if (this.NullableShape != null) - { - hashCode = (hashCode * 59) + this.NullableShape.GetHashCode(); - } - if (this.Shapes != null) - { - hashCode = (hashCode * 59) + this.Shapes.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -145,4 +110,90 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type Drawing + /// + public class DrawingJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override Drawing Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + Shape mainShape = default; + ShapeOrNull shapeOrNull = default; + List shapes = default; + NullableShape nullableShape = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "mainShape": + mainShape = JsonSerializer.Deserialize(ref reader, options); + break; + case "shapeOrNull": + shapeOrNull = JsonSerializer.Deserialize(ref reader, options); + break; + case "shapes": + shapes = JsonSerializer.Deserialize>(ref reader, options); + break; + case "nullableShape": + nullableShape = JsonSerializer.Deserialize(ref reader, options); + break; + default: + break; + } + } + } + + return new Drawing(mainShape, shapeOrNull, shapes, nullableShape); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Drawing drawing, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WritePropertyName("mainShape"); + JsonSerializer.Serialize(writer, drawing.MainShape, options); + writer.WritePropertyName("shapeOrNull"); + JsonSerializer.Serialize(writer, drawing.ShapeOrNull, options); + writer.WritePropertyName("shapes"); + JsonSerializer.Serialize(writer, drawing.Shapes, options); + writer.WritePropertyName("nullableShape"); + JsonSerializer.Serialize(writer, drawing.NullableShape, options); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/EnumArrays.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/EnumArrays.cs index 92f07ad2ee..c6dcd8b5b2 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/EnumArrays.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/EnumArrays.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,17 +26,80 @@ namespace Org.OpenAPITools.Model /// /// EnumArrays /// - public partial class EnumArrays : IEquatable, IValidatableObject + public partial class EnumArrays : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// justSymbol /// arrayEnum - public EnumArrays(JustSymbolEnum justSymbol = default, List arrayEnum = default) + /// justSymbol + [JsonConstructor] + public EnumArrays(List arrayEnum, JustSymbolEnum justSymbol) { - JustSymbol = justSymbol; +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (justSymbol == null) + throw new ArgumentNullException("justSymbol is a required property for EnumArrays and cannot be null."); + + if (arrayEnum == null) + throw new ArgumentNullException("arrayEnum is a required property for EnumArrays and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + ArrayEnum = arrayEnum; + JustSymbol = justSymbol; + } + + /// + /// Defines ArrayEnum + /// + public enum ArrayEnumEnum + { + /// + /// Enum Fish for value: fish + /// + Fish = 1, + + /// + /// Enum Crab for value: crab + /// + Crab = 2 + + } + + /// + /// Returns a ArrayEnumEnum + /// + /// + /// + public static ArrayEnumEnum ArrayEnumEnumFromString(string value) + { + if (value == "fish") + return ArrayEnumEnum.Fish; + + if (value == "crab") + return ArrayEnumEnum.Crab; + + throw new NotImplementedException($"Could not convert value to type ArrayEnumEnum: '{value}'"); + } + + /// + /// Returns equivalent json value + /// + /// + /// + /// + public static string ArrayEnumEnumToJsonValue(ArrayEnumEnum value) + { + if (value == ArrayEnumEnum.Fish) + return "fish"; + + if (value == ArrayEnumEnum.Crab) + return "crab"; + + throw new NotImplementedException($"Value could not be handled: '{value}'"); } /// @@ -48,42 +110,54 @@ namespace Org.OpenAPITools.Model /// /// Enum GreaterThanOrEqualTo for value: >= /// - [EnumMember(Value = ">=")] GreaterThanOrEqualTo = 1, /// /// Enum Dollar for value: $ /// - [EnumMember(Value = "$")] Dollar = 2 } + /// + /// Returns a JustSymbolEnum + /// + /// + /// + public static JustSymbolEnum JustSymbolEnumFromString(string value) + { + if (value == ">=") + return JustSymbolEnum.GreaterThanOrEqualTo; + + if (value == "$") + return JustSymbolEnum.Dollar; + + throw new NotImplementedException($"Could not convert value to type JustSymbolEnum: '{value}'"); + } + + /// + /// Returns equivalent json value + /// + /// + /// + /// + public static string JustSymbolEnumToJsonValue(JustSymbolEnum value) + { + if (value == JustSymbolEnum.GreaterThanOrEqualTo) + return ">="; + + if (value == JustSymbolEnum.Dollar) + return "$"; + + throw new NotImplementedException($"Value could not be handled: '{value}'"); + } + /// /// Gets or Sets JustSymbol /// [JsonPropertyName("just_symbol")] public JustSymbolEnum JustSymbol { get; set; } - /// - /// Defines ArrayEnum - /// - public enum ArrayEnumEnum - { - /// - /// Enum Fish for value: fish - /// - [EnumMember(Value = "fish")] - Fish = 1, - - /// - /// Enum Crab for value: crab - /// - [EnumMember(Value = "crab")] - Crab = 2 - - } - /// /// Gets or Sets ArrayEnum /// @@ -94,7 +168,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -104,55 +178,12 @@ namespace Org.OpenAPITools.Model { StringBuilder sb = new StringBuilder(); sb.Append("class EnumArrays {\n"); - sb.Append(" JustSymbol: ").Append(JustSymbol).Append("\n"); sb.Append(" ArrayEnum: ").Append(ArrayEnum).Append("\n"); + sb.Append(" JustSymbol: ").Append(JustSymbol).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as EnumArrays).AreEqual; - } - - /// - /// Returns true if EnumArrays instances are equal - /// - /// Instance of EnumArrays to be compared - /// Boolean - public bool Equals(EnumArrays input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.JustSymbol.GetHashCode(); - if (this.ArrayEnum != null) - { - hashCode = (hashCode * 59) + this.ArrayEnum.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -164,4 +195,82 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type EnumArrays + /// + public class EnumArraysJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override EnumArrays Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + List arrayEnum = default; + EnumArrays.JustSymbolEnum justSymbol = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "array_enum": + arrayEnum = JsonSerializer.Deserialize>(ref reader, options); + break; + case "just_symbol": + string justSymbolRawValue = reader.GetString(); + justSymbol = EnumArrays.JustSymbolEnumFromString(justSymbolRawValue); + break; + default: + break; + } + } + } + + return new EnumArrays(arrayEnum, justSymbol); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, EnumArrays enumArrays, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WritePropertyName("array_enum"); + JsonSerializer.Serialize(writer, enumArrays.ArrayEnum, options); + var justSymbolRawValue = EnumArrays.JustSymbolEnumToJsonValue(enumArrays.JustSymbol); + if (justSymbolRawValue != null) + writer.WriteString("just_symbol", justSymbolRawValue); + else + writer.WriteNull("just_symbol"); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/EnumClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/EnumClass.cs index 390f7f6ea5..ac9fc84aad 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/EnumClass.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/EnumClass.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -32,20 +31,129 @@ namespace Org.OpenAPITools.Model /// /// Enum Abc for value: _abc /// - [EnumMember(Value = "_abc")] Abc = 1, /// /// Enum Efg for value: -efg /// - [EnumMember(Value = "-efg")] Efg = 2, /// /// Enum Xyz for value: (xyz) /// - [EnumMember(Value = "(xyz)")] Xyz = 3 } + + public class EnumClassConverter : JsonConverter + { + public static EnumClass FromString(string value) + { + if (value == "_abc") + return EnumClass.Abc; + + if (value == "-efg") + return EnumClass.Efg; + + if (value == "(xyz)") + return EnumClass.Xyz; + + throw new NotImplementedException($"Could not convert value to type EnumClass: '{value}'"); + } + + public static EnumClass? FromStringOrDefault(string value) + { + if (value == "_abc") + return EnumClass.Abc; + + if (value == "-efg") + return EnumClass.Efg; + + if (value == "(xyz)") + return EnumClass.Xyz; + + return null; + } + + public static string ToJsonValue(EnumClass value) + { + if (value == EnumClass.Abc) + return "_abc"; + + if (value == EnumClass.Efg) + return "-efg"; + + if (value == EnumClass.Xyz) + return "(xyz)"; + + throw new NotImplementedException($"Value could not be handled: '{value}'"); + } + + /// + /// Returns a from the Json object + /// + /// + /// + /// + /// + public override EnumClass Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string rawValue = reader.GetString(); + + EnumClass? result = EnumClassConverter.FromString(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the EnumClass to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, EnumClass enumClass, JsonSerializerOptions options) + { + writer.WriteStringValue(enumClass.ToString()); + } + } + + public class EnumClassNullableConverter : JsonConverter + { + /// + /// Returns a EnumClass from the Json object + /// + /// + /// + /// + /// + public override EnumClass? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string rawValue = reader.GetString(); + + if (rawValue == null) + return null; + + EnumClass? result = EnumClassConverter.FromString(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, EnumClass? enumClass, JsonSerializerOptions options) + { + writer.WriteStringValue(enumClass?.ToString() ?? "null"); + } + } + } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/EnumTest.cs index 273116bc03..42b07a1407 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/EnumTest.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/EnumTest.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,98 +26,64 @@ namespace Org.OpenAPITools.Model /// /// EnumTest /// - public partial class EnumTest : IEquatable, IValidatableObject + public partial class EnumTest : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// enumStringRequired (required) - /// enumString /// enumInteger /// enumIntegerOnly /// enumNumber - /// outerEnum - /// outerEnumInteger + /// enumString + /// enumStringRequired /// outerEnumDefaultValue + /// outerEnumInteger /// outerEnumIntegerDefaultValue - public EnumTest(EnumStringRequiredEnum enumStringRequired, EnumStringEnum enumString = default, EnumIntegerEnum enumInteger = default, EnumIntegerOnlyEnum enumIntegerOnly = default, EnumNumberEnum enumNumber = default, OuterEnum outerEnum = default, OuterEnumInteger outerEnumInteger = default, OuterEnumDefaultValue outerEnumDefaultValue = default, OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue = default) + /// outerEnum + [JsonConstructor] + public EnumTest(EnumIntegerEnum enumInteger, EnumIntegerOnlyEnum enumIntegerOnly, EnumNumberEnum enumNumber, EnumStringEnum enumString, EnumStringRequiredEnum enumStringRequired, OuterEnumDefaultValue outerEnumDefaultValue, OuterEnumInteger outerEnumInteger, OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue, OuterEnum? outerEnum = default) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (enumString == null) + throw new ArgumentNullException("enumString is a required property for EnumTest and cannot be null."); + if (enumStringRequired == null) throw new ArgumentNullException("enumStringRequired is a required property for EnumTest and cannot be null."); - EnumStringRequired = enumStringRequired; - EnumString = enumString; + if (enumInteger == null) + throw new ArgumentNullException("enumInteger is a required property for EnumTest and cannot be null."); + + if (enumIntegerOnly == null) + throw new ArgumentNullException("enumIntegerOnly is a required property for EnumTest and cannot be null."); + + if (enumNumber == null) + throw new ArgumentNullException("enumNumber is a required property for EnumTest and cannot be null."); + + if (outerEnumInteger == null) + throw new ArgumentNullException("outerEnumInteger is a required property for EnumTest and cannot be null."); + + if (outerEnumDefaultValue == null) + throw new ArgumentNullException("outerEnumDefaultValue is a required property for EnumTest and cannot be null."); + + if (outerEnumIntegerDefaultValue == null) + throw new ArgumentNullException("outerEnumIntegerDefaultValue is a required property for EnumTest and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + EnumInteger = enumInteger; EnumIntegerOnly = enumIntegerOnly; EnumNumber = enumNumber; - OuterEnum = outerEnum; - OuterEnumInteger = outerEnumInteger; + EnumString = enumString; + EnumStringRequired = enumStringRequired; OuterEnumDefaultValue = outerEnumDefaultValue; + OuterEnumInteger = outerEnumInteger; OuterEnumIntegerDefaultValue = outerEnumIntegerDefaultValue; + OuterEnum = outerEnum; } - /// - /// Defines EnumStringRequired - /// - public enum EnumStringRequiredEnum - { - /// - /// Enum UPPER for value: UPPER - /// - [EnumMember(Value = "UPPER")] - UPPER = 1, - - /// - /// Enum Lower for value: lower - /// - [EnumMember(Value = "lower")] - Lower = 2, - - /// - /// Enum Empty for value: - /// - [EnumMember(Value = "")] - Empty = 3 - - } - - /// - /// Gets or Sets EnumStringRequired - /// - [JsonPropertyName("enum_string_required")] - public EnumStringRequiredEnum EnumStringRequired { get; set; } - - /// - /// Defines EnumString - /// - public enum EnumStringEnum - { - /// - /// Enum UPPER for value: UPPER - /// - [EnumMember(Value = "UPPER")] - UPPER = 1, - - /// - /// Enum Lower for value: lower - /// - [EnumMember(Value = "lower")] - Lower = 2, - - /// - /// Enum Empty for value: - /// - [EnumMember(Value = "")] - Empty = 3 - - } - - /// - /// Gets or Sets EnumString - /// - [JsonPropertyName("enum_string")] - public EnumStringEnum EnumString { get; set; } - /// /// Defines EnumInteger /// @@ -136,6 +101,33 @@ namespace Org.OpenAPITools.Model } + /// + /// Returns a EnumIntegerEnum + /// + /// + /// + public static EnumIntegerEnum EnumIntegerEnumFromString(string value) + { + if (value == (1).ToString()) + return EnumIntegerEnum.NUMBER_1; + + if (value == (-1).ToString()) + return EnumIntegerEnum.NUMBER_MINUS_1; + + throw new NotImplementedException($"Could not convert value to type EnumIntegerEnum: '{value}'"); + } + + /// + /// Returns equivalent json value + /// + /// + /// + /// + public static int EnumIntegerEnumToJsonValue(EnumIntegerEnum value) + { + return (int) value; + } + /// /// Gets or Sets EnumInteger /// @@ -159,6 +151,33 @@ namespace Org.OpenAPITools.Model } + /// + /// Returns a EnumIntegerOnlyEnum + /// + /// + /// + public static EnumIntegerOnlyEnum EnumIntegerOnlyEnumFromString(string value) + { + if (value == (2).ToString()) + return EnumIntegerOnlyEnum.NUMBER_2; + + if (value == (-2).ToString()) + return EnumIntegerOnlyEnum.NUMBER_MINUS_2; + + throw new NotImplementedException($"Could not convert value to type EnumIntegerOnlyEnum: '{value}'"); + } + + /// + /// Returns equivalent json value + /// + /// + /// + /// + public static int EnumIntegerOnlyEnumToJsonValue(EnumIntegerOnlyEnum value) + { + return (int) value; + } + /// /// Gets or Sets EnumIntegerOnly /// @@ -173,17 +192,48 @@ namespace Org.OpenAPITools.Model /// /// Enum NUMBER_1_DOT_1 for value: 1.1 /// - [EnumMember(Value = "1.1")] NUMBER_1_DOT_1 = 1, /// /// Enum NUMBER_MINUS_1_DOT_2 for value: -1.2 /// - [EnumMember(Value = "-1.2")] NUMBER_MINUS_1_DOT_2 = 2 } + /// + /// Returns a EnumNumberEnum + /// + /// + /// + public static EnumNumberEnum EnumNumberEnumFromString(string value) + { + if (value == "1.1") + return EnumNumberEnum.NUMBER_1_DOT_1; + + if (value == "-1.2") + return EnumNumberEnum.NUMBER_MINUS_1_DOT_2; + + throw new NotImplementedException($"Could not convert value to type EnumNumberEnum: '{value}'"); + } + + /// + /// Returns equivalent json value + /// + /// + /// + /// + public static string EnumNumberEnumToJsonValue(EnumNumberEnum value) + { + if (value == EnumNumberEnum.NUMBER_1_DOT_1) + return "1.1"; + + if (value == EnumNumberEnum.NUMBER_MINUS_1_DOT_2) + return "-1.2"; + + throw new NotImplementedException($"Value could not be handled: '{value}'"); + } + /// /// Gets or Sets EnumNumber /// @@ -191,16 +241,138 @@ namespace Org.OpenAPITools.Model public EnumNumberEnum EnumNumber { get; set; } /// - /// Gets or Sets OuterEnum + /// Defines EnumString /// - [JsonPropertyName("outerEnum")] - public OuterEnum OuterEnum { get; set; } + public enum EnumStringEnum + { + /// + /// Enum UPPER for value: UPPER + /// + UPPER = 1, + + /// + /// Enum Lower for value: lower + /// + Lower = 2, + + /// + /// Enum Empty for value: + /// + Empty = 3 + + } /// - /// Gets or Sets OuterEnumInteger + /// Returns a EnumStringEnum /// - [JsonPropertyName("outerEnumInteger")] - public OuterEnumInteger OuterEnumInteger { get; set; } + /// + /// + public static EnumStringEnum EnumStringEnumFromString(string value) + { + if (value == "UPPER") + return EnumStringEnum.UPPER; + + if (value == "lower") + return EnumStringEnum.Lower; + + if (value == "") + return EnumStringEnum.Empty; + + throw new NotImplementedException($"Could not convert value to type EnumStringEnum: '{value}'"); + } + + /// + /// Returns equivalent json value + /// + /// + /// + /// + public static string EnumStringEnumToJsonValue(EnumStringEnum value) + { + if (value == EnumStringEnum.UPPER) + return "UPPER"; + + if (value == EnumStringEnum.Lower) + return "lower"; + + if (value == EnumStringEnum.Empty) + return ""; + + throw new NotImplementedException($"Value could not be handled: '{value}'"); + } + + /// + /// Gets or Sets EnumString + /// + [JsonPropertyName("enum_string")] + public EnumStringEnum EnumString { get; set; } + + /// + /// Defines EnumStringRequired + /// + public enum EnumStringRequiredEnum + { + /// + /// Enum UPPER for value: UPPER + /// + UPPER = 1, + + /// + /// Enum Lower for value: lower + /// + Lower = 2, + + /// + /// Enum Empty for value: + /// + Empty = 3 + + } + + /// + /// Returns a EnumStringRequiredEnum + /// + /// + /// + public static EnumStringRequiredEnum EnumStringRequiredEnumFromString(string value) + { + if (value == "UPPER") + return EnumStringRequiredEnum.UPPER; + + if (value == "lower") + return EnumStringRequiredEnum.Lower; + + if (value == "") + return EnumStringRequiredEnum.Empty; + + throw new NotImplementedException($"Could not convert value to type EnumStringRequiredEnum: '{value}'"); + } + + /// + /// Returns equivalent json value + /// + /// + /// + /// + public static string EnumStringRequiredEnumToJsonValue(EnumStringRequiredEnum value) + { + if (value == EnumStringRequiredEnum.UPPER) + return "UPPER"; + + if (value == EnumStringRequiredEnum.Lower) + return "lower"; + + if (value == EnumStringRequiredEnum.Empty) + return ""; + + throw new NotImplementedException($"Value could not be handled: '{value}'"); + } + + /// + /// Gets or Sets EnumStringRequired + /// + [JsonPropertyName("enum_string_required")] + public EnumStringRequiredEnum EnumStringRequired { get; set; } /// /// Gets or Sets OuterEnumDefaultValue @@ -208,17 +380,29 @@ namespace Org.OpenAPITools.Model [JsonPropertyName("outerEnumDefaultValue")] public OuterEnumDefaultValue OuterEnumDefaultValue { get; set; } + /// + /// Gets or Sets OuterEnumInteger + /// + [JsonPropertyName("outerEnumInteger")] + public OuterEnumInteger OuterEnumInteger { get; set; } + /// /// Gets or Sets OuterEnumIntegerDefaultValue /// [JsonPropertyName("outerEnumIntegerDefaultValue")] public OuterEnumIntegerDefaultValue OuterEnumIntegerDefaultValue { get; set; } + /// + /// Gets or Sets OuterEnum + /// + [JsonPropertyName("outerEnum")] + public OuterEnum? OuterEnum { get; set; } + /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -228,66 +412,19 @@ namespace Org.OpenAPITools.Model { StringBuilder sb = new StringBuilder(); sb.Append("class EnumTest {\n"); - sb.Append(" EnumStringRequired: ").Append(EnumStringRequired).Append("\n"); - sb.Append(" EnumString: ").Append(EnumString).Append("\n"); sb.Append(" EnumInteger: ").Append(EnumInteger).Append("\n"); sb.Append(" EnumIntegerOnly: ").Append(EnumIntegerOnly).Append("\n"); sb.Append(" EnumNumber: ").Append(EnumNumber).Append("\n"); - sb.Append(" OuterEnum: ").Append(OuterEnum).Append("\n"); - sb.Append(" OuterEnumInteger: ").Append(OuterEnumInteger).Append("\n"); + sb.Append(" EnumString: ").Append(EnumString).Append("\n"); + sb.Append(" EnumStringRequired: ").Append(EnumStringRequired).Append("\n"); sb.Append(" OuterEnumDefaultValue: ").Append(OuterEnumDefaultValue).Append("\n"); + sb.Append(" OuterEnumInteger: ").Append(OuterEnumInteger).Append("\n"); sb.Append(" OuterEnumIntegerDefaultValue: ").Append(OuterEnumIntegerDefaultValue).Append("\n"); + sb.Append(" OuterEnum: ").Append(OuterEnum).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as EnumTest).AreEqual; - } - - /// - /// Returns true if EnumTest instances are equal - /// - /// Instance of EnumTest to be compared - /// Boolean - public bool Equals(EnumTest input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.EnumStringRequired.GetHashCode(); - hashCode = (hashCode * 59) + this.EnumString.GetHashCode(); - hashCode = (hashCode * 59) + this.EnumInteger.GetHashCode(); - hashCode = (hashCode * 59) + this.EnumIntegerOnly.GetHashCode(); - hashCode = (hashCode * 59) + this.EnumNumber.GetHashCode(); - hashCode = (hashCode * 59) + this.OuterEnum.GetHashCode(); - hashCode = (hashCode * 59) + this.OuterEnumInteger.GetHashCode(); - hashCode = (hashCode * 59) + this.OuterEnumDefaultValue.GetHashCode(); - hashCode = (hashCode * 59) + this.OuterEnumIntegerDefaultValue.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -299,4 +436,143 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type EnumTest + /// + public class EnumTestJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override EnumTest Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + EnumTest.EnumIntegerEnum enumInteger = default; + EnumTest.EnumIntegerOnlyEnum enumIntegerOnly = default; + EnumTest.EnumNumberEnum enumNumber = default; + EnumTest.EnumStringEnum enumString = default; + EnumTest.EnumStringRequiredEnum enumStringRequired = default; + OuterEnumDefaultValue outerEnumDefaultValue = default; + OuterEnumInteger outerEnumInteger = default; + OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue = default; + OuterEnum? outerEnum = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "enum_integer": + enumInteger = (EnumTest.EnumIntegerEnum) reader.GetInt32(); + break; + case "enum_integer_only": + enumIntegerOnly = (EnumTest.EnumIntegerOnlyEnum) reader.GetInt32(); + break; + case "enum_number": + enumNumber = (EnumTest.EnumNumberEnum) reader.GetInt32(); + break; + case "enum_string": + string enumStringRawValue = reader.GetString(); + enumString = EnumTest.EnumStringEnumFromString(enumStringRawValue); + break; + case "enum_string_required": + string enumStringRequiredRawValue = reader.GetString(); + enumStringRequired = EnumTest.EnumStringRequiredEnumFromString(enumStringRequiredRawValue); + break; + case "outerEnumDefaultValue": + string outerEnumDefaultValueRawValue = reader.GetString(); + outerEnumDefaultValue = OuterEnumDefaultValueConverter.FromString(outerEnumDefaultValueRawValue); + break; + case "outerEnumInteger": + string outerEnumIntegerRawValue = reader.GetString(); + outerEnumInteger = OuterEnumIntegerConverter.FromString(outerEnumIntegerRawValue); + break; + case "outerEnumIntegerDefaultValue": + string outerEnumIntegerDefaultValueRawValue = reader.GetString(); + outerEnumIntegerDefaultValue = OuterEnumIntegerDefaultValueConverter.FromString(outerEnumIntegerDefaultValueRawValue); + break; + case "outerEnum": + string outerEnumRawValue = reader.GetString(); + outerEnum = OuterEnumConverter.FromStringOrDefault(outerEnumRawValue); + break; + default: + break; + } + } + } + + return new EnumTest(enumInteger, enumIntegerOnly, enumNumber, enumString, enumStringRequired, outerEnumDefaultValue, outerEnumInteger, outerEnumIntegerDefaultValue, outerEnum); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, EnumTest enumTest, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteNumber("enum_integer", (int)enumTest.EnumInteger); + writer.WriteNumber("enum_integer_only", (int)enumTest.EnumIntegerOnly); + writer.WriteNumber("enum_number", (int)enumTest.EnumNumber); + var enumStringRawValue = EnumTest.EnumStringEnumToJsonValue(enumTest.EnumString); + if (enumStringRawValue != null) + writer.WriteString("enum_string", enumStringRawValue); + else + writer.WriteNull("enum_string"); + var enumStringRequiredRawValue = EnumTest.EnumStringRequiredEnumToJsonValue(enumTest.EnumStringRequired); + if (enumStringRequiredRawValue != null) + writer.WriteString("enum_string_required", enumStringRequiredRawValue); + else + writer.WriteNull("enum_string_required"); + var outerEnumDefaultValueRawValue = OuterEnumDefaultValueConverter.ToJsonValue(enumTest.OuterEnumDefaultValue); + if (outerEnumDefaultValueRawValue != null) + writer.WriteString("outerEnumDefaultValue", outerEnumDefaultValueRawValue); + else + writer.WriteNull("outerEnumDefaultValue"); + var outerEnumIntegerRawValue = OuterEnumIntegerConverter.ToJsonValue(enumTest.OuterEnumInteger); + if (outerEnumIntegerRawValue != null) + writer.WriteNumber("outerEnumInteger", outerEnumIntegerRawValue); + else + writer.WriteNull("outerEnumInteger"); + var outerEnumIntegerDefaultValueRawValue = OuterEnumIntegerDefaultValueConverter.ToJsonValue(enumTest.OuterEnumIntegerDefaultValue); + if (outerEnumIntegerDefaultValueRawValue != null) + writer.WriteNumber("outerEnumIntegerDefaultValue", outerEnumIntegerDefaultValueRawValue); + else + writer.WriteNull("outerEnumIntegerDefaultValue"); + if (enumTest.OuterEnum == null) + writer.WriteNull("outerEnum"); + var outerEnumRawValue = OuterEnumConverter.ToJsonValue(enumTest.OuterEnum.Value); + if (outerEnumRawValue != null) + writer.WriteString("outerEnum", outerEnumRawValue); + else + writer.WriteNull("outerEnum"); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/EquilateralTriangle.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/EquilateralTriangle.cs index e6fc1aa4f3..c4d54d076a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/EquilateralTriangle.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/EquilateralTriangle.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,14 +26,15 @@ namespace Org.OpenAPITools.Model /// /// EquilateralTriangle /// - public partial class EquilateralTriangle : IEquatable, IValidatableObject + public partial class EquilateralTriangle : IValidatableObject { /// /// Initializes a new instance of the class. /// /// /// - public EquilateralTriangle(ShapeInterface shapeInterface, TriangleInterface triangleInterface) + [JsonConstructor] + internal EquilateralTriangle(ShapeInterface shapeInterface, TriangleInterface triangleInterface) { ShapeInterface = shapeInterface; TriangleInterface = triangleInterface; @@ -54,7 +54,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -68,44 +68,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as EquilateralTriangle).AreEqual; - } - - /// - /// Returns true if EquilateralTriangle instances are equal - /// - /// Instance of EquilateralTriangle to be compared - /// Boolean - public bool Equals(EquilateralTriangle input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -122,13 +84,6 @@ namespace Org.OpenAPITools.Model /// public class EquilateralTriangleJsonConverter : JsonConverter { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof(EquilateralTriangle).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -141,28 +96,35 @@ namespace Org.OpenAPITools.Model { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); + JsonTokenType startingTokenType = reader.TokenType; + Utf8JsonReader shapeInterfaceReader = reader; - bool shapeInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref shapeInterfaceReader, options, out ShapeInterface shapeInterface); + bool shapeInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref reader, options, out ShapeInterface shapeInterface); Utf8JsonReader triangleInterfaceReader = reader; - bool triangleInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref triangleInterfaceReader, options, out TriangleInterface triangleInterface); + bool triangleInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref reader, options, out TriangleInterface triangleInterface); while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string propertyName = reader.GetString(); reader.Read(); switch (propertyName) { + default: + break; } } } @@ -177,6 +139,12 @@ namespace Org.OpenAPITools.Model /// /// /// - public override void Write(Utf8JsonWriter writer, EquilateralTriangle equilateralTriangle, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, EquilateralTriangle equilateralTriangle, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + + writer.WriteEndObject(); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/File.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/File.cs index 86163355ea..5762b5a528 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/File.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/File.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,14 +26,24 @@ namespace Org.OpenAPITools.Model /// /// Must be named `File` for test. /// - public partial class File : IEquatable, IValidatableObject + public partial class File : IValidatableObject { /// /// Initializes a new instance of the class. /// /// Test capitalization - public File(string sourceURI = default) + [JsonConstructor] + public File(string sourceURI) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (sourceURI == null) + throw new ArgumentNullException("sourceURI is a required property for File and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + SourceURI = sourceURI; } @@ -49,7 +58,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -64,48 +73,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as File).AreEqual; - } - - /// - /// Returns true if File instances are equal - /// - /// Instance of File to be compared - /// Boolean - public bool Equals(File input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.SourceURI != null) - { - hashCode = (hashCode * 59) + this.SourceURI.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -117,4 +84,71 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type File + /// + public class FileJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override File Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string sourceURI = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "sourceURI": + sourceURI = reader.GetString(); + break; + default: + break; + } + } + } + + return new File(sourceURI); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, File file, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("sourceURI", file.SourceURI); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs index 366ead31ee..d71951f5df 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,15 +26,28 @@ namespace Org.OpenAPITools.Model /// /// FileSchemaTestClass /// - public partial class FileSchemaTestClass : IEquatable, IValidatableObject + public partial class FileSchemaTestClass : IValidatableObject { /// /// Initializes a new instance of the class. /// /// file /// files - public FileSchemaTestClass(File file = default, List files = default) + [JsonConstructor] + public FileSchemaTestClass(File file, List files) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (file == null) + throw new ArgumentNullException("file is a required property for FileSchemaTestClass and cannot be null."); + + if (files == null) + throw new ArgumentNullException("files is a required property for FileSchemaTestClass and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + File = file; Files = files; } @@ -56,7 +68,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -72,52 +84,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as FileSchemaTestClass).AreEqual; - } - - /// - /// Returns true if FileSchemaTestClass instances are equal - /// - /// Instance of FileSchemaTestClass to be compared - /// Boolean - public bool Equals(FileSchemaTestClass input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.File != null) - { - hashCode = (hashCode * 59) + this.File.GetHashCode(); - } - if (this.Files != null) - { - hashCode = (hashCode * 59) + this.Files.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -129,4 +95,78 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type FileSchemaTestClass + /// + public class FileSchemaTestClassJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override FileSchemaTestClass Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + File file = default; + List files = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "file": + file = JsonSerializer.Deserialize(ref reader, options); + break; + case "files": + files = JsonSerializer.Deserialize>(ref reader, options); + break; + default: + break; + } + } + } + + return new FileSchemaTestClass(file, files); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, FileSchemaTestClass fileSchemaTestClass, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WritePropertyName("file"); + JsonSerializer.Serialize(writer, fileSchemaTestClass.File, options); + writer.WritePropertyName("files"); + JsonSerializer.Serialize(writer, fileSchemaTestClass.Files, options); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Foo.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Foo.cs index 8be5cfe140..57810a84fe 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Foo.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Foo.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,14 +26,24 @@ namespace Org.OpenAPITools.Model /// /// Foo /// - public partial class Foo : IEquatable, IValidatableObject + public partial class Foo : IValidatableObject { /// /// Initializes a new instance of the class. /// /// bar (default to "bar") + [JsonConstructor] public Foo(string bar = "bar") { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (bar == null) + throw new ArgumentNullException("bar is a required property for Foo and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + Bar = bar; } @@ -48,7 +57,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -63,48 +72,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Foo).AreEqual; - } - - /// - /// Returns true if Foo instances are equal - /// - /// Instance of Foo to be compared - /// Boolean - public bool Equals(Foo input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Bar != null) - { - hashCode = (hashCode * 59) + this.Bar.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -116,4 +83,71 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type Foo + /// + public class FooJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override Foo Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string bar = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "bar": + bar = reader.GetString(); + break; + default: + break; + } + } + } + + return new Foo(bar); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Foo foo, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("bar", foo.Bar); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs index e32cb9257e..a17a59ac54 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,28 +26,38 @@ namespace Org.OpenAPITools.Model /// /// FooGetDefaultResponse /// - public partial class FooGetDefaultResponse : IEquatable, IValidatableObject + public partial class FooGetDefaultResponse : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// _string - public FooGetDefaultResponse(Foo _string = default) + /// stringProperty + [JsonConstructor] + public FooGetDefaultResponse(Foo stringProperty) { - String = _string; +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (stringProperty == null) + throw new ArgumentNullException("stringProperty is a required property for FooGetDefaultResponse and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + StringProperty = stringProperty; } /// - /// Gets or Sets String + /// Gets or Sets StringProperty /// [JsonPropertyName("string")] - public Foo String { get; set; } + public Foo StringProperty { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -58,53 +67,11 @@ namespace Org.OpenAPITools.Model { StringBuilder sb = new StringBuilder(); sb.Append("class FooGetDefaultResponse {\n"); - sb.Append(" String: ").Append(String).Append("\n"); + sb.Append(" StringProperty: ").Append(StringProperty).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as FooGetDefaultResponse).AreEqual; - } - - /// - /// Returns true if FooGetDefaultResponse instances are equal - /// - /// Instance of FooGetDefaultResponse to be compared - /// Boolean - public bool Equals(FooGetDefaultResponse input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.String != null) - { - hashCode = (hashCode * 59) + this.String.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -116,4 +83,72 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type FooGetDefaultResponse + /// + public class FooGetDefaultResponseJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override FooGetDefaultResponse Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + Foo stringProperty = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "string": + stringProperty = JsonSerializer.Deserialize(ref reader, options); + break; + default: + break; + } + } + } + + return new FooGetDefaultResponse(stringProperty); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, FooGetDefaultResponse fooGetDefaultResponse, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WritePropertyName("string"); + JsonSerializer.Serialize(writer, fooGetDefaultResponse.StringProperty, options); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/FormatTest.cs index a767556f46..f3b4b2a994 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/FormatTest.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/FormatTest.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,70 +26,113 @@ namespace Org.OpenAPITools.Model /// /// FormatTest /// - public partial class FormatTest : IEquatable, IValidatableObject + public partial class FormatTest : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// number (required) - /// _byte (required) - /// date (required) - /// password (required) - /// integer + /// binary + /// byteProperty + /// date + /// dateTime + /// decimalProperty + /// doubleProperty + /// floatProperty /// int32 /// int64 - /// _float - /// _double - /// _decimal - /// _string - /// binary - /// dateTime - /// uuid + /// integer + /// number + /// password /// A string that is a 10 digit number. Can have leading zeros. /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. - public FormatTest(decimal number, byte[] _byte, DateTime date, string password, int integer = default, int int32 = default, long int64 = default, float _float = default, double _double = default, decimal _decimal = default, string _string = default, System.IO.Stream binary = default, DateTime dateTime = default, Guid uuid = default, string patternWithDigits = default, string patternWithDigitsAndDelimiter = default) + /// stringProperty + /// uuid + [JsonConstructor] + public FormatTest(System.IO.Stream binary, byte[] byteProperty, DateTime date, DateTime dateTime, decimal decimalProperty, double doubleProperty, float floatProperty, int int32, long int64, int integer, decimal number, string password, string patternWithDigits, string patternWithDigitsAndDelimiter, string stringProperty, Guid uuid) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (integer == null) + throw new ArgumentNullException("integer is a required property for FormatTest and cannot be null."); + + if (int32 == null) + throw new ArgumentNullException("int32 is a required property for FormatTest and cannot be null."); + + if (int64 == null) + throw new ArgumentNullException("int64 is a required property for FormatTest and cannot be null."); + if (number == null) throw new ArgumentNullException("number is a required property for FormatTest and cannot be null."); - if (_byte == null) - throw new ArgumentNullException("_byte is a required property for FormatTest and cannot be null."); + if (floatProperty == null) + throw new ArgumentNullException("floatProperty is a required property for FormatTest and cannot be null."); + + if (doubleProperty == null) + throw new ArgumentNullException("doubleProperty is a required property for FormatTest and cannot be null."); + + if (decimalProperty == null) + throw new ArgumentNullException("decimalProperty is a required property for FormatTest and cannot be null."); + + if (stringProperty == null) + throw new ArgumentNullException("stringProperty is a required property for FormatTest and cannot be null."); + + if (byteProperty == null) + throw new ArgumentNullException("byteProperty is a required property for FormatTest and cannot be null."); + + if (binary == null) + throw new ArgumentNullException("binary is a required property for FormatTest and cannot be null."); if (date == null) throw new ArgumentNullException("date is a required property for FormatTest and cannot be null."); + if (dateTime == null) + throw new ArgumentNullException("dateTime is a required property for FormatTest and cannot be null."); + + if (uuid == null) + throw new ArgumentNullException("uuid is a required property for FormatTest and cannot be null."); + if (password == null) throw new ArgumentNullException("password is a required property for FormatTest and cannot be null."); - Number = number; - Byte = _byte; + if (patternWithDigits == null) + throw new ArgumentNullException("patternWithDigits is a required property for FormatTest and cannot be null."); + + if (patternWithDigitsAndDelimiter == null) + throw new ArgumentNullException("patternWithDigitsAndDelimiter is a required property for FormatTest and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + Binary = binary; + ByteProperty = byteProperty; Date = date; - Password = password; - Integer = integer; + DateTime = dateTime; + DecimalProperty = decimalProperty; + DoubleProperty = doubleProperty; + FloatProperty = floatProperty; Int32 = int32; Int64 = int64; - Float = _float; - Double = _double; - Decimal = _decimal; - String = _string; - Binary = binary; - DateTime = dateTime; - Uuid = uuid; + Integer = integer; + Number = number; + Password = password; PatternWithDigits = patternWithDigits; PatternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; + StringProperty = stringProperty; + Uuid = uuid; } /// - /// Gets or Sets Number + /// Gets or Sets Binary /// - [JsonPropertyName("number")] - public decimal Number { get; set; } + [JsonPropertyName("binary")] + public System.IO.Stream Binary { get; set; } /// - /// Gets or Sets Byte + /// Gets or Sets ByteProperty /// [JsonPropertyName("byte")] - public byte[] Byte { get; set; } + public byte[] ByteProperty { get; set; } /// /// Gets or Sets Date @@ -99,16 +141,28 @@ namespace Org.OpenAPITools.Model public DateTime Date { get; set; } /// - /// Gets or Sets Password + /// Gets or Sets DateTime /// - [JsonPropertyName("password")] - public string Password { get; set; } + [JsonPropertyName("dateTime")] + public DateTime DateTime { get; set; } /// - /// Gets or Sets Integer + /// Gets or Sets DecimalProperty /// - [JsonPropertyName("integer")] - public int Integer { get; set; } + [JsonPropertyName("decimal")] + public decimal DecimalProperty { get; set; } + + /// + /// Gets or Sets DoubleProperty + /// + [JsonPropertyName("double")] + public double DoubleProperty { get; set; } + + /// + /// Gets or Sets FloatProperty + /// + [JsonPropertyName("float")] + public float FloatProperty { get; set; } /// /// Gets or Sets Int32 @@ -123,46 +177,22 @@ namespace Org.OpenAPITools.Model public long Int64 { get; set; } /// - /// Gets or Sets Float + /// Gets or Sets Integer /// - [JsonPropertyName("float")] - public float Float { get; set; } + [JsonPropertyName("integer")] + public int Integer { get; set; } /// - /// Gets or Sets Double + /// Gets or Sets Number /// - [JsonPropertyName("double")] - public double Double { get; set; } + [JsonPropertyName("number")] + public decimal Number { get; set; } /// - /// Gets or Sets Decimal + /// Gets or Sets Password /// - [JsonPropertyName("decimal")] - public decimal Decimal { get; set; } - - /// - /// Gets or Sets String - /// - [JsonPropertyName("string")] - public string String { get; set; } - - /// - /// Gets or Sets Binary - /// - [JsonPropertyName("binary")] - public System.IO.Stream Binary { get; set; } - - /// - /// Gets or Sets DateTime - /// - [JsonPropertyName("dateTime")] - public DateTime DateTime { get; set; } - - /// - /// Gets or Sets Uuid - /// - [JsonPropertyName("uuid")] - public Guid Uuid { get; set; } + [JsonPropertyName("password")] + public string Password { get; set; } /// /// A string that is a 10 digit number. Can have leading zeros. @@ -178,11 +208,23 @@ namespace Org.OpenAPITools.Model [JsonPropertyName("pattern_with_digits_and_delimiter")] public string PatternWithDigitsAndDelimiter { get; set; } + /// + /// Gets or Sets StringProperty + /// + [JsonPropertyName("string")] + public string StringProperty { get; set; } + + /// + /// Gets or Sets Uuid + /// + [JsonPropertyName("uuid")] + public Guid Uuid { get; set; } + /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -192,107 +234,26 @@ namespace Org.OpenAPITools.Model { StringBuilder sb = new StringBuilder(); sb.Append("class FormatTest {\n"); - sb.Append(" Number: ").Append(Number).Append("\n"); - sb.Append(" Byte: ").Append(Byte).Append("\n"); + sb.Append(" Binary: ").Append(Binary).Append("\n"); + sb.Append(" ByteProperty: ").Append(ByteProperty).Append("\n"); sb.Append(" Date: ").Append(Date).Append("\n"); - sb.Append(" Password: ").Append(Password).Append("\n"); - sb.Append(" Integer: ").Append(Integer).Append("\n"); + sb.Append(" DateTime: ").Append(DateTime).Append("\n"); + sb.Append(" DecimalProperty: ").Append(DecimalProperty).Append("\n"); + sb.Append(" DoubleProperty: ").Append(DoubleProperty).Append("\n"); + sb.Append(" FloatProperty: ").Append(FloatProperty).Append("\n"); sb.Append(" Int32: ").Append(Int32).Append("\n"); sb.Append(" Int64: ").Append(Int64).Append("\n"); - sb.Append(" Float: ").Append(Float).Append("\n"); - sb.Append(" Double: ").Append(Double).Append("\n"); - sb.Append(" Decimal: ").Append(Decimal).Append("\n"); - sb.Append(" String: ").Append(String).Append("\n"); - sb.Append(" Binary: ").Append(Binary).Append("\n"); - sb.Append(" DateTime: ").Append(DateTime).Append("\n"); - sb.Append(" Uuid: ").Append(Uuid).Append("\n"); + sb.Append(" Integer: ").Append(Integer).Append("\n"); + sb.Append(" Number: ").Append(Number).Append("\n"); + sb.Append(" Password: ").Append(Password).Append("\n"); sb.Append(" PatternWithDigits: ").Append(PatternWithDigits).Append("\n"); sb.Append(" PatternWithDigitsAndDelimiter: ").Append(PatternWithDigitsAndDelimiter).Append("\n"); + sb.Append(" StringProperty: ").Append(StringProperty).Append("\n"); + sb.Append(" Uuid: ").Append(Uuid).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as FormatTest).AreEqual; - } - - /// - /// Returns true if FormatTest instances are equal - /// - /// Instance of FormatTest to be compared - /// Boolean - public bool Equals(FormatTest input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Number.GetHashCode(); - if (this.Byte != null) - { - hashCode = (hashCode * 59) + this.Byte.GetHashCode(); - } - if (this.Date != null) - { - hashCode = (hashCode * 59) + this.Date.GetHashCode(); - } - if (this.Password != null) - { - hashCode = (hashCode * 59) + this.Password.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Integer.GetHashCode(); - hashCode = (hashCode * 59) + this.Int32.GetHashCode(); - hashCode = (hashCode * 59) + this.Int64.GetHashCode(); - hashCode = (hashCode * 59) + this.Float.GetHashCode(); - hashCode = (hashCode * 59) + this.Double.GetHashCode(); - hashCode = (hashCode * 59) + this.Decimal.GetHashCode(); - if (this.String != null) - { - hashCode = (hashCode * 59) + this.String.GetHashCode(); - } - if (this.Binary != null) - { - hashCode = (hashCode * 59) + this.Binary.GetHashCode(); - } - if (this.DateTime != null) - { - hashCode = (hashCode * 59) + this.DateTime.GetHashCode(); - } - if (this.Uuid != null) - { - hashCode = (hashCode * 59) + this.Uuid.GetHashCode(); - } - if (this.PatternWithDigits != null) - { - hashCode = (hashCode * 59) + this.PatternWithDigits.GetHashCode(); - } - if (this.PatternWithDigitsAndDelimiter != null) - { - hashCode = (hashCode * 59) + this.PatternWithDigitsAndDelimiter.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -300,6 +261,54 @@ namespace Org.OpenAPITools.Model /// Validation Result public IEnumerable Validate(ValidationContext validationContext) { + // DoubleProperty (double) maximum + if (this.DoubleProperty > (double)123.4) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for DoubleProperty, must be a value less than or equal to 123.4.", new [] { "DoubleProperty" }); + } + + // DoubleProperty (double) minimum + if (this.DoubleProperty < (double)67.8) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for DoubleProperty, must be a value greater than or equal to 67.8.", new [] { "DoubleProperty" }); + } + + // FloatProperty (float) maximum + if (this.FloatProperty > (float)987.6) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for FloatProperty, must be a value less than or equal to 987.6.", new [] { "FloatProperty" }); + } + + // FloatProperty (float) minimum + if (this.FloatProperty < (float)54.3) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for FloatProperty, must be a value greater than or equal to 54.3.", new [] { "FloatProperty" }); + } + + // Int32 (int) maximum + if (this.Int32 > (int)200) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Int32, must be a value less than or equal to 200.", new [] { "Int32" }); + } + + // Int32 (int) minimum + if (this.Int32 < (int)20) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Int32, must be a value greater than or equal to 20.", new [] { "Int32" }); + } + + // Integer (int) maximum + if (this.Integer > (int)100) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Integer, must be a value less than or equal to 100.", new [] { "Integer" }); + } + + // Integer (int) minimum + if (this.Integer < (int)10) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Integer, must be a value greater than or equal to 10.", new [] { "Integer" }); + } + // Number (decimal) maximum if (this.Number > (decimal)543.2) { @@ -324,61 +333,6 @@ namespace Org.OpenAPITools.Model yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Password, length must be greater than 10.", new [] { "Password" }); } - // Integer (int) maximum - if (this.Integer > (int)100) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Integer, must be a value less than or equal to 100.", new [] { "Integer" }); - } - - // Integer (int) minimum - if (this.Integer < (int)10) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Integer, must be a value greater than or equal to 10.", new [] { "Integer" }); - } - - // Int32 (int) maximum - if (this.Int32 > (int)200) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Int32, must be a value less than or equal to 200.", new [] { "Int32" }); - } - - // Int32 (int) minimum - if (this.Int32 < (int)20) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Int32, must be a value greater than or equal to 20.", new [] { "Int32" }); - } - - // Float (float) maximum - if (this.Float > (float)987.6) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Float, must be a value less than or equal to 987.6.", new [] { "Float" }); - } - - // Float (float) minimum - if (this.Float < (float)54.3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Float, must be a value greater than or equal to 54.3.", new [] { "Float" }); - } - - // Double (double) maximum - if (this.Double > (double)123.4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Double, must be a value less than or equal to 123.4.", new [] { "Double" }); - } - - // Double (double) minimum - if (this.Double < (double)67.8) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Double, must be a value greater than or equal to 67.8.", new [] { "Double" }); - } - - // String (string) pattern - Regex regexString = new Regex(@"[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); - if (false == regexString.Match(this.String).Success) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for String, must match a pattern of " + regexString, new [] { "String" }); - } - // PatternWithDigits (string) pattern Regex regexPatternWithDigits = new Regex(@"^\\d{10}$", RegexOptions.CultureInvariant); if (false == regexPatternWithDigits.Match(this.PatternWithDigits).Success) @@ -393,8 +347,162 @@ namespace Org.OpenAPITools.Model yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PatternWithDigitsAndDelimiter, must match a pattern of " + regexPatternWithDigitsAndDelimiter, new [] { "PatternWithDigitsAndDelimiter" }); } + // StringProperty (string) pattern + Regex regexStringProperty = new Regex(@"[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); + if (false == regexStringProperty.Match(this.StringProperty).Success) + { + yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for StringProperty, must match a pattern of " + regexStringProperty, new [] { "StringProperty" }); + } + yield break; } } + /// + /// A Json converter for type FormatTest + /// + public class FormatTestJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override FormatTest Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + System.IO.Stream binary = default; + byte[] byteProperty = default; + DateTime date = default; + DateTime dateTime = default; + decimal decimalProperty = default; + double doubleProperty = default; + float floatProperty = default; + int int32 = default; + long int64 = default; + int integer = default; + decimal number = default; + string password = default; + string patternWithDigits = default; + string patternWithDigitsAndDelimiter = default; + string stringProperty = default; + Guid uuid = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "binary": + binary = JsonSerializer.Deserialize(ref reader, options); + break; + case "byte": + byteProperty = JsonSerializer.Deserialize(ref reader, options); + break; + case "date": + date = JsonSerializer.Deserialize(ref reader, options); + break; + case "dateTime": + dateTime = JsonSerializer.Deserialize(ref reader, options); + break; + case "decimal": + decimalProperty = JsonSerializer.Deserialize(ref reader, options); + break; + case "double": + doubleProperty = reader.GetDouble(); + break; + case "float": + floatProperty = (float)reader.GetDouble(); + break; + case "int32": + int32 = reader.GetInt32(); + break; + case "int64": + int64 = reader.GetInt64(); + break; + case "integer": + integer = reader.GetInt32(); + break; + case "number": + number = reader.GetInt32(); + break; + case "password": + password = reader.GetString(); + break; + case "pattern_with_digits": + patternWithDigits = reader.GetString(); + break; + case "pattern_with_digits_and_delimiter": + patternWithDigitsAndDelimiter = reader.GetString(); + break; + case "string": + stringProperty = reader.GetString(); + break; + case "uuid": + uuid = reader.GetGuid(); + break; + default: + break; + } + } + } + + return new FormatTest(binary, byteProperty, date, dateTime, decimalProperty, doubleProperty, floatProperty, int32, int64, integer, number, password, patternWithDigits, patternWithDigitsAndDelimiter, stringProperty, uuid); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, FormatTest formatTest, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WritePropertyName("binary"); + JsonSerializer.Serialize(writer, formatTest.Binary, options); + writer.WritePropertyName("byte"); + JsonSerializer.Serialize(writer, formatTest.ByteProperty, options); + writer.WritePropertyName("date"); + JsonSerializer.Serialize(writer, formatTest.Date, options); + writer.WritePropertyName("dateTime"); + JsonSerializer.Serialize(writer, formatTest.DateTime, options); + writer.WritePropertyName("decimal"); + JsonSerializer.Serialize(writer, formatTest.DecimalProperty, options); + writer.WriteNumber("double", (int)formatTest.DoubleProperty); + writer.WriteNumber("float", (int)formatTest.FloatProperty); + writer.WriteNumber("int32", (int)formatTest.Int32); + writer.WriteNumber("int64", (int)formatTest.Int64); + writer.WriteNumber("integer", (int)formatTest.Integer); + writer.WriteNumber("number", (int)formatTest.Number); + writer.WriteString("password", formatTest.Password); + writer.WriteString("pattern_with_digits", formatTest.PatternWithDigits); + writer.WriteString("pattern_with_digits_and_delimiter", formatTest.PatternWithDigitsAndDelimiter); + writer.WriteString("string", formatTest.StringProperty); + writer.WriteString("uuid", formatTest.Uuid); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Fruit.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Fruit.cs index 95c5248844..3a8b95bb06 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Fruit.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Fruit.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,15 +26,25 @@ namespace Org.OpenAPITools.Model /// /// Fruit /// - public partial class Fruit : IEquatable, IValidatableObject + public partial class Fruit : IValidatableObject { /// /// Initializes a new instance of the class. /// /// /// color - public Fruit(Apple apple, string color = default) + [JsonConstructor] + public Fruit(Apple apple, string color) { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (color == null) + throw new ArgumentNullException(nameof(Color)); + + #pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + Apple = apple; Color = color; } @@ -45,8 +54,18 @@ namespace Org.OpenAPITools.Model /// /// /// color - public Fruit(Banana banana, string color = default) + [JsonConstructor] + public Fruit(Banana banana, string color) { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (color == null) + throw new ArgumentNullException(nameof(Color)); + + #pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + Banana = banana; Color = color; } @@ -79,44 +98,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Fruit).AreEqual; - } - - /// - /// Returns true if Fruit instances are equal - /// - /// Instance of Fruit to be compared - /// Boolean - public bool Equals(Fruit input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Color != null) - { - hashCode = (hashCode * 59) + this.Color.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -133,13 +114,6 @@ namespace Org.OpenAPITools.Model /// public class FruitJsonConverter : JsonConverter { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof(Fruit).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -152,9 +126,11 @@ namespace Org.OpenAPITools.Model { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); + JsonTokenType startingTokenType = reader.TokenType; + Utf8JsonReader appleReader = reader; bool appleDeserialized = Client.ClientUtils.TryDeserialize(ref appleReader, options, out Apple apple); @@ -165,10 +141,13 @@ namespace Org.OpenAPITools.Model while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string propertyName = reader.GetString(); reader.Read(); @@ -178,6 +157,8 @@ namespace Org.OpenAPITools.Model case "color": color = reader.GetString(); break; + default: + break; } } } @@ -198,6 +179,13 @@ namespace Org.OpenAPITools.Model /// /// /// - public override void Write(Utf8JsonWriter writer, Fruit fruit, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, Fruit fruit, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("color", fruit.Color); + + writer.WriteEndObject(); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/FruitReq.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/FruitReq.cs index f5abf19875..9418bf9a96 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/FruitReq.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/FruitReq.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,13 +26,14 @@ namespace Org.OpenAPITools.Model /// /// FruitReq /// - public partial class FruitReq : IEquatable, IValidatableObject + public partial class FruitReq : IValidatableObject { /// /// Initializes a new instance of the class. /// /// - public FruitReq(AppleReq appleReq) + [JsonConstructor] + internal FruitReq(AppleReq appleReq) { AppleReq = appleReq; } @@ -42,7 +42,8 @@ namespace Org.OpenAPITools.Model /// Initializes a new instance of the class. /// /// - public FruitReq(BananaReq bananaReq) + [JsonConstructor] + internal FruitReq(BananaReq bananaReq) { BananaReq = bananaReq; } @@ -68,40 +69,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as FruitReq).AreEqual; - } - - /// - /// Returns true if FruitReq instances are equal - /// - /// Instance of FruitReq to be compared - /// Boolean - public bool Equals(FruitReq input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -118,13 +85,6 @@ namespace Org.OpenAPITools.Model /// public class FruitReqJsonConverter : JsonConverter { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof(FruitReq).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -137,9 +97,11 @@ namespace Org.OpenAPITools.Model { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); + JsonTokenType startingTokenType = reader.TokenType; + Utf8JsonReader appleReqReader = reader; bool appleReqDeserialized = Client.ClientUtils.TryDeserialize(ref appleReqReader, options, out AppleReq appleReq); @@ -149,16 +111,21 @@ namespace Org.OpenAPITools.Model while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string propertyName = reader.GetString(); reader.Read(); switch (propertyName) { + default: + break; } } } @@ -179,6 +146,12 @@ namespace Org.OpenAPITools.Model /// /// /// - public override void Write(Utf8JsonWriter writer, FruitReq fruitReq, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, FruitReq fruitReq, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + + writer.WriteEndObject(); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/GmFruit.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/GmFruit.cs index 3b4ac35867..cc28f46c42 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/GmFruit.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/GmFruit.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,7 +26,7 @@ namespace Org.OpenAPITools.Model /// /// GmFruit /// - public partial class GmFruit : IEquatable, IValidatableObject + public partial class GmFruit : IValidatableObject { /// /// Initializes a new instance of the class. @@ -35,8 +34,18 @@ namespace Org.OpenAPITools.Model /// /// /// color - public GmFruit(Apple apple, Banana banana, string color = default) + [JsonConstructor] + public GmFruit(Apple apple, Banana banana, string color) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (color == null) + throw new ArgumentNullException("color is a required property for GmFruit and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + Apple = Apple; Banana = Banana; Color = color; @@ -70,44 +79,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as GmFruit).AreEqual; - } - - /// - /// Returns true if GmFruit instances are equal - /// - /// Instance of GmFruit to be compared - /// Boolean - public bool Equals(GmFruit input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Color != null) - { - hashCode = (hashCode * 59) + this.Color.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -124,13 +95,6 @@ namespace Org.OpenAPITools.Model /// public class GmFruitJsonConverter : JsonConverter { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof(GmFruit).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -143,9 +107,11 @@ namespace Org.OpenAPITools.Model { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); + JsonTokenType startingTokenType = reader.TokenType; + Utf8JsonReader appleReader = reader; bool appleDeserialized = Client.ClientUtils.TryDeserialize(ref appleReader, options, out Apple apple); @@ -156,10 +122,13 @@ namespace Org.OpenAPITools.Model while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string propertyName = reader.GetString(); reader.Read(); @@ -169,6 +138,8 @@ namespace Org.OpenAPITools.Model case "color": color = reader.GetString(); break; + default: + break; } } } @@ -183,6 +154,13 @@ namespace Org.OpenAPITools.Model /// /// /// - public override void Write(Utf8JsonWriter writer, GmFruit gmFruit, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, GmFruit gmFruit, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("color", gmFruit.Color); + + writer.WriteEndObject(); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/GrandparentAnimal.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/GrandparentAnimal.cs index c880e6711e..1557d82e53 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/GrandparentAnimal.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/GrandparentAnimal.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,17 +26,24 @@ namespace Org.OpenAPITools.Model /// /// GrandparentAnimal /// - public partial class GrandparentAnimal : IEquatable, IValidatableObject + public partial class GrandparentAnimal : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// petType (required) + /// petType + [JsonConstructor] public GrandparentAnimal(string petType) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + if (petType == null) throw new ArgumentNullException("petType is a required property for GrandparentAnimal and cannot be null."); +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + PetType = petType; } @@ -51,7 +57,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -66,48 +72,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as GrandparentAnimal).AreEqual; - } - - /// - /// Returns true if GrandparentAnimal instances are equal - /// - /// Instance of GrandparentAnimal to be compared - /// Boolean - public bool Equals(GrandparentAnimal input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.PetType != null) - { - hashCode = (hashCode * 59) + this.PetType.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -129,4 +93,71 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type GrandparentAnimal + /// + public class GrandparentAnimalJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override GrandparentAnimal Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string petType = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "pet_type": + petType = reader.GetString(); + break; + default: + break; + } + } + } + + return new GrandparentAnimal(petType); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, GrandparentAnimal grandparentAnimal, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("pet_type", grandparentAnimal.PetType); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs index 849a4886c3..c0e8044b40 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -34,8 +33,21 @@ namespace Org.OpenAPITools.Model /// /// bar /// foo - public HasOnlyReadOnly(string bar = default, string foo = default) + [JsonConstructor] + internal HasOnlyReadOnly(string bar, string foo) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (bar == null) + throw new ArgumentNullException("bar is a required property for HasOnlyReadOnly and cannot be null."); + + if (foo == null) + throw new ArgumentNullException("foo is a required property for HasOnlyReadOnly and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + Bar = bar; Foo = foo; } @@ -44,19 +56,19 @@ namespace Org.OpenAPITools.Model /// Gets or Sets Bar /// [JsonPropertyName("bar")] - public string Bar { get; private set; } + public string Bar { get; } /// /// Gets or Sets Foo /// [JsonPropertyName("foo")] - public string Foo { get; private set; } + public string Foo { get; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -102,22 +114,13 @@ namespace Org.OpenAPITools.Model unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Bar != null) - { - hashCode = (hashCode * 59) + this.Bar.GetHashCode(); - } - if (this.Foo != null) - { - hashCode = (hashCode * 59) + this.Foo.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } + hashCode = (hashCode * 59) + Bar.GetHashCode(); + hashCode = (hashCode * 59) + Foo.GetHashCode(); + hashCode = (hashCode * 59) + AdditionalProperties.GetHashCode(); + return hashCode; } } - /// /// To validate all properties of the instance /// @@ -129,4 +132,76 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type HasOnlyReadOnly + /// + public class HasOnlyReadOnlyJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override HasOnlyReadOnly Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string bar = default; + string foo = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "bar": + bar = reader.GetString(); + break; + case "foo": + foo = reader.GetString(); + break; + default: + break; + } + } + } + + return new HasOnlyReadOnly(bar, foo); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, HasOnlyReadOnly hasOnlyReadOnly, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("bar", hasOnlyReadOnly.Bar); + writer.WriteString("foo", hasOnlyReadOnly.Foo); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/HealthCheckResult.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/HealthCheckResult.cs index f66a3e132f..2f0e472f63 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/HealthCheckResult.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/HealthCheckResult.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,12 +26,13 @@ namespace Org.OpenAPITools.Model /// /// Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. /// - public partial class HealthCheckResult : IEquatable, IValidatableObject + public partial class HealthCheckResult : IValidatableObject { /// /// Initializes a new instance of the class. /// /// nullableMessage + [JsonConstructor] public HealthCheckResult(string nullableMessage = default) { NullableMessage = nullableMessage; @@ -48,7 +48,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -63,48 +63,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as HealthCheckResult).AreEqual; - } - - /// - /// Returns true if HealthCheckResult instances are equal - /// - /// Instance of HealthCheckResult to be compared - /// Boolean - public bool Equals(HealthCheckResult input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.NullableMessage != null) - { - hashCode = (hashCode * 59) + this.NullableMessage.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -116,4 +74,71 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type HealthCheckResult + /// + public class HealthCheckResultJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override HealthCheckResult Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string nullableMessage = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "NullableMessage": + nullableMessage = reader.GetString(); + break; + default: + break; + } + } + } + + return new HealthCheckResult(nullableMessage); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, HealthCheckResult healthCheckResult, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("NullableMessage", healthCheckResult.NullableMessage); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs index d1371b46bf..45bfcd4f84 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/IsoscelesTriangle.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,14 +26,15 @@ namespace Org.OpenAPITools.Model /// /// IsoscelesTriangle /// - public partial class IsoscelesTriangle : IEquatable, IValidatableObject + public partial class IsoscelesTriangle : IValidatableObject { /// /// Initializes a new instance of the class. /// /// /// - public IsoscelesTriangle(ShapeInterface shapeInterface, TriangleInterface triangleInterface) + [JsonConstructor] + internal IsoscelesTriangle(ShapeInterface shapeInterface, TriangleInterface triangleInterface) { ShapeInterface = shapeInterface; TriangleInterface = triangleInterface; @@ -61,40 +61,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as IsoscelesTriangle).AreEqual; - } - - /// - /// Returns true if IsoscelesTriangle instances are equal - /// - /// Instance of IsoscelesTriangle to be compared - /// Boolean - public bool Equals(IsoscelesTriangle input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -111,13 +77,6 @@ namespace Org.OpenAPITools.Model /// public class IsoscelesTriangleJsonConverter : JsonConverter { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof(IsoscelesTriangle).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -130,28 +89,35 @@ namespace Org.OpenAPITools.Model { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); + JsonTokenType startingTokenType = reader.TokenType; + Utf8JsonReader shapeInterfaceReader = reader; - bool shapeInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref shapeInterfaceReader, options, out ShapeInterface shapeInterface); + bool shapeInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref reader, options, out ShapeInterface shapeInterface); Utf8JsonReader triangleInterfaceReader = reader; - bool triangleInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref triangleInterfaceReader, options, out TriangleInterface triangleInterface); + bool triangleInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref reader, options, out TriangleInterface triangleInterface); while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string propertyName = reader.GetString(); reader.Read(); switch (propertyName) { + default: + break; } } } @@ -166,6 +132,12 @@ namespace Org.OpenAPITools.Model /// /// /// - public override void Write(Utf8JsonWriter writer, IsoscelesTriangle isoscelesTriangle, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, IsoscelesTriangle isoscelesTriangle, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + + writer.WriteEndObject(); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/List.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/List.cs index 7a3e133f69..654d498a9c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/List.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/List.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,14 +26,24 @@ namespace Org.OpenAPITools.Model /// /// List /// - public partial class List : IEquatable, IValidatableObject + public partial class List : IValidatableObject { /// /// Initializes a new instance of the class. /// /// _123list - public List(string _123list = default) + [JsonConstructor] + public List(string _123list) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (_123list == null) + throw new ArgumentNullException("_123list is a required property for List and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + _123List = _123list; } @@ -48,7 +57,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -63,48 +72,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as List).AreEqual; - } - - /// - /// Returns true if List instances are equal - /// - /// Instance of List to be compared - /// Boolean - public bool Equals(List input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this._123List != null) - { - hashCode = (hashCode * 59) + this._123List.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -116,4 +83,71 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type List + /// + public class ListJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override List Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string _123list = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "123-list": + _123list = reader.GetString(); + break; + default: + break; + } + } + } + + return new List(_123list); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, List list, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("123-list", list._123List); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Mammal.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Mammal.cs index f29770cdfe..87e28b32ff 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Mammal.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Mammal.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,13 +26,14 @@ namespace Org.OpenAPITools.Model /// /// Mammal /// - public partial class Mammal : IEquatable, IValidatableObject + public partial class Mammal : IValidatableObject { /// /// Initializes a new instance of the class. /// /// - public Mammal(Whale whale) + [JsonConstructor] + internal Mammal(Whale whale) { Whale = whale; } @@ -42,7 +42,8 @@ namespace Org.OpenAPITools.Model /// Initializes a new instance of the class. /// /// - public Mammal(Zebra zebra) + [JsonConstructor] + internal Mammal(Zebra zebra) { Zebra = zebra; } @@ -51,7 +52,8 @@ namespace Org.OpenAPITools.Model /// Initializes a new instance of the class. /// /// - public Mammal(Pig pig) + [JsonConstructor] + internal Mammal(Pig pig) { Pig = pig; } @@ -75,7 +77,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -89,44 +91,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Mammal).AreEqual; - } - - /// - /// Returns true if Mammal instances are equal - /// - /// Instance of Mammal to be compared - /// Boolean - public bool Equals(Mammal input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -153,13 +117,6 @@ namespace Org.OpenAPITools.Model /// public class MammalJsonConverter : JsonConverter { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof(Mammal).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -172,9 +129,11 @@ namespace Org.OpenAPITools.Model { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); + JsonTokenType startingTokenType = reader.TokenType; + Utf8JsonReader whaleReader = reader; bool whaleDeserialized = Client.ClientUtils.TryDeserialize(ref whaleReader, options, out Whale whale); @@ -187,16 +146,21 @@ namespace Org.OpenAPITools.Model while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string propertyName = reader.GetString(); reader.Read(); switch (propertyName) { + default: + break; } } } @@ -220,6 +184,12 @@ namespace Org.OpenAPITools.Model /// /// /// - public override void Write(Utf8JsonWriter writer, Mammal mammal, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, Mammal mammal, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + + writer.WriteEndObject(); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/MapTest.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/MapTest.cs index 2cf624e2af..777120531d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/MapTest.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/MapTest.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,21 +26,40 @@ namespace Org.OpenAPITools.Model /// /// MapTest /// - public partial class MapTest : IEquatable, IValidatableObject + public partial class MapTest : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// mapMapOfString - /// mapOfEnumString /// directMap /// indirectMap - public MapTest(Dictionary> mapMapOfString = default, Dictionary mapOfEnumString = default, Dictionary directMap = default, Dictionary indirectMap = default) + /// mapMapOfString + /// mapOfEnumString + [JsonConstructor] + public MapTest(Dictionary directMap, Dictionary indirectMap, Dictionary> mapMapOfString, Dictionary mapOfEnumString) { - MapMapOfString = mapMapOfString; - MapOfEnumString = mapOfEnumString; +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (mapMapOfString == null) + throw new ArgumentNullException("mapMapOfString is a required property for MapTest and cannot be null."); + + if (mapOfEnumString == null) + throw new ArgumentNullException("mapOfEnumString is a required property for MapTest and cannot be null."); + + if (directMap == null) + throw new ArgumentNullException("directMap is a required property for MapTest and cannot be null."); + + if (indirectMap == null) + throw new ArgumentNullException("indirectMap is a required property for MapTest and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + DirectMap = directMap; IndirectMap = indirectMap; + MapMapOfString = mapMapOfString; + MapOfEnumString = mapOfEnumString; } /// @@ -52,28 +70,47 @@ namespace Org.OpenAPITools.Model /// /// Enum UPPER for value: UPPER /// - [EnumMember(Value = "UPPER")] UPPER = 1, /// /// Enum Lower for value: lower /// - [EnumMember(Value = "lower")] Lower = 2 } /// - /// Gets or Sets MapMapOfString + /// Returns a InnerEnum /// - [JsonPropertyName("map_map_of_string")] - public Dictionary> MapMapOfString { get; set; } + /// + /// + public static InnerEnum InnerEnumFromString(string value) + { + if (value == "UPPER") + return InnerEnum.UPPER; + + if (value == "lower") + return InnerEnum.Lower; + + throw new NotImplementedException($"Could not convert value to type InnerEnum: '{value}'"); + } /// - /// Gets or Sets MapOfEnumString + /// Returns equivalent json value /// - [JsonPropertyName("map_of_enum_string")] - public Dictionary MapOfEnumString { get; set; } + /// + /// + /// + public static string InnerEnumToJsonValue(InnerEnum value) + { + if (value == InnerEnum.UPPER) + return "UPPER"; + + if (value == InnerEnum.Lower) + return "lower"; + + throw new NotImplementedException($"Value could not be handled: '{value}'"); + } /// /// Gets or Sets DirectMap @@ -87,11 +124,23 @@ namespace Org.OpenAPITools.Model [JsonPropertyName("indirect_map")] public Dictionary IndirectMap { get; set; } + /// + /// Gets or Sets MapMapOfString + /// + [JsonPropertyName("map_map_of_string")] + public Dictionary> MapMapOfString { get; set; } + + /// + /// Gets or Sets MapOfEnumString + /// + [JsonPropertyName("map_of_enum_string")] + public Dictionary MapOfEnumString { get; set; } + /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -101,68 +150,14 @@ namespace Org.OpenAPITools.Model { StringBuilder sb = new StringBuilder(); sb.Append("class MapTest {\n"); - sb.Append(" MapMapOfString: ").Append(MapMapOfString).Append("\n"); - sb.Append(" MapOfEnumString: ").Append(MapOfEnumString).Append("\n"); sb.Append(" DirectMap: ").Append(DirectMap).Append("\n"); sb.Append(" IndirectMap: ").Append(IndirectMap).Append("\n"); + sb.Append(" MapMapOfString: ").Append(MapMapOfString).Append("\n"); + sb.Append(" MapOfEnumString: ").Append(MapOfEnumString).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as MapTest).AreEqual; - } - - /// - /// Returns true if MapTest instances are equal - /// - /// Instance of MapTest to be compared - /// Boolean - public bool Equals(MapTest input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.MapMapOfString != null) - { - hashCode = (hashCode * 59) + this.MapMapOfString.GetHashCode(); - } - if (this.MapOfEnumString != null) - { - hashCode = (hashCode * 59) + this.MapOfEnumString.GetHashCode(); - } - if (this.DirectMap != null) - { - hashCode = (hashCode * 59) + this.DirectMap.GetHashCode(); - } - if (this.IndirectMap != null) - { - hashCode = (hashCode * 59) + this.IndirectMap.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -174,4 +169,90 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type MapTest + /// + public class MapTestJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override MapTest Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + Dictionary directMap = default; + Dictionary indirectMap = default; + Dictionary> mapMapOfString = default; + Dictionary mapOfEnumString = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "direct_map": + directMap = JsonSerializer.Deserialize>(ref reader, options); + break; + case "indirect_map": + indirectMap = JsonSerializer.Deserialize>(ref reader, options); + break; + case "map_map_of_string": + mapMapOfString = JsonSerializer.Deserialize>>(ref reader, options); + break; + case "map_of_enum_string": + mapOfEnumString = JsonSerializer.Deserialize>(ref reader, options); + break; + default: + break; + } + } + } + + return new MapTest(directMap, indirectMap, mapMapOfString, mapOfEnumString); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, MapTest mapTest, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WritePropertyName("direct_map"); + JsonSerializer.Serialize(writer, mapTest.DirectMap, options); + writer.WritePropertyName("indirect_map"); + JsonSerializer.Serialize(writer, mapTest.IndirectMap, options); + writer.WritePropertyName("map_map_of_string"); + JsonSerializer.Serialize(writer, mapTest.MapMapOfString, options); + writer.WritePropertyName("map_of_enum_string"); + JsonSerializer.Serialize(writer, mapTest.MapOfEnumString, options); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs index 68b2ea60b7..4806980e33 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,27 +26,37 @@ namespace Org.OpenAPITools.Model /// /// MixedPropertiesAndAdditionalPropertiesClass /// - public partial class MixedPropertiesAndAdditionalPropertiesClass : IEquatable, IValidatableObject + public partial class MixedPropertiesAndAdditionalPropertiesClass : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// uuid /// dateTime /// map - public MixedPropertiesAndAdditionalPropertiesClass(Guid uuid = default, DateTime dateTime = default, Dictionary map = default) + /// uuid + [JsonConstructor] + public MixedPropertiesAndAdditionalPropertiesClass(DateTime dateTime, Dictionary map, Guid uuid) { - Uuid = uuid; +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (uuid == null) + throw new ArgumentNullException("uuid is a required property for MixedPropertiesAndAdditionalPropertiesClass and cannot be null."); + + if (dateTime == null) + throw new ArgumentNullException("dateTime is a required property for MixedPropertiesAndAdditionalPropertiesClass and cannot be null."); + + if (map == null) + throw new ArgumentNullException("map is a required property for MixedPropertiesAndAdditionalPropertiesClass and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + DateTime = dateTime; Map = map; + Uuid = uuid; } - /// - /// Gets or Sets Uuid - /// - [JsonPropertyName("uuid")] - public Guid Uuid { get; set; } - /// /// Gets or Sets DateTime /// @@ -60,11 +69,17 @@ namespace Org.OpenAPITools.Model [JsonPropertyName("map")] public Dictionary Map { get; set; } + /// + /// Gets or Sets Uuid + /// + [JsonPropertyName("uuid")] + public Guid Uuid { get; set; } + /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -74,63 +89,13 @@ namespace Org.OpenAPITools.Model { StringBuilder sb = new StringBuilder(); sb.Append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.Append(" Uuid: ").Append(Uuid).Append("\n"); sb.Append(" DateTime: ").Append(DateTime).Append("\n"); sb.Append(" Map: ").Append(Map).Append("\n"); + sb.Append(" Uuid: ").Append(Uuid).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as MixedPropertiesAndAdditionalPropertiesClass).AreEqual; - } - - /// - /// Returns true if MixedPropertiesAndAdditionalPropertiesClass instances are equal - /// - /// Instance of MixedPropertiesAndAdditionalPropertiesClass to be compared - /// Boolean - public bool Equals(MixedPropertiesAndAdditionalPropertiesClass input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Uuid != null) - { - hashCode = (hashCode * 59) + this.Uuid.GetHashCode(); - } - if (this.DateTime != null) - { - hashCode = (hashCode * 59) + this.DateTime.GetHashCode(); - } - if (this.Map != null) - { - hashCode = (hashCode * 59) + this.Map.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -142,4 +107,83 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type MixedPropertiesAndAdditionalPropertiesClass + /// + public class MixedPropertiesAndAdditionalPropertiesClassJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override MixedPropertiesAndAdditionalPropertiesClass Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + DateTime dateTime = default; + Dictionary map = default; + Guid uuid = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "dateTime": + dateTime = JsonSerializer.Deserialize(ref reader, options); + break; + case "map": + map = JsonSerializer.Deserialize>(ref reader, options); + break; + case "uuid": + uuid = reader.GetGuid(); + break; + default: + break; + } + } + } + + return new MixedPropertiesAndAdditionalPropertiesClass(dateTime, map, uuid); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, MixedPropertiesAndAdditionalPropertiesClass mixedPropertiesAndAdditionalPropertiesClass, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WritePropertyName("dateTime"); + JsonSerializer.Serialize(writer, mixedPropertiesAndAdditionalPropertiesClass.DateTime, options); + writer.WritePropertyName("map"); + JsonSerializer.Serialize(writer, mixedPropertiesAndAdditionalPropertiesClass.Map, options); + writer.WriteString("uuid", mixedPropertiesAndAdditionalPropertiesClass.Uuid); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Model200Response.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Model200Response.cs index 6662b2edac..eca0214cd8 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Model200Response.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Model200Response.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,36 +26,49 @@ namespace Org.OpenAPITools.Model /// /// Model for testing model name starting with number /// - public partial class Model200Response : IEquatable, IValidatableObject + public partial class Model200Response : IValidatableObject { /// /// Initializes a new instance of the class. /// + /// classProperty /// name - /// _class - public Model200Response(int name = default, string _class = default) + [JsonConstructor] + public Model200Response(string classProperty, int name) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (name == null) + throw new ArgumentNullException("name is a required property for Model200Response and cannot be null."); + + if (classProperty == null) + throw new ArgumentNullException("classProperty is a required property for Model200Response and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + ClassProperty = classProperty; Name = name; - Class = _class; } + /// + /// Gets or Sets ClassProperty + /// + [JsonPropertyName("class")] + public string ClassProperty { get; set; } + /// /// Gets or Sets Name /// [JsonPropertyName("name")] public int Name { get; set; } - /// - /// Gets or Sets Class - /// - [JsonPropertyName("class")] - public string Class { get; set; } - /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -66,55 +78,12 @@ namespace Org.OpenAPITools.Model { StringBuilder sb = new StringBuilder(); sb.Append("class Model200Response {\n"); + sb.Append(" ClassProperty: ").Append(ClassProperty).Append("\n"); sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Class: ").Append(Class).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Model200Response).AreEqual; - } - - /// - /// Returns true if Model200Response instances are equal - /// - /// Instance of Model200Response to be compared - /// Boolean - public bool Equals(Model200Response input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - if (this.Class != null) - { - hashCode = (hashCode * 59) + this.Class.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -126,4 +95,76 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type Model200Response + /// + public class Model200ResponseJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override Model200Response Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string classProperty = default; + int name = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "class": + classProperty = reader.GetString(); + break; + case "name": + name = reader.GetInt32(); + break; + default: + break; + } + } + } + + return new Model200Response(classProperty, name); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Model200Response model200Response, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("class", model200Response.ClassProperty); + writer.WriteNumber("name", (int)model200Response.Name); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ModelClient.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ModelClient.cs index 7bc5c681bb..dc243ef72f 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ModelClient.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ModelClient.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,28 +26,38 @@ namespace Org.OpenAPITools.Model /// /// ModelClient /// - public partial class ModelClient : IEquatable, IValidatableObject + public partial class ModelClient : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// _client - public ModelClient(string _client = default) + /// clientProperty + [JsonConstructor] + public ModelClient(string clientProperty) { - _Client = _client; +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (clientProperty == null) + throw new ArgumentNullException("clientProperty is a required property for ModelClient and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + _ClientProperty = clientProperty; } /// - /// Gets or Sets _Client + /// Gets or Sets _ClientProperty /// [JsonPropertyName("client")] - public string _Client { get; set; } + public string _ClientProperty { get; set; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -58,53 +67,11 @@ namespace Org.OpenAPITools.Model { StringBuilder sb = new StringBuilder(); sb.Append("class ModelClient {\n"); - sb.Append(" _Client: ").Append(_Client).Append("\n"); + sb.Append(" _ClientProperty: ").Append(_ClientProperty).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as ModelClient).AreEqual; - } - - /// - /// Returns true if ModelClient instances are equal - /// - /// Instance of ModelClient to be compared - /// Boolean - public bool Equals(ModelClient input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this._Client != null) - { - hashCode = (hashCode * 59) + this._Client.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -116,4 +83,71 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type ModelClient + /// + public class ModelClientJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override ModelClient Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string clientProperty = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "client": + clientProperty = reader.GetString(); + break; + default: + break; + } + } + } + + return new ModelClient(clientProperty); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ModelClient modelClient, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("client", modelClient._ClientProperty); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Name.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Name.cs index 95d35d993b..3e927732b7 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Name.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Name.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -32,18 +31,34 @@ namespace Org.OpenAPITools.Model /// /// Initializes a new instance of the class. /// - /// nameProperty (required) - /// snakeCase + /// nameProperty /// property + /// snakeCase /// _123number - public Name(int nameProperty, int snakeCase = default, string property = default, int _123number = default) + [JsonConstructor] + public Name(int nameProperty, string property, int snakeCase, int _123number) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + if (nameProperty == null) throw new ArgumentNullException("nameProperty is a required property for Name and cannot be null."); + if (snakeCase == null) + throw new ArgumentNullException("snakeCase is a required property for Name and cannot be null."); + + if (property == null) + throw new ArgumentNullException("property is a required property for Name and cannot be null."); + + if (_123number == null) + throw new ArgumentNullException("_123number is a required property for Name and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + NameProperty = nameProperty; - SnakeCase = snakeCase; Property = property; + SnakeCase = snakeCase; _123Number = _123number; } @@ -53,29 +68,29 @@ namespace Org.OpenAPITools.Model [JsonPropertyName("name")] public int NameProperty { get; set; } - /// - /// Gets or Sets SnakeCase - /// - [JsonPropertyName("snake_case")] - public int SnakeCase { get; private set; } - /// /// Gets or Sets Property /// [JsonPropertyName("property")] public string Property { get; set; } + /// + /// Gets or Sets SnakeCase + /// + [JsonPropertyName("snake_case")] + public int SnakeCase { get; } + /// /// Gets or Sets _123Number /// [JsonPropertyName("123Number")] - public int _123Number { get; private set; } + public int _123Number { get; } /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -86,8 +101,8 @@ namespace Org.OpenAPITools.Model StringBuilder sb = new StringBuilder(); sb.Append("class Name {\n"); sb.Append(" NameProperty: ").Append(NameProperty).Append("\n"); - sb.Append(" SnakeCase: ").Append(SnakeCase).Append("\n"); sb.Append(" Property: ").Append(Property).Append("\n"); + sb.Append(" SnakeCase: ").Append(SnakeCase).Append("\n"); sb.Append(" _123Number: ").Append(_123Number).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); @@ -123,21 +138,13 @@ namespace Org.OpenAPITools.Model unchecked // Overflow is fine, just wrap { int hashCode = 41; - hashCode = (hashCode * 59) + this.NameProperty.GetHashCode(); - hashCode = (hashCode * 59) + this.SnakeCase.GetHashCode(); - if (this.Property != null) - { - hashCode = (hashCode * 59) + this.Property.GetHashCode(); - } - hashCode = (hashCode * 59) + this._123Number.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } + hashCode = (hashCode * 59) + SnakeCase.GetHashCode(); + hashCode = (hashCode * 59) + _123Number.GetHashCode(); + hashCode = (hashCode * 59) + AdditionalProperties.GetHashCode(); + return hashCode; } } - /// /// To validate all properties of the instance /// @@ -149,4 +156,86 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type Name + /// + public class NameJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override Name Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + int nameProperty = default; + string property = default; + int snakeCase = default; + int _123number = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "name": + nameProperty = reader.GetInt32(); + break; + case "property": + property = reader.GetString(); + break; + case "snake_case": + snakeCase = reader.GetInt32(); + break; + case "123Number": + _123number = reader.GetInt32(); + break; + default: + break; + } + } + } + + return new Name(nameProperty, property, snakeCase, _123number); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Name name, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteNumber("name", (int)name.NameProperty); + writer.WriteString("property", name.Property); + writer.WriteNumber("snake_case", (int)name.SnakeCase); + writer.WriteNumber("123Number", (int)name._123Number); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/NullableClass.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/NullableClass.cs index 9bc3748822..0dbf928e05 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/NullableClass.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/NullableClass.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,50 +26,75 @@ namespace Org.OpenAPITools.Model /// /// NullableClass /// - public partial class NullableClass : Dictionary, IEquatable, IValidatableObject + public partial class NullableClass : Dictionary, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// integerProp - /// numberProp + /// arrayItemsNullable + /// objectItemsNullable + /// arrayAndItemsNullableProp + /// arrayNullableProp /// booleanProp - /// stringProp /// dateProp /// datetimeProp - /// arrayNullableProp - /// arrayAndItemsNullableProp - /// arrayItemsNullable - /// objectNullableProp + /// integerProp + /// numberProp /// objectAndItemsNullableProp - /// objectItemsNullable - public NullableClass(int? integerProp = default, decimal? numberProp = default, bool? booleanProp = default, string stringProp = default, DateTime? dateProp = default, DateTime? datetimeProp = default, List arrayNullableProp = default, List arrayAndItemsNullableProp = default, List arrayItemsNullable = default, Dictionary objectNullableProp = default, Dictionary objectAndItemsNullableProp = default, Dictionary objectItemsNullable = default) : base() + /// objectNullableProp + /// stringProp + [JsonConstructor] + public NullableClass(List arrayItemsNullable, Dictionary objectItemsNullable, List arrayAndItemsNullableProp = default, List arrayNullableProp = default, bool? booleanProp = default, DateTime? dateProp = default, DateTime? datetimeProp = default, int? integerProp = default, decimal? numberProp = default, Dictionary objectAndItemsNullableProp = default, Dictionary objectNullableProp = default, string stringProp = default) : base() { - IntegerProp = integerProp; - NumberProp = numberProp; +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (arrayItemsNullable == null) + throw new ArgumentNullException("arrayItemsNullable is a required property for NullableClass and cannot be null."); + + if (objectItemsNullable == null) + throw new ArgumentNullException("objectItemsNullable is a required property for NullableClass and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + ArrayItemsNullable = arrayItemsNullable; + ObjectItemsNullable = objectItemsNullable; + ArrayAndItemsNullableProp = arrayAndItemsNullableProp; + ArrayNullableProp = arrayNullableProp; BooleanProp = booleanProp; - StringProp = stringProp; DateProp = dateProp; DatetimeProp = datetimeProp; - ArrayNullableProp = arrayNullableProp; - ArrayAndItemsNullableProp = arrayAndItemsNullableProp; - ArrayItemsNullable = arrayItemsNullable; - ObjectNullableProp = objectNullableProp; + IntegerProp = integerProp; + NumberProp = numberProp; ObjectAndItemsNullableProp = objectAndItemsNullableProp; - ObjectItemsNullable = objectItemsNullable; + ObjectNullableProp = objectNullableProp; + StringProp = stringProp; } /// - /// Gets or Sets IntegerProp + /// Gets or Sets ArrayItemsNullable /// - [JsonPropertyName("integer_prop")] - public int? IntegerProp { get; set; } + [JsonPropertyName("array_items_nullable")] + public List ArrayItemsNullable { get; set; } /// - /// Gets or Sets NumberProp + /// Gets or Sets ObjectItemsNullable /// - [JsonPropertyName("number_prop")] - public decimal? NumberProp { get; set; } + [JsonPropertyName("object_items_nullable")] + public Dictionary ObjectItemsNullable { get; set; } + + /// + /// Gets or Sets ArrayAndItemsNullableProp + /// + [JsonPropertyName("array_and_items_nullable_prop")] + public List ArrayAndItemsNullableProp { get; set; } + + /// + /// Gets or Sets ArrayNullableProp + /// + [JsonPropertyName("array_nullable_prop")] + public List ArrayNullableProp { get; set; } /// /// Gets or Sets BooleanProp @@ -78,12 +102,6 @@ namespace Org.OpenAPITools.Model [JsonPropertyName("boolean_prop")] public bool? BooleanProp { get; set; } - /// - /// Gets or Sets StringProp - /// - [JsonPropertyName("string_prop")] - public string StringProp { get; set; } - /// /// Gets or Sets DateProp /// @@ -97,28 +115,16 @@ namespace Org.OpenAPITools.Model public DateTime? DatetimeProp { get; set; } /// - /// Gets or Sets ArrayNullableProp + /// Gets or Sets IntegerProp /// - [JsonPropertyName("array_nullable_prop")] - public List ArrayNullableProp { get; set; } + [JsonPropertyName("integer_prop")] + public int? IntegerProp { get; set; } /// - /// Gets or Sets ArrayAndItemsNullableProp + /// Gets or Sets NumberProp /// - [JsonPropertyName("array_and_items_nullable_prop")] - public List ArrayAndItemsNullableProp { get; set; } - - /// - /// Gets or Sets ArrayItemsNullable - /// - [JsonPropertyName("array_items_nullable")] - public List ArrayItemsNullable { get; set; } - - /// - /// Gets or Sets ObjectNullableProp - /// - [JsonPropertyName("object_nullable_prop")] - public Dictionary ObjectNullableProp { get; set; } + [JsonPropertyName("number_prop")] + public decimal? NumberProp { get; set; } /// /// Gets or Sets ObjectAndItemsNullableProp @@ -127,10 +133,16 @@ namespace Org.OpenAPITools.Model public Dictionary ObjectAndItemsNullableProp { get; set; } /// - /// Gets or Sets ObjectItemsNullable + /// Gets or Sets ObjectNullableProp /// - [JsonPropertyName("object_items_nullable")] - public Dictionary ObjectItemsNullable { get; set; } + [JsonPropertyName("object_nullable_prop")] + public Dictionary ObjectNullableProp { get; set; } + + /// + /// Gets or Sets StringProp + /// + [JsonPropertyName("string_prop")] + public string StringProp { get; set; } /// /// Returns the string presentation of the object @@ -141,103 +153,21 @@ namespace Org.OpenAPITools.Model StringBuilder sb = new StringBuilder(); sb.Append("class NullableClass {\n"); sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" IntegerProp: ").Append(IntegerProp).Append("\n"); - sb.Append(" NumberProp: ").Append(NumberProp).Append("\n"); + sb.Append(" ArrayItemsNullable: ").Append(ArrayItemsNullable).Append("\n"); + sb.Append(" ObjectItemsNullable: ").Append(ObjectItemsNullable).Append("\n"); + sb.Append(" ArrayAndItemsNullableProp: ").Append(ArrayAndItemsNullableProp).Append("\n"); + sb.Append(" ArrayNullableProp: ").Append(ArrayNullableProp).Append("\n"); sb.Append(" BooleanProp: ").Append(BooleanProp).Append("\n"); - sb.Append(" StringProp: ").Append(StringProp).Append("\n"); sb.Append(" DateProp: ").Append(DateProp).Append("\n"); sb.Append(" DatetimeProp: ").Append(DatetimeProp).Append("\n"); - sb.Append(" ArrayNullableProp: ").Append(ArrayNullableProp).Append("\n"); - sb.Append(" ArrayAndItemsNullableProp: ").Append(ArrayAndItemsNullableProp).Append("\n"); - sb.Append(" ArrayItemsNullable: ").Append(ArrayItemsNullable).Append("\n"); - sb.Append(" ObjectNullableProp: ").Append(ObjectNullableProp).Append("\n"); + sb.Append(" IntegerProp: ").Append(IntegerProp).Append("\n"); + sb.Append(" NumberProp: ").Append(NumberProp).Append("\n"); sb.Append(" ObjectAndItemsNullableProp: ").Append(ObjectAndItemsNullableProp).Append("\n"); - sb.Append(" ObjectItemsNullable: ").Append(ObjectItemsNullable).Append("\n"); + sb.Append(" ObjectNullableProp: ").Append(ObjectNullableProp).Append("\n"); + sb.Append(" StringProp: ").Append(StringProp).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as NullableClass).AreEqual; - } - - /// - /// Returns true if NullableClass instances are equal - /// - /// Instance of NullableClass to be compared - /// Boolean - public bool Equals(NullableClass input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.IntegerProp != null) - { - hashCode = (hashCode * 59) + this.IntegerProp.GetHashCode(); - } - if (this.NumberProp != null) - { - hashCode = (hashCode * 59) + this.NumberProp.GetHashCode(); - } - if (this.BooleanProp != null) - { - hashCode = (hashCode * 59) + this.BooleanProp.GetHashCode(); - } - if (this.StringProp != null) - { - hashCode = (hashCode * 59) + this.StringProp.GetHashCode(); - } - if (this.DateProp != null) - { - hashCode = (hashCode * 59) + this.DateProp.GetHashCode(); - } - if (this.DatetimeProp != null) - { - hashCode = (hashCode * 59) + this.DatetimeProp.GetHashCode(); - } - if (this.ArrayNullableProp != null) - { - hashCode = (hashCode * 59) + this.ArrayNullableProp.GetHashCode(); - } - if (this.ArrayAndItemsNullableProp != null) - { - hashCode = (hashCode * 59) + this.ArrayAndItemsNullableProp.GetHashCode(); - } - if (this.ArrayItemsNullable != null) - { - hashCode = (hashCode * 59) + this.ArrayItemsNullable.GetHashCode(); - } - if (this.ObjectNullableProp != null) - { - hashCode = (hashCode * 59) + this.ObjectNullableProp.GetHashCode(); - } - if (this.ObjectAndItemsNullableProp != null) - { - hashCode = (hashCode * 59) + this.ObjectAndItemsNullableProp.GetHashCode(); - } - if (this.ObjectItemsNullable != null) - { - hashCode = (hashCode * 59) + this.ObjectItemsNullable.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -249,4 +179,145 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type NullableClass + /// + public class NullableClassJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override NullableClass Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + List arrayItemsNullable = default; + Dictionary objectItemsNullable = default; + List arrayAndItemsNullableProp = default; + List arrayNullableProp = default; + bool? booleanProp = default; + DateTime? dateProp = default; + DateTime? datetimeProp = default; + int? integerProp = default; + decimal? numberProp = default; + Dictionary objectAndItemsNullableProp = default; + Dictionary objectNullableProp = default; + string stringProp = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "array_items_nullable": + arrayItemsNullable = JsonSerializer.Deserialize>(ref reader, options); + break; + case "object_items_nullable": + objectItemsNullable = JsonSerializer.Deserialize>(ref reader, options); + break; + case "array_and_items_nullable_prop": + arrayAndItemsNullableProp = JsonSerializer.Deserialize>(ref reader, options); + break; + case "array_nullable_prop": + arrayNullableProp = JsonSerializer.Deserialize>(ref reader, options); + break; + case "boolean_prop": + booleanProp = reader.GetBoolean(); + break; + case "date_prop": + dateProp = JsonSerializer.Deserialize(ref reader, options); + break; + case "datetime_prop": + datetimeProp = JsonSerializer.Deserialize(ref reader, options); + break; + case "integer_prop": + if (reader.TokenType != JsonTokenType.Null) + integerProp = reader.GetInt32(); + break; + case "number_prop": + if (reader.TokenType != JsonTokenType.Null) + numberProp = reader.GetInt32(); + break; + case "object_and_items_nullable_prop": + objectAndItemsNullableProp = JsonSerializer.Deserialize>(ref reader, options); + break; + case "object_nullable_prop": + objectNullableProp = JsonSerializer.Deserialize>(ref reader, options); + break; + case "string_prop": + stringProp = reader.GetString(); + break; + default: + break; + } + } + } + + return new NullableClass(arrayItemsNullable, objectItemsNullable, arrayAndItemsNullableProp, arrayNullableProp, booleanProp, dateProp, datetimeProp, integerProp, numberProp, objectAndItemsNullableProp, objectNullableProp, stringProp); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, NullableClass nullableClass, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WritePropertyName("array_items_nullable"); + JsonSerializer.Serialize(writer, nullableClass.ArrayItemsNullable, options); + writer.WritePropertyName("object_items_nullable"); + JsonSerializer.Serialize(writer, nullableClass.ObjectItemsNullable, options); + writer.WritePropertyName("array_and_items_nullable_prop"); + JsonSerializer.Serialize(writer, nullableClass.ArrayAndItemsNullableProp, options); + writer.WritePropertyName("array_nullable_prop"); + JsonSerializer.Serialize(writer, nullableClass.ArrayNullableProp, options); + if (nullableClass.BooleanProp != null) + writer.WriteBoolean("boolean_prop", nullableClass.BooleanProp.Value); + else + writer.WriteNull("boolean_prop"); + writer.WritePropertyName("date_prop"); + JsonSerializer.Serialize(writer, nullableClass.DateProp, options); + writer.WritePropertyName("datetime_prop"); + JsonSerializer.Serialize(writer, nullableClass.DatetimeProp, options); + if (nullableClass.IntegerProp != null) + writer.WriteNumber("integer_prop", (int)nullableClass.IntegerProp.Value); + else + writer.WriteNull("integer_prop"); + if (nullableClass.NumberProp != null) + writer.WriteNumber("number_prop", (int)nullableClass.NumberProp.Value); + else + writer.WriteNull("number_prop"); + writer.WritePropertyName("object_and_items_nullable_prop"); + JsonSerializer.Serialize(writer, nullableClass.ObjectAndItemsNullableProp, options); + writer.WritePropertyName("object_nullable_prop"); + JsonSerializer.Serialize(writer, nullableClass.ObjectNullableProp, options); + writer.WriteString("string_prop", nullableClass.StringProp); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/NullableShape.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/NullableShape.cs index 5ef1763454..bcd4b60c1d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/NullableShape.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/NullableShape.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,13 +26,14 @@ namespace Org.OpenAPITools.Model /// /// The value may be a shape or the 'null' value. The 'nullable' attribute was introduced in OAS schema >= 3.0 and has been deprecated in OAS schema >= 3.1. /// - public partial class NullableShape : IEquatable, IValidatableObject + public partial class NullableShape : IValidatableObject { /// /// Initializes a new instance of the class. /// /// - public NullableShape(Triangle triangle) + [JsonConstructor] + internal NullableShape(Triangle triangle) { Triangle = triangle; } @@ -42,7 +42,8 @@ namespace Org.OpenAPITools.Model /// Initializes a new instance of the class. /// /// - public NullableShape(Quadrilateral quadrilateral) + [JsonConstructor] + internal NullableShape(Quadrilateral quadrilateral) { Quadrilateral = quadrilateral; } @@ -61,7 +62,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -75,44 +76,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as NullableShape).AreEqual; - } - - /// - /// Returns true if NullableShape instances are equal - /// - /// Instance of NullableShape to be compared - /// Boolean - public bool Equals(NullableShape input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -139,13 +102,6 @@ namespace Org.OpenAPITools.Model /// public class NullableShapeJsonConverter : JsonConverter { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof(NullableShape).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -158,9 +114,11 @@ namespace Org.OpenAPITools.Model { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); + JsonTokenType startingTokenType = reader.TokenType; + Utf8JsonReader triangleReader = reader; bool triangleDeserialized = Client.ClientUtils.TryDeserialize(ref triangleReader, options, out Triangle triangle); @@ -170,16 +128,21 @@ namespace Org.OpenAPITools.Model while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string propertyName = reader.GetString(); reader.Read(); switch (propertyName) { + default: + break; } } } @@ -200,6 +163,12 @@ namespace Org.OpenAPITools.Model /// /// /// - public override void Write(Utf8JsonWriter writer, NullableShape nullableShape, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, NullableShape nullableShape, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + + writer.WriteEndObject(); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/NumberOnly.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/NumberOnly.cs index 64f6395b60..035a084d72 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/NumberOnly.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/NumberOnly.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,14 +26,24 @@ namespace Org.OpenAPITools.Model /// /// NumberOnly /// - public partial class NumberOnly : IEquatable, IValidatableObject + public partial class NumberOnly : IValidatableObject { /// /// Initializes a new instance of the class. /// /// justNumber - public NumberOnly(decimal justNumber = default) + [JsonConstructor] + public NumberOnly(decimal justNumber) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (justNumber == null) + throw new ArgumentNullException("justNumber is a required property for NumberOnly and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + JustNumber = justNumber; } @@ -48,7 +57,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -63,45 +72,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as NumberOnly).AreEqual; - } - - /// - /// Returns true if NumberOnly instances are equal - /// - /// Instance of NumberOnly to be compared - /// Boolean - public bool Equals(NumberOnly input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.JustNumber.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -113,4 +83,71 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type NumberOnly + /// + public class NumberOnlyJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override NumberOnly Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + decimal justNumber = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "JustNumber": + justNumber = reader.GetInt32(); + break; + default: + break; + } + } + } + + return new NumberOnly(justNumber); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, NumberOnly numberOnly, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteNumber("JustNumber", (int)numberOnly.JustNumber); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs index 817af80674..26f0d3f5fa 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,43 +26,42 @@ namespace Org.OpenAPITools.Model /// /// ObjectWithDeprecatedFields /// - public partial class ObjectWithDeprecatedFields : IEquatable, IValidatableObject + public partial class ObjectWithDeprecatedFields : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// uuid - /// id - /// deprecatedRef /// bars - public ObjectWithDeprecatedFields(string uuid = default, decimal id = default, DeprecatedObject deprecatedRef = default, List bars = default) + /// deprecatedRef + /// id + /// uuid + [JsonConstructor] + public ObjectWithDeprecatedFields(List bars, DeprecatedObject deprecatedRef, decimal id, string uuid) { - Uuid = uuid; - Id = id; - DeprecatedRef = deprecatedRef; +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (uuid == null) + throw new ArgumentNullException("uuid is a required property for ObjectWithDeprecatedFields and cannot be null."); + + if (id == null) + throw new ArgumentNullException("id is a required property for ObjectWithDeprecatedFields and cannot be null."); + + if (deprecatedRef == null) + throw new ArgumentNullException("deprecatedRef is a required property for ObjectWithDeprecatedFields and cannot be null."); + + if (bars == null) + throw new ArgumentNullException("bars is a required property for ObjectWithDeprecatedFields and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + Bars = bars; + DeprecatedRef = deprecatedRef; + Id = id; + Uuid = uuid; } - /// - /// Gets or Sets Uuid - /// - [JsonPropertyName("uuid")] - public string Uuid { get; set; } - - /// - /// Gets or Sets Id - /// - [JsonPropertyName("id")] - [Obsolete] - public decimal Id { get; set; } - - /// - /// Gets or Sets DeprecatedRef - /// - [JsonPropertyName("deprecatedRef")] - [Obsolete] - public DeprecatedObject DeprecatedRef { get; set; } - /// /// Gets or Sets Bars /// @@ -71,11 +69,31 @@ namespace Org.OpenAPITools.Model [Obsolete] public List Bars { get; set; } + /// + /// Gets or Sets DeprecatedRef + /// + [JsonPropertyName("deprecatedRef")] + [Obsolete] + public DeprecatedObject DeprecatedRef { get; set; } + + /// + /// Gets or Sets Id + /// + [JsonPropertyName("id")] + [Obsolete] + public decimal Id { get; set; } + + /// + /// Gets or Sets Uuid + /// + [JsonPropertyName("uuid")] + public string Uuid { get; set; } + /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -85,65 +103,14 @@ namespace Org.OpenAPITools.Model { StringBuilder sb = new StringBuilder(); sb.Append("class ObjectWithDeprecatedFields {\n"); - sb.Append(" Uuid: ").Append(Uuid).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" DeprecatedRef: ").Append(DeprecatedRef).Append("\n"); sb.Append(" Bars: ").Append(Bars).Append("\n"); + sb.Append(" DeprecatedRef: ").Append(DeprecatedRef).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Uuid: ").Append(Uuid).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as ObjectWithDeprecatedFields).AreEqual; - } - - /// - /// Returns true if ObjectWithDeprecatedFields instances are equal - /// - /// Instance of ObjectWithDeprecatedFields to be compared - /// Boolean - public bool Equals(ObjectWithDeprecatedFields input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Uuid != null) - { - hashCode = (hashCode * 59) + this.Uuid.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - if (this.DeprecatedRef != null) - { - hashCode = (hashCode * 59) + this.DeprecatedRef.GetHashCode(); - } - if (this.Bars != null) - { - hashCode = (hashCode * 59) + this.Bars.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -155,4 +122,88 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type ObjectWithDeprecatedFields + /// + public class ObjectWithDeprecatedFieldsJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override ObjectWithDeprecatedFields Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + List bars = default; + DeprecatedObject deprecatedRef = default; + decimal id = default; + string uuid = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "bars": + bars = JsonSerializer.Deserialize>(ref reader, options); + break; + case "deprecatedRef": + deprecatedRef = JsonSerializer.Deserialize(ref reader, options); + break; + case "id": + id = reader.GetInt32(); + break; + case "uuid": + uuid = reader.GetString(); + break; + default: + break; + } + } + } + + return new ObjectWithDeprecatedFields(bars, deprecatedRef, id, uuid); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ObjectWithDeprecatedFields objectWithDeprecatedFields, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WritePropertyName("bars"); + JsonSerializer.Serialize(writer, objectWithDeprecatedFields.Bars, options); + writer.WritePropertyName("deprecatedRef"); + JsonSerializer.Serialize(writer, objectWithDeprecatedFields.DeprecatedRef, options); + writer.WriteNumber("id", (int)objectWithDeprecatedFields.Id); + writer.WriteString("uuid", objectWithDeprecatedFields.Uuid); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Order.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Order.cs index 2fef14a9c5..62777359e7 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Order.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Order.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,7 +26,7 @@ namespace Org.OpenAPITools.Model /// /// Order /// - public partial class Order : IEquatable, IValidatableObject + public partial class Order : IValidatableObject { /// /// Initializes a new instance of the class. @@ -38,8 +37,33 @@ namespace Org.OpenAPITools.Model /// shipDate /// Order Status /// complete (default to false) - public Order(long id = default, long petId = default, int quantity = default, DateTime shipDate = default, StatusEnum status = default, bool complete = false) + [JsonConstructor] + public Order(long id, long petId, int quantity, DateTime shipDate, StatusEnum status, bool complete = false) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (id == null) + throw new ArgumentNullException("id is a required property for Order and cannot be null."); + + if (petId == null) + throw new ArgumentNullException("petId is a required property for Order and cannot be null."); + + if (quantity == null) + throw new ArgumentNullException("quantity is a required property for Order and cannot be null."); + + if (shipDate == null) + throw new ArgumentNullException("shipDate is a required property for Order and cannot be null."); + + if (status == null) + throw new ArgumentNullException("status is a required property for Order and cannot be null."); + + if (complete == null) + throw new ArgumentNullException("complete is a required property for Order and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + Id = id; PetId = petId; Quantity = quantity; @@ -57,23 +81,59 @@ namespace Org.OpenAPITools.Model /// /// Enum Placed for value: placed /// - [EnumMember(Value = "placed")] Placed = 1, /// /// Enum Approved for value: approved /// - [EnumMember(Value = "approved")] Approved = 2, /// /// Enum Delivered for value: delivered /// - [EnumMember(Value = "delivered")] Delivered = 3 } + /// + /// Returns a StatusEnum + /// + /// + /// + public static StatusEnum StatusEnumFromString(string value) + { + if (value == "placed") + return StatusEnum.Placed; + + if (value == "approved") + return StatusEnum.Approved; + + if (value == "delivered") + return StatusEnum.Delivered; + + throw new NotImplementedException($"Could not convert value to type StatusEnum: '{value}'"); + } + + /// + /// Returns equivalent json value + /// + /// + /// + /// + public static string StatusEnumToJsonValue(StatusEnum value) + { + if (value == StatusEnum.Placed) + return "placed"; + + if (value == StatusEnum.Approved) + return "approved"; + + if (value == StatusEnum.Delivered) + return "delivered"; + + throw new NotImplementedException($"Value could not be handled: '{value}'"); + } + /// /// Order Status /// @@ -115,7 +175,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -135,53 +195,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Order).AreEqual; - } - - /// - /// Returns true if Order instances are equal - /// - /// Instance of Order to be compared - /// Boolean - public bool Equals(Order input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - hashCode = (hashCode * 59) + this.PetId.GetHashCode(); - hashCode = (hashCode * 59) + this.Quantity.GetHashCode(); - if (this.ShipDate != null) - { - hashCode = (hashCode * 59) + this.ShipDate.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - hashCode = (hashCode * 59) + this.Complete.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -193,4 +206,102 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type Order + /// + public class OrderJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override Order Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + long id = default; + long petId = default; + int quantity = default; + DateTime shipDate = default; + Order.StatusEnum status = default; + bool complete = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "id": + id = reader.GetInt64(); + break; + case "petId": + petId = reader.GetInt64(); + break; + case "quantity": + quantity = reader.GetInt32(); + break; + case "shipDate": + shipDate = JsonSerializer.Deserialize(ref reader, options); + break; + case "status": + string statusRawValue = reader.GetString(); + status = Order.StatusEnumFromString(statusRawValue); + break; + case "complete": + complete = reader.GetBoolean(); + break; + default: + break; + } + } + } + + return new Order(id, petId, quantity, shipDate, status, complete); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Order order, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteNumber("id", (int)order.Id); + writer.WriteNumber("petId", (int)order.PetId); + writer.WriteNumber("quantity", (int)order.Quantity); + writer.WritePropertyName("shipDate"); + JsonSerializer.Serialize(writer, order.ShipDate, options); + var statusRawValue = Order.StatusEnumToJsonValue(order.Status); + if (statusRawValue != null) + writer.WriteString("status", statusRawValue); + else + writer.WriteNull("status"); + writer.WriteBoolean("complete", order.Complete); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/OuterComposite.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/OuterComposite.cs index 390b308657..13f5f05b58 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/OuterComposite.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/OuterComposite.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,21 +26,43 @@ namespace Org.OpenAPITools.Model /// /// OuterComposite /// - public partial class OuterComposite : IEquatable, IValidatableObject + public partial class OuterComposite : IValidatableObject { /// /// Initializes a new instance of the class. /// + /// myBoolean /// myNumber /// myString - /// myBoolean - public OuterComposite(decimal myNumber = default, string myString = default, bool myBoolean = default) + [JsonConstructor] + public OuterComposite(bool myBoolean, decimal myNumber, string myString) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (myNumber == null) + throw new ArgumentNullException("myNumber is a required property for OuterComposite and cannot be null."); + + if (myString == null) + throw new ArgumentNullException("myString is a required property for OuterComposite and cannot be null."); + + if (myBoolean == null) + throw new ArgumentNullException("myBoolean is a required property for OuterComposite and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + MyBoolean = myBoolean; MyNumber = myNumber; MyString = myString; - MyBoolean = myBoolean; } + /// + /// Gets or Sets MyBoolean + /// + [JsonPropertyName("my_boolean")] + public bool MyBoolean { get; set; } + /// /// Gets or Sets MyNumber /// @@ -54,17 +75,11 @@ namespace Org.OpenAPITools.Model [JsonPropertyName("my_string")] public string MyString { get; set; } - /// - /// Gets or Sets MyBoolean - /// - [JsonPropertyName("my_boolean")] - public bool MyBoolean { get; set; } - /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -74,57 +89,13 @@ namespace Org.OpenAPITools.Model { StringBuilder sb = new StringBuilder(); sb.Append("class OuterComposite {\n"); + sb.Append(" MyBoolean: ").Append(MyBoolean).Append("\n"); sb.Append(" MyNumber: ").Append(MyNumber).Append("\n"); sb.Append(" MyString: ").Append(MyString).Append("\n"); - sb.Append(" MyBoolean: ").Append(MyBoolean).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as OuterComposite).AreEqual; - } - - /// - /// Returns true if OuterComposite instances are equal - /// - /// Instance of OuterComposite to be compared - /// Boolean - public bool Equals(OuterComposite input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.MyNumber.GetHashCode(); - if (this.MyString != null) - { - hashCode = (hashCode * 59) + this.MyString.GetHashCode(); - } - hashCode = (hashCode * 59) + this.MyBoolean.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -136,4 +107,81 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type OuterComposite + /// + public class OuterCompositeJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override OuterComposite Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + bool myBoolean = default; + decimal myNumber = default; + string myString = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "my_boolean": + myBoolean = reader.GetBoolean(); + break; + case "my_number": + myNumber = reader.GetInt32(); + break; + case "my_string": + myString = reader.GetString(); + break; + default: + break; + } + } + } + + return new OuterComposite(myBoolean, myNumber, myString); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, OuterComposite outerComposite, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteBoolean("my_boolean", outerComposite.MyBoolean); + writer.WriteNumber("my_number", (int)outerComposite.MyNumber); + writer.WriteString("my_string", outerComposite.MyString); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/OuterEnum.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/OuterEnum.cs index 8496c41332..31e3049659 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/OuterEnum.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/OuterEnum.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -32,20 +31,129 @@ namespace Org.OpenAPITools.Model /// /// Enum Placed for value: placed /// - [EnumMember(Value = "placed")] Placed = 1, /// /// Enum Approved for value: approved /// - [EnumMember(Value = "approved")] Approved = 2, /// /// Enum Delivered for value: delivered /// - [EnumMember(Value = "delivered")] Delivered = 3 } + + public class OuterEnumConverter : JsonConverter + { + public static OuterEnum FromString(string value) + { + if (value == "placed") + return OuterEnum.Placed; + + if (value == "approved") + return OuterEnum.Approved; + + if (value == "delivered") + return OuterEnum.Delivered; + + throw new NotImplementedException($"Could not convert value to type OuterEnum: '{value}'"); + } + + public static OuterEnum? FromStringOrDefault(string value) + { + if (value == "placed") + return OuterEnum.Placed; + + if (value == "approved") + return OuterEnum.Approved; + + if (value == "delivered") + return OuterEnum.Delivered; + + return null; + } + + public static string ToJsonValue(OuterEnum value) + { + if (value == OuterEnum.Placed) + return "placed"; + + if (value == OuterEnum.Approved) + return "approved"; + + if (value == OuterEnum.Delivered) + return "delivered"; + + throw new NotImplementedException($"Value could not be handled: '{value}'"); + } + + /// + /// Returns a from the Json object + /// + /// + /// + /// + /// + public override OuterEnum Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string rawValue = reader.GetString(); + + OuterEnum? result = OuterEnumConverter.FromString(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the OuterEnum to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, OuterEnum outerEnum, JsonSerializerOptions options) + { + writer.WriteStringValue(outerEnum.ToString()); + } + } + + public class OuterEnumNullableConverter : JsonConverter + { + /// + /// Returns a OuterEnum from the Json object + /// + /// + /// + /// + /// + public override OuterEnum? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string rawValue = reader.GetString(); + + if (rawValue == null) + return null; + + OuterEnum? result = OuterEnumConverter.FromString(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, OuterEnum? outerEnum, JsonSerializerOptions options) + { + writer.WriteStringValue(outerEnum?.ToString() ?? "null"); + } + } + } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs index b0f9d099e2..d3f7db5b4f 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -32,20 +31,129 @@ namespace Org.OpenAPITools.Model /// /// Enum Placed for value: placed /// - [EnumMember(Value = "placed")] Placed = 1, /// /// Enum Approved for value: approved /// - [EnumMember(Value = "approved")] Approved = 2, /// /// Enum Delivered for value: delivered /// - [EnumMember(Value = "delivered")] Delivered = 3 } + + public class OuterEnumDefaultValueConverter : JsonConverter + { + public static OuterEnumDefaultValue FromString(string value) + { + if (value == "placed") + return OuterEnumDefaultValue.Placed; + + if (value == "approved") + return OuterEnumDefaultValue.Approved; + + if (value == "delivered") + return OuterEnumDefaultValue.Delivered; + + throw new NotImplementedException($"Could not convert value to type OuterEnumDefaultValue: '{value}'"); + } + + public static OuterEnumDefaultValue? FromStringOrDefault(string value) + { + if (value == "placed") + return OuterEnumDefaultValue.Placed; + + if (value == "approved") + return OuterEnumDefaultValue.Approved; + + if (value == "delivered") + return OuterEnumDefaultValue.Delivered; + + return null; + } + + public static string ToJsonValue(OuterEnumDefaultValue value) + { + if (value == OuterEnumDefaultValue.Placed) + return "placed"; + + if (value == OuterEnumDefaultValue.Approved) + return "approved"; + + if (value == OuterEnumDefaultValue.Delivered) + return "delivered"; + + throw new NotImplementedException($"Value could not be handled: '{value}'"); + } + + /// + /// Returns a from the Json object + /// + /// + /// + /// + /// + public override OuterEnumDefaultValue Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string rawValue = reader.GetString(); + + OuterEnumDefaultValue? result = OuterEnumDefaultValueConverter.FromString(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the OuterEnumDefaultValue to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, OuterEnumDefaultValue outerEnumDefaultValue, JsonSerializerOptions options) + { + writer.WriteStringValue(outerEnumDefaultValue.ToString()); + } + } + + public class OuterEnumDefaultValueNullableConverter : JsonConverter + { + /// + /// Returns a OuterEnumDefaultValue from the Json object + /// + /// + /// + /// + /// + public override OuterEnumDefaultValue? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string rawValue = reader.GetString(); + + if (rawValue == null) + return null; + + OuterEnumDefaultValue? result = OuterEnumDefaultValueConverter.FromString(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, OuterEnumDefaultValue? outerEnumDefaultValue, JsonSerializerOptions options) + { + writer.WriteStringValue(outerEnumDefaultValue?.ToString() ?? "null"); + } + } + } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/OuterEnumInteger.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/OuterEnumInteger.cs index 56069346c2..e704048b8c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/OuterEnumInteger.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/OuterEnumInteger.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -45,4 +44,107 @@ namespace Org.OpenAPITools.Model NUMBER_2 = 2 } + + public class OuterEnumIntegerConverter : JsonConverter + { + public static OuterEnumInteger FromString(string value) + { + if (value == (0).ToString()) + return OuterEnumInteger.NUMBER_0; + + if (value == (1).ToString()) + return OuterEnumInteger.NUMBER_1; + + if (value == (2).ToString()) + return OuterEnumInteger.NUMBER_2; + + throw new NotImplementedException($"Could not convert value to type OuterEnumInteger: '{value}'"); + } + + public static OuterEnumInteger? FromStringOrDefault(string value) + { + if (value == (0).ToString()) + return OuterEnumInteger.NUMBER_0; + + if (value == (1).ToString()) + return OuterEnumInteger.NUMBER_1; + + if (value == (2).ToString()) + return OuterEnumInteger.NUMBER_2; + + return null; + } + + public static int ToJsonValue(OuterEnumInteger value) + { + return (int) value; + } + + /// + /// Returns a from the Json object + /// + /// + /// + /// + /// + public override OuterEnumInteger Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string rawValue = reader.GetString(); + + OuterEnumInteger? result = OuterEnumIntegerConverter.FromString(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the OuterEnumInteger to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, OuterEnumInteger outerEnumInteger, JsonSerializerOptions options) + { + writer.WriteStringValue(outerEnumInteger.ToString()); + } + } + + public class OuterEnumIntegerNullableConverter : JsonConverter + { + /// + /// Returns a OuterEnumInteger from the Json object + /// + /// + /// + /// + /// + public override OuterEnumInteger? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string rawValue = reader.GetString(); + + if (rawValue == null) + return null; + + OuterEnumInteger? result = OuterEnumIntegerConverter.FromString(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, OuterEnumInteger? outerEnumInteger, JsonSerializerOptions options) + { + writer.WriteStringValue(outerEnumInteger?.ToString() ?? "null"); + } + } + } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs index e80f88f51f..8e559a7975 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -45,4 +44,107 @@ namespace Org.OpenAPITools.Model NUMBER_2 = 2 } + + public class OuterEnumIntegerDefaultValueConverter : JsonConverter + { + public static OuterEnumIntegerDefaultValue FromString(string value) + { + if (value == (0).ToString()) + return OuterEnumIntegerDefaultValue.NUMBER_0; + + if (value == (1).ToString()) + return OuterEnumIntegerDefaultValue.NUMBER_1; + + if (value == (2).ToString()) + return OuterEnumIntegerDefaultValue.NUMBER_2; + + throw new NotImplementedException($"Could not convert value to type OuterEnumIntegerDefaultValue: '{value}'"); + } + + public static OuterEnumIntegerDefaultValue? FromStringOrDefault(string value) + { + if (value == (0).ToString()) + return OuterEnumIntegerDefaultValue.NUMBER_0; + + if (value == (1).ToString()) + return OuterEnumIntegerDefaultValue.NUMBER_1; + + if (value == (2).ToString()) + return OuterEnumIntegerDefaultValue.NUMBER_2; + + return null; + } + + public static int ToJsonValue(OuterEnumIntegerDefaultValue value) + { + return (int) value; + } + + /// + /// Returns a from the Json object + /// + /// + /// + /// + /// + public override OuterEnumIntegerDefaultValue Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string rawValue = reader.GetString(); + + OuterEnumIntegerDefaultValue? result = OuterEnumIntegerDefaultValueConverter.FromString(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the OuterEnumIntegerDefaultValue to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue, JsonSerializerOptions options) + { + writer.WriteStringValue(outerEnumIntegerDefaultValue.ToString()); + } + } + + public class OuterEnumIntegerDefaultValueNullableConverter : JsonConverter + { + /// + /// Returns a OuterEnumIntegerDefaultValue from the Json object + /// + /// + /// + /// + /// + public override OuterEnumIntegerDefaultValue? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string rawValue = reader.GetString(); + + if (rawValue == null) + return null; + + OuterEnumIntegerDefaultValue? result = OuterEnumIntegerDefaultValueConverter.FromString(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, OuterEnumIntegerDefaultValue? outerEnumIntegerDefaultValue, JsonSerializerOptions options) + { + writer.WriteStringValue(outerEnumIntegerDefaultValue?.ToString() ?? "null"); + } + } + } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ParentPet.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ParentPet.cs index 244b3b9384..fa0bfd0120 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ParentPet.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ParentPet.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,13 +26,14 @@ namespace Org.OpenAPITools.Model /// /// ParentPet /// - public partial class ParentPet : GrandparentAnimal, IEquatable + public partial class ParentPet : GrandparentAnimal, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// petType (required) - public ParentPet(string petType) : base(petType) + /// petType + [JsonConstructor] + internal ParentPet(string petType) : base(petType) { } @@ -49,40 +49,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as ParentPet).AreEqual; - } - - /// - /// Returns true if ParentPet instances are equal - /// - /// Instance of ParentPet to be compared - /// Boolean - public bool Equals(ParentPet input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - return hashCode; - } - } - } /// @@ -90,13 +56,6 @@ namespace Org.OpenAPITools.Model /// public class ParentPetJsonConverter : JsonConverter { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof(ParentPet).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -109,17 +68,22 @@ namespace Org.OpenAPITools.Model { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); + JsonTokenType startingTokenType = reader.TokenType; + string petType = default; while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string propertyName = reader.GetString(); reader.Read(); @@ -129,6 +93,8 @@ namespace Org.OpenAPITools.Model case "pet_type": petType = reader.GetString(); break; + default: + break; } } } @@ -143,6 +109,13 @@ namespace Org.OpenAPITools.Model /// /// /// - public override void Write(Utf8JsonWriter writer, ParentPet parentPet, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, ParentPet parentPet, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("pet_type", parentPet.PetType); + + writer.WriteEndObject(); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Pet.cs index 0091def60e..ad0e158779 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Pet.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Pet.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,31 +26,50 @@ namespace Org.OpenAPITools.Model /// /// Pet /// - public partial class Pet : IEquatable, IValidatableObject + public partial class Pet : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// name (required) - /// photoUrls (required) - /// id /// category - /// tags + /// id + /// name + /// photoUrls /// pet status in the store - public Pet(string name, List photoUrls, long id = default, Category category = default, List tags = default, StatusEnum status = default) + /// tags + [JsonConstructor] + public Pet(Category category, long id, string name, List photoUrls, StatusEnum status, List tags) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (id == null) + throw new ArgumentNullException("id is a required property for Pet and cannot be null."); + + if (category == null) + throw new ArgumentNullException("category is a required property for Pet and cannot be null."); + if (name == null) throw new ArgumentNullException("name is a required property for Pet and cannot be null."); if (photoUrls == null) throw new ArgumentNullException("photoUrls is a required property for Pet and cannot be null."); + if (tags == null) + throw new ArgumentNullException("tags is a required property for Pet and cannot be null."); + + if (status == null) + throw new ArgumentNullException("status is a required property for Pet and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + Category = category; + Id = id; Name = name; PhotoUrls = photoUrls; - Id = id; - Category = category; - Tags = tags; Status = status; + Tags = tags; } /// @@ -63,23 +81,59 @@ namespace Org.OpenAPITools.Model /// /// Enum Available for value: available /// - [EnumMember(Value = "available")] Available = 1, /// /// Enum Pending for value: pending /// - [EnumMember(Value = "pending")] Pending = 2, /// /// Enum Sold for value: sold /// - [EnumMember(Value = "sold")] Sold = 3 } + /// + /// Returns a StatusEnum + /// + /// + /// + public static StatusEnum StatusEnumFromString(string value) + { + if (value == "available") + return StatusEnum.Available; + + if (value == "pending") + return StatusEnum.Pending; + + if (value == "sold") + return StatusEnum.Sold; + + throw new NotImplementedException($"Could not convert value to type StatusEnum: '{value}'"); + } + + /// + /// Returns equivalent json value + /// + /// + /// + /// + public static string StatusEnumToJsonValue(StatusEnum value) + { + if (value == StatusEnum.Available) + return "available"; + + if (value == StatusEnum.Pending) + return "pending"; + + if (value == StatusEnum.Sold) + return "sold"; + + throw new NotImplementedException($"Value could not be handled: '{value}'"); + } + /// /// pet status in the store /// @@ -87,6 +141,18 @@ namespace Org.OpenAPITools.Model [JsonPropertyName("status")] public StatusEnum Status { get; set; } + /// + /// Gets or Sets Category + /// + [JsonPropertyName("category")] + public Category Category { get; set; } + + /// + /// Gets or Sets Id + /// + [JsonPropertyName("id")] + public long Id { get; set; } + /// /// Gets or Sets Name /// @@ -99,18 +165,6 @@ namespace Org.OpenAPITools.Model [JsonPropertyName("photoUrls")] public List PhotoUrls { get; set; } - /// - /// Gets or Sets Id - /// - [JsonPropertyName("id")] - public long Id { get; set; } - - /// - /// Gets or Sets Category - /// - [JsonPropertyName("category")] - public Category Category { get; set; } - /// /// Gets or Sets Tags /// @@ -121,7 +175,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -131,72 +185,16 @@ namespace Org.OpenAPITools.Model { StringBuilder sb = new StringBuilder(); sb.Append("class Pet {\n"); + sb.Append(" Category: ").Append(Category).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); sb.Append(" Name: ").Append(Name).Append("\n"); sb.Append(" PhotoUrls: ").Append(PhotoUrls).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Category: ").Append(Category).Append("\n"); - sb.Append(" Tags: ").Append(Tags).Append("\n"); sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" Tags: ").Append(Tags).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Pet).AreEqual; - } - - /// - /// Returns true if Pet instances are equal - /// - /// Instance of Pet to be compared - /// Boolean - public bool Equals(Pet input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.PhotoUrls != null) - { - hashCode = (hashCode * 59) + this.PhotoUrls.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - if (this.Category != null) - { - hashCode = (hashCode * 59) + this.Category.GetHashCode(); - } - if (this.Tags != null) - { - hashCode = (hashCode * 59) + this.Tags.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -208,4 +206,104 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type Pet + /// + public class PetJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override Pet Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + Category category = default; + long id = default; + string name = default; + List photoUrls = default; + Pet.StatusEnum status = default; + List tags = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "category": + category = JsonSerializer.Deserialize(ref reader, options); + break; + case "id": + id = reader.GetInt64(); + break; + case "name": + name = reader.GetString(); + break; + case "photoUrls": + photoUrls = JsonSerializer.Deserialize>(ref reader, options); + break; + case "status": + string statusRawValue = reader.GetString(); + status = Pet.StatusEnumFromString(statusRawValue); + break; + case "tags": + tags = JsonSerializer.Deserialize>(ref reader, options); + break; + default: + break; + } + } + } + + return new Pet(category, id, name, photoUrls, status, tags); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Pet pet, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WritePropertyName("category"); + JsonSerializer.Serialize(writer, pet.Category, options); + writer.WriteNumber("id", (int)pet.Id); + writer.WriteString("name", pet.Name); + writer.WritePropertyName("photoUrls"); + JsonSerializer.Serialize(writer, pet.PhotoUrls, options); + var statusRawValue = Pet.StatusEnumToJsonValue(pet.Status); + if (statusRawValue != null) + writer.WriteString("status", statusRawValue); + else + writer.WriteNull("status"); + writer.WritePropertyName("tags"); + JsonSerializer.Serialize(writer, pet.Tags, options); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Pig.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Pig.cs index 4eb947b014..b2292d1331 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Pig.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Pig.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,13 +26,14 @@ namespace Org.OpenAPITools.Model /// /// Pig /// - public partial class Pig : IEquatable, IValidatableObject + public partial class Pig : IValidatableObject { /// /// Initializes a new instance of the class. /// /// - public Pig(BasquePig basquePig) + [JsonConstructor] + internal Pig(BasquePig basquePig) { BasquePig = basquePig; } @@ -42,7 +42,8 @@ namespace Org.OpenAPITools.Model /// Initializes a new instance of the class. /// /// - public Pig(DanishPig danishPig) + [JsonConstructor] + internal Pig(DanishPig danishPig) { DanishPig = danishPig; } @@ -61,7 +62,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -75,44 +76,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Pig).AreEqual; - } - - /// - /// Returns true if Pig instances are equal - /// - /// Instance of Pig to be compared - /// Boolean - public bool Equals(Pig input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -139,13 +102,6 @@ namespace Org.OpenAPITools.Model /// public class PigJsonConverter : JsonConverter { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof(Pig).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -158,9 +114,11 @@ namespace Org.OpenAPITools.Model { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); + JsonTokenType startingTokenType = reader.TokenType; + Utf8JsonReader basquePigReader = reader; bool basquePigDeserialized = Client.ClientUtils.TryDeserialize(ref basquePigReader, options, out BasquePig basquePig); @@ -170,16 +128,21 @@ namespace Org.OpenAPITools.Model while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string propertyName = reader.GetString(); reader.Read(); switch (propertyName) { + default: + break; } } } @@ -200,6 +163,12 @@ namespace Org.OpenAPITools.Model /// /// /// - public override void Write(Utf8JsonWriter writer, Pig pig, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, Pig pig, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + + writer.WriteEndObject(); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/PolymorphicProperty.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/PolymorphicProperty.cs index 1152b4e63f..e7a0314545 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/PolymorphicProperty.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/PolymorphicProperty.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,13 +26,14 @@ namespace Org.OpenAPITools.Model /// /// PolymorphicProperty /// - public partial class PolymorphicProperty : IEquatable, IValidatableObject + public partial class PolymorphicProperty : IValidatableObject { /// /// Initializes a new instance of the class. /// /// - public PolymorphicProperty(bool _bool) + [JsonConstructor] + internal PolymorphicProperty(bool _bool) { Bool = _bool; } @@ -42,7 +42,8 @@ namespace Org.OpenAPITools.Model /// Initializes a new instance of the class. /// /// - public PolymorphicProperty(string _string) + [JsonConstructor] + internal PolymorphicProperty(string _string) { String = _string; } @@ -51,7 +52,8 @@ namespace Org.OpenAPITools.Model /// Initializes a new instance of the class. /// /// - public PolymorphicProperty(Object _object) + [JsonConstructor] + internal PolymorphicProperty(Object _object) { Object = _object; } @@ -60,7 +62,8 @@ namespace Org.OpenAPITools.Model /// Initializes a new instance of the class. /// /// - public PolymorphicProperty(List liststring) + [JsonConstructor] + internal PolymorphicProperty(List liststring) { Liststring = liststring; } @@ -89,7 +92,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -103,44 +106,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as PolymorphicProperty).AreEqual; - } - - /// - /// Returns true if PolymorphicProperty instances are equal - /// - /// Instance of PolymorphicProperty to be compared - /// Boolean - public bool Equals(PolymorphicProperty input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -157,13 +122,6 @@ namespace Org.OpenAPITools.Model /// public class PolymorphicPropertyJsonConverter : JsonConverter { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof(PolymorphicProperty).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -176,9 +134,11 @@ namespace Org.OpenAPITools.Model { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); + JsonTokenType startingTokenType = reader.TokenType; + Utf8JsonReader _boolReader = reader; bool _boolDeserialized = Client.ClientUtils.TryDeserialize(ref _boolReader, options, out bool _bool); @@ -194,16 +154,21 @@ namespace Org.OpenAPITools.Model while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string propertyName = reader.GetString(); reader.Read(); switch (propertyName) { + default: + break; } } } @@ -230,6 +195,12 @@ namespace Org.OpenAPITools.Model /// /// /// - public override void Write(Utf8JsonWriter writer, PolymorphicProperty polymorphicProperty, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, PolymorphicProperty polymorphicProperty, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + + writer.WriteEndObject(); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Quadrilateral.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Quadrilateral.cs index 47e72d44ab..d1dcd22b8e 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Quadrilateral.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Quadrilateral.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,13 +26,14 @@ namespace Org.OpenAPITools.Model /// /// Quadrilateral /// - public partial class Quadrilateral : IEquatable, IValidatableObject + public partial class Quadrilateral : IValidatableObject { /// /// Initializes a new instance of the class. /// /// - public Quadrilateral(SimpleQuadrilateral simpleQuadrilateral) + [JsonConstructor] + internal Quadrilateral(SimpleQuadrilateral simpleQuadrilateral) { SimpleQuadrilateral = simpleQuadrilateral; } @@ -42,7 +42,8 @@ namespace Org.OpenAPITools.Model /// Initializes a new instance of the class. /// /// - public Quadrilateral(ComplexQuadrilateral complexQuadrilateral) + [JsonConstructor] + internal Quadrilateral(ComplexQuadrilateral complexQuadrilateral) { ComplexQuadrilateral = complexQuadrilateral; } @@ -61,7 +62,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -75,44 +76,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Quadrilateral).AreEqual; - } - - /// - /// Returns true if Quadrilateral instances are equal - /// - /// Instance of Quadrilateral to be compared - /// Boolean - public bool Equals(Quadrilateral input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -139,13 +102,6 @@ namespace Org.OpenAPITools.Model /// public class QuadrilateralJsonConverter : JsonConverter { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof(Quadrilateral).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -158,9 +114,11 @@ namespace Org.OpenAPITools.Model { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); + JsonTokenType startingTokenType = reader.TokenType; + Utf8JsonReader simpleQuadrilateralReader = reader; bool simpleQuadrilateralDeserialized = Client.ClientUtils.TryDeserialize(ref simpleQuadrilateralReader, options, out SimpleQuadrilateral simpleQuadrilateral); @@ -170,16 +128,21 @@ namespace Org.OpenAPITools.Model while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string propertyName = reader.GetString(); reader.Read(); switch (propertyName) { + default: + break; } } } @@ -200,6 +163,12 @@ namespace Org.OpenAPITools.Model /// /// /// - public override void Write(Utf8JsonWriter writer, Quadrilateral quadrilateral, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, Quadrilateral quadrilateral, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + + writer.WriteEndObject(); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs index 046b9050ba..6faf1ddd50 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/QuadrilateralInterface.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,17 +26,24 @@ namespace Org.OpenAPITools.Model /// /// QuadrilateralInterface /// - public partial class QuadrilateralInterface : IEquatable, IValidatableObject + public partial class QuadrilateralInterface : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// quadrilateralType (required) + /// quadrilateralType + [JsonConstructor] public QuadrilateralInterface(string quadrilateralType) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + if (quadrilateralType == null) throw new ArgumentNullException("quadrilateralType is a required property for QuadrilateralInterface and cannot be null."); +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + QuadrilateralType = quadrilateralType; } @@ -51,7 +57,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -66,48 +72,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as QuadrilateralInterface).AreEqual; - } - - /// - /// Returns true if QuadrilateralInterface instances are equal - /// - /// Instance of QuadrilateralInterface to be compared - /// Boolean - public bool Equals(QuadrilateralInterface input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.QuadrilateralType != null) - { - hashCode = (hashCode * 59) + this.QuadrilateralType.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -119,4 +83,71 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type QuadrilateralInterface + /// + public class QuadrilateralInterfaceJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override QuadrilateralInterface Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string quadrilateralType = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "quadrilateralType": + quadrilateralType = reader.GetString(); + break; + default: + break; + } + } + } + + return new QuadrilateralInterface(quadrilateralType); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, QuadrilateralInterface quadrilateralInterface, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("quadrilateralType", quadrilateralInterface.QuadrilateralType); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs index 3589a97ed6..d81d94a35f 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -34,8 +33,21 @@ namespace Org.OpenAPITools.Model /// /// bar /// baz - public ReadOnlyFirst(string bar = default, string baz = default) + [JsonConstructor] + public ReadOnlyFirst(string bar, string baz) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (bar == null) + throw new ArgumentNullException("bar is a required property for ReadOnlyFirst and cannot be null."); + + if (baz == null) + throw new ArgumentNullException("baz is a required property for ReadOnlyFirst and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + Bar = bar; Baz = baz; } @@ -44,7 +56,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets Bar /// [JsonPropertyName("bar")] - public string Bar { get; private set; } + public string Bar { get; } /// /// Gets or Sets Baz @@ -56,7 +68,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -102,22 +114,12 @@ namespace Org.OpenAPITools.Model unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (this.Bar != null) - { - hashCode = (hashCode * 59) + this.Bar.GetHashCode(); - } - if (this.Baz != null) - { - hashCode = (hashCode * 59) + this.Baz.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } + hashCode = (hashCode * 59) + Bar.GetHashCode(); + hashCode = (hashCode * 59) + AdditionalProperties.GetHashCode(); + return hashCode; } } - /// /// To validate all properties of the instance /// @@ -129,4 +131,76 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type ReadOnlyFirst + /// + public class ReadOnlyFirstJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override ReadOnlyFirst Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string bar = default; + string baz = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "bar": + bar = reader.GetString(); + break; + case "baz": + baz = reader.GetString(); + break; + default: + break; + } + } + } + + return new ReadOnlyFirst(bar, baz); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ReadOnlyFirst readOnlyFirst, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("bar", readOnlyFirst.Bar); + writer.WriteString("baz", readOnlyFirst.Baz); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Return.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Return.cs index 2b73710ad8..b560dc903b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Return.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Return.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,14 +26,24 @@ namespace Org.OpenAPITools.Model /// /// Model for testing reserved words /// - public partial class Return : IEquatable, IValidatableObject + public partial class Return : IValidatableObject { /// /// Initializes a new instance of the class. /// /// returnProperty - public Return(int returnProperty = default) + [JsonConstructor] + public Return(int returnProperty) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (returnProperty == null) + throw new ArgumentNullException("returnProperty is a required property for Return and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + ReturnProperty = returnProperty; } @@ -48,7 +57,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -63,45 +72,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Return).AreEqual; - } - - /// - /// Returns true if Return instances are equal - /// - /// Instance of Return to be compared - /// Boolean - public bool Equals(Return input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.ReturnProperty.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -113,4 +83,71 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type Return + /// + public class ReturnJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override Return Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + int returnProperty = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "return": + returnProperty = reader.GetInt32(); + break; + default: + break; + } + } + } + + return new Return(returnProperty); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Return _return, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteNumber("return", (int)_return.ReturnProperty); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ScaleneTriangle.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ScaleneTriangle.cs index 72568e1e01..7654a4f8a0 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ScaleneTriangle.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ScaleneTriangle.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,14 +26,15 @@ namespace Org.OpenAPITools.Model /// /// ScaleneTriangle /// - public partial class ScaleneTriangle : IEquatable, IValidatableObject + public partial class ScaleneTriangle : IValidatableObject { /// /// Initializes a new instance of the class. /// /// /// - public ScaleneTriangle(ShapeInterface shapeInterface, TriangleInterface triangleInterface) + [JsonConstructor] + internal ScaleneTriangle(ShapeInterface shapeInterface, TriangleInterface triangleInterface) { ShapeInterface = shapeInterface; TriangleInterface = triangleInterface; @@ -54,7 +54,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -68,44 +68,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as ScaleneTriangle).AreEqual; - } - - /// - /// Returns true if ScaleneTriangle instances are equal - /// - /// Instance of ScaleneTriangle to be compared - /// Boolean - public bool Equals(ScaleneTriangle input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -122,13 +84,6 @@ namespace Org.OpenAPITools.Model /// public class ScaleneTriangleJsonConverter : JsonConverter { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof(ScaleneTriangle).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -141,28 +96,35 @@ namespace Org.OpenAPITools.Model { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); + JsonTokenType startingTokenType = reader.TokenType; + Utf8JsonReader shapeInterfaceReader = reader; - bool shapeInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref shapeInterfaceReader, options, out ShapeInterface shapeInterface); + bool shapeInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref reader, options, out ShapeInterface shapeInterface); Utf8JsonReader triangleInterfaceReader = reader; - bool triangleInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref triangleInterfaceReader, options, out TriangleInterface triangleInterface); + bool triangleInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref reader, options, out TriangleInterface triangleInterface); while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string propertyName = reader.GetString(); reader.Read(); switch (propertyName) { + default: + break; } } } @@ -177,6 +139,12 @@ namespace Org.OpenAPITools.Model /// /// /// - public override void Write(Utf8JsonWriter writer, ScaleneTriangle scaleneTriangle, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, ScaleneTriangle scaleneTriangle, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + + writer.WriteEndObject(); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Shape.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Shape.cs index e2cf8fb7cc..7412f32e61 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Shape.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Shape.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,17 +26,24 @@ namespace Org.OpenAPITools.Model /// /// Shape /// - public partial class Shape : IEquatable, IValidatableObject + public partial class Shape : IValidatableObject { /// /// Initializes a new instance of the class. /// /// - /// quadrilateralType (required) + /// quadrilateralType + [JsonConstructor] public Shape(Triangle triangle, string quadrilateralType) { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + if (quadrilateralType == null) - throw new ArgumentNullException("quadrilateralType is a required property for Shape and cannot be null."); + throw new ArgumentNullException(nameof(QuadrilateralType)); + + #pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' Triangle = triangle; QuadrilateralType = quadrilateralType; @@ -47,11 +53,18 @@ namespace Org.OpenAPITools.Model /// Initializes a new instance of the class. /// /// - /// quadrilateralType (required) + /// quadrilateralType + [JsonConstructor] public Shape(Quadrilateral quadrilateral, string quadrilateralType) { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + if (quadrilateralType == null) - throw new ArgumentNullException("quadrilateralType is a required property for Shape and cannot be null."); + throw new ArgumentNullException(nameof(QuadrilateralType)); + + #pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' Quadrilateral = quadrilateral; QuadrilateralType = quadrilateralType; @@ -77,7 +90,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -92,48 +105,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Shape).AreEqual; - } - - /// - /// Returns true if Shape instances are equal - /// - /// Instance of Shape to be compared - /// Boolean - public bool Equals(Shape input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.QuadrilateralType != null) - { - hashCode = (hashCode * 59) + this.QuadrilateralType.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -160,13 +131,6 @@ namespace Org.OpenAPITools.Model /// public class ShapeJsonConverter : JsonConverter { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof(Shape).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -179,9 +143,11 @@ namespace Org.OpenAPITools.Model { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); + JsonTokenType startingTokenType = reader.TokenType; + Utf8JsonReader triangleReader = reader; bool triangleDeserialized = Client.ClientUtils.TryDeserialize(ref triangleReader, options, out Triangle triangle); @@ -192,10 +158,13 @@ namespace Org.OpenAPITools.Model while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string propertyName = reader.GetString(); reader.Read(); @@ -205,6 +174,8 @@ namespace Org.OpenAPITools.Model case "quadrilateralType": quadrilateralType = reader.GetString(); break; + default: + break; } } } @@ -225,6 +196,13 @@ namespace Org.OpenAPITools.Model /// /// /// - public override void Write(Utf8JsonWriter writer, Shape shape, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, Shape shape, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("quadrilateralType", shape.QuadrilateralType); + + writer.WriteEndObject(); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ShapeInterface.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ShapeInterface.cs index 5d0ab8ec9c..b6a27e5efc 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ShapeInterface.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ShapeInterface.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,17 +26,24 @@ namespace Org.OpenAPITools.Model /// /// ShapeInterface /// - public partial class ShapeInterface : IEquatable, IValidatableObject + public partial class ShapeInterface : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// shapeType (required) + /// shapeType + [JsonConstructor] public ShapeInterface(string shapeType) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + if (shapeType == null) throw new ArgumentNullException("shapeType is a required property for ShapeInterface and cannot be null."); +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + ShapeType = shapeType; } @@ -51,7 +57,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -66,48 +72,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as ShapeInterface).AreEqual; - } - - /// - /// Returns true if ShapeInterface instances are equal - /// - /// Instance of ShapeInterface to be compared - /// Boolean - public bool Equals(ShapeInterface input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ShapeType != null) - { - hashCode = (hashCode * 59) + this.ShapeType.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -119,4 +83,71 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type ShapeInterface + /// + public class ShapeInterfaceJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override ShapeInterface Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string shapeType = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "shapeType": + shapeType = reader.GetString(); + break; + default: + break; + } + } + } + + return new ShapeInterface(shapeType); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ShapeInterface shapeInterface, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("shapeType", shapeInterface.ShapeType); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ShapeOrNull.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ShapeOrNull.cs index 375f4d4907..64971919ee 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ShapeOrNull.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/ShapeOrNull.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,17 +26,24 @@ namespace Org.OpenAPITools.Model /// /// The value may be a shape or the 'null' value. This is introduced in OAS schema >= 3.1. /// - public partial class ShapeOrNull : IEquatable, IValidatableObject + public partial class ShapeOrNull : IValidatableObject { /// /// Initializes a new instance of the class. /// /// - /// quadrilateralType (required) + /// quadrilateralType + [JsonConstructor] public ShapeOrNull(Triangle triangle, string quadrilateralType) { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + if (quadrilateralType == null) - throw new ArgumentNullException("quadrilateralType is a required property for ShapeOrNull and cannot be null."); + throw new ArgumentNullException(nameof(QuadrilateralType)); + + #pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' Triangle = triangle; QuadrilateralType = quadrilateralType; @@ -47,11 +53,18 @@ namespace Org.OpenAPITools.Model /// Initializes a new instance of the class. /// /// - /// quadrilateralType (required) + /// quadrilateralType + [JsonConstructor] public ShapeOrNull(Quadrilateral quadrilateral, string quadrilateralType) { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + if (quadrilateralType == null) - throw new ArgumentNullException("quadrilateralType is a required property for ShapeOrNull and cannot be null."); + throw new ArgumentNullException(nameof(QuadrilateralType)); + + #pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' Quadrilateral = quadrilateral; QuadrilateralType = quadrilateralType; @@ -77,7 +90,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -92,48 +105,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as ShapeOrNull).AreEqual; - } - - /// - /// Returns true if ShapeOrNull instances are equal - /// - /// Instance of ShapeOrNull to be compared - /// Boolean - public bool Equals(ShapeOrNull input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.QuadrilateralType != null) - { - hashCode = (hashCode * 59) + this.QuadrilateralType.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -160,13 +131,6 @@ namespace Org.OpenAPITools.Model /// public class ShapeOrNullJsonConverter : JsonConverter { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof(ShapeOrNull).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -179,9 +143,11 @@ namespace Org.OpenAPITools.Model { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); + JsonTokenType startingTokenType = reader.TokenType; + Utf8JsonReader triangleReader = reader; bool triangleDeserialized = Client.ClientUtils.TryDeserialize(ref triangleReader, options, out Triangle triangle); @@ -192,10 +158,13 @@ namespace Org.OpenAPITools.Model while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string propertyName = reader.GetString(); reader.Read(); @@ -205,6 +174,8 @@ namespace Org.OpenAPITools.Model case "quadrilateralType": quadrilateralType = reader.GetString(); break; + default: + break; } } } @@ -225,6 +196,13 @@ namespace Org.OpenAPITools.Model /// /// /// - public override void Write(Utf8JsonWriter writer, ShapeOrNull shapeOrNull, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, ShapeOrNull shapeOrNull, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("quadrilateralType", shapeOrNull.QuadrilateralType); + + writer.WriteEndObject(); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs index ee6d8ef182..feb4017722 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/SimpleQuadrilateral.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,14 +26,15 @@ namespace Org.OpenAPITools.Model /// /// SimpleQuadrilateral /// - public partial class SimpleQuadrilateral : IEquatable, IValidatableObject + public partial class SimpleQuadrilateral : IValidatableObject { /// /// Initializes a new instance of the class. /// /// /// - public SimpleQuadrilateral(ShapeInterface shapeInterface, QuadrilateralInterface quadrilateralInterface) + [JsonConstructor] + internal SimpleQuadrilateral(ShapeInterface shapeInterface, QuadrilateralInterface quadrilateralInterface) { ShapeInterface = shapeInterface; QuadrilateralInterface = quadrilateralInterface; @@ -54,7 +54,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -68,44 +68,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as SimpleQuadrilateral).AreEqual; - } - - /// - /// Returns true if SimpleQuadrilateral instances are equal - /// - /// Instance of SimpleQuadrilateral to be compared - /// Boolean - public bool Equals(SimpleQuadrilateral input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -122,13 +84,6 @@ namespace Org.OpenAPITools.Model /// public class SimpleQuadrilateralJsonConverter : JsonConverter { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof(SimpleQuadrilateral).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -141,28 +96,35 @@ namespace Org.OpenAPITools.Model { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); + JsonTokenType startingTokenType = reader.TokenType; + Utf8JsonReader shapeInterfaceReader = reader; - bool shapeInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref shapeInterfaceReader, options, out ShapeInterface shapeInterface); + bool shapeInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref reader, options, out ShapeInterface shapeInterface); Utf8JsonReader quadrilateralInterfaceReader = reader; - bool quadrilateralInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref quadrilateralInterfaceReader, options, out QuadrilateralInterface quadrilateralInterface); + bool quadrilateralInterfaceDeserialized = Client.ClientUtils.TryDeserialize(ref reader, options, out QuadrilateralInterface quadrilateralInterface); while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string propertyName = reader.GetString(); reader.Read(); switch (propertyName) { + default: + break; } } } @@ -177,6 +139,12 @@ namespace Org.OpenAPITools.Model /// /// /// - public override void Write(Utf8JsonWriter writer, SimpleQuadrilateral simpleQuadrilateral, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, SimpleQuadrilateral simpleQuadrilateral, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + + writer.WriteEndObject(); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/SpecialModelName.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/SpecialModelName.cs index 35fc0efd1c..db14149490 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/SpecialModelName.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/SpecialModelName.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,24 +26,31 @@ namespace Org.OpenAPITools.Model /// /// SpecialModelName /// - public partial class SpecialModelName : IEquatable, IValidatableObject + public partial class SpecialModelName : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// specialPropertyName /// specialModelNameProperty - public SpecialModelName(long specialPropertyName = default, string specialModelNameProperty = default) + /// specialPropertyName + [JsonConstructor] + public SpecialModelName(string specialModelNameProperty, long specialPropertyName) { - SpecialPropertyName = specialPropertyName; - SpecialModelNameProperty = specialModelNameProperty; - } +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' - /// - /// Gets or Sets SpecialPropertyName - /// - [JsonPropertyName("$special[property.name]")] - public long SpecialPropertyName { get; set; } + if (specialPropertyName == null) + throw new ArgumentNullException("specialPropertyName is a required property for SpecialModelName and cannot be null."); + + if (specialModelNameProperty == null) + throw new ArgumentNullException("specialModelNameProperty is a required property for SpecialModelName and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + SpecialModelNameProperty = specialModelNameProperty; + SpecialPropertyName = specialPropertyName; + } /// /// Gets or Sets SpecialModelNameProperty @@ -52,11 +58,17 @@ namespace Org.OpenAPITools.Model [JsonPropertyName("_special_model.name_")] public string SpecialModelNameProperty { get; set; } + /// + /// Gets or Sets SpecialPropertyName + /// + [JsonPropertyName("$special[property.name]")] + public long SpecialPropertyName { get; set; } + /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -66,55 +78,12 @@ namespace Org.OpenAPITools.Model { StringBuilder sb = new StringBuilder(); sb.Append("class SpecialModelName {\n"); - sb.Append(" SpecialPropertyName: ").Append(SpecialPropertyName).Append("\n"); sb.Append(" SpecialModelNameProperty: ").Append(SpecialModelNameProperty).Append("\n"); + sb.Append(" SpecialPropertyName: ").Append(SpecialPropertyName).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as SpecialModelName).AreEqual; - } - - /// - /// Returns true if SpecialModelName instances are equal - /// - /// Instance of SpecialModelName to be compared - /// Boolean - public bool Equals(SpecialModelName input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.SpecialPropertyName.GetHashCode(); - if (this.SpecialModelNameProperty != null) - { - hashCode = (hashCode * 59) + this.SpecialModelNameProperty.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -126,4 +95,76 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type SpecialModelName + /// + public class SpecialModelNameJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override SpecialModelName Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string specialModelNameProperty = default; + long specialPropertyName = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "_special_model.name_": + specialModelNameProperty = reader.GetString(); + break; + case "$special[property.name]": + specialPropertyName = reader.GetInt64(); + break; + default: + break; + } + } + } + + return new SpecialModelName(specialModelNameProperty, specialPropertyName); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, SpecialModelName specialModelName, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("_special_model.name_", specialModelName.SpecialModelNameProperty); + writer.WriteNumber("$special[property.name]", (int)specialModelName.SpecialPropertyName); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Tag.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Tag.cs index fcc38c0b3a..51a80012fe 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Tag.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Tag.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,15 +26,28 @@ namespace Org.OpenAPITools.Model /// /// Tag /// - public partial class Tag : IEquatable, IValidatableObject + public partial class Tag : IValidatableObject { /// /// Initializes a new instance of the class. /// /// id /// name - public Tag(long id = default, string name = default) + [JsonConstructor] + public Tag(long id, string name) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (id == null) + throw new ArgumentNullException("id is a required property for Tag and cannot be null."); + + if (name == null) + throw new ArgumentNullException("name is a required property for Tag and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + Id = id; Name = name; } @@ -56,7 +68,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -72,49 +84,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Tag).AreEqual; - } - - /// - /// Returns true if Tag instances are equal - /// - /// Instance of Tag to be compared - /// Boolean - public bool Equals(Tag input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -126,4 +95,76 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type Tag + /// + public class TagJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override Tag Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + long id = default; + string name = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "id": + id = reader.GetInt64(); + break; + case "name": + name = reader.GetString(); + break; + default: + break; + } + } + } + + return new Tag(id, name); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Tag tag, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteNumber("id", (int)tag.Id); + writer.WriteString("name", tag.Name); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Triangle.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Triangle.cs index f799b7c43b..6f5eae3cca 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Triangle.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Triangle.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,21 +26,28 @@ namespace Org.OpenAPITools.Model /// /// Triangle /// - public partial class Triangle : IEquatable, IValidatableObject + public partial class Triangle : IValidatableObject { /// /// Initializes a new instance of the class. /// /// - /// shapeType (required) - /// triangleType (required) + /// shapeType + /// triangleType + [JsonConstructor] public Triangle(EquilateralTriangle equilateralTriangle, string shapeType, string triangleType) { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + if (shapeType == null) - throw new ArgumentNullException("shapeType is a required property for Triangle and cannot be null."); + throw new ArgumentNullException(nameof(ShapeType)); if (triangleType == null) - throw new ArgumentNullException("triangleType is a required property for Triangle and cannot be null."); + throw new ArgumentNullException(nameof(TriangleType)); + + #pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' EquilateralTriangle = equilateralTriangle; ShapeType = shapeType; @@ -52,15 +58,22 @@ namespace Org.OpenAPITools.Model /// Initializes a new instance of the class. /// /// - /// shapeType (required) - /// triangleType (required) + /// shapeType + /// triangleType + [JsonConstructor] public Triangle(IsoscelesTriangle isoscelesTriangle, string shapeType, string triangleType) { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + if (shapeType == null) - throw new ArgumentNullException("shapeType is a required property for Triangle and cannot be null."); + throw new ArgumentNullException(nameof(ShapeType)); if (triangleType == null) - throw new ArgumentNullException("triangleType is a required property for Triangle and cannot be null."); + throw new ArgumentNullException(nameof(TriangleType)); + + #pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' IsoscelesTriangle = isoscelesTriangle; ShapeType = shapeType; @@ -71,15 +84,22 @@ namespace Org.OpenAPITools.Model /// Initializes a new instance of the class. /// /// - /// shapeType (required) - /// triangleType (required) + /// shapeType + /// triangleType + [JsonConstructor] public Triangle(ScaleneTriangle scaleneTriangle, string shapeType, string triangleType) { + #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + if (shapeType == null) - throw new ArgumentNullException("shapeType is a required property for Triangle and cannot be null."); + throw new ArgumentNullException(nameof(ShapeType)); if (triangleType == null) - throw new ArgumentNullException("triangleType is a required property for Triangle and cannot be null."); + throw new ArgumentNullException(nameof(TriangleType)); + + #pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' + #pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' ScaleneTriangle = scaleneTriangle; ShapeType = shapeType; @@ -117,7 +137,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -133,52 +153,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Triangle).AreEqual; - } - - /// - /// Returns true if Triangle instances are equal - /// - /// Instance of Triangle to be compared - /// Boolean - public bool Equals(Triangle input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ShapeType != null) - { - hashCode = (hashCode * 59) + this.ShapeType.GetHashCode(); - } - if (this.TriangleType != null) - { - hashCode = (hashCode * 59) + this.TriangleType.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -205,13 +179,6 @@ namespace Org.OpenAPITools.Model /// public class TriangleJsonConverter : JsonConverter { - /// - /// Returns a boolean if the type is compatible with this converter. - /// - /// - /// - public override bool CanConvert(Type typeToConvert) => typeof(Triangle).IsAssignableFrom(typeToConvert); - /// /// A Json reader. /// @@ -224,9 +191,11 @@ namespace Org.OpenAPITools.Model { int currentDepth = reader.CurrentDepth; - if (reader.TokenType != JsonTokenType.StartObject) + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) throw new JsonException(); + JsonTokenType startingTokenType = reader.TokenType; + Utf8JsonReader equilateralTriangleReader = reader; bool equilateralTriangleDeserialized = Client.ClientUtils.TryDeserialize(ref equilateralTriangleReader, options, out EquilateralTriangle equilateralTriangle); @@ -241,10 +210,13 @@ namespace Org.OpenAPITools.Model while (reader.Read()) { - if (reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) break; - if (reader.TokenType == JsonTokenType.PropertyName) + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) { string propertyName = reader.GetString(); reader.Read(); @@ -257,6 +229,8 @@ namespace Org.OpenAPITools.Model case "triangleType": triangleType = reader.GetString(); break; + default: + break; } } } @@ -280,6 +254,14 @@ namespace Org.OpenAPITools.Model /// /// /// - public override void Write(Utf8JsonWriter writer, Triangle triangle, JsonSerializerOptions options) => throw new NotImplementedException(); + public override void Write(Utf8JsonWriter writer, Triangle triangle, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("shapeType", triangle.ShapeType); + writer.WriteString("triangleType", triangle.TriangleType); + + writer.WriteEndObject(); + } } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/TriangleInterface.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/TriangleInterface.cs index f7b06bf05a..882d2b9e42 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/TriangleInterface.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/TriangleInterface.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,17 +26,24 @@ namespace Org.OpenAPITools.Model /// /// TriangleInterface /// - public partial class TriangleInterface : IEquatable, IValidatableObject + public partial class TriangleInterface : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// triangleType (required) + /// triangleType + [JsonConstructor] public TriangleInterface(string triangleType) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + if (triangleType == null) throw new ArgumentNullException("triangleType is a required property for TriangleInterface and cannot be null."); +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + TriangleType = triangleType; } @@ -51,7 +57,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -66,48 +72,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as TriangleInterface).AreEqual; - } - - /// - /// Returns true if TriangleInterface instances are equal - /// - /// Instance of TriangleInterface to be compared - /// Boolean - public bool Equals(TriangleInterface input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.TriangleType != null) - { - hashCode = (hashCode * 59) + this.TriangleType.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -119,4 +83,71 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type TriangleInterface + /// + public class TriangleInterfaceJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override TriangleInterface Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string triangleType = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "triangleType": + triangleType = reader.GetString(); + break; + default: + break; + } + } + } + + return new TriangleInterface(triangleType); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, TriangleInterface triangleInterface, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("triangleType", triangleInterface.TriangleType); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/User.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/User.cs index 38a79e975d..a92270295a 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/User.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/User.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,50 +26,78 @@ namespace Org.OpenAPITools.Model /// /// User /// - public partial class User : IEquatable, IValidatableObject + public partial class User : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// id - /// username - /// firstName - /// lastName /// email + /// firstName + /// id + /// lastName + /// test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. /// password /// phone /// User Status - /// test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. - /// test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. + /// username /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389 /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values. - public User(long id = default, string username = default, string firstName = default, string lastName = default, string email = default, string password = default, string phone = default, int userStatus = default, Object objectWithNoDeclaredProps = default, Object objectWithNoDeclaredPropsNullable = default, Object anyTypeProp = default, Object anyTypePropNullable = default) + /// test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. + [JsonConstructor] + public User(string email, string firstName, long id, string lastName, Object objectWithNoDeclaredProps, string password, string phone, int userStatus, string username, Object anyTypeProp = default, Object anyTypePropNullable = default, Object objectWithNoDeclaredPropsNullable = default) { - Id = id; - Username = username; - FirstName = firstName; - LastName = lastName; +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (id == null) + throw new ArgumentNullException("id is a required property for User and cannot be null."); + + if (username == null) + throw new ArgumentNullException("username is a required property for User and cannot be null."); + + if (firstName == null) + throw new ArgumentNullException("firstName is a required property for User and cannot be null."); + + if (lastName == null) + throw new ArgumentNullException("lastName is a required property for User and cannot be null."); + + if (email == null) + throw new ArgumentNullException("email is a required property for User and cannot be null."); + + if (password == null) + throw new ArgumentNullException("password is a required property for User and cannot be null."); + + if (phone == null) + throw new ArgumentNullException("phone is a required property for User and cannot be null."); + + if (userStatus == null) + throw new ArgumentNullException("userStatus is a required property for User and cannot be null."); + + if (objectWithNoDeclaredProps == null) + throw new ArgumentNullException("objectWithNoDeclaredProps is a required property for User and cannot be null."); + +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + Email = email; + FirstName = firstName; + Id = id; + LastName = lastName; + ObjectWithNoDeclaredProps = objectWithNoDeclaredProps; Password = password; Phone = phone; UserStatus = userStatus; - ObjectWithNoDeclaredProps = objectWithNoDeclaredProps; - ObjectWithNoDeclaredPropsNullable = objectWithNoDeclaredPropsNullable; + Username = username; AnyTypeProp = anyTypeProp; AnyTypePropNullable = anyTypePropNullable; + ObjectWithNoDeclaredPropsNullable = objectWithNoDeclaredPropsNullable; } /// - /// Gets or Sets Id + /// Gets or Sets Email /// - [JsonPropertyName("id")] - public long Id { get; set; } - - /// - /// Gets or Sets Username - /// - [JsonPropertyName("username")] - public string Username { get; set; } + [JsonPropertyName("email")] + public string Email { get; set; } /// /// Gets or Sets FirstName @@ -78,6 +105,12 @@ namespace Org.OpenAPITools.Model [JsonPropertyName("firstName")] public string FirstName { get; set; } + /// + /// Gets or Sets Id + /// + [JsonPropertyName("id")] + public long Id { get; set; } + /// /// Gets or Sets LastName /// @@ -85,10 +118,11 @@ namespace Org.OpenAPITools.Model public string LastName { get; set; } /// - /// Gets or Sets Email + /// test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. /// - [JsonPropertyName("email")] - public string Email { get; set; } + /// test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. + [JsonPropertyName("objectWithNoDeclaredProps")] + public Object ObjectWithNoDeclaredProps { get; set; } /// /// Gets or Sets Password @@ -110,18 +144,10 @@ namespace Org.OpenAPITools.Model public int UserStatus { get; set; } /// - /// test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. + /// Gets or Sets Username /// - /// test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. - [JsonPropertyName("objectWithNoDeclaredProps")] - public Object ObjectWithNoDeclaredProps { get; set; } - - /// - /// test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. - /// - /// test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. - [JsonPropertyName("objectWithNoDeclaredPropsNullable")] - public Object ObjectWithNoDeclaredPropsNullable { get; set; } + [JsonPropertyName("username")] + public string Username { get; set; } /// /// test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389 @@ -137,11 +163,18 @@ namespace Org.OpenAPITools.Model [JsonPropertyName("anyTypePropNullable")] public Object AnyTypePropNullable { get; set; } + /// + /// test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. + /// + /// test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. + [JsonPropertyName("objectWithNoDeclaredPropsNullable")] + public Object ObjectWithNoDeclaredPropsNullable { get; set; } + /// /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -151,102 +184,22 @@ namespace Org.OpenAPITools.Model { StringBuilder sb = new StringBuilder(); sb.Append("class User {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Username: ").Append(Username).Append("\n"); - sb.Append(" FirstName: ").Append(FirstName).Append("\n"); - sb.Append(" LastName: ").Append(LastName).Append("\n"); sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append(" FirstName: ").Append(FirstName).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" LastName: ").Append(LastName).Append("\n"); + sb.Append(" ObjectWithNoDeclaredProps: ").Append(ObjectWithNoDeclaredProps).Append("\n"); sb.Append(" Password: ").Append(Password).Append("\n"); sb.Append(" Phone: ").Append(Phone).Append("\n"); sb.Append(" UserStatus: ").Append(UserStatus).Append("\n"); - sb.Append(" ObjectWithNoDeclaredProps: ").Append(ObjectWithNoDeclaredProps).Append("\n"); - sb.Append(" ObjectWithNoDeclaredPropsNullable: ").Append(ObjectWithNoDeclaredPropsNullable).Append("\n"); + sb.Append(" Username: ").Append(Username).Append("\n"); sb.Append(" AnyTypeProp: ").Append(AnyTypeProp).Append("\n"); sb.Append(" AnyTypePropNullable: ").Append(AnyTypePropNullable).Append("\n"); + sb.Append(" ObjectWithNoDeclaredPropsNullable: ").Append(ObjectWithNoDeclaredPropsNullable).Append("\n"); sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as User).AreEqual; - } - - /// - /// Returns true if User instances are equal - /// - /// Instance of User to be compared - /// Boolean - public bool Equals(User input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - if (this.Username != null) - { - hashCode = (hashCode * 59) + this.Username.GetHashCode(); - } - if (this.FirstName != null) - { - hashCode = (hashCode * 59) + this.FirstName.GetHashCode(); - } - if (this.LastName != null) - { - hashCode = (hashCode * 59) + this.LastName.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - if (this.Password != null) - { - hashCode = (hashCode * 59) + this.Password.GetHashCode(); - } - if (this.Phone != null) - { - hashCode = (hashCode * 59) + this.Phone.GetHashCode(); - } - hashCode = (hashCode * 59) + this.UserStatus.GetHashCode(); - if (this.ObjectWithNoDeclaredProps != null) - { - hashCode = (hashCode * 59) + this.ObjectWithNoDeclaredProps.GetHashCode(); - } - if (this.ObjectWithNoDeclaredPropsNullable != null) - { - hashCode = (hashCode * 59) + this.ObjectWithNoDeclaredPropsNullable.GetHashCode(); - } - if (this.AnyTypeProp != null) - { - hashCode = (hashCode * 59) + this.AnyTypeProp.GetHashCode(); - } - if (this.AnyTypePropNullable != null) - { - hashCode = (hashCode * 59) + this.AnyTypePropNullable.GetHashCode(); - } - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -258,4 +211,130 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type User + /// + public class UserJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override User Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string email = default; + string firstName = default; + long id = default; + string lastName = default; + Object objectWithNoDeclaredProps = default; + string password = default; + string phone = default; + int userStatus = default; + string username = default; + Object anyTypeProp = default; + Object anyTypePropNullable = default; + Object objectWithNoDeclaredPropsNullable = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "email": + email = reader.GetString(); + break; + case "firstName": + firstName = reader.GetString(); + break; + case "id": + id = reader.GetInt64(); + break; + case "lastName": + lastName = reader.GetString(); + break; + case "objectWithNoDeclaredProps": + objectWithNoDeclaredProps = JsonSerializer.Deserialize(ref reader, options); + break; + case "password": + password = reader.GetString(); + break; + case "phone": + phone = reader.GetString(); + break; + case "userStatus": + userStatus = reader.GetInt32(); + break; + case "username": + username = reader.GetString(); + break; + case "anyTypeProp": + anyTypeProp = JsonSerializer.Deserialize(ref reader, options); + break; + case "anyTypePropNullable": + anyTypePropNullable = JsonSerializer.Deserialize(ref reader, options); + break; + case "objectWithNoDeclaredPropsNullable": + objectWithNoDeclaredPropsNullable = JsonSerializer.Deserialize(ref reader, options); + break; + default: + break; + } + } + } + + return new User(email, firstName, id, lastName, objectWithNoDeclaredProps, password, phone, userStatus, username, anyTypeProp, anyTypePropNullable, objectWithNoDeclaredPropsNullable); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, User user, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("email", user.Email); + writer.WriteString("firstName", user.FirstName); + writer.WriteNumber("id", (int)user.Id); + writer.WriteString("lastName", user.LastName); + writer.WritePropertyName("objectWithNoDeclaredProps"); + JsonSerializer.Serialize(writer, user.ObjectWithNoDeclaredProps, options); + writer.WriteString("password", user.Password); + writer.WriteString("phone", user.Phone); + writer.WriteNumber("userStatus", (int)user.UserStatus); + writer.WriteString("username", user.Username); + writer.WritePropertyName("anyTypeProp"); + JsonSerializer.Serialize(writer, user.AnyTypeProp, options); + writer.WritePropertyName("anyTypePropNullable"); + JsonSerializer.Serialize(writer, user.AnyTypePropNullable, options); + writer.WritePropertyName("objectWithNoDeclaredPropsNullable"); + JsonSerializer.Serialize(writer, user.ObjectWithNoDeclaredPropsNullable, options); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Whale.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Whale.cs index 57c3ddbd8d..598bedad22 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Whale.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Whale.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,19 +26,32 @@ namespace Org.OpenAPITools.Model /// /// Whale /// - public partial class Whale : IEquatable, IValidatableObject + public partial class Whale : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// className (required) + /// className /// hasBaleen /// hasTeeth - public Whale(string className, bool hasBaleen = default, bool hasTeeth = default) + [JsonConstructor] + public Whale(string className, bool hasBaleen, bool hasTeeth) { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (hasBaleen == null) + throw new ArgumentNullException("hasBaleen is a required property for Whale and cannot be null."); + + if (hasTeeth == null) + throw new ArgumentNullException("hasTeeth is a required property for Whale and cannot be null."); + if (className == null) throw new ArgumentNullException("className is a required property for Whale and cannot be null."); +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + ClassName = className; HasBaleen = hasBaleen; HasTeeth = hasTeeth; @@ -67,7 +79,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -84,50 +96,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Whale).AreEqual; - } - - /// - /// Returns true if Whale instances are equal - /// - /// Instance of Whale to be compared - /// Boolean - public bool Equals(Whale input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ClassName != null) - { - hashCode = (hashCode * 59) + this.ClassName.GetHashCode(); - } - hashCode = (hashCode * 59) + this.HasBaleen.GetHashCode(); - hashCode = (hashCode * 59) + this.HasTeeth.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -139,4 +107,81 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type Whale + /// + public class WhaleJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override Whale Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string className = default; + bool hasBaleen = default; + bool hasTeeth = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "className": + className = reader.GetString(); + break; + case "hasBaleen": + hasBaleen = reader.GetBoolean(); + break; + case "hasTeeth": + hasTeeth = reader.GetBoolean(); + break; + default: + break; + } + } + } + + return new Whale(className, hasBaleen, hasTeeth); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Whale whale, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("className", whale.ClassName); + writer.WriteBoolean("hasBaleen", whale.HasBaleen); + writer.WriteBoolean("hasTeeth", whale.HasTeeth); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Zebra.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Zebra.cs index 452c2fe8b7..df74e95ec6 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Zebra.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Model/Zebra.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.IO; -using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; using System.Text.Json; @@ -27,18 +26,28 @@ namespace Org.OpenAPITools.Model /// /// Zebra /// - public partial class Zebra : Dictionary, IEquatable, IValidatableObject + public partial class Zebra : Dictionary, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// className (required) + /// className /// type - public Zebra(string className, TypeEnum type = default) : base() + [JsonConstructor] + public Zebra(string className, TypeEnum type) : base() { +#pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + + if (type == null) + throw new ArgumentNullException("type is a required property for Zebra and cannot be null."); + if (className == null) throw new ArgumentNullException("className is a required property for Zebra and cannot be null."); +#pragma warning restore CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null' +#pragma warning restore CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null' + ClassName = className; Type = type; } @@ -51,23 +60,59 @@ namespace Org.OpenAPITools.Model /// /// Enum Plains for value: plains /// - [EnumMember(Value = "plains")] Plains = 1, /// /// Enum Mountain for value: mountain /// - [EnumMember(Value = "mountain")] Mountain = 2, /// /// Enum Grevys for value: grevys /// - [EnumMember(Value = "grevys")] Grevys = 3 } + /// + /// Returns a TypeEnum + /// + /// + /// + public static TypeEnum TypeEnumFromString(string value) + { + if (value == "plains") + return TypeEnum.Plains; + + if (value == "mountain") + return TypeEnum.Mountain; + + if (value == "grevys") + return TypeEnum.Grevys; + + throw new NotImplementedException($"Could not convert value to type TypeEnum: '{value}'"); + } + + /// + /// Returns equivalent json value + /// + /// + /// + /// + public static string TypeEnumToJsonValue(TypeEnum value) + { + if (value == TypeEnum.Plains) + return "plains"; + + if (value == TypeEnum.Mountain) + return "mountain"; + + if (value == TypeEnum.Grevys) + return "grevys"; + + throw new NotImplementedException($"Value could not be handled: '{value}'"); + } + /// /// Gets or Sets Type /// @@ -84,7 +129,7 @@ namespace Org.OpenAPITools.Model /// Gets or Sets additional properties /// [JsonExtensionData] - public Dictionary AdditionalProperties { get; set; } = new Dictionary(); + public Dictionary AdditionalProperties { get; } = new Dictionary(); /// /// Returns the string presentation of the object @@ -101,49 +146,6 @@ namespace Org.OpenAPITools.Model sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input as Zebra).AreEqual; - } - - /// - /// Returns true if Zebra instances are equal - /// - /// Instance of Zebra to be compared - /// Boolean - public bool Equals(Zebra input) - { - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.ClassName != null) - { - hashCode = (hashCode * 59) + this.ClassName.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - if (this.AdditionalProperties != null) - { - hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// @@ -155,4 +157,81 @@ namespace Org.OpenAPITools.Model } } + /// + /// A Json converter for type Zebra + /// + public class ZebraJsonConverter : JsonConverter + { + /// + /// A Json reader. + /// + /// + /// + /// + /// + /// + public override Zebra Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + int currentDepth = reader.CurrentDepth; + + if (reader.TokenType != JsonTokenType.StartObject && reader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = reader.TokenType; + + string className = default; + Zebra.TypeEnum type = default; + + while (reader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && reader.TokenType == JsonTokenType.EndObject && currentDepth == reader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && reader.TokenType == JsonTokenType.EndArray && currentDepth == reader.CurrentDepth) + break; + + if (reader.TokenType == JsonTokenType.PropertyName && currentDepth == reader.CurrentDepth - 1) + { + string propertyName = reader.GetString(); + reader.Read(); + + switch (propertyName) + { + case "className": + className = reader.GetString(); + break; + case "type": + string typeRawValue = reader.GetString(); + type = Zebra.TypeEnumFromString(typeRawValue); + break; + default: + break; + } + } + } + + return new Zebra(className, type); + } + + /// + /// A Json writer + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Zebra zebra, JsonSerializerOptions options) + { + writer.WriteStartObject(); + + writer.WriteString("className", zebra.ClassName); + var typeRawValue = Zebra.TypeEnumToJsonValue(zebra.Type); + if (typeRawValue != null) + writer.WriteString("type", typeRawValue); + else + writer.WriteNull("type"); + + writer.WriteEndObject(); + } + } } diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/README.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/README.md new file mode 100644 index 0000000000..e5abd8bcea --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/README.md @@ -0,0 +1,260 @@ +# Created with Openapi Generator + + +## Run the following powershell command to generate the library + +```ps1 +$properties = @( + 'apiName=Api', + 'targetFramework=netstandard2.0', + 'validatable=true', + 'nullableReferenceTypes=', + 'hideGenerationTimestamp=true', + 'packageVersion=1.0.0', + 'packageAuthors=OpenAPI', + 'packageCompany=OpenAPI', + 'packageCopyright=No Copyright', + 'packageDescription=A library generated from a OpenAPI doc', + 'packageName=Org.OpenAPITools', + 'packageTags=', + 'packageTitle=OpenAPI Library' +) -join "," + +$global = @( + 'apiDocs=true', + 'modelDocs=true', + 'apiTests=true', + 'modelTests=true' +) -join "," + +java -jar "/openapi-generator/modules/openapi-generator-cli/target/openapi-generator-cli.jar" generate ` + -g csharp-netcore ` + -i .yaml ` + -o ` + --library generichost ` + --additional-properties $properties ` + --global-property $global ` + --git-host "github.com" ` + --git-repo-id "GIT_REPO_ID" ` + --git-user-id "GIT_USER_ID" ` + --release-note "Minor update" + # -t templates +``` + + +## Using the library in your project + +```cs +using System; +using System.Threading.Tasks; +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.DependencyInjection; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Client; +using Org.OpenAPITools.Model; + +namespace YourProject +{ + public class Program + { + public static async Task Main(string[] args) + { + var host = CreateHostBuilder(args).Build(); + var api = host.Services.GetRequiredService(); + ApiResponse foo = await api.Call123TestSpecialTagsWithHttpInfoAsync("todo"); + } + + public static IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args) + .ConfigureApi((context, options) => + { + // the type of token here depends on the api security specifications + ApiKeyToken token = new(""); + options.AddTokens(token); + + // optionally choose the method the tokens will be provided with, default is RateLimitProvider + options.UseProvider, ApiKeyToken>(); + + // the type of token here depends on the api security specifications + ApiKeyToken token = new(""); + options.AddTokens(token); + + // optionally choose the method the tokens will be provided with, default is RateLimitProvider + options.UseProvider, ApiKeyToken>(); + + // the type of token here depends on the api security specifications + ApiKeyToken token = new(""); + options.AddTokens(token); + + // optionally choose the method the tokens will be provided with, default is RateLimitProvider + options.UseProvider, ApiKeyToken>(); + + // the type of token here depends on the api security specifications + ApiKeyToken token = new(""); + options.AddTokens(token); + + // optionally choose the method the tokens will be provided with, default is RateLimitProvider + options.UseProvider, ApiKeyToken>(); + + // the type of token here depends on the api security specifications + ApiKeyToken token = new(""); + options.AddTokens(token); + + // optionally choose the method the tokens will be provided with, default is RateLimitProvider + options.UseProvider, ApiKeyToken>(); + + // the type of token here depends on the api security specifications + ApiKeyToken token = new(""); + options.AddTokens(token); + + // optionally choose the method the tokens will be provided with, default is RateLimitProvider + options.UseProvider, ApiKeyToken>(); + + options.ConfigureJsonOptions((jsonOptions) => + { + // your custom converters if any + }); + + options.AddApiHttpClients(builder: builder => builder + .AddRetryPolicy(2) + .AddTimeoutPolicy(TimeSpan.FromSeconds(5)) + .AddCircuitBreakerPolicy(10, TimeSpan.FromSeconds(30)) + // add whatever middleware you prefer + ); + }); + } +} +``` + +## Questions + +- What about HttpRequest failures and retries? + If supportsRetry is enabled, you can configure Polly in the ConfigureClients method. +- How are tokens used? + Tokens are provided by a TokenProvider class. The default is RateLimitProvider which will perform client side rate limiting. + Other providers can be used with the UseProvider method. +- Does an HttpRequest throw an error when the server response is not Ok? + It depends how you made the request. If the return type is ApiResponse no error will be thrown, though the Content property will be null. + StatusCode and ReasonPhrase will contain information about the error. + If the return type is T, then it will throw. If the return type is TOrDefault, it will return null. +- How do I validate requests and process responses? + Use the provided On and After methods in the Api class from the namespace Org.OpenAPITools.Rest.DefaultApi. + Or provide your own class by using the generic ConfigureApi method. + + +## Dependencies + +- [Microsoft.Extensions.Hosting](https://www.nuget.org/packages/Microsoft.Extensions.Hosting/) - 5.0.0 or later +- [Microsoft.Extensions.Http](https://www.nuget.org/packages/Microsoft.Extensions.Http/) - 5.0.0 or later +- [Microsoft.Extensions.Http.Polly](https://www.nuget.org/packages/Microsoft.Extensions.Http.Polly/) - 5.0.1 or later +- [Polly](https://www.nuget.org/packages/Polly/) - 7.2.3 or later +- [CompareNETObjects](https://www.nuget.org/packages/CompareNETObjects) - 4.61.0 or later +- [System.ComponentModel.Annotations](https://www.nuget.org/packages/System.ComponentModel.Annotations) - 4.7.0 or later + + +## Documentation for Authorization + +Authentication schemes defined for the API: + + +### api_key + +- **Type**: API key +- **API key parameter name**: api_key +- **Location**: HTTP header + + +### api_key_query + +- **Type**: API key +- **API key parameter name**: api_key_query +- **Location**: URL query string + + +### bearer_test + + +- **Type**: Bearer Authentication + + +### http_basic_test + + +- **Type**: HTTP basic authentication + + +### http_signature_test + + + + +### petstore_auth + + +- **Type**: OAuth +- **Flow**: implicit +- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog +- **Scopes**: +- write:pets: modify pets in your account +- read:pets: read your pets + +## Build +- SDK version: 1.0.0 +- Build package: org.openapitools.codegen.languages.CSharpNetCoreClientCodegen + +## Api Information +- appName: OpenAPI Petstore +- appVersion: 1.0.0 +- appDescription: 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 Global properties](https://openapi-generator.tech/docs/globals) +- generateAliasAsModel: +- supportingFiles: +- models: omitted for brevity +- apis: omitted for brevity +- apiDocs: true +- modelDocs: true +- apiTests: true +- modelTests: true +- withXml: + +## [OpenApi Generator Parameters](https://openapi-generator.tech/docs/generators/csharp-netcore) +- allowUnicodeIdentifiers: +- apiName: Api +- caseInsensitiveResponseHeaders: +- conditionalSerialization: false +- disallowAdditionalPropertiesIfNotPresent: false +- gitHost: github.com +- gitRepoId: GIT_REPO_ID +- gitUserId: GIT_USER_ID +- hideGenerationTimestamp: true +- interfacePrefix: I +- library: generichost +- licenseId: +- modelPropertyNaming: +- netCoreProjectFile: false +- nonPublicApi: false +- nullableReferenceTypes: +- optionalAssemblyInfo: +- optionalEmitDefaultValues: false +- optionalMethodArgument: true +- optionalProjectFile: +- packageAuthors: OpenAPI +- packageCompany: OpenAPI +- packageCopyright: No Copyright +- packageDescription: A library generated from a OpenAPI doc +- packageGuid: {321C8C3F-0156-40C1-AE42-D59761FB9B6C} +- packageName: Org.OpenAPITools +- packageTags: +- packageTitle: OpenAPI Library +- packageVersion: 1.0.0 +- releaseNote: Minor update +- returnICollection: false +- sortParamsByRequiredFlag: +- sourceFolder: src +- targetFramework: netstandard2.0 +- useCollection: false +- useDateTimeOffset: false +- useOneOfDiscriminatorLookup: false +- validatable: true + +This C# SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project. diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj index 4ec90f4eaf..5fa12ee893 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj @@ -8,13 +8,12 @@ - + - + - diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj index 866b572467..8dd131b6d2 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj @@ -8,13 +8,12 @@ - + - + - diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj index f92a456428..d708a4dd9b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj @@ -9,13 +9,12 @@ - + - + - diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj index f75257161b..6e71720a94 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj @@ -16,5 +16,4 @@ - From a47b95a7491820c5717d6250cb26e19ebea945d8 Mon Sep 17 00:00:00 2001 From: Julian Anthes <3493187+dschu-lab@users.noreply.github.com> Date: Fri, 9 Dec 2022 11:40:17 +0100 Subject: [PATCH 094/189] feat(typescript-axios): set `name` in constructor (#14230) * refactor: set `name` in constructor * chore: update samples --- .../src/main/resources/typescript-axios/baseApi.mustache | 2 +- .../with-separate-models-and-api-inheritance/base.ts | 2 +- .../petstore/typescript-axios/builds/composed-schemas/base.ts | 2 +- samples/client/petstore/typescript-axios/builds/default/base.ts | 2 +- .../client/petstore/typescript-axios/builds/es6-target/base.ts | 2 +- .../petstore/typescript-axios/builds/test-petstore/base.ts | 2 +- .../typescript-axios/builds/with-complex-headers/base.ts | 2 +- .../base.ts | 2 +- .../petstore/typescript-axios/builds/with-interfaces/base.ts | 2 +- .../petstore/typescript-axios/builds/with-node-imports/base.ts | 2 +- .../builds/with-npm-version-and-separate-models-and-api/base.ts | 2 +- .../petstore/typescript-axios/builds/with-npm-version/base.ts | 2 +- .../builds/with-single-request-parameters/base.ts | 2 +- .../petstore/typescript-axios/builds/with-string-enums/base.ts | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/typescript-axios/baseApi.mustache b/modules/openapi-generator/src/main/resources/typescript-axios/baseApi.mustache index 1daf5146b6..6d6d0febbf 100755 --- a/modules/openapi-generator/src/main/resources/typescript-axios/baseApi.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-axios/baseApi.mustache @@ -54,8 +54,8 @@ export class BaseAPI { * @extends {Error} */ export class RequiredError extends Error { - name: "RequiredError" = "RequiredError"; constructor(public field: string, msg?: string) { super(msg); + this.name = "RequiredError" } } diff --git a/samples/client/others/typescript-axios/with-separate-models-and-api-inheritance/base.ts b/samples/client/others/typescript-axios/with-separate-models-and-api-inheritance/base.ts index 6c505d0bfb..0f9241761b 100644 --- a/samples/client/others/typescript-axios/with-separate-models-and-api-inheritance/base.ts +++ b/samples/client/others/typescript-axios/with-separate-models-and-api-inheritance/base.ts @@ -65,8 +65,8 @@ export class BaseAPI { * @extends {Error} */ export class RequiredError extends Error { - name: "RequiredError" = "RequiredError"; constructor(public field: string, msg?: string) { super(msg); + this.name = "RequiredError" } } diff --git a/samples/client/petstore/typescript-axios/builds/composed-schemas/base.ts b/samples/client/petstore/typescript-axios/builds/composed-schemas/base.ts index f9785646f5..d24c18a6ae 100644 --- a/samples/client/petstore/typescript-axios/builds/composed-schemas/base.ts +++ b/samples/client/petstore/typescript-axios/builds/composed-schemas/base.ts @@ -65,8 +65,8 @@ export class BaseAPI { * @extends {Error} */ export class RequiredError extends Error { - name: "RequiredError" = "RequiredError"; constructor(public field: string, msg?: string) { super(msg); + this.name = "RequiredError" } } diff --git a/samples/client/petstore/typescript-axios/builds/default/base.ts b/samples/client/petstore/typescript-axios/builds/default/base.ts index fb2bbd0eef..6a80fbd4e5 100644 --- a/samples/client/petstore/typescript-axios/builds/default/base.ts +++ b/samples/client/petstore/typescript-axios/builds/default/base.ts @@ -65,8 +65,8 @@ export class BaseAPI { * @extends {Error} */ export class RequiredError extends Error { - name: "RequiredError" = "RequiredError"; constructor(public field: string, msg?: string) { super(msg); + this.name = "RequiredError" } } diff --git a/samples/client/petstore/typescript-axios/builds/es6-target/base.ts b/samples/client/petstore/typescript-axios/builds/es6-target/base.ts index fb2bbd0eef..6a80fbd4e5 100644 --- a/samples/client/petstore/typescript-axios/builds/es6-target/base.ts +++ b/samples/client/petstore/typescript-axios/builds/es6-target/base.ts @@ -65,8 +65,8 @@ export class BaseAPI { * @extends {Error} */ export class RequiredError extends Error { - name: "RequiredError" = "RequiredError"; constructor(public field: string, msg?: string) { super(msg); + this.name = "RequiredError" } } diff --git a/samples/client/petstore/typescript-axios/builds/test-petstore/base.ts b/samples/client/petstore/typescript-axios/builds/test-petstore/base.ts index df5d57f7a0..de8321eac1 100644 --- a/samples/client/petstore/typescript-axios/builds/test-petstore/base.ts +++ b/samples/client/petstore/typescript-axios/builds/test-petstore/base.ts @@ -65,8 +65,8 @@ export class BaseAPI { * @extends {Error} */ export class RequiredError extends Error { - name: "RequiredError" = "RequiredError"; constructor(public field: string, msg?: string) { super(msg); + this.name = "RequiredError" } } diff --git a/samples/client/petstore/typescript-axios/builds/with-complex-headers/base.ts b/samples/client/petstore/typescript-axios/builds/with-complex-headers/base.ts index fb2bbd0eef..6a80fbd4e5 100644 --- a/samples/client/petstore/typescript-axios/builds/with-complex-headers/base.ts +++ b/samples/client/petstore/typescript-axios/builds/with-complex-headers/base.ts @@ -65,8 +65,8 @@ export class BaseAPI { * @extends {Error} */ export class RequiredError extends Error { - name: "RequiredError" = "RequiredError"; constructor(public field: string, msg?: string) { super(msg); + this.name = "RequiredError" } } diff --git a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/base.ts b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/base.ts index df5d57f7a0..de8321eac1 100644 --- a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/base.ts +++ b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/base.ts @@ -65,8 +65,8 @@ export class BaseAPI { * @extends {Error} */ export class RequiredError extends Error { - name: "RequiredError" = "RequiredError"; constructor(public field: string, msg?: string) { super(msg); + this.name = "RequiredError" } } diff --git a/samples/client/petstore/typescript-axios/builds/with-interfaces/base.ts b/samples/client/petstore/typescript-axios/builds/with-interfaces/base.ts index fb2bbd0eef..6a80fbd4e5 100644 --- a/samples/client/petstore/typescript-axios/builds/with-interfaces/base.ts +++ b/samples/client/petstore/typescript-axios/builds/with-interfaces/base.ts @@ -65,8 +65,8 @@ export class BaseAPI { * @extends {Error} */ export class RequiredError extends Error { - name: "RequiredError" = "RequiredError"; constructor(public field: string, msg?: string) { super(msg); + this.name = "RequiredError" } } diff --git a/samples/client/petstore/typescript-axios/builds/with-node-imports/base.ts b/samples/client/petstore/typescript-axios/builds/with-node-imports/base.ts index fb2bbd0eef..6a80fbd4e5 100644 --- a/samples/client/petstore/typescript-axios/builds/with-node-imports/base.ts +++ b/samples/client/petstore/typescript-axios/builds/with-node-imports/base.ts @@ -65,8 +65,8 @@ export class BaseAPI { * @extends {Error} */ export class RequiredError extends Error { - name: "RequiredError" = "RequiredError"; constructor(public field: string, msg?: string) { super(msg); + this.name = "RequiredError" } } diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/base.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/base.ts index fb2bbd0eef..6a80fbd4e5 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/base.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/base.ts @@ -65,8 +65,8 @@ export class BaseAPI { * @extends {Error} */ export class RequiredError extends Error { - name: "RequiredError" = "RequiredError"; constructor(public field: string, msg?: string) { super(msg); + this.name = "RequiredError" } } diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version/base.ts b/samples/client/petstore/typescript-axios/builds/with-npm-version/base.ts index fb2bbd0eef..6a80fbd4e5 100644 --- a/samples/client/petstore/typescript-axios/builds/with-npm-version/base.ts +++ b/samples/client/petstore/typescript-axios/builds/with-npm-version/base.ts @@ -65,8 +65,8 @@ export class BaseAPI { * @extends {Error} */ export class RequiredError extends Error { - name: "RequiredError" = "RequiredError"; constructor(public field: string, msg?: string) { super(msg); + this.name = "RequiredError" } } diff --git a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/base.ts b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/base.ts index fb2bbd0eef..6a80fbd4e5 100644 --- a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/base.ts +++ b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/base.ts @@ -65,8 +65,8 @@ export class BaseAPI { * @extends {Error} */ export class RequiredError extends Error { - name: "RequiredError" = "RequiredError"; constructor(public field: string, msg?: string) { super(msg); + this.name = "RequiredError" } } diff --git a/samples/client/petstore/typescript-axios/builds/with-string-enums/base.ts b/samples/client/petstore/typescript-axios/builds/with-string-enums/base.ts index fb2bbd0eef..6a80fbd4e5 100644 --- a/samples/client/petstore/typescript-axios/builds/with-string-enums/base.ts +++ b/samples/client/petstore/typescript-axios/builds/with-string-enums/base.ts @@ -65,8 +65,8 @@ export class BaseAPI { * @extends {Error} */ export class RequiredError extends Error { - name: "RequiredError" = "RequiredError"; constructor(public field: string, msg?: string) { super(msg); + this.name = "RequiredError" } } From d90c9a6f3bdabec92019e7a78837400c575c5735 Mon Sep 17 00:00:00 2001 From: Vladimir Svoboda Date: Fri, 9 Dec 2022 15:24:55 +0100 Subject: [PATCH 095/189] Add support for Angular v15 (#14231) * Add support for Angular v15 Support for: - rxjs 7.5.5 - ngPackagr 15.0.2 - zonejs 0.11.5 - typescript >=4.8.2 and <4.10.0 Note that tsTickle is not added to the dependencies when generating for Angular 15, as: - it is not a real dependency - tsTickle is compatible with any of the TypeScript versions that Angular 15 supports. * Generate samples for Angular v15 - typescript-angular-v15-provided-in-root - typescript-angular-v15-query-param-object-format * Drop sample typescript-angular-v15-query-param-object-format * Fix typo * Add tests for sample Use credentials instead of api_key to avoid deprecation warnings when initialising ConfigurationParameters. * Update samples/client/petstore/typescript-angular-v15-provided-in-root/package.json * Fix tests by removing context initialisation Also updated the test dependencies. Co-authored-by: Esteban Gehring --- ...pescript-angular-v15-provided-in-root.yaml | 7 + docs/generators/typescript-angular.md | 4 +- .../TypeScriptAngularClientCodegen.java | 22 +- .../typescript-angular/package.mustache | 4 +- .../package.json | 17 +- .../array-and-object-expected/package.json | 17 +- .../custom-path-params-expected/package.json | 17 +- .../typescript/petstore-expected/package.json | 17 +- pom.xml | 1 + .../.gitignore | 42 + .../angular.json | 114 + .../builds/default/.gitignore | 4 + .../builds/default/.openapi-generator-ignore | 23 + .../builds/default/.openapi-generator/FILES | 20 + .../builds/default/.openapi-generator/VERSION | 1 + .../builds/default/README.md | 226 + .../builds/default/api.module.ts | 33 + .../builds/default/api/api.ts | 7 + .../builds/default/api/pet.service.ts | 734 + .../builds/default/api/store.service.ts | 344 + .../builds/default/api/user.service.ts | 659 + .../builds/default/configuration.ts | 186 + .../builds/default/encoder.ts | 20 + .../builds/default/git_push.sh | 57 + .../builds/default/index.ts | 6 + .../builds/default/model/apiResponse.ts | 22 + .../builds/default/model/category.ts | 21 + .../builds/default/model/models.ts | 6 + .../builds/default/model/order.ts | 37 + .../builds/default/model/pet.ts | 39 + .../builds/default/model/tag.ts | 21 + .../builds/default/model/user.ts | 30 + .../builds/default/param.ts | 69 + .../builds/default/variables.ts | 9 + .../package-lock.json | 20188 ++++++++++++++++ .../package.json | 47 + .../pom.xml | 140 + .../tests/default/src/app/app.component.css | 0 .../tests/default/src/app/app.component.html | 44 + .../default/src/app/app.component.spec.ts | 94 + .../tests/default/src/app/app.component.ts | 71 + .../tests/default/src/app/app.module.ts | 36 + .../src/environments/environment.prod.ts | 3 + .../default/src/environments/environment.ts | 15 + .../tests/default/src/favicon.ico | Bin 0 -> 5430 bytes .../tests/default/src/index.html | 14 + .../tests/default/src/karma.conf.js | 31 + .../tests/default/src/main.ts | 12 + .../tests/default/src/polyfills.ts | 63 + .../tests/default/src/styles.css | 1 + .../tests/default/src/test.ts | 16 + .../tests/default/src/test/api.spec.ts | 152 + .../tests/default/src/test/basePath.spec.ts | 63 + .../default/src/test/configuration.spec.ts | 140 + .../tests/default/src/test/fakeBackend.ts | 92 + .../default/src/test/no-configuration.spec.ts | 61 + .../tests/default/src/tsconfig.app.json | 14 + .../tests/default/src/tsconfig.spec.json | 18 + .../tests/default/src/tslint.json | 17 + .../tsconfig.json | 25 + .../tslint.json | 129 + 61 files changed, 24276 insertions(+), 46 deletions(-) create mode 100644 bin/configs/typescript-angular-v15-provided-in-root.yaml create mode 100644 samples/client/petstore/typescript-angular-v15-provided-in-root/.gitignore create mode 100644 samples/client/petstore/typescript-angular-v15-provided-in-root/angular.json create mode 100644 samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/.gitignore create mode 100644 samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/.openapi-generator-ignore create mode 100644 samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/.openapi-generator/FILES create mode 100644 samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/.openapi-generator/VERSION create mode 100644 samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/README.md create mode 100644 samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/api.module.ts create mode 100644 samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/api/api.ts create mode 100644 samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/api/pet.service.ts create mode 100644 samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/api/store.service.ts create mode 100644 samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/api/user.service.ts create mode 100644 samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/configuration.ts create mode 100644 samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/encoder.ts create mode 100644 samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/git_push.sh create mode 100644 samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/index.ts create mode 100644 samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/model/apiResponse.ts create mode 100644 samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/model/category.ts create mode 100644 samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/model/models.ts create mode 100644 samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/model/order.ts create mode 100644 samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/model/pet.ts create mode 100644 samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/model/tag.ts create mode 100644 samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/model/user.ts create mode 100644 samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/param.ts create mode 100644 samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/variables.ts create mode 100644 samples/client/petstore/typescript-angular-v15-provided-in-root/package-lock.json create mode 100644 samples/client/petstore/typescript-angular-v15-provided-in-root/package.json create mode 100644 samples/client/petstore/typescript-angular-v15-provided-in-root/pom.xml create mode 100644 samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/app/app.component.css create mode 100644 samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/app/app.component.html create mode 100644 samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/app/app.component.spec.ts create mode 100644 samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/app/app.component.ts create mode 100644 samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/app/app.module.ts create mode 100644 samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/environments/environment.prod.ts create mode 100644 samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/environments/environment.ts create mode 100644 samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/favicon.ico create mode 100644 samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/index.html create mode 100644 samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/karma.conf.js create mode 100644 samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/main.ts create mode 100644 samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/polyfills.ts create mode 100644 samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/styles.css create mode 100644 samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/test.ts create mode 100644 samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/test/api.spec.ts create mode 100644 samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/test/basePath.spec.ts create mode 100644 samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/test/configuration.spec.ts create mode 100644 samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/test/fakeBackend.ts create mode 100644 samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/test/no-configuration.spec.ts create mode 100644 samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/tsconfig.app.json create mode 100644 samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/tsconfig.spec.json create mode 100644 samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/tslint.json create mode 100644 samples/client/petstore/typescript-angular-v15-provided-in-root/tsconfig.json create mode 100644 samples/client/petstore/typescript-angular-v15-provided-in-root/tslint.json diff --git a/bin/configs/typescript-angular-v15-provided-in-root.yaml b/bin/configs/typescript-angular-v15-provided-in-root.yaml new file mode 100644 index 0000000000..b8b86c7f66 --- /dev/null +++ b/bin/configs/typescript-angular-v15-provided-in-root.yaml @@ -0,0 +1,7 @@ +generatorName: typescript-angular +outputDir: samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/typescript-angular +additionalProperties: + ngVersion: 15.0.3 + supportsES6: true diff --git a/docs/generators/typescript-angular.md b/docs/generators/typescript-angular.md index 7fde34c39a..be23681e75 100644 --- a/docs/generators/typescript-angular.md +++ b/docs/generators/typescript-angular.md @@ -11,7 +11,7 @@ title: Documentation for the typescript-angular Generator | generator type | CLIENT | | | generator language | Typescript | | | generator default templating engine | mustache | | -| helpTxt | Generates a TypeScript Angular (9.x - 14.x) client library. | | +| helpTxt | Generates a TypeScript Angular (9.x - 15.x) client library. | | ## CONFIG OPTIONS These options may be applied as additional-properties (cli) or configOptions (plugins). Refer to [configuration docs](https://openapi-generator.tech/docs/configuration) for more details. @@ -31,7 +31,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |modelFileSuffix|The suffix of the file of the generated model (model<suffix>.ts).| |null| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name. Only change it if you provide your own run-time code for (de-)serialization of models| |original| |modelSuffix|The suffix of the generated model.| |null| -|ngVersion|The version of Angular. (At least 9.0.0)| |14.0.5| +|ngVersion|The version of Angular. (At least 9.0.0)| |15.0.3| |npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| |npmRepository|Use this property to set an url your private npmRepo in the package.json| |null| |npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0| diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularClientCodegen.java index 612b9502ad..d9515dfec4 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularClientCodegen.java @@ -71,7 +71,7 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode public static final String STRING_ENUMS_DESC = "Generate string enums instead of objects for enum values."; public static final String QUERY_PARAM_OBJECT_FORMAT = "queryParamObjectFormat"; - protected String ngVersion = "14.0.5"; + protected String ngVersion = "15.0.3"; protected String npmRepository = null; private boolean useSingleRequestParameter = false; protected String serviceSuffix = "Service"; @@ -150,7 +150,7 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode @Override public String getHelp() { - return "Generates a TypeScript Angular (9.x - 14.x) client library."; + return "Generates a TypeScript Angular (9.x - 15.x) client library."; } @Override @@ -280,7 +280,9 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode } // Set the typescript version compatible to the Angular version - if (ngVersion.atLeast("14.0.0")) { + if (ngVersion.atLeast("15.0.0")) { + additionalProperties.put("tsVersion", ">=4.8.2 <4.10.0"); + } else if (ngVersion.atLeast("14.0.0")) { additionalProperties.put("tsVersion", ">=4.6.0 <=4.8.0"); } else if (ngVersion.atLeast("13.0.0")) { additionalProperties.put("tsVersion", ">=4.4.2 <4.5.0"); @@ -297,7 +299,9 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode } // Set the rxJS version compatible to the Angular version - if (ngVersion.atLeast("14.0.0")) { + if (ngVersion.atLeast("15.0.0")) { + additionalProperties.put("rxjsVersion", "7.5.5"); + } else if (ngVersion.atLeast("14.0.0")) { additionalProperties.put("rxjsVersion", "7.5.5"); } else if (ngVersion.atLeast("13.0.0")) { additionalProperties.put("rxjsVersion", "7.4.0"); @@ -310,7 +314,11 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode supportingFiles.add(new SupportingFile("ng-package.mustache", getIndexDirectory(), "ng-package.json")); // Specific ng-packagr configuration - if (ngVersion.atLeast("14.0.0")) { + if (ngVersion.atLeast("15.0.0")) { + additionalProperties.put("ngPackagrVersion", "15.0.2"); + // tsTickle is not required and there is no available version compatible with + // versions of TypeScript compatible with Angular 15. + } else if (ngVersion.atLeast("14.0.0")) { additionalProperties.put("ngPackagrVersion", "14.0.2"); additionalProperties.put("tsickleVersion", "0.46.3"); } else if (ngVersion.atLeast("13.0.0")) { @@ -331,7 +339,9 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode } // set zone.js version - if (ngVersion.atLeast("14.0.0")) { + if (ngVersion.atLeast("15.0.0")) { + additionalProperties.put("zonejsVersion", "0.11.5"); + } else if (ngVersion.atLeast("14.0.0")) { additionalProperties.put("zonejsVersion", "0.11.5"); } else if (ngVersion.atLeast("12.0.0")) { additionalProperties.put("zonejsVersion", "0.11.4"); diff --git a/modules/openapi-generator/src/main/resources/typescript-angular/package.mustache b/modules/openapi-generator/src/main/resources/typescript-angular/package.mustache index 22f7cd144d..af4bf5fdfb 100644 --- a/modules/openapi-generator/src/main/resources/typescript-angular/package.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-angular/package.mustache @@ -27,8 +27,8 @@ "@angular/platform-browser": "^{{ngVersion}}", "ng-packagr": "^{{ngPackagrVersion}}", "reflect-metadata": "^0.1.3", - "rxjs": "^{{rxjsVersion}}", - "tsickle": "^{{tsickleVersion}}", + "rxjs": "^{{rxjsVersion}}",{{#tsickleVersion}} + "tsickle": "^{{tsickleVersion}}",{{/tsickleVersion}} "typescript": "{{{tsVersion}}}", "zone.js": "^{{zonejsVersion}}" }{{#npmRepository}}, diff --git a/modules/openapi-generator/src/test/resources/integrationtests/typescript/additional-properties-expected/package.json b/modules/openapi-generator/src/test/resources/integrationtests/typescript/additional-properties-expected/package.json index 31e050fb00..2fdd17ea1d 100644 --- a/modules/openapi-generator/src/test/resources/integrationtests/typescript/additional-properties-expected/package.json +++ b/modules/openapi-generator/src/test/resources/integrationtests/typescript/additional-properties-expected/package.json @@ -16,19 +16,18 @@ "build": "ng-packagr -p ng-package.json" }, "peerDependencies": { - "@angular/core": "^14.0.5", + "@angular/core": "^15.0.3", "rxjs": "^7.5.5" }, "devDependencies": { - "@angular/common": "^14.0.5", - "@angular/compiler": "^14.0.5", - "@angular/compiler-cli": "^14.0.5", - "@angular/core": "^14.0.5", - "@angular/platform-browser": "^14.0.5", - "ng-packagr": "^14.0.2", + "@angular/common": "^15.0.3", + "@angular/compiler": "^15.0.3", + "@angular/compiler-cli": "^15.0.3", + "@angular/core": "^15.0.3", + "@angular/platform-browser": "^15.0.3", + "ng-packagr": "^15.0.2", "reflect-metadata": "^0.1.3", "rxjs": "^7.5.5", - "tsickle": "^0.46.3", - "typescript": ">=4.6.0 <=4.8.0", + "typescript": ">=4.8.2 <4.10.0", "zone.js": "^0.11.5" }} diff --git a/modules/openapi-generator/src/test/resources/integrationtests/typescript/array-and-object-expected/package.json b/modules/openapi-generator/src/test/resources/integrationtests/typescript/array-and-object-expected/package.json index f813e8e5f7..13510df4c5 100644 --- a/modules/openapi-generator/src/test/resources/integrationtests/typescript/array-and-object-expected/package.json +++ b/modules/openapi-generator/src/test/resources/integrationtests/typescript/array-and-object-expected/package.json @@ -16,19 +16,18 @@ "build": "ng-packagr -p ng-package.json" }, "peerDependencies": { - "@angular/core": "^14.0.5", + "@angular/core": "^15.0.3", "rxjs": "^7.5.5" }, "devDependencies": { - "@angular/common": "^14.0.5", - "@angular/compiler": "^14.0.5", - "@angular/compiler-cli": "^14.0.5", - "@angular/core": "^14.0.5", - "@angular/platform-browser": "^14.0.5", - "ng-packagr": "^14.0.2", + "@angular/common": "^15.0.3", + "@angular/compiler": "^15.0.3", + "@angular/compiler-cli": "^15.0.3", + "@angular/core": "^15.0.3", + "@angular/platform-browser": "^15.0.3", + "ng-packagr": "^15.0.2", "reflect-metadata": "^0.1.3", "rxjs": "^7.5.5", - "tsickle": "^0.46.3", - "typescript": ">=4.6.0 <=4.8.0", + "typescript": ">=4.8.2 <4.10.0", "zone.js": "^0.11.5" }} diff --git a/modules/openapi-generator/src/test/resources/integrationtests/typescript/custom-path-params-expected/package.json b/modules/openapi-generator/src/test/resources/integrationtests/typescript/custom-path-params-expected/package.json index c68cbf4ebe..ae7c2ccaa6 100644 --- a/modules/openapi-generator/src/test/resources/integrationtests/typescript/custom-path-params-expected/package.json +++ b/modules/openapi-generator/src/test/resources/integrationtests/typescript/custom-path-params-expected/package.json @@ -16,19 +16,18 @@ "build": "ng-packagr -p ng-package.json" }, "peerDependencies": { - "@angular/core": "^14.0.5", + "@angular/core": "^15.0.3", "rxjs": "^7.5.5" }, "devDependencies": { - "@angular/common": "^14.0.5", - "@angular/compiler": "^14.0.5", - "@angular/compiler-cli": "^14.0.5", - "@angular/core": "^14.0.5", - "@angular/platform-browser": "^14.0.5", - "ng-packagr": "^14.0.2", + "@angular/common": "^15.0.3", + "@angular/compiler": "^15.0.3", + "@angular/compiler-cli": "^15.0.3", + "@angular/core": "^15.0.3", + "@angular/platform-browser": "^15.0.3", + "ng-packagr": "^15.0.2", "reflect-metadata": "^0.1.3", "rxjs": "^7.5.5", - "tsickle": "^0.46.3", - "typescript": ">=4.6.0 <=4.8.0", + "typescript": ">=4.8.2 <4.10.0", "zone.js": "^0.11.5" }} diff --git a/modules/openapi-generator/src/test/resources/integrationtests/typescript/petstore-expected/package.json b/modules/openapi-generator/src/test/resources/integrationtests/typescript/petstore-expected/package.json index 685877325a..3aace795f2 100644 --- a/modules/openapi-generator/src/test/resources/integrationtests/typescript/petstore-expected/package.json +++ b/modules/openapi-generator/src/test/resources/integrationtests/typescript/petstore-expected/package.json @@ -16,19 +16,18 @@ "build": "ng-packagr -p ng-package.json" }, "peerDependencies": { - "@angular/core": "^14.0.5", + "@angular/core": "^15.0.3", "rxjs": "^7.5.5" }, "devDependencies": { - "@angular/common": "^14.0.5", - "@angular/compiler": "^14.0.5", - "@angular/compiler-cli": "^14.0.5", - "@angular/core": "^14.0.5", - "@angular/platform-browser": "^14.0.5", - "ng-packagr": "^14.0.2", + "@angular/common": "^15.0.3", + "@angular/compiler": "^15.0.3", + "@angular/compiler-cli": "^15.0.3", + "@angular/core": "^15.0.3", + "@angular/platform-browser": "^15.0.3", + "ng-packagr": "^15.0.2", "reflect-metadata": "^0.1.3", "rxjs": "^7.5.5", - "tsickle": "^0.46.3", - "typescript": ">=4.6.0 <=4.8.0", + "typescript": ">=4.8.2 <4.10.0", "zone.js": "^0.11.5" }} diff --git a/pom.xml b/pom.xml index fd1e378eff..1f4ec31cdd 100644 --- a/pom.xml +++ b/pom.xml @@ -1234,6 +1234,7 @@ samples/client/petstore/typescript-angular-v12-provided-in-root samples/client/petstore/typescript-angular-v13-provided-in-root samples/client/petstore/typescript-angular-v14-provided-in-root + samples/client/petstore/typescript-angular-v15-provided-in-root samples/openapi3/client/petstore/typescript/builds/default samples/openapi3/client/petstore/typescript/tests/default samples/openapi3/client/petstore/typescript/builds/jquery diff --git a/samples/client/petstore/typescript-angular-v15-provided-in-root/.gitignore b/samples/client/petstore/typescript-angular-v15-provided-in-root/.gitignore new file mode 100644 index 0000000000..9f524c3936 --- /dev/null +++ b/samples/client/petstore/typescript-angular-v15-provided-in-root/.gitignore @@ -0,0 +1,42 @@ +# See http://help.github.com/ignore-files/ for more about ignoring files. + +# compiled output +/dist +/tmp +/out-tsc +.angular + +# dependencies +/node_modules + +# IDEs and editors +/.idea +.project +.classpath +.c9/ +*.launch +.settings/ +*.sublime-workspace + +# IDE - VSCode +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json + +# misc +/.sass-cache +/connect.lock +/coverage +/libpeerconnection.log +npm-debug.log +yarn-error.log +testem.log +/typings + +# System Files +.DS_Store +Thumbs.db + +.angular diff --git a/samples/client/petstore/typescript-angular-v15-provided-in-root/angular.json b/samples/client/petstore/typescript-angular-v15-provided-in-root/angular.json new file mode 100644 index 0000000000..ff7c26f5c2 --- /dev/null +++ b/samples/client/petstore/typescript-angular-v15-provided-in-root/angular.json @@ -0,0 +1,114 @@ +{ + "$schema": "./node_modules/@angular/cli/lib/config/schema.json", + "version": 1, + "newProjectRoot": "tests", + "projects": { + "test-default": { + "root": "tests/default", + "sourceRoot": "tests/default/src", + "projectType": "application", + "prefix": "app", + "schematics": {}, + "architect": { + "build": { + "builder": "@angular-devkit/build-angular:browser", + "options": { + "aot": true, + "outputPath": "tests/default/dist", + "index": "tests/default/src/index.html", + "main": "tests/default/src/main.ts", + "polyfills": "tests/default/src/polyfills.ts", + "tsConfig": "tests/default/src/tsconfig.app.json", + "assets": [ + "tests/default/src/favicon.ico", + "tests/default/src/assets" + ], + "styles": [ + "tests/default/src/styles.css" + ], + "scripts": [] + }, + "configurations": { + "production": { + "budgets": [ + { + "type": "anyComponentStyle", + "maximumWarning": "6kb" + } + ], + "fileReplacements": [ + { + "replace": "tests/default/src/environments/environment.ts", + "with": "tests/default/src/environments/environment.prod.ts" + } + ], + "optimization": true, + "outputHashing": "all", + "sourceMap": false, + "namedChunks": false, + "aot": true, + "extractLicenses": true, + "vendorChunk": false, + "buildOptimizer": true + }, + "development": {} + }, + "defaultConfiguration": "production" + }, + "serve": { + "builder": "@angular-devkit/build-angular:dev-server", + "options": { + }, + "configurations": { + "production": { + "browserTarget": "test-default:build:production" + }, + "development": { + "browserTarget": "test-default:build:development" + } + }, + "defaultConfiguration": "development" + }, + "extract-i18n": { + "builder": "@angular-devkit/build-angular:extract-i18n", + "options": { + "browserTarget": "test-default:build" + } + }, + "test": { + "builder": "@angular-devkit/build-angular:karma", + "options": { + "main": "tests/default/src/test.ts", + "polyfills": "tests/default/src/polyfills.ts", + "tsConfig": "tests/default/src/tsconfig.spec.json", + "karmaConfig": "tests/default/src/karma.conf.js", + "styles": [ + "tests/default/src/styles.css" + ], + "scripts": [], + "assets": [ + "tests/default/src/favicon.ico", + "tests/default/src/assets" + ] + } + }, + "lint": { + "builder": "@angular-devkit/build-angular:tslint", + "options": { + "tsConfig": [ + "tests/default/src/tsconfig.app.json", + "tests/default/src/tsconfig.spec.json" + ], + "exclude": [ + "**/node_modules/**" + ] + } + } + } + } + }, + "defaultProject": "test-default", + "cli": { + "analytics": false + } +} diff --git a/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/.gitignore b/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/.gitignore new file mode 100644 index 0000000000..149b576547 --- /dev/null +++ b/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/.gitignore @@ -0,0 +1,4 @@ +wwwroot/*.js +node_modules +typings +dist diff --git a/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/.openapi-generator-ignore b/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/.openapi-generator-ignore new file mode 100644 index 0000000000..7484ee590a --- /dev/null +++ b/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/.openapi-generator/FILES b/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/.openapi-generator/FILES new file mode 100644 index 0000000000..6e213a61aa --- /dev/null +++ b/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/.openapi-generator/FILES @@ -0,0 +1,20 @@ +.gitignore +README.md +api.module.ts +api/api.ts +api/pet.service.ts +api/store.service.ts +api/user.service.ts +configuration.ts +encoder.ts +git_push.sh +index.ts +model/apiResponse.ts +model/category.ts +model/models.ts +model/order.ts +model/pet.ts +model/tag.ts +model/user.ts +param.ts +variables.ts diff --git a/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/.openapi-generator/VERSION new file mode 100644 index 0000000000..d6b4ec4aa7 --- /dev/null +++ b/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/.openapi-generator/VERSION @@ -0,0 +1 @@ +6.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/README.md b/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/README.md new file mode 100644 index 0000000000..de16f95a8b --- /dev/null +++ b/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/README.md @@ -0,0 +1,226 @@ +## @ + +### Building + +To install the required dependencies and to build the typescript sources run: +``` +npm install +npm run build +``` + +### publishing + +First build the package then run ```npm publish dist``` (don't forget to specify the `dist` folder!) + +### consuming + +Navigate to the folder of your consuming project and run one of next commands. + +_published:_ + +``` +npm install @ --save +``` + +_without publishing (not recommended):_ + +``` +npm install PATH_TO_GENERATED_PACKAGE/dist.tgz --save +``` + +_It's important to take the tgz file, otherwise you'll get trouble with links on windows_ + +_using `npm link`:_ + +In PATH_TO_GENERATED_PACKAGE/dist: +``` +npm link +``` + +In your project: +``` +npm link +``` + +__Note for Windows users:__ The Angular CLI has troubles to use linked npm packages. +Please refer to this issue https://github.com/angular/angular-cli/issues/8284 for a solution / workaround. +Published packages are not effected by this issue. + + +#### General usage + +In your Angular project: + + +``` +// without configuring providers +import { ApiModule } from ''; +import { HttpClientModule } from '@angular/common/http'; + +@NgModule({ + imports: [ + ApiModule, + // make sure to import the HttpClientModule in the AppModule only, + // see https://github.com/angular/angular/issues/20575 + HttpClientModule + ], + declarations: [ AppComponent ], + providers: [], + bootstrap: [ AppComponent ] +}) +export class AppModule {} +``` + +``` +// configuring providers +import { ApiModule, Configuration, ConfigurationParameters } from ''; + +export function apiConfigFactory (): Configuration { + const params: ConfigurationParameters = { + // set configuration parameters here. + } + return new Configuration(params); +} + +@NgModule({ + imports: [ ApiModule.forRoot(apiConfigFactory) ], + declarations: [ AppComponent ], + providers: [], + bootstrap: [ AppComponent ] +}) +export class AppModule {} +``` + +``` +// configuring providers with an authentication service that manages your access tokens +import { ApiModule, Configuration } from ''; + +@NgModule({ + imports: [ ApiModule ], + declarations: [ AppComponent ], + providers: [ + { + provide: Configuration, + useFactory: (authService: AuthService) => new Configuration( + { + basePath: environment.apiUrl, + accessToken: authService.getAccessToken.bind(authService) + } + ), + deps: [AuthService], + multi: false + } + ], + bootstrap: [ AppComponent ] +}) +export class AppModule {} +``` + +``` +import { DefaultApi } from ''; + +export class AppComponent { + constructor(private apiGateway: DefaultApi) { } +} +``` + +Note: The ApiModule is restricted to being instantiated once app wide. +This is to ensure that all services are treated as singletons. + +#### Using multiple OpenAPI files / APIs / ApiModules +In order to use multiple `ApiModules` generated from different OpenAPI files, +you can create an alias name when importing the modules +in order to avoid naming conflicts: +``` +import { ApiModule } from 'my-api-path'; +import { ApiModule as OtherApiModule } from 'my-other-api-path'; +import { HttpClientModule } from '@angular/common/http'; + +@NgModule({ + imports: [ + ApiModule, + OtherApiModule, + // make sure to import the HttpClientModule in the AppModule only, + // see https://github.com/angular/angular/issues/20575 + HttpClientModule + ] +}) +export class AppModule { + +} +``` + + +### Set service base path +If different than the generated base path, during app bootstrap, you can provide the base path to your service. + +``` +import { BASE_PATH } from ''; + +bootstrap(AppComponent, [ + { provide: BASE_PATH, useValue: 'https://your-web-service.com' }, +]); +``` +or + +``` +import { BASE_PATH } from ''; + +@NgModule({ + imports: [], + declarations: [ AppComponent ], + providers: [ provide: BASE_PATH, useValue: 'https://your-web-service.com' ], + bootstrap: [ AppComponent ] +}) +export class AppModule {} +``` + + +#### Using @angular/cli +First extend your `src/environments/*.ts` files by adding the corresponding base path: + +``` +export const environment = { + production: false, + API_BASE_PATH: 'http://127.0.0.1:8080' +}; +``` + +In the src/app/app.module.ts: +``` +import { BASE_PATH } from ''; +import { environment } from '../environments/environment'; + +@NgModule({ + declarations: [ + AppComponent + ], + imports: [ ], + providers: [{ provide: BASE_PATH, useValue: environment.API_BASE_PATH }], + bootstrap: [ AppComponent ] +}) +export class AppModule { } +``` + +### Customizing path parameter encoding + +Without further customization, only [path-parameters][parameter-locations-url] of [style][style-values-url] 'simple' +and Dates for format 'date-time' are encoded correctly. + +Other styles (e.g. "matrix") are not that easy to encode +and thus are best delegated to other libraries (e.g.: [@honoluluhenk/http-param-expander]). + +To implement your own parameter encoding (or call another library), +pass an arrow-function or method-reference to the `encodeParam` property of the Configuration-object +(see [General Usage](#general-usage) above). + +Example value for use in your Configuration-Provider: +```typescript +new Configuration({ + encodeParam: (param: Param) => myFancyParamEncoder(param), +}) +``` + +[parameter-locations-url]: https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameter-locations +[style-values-url]: https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#style-values +[@honoluluhenk/http-param-expander]: https://www.npmjs.com/package/@honoluluhenk/http-param-expander diff --git a/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/api.module.ts b/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/api.module.ts new file mode 100644 index 0000000000..2afb8f64e9 --- /dev/null +++ b/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/api.module.ts @@ -0,0 +1,33 @@ +import { NgModule, ModuleWithProviders, SkipSelf, Optional } from '@angular/core'; +import { Configuration } from './configuration'; +import { HttpClient } from '@angular/common/http'; + +import { PetService } from './api/pet.service'; +import { StoreService } from './api/store.service'; +import { UserService } from './api/user.service'; + +@NgModule({ + imports: [], + declarations: [], + exports: [], + providers: [] +}) +export class ApiModule { + public static forRoot(configurationFactory: () => Configuration): ModuleWithProviders { + return { + ngModule: ApiModule, + providers: [ { provide: Configuration, useFactory: configurationFactory } ] + }; + } + + constructor( @Optional() @SkipSelf() parentModule: ApiModule, + @Optional() http: HttpClient) { + if (parentModule) { + throw new Error('ApiModule is already loaded. Import in your base AppModule only.'); + } + if (!http) { + throw new Error('You need to import the HttpClientModule in your AppModule! \n' + + 'See also https://github.com/angular/angular/issues/20575'); + } + } +} diff --git a/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/api/api.ts b/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/api/api.ts new file mode 100644 index 0000000000..8e44b64083 --- /dev/null +++ b/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/api/api.ts @@ -0,0 +1,7 @@ +export * from './pet.service'; +import { PetService } from './pet.service'; +export * from './store.service'; +import { StoreService } from './store.service'; +export * from './user.service'; +import { UserService } from './user.service'; +export const APIS = [PetService, StoreService, UserService]; diff --git a/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/api/pet.service.ts b/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/api/pet.service.ts new file mode 100644 index 0000000000..c27a2e8f8e --- /dev/null +++ b/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/api/pet.service.ts @@ -0,0 +1,734 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/* tslint:disable:no-unused-variable member-ordering */ + +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; + +// @ts-ignore +import { ApiResponse } from '../model/apiResponse'; +// @ts-ignore +import { Pet } from '../model/pet'; + +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; + + + +@Injectable({ + providedIn: 'root' +}) +export class PetService { + + protected basePath = 'http://petstore.swagger.io/v2'; + public defaultHeaders = new HttpHeaders(); + public configuration = new Configuration(); + public encoder: HttpParameterCodec; + + constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string|string[], @Optional() configuration: Configuration) { + if (configuration) { + this.configuration = configuration; + } + if (typeof this.configuration.basePath !== 'string') { + if (Array.isArray(basePath) && basePath.length > 0) { + basePath = basePath[0]; + } + + if (typeof basePath !== 'string') { + basePath = this.basePath; + } + this.configuration.basePath = basePath; + } + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); + } + + /** + * @param consumes string[] mime-types + * @return true: consumes contains 'multipart/form-data', false: otherwise + */ + private canConsumeForm(consumes: string[]): boolean { + const form = 'multipart/form-data'; + for (const consume of consumes) { + if (form === consume) { + return true; + } + } + return false; + } + + // @ts-ignore + private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { + if (typeof value === "object" && value instanceof Date === false) { + httpParams = this.addToHttpParamsRecursive(httpParams, value); + } else { + httpParams = this.addToHttpParamsRecursive(httpParams, value, key); + } + return httpParams; + } + + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + + if (typeof value === "object") { + if (Array.isArray(value)) { + (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); + } else if (value instanceof Date) { + if (key != null) { + httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10)); + } else { + throw Error("key may not be null if value is Date"); + } + } else { + Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive( + httpParams, value[k], key != null ? `${key}.${k}` : k)); + } + } else if (key != null) { + httpParams = httpParams.append(key, value); + } else { + throw Error("key may not be null if value is not object or array"); + } + return httpParams; + } + + /** + * Add a new pet to the store + * + * @param pet Pet object that needs to be added to the store + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addPet(pet: Pet, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable; + public addPet(pet: Pet, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; + public addPet(pet: Pet, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; + public addPet(pet: Pet, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable { + if (pet === null || pet === undefined) { + throw new Error('Required parameter pet was null or undefined when calling addPet.'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarCredential: string | undefined; + // authentication (petstore_auth) required + localVarCredential = this.configuration.lookupCredential('petstore_auth'); + if (localVarCredential) { + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); + } + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/xml', + 'application/json' + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json', + 'application/xml' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/pet`; + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: pet, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Deletes a pet + * + * @param petId Pet id to delete + * @param apiKey + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deletePet(petId: number, apiKey?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; + public deletePet(petId: number, apiKey?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public deletePet(petId: number, apiKey?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public deletePet(petId: number, apiKey?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { + if (petId === null || petId === undefined) { + throw new Error('Required parameter petId was null or undefined when calling deletePet.'); + } + + let localVarHeaders = this.defaultHeaders; + if (apiKey !== undefined && apiKey !== null) { + localVarHeaders = localVarHeaders.set('api_key', String(apiKey)); + } + + let localVarCredential: string | undefined; + // authentication (petstore_auth) required + localVarCredential = this.configuration.lookupCredential('petstore_auth'); + if (localVarCredential) { + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); + } + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`; + return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Finds Pets by status + * Multiple status values can be provided with comma separated strings + * @param status Status values that need to be considered for filter + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; + public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>>; + public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>>; + public findPetsByStatus(status: Array<'available' | 'pending' | 'sold'>, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable { + if (status === null || status === undefined) { + throw new Error('Required parameter status was null or undefined when calling findPetsByStatus.'); + } + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + if (status) { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + [...status].join(COLLECTION_FORMATS['csv']), 'status'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarCredential: string | undefined; + // authentication (petstore_auth) required + localVarCredential = this.configuration.lookupCredential('petstore_auth'); + if (localVarCredential) { + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); + } + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/xml', + 'application/json' + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/pet/findByStatus`; + return this.httpClient.request>('get', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Finds Pets by tags + * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + * @param tags Tags to filter by + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + * @deprecated + */ + public findPetsByTags(tags: Array, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; + public findPetsByTags(tags: Array, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>>; + public findPetsByTags(tags: Array, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>>; + public findPetsByTags(tags: Array, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable { + if (tags === null || tags === undefined) { + throw new Error('Required parameter tags was null or undefined when calling findPetsByTags.'); + } + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + if (tags) { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + [...tags].join(COLLECTION_FORMATS['csv']), 'tags'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarCredential: string | undefined; + // authentication (petstore_auth) required + localVarCredential = this.configuration.lookupCredential('petstore_auth'); + if (localVarCredential) { + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); + } + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/xml', + 'application/json' + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/pet/findByTags`; + return this.httpClient.request>('get', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Find pet by ID + * Returns a single pet + * @param petId ID of pet to return + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getPetById(petId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable; + public getPetById(petId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; + public getPetById(petId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; + public getPetById(petId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable { + if (petId === null || petId === undefined) { + throw new Error('Required parameter petId was null or undefined when calling getPetById.'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarCredential: string | undefined; + // authentication (api_key) required + localVarCredential = this.configuration.lookupCredential('api_key'); + if (localVarCredential) { + localVarHeaders = localVarHeaders.set('api_key', localVarCredential); + } + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/xml', + 'application/json' + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`; + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Update an existing pet + * + * @param pet Pet object that needs to be added to the store + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public updatePet(pet: Pet, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable; + public updatePet(pet: Pet, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; + public updatePet(pet: Pet, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; + public updatePet(pet: Pet, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable { + if (pet === null || pet === undefined) { + throw new Error('Required parameter pet was null or undefined when calling updatePet.'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarCredential: string | undefined; + // authentication (petstore_auth) required + localVarCredential = this.configuration.lookupCredential('petstore_auth'); + if (localVarCredential) { + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); + } + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/xml', + 'application/json' + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json', + 'application/xml' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/pet`; + return this.httpClient.request('put', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: pet, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Updates a pet in the store with form data + * + * @param petId ID of pet that needs to be updated + * @param name Updated name of the pet + * @param status Updated status of the pet + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public updatePetWithForm(petId: number, name?: string, status?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; + public updatePetWithForm(petId: number, name?: string, status?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public updatePetWithForm(petId: number, name?: string, status?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public updatePetWithForm(petId: number, name?: string, status?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { + if (petId === null || petId === undefined) { + throw new Error('Required parameter petId was null or undefined when calling updatePetWithForm.'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarCredential: string | undefined; + // authentication (petstore_auth) required + localVarCredential = this.configuration.lookupCredential('petstore_auth'); + if (localVarCredential) { + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); + } + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/x-www-form-urlencoded' + ]; + + const canConsumeForm = this.canConsumeForm(consumes); + + let localVarFormParams: { append(param: string, value: any): any; }; + let localVarUseForm = false; + let localVarConvertFormParamsToString = false; + if (localVarUseForm) { + localVarFormParams = new FormData(); + } else { + localVarFormParams = new HttpParams({encoder: this.encoder}); + } + + if (name !== undefined) { + localVarFormParams = localVarFormParams.append('name', name) as any || localVarFormParams; + } + if (status !== undefined) { + localVarFormParams = localVarFormParams.append('status', status) as any || localVarFormParams; + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`; + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * uploads an image + * + * @param petId ID of pet to update + * @param additionalMetadata Additional data to pass to server + * @param file file to upload + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public uploadFile(petId: number, additionalMetadata?: string, file?: Blob, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable; + public uploadFile(petId: number, additionalMetadata?: string, file?: Blob, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public uploadFile(petId: number, additionalMetadata?: string, file?: Blob, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public uploadFile(petId: number, additionalMetadata?: string, file?: Blob, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable { + if (petId === null || petId === undefined) { + throw new Error('Required parameter petId was null or undefined when calling uploadFile.'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarCredential: string | undefined; + // authentication (petstore_auth) required + localVarCredential = this.configuration.lookupCredential('petstore_auth'); + if (localVarCredential) { + localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); + } + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + // to determine the Content-Type header + const consumes: string[] = [ + 'multipart/form-data' + ]; + + const canConsumeForm = this.canConsumeForm(consumes); + + let localVarFormParams: { append(param: string, value: any): any; }; + let localVarUseForm = false; + let localVarConvertFormParamsToString = false; + // use FormData to transmit files using content-type "multipart/form-data" + // see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data + localVarUseForm = canConsumeForm; + if (localVarUseForm) { + localVarFormParams = new FormData(); + } else { + localVarFormParams = new HttpParams({encoder: this.encoder}); + } + + if (additionalMetadata !== undefined) { + localVarFormParams = localVarFormParams.append('additionalMetadata', additionalMetadata) as any || localVarFormParams; + } + if (file !== undefined) { + localVarFormParams = localVarFormParams.append('file', file) as any || localVarFormParams; + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/pet/${this.configuration.encodeParam({name: "petId", value: petId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}/uploadImage`; + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + reportProgress: reportProgress + } + ); + } + +} diff --git a/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/api/store.service.ts b/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/api/store.service.ts new file mode 100644 index 0000000000..47b3c28465 --- /dev/null +++ b/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/api/store.service.ts @@ -0,0 +1,344 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/* tslint:disable:no-unused-variable member-ordering */ + +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; + +// @ts-ignore +import { Order } from '../model/order'; + +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; + + + +@Injectable({ + providedIn: 'root' +}) +export class StoreService { + + protected basePath = 'http://petstore.swagger.io/v2'; + public defaultHeaders = new HttpHeaders(); + public configuration = new Configuration(); + public encoder: HttpParameterCodec; + + constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string|string[], @Optional() configuration: Configuration) { + if (configuration) { + this.configuration = configuration; + } + if (typeof this.configuration.basePath !== 'string') { + if (Array.isArray(basePath) && basePath.length > 0) { + basePath = basePath[0]; + } + + if (typeof basePath !== 'string') { + basePath = this.basePath; + } + this.configuration.basePath = basePath; + } + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); + } + + + // @ts-ignore + private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { + if (typeof value === "object" && value instanceof Date === false) { + httpParams = this.addToHttpParamsRecursive(httpParams, value); + } else { + httpParams = this.addToHttpParamsRecursive(httpParams, value, key); + } + return httpParams; + } + + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + + if (typeof value === "object") { + if (Array.isArray(value)) { + (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); + } else if (value instanceof Date) { + if (key != null) { + httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10)); + } else { + throw Error("key may not be null if value is Date"); + } + } else { + Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive( + httpParams, value[k], key != null ? `${key}.${k}` : k)); + } + } else if (key != null) { + httpParams = httpParams.append(key, value); + } else { + throw Error("key may not be null if value is not object or array"); + } + return httpParams; + } + + /** + * Delete purchase order by ID + * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + * @param orderId ID of the order that needs to be deleted + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteOrder(orderId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; + public deleteOrder(orderId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public deleteOrder(orderId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public deleteOrder(orderId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { + if (orderId === null || orderId === undefined) { + throw new Error('Required parameter orderId was null or undefined when calling deleteOrder.'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Returns pet inventories by status + * Returns a map of status codes to quantities + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getInventory(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<{ [key: string]: number; }>; + public getInventory(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public getInventory(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public getInventory(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable { + + let localVarHeaders = this.defaultHeaders; + + let localVarCredential: string | undefined; + // authentication (api_key) required + localVarCredential = this.configuration.lookupCredential('api_key'); + if (localVarCredential) { + localVarHeaders = localVarHeaders.set('api_key', localVarCredential); + } + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/store/inventory`; + return this.httpClient.request<{ [key: string]: number; }>('get', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Find purchase order by ID + * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions + * @param orderId ID of pet that needs to be fetched + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getOrderById(orderId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable; + public getOrderById(orderId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; + public getOrderById(orderId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; + public getOrderById(orderId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable { + if (orderId === null || orderId === undefined) { + throw new Error('Required parameter orderId was null or undefined when calling getOrderById.'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/xml', + 'application/json' + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/store/order/${this.configuration.encodeParam({name: "orderId", value: orderId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: "int64"})}`; + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Place an order for a pet + * + * @param order order placed for purchasing the pet + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public placeOrder(order: Order, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable; + public placeOrder(order: Order, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; + public placeOrder(order: Order, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; + public placeOrder(order: Order, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable { + if (order === null || order === undefined) { + throw new Error('Required parameter order was null or undefined when calling placeOrder.'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/xml', + 'application/json' + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/store/order`; + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: order, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + reportProgress: reportProgress + } + ); + } + +} diff --git a/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/api/user.service.ts b/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/api/user.service.ts new file mode 100644 index 0000000000..62cbf7b6e8 --- /dev/null +++ b/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/api/user.service.ts @@ -0,0 +1,659 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/* tslint:disable:no-unused-variable member-ordering */ + +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; + +// @ts-ignore +import { User } from '../model/user'; + +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; + + + +@Injectable({ + providedIn: 'root' +}) +export class UserService { + + protected basePath = 'http://petstore.swagger.io/v2'; + public defaultHeaders = new HttpHeaders(); + public configuration = new Configuration(); + public encoder: HttpParameterCodec; + + constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string|string[], @Optional() configuration: Configuration) { + if (configuration) { + this.configuration = configuration; + } + if (typeof this.configuration.basePath !== 'string') { + if (Array.isArray(basePath) && basePath.length > 0) { + basePath = basePath[0]; + } + + if (typeof basePath !== 'string') { + basePath = this.basePath; + } + this.configuration.basePath = basePath; + } + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); + } + + + // @ts-ignore + private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { + if (typeof value === "object" && value instanceof Date === false) { + httpParams = this.addToHttpParamsRecursive(httpParams, value); + } else { + httpParams = this.addToHttpParamsRecursive(httpParams, value, key); + } + return httpParams; + } + + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + + if (typeof value === "object") { + if (Array.isArray(value)) { + (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); + } else if (value instanceof Date) { + if (key != null) { + httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10)); + } else { + throw Error("key may not be null if value is Date"); + } + } else { + Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive( + httpParams, value[k], key != null ? `${key}.${k}` : k)); + } + } else if (key != null) { + httpParams = httpParams.append(key, value); + } else { + throw Error("key may not be null if value is not object or array"); + } + return httpParams; + } + + /** + * Create user + * This can only be done by the logged in user. + * @param user Created user object + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createUser(user: User, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; + public createUser(user: User, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public createUser(user: User, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public createUser(user: User, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling createUser.'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarCredential: string | undefined; + // authentication (api_key) required + localVarCredential = this.configuration.lookupCredential('api_key'); + if (localVarCredential) { + localVarHeaders = localVarHeaders.set('api_key', localVarCredential); + } + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/user`; + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: user, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Creates list of users with given input array + * + * @param user List of user object + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createUsersWithArrayInput(user: Array, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; + public createUsersWithArrayInput(user: Array, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public createUsersWithArrayInput(user: Array, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public createUsersWithArrayInput(user: Array, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling createUsersWithArrayInput.'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarCredential: string | undefined; + // authentication (api_key) required + localVarCredential = this.configuration.lookupCredential('api_key'); + if (localVarCredential) { + localVarHeaders = localVarHeaders.set('api_key', localVarCredential); + } + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/user/createWithArray`; + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: user, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Creates list of users with given input array + * + * @param user List of user object + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createUsersWithListInput(user: Array, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; + public createUsersWithListInput(user: Array, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public createUsersWithListInput(user: Array, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public createUsersWithListInput(user: Array, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling createUsersWithListInput.'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarCredential: string | undefined; + // authentication (api_key) required + localVarCredential = this.configuration.lookupCredential('api_key'); + if (localVarCredential) { + localVarHeaders = localVarHeaders.set('api_key', localVarCredential); + } + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/user/createWithList`; + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: user, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Delete user + * This can only be done by the logged in user. + * @param username The name that needs to be deleted + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteUser(username: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; + public deleteUser(username: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public deleteUser(username: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public deleteUser(username: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { + if (username === null || username === undefined) { + throw new Error('Required parameter username was null or undefined when calling deleteUser.'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarCredential: string | undefined; + // authentication (api_key) required + localVarCredential = this.configuration.lookupCredential('api_key'); + if (localVarCredential) { + localVarHeaders = localVarHeaders.set('api_key', localVarCredential); + } + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get user by user name + * + * @param username The name that needs to be fetched. Use user1 for testing. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getUserByName(username: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable; + public getUserByName(username: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; + public getUserByName(username: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; + public getUserByName(username: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable { + if (username === null || username === undefined) { + throw new Error('Required parameter username was null or undefined when calling getUserByName.'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/xml', + 'application/json' + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Logs user into the system + * + * @param username The user name for login + * @param password The password for login in clear text + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public loginUser(username: string, password: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable; + public loginUser(username: string, password: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; + public loginUser(username: string, password: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable>; + public loginUser(username: string, password: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/xml' | 'application/json', context?: HttpContext}): Observable { + if (username === null || username === undefined) { + throw new Error('Required parameter username was null or undefined when calling loginUser.'); + } + if (password === null || password === undefined) { + throw new Error('Required parameter password was null or undefined when calling loginUser.'); + } + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + if (username !== undefined && username !== null) { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + username, 'username'); + } + if (password !== undefined && password !== null) { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + password, 'password'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/xml', + 'application/json' + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/user/login`; + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Logs out current logged in user session + * + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public logoutUser(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; + public logoutUser(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public logoutUser(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public logoutUser(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { + + let localVarHeaders = this.defaultHeaders; + + let localVarCredential: string | undefined; + // authentication (api_key) required + localVarCredential = this.configuration.lookupCredential('api_key'); + if (localVarCredential) { + localVarHeaders = localVarHeaders.set('api_key', localVarCredential); + } + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/user/logout`; + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Updated user + * This can only be done by the logged in user. + * @param username name that need to be deleted + * @param user Updated user object + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public updateUser(username: string, user: User, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; + public updateUser(username: string, user: User, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public updateUser(username: string, user: User, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public updateUser(username: string, user: User, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { + if (username === null || username === undefined) { + throw new Error('Required parameter username was null or undefined when calling updateUser.'); + } + if (user === null || user === undefined) { + throw new Error('Required parameter user was null or undefined when calling updateUser.'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarCredential: string | undefined; + // authentication (api_key) required + localVarCredential = this.configuration.lookupCredential('api_key'); + if (localVarCredential) { + localVarHeaders = localVarHeaders.set('api_key', localVarCredential); + } + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/user/${this.configuration.encodeParam({name: "username", value: username, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + return this.httpClient.request('put', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: user, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + reportProgress: reportProgress + } + ); + } + +} diff --git a/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/configuration.ts b/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/configuration.ts new file mode 100644 index 0000000000..c119def95a --- /dev/null +++ b/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/configuration.ts @@ -0,0 +1,186 @@ +import { HttpParameterCodec } from '@angular/common/http'; +import { Param } from './param'; + +export interface ConfigurationParameters { + /** + * @deprecated Since 5.0. Use credentials instead + */ + apiKeys?: {[ key: string ]: string}; + username?: string; + password?: string; + /** + * @deprecated Since 5.0. Use credentials instead + */ + accessToken?: string | (() => string); + basePath?: string; + withCredentials?: boolean; + /** + * Takes care of encoding query- and form-parameters. + */ + encoder?: HttpParameterCodec; + /** + * Override the default method for encoding path parameters in various + * styles. + *

+ * See {@link README.md} for more details + *

+ */ + encodeParam?: (param: Param) => string; + /** + * The keys are the names in the securitySchemes section of the OpenAPI + * document. They should map to the value used for authentication + * minus any standard prefixes such as 'Basic' or 'Bearer'. + */ + credentials?: {[ key: string ]: string | (() => string | undefined)}; +} + +export class Configuration { + /** + * @deprecated Since 5.0. Use credentials instead + */ + apiKeys?: {[ key: string ]: string}; + username?: string; + password?: string; + /** + * @deprecated Since 5.0. Use credentials instead + */ + accessToken?: string | (() => string); + basePath?: string; + withCredentials?: boolean; + /** + * Takes care of encoding query- and form-parameters. + */ + encoder?: HttpParameterCodec; + /** + * Encoding of various path parameter + * styles. + *

+ * See {@link README.md} for more details + *

+ */ + encodeParam: (param: Param) => string; + /** + * The keys are the names in the securitySchemes section of the OpenAPI + * document. They should map to the value used for authentication + * minus any standard prefixes such as 'Basic' or 'Bearer'. + */ + credentials: {[ key: string ]: string | (() => string | undefined)}; + + constructor(configurationParameters: ConfigurationParameters = {}) { + this.apiKeys = configurationParameters.apiKeys; + this.username = configurationParameters.username; + this.password = configurationParameters.password; + this.accessToken = configurationParameters.accessToken; + this.basePath = configurationParameters.basePath; + this.withCredentials = configurationParameters.withCredentials; + this.encoder = configurationParameters.encoder; + if (configurationParameters.encodeParam) { + this.encodeParam = configurationParameters.encodeParam; + } + else { + this.encodeParam = param => this.defaultEncodeParam(param); + } + if (configurationParameters.credentials) { + this.credentials = configurationParameters.credentials; + } + else { + this.credentials = {}; + } + + // init default api_key credential + if (!this.credentials['api_key']) { + this.credentials['api_key'] = () => { + if (this.apiKeys === null || this.apiKeys === undefined) { + return undefined; + } else { + return this.apiKeys['api_key'] || this.apiKeys['api_key']; + } + }; + } + + // init default petstore_auth credential + if (!this.credentials['petstore_auth']) { + this.credentials['petstore_auth'] = () => { + return typeof this.accessToken === 'function' + ? this.accessToken() + : this.accessToken; + }; + } + } + + /** + * Select the correct content-type to use for a request. + * Uses {@link Configuration#isJsonMime} to determine the correct content-type. + * If no content type is found return the first found type if the contentTypes is not empty + * @param contentTypes - the array of content types that are available for selection + * @returns the selected content-type or undefined if no selection could be made. + */ + public selectHeaderContentType (contentTypes: string[]): string | undefined { + if (contentTypes.length === 0) { + return undefined; + } + + const type = contentTypes.find((x: string) => this.isJsonMime(x)); + if (type === undefined) { + return contentTypes[0]; + } + return type; + } + + /** + * Select the correct accept content-type to use for a request. + * Uses {@link Configuration#isJsonMime} to determine the correct accept content-type. + * If no content type is found return the first found type if the contentTypes is not empty + * @param accepts - the array of content types that are available for selection. + * @returns the selected content-type or undefined if no selection could be made. + */ + public selectHeaderAccept(accepts: string[]): string | undefined { + if (accepts.length === 0) { + return undefined; + } + + const type = accepts.find((x: string) => this.isJsonMime(x)); + if (type === undefined) { + return accepts[0]; + } + return type; + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public isJsonMime(mime: string): boolean { + const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); + } + + public lookupCredential(key: string): string | undefined { + const value = this.credentials[key]; + return typeof value === 'function' + ? value() + : value; + } + + private defaultEncodeParam(param: Param): string { + // This implementation exists as fallback for missing configuration + // and for backwards compatibility to older typescript-angular generator versions. + // It only works for the 'simple' parameter style. + // Date-handling only works for the 'date-time' format. + // All other styles and Date-formats are probably handled incorrectly. + // + // But: if that's all you need (i.e.: the most common use-case): no need for customization! + + const value = param.dataFormat === 'date-time' && param.value instanceof Date + ? (param.value as Date).toISOString() + : param.value; + + return encodeURIComponent(String(value)); + } +} diff --git a/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/encoder.ts b/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/encoder.ts new file mode 100644 index 0000000000..138c4d5cf2 --- /dev/null +++ b/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/encoder.ts @@ -0,0 +1,20 @@ +import { HttpParameterCodec } from '@angular/common/http'; + +/** + * Custom HttpParameterCodec + * Workaround for https://github.com/angular/angular/issues/18261 + */ +export class CustomHttpParameterCodec implements HttpParameterCodec { + encodeKey(k: string): string { + return encodeURIComponent(k); + } + encodeValue(v: string): string { + return encodeURIComponent(v); + } + decodeKey(k: string): string { + return decodeURIComponent(k); + } + decodeValue(v: string): string { + return decodeURIComponent(v); + } +} diff --git a/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/git_push.sh b/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/git_push.sh new file mode 100644 index 0000000000..f53a75d4fa --- /dev/null +++ b/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/git_push.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/index.ts b/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/index.ts new file mode 100644 index 0000000000..104dd3d21e --- /dev/null +++ b/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/index.ts @@ -0,0 +1,6 @@ +export * from './api/api'; +export * from './model/models'; +export * from './variables'; +export * from './configuration'; +export * from './api.module'; +export * from './param'; diff --git a/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/model/apiResponse.ts b/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/model/apiResponse.ts new file mode 100644 index 0000000000..682ba47892 --- /dev/null +++ b/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/model/apiResponse.ts @@ -0,0 +1,22 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * Describes the result of uploading an image resource + */ +export interface ApiResponse { + code?: number; + type?: string; + message?: string; +} + diff --git a/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/model/category.ts b/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/model/category.ts new file mode 100644 index 0000000000..b988b6827a --- /dev/null +++ b/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/model/category.ts @@ -0,0 +1,21 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * A category for a pet + */ +export interface Category { + id?: number; + name?: string; +} + diff --git a/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/model/models.ts b/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/model/models.ts new file mode 100644 index 0000000000..8607c5dabd --- /dev/null +++ b/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/model/models.ts @@ -0,0 +1,6 @@ +export * from './apiResponse'; +export * from './category'; +export * from './order'; +export * from './pet'; +export * from './tag'; +export * from './user'; diff --git a/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/model/order.ts b/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/model/order.ts new file mode 100644 index 0000000000..a29bebe490 --- /dev/null +++ b/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/model/order.ts @@ -0,0 +1,37 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * An order for a pets from the pet store + */ +export interface Order { + id?: number; + petId?: number; + quantity?: number; + shipDate?: string; + /** + * Order Status + */ + status?: Order.StatusEnum; + complete?: boolean; +} +export namespace Order { + export type StatusEnum = 'placed' | 'approved' | 'delivered'; + export const StatusEnum = { + Placed: 'placed' as StatusEnum, + Approved: 'approved' as StatusEnum, + Delivered: 'delivered' as StatusEnum + }; +} + + diff --git a/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/model/pet.ts b/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/model/pet.ts new file mode 100644 index 0000000000..e0404395f9 --- /dev/null +++ b/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/model/pet.ts @@ -0,0 +1,39 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { Category } from './category'; +import { Tag } from './tag'; + + +/** + * A pet for sale in the pet store + */ +export interface Pet { + id?: number; + category?: Category; + name: string; + photoUrls: Array; + tags?: Array; + /** + * pet status in the store + */ + status?: Pet.StatusEnum; +} +export namespace Pet { + export type StatusEnum = 'available' | 'pending' | 'sold'; + export const StatusEnum = { + Available: 'available' as StatusEnum, + Pending: 'pending' as StatusEnum, + Sold: 'sold' as StatusEnum + }; +} + + diff --git a/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/model/tag.ts b/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/model/tag.ts new file mode 100644 index 0000000000..b6ff210e8d --- /dev/null +++ b/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/model/tag.ts @@ -0,0 +1,21 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * A tag for a pet + */ +export interface Tag { + id?: number; + name?: string; +} + diff --git a/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/model/user.ts b/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/model/user.ts new file mode 100644 index 0000000000..fce5100530 --- /dev/null +++ b/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/model/user.ts @@ -0,0 +1,30 @@ +/** + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * A User who is purchasing from the pet store + */ +export interface User { + id?: number; + username?: string; + firstName?: string; + lastName?: string; + email?: string; + password?: string; + phone?: string; + /** + * User Status + */ + userStatus?: number; +} + diff --git a/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/param.ts b/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/param.ts new file mode 100644 index 0000000000..78a2d20a64 --- /dev/null +++ b/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/param.ts @@ -0,0 +1,69 @@ +/** + * Standard parameter styles defined by OpenAPI spec + */ +export type StandardParamStyle = + | 'matrix' + | 'label' + | 'form' + | 'simple' + | 'spaceDelimited' + | 'pipeDelimited' + | 'deepObject' + ; + +/** + * The OpenAPI standard {@link StandardParamStyle}s may be extended by custom styles by the user. + */ +export type ParamStyle = StandardParamStyle | string; + +/** + * Standard parameter locations defined by OpenAPI spec + */ +export type ParamLocation = 'query' | 'header' | 'path' | 'cookie'; + +/** + * Standard types as defined in OpenAPI Specification: Data Types + */ +export type StandardDataType = + | "integer" + | "number" + | "boolean" + | "string" + | "object" + | "array" + ; + +/** + * Standard {@link DataType}s plus your own types/classes. + */ +export type DataType = StandardDataType | string; + +/** + * Standard formats as defined in OpenAPI Specification: Data Types + */ +export type StandardDataFormat = + | "int32" + | "int64" + | "float" + | "double" + | "byte" + | "binary" + | "date" + | "date-time" + | "password" + ; + +export type DataFormat = StandardDataFormat | string; + +/** + * The parameter to encode. + */ +export interface Param { + name: string; + value: unknown; + in: ParamLocation; + style: ParamStyle, + explode: boolean; + dataType: DataType; + dataFormat: DataFormat | undefined; +} diff --git a/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/variables.ts b/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/variables.ts new file mode 100644 index 0000000000..6fe58549f3 --- /dev/null +++ b/samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default/variables.ts @@ -0,0 +1,9 @@ +import { InjectionToken } from '@angular/core'; + +export const BASE_PATH = new InjectionToken('basePath'); +export const COLLECTION_FORMATS = { + 'csv': ',', + 'tsv': ' ', + 'ssv': ' ', + 'pipes': '|' +} diff --git a/samples/client/petstore/typescript-angular-v15-provided-in-root/package-lock.json b/samples/client/petstore/typescript-angular-v15-provided-in-root/package-lock.json new file mode 100644 index 0000000000..c8100e0b7e --- /dev/null +++ b/samples/client/petstore/typescript-angular-v15-provided-in-root/package-lock.json @@ -0,0 +1,20188 @@ +{ + "name": "typescript-angular-v15-unit-tests", + "version": "0.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "typescript-angular-v15-unit-tests", + "version": "0.0.0", + "dependencies": { + "@angular/animations": "^15.0.3", + "@angular/common": "^15.0.3", + "@angular/compiler": "^15.0.3", + "@angular/core": "^15.0.3", + "@angular/forms": "^15.0.3", + "@angular/platform-browser": "^15.0.3", + "@angular/platform-browser-dynamic": "^15.0.3", + "@angular/router": "^15.0.3", + "core-js": "^2.5.4", + "rxjs": "^7.5.5", + "tslib": "^2.0.0", + "zone.js": "~0.11.5" + }, + "devDependencies": { + "@angular-devkit/build-angular": "^15.0.3", + "@angular/cli": "^15.0.3", + "@angular/compiler-cli": "^15.0.3", + "@angular/language-service": "^15.0.3", + "@types/jasmine": "~4.3.1", + "@types/jasminewd2": "~2.0.3", + "@types/node": "^12.11.1", + "codelyzer": "^6.0.0", + "jasmine-core": "~4.5.0", + "jasmine-spec-reporter": "~7.0.0", + "karma": "~6.4.1", + "karma-chrome-launcher": "~3.1.0", + "karma-coverage-istanbul-reporter": "~3.0.2", + "karma-jasmine": "~5.1.0", + "karma-jasmine-html-reporter": "^2.0.0", + "ts-node": "~10.9.1", + "tslint": "~6.1.0", + "typescript": "~4.8.4" + } + }, + "node_modules/@ampproject/remapping": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", + "integrity": "sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==", + "dev": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.1.0", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@angular-devkit/architect": { + "version": "0.1500.3", + "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1500.3.tgz", + "integrity": "sha512-LNVCyxMz5T9Fib7H3zT2sCE9fhvCUgJoCdT9nN/onDi6LoJx2uGdkVq3IgIsrxAR86pk2ZAR/1d5HdwohxbM8g==", + "dev": true, + "dependencies": { + "@angular-devkit/core": "15.0.3", + "rxjs": "6.6.7" + }, + "engines": { + "node": "^14.20.0 || ^16.13.0 || >=18.10.0", + "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", + "yarn": ">= 1.13.0" + } + }, + "node_modules/@angular-devkit/architect/node_modules/rxjs": { + "version": "6.6.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", + "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "dev": true, + "dependencies": { + "tslib": "^1.9.0" + }, + "engines": { + "npm": ">=2.0.0" + } + }, + "node_modules/@angular-devkit/architect/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "node_modules/@angular-devkit/build-angular": { + "version": "15.0.3", + "resolved": "https://registry.npmjs.org/@angular-devkit/build-angular/-/build-angular-15.0.3.tgz", + "integrity": "sha512-I1/88tCzsqxHl85JrjbKLwHj++ohE9s8UHqmFguIULoh9+FCCQNGpccXLL+wEXtIFfLzugddiS8GO9WNE8T6Ig==", + "dev": true, + "dependencies": { + "@ampproject/remapping": "2.2.0", + "@angular-devkit/architect": "0.1500.3", + "@angular-devkit/build-webpack": "0.1500.3", + "@angular-devkit/core": "15.0.3", + "@babel/core": "7.20.2", + "@babel/generator": "7.20.4", + "@babel/helper-annotate-as-pure": "7.18.6", + "@babel/plugin-proposal-async-generator-functions": "7.20.1", + "@babel/plugin-transform-async-to-generator": "7.18.6", + "@babel/plugin-transform-runtime": "7.19.6", + "@babel/preset-env": "7.20.2", + "@babel/runtime": "7.20.1", + "@babel/template": "7.18.10", + "@discoveryjs/json-ext": "0.5.7", + "@ngtools/webpack": "15.0.3", + "ansi-colors": "4.1.3", + "autoprefixer": "10.4.13", + "babel-loader": "9.1.0", + "babel-plugin-istanbul": "6.1.1", + "browserslist": "4.21.4", + "cacache": "17.0.2", + "chokidar": "3.5.3", + "copy-webpack-plugin": "11.0.0", + "critters": "0.0.16", + "css-loader": "6.7.1", + "esbuild-wasm": "0.15.13", + "glob": "8.0.3", + "https-proxy-agent": "5.0.1", + "inquirer": "8.2.4", + "jsonc-parser": "3.2.0", + "karma-source-map-support": "1.4.0", + "less": "4.1.3", + "less-loader": "11.1.0", + "license-webpack-plugin": "4.0.2", + "loader-utils": "3.2.1", + "magic-string": "0.26.7", + "mini-css-extract-plugin": "2.6.1", + "open": "8.4.0", + "ora": "5.4.1", + "parse5-html-rewriting-stream": "6.0.1", + "piscina": "3.2.0", + "postcss": "8.4.19", + "postcss-loader": "7.0.1", + "resolve-url-loader": "5.0.0", + "rxjs": "6.6.7", + "sass": "1.56.1", + "sass-loader": "13.2.0", + "semver": "7.3.8", + "source-map-loader": "4.0.1", + "source-map-support": "0.5.21", + "terser": "5.15.1", + "text-table": "0.2.0", + "tree-kill": "1.2.2", + "tslib": "2.4.1", + "webpack": "5.75.0", + "webpack-dev-middleware": "5.3.3", + "webpack-dev-server": "4.11.1", + "webpack-merge": "5.8.0", + "webpack-subresource-integrity": "5.1.0" + }, + "engines": { + "node": "^14.20.0 || ^16.13.0 || >=18.10.0", + "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", + "yarn": ">= 1.13.0" + }, + "optionalDependencies": { + "esbuild": "0.15.13" + }, + "peerDependencies": { + "@angular/compiler-cli": "^15.0.0", + "@angular/localize": "^15.0.0", + "@angular/platform-server": "^15.0.0", + "@angular/service-worker": "^15.0.0", + "karma": "^6.3.0", + "ng-packagr": "^15.0.0", + "protractor": "^7.0.0", + "tailwindcss": "^2.0.0 || ^3.0.0", + "typescript": "~4.8.2" + }, + "peerDependenciesMeta": { + "@angular/localize": { + "optional": true + }, + "@angular/platform-server": { + "optional": true + }, + "@angular/service-worker": { + "optional": true + }, + "karma": { + "optional": true + }, + "ng-packagr": { + "optional": true + }, + "protractor": { + "optional": true + }, + "tailwindcss": { + "optional": true + } + } + }, + "node_modules/@angular-devkit/build-angular/node_modules/rxjs": { + "version": "6.6.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", + "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "dev": true, + "dependencies": { + "tslib": "^1.9.0" + }, + "engines": { + "npm": ">=2.0.0" + } + }, + "node_modules/@angular-devkit/build-angular/node_modules/rxjs/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "node_modules/@angular-devkit/build-webpack": { + "version": "0.1500.3", + "resolved": "https://registry.npmjs.org/@angular-devkit/build-webpack/-/build-webpack-0.1500.3.tgz", + "integrity": "sha512-PUkYJFFl7hUwi+rm47xVSXwbWabogZVU0ipbncZPO/QrsX2yEuFT8rRvkplmSt1Y45rGTI58lcKj5aM4N3+Meg==", + "dev": true, + "dependencies": { + "@angular-devkit/architect": "0.1500.3", + "rxjs": "6.6.7" + }, + "engines": { + "node": "^14.20.0 || ^16.13.0 || >=18.10.0", + "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", + "yarn": ">= 1.13.0" + }, + "peerDependencies": { + "webpack": "^5.30.0", + "webpack-dev-server": "^4.0.0" + } + }, + "node_modules/@angular-devkit/build-webpack/node_modules/rxjs": { + "version": "6.6.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", + "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "dev": true, + "dependencies": { + "tslib": "^1.9.0" + }, + "engines": { + "npm": ">=2.0.0" + } + }, + "node_modules/@angular-devkit/build-webpack/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "node_modules/@angular-devkit/core": { + "version": "15.0.3", + "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-15.0.3.tgz", + "integrity": "sha512-sJsC1uZnOs66uTEGS6E/FlMInERvChIC1oUwfgP4NMYFy4KLkzTDYZ+JAtK5/k418N+j0aS+DndfrRT3n7WNUw==", + "dev": true, + "dependencies": { + "ajv": "8.11.0", + "ajv-formats": "2.1.1", + "jsonc-parser": "3.2.0", + "rxjs": "6.6.7", + "source-map": "0.7.4" + }, + "engines": { + "node": "^14.20.0 || ^16.13.0 || >=18.10.0", + "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", + "yarn": ">= 1.13.0" + }, + "peerDependencies": { + "chokidar": "^3.5.2" + }, + "peerDependenciesMeta": { + "chokidar": { + "optional": true + } + } + }, + "node_modules/@angular-devkit/core/node_modules/rxjs": { + "version": "6.6.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", + "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "dev": true, + "dependencies": { + "tslib": "^1.9.0" + }, + "engines": { + "npm": ">=2.0.0" + } + }, + "node_modules/@angular-devkit/core/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "node_modules/@angular-devkit/schematics": { + "version": "15.0.3", + "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-15.0.3.tgz", + "integrity": "sha512-vIS8XaH3pyWql1G4Nux7EplQsph3FiMXd6U/YV9YK0g1U0k0Rh8w+9zM4yrRbrNf2BKrx1VObS0n6ibGrm1TwA==", + "dev": true, + "dependencies": { + "@angular-devkit/core": "15.0.3", + "jsonc-parser": "3.2.0", + "magic-string": "0.26.7", + "ora": "5.4.1", + "rxjs": "6.6.7" + }, + "engines": { + "node": "^14.20.0 || ^16.13.0 || >=18.10.0", + "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", + "yarn": ">= 1.13.0" + } + }, + "node_modules/@angular-devkit/schematics/node_modules/rxjs": { + "version": "6.6.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", + "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "dev": true, + "dependencies": { + "tslib": "^1.9.0" + }, + "engines": { + "npm": ">=2.0.0" + } + }, + "node_modules/@angular-devkit/schematics/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "node_modules/@angular/animations": { + "version": "15.0.3", + "resolved": "https://registry.npmjs.org/@angular/animations/-/animations-15.0.3.tgz", + "integrity": "sha512-kwUprQMjMvMawpyd5aLzW9DWLd7grlzm4ut4YIqXRf1UJm35KsTjwhvQWNj481u2gUjKxD2rBfkVakyzW5Na3A==", + "dependencies": { + "tslib": "^2.3.0" + }, + "engines": { + "node": "^14.20.0 || ^16.13.0 || >=18.10.0" + }, + "peerDependencies": { + "@angular/core": "15.0.3" + } + }, + "node_modules/@angular/cli": { + "version": "15.0.3", + "resolved": "https://registry.npmjs.org/@angular/cli/-/cli-15.0.3.tgz", + "integrity": "sha512-xLmsSkGeTxkHYHmsThT3mnethXt3VN71e+lOGs+GobJb3R2Lh8FrU07bsr5at/ixaSC/Ejvvt9dhuwZonysDEQ==", + "dev": true, + "dependencies": { + "@angular-devkit/architect": "0.1500.3", + "@angular-devkit/core": "15.0.3", + "@angular-devkit/schematics": "15.0.3", + "@schematics/angular": "15.0.3", + "@yarnpkg/lockfile": "1.1.0", + "ansi-colors": "4.1.3", + "ini": "3.0.1", + "inquirer": "8.2.4", + "jsonc-parser": "3.2.0", + "npm-package-arg": "9.1.2", + "npm-pick-manifest": "8.0.1", + "open": "8.4.0", + "ora": "5.4.1", + "pacote": "15.0.6", + "resolve": "1.22.1", + "semver": "7.3.8", + "symbol-observable": "4.0.0", + "yargs": "17.6.2" + }, + "bin": { + "ng": "bin/ng.js" + }, + "engines": { + "node": "^14.20.0 || ^16.13.0 || >=18.10.0", + "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", + "yarn": ">= 1.13.0" + } + }, + "node_modules/@angular/common": { + "version": "15.0.3", + "resolved": "https://registry.npmjs.org/@angular/common/-/common-15.0.3.tgz", + "integrity": "sha512-TYpNnP6f7+x+FqyFCjl+D7rqJojMJT3QURwbnKsZYO7gsfoKashgrLxd9f3lQpa9EHvdMsVZWGZuPmoerGQ5qg==", + "dependencies": { + "tslib": "^2.3.0" + }, + "engines": { + "node": "^14.20.0 || ^16.13.0 || >=18.10.0" + }, + "peerDependencies": { + "@angular/core": "15.0.3", + "rxjs": "^6.5.3 || ^7.4.0" + } + }, + "node_modules/@angular/compiler": { + "version": "15.0.3", + "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-15.0.3.tgz", + "integrity": "sha512-LNQkQgjAy43ZbQcoUzbzwaCokl6LQHhnTnGIO8s8ZWFT9cTRORsLb/ziMKPPIWlSUImHUG4NH0dK7fVe7/eAng==", + "dependencies": { + "tslib": "^2.3.0" + }, + "engines": { + "node": "^14.20.0 || ^16.13.0 || >=18.10.0" + }, + "peerDependencies": { + "@angular/core": "15.0.3" + }, + "peerDependenciesMeta": { + "@angular/core": { + "optional": true + } + } + }, + "node_modules/@angular/compiler-cli": { + "version": "15.0.3", + "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-15.0.3.tgz", + "integrity": "sha512-3IH1Ns4Ed/VFQlNNtgIcorht7JK7SoBzpbxrbqjogoHZwUR3OTn+dvX87N7zMn0yxAL0T6Jv0UTILcGY0EP9HQ==", + "dev": true, + "dependencies": { + "@babel/core": "^7.17.2", + "chokidar": "^3.0.0", + "convert-source-map": "^1.5.1", + "dependency-graph": "^0.11.0", + "magic-string": "^0.27.0", + "reflect-metadata": "^0.1.2", + "semver": "^7.0.0", + "sourcemap-codec": "^1.4.8", + "tslib": "^2.3.0", + "yargs": "^17.2.1" + }, + "bin": { + "ng-xi18n": "bundles/src/bin/ng_xi18n.js", + "ngc": "bundles/src/bin/ngc.js", + "ngcc": "bundles/ngcc/main-ngcc.js" + }, + "engines": { + "node": "^14.20.0 || ^16.13.0 || >=18.10.0" + }, + "peerDependencies": { + "@angular/compiler": "15.0.3", + "typescript": ">=4.8.2 <4.9" + } + }, + "node_modules/@angular/compiler-cli/node_modules/magic-string": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.27.0.tgz", + "integrity": "sha512-8UnnX2PeRAPZuN12svgR9j7M1uWMovg/CEnIwIG0LFkXSJJe4PdfUGiTGl8V9bsBHFUtfVINcSyYxd7q+kx9fA==", + "dev": true, + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.13" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@angular/core": { + "version": "15.0.3", + "resolved": "https://registry.npmjs.org/@angular/core/-/core-15.0.3.tgz", + "integrity": "sha512-tYQszxkk32RZkMA7Czv9l5apiDIsoqVO2taIuPKfesAcwsQ7z/x3JTu3JkwUnB9c9nq2c18wIzjzMs4iElxdVQ==", + "dependencies": { + "tslib": "^2.3.0" + }, + "engines": { + "node": "^14.20.0 || ^16.13.0 || >=18.10.0" + }, + "peerDependencies": { + "rxjs": "^6.5.3 || ^7.4.0", + "zone.js": "~0.11.4 || ~0.12.0" + } + }, + "node_modules/@angular/forms": { + "version": "15.0.3", + "resolved": "https://registry.npmjs.org/@angular/forms/-/forms-15.0.3.tgz", + "integrity": "sha512-oPc1lpXvwFM1QHPxsayIlZ9C4/mmFrvdnSV/x/IzHDZpgqZyLT2rnDJxqpxn7KCcn71bPdU94fKTI6Fbnkj/dQ==", + "dependencies": { + "tslib": "^2.3.0" + }, + "engines": { + "node": "^14.20.0 || ^16.13.0 || >=18.10.0" + }, + "peerDependencies": { + "@angular/common": "15.0.3", + "@angular/core": "15.0.3", + "@angular/platform-browser": "15.0.3", + "rxjs": "^6.5.3 || ^7.4.0" + } + }, + "node_modules/@angular/language-service": { + "version": "15.0.3", + "resolved": "https://registry.npmjs.org/@angular/language-service/-/language-service-15.0.3.tgz", + "integrity": "sha512-Sa/gIzJKYC0Zb5LpR3HMLhbNlV/7kZQk99TVp0CREBxmHcjw01TC4+HIzgIgEq2Q1iO2qVUbpkClNf8q6Q/Ocw==", + "dev": true, + "engines": { + "node": "^14.20.0 || ^16.13.0 || >=18.10.0" + } + }, + "node_modules/@angular/platform-browser": { + "version": "15.0.3", + "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-15.0.3.tgz", + "integrity": "sha512-XIgAh6/SI4m2JfFdtKWmh8BVPzs3gV8VuOVYdykWrYrhDCVz5X3J7AXGxn9AX1S+dMuQPi91lM1icErunVrCZQ==", + "dependencies": { + "tslib": "^2.3.0" + }, + "engines": { + "node": "^14.20.0 || ^16.13.0 || >=18.10.0" + }, + "peerDependencies": { + "@angular/animations": "15.0.3", + "@angular/common": "15.0.3", + "@angular/core": "15.0.3" + }, + "peerDependenciesMeta": { + "@angular/animations": { + "optional": true + } + } + }, + "node_modules/@angular/platform-browser-dynamic": { + "version": "15.0.3", + "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-15.0.3.tgz", + "integrity": "sha512-+hdywxDegUGftq+teqQDmQ22seyR25qSPna60PxZIpQxi4D8+sNm9PxSGIn4pZtxN9gpg78j69yUM0E2OwVbjQ==", + "dependencies": { + "tslib": "^2.3.0" + }, + "engines": { + "node": "^14.20.0 || ^16.13.0 || >=18.10.0" + }, + "peerDependencies": { + "@angular/common": "15.0.3", + "@angular/compiler": "15.0.3", + "@angular/core": "15.0.3", + "@angular/platform-browser": "15.0.3" + } + }, + "node_modules/@angular/router": { + "version": "15.0.3", + "resolved": "https://registry.npmjs.org/@angular/router/-/router-15.0.3.tgz", + "integrity": "sha512-Mym1qasRBLTwlwFHlWamrgvTXl09Uej2LTgqCD6Jg9uFQ/F+16qsSqTy107WkeJbsBzL95+rx66VtvwB//M45w==", + "dependencies": { + "tslib": "^2.3.0" + }, + "engines": { + "node": "^14.20.0 || ^16.13.0 || >=18.10.0" + }, + "peerDependencies": { + "@angular/common": "15.0.3", + "@angular/core": "15.0.3", + "@angular/platform-browser": "15.0.3", + "rxjs": "^6.5.3 || ^7.4.0" + } + }, + "node_modules/@assemblyscript/loader": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/@assemblyscript/loader/-/loader-0.10.1.tgz", + "integrity": "sha512-H71nDOOL8Y7kWRLqf6Sums+01Q5msqBW2KhDUTemh1tvY04eSkSXrK0uj/4mmY0Xr16/3zyZmsrxN7CKuRbNRg==", + "dev": true + }, + "node_modules/@babel/code-frame": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", + "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.20.5.tgz", + "integrity": "sha512-KZXo2t10+/jxmkhNXc7pZTqRvSOIvVv/+lJwHS+B2rErwOyjuVRh60yVpb7liQ1U5t7lLJ1bz+t8tSypUZdm0g==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.20.2", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.20.2.tgz", + "integrity": "sha512-w7DbG8DtMrJcFOi4VrLm+8QM4az8Mo+PuLBKLp2zrYRCow8W/f9xiXm5sN53C8HksCyDQwCKha9JiDoIyPjT2g==", + "dev": true, + "dependencies": { + "@ampproject/remapping": "^2.1.0", + "@babel/code-frame": "^7.18.6", + "@babel/generator": "^7.20.2", + "@babel/helper-compilation-targets": "^7.20.0", + "@babel/helper-module-transforms": "^7.20.2", + "@babel/helpers": "^7.20.1", + "@babel/parser": "^7.20.2", + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.20.1", + "@babel/types": "^7.20.2", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.1", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/core/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/generator": { + "version": "7.20.4", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.20.4.tgz", + "integrity": "sha512-luCf7yk/cm7yab6CAW1aiFnmEfBJplb/JojV56MYEK7ziWfGmFlTfmL9Ehwfy4gFhbjBfWO1wj7/TuSbVNEEtA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.20.2", + "@jridgewell/gen-mapping": "^0.3.2", + "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/generator/node_modules/@jridgewell/gen-mapping": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", + "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/helper-annotate-as-pure": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz", + "integrity": "sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-builder-binary-assignment-operator-visitor": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.18.9.tgz", + "integrity": "sha512-yFQ0YCHoIqarl8BCRwBL8ulYUaZpz3bNsA7oFepAzee+8/+ImtADXNOmO5vJvsPff3qi+hvpkY/NYBTrBQgdNw==", + "dev": true, + "dependencies": { + "@babel/helper-explode-assignable-expression": "^7.18.6", + "@babel/types": "^7.18.9" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.20.0", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.0.tgz", + "integrity": "sha512-0jp//vDGp9e8hZzBc6N/KwA5ZK3Wsm/pfm4CrY7vzegkVxc65SgSn6wYOnwHe9Js9HRQ1YTCKLGPzDtaS3RoLQ==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.20.0", + "@babel/helper-validator-option": "^7.18.6", + "browserslist": "^4.21.3", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-compilation-targets/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/helper-create-class-features-plugin": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.20.5.tgz", + "integrity": "sha512-3RCdA/EmEaikrhayahwToF0fpweU/8o2p8vhc1c/1kftHOdTKuC65kik/TLc+qfbS8JKw4qqJbne4ovICDhmww==", + "dev": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-function-name": "^7.19.0", + "@babel/helper-member-expression-to-functions": "^7.18.9", + "@babel/helper-optimise-call-expression": "^7.18.6", + "@babel/helper-replace-supers": "^7.19.1", + "@babel/helper-split-export-declaration": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-create-regexp-features-plugin": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.20.5.tgz", + "integrity": "sha512-m68B1lkg3XDGX5yCvGO0kPx3v9WIYLnzjKfPcQiwntEQa5ZeRkPmo2X/ISJc8qxWGfwUr+kvZAeEzAwLec2r2w==", + "dev": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.18.6", + "regexpu-core": "^5.2.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-define-polyfill-provider": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.3.tgz", + "integrity": "sha512-z5aQKU4IzbqCC1XH0nAqfsFLMVSo22SBKUc0BxGrLkolTdPTructy0ToNnlO2zA4j9Q/7pjMZf0DSY+DSTYzww==", + "dev": true, + "dependencies": { + "@babel/helper-compilation-targets": "^7.17.7", + "@babel/helper-plugin-utils": "^7.16.7", + "debug": "^4.1.1", + "lodash.debounce": "^4.0.8", + "resolve": "^1.14.2", + "semver": "^6.1.2" + }, + "peerDependencies": { + "@babel/core": "^7.4.0-0" + } + }, + "node_modules/@babel/helper-define-polyfill-provider/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/helper-environment-visitor": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz", + "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-explode-assignable-expression": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.18.6.tgz", + "integrity": "sha512-eyAYAsQmB80jNfg4baAtLeWAQHfHFiR483rzFK+BhETlGZaQC9bsfrugfXDCbRHLQbIA7U5NxhhOxN7p/dWIcg==", + "dev": true, + "dependencies": { + "@babel/types": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-function-name": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz", + "integrity": "sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w==", + "dev": true, + "dependencies": { + "@babel/template": "^7.18.10", + "@babel/types": "^7.19.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-hoist-variables": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", + "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", + "dev": true, + "dependencies": { + "@babel/types": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-member-expression-to-functions": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.18.9.tgz", + "integrity": "sha512-RxifAh2ZoVU67PyKIO4AMi1wTenGfMR/O/ae0CCRqwgBAt5v7xjdtRw7UoSbsreKrQn5t7r89eruK/9JjYHuDg==", + "dev": true, + "dependencies": { + "@babel/types": "^7.18.9" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz", + "integrity": "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.20.2", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.20.2.tgz", + "integrity": "sha512-zvBKyJXRbmK07XhMuujYoJ48B5yvvmM6+wcpv6Ivj4Yg6qO7NOZOSnvZN9CRl1zz1Z4cKf8YejmCMh8clOoOeA==", + "dev": true, + "dependencies": { + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-module-imports": "^7.18.6", + "@babel/helper-simple-access": "^7.20.2", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/helper-validator-identifier": "^7.19.1", + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.20.1", + "@babel/types": "^7.20.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-optimise-call-expression": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz", + "integrity": "sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.20.2", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.20.2.tgz", + "integrity": "sha512-8RvlJG2mj4huQ4pZ+rU9lqKi9ZKiRmuvGuM2HlWmkmgOhbs6zEAw6IEiJ5cQqGbDzGZOhwuOQNtZMi/ENLjZoQ==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-remap-async-to-generator": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.18.9.tgz", + "integrity": "sha512-dI7q50YKd8BAv3VEfgg7PS7yD3Rtbi2J1XMXaalXO0W0164hYLnh8zpjRS0mte9MfVp/tltvr/cfdXPvJr1opA==", + "dev": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-wrap-function": "^7.18.9", + "@babel/types": "^7.18.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-replace-supers": { + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.19.1.tgz", + "integrity": "sha512-T7ahH7wV0Hfs46SFh5Jz3s0B6+o8g3c+7TMxu7xKfmHikg7EAZ3I2Qk9LFhjxXq8sL7UkP5JflezNwoZa8WvWw==", + "dev": true, + "dependencies": { + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-member-expression-to-functions": "^7.18.9", + "@babel/helper-optimise-call-expression": "^7.18.6", + "@babel/traverse": "^7.19.1", + "@babel/types": "^7.19.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-simple-access": { + "version": "7.20.2", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.20.2.tgz", + "integrity": "sha512-+0woI/WPq59IrqDYbVGfshjT5Dmk/nnbdpcF8SnMhhXObpTq2KNBdLFRFrkVdbDOyUmHBCxzm5FHV1rACIkIbA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.20.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-skip-transparent-expression-wrappers": { + "version": "7.20.0", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.20.0.tgz", + "integrity": "sha512-5y1JYeNKfvnT8sZcK9DVRtpTbGiomYIHviSP3OQWmDPU3DeH4a1ZlT/N2lyQ5P8egjcRaT/Y9aNqUxK0WsnIIg==", + "dev": true, + "dependencies": { + "@babel/types": "^7.20.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-split-export-declaration": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", + "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.19.4", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz", + "integrity": "sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", + "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz", + "integrity": "sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-wrap-function": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.20.5.tgz", + "integrity": "sha512-bYMxIWK5mh+TgXGVqAtnu5Yn1un+v8DDZtqyzKRLUzrh70Eal2O3aZ7aPYiMADO4uKlkzOiRiZ6GX5q3qxvW9Q==", + "dev": true, + "dependencies": { + "@babel/helper-function-name": "^7.19.0", + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.20.5", + "@babel/types": "^7.20.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.20.6", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.20.6.tgz", + "integrity": "sha512-Pf/OjgfgFRW5bApskEz5pvidpim7tEDPlFtKcNRXWmfHGn9IEI2W2flqRQXTFb7gIPTyK++N6rVHuwKut4XK6w==", + "dev": true, + "dependencies": { + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.20.5", + "@babel/types": "^7.20.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", + "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.18.6", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.5.tgz", + "integrity": "sha512-r27t/cy/m9uKLXQNWWebeCUHgnAZq0CpG1OwKRxzJMP1vpSU4bSIK2hq+/cp0bQxetkXx38n09rNu8jVkcK/zA==", + "dev": true, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.18.6.tgz", + "integrity": "sha512-Dgxsyg54Fx1d4Nge8UnvTrED63vrwOdPmyvPzlNN/boaliRP54pm3pGzZD1SJUwrBA+Cs/xdG8kXX6Mn/RfISQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.18.9.tgz", + "integrity": "sha512-AHrP9jadvH7qlOj6PINbgSuphjQUAK7AOT7DPjBo9EHoLhQTnnK5u45e1Hd4DbSQEO9nqPWtQ89r+XEOWFScKg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.9", + "@babel/helper-skip-transparent-expression-wrappers": "^7.18.9", + "@babel/plugin-proposal-optional-chaining": "^7.18.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.13.0" + } + }, + "node_modules/@babel/plugin-proposal-async-generator-functions": { + "version": "7.20.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.20.1.tgz", + "integrity": "sha512-Gh5rchzSwE4kC+o/6T8waD0WHEQIsDmjltY8WnWRXHUdH8axZhuH86Ov9M72YhJfDrZseQwuuWaaIT/TmePp3g==", + "dev": true, + "dependencies": { + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-plugin-utils": "^7.19.0", + "@babel/helper-remap-async-to-generator": "^7.18.9", + "@babel/plugin-syntax-async-generators": "^7.8.4" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-class-properties": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.18.6.tgz", + "integrity": "sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ==", + "dev": true, + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-class-static-block": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.18.6.tgz", + "integrity": "sha512-+I3oIiNxrCpup3Gi8n5IGMwj0gOCAjcJUSQEcotNnCCPMEnixawOQ+KeJPlgfjzx+FKQ1QSyZOWe7wmoJp7vhw==", + "dev": true, + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-class-static-block": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.12.0" + } + }, + "node_modules/@babel/plugin-proposal-dynamic-import": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.18.6.tgz", + "integrity": "sha512-1auuwmK+Rz13SJj36R+jqFPMJWyKEDd7lLSdOj4oJK0UTgGueSAtkrCvz9ewmgyU/P941Rv2fQwZJN8s6QruXw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-dynamic-import": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-export-namespace-from": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.18.9.tgz", + "integrity": "sha512-k1NtHyOMvlDDFeb9G5PhUXuGj8m/wiwojgQVEhJ/fsVsMCpLyOP4h0uGEjYJKrRI+EVPlb5Jk+Gt9P97lOGwtA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.9", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-json-strings": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.18.6.tgz", + "integrity": "sha512-lr1peyn9kOdbYc0xr0OdHTZ5FMqS6Di+H0Fz2I/JwMzGmzJETNeOFq2pBySw6X/KFL5EWDjlJuMsUGRFb8fQgQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-json-strings": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-logical-assignment-operators": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.18.9.tgz", + "integrity": "sha512-128YbMpjCrP35IOExw2Fq+x55LMP42DzhOhX2aNNIdI9avSWl2PI0yuBWarr3RYpZBSPtabfadkH2yeRiMD61Q==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.9", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-nullish-coalescing-operator": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.18.6.tgz", + "integrity": "sha512-wQxQzxYeJqHcfppzBDnm1yAY0jSRkUXR2z8RePZYrKwMKgMlE8+Z6LUno+bd6LvbGh8Gltvy74+9pIYkr+XkKA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-numeric-separator": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.18.6.tgz", + "integrity": "sha512-ozlZFogPqoLm8WBr5Z8UckIoE4YQ5KESVcNudyXOR8uqIkliTEgJ3RoketfG6pmzLdeZF0H/wjE9/cCEitBl7Q==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-numeric-separator": "^7.10.4" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-object-rest-spread": { + "version": "7.20.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.20.2.tgz", + "integrity": "sha512-Ks6uej9WFK+fvIMesSqbAto5dD8Dz4VuuFvGJFKgIGSkJuRGcrwGECPA1fDgQK3/DbExBJpEkTeYeB8geIFCSQ==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.20.1", + "@babel/helper-compilation-targets": "^7.20.0", + "@babel/helper-plugin-utils": "^7.20.2", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-transform-parameters": "^7.20.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-optional-catch-binding": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.18.6.tgz", + "integrity": "sha512-Q40HEhs9DJQyaZfUjjn6vE8Cv4GmMHCYuMGIWUnlxH6400VGxOuwWsPt4FxXxJkC/5eOzgn0z21M9gMT4MOhbw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-optional-chaining": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.18.9.tgz", + "integrity": "sha512-v5nwt4IqBXihxGsW2QmCWMDS3B3bzGIk/EQVZz2ei7f3NJl8NzAJVvUmpDW5q1CRNY+Beb/k58UAH1Km1N411w==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.9", + "@babel/helper-skip-transparent-expression-wrappers": "^7.18.9", + "@babel/plugin-syntax-optional-chaining": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-private-methods": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.18.6.tgz", + "integrity": "sha512-nutsvktDItsNn4rpGItSNV2sz1XwS+nfU0Rg8aCx3W3NOKVzdMjJRu0O5OkgDp3ZGICSTbgRpxZoWsxoKRvbeA==", + "dev": true, + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-private-property-in-object": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.20.5.tgz", + "integrity": "sha512-Vq7b9dUA12ByzB4EjQTPo25sFhY+08pQDBSZRtUAkj7lb7jahaHR5igera16QZ+3my1nYR4dKsNdYj5IjPHilQ==", + "dev": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-create-class-features-plugin": "^7.20.5", + "@babel/helper-plugin-utils": "^7.20.2", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-unicode-property-regex": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.18.6.tgz", + "integrity": "sha512-2BShG/d5yoZyXZfVePH91urL5wTG6ASZU9M4o03lKK8u8UW1y08OMttBSOADTcJrnPMpvDXRG3G8fyLh4ovs8w==", + "dev": true, + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-class-static-block": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", + "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-dynamic-import": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", + "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-export-namespace-from": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", + "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.3" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-assertions": { + "version": "7.20.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.20.0.tgz", + "integrity": "sha512-IUh1vakzNoWalR8ch/areW7qFopR2AEw03JlG7BbrDqmQ4X3q9uuipQwSGrUn7oGiemKjtSLDhNtQHzMHr1JdQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.19.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-private-property-in-object": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", + "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-arrow-functions": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.18.6.tgz", + "integrity": "sha512-9S9X9RUefzrsHZmKMbDXxweEH+YlE8JJEuat9FdvW9Qh1cw7W64jELCtWNkPBPX5En45uy28KGvA/AySqUh8CQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-async-to-generator": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.18.6.tgz", + "integrity": "sha512-ARE5wZLKnTgPW7/1ftQmSi1CmkqqHo2DNmtztFhvgtOWSDfq0Cq9/9L+KnZNYSNrydBekhW3rwShduf59RoXag==", + "dev": true, + "dependencies": { + "@babel/helper-module-imports": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-remap-async-to-generator": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-block-scoped-functions": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.18.6.tgz", + "integrity": "sha512-ExUcOqpPWnliRcPqves5HJcJOvHvIIWfuS4sroBUenPuMdmW+SMHDakmtS7qOo13sVppmUijqeTv7qqGsvURpQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-block-scoping": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.20.5.tgz", + "integrity": "sha512-WvpEIW9Cbj9ApF3yJCjIEEf1EiNJLtXagOrL5LNWEZOo3jv8pmPoYTSNJQvqej8OavVlgOoOPw6/htGZro6IkA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.20.2" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-classes": { + "version": "7.20.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.20.2.tgz", + "integrity": "sha512-9rbPp0lCVVoagvtEyQKSo5L8oo0nQS/iif+lwlAz29MccX2642vWDlSZK+2T2buxbopotId2ld7zZAzRfz9j1g==", + "dev": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-compilation-targets": "^7.20.0", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-function-name": "^7.19.0", + "@babel/helper-optimise-call-expression": "^7.18.6", + "@babel/helper-plugin-utils": "^7.20.2", + "@babel/helper-replace-supers": "^7.19.1", + "@babel/helper-split-export-declaration": "^7.18.6", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-computed-properties": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.18.9.tgz", + "integrity": "sha512-+i0ZU1bCDymKakLxn5srGHrsAPRELC2WIbzwjLhHW9SIE1cPYkLCL0NlnXMZaM1vhfgA2+M7hySk42VBvrkBRw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-destructuring": { + "version": "7.20.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.20.2.tgz", + "integrity": "sha512-mENM+ZHrvEgxLTBXUiQ621rRXZes3KWUv6NdQlrnr1TkWVw+hUjQBZuP2X32qKlrlG2BzgR95gkuCRSkJl8vIw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.20.2" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-dotall-regex": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.18.6.tgz", + "integrity": "sha512-6S3jpun1eEbAxq7TdjLotAsl4WpQI9DxfkycRcKrjhQYzU87qpXdknpBg/e+TdcMehqGnLFi7tnFUBR02Vq6wg==", + "dev": true, + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-duplicate-keys": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.18.9.tgz", + "integrity": "sha512-d2bmXCtZXYc59/0SanQKbiWINadaJXqtvIQIzd4+hNwkWBgyCd5F/2t1kXoUdvPMrxzPvhK6EMQRROxsue+mfw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-exponentiation-operator": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.18.6.tgz", + "integrity": "sha512-wzEtc0+2c88FVR34aQmiz56dxEkxr2g8DQb/KfaFa1JYXOFVsbhvAonFN6PwVWj++fKmku8NP80plJ5Et4wqHw==", + "dev": true, + "dependencies": { + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-for-of": { + "version": "7.18.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.18.8.tgz", + "integrity": "sha512-yEfTRnjuskWYo0k1mHUqrVWaZwrdq8AYbfrpqULOJOaucGSp4mNMVps+YtA8byoevxS/urwU75vyhQIxcCgiBQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-function-name": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.18.9.tgz", + "integrity": "sha512-WvIBoRPaJQ5yVHzcnJFor7oS5Ls0PYixlTYE63lCj2RtdQEl15M68FXQlxnG6wdraJIXRdR7KI+hQ7q/9QjrCQ==", + "dev": true, + "dependencies": { + "@babel/helper-compilation-targets": "^7.18.9", + "@babel/helper-function-name": "^7.18.9", + "@babel/helper-plugin-utils": "^7.18.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-literals": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.18.9.tgz", + "integrity": "sha512-IFQDSRoTPnrAIrI5zoZv73IFeZu2dhu6irxQjY9rNjTT53VmKg9fenjvoiOWOkJ6mm4jKVPtdMzBY98Fp4Z4cg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-member-expression-literals": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.18.6.tgz", + "integrity": "sha512-qSF1ihLGO3q+/g48k85tUjD033C29TNTVB2paCwZPVmOsjn9pClvYYrM2VeJpBY2bcNkuny0YUyTNRyRxJ54KA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-amd": { + "version": "7.19.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.19.6.tgz", + "integrity": "sha512-uG3od2mXvAtIFQIh0xrpLH6r5fpSQN04gIVovl+ODLdUMANokxQLZnPBHcjmv3GxRjnqwLuHvppjjcelqUFZvg==", + "dev": true, + "dependencies": { + "@babel/helper-module-transforms": "^7.19.6", + "@babel/helper-plugin-utils": "^7.19.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-commonjs": { + "version": "7.19.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.19.6.tgz", + "integrity": "sha512-8PIa1ym4XRTKuSsOUXqDG0YaOlEuTVvHMe5JCfgBMOtHvJKw/4NGovEGN33viISshG/rZNVrACiBmPQLvWN8xQ==", + "dev": true, + "dependencies": { + "@babel/helper-module-transforms": "^7.19.6", + "@babel/helper-plugin-utils": "^7.19.0", + "@babel/helper-simple-access": "^7.19.4" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-systemjs": { + "version": "7.19.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.19.6.tgz", + "integrity": "sha512-fqGLBepcc3kErfR9R3DnVpURmckXP7gj7bAlrTQyBxrigFqszZCkFkcoxzCp2v32XmwXLvbw+8Yq9/b+QqksjQ==", + "dev": true, + "dependencies": { + "@babel/helper-hoist-variables": "^7.18.6", + "@babel/helper-module-transforms": "^7.19.6", + "@babel/helper-plugin-utils": "^7.19.0", + "@babel/helper-validator-identifier": "^7.19.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-umd": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.18.6.tgz", + "integrity": "sha512-dcegErExVeXcRqNtkRU/z8WlBLnvD4MRnHgNs3MytRO1Mn1sHRyhbcpYbVMGclAqOjdW+9cfkdZno9dFdfKLfQ==", + "dev": true, + "dependencies": { + "@babel/helper-module-transforms": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.20.5.tgz", + "integrity": "sha512-mOW4tTzi5iTLnw+78iEq3gr8Aoq4WNRGpmSlrogqaiCBoR1HFhpU4JkpQFOHfeYx3ReVIFWOQJS4aZBRvuZ6mA==", + "dev": true, + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.20.5", + "@babel/helper-plugin-utils": "^7.20.2" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-transform-new-target": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.18.6.tgz", + "integrity": "sha512-DjwFA/9Iu3Z+vrAn+8pBUGcjhxKguSMlsFqeCKbhb9BAV756v0krzVK04CRDi/4aqmk8BsHb4a/gFcaA5joXRw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-object-super": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.18.6.tgz", + "integrity": "sha512-uvGz6zk+pZoS1aTZrOvrbj6Pp/kK2mp45t2B+bTDre2UgsZZ8EZLSJtUg7m/no0zOJUWgFONpB7Zv9W2tSaFlA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-replace-supers": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-parameters": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.20.5.tgz", + "integrity": "sha512-h7plkOmcndIUWXZFLgpbrh2+fXAi47zcUX7IrOQuZdLD0I0KvjJ6cvo3BEcAOsDOcZhVKGJqv07mkSqK0y2isQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.20.2" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-property-literals": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.18.6.tgz", + "integrity": "sha512-cYcs6qlgafTud3PAzrrRNbQtfpQ8+y/+M5tKmksS9+M1ckbH6kzY8MrexEM9mcA6JDsukE19iIRvAyYl463sMg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-regenerator": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.20.5.tgz", + "integrity": "sha512-kW/oO7HPBtntbsahzQ0qSE3tFvkFwnbozz3NWFhLGqH75vLEg+sCGngLlhVkePlCs3Jv0dBBHDzCHxNiFAQKCQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.20.2", + "regenerator-transform": "^0.15.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-reserved-words": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.18.6.tgz", + "integrity": "sha512-oX/4MyMoypzHjFrT1CdivfKZ+XvIPMFXwwxHp/r0Ddy2Vuomt4HDFGmft1TAY2yiTKiNSsh3kjBAzcM8kSdsjA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-runtime": { + "version": "7.19.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.19.6.tgz", + "integrity": "sha512-PRH37lz4JU156lYFW1p8OxE5i7d6Sl/zV58ooyr+q1J1lnQPyg5tIiXlIwNVhJaY4W3TmOtdc8jqdXQcB1v5Yw==", + "dev": true, + "dependencies": { + "@babel/helper-module-imports": "^7.18.6", + "@babel/helper-plugin-utils": "^7.19.0", + "babel-plugin-polyfill-corejs2": "^0.3.3", + "babel-plugin-polyfill-corejs3": "^0.6.0", + "babel-plugin-polyfill-regenerator": "^0.4.1", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-runtime/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/plugin-transform-shorthand-properties": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.18.6.tgz", + "integrity": "sha512-eCLXXJqv8okzg86ywZJbRn19YJHU4XUa55oz2wbHhaQVn/MM+XhukiT7SYqp/7o00dg52Rj51Ny+Ecw4oyoygw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-spread": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.19.0.tgz", + "integrity": "sha512-RsuMk7j6n+r752EtzyScnWkQyuJdli6LdO5Klv8Yx0OfPVTcQkIUfS8clx5e9yHXzlnhOZF3CbQ8C2uP5j074w==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.19.0", + "@babel/helper-skip-transparent-expression-wrappers": "^7.18.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-sticky-regex": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.18.6.tgz", + "integrity": "sha512-kfiDrDQ+PBsQDO85yj1icueWMfGfJFKN1KCkndygtu/C9+XUfydLC8Iv5UYJqRwy4zk8EcplRxEOeLyjq1gm6Q==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-template-literals": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.18.9.tgz", + "integrity": "sha512-S8cOWfT82gTezpYOiVaGHrCbhlHgKhQt8XH5ES46P2XWmX92yisoZywf5km75wv5sYcXDUCLMmMxOLCtthDgMA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-typeof-symbol": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.18.9.tgz", + "integrity": "sha512-SRfwTtF11G2aemAZWivL7PD+C9z52v9EvMqH9BuYbabyPuKUvSWks3oCg6041pT925L4zVFqaVBeECwsmlguEw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-unicode-escapes": { + "version": "7.18.10", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.18.10.tgz", + "integrity": "sha512-kKAdAI+YzPgGY/ftStBFXTI1LZFju38rYThnfMykS+IXy8BVx+res7s2fxf1l8I35DV2T97ezo6+SGrXz6B3iQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-unicode-regex": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.18.6.tgz", + "integrity": "sha512-gE7A6Lt7YLnNOL3Pb9BNeZvi+d8l7tcRrG4+pwJjK9hD2xX4mEvjlQW60G9EEmfXVYRPv9VRQcyegIVHCql/AA==", + "dev": true, + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env": { + "version": "7.20.2", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.20.2.tgz", + "integrity": "sha512-1G0efQEWR1EHkKvKHqbG+IN/QdgwfByUpM5V5QroDzGV2t3S/WXNQd693cHiHTlCFMpr9B6FkPFXDA2lQcKoDg==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.20.1", + "@babel/helper-compilation-targets": "^7.20.0", + "@babel/helper-plugin-utils": "^7.20.2", + "@babel/helper-validator-option": "^7.18.6", + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.18.6", + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.18.9", + "@babel/plugin-proposal-async-generator-functions": "^7.20.1", + "@babel/plugin-proposal-class-properties": "^7.18.6", + "@babel/plugin-proposal-class-static-block": "^7.18.6", + "@babel/plugin-proposal-dynamic-import": "^7.18.6", + "@babel/plugin-proposal-export-namespace-from": "^7.18.9", + "@babel/plugin-proposal-json-strings": "^7.18.6", + "@babel/plugin-proposal-logical-assignment-operators": "^7.18.9", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6", + "@babel/plugin-proposal-numeric-separator": "^7.18.6", + "@babel/plugin-proposal-object-rest-spread": "^7.20.2", + "@babel/plugin-proposal-optional-catch-binding": "^7.18.6", + "@babel/plugin-proposal-optional-chaining": "^7.18.9", + "@babel/plugin-proposal-private-methods": "^7.18.6", + "@babel/plugin-proposal-private-property-in-object": "^7.18.6", + "@babel/plugin-proposal-unicode-property-regex": "^7.18.6", + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-class-static-block": "^7.14.5", + "@babel/plugin-syntax-dynamic-import": "^7.8.3", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3", + "@babel/plugin-syntax-import-assertions": "^7.20.0", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5", + "@babel/plugin-syntax-top-level-await": "^7.14.5", + "@babel/plugin-transform-arrow-functions": "^7.18.6", + "@babel/plugin-transform-async-to-generator": "^7.18.6", + "@babel/plugin-transform-block-scoped-functions": "^7.18.6", + "@babel/plugin-transform-block-scoping": "^7.20.2", + "@babel/plugin-transform-classes": "^7.20.2", + "@babel/plugin-transform-computed-properties": "^7.18.9", + "@babel/plugin-transform-destructuring": "^7.20.2", + "@babel/plugin-transform-dotall-regex": "^7.18.6", + "@babel/plugin-transform-duplicate-keys": "^7.18.9", + "@babel/plugin-transform-exponentiation-operator": "^7.18.6", + "@babel/plugin-transform-for-of": "^7.18.8", + "@babel/plugin-transform-function-name": "^7.18.9", + "@babel/plugin-transform-literals": "^7.18.9", + "@babel/plugin-transform-member-expression-literals": "^7.18.6", + "@babel/plugin-transform-modules-amd": "^7.19.6", + "@babel/plugin-transform-modules-commonjs": "^7.19.6", + "@babel/plugin-transform-modules-systemjs": "^7.19.6", + "@babel/plugin-transform-modules-umd": "^7.18.6", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.19.1", + "@babel/plugin-transform-new-target": "^7.18.6", + "@babel/plugin-transform-object-super": "^7.18.6", + "@babel/plugin-transform-parameters": "^7.20.1", + "@babel/plugin-transform-property-literals": "^7.18.6", + "@babel/plugin-transform-regenerator": "^7.18.6", + "@babel/plugin-transform-reserved-words": "^7.18.6", + "@babel/plugin-transform-shorthand-properties": "^7.18.6", + "@babel/plugin-transform-spread": "^7.19.0", + "@babel/plugin-transform-sticky-regex": "^7.18.6", + "@babel/plugin-transform-template-literals": "^7.18.9", + "@babel/plugin-transform-typeof-symbol": "^7.18.9", + "@babel/plugin-transform-unicode-escapes": "^7.18.10", + "@babel/plugin-transform-unicode-regex": "^7.18.6", + "@babel/preset-modules": "^0.1.5", + "@babel/types": "^7.20.2", + "babel-plugin-polyfill-corejs2": "^0.3.3", + "babel-plugin-polyfill-corejs3": "^0.6.0", + "babel-plugin-polyfill-regenerator": "^0.4.1", + "core-js-compat": "^3.25.1", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/preset-modules": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.5.tgz", + "integrity": "sha512-A57th6YRG7oR3cq/yt/Y84MvGgE0eJG2F1JLhKuyG+jFxEgrd/HAMJatiFtmOiZurz+0DkrvbheCLaV5f2JfjA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", + "@babel/plugin-transform-dotall-regex": "^7.4.4", + "@babel/types": "^7.4.4", + "esutils": "^2.0.2" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/runtime": { + "version": "7.20.1", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.20.1.tgz", + "integrity": "sha512-mrzLkl6U9YLF8qpqI7TB82PESyEGjm/0Ly91jG575eVxMMlb8fYfOXFZIJ8XfLrJZQbm7dlKry2bJmXBUEkdFg==", + "dev": true, + "dependencies": { + "regenerator-runtime": "^0.13.10" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/template": { + "version": "7.18.10", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.10.tgz", + "integrity": "sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.18.6", + "@babel/parser": "^7.18.10", + "@babel/types": "^7.18.10" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.20.5.tgz", + "integrity": "sha512-WM5ZNN3JITQIq9tFZaw1ojLU3WgWdtkxnhM1AegMS+PvHjkM5IXjmYEGY7yukz5XS4sJyEf2VzWjI8uAavhxBQ==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.18.6", + "@babel/generator": "^7.20.5", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-function-name": "^7.19.0", + "@babel/helper-hoist-variables": "^7.18.6", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/parser": "^7.20.5", + "@babel/types": "^7.20.5", + "debug": "^4.1.0", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse/node_modules/@babel/generator": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.20.5.tgz", + "integrity": "sha512-jl7JY2Ykn9S0yj4DQP82sYvPU+T3g0HFcWTqDLqiuA9tGRNIj9VfbtXGAYTTkyNEnQk1jkMGOdYka8aG/lulCA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.20.5", + "@jridgewell/gen-mapping": "^0.3.2", + "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse/node_modules/@jridgewell/gen-mapping": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", + "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/types": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.20.5.tgz", + "integrity": "sha512-c9fst/h2/dcF7H+MJKZ2T0KjEQ8hY/BNnDk/H3XY8C4Aw/eWQXWn/lWntHF9ooUBnGmEvbfGrTgLWc+um0YDUg==", + "dev": true, + "dependencies": { + "@babel/helper-string-parser": "^7.19.4", + "@babel/helper-validator-identifier": "^7.19.1", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@colors/colors": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", + "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", + "dev": true, + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "node_modules/@discoveryjs/json-ext": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", + "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", + "dev": true, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.15.13", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.15.13.tgz", + "integrity": "sha512-RY2fVI8O0iFUNvZirXaQ1vMvK0xhCcl0gqRj74Z6yEiO1zAUa7hbsdwZM1kzqbxHK7LFyMizipfXT3JME+12Hw==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.15.13", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.15.13.tgz", + "integrity": "sha512-+BoyIm4I8uJmH/QDIH0fu7MG0AEx9OXEDXnqptXCwKOlOqZiS4iraH1Nr7/ObLMokW3sOCeBNyD68ATcV9b9Ag==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@gar/promisify": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz", + "integrity": "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==", + "dev": true + }, + "node_modules/@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "dev": true, + "dependencies": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz", + "integrity": "sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.0.0", + "@jridgewell/sourcemap-codec": "^1.4.10" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/source-map": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz", + "integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==", + "dev": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.0", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, + "node_modules/@jridgewell/source-map/node_modules/@jridgewell/gen-mapping": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", + "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", + "dev": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.17", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz", + "integrity": "sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "3.1.0", + "@jridgewell/sourcemap-codec": "1.4.14" + } + }, + "node_modules/@leichtgewicht/ip-codec": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz", + "integrity": "sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A==", + "dev": true + }, + "node_modules/@ngtools/webpack": { + "version": "15.0.3", + "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-15.0.3.tgz", + "integrity": "sha512-LGiIpljdQnA3V2/eJUA4q8Idvh39dlgEISD+fyen+iASOsiwY00JCTAcJN/J5A0Gr/Vp4oVP9kC+I/Z27whBKA==", + "dev": true, + "engines": { + "node": "^14.20.0 || ^16.13.0 || >=18.10.0", + "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", + "yarn": ">= 1.13.0" + }, + "peerDependencies": { + "@angular/compiler-cli": "^15.0.0", + "typescript": "~4.8.2", + "webpack": "^5.54.0" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@npmcli/fs": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-3.1.0.tgz", + "integrity": "sha512-7kZUAaLscfgbwBQRbvdMYaZOWyMEcPTH/tJjnyAWJ/dvvs9Ef+CERx/qJb9GExJpl1qipaDGn7KqHnFGGixd0w==", + "dev": true, + "dependencies": { + "semver": "^7.3.5" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/@npmcli/git": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-4.0.3.tgz", + "integrity": "sha512-8cXNkDIbnXPVbhXMmQ7/bklCAjtmPaXfI9aEM4iH+xSuEHINLMHhlfESvVwdqmHJRJkR48vNJTSUvoF6GRPSFA==", + "dev": true, + "dependencies": { + "@npmcli/promise-spawn": "^6.0.0", + "lru-cache": "^7.4.4", + "mkdirp": "^1.0.4", + "npm-pick-manifest": "^8.0.0", + "proc-log": "^3.0.0", + "promise-inflight": "^1.0.1", + "promise-retry": "^2.0.1", + "semver": "^7.3.5", + "which": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/@npmcli/git/node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@npmcli/git/node_modules/proc-log": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-3.0.0.tgz", + "integrity": "sha512-++Vn7NS4Xf9NacaU9Xq3URUuqZETPsf8L4j5/ckhaRYsfPeRyzGw+iDjFhV/Jr3uNmTvvddEJFWh5R1gRgUH8A==", + "dev": true, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/@npmcli/git/node_modules/which": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-3.0.0.tgz", + "integrity": "sha512-nla//68K9NU6yRiwDY/Q8aU6siKlSs64aEC7+IV56QoAuyQT2ovsJcgGYGyqMOmI/CGN1BOR6mM5EN0FBO+zyQ==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/which.js" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/@npmcli/installed-package-contents": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@npmcli/installed-package-contents/-/installed-package-contents-2.0.1.tgz", + "integrity": "sha512-GIykAFdOVK31Q1/zAtT5MbxqQL2vyl9mvFJv+OGu01zxbhL3p0xc8gJjdNGX1mWmUT43aEKVO2L6V/2j4TOsAA==", + "dev": true, + "dependencies": { + "npm-bundled": "^3.0.0", + "npm-normalize-package-bin": "^3.0.0" + }, + "bin": { + "installed-package-contents": "lib/index.js" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/@npmcli/move-file": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-2.0.1.tgz", + "integrity": "sha512-mJd2Z5TjYWq/ttPLLGqArdtnC74J6bOzg4rMDnN+p1xTacZ2yPRCk2y0oSWQtygLR9YVQXgOcONrwtnk3JupxQ==", + "deprecated": "This functionality has been moved to @npmcli/fs", + "dev": true, + "dependencies": { + "mkdirp": "^1.0.4", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/@npmcli/move-file/node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@npmcli/node-gyp": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/node-gyp/-/node-gyp-3.0.0.tgz", + "integrity": "sha512-gp8pRXC2oOxu0DUE1/M3bYtb1b3/DbJ5aM113+XJBgfXdussRAsX0YOrOhdd8WvnAR6auDBvJomGAkLKA5ydxA==", + "dev": true, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/@npmcli/promise-spawn": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-6.0.1.tgz", + "integrity": "sha512-+hcUpxgx0vEpDJI9Cn+lkTdKLoqKBXFCVps5H7FujEU2vLOp6KwqjLlxbnz8Wzgm8oEqW/u5FeNAXSFjLdCD0A==", + "dev": true, + "dependencies": { + "which": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/@npmcli/promise-spawn/node_modules/which": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-3.0.0.tgz", + "integrity": "sha512-nla//68K9NU6yRiwDY/Q8aU6siKlSs64aEC7+IV56QoAuyQT2ovsJcgGYGyqMOmI/CGN1BOR6mM5EN0FBO+zyQ==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/which.js" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/@npmcli/run-script": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-6.0.0.tgz", + "integrity": "sha512-ql+AbRur1TeOdl1FY+RAwGW9fcr4ZwiVKabdvm93mujGREVuVLbdkXRJDrkTXSdCjaxYydr1wlA2v67jxWG5BQ==", + "dev": true, + "dependencies": { + "@npmcli/node-gyp": "^3.0.0", + "@npmcli/promise-spawn": "^6.0.0", + "node-gyp": "^9.0.0", + "read-package-json-fast": "^3.0.0", + "which": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/@npmcli/run-script/node_modules/which": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-3.0.0.tgz", + "integrity": "sha512-nla//68K9NU6yRiwDY/Q8aU6siKlSs64aEC7+IV56QoAuyQT2ovsJcgGYGyqMOmI/CGN1BOR6mM5EN0FBO+zyQ==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/which.js" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/@schematics/angular": { + "version": "15.0.3", + "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-15.0.3.tgz", + "integrity": "sha512-JVodVQNZBAd9TOUjbf19udH9Odu5bJ1g4cVbRnKfZ6V01Qw7iGVL9KrytNWGo/kR3cK2kXAxH0i2MU3WQNcA3A==", + "dev": true, + "dependencies": { + "@angular-devkit/core": "15.0.3", + "@angular-devkit/schematics": "15.0.3", + "jsonc-parser": "3.2.0" + }, + "engines": { + "node": "^14.20.0 || ^16.13.0 || >=18.10.0", + "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", + "yarn": ">= 1.13.0" + } + }, + "node_modules/@socket.io/component-emitter": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz", + "integrity": "sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg==", + "dev": true + }, + "node_modules/@tootallnate/once": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", + "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", + "dev": true, + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tsconfig/node10": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", + "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", + "dev": true + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz", + "integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==", + "dev": true + }, + "node_modules/@types/body-parser": { + "version": "1.19.2", + "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz", + "integrity": "sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==", + "dev": true, + "dependencies": { + "@types/connect": "*", + "@types/node": "*" + } + }, + "node_modules/@types/bonjour": { + "version": "3.5.10", + "resolved": "https://registry.npmjs.org/@types/bonjour/-/bonjour-3.5.10.tgz", + "integrity": "sha512-p7ienRMiS41Nu2/igbJxxLDWrSZ0WxM8UQgCeO9KhoVF7cOVFkrKsiDr1EsJIla8vV3oEEjGcz11jc5yimhzZw==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/connect": { + "version": "3.4.35", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz", + "integrity": "sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/connect-history-api-fallback": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/@types/connect-history-api-fallback/-/connect-history-api-fallback-1.3.5.tgz", + "integrity": "sha512-h8QJa8xSb1WD4fpKBDcATDNGXghFj6/3GRWG6dhmRcu0RX1Ubasur2Uvx5aeEwlf0MwblEC2bMzzMQntxnw/Cw==", + "dev": true, + "dependencies": { + "@types/express-serve-static-core": "*", + "@types/node": "*" + } + }, + "node_modules/@types/cookie": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.4.1.tgz", + "integrity": "sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q==", + "dev": true + }, + "node_modules/@types/cors": { + "version": "2.8.13", + "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.13.tgz", + "integrity": "sha512-RG8AStHlUiV5ysZQKq97copd2UmVYw3/pRMLefISZ3S1hK104Cwm7iLQ3fTKx+lsUH2CE8FlLaYeEA2LSeqYUA==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/eslint": { + "version": "8.4.10", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.4.10.tgz", + "integrity": "sha512-Sl/HOqN8NKPmhWo2VBEPm0nvHnu2LL3v9vKo8MEq0EtbJ4eVzGPl41VNPvn5E1i5poMk4/XD8UriLHpJvEP/Nw==", + "dev": true, + "dependencies": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "node_modules/@types/eslint-scope": { + "version": "3.7.4", + "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.4.tgz", + "integrity": "sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==", + "dev": true, + "dependencies": { + "@types/eslint": "*", + "@types/estree": "*" + } + }, + "node_modules/@types/estree": { + "version": "0.0.51", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.51.tgz", + "integrity": "sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==", + "dev": true + }, + "node_modules/@types/express": { + "version": "4.17.14", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.14.tgz", + "integrity": "sha512-TEbt+vaPFQ+xpxFLFssxUDXj5cWCxZJjIcB7Yg0k0GMHGtgtQgpvx/MUQUeAkNbA9AAGrwkAsoeItdTgS7FMyg==", + "dev": true, + "dependencies": { + "@types/body-parser": "*", + "@types/express-serve-static-core": "^4.17.18", + "@types/qs": "*", + "@types/serve-static": "*" + } + }, + "node_modules/@types/express-serve-static-core": { + "version": "4.17.31", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.31.tgz", + "integrity": "sha512-DxMhY+NAsTwMMFHBTtJFNp5qiHKJ7TeqOo23zVEM9alT1Ml27Q3xcTH0xwxn7Q0BbMcVEJOs/7aQtUWupUQN3Q==", + "dev": true, + "dependencies": { + "@types/node": "*", + "@types/qs": "*", + "@types/range-parser": "*" + } + }, + "node_modules/@types/http-proxy": { + "version": "1.17.9", + "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.9.tgz", + "integrity": "sha512-QsbSjA/fSk7xB+UXlCT3wHBy5ai9wOcNDWwZAtud+jXhwOM3l+EYZh8Lng4+/6n8uar0J7xILzqftJdJ/Wdfkw==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/jasmine": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@types/jasmine/-/jasmine-4.3.1.tgz", + "integrity": "sha512-Vu8l+UGcshYmV1VWwULgnV/2RDbBaO6i2Ptx7nd//oJPIZGhoI1YLST4VKagD2Pq/Bc2/7zvtvhM7F3p4SN7kQ==", + "dev": true + }, + "node_modules/@types/jasminewd2": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/jasminewd2/-/jasminewd2-2.0.10.tgz", + "integrity": "sha512-J7mDz7ovjwjc+Y9rR9rY53hFWKATcIkrr9DwQWmOas4/pnIPJTXawnzjwpHm3RSxz/e3ZVUvQ7cRbd5UQLo10g==", + "dev": true, + "dependencies": { + "@types/jasmine": "*" + } + }, + "node_modules/@types/json-schema": { + "version": "7.0.11", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", + "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", + "dev": true + }, + "node_modules/@types/mime": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@types/mime/-/mime-3.0.1.tgz", + "integrity": "sha512-Y4XFY5VJAuw0FgAqPNd6NNoV44jbq9Bz2L7Rh/J6jLTiHBSBJa9fxqQIvkIld4GsoDOcCbvzOUAbLPsSKKg+uA==", + "dev": true + }, + "node_modules/@types/node": { + "version": "12.20.55", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", + "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==", + "dev": true + }, + "node_modules/@types/parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", + "dev": true + }, + "node_modules/@types/qs": { + "version": "6.9.7", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz", + "integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==", + "dev": true + }, + "node_modules/@types/range-parser": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.4.tgz", + "integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==", + "dev": true + }, + "node_modules/@types/retry": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.0.tgz", + "integrity": "sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==", + "dev": true + }, + "node_modules/@types/serve-index": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/@types/serve-index/-/serve-index-1.9.1.tgz", + "integrity": "sha512-d/Hs3nWDxNL2xAczmOVZNj92YZCS6RGxfBPjKzuu/XirCgXdpKEb88dYNbrYGint6IVWLNP+yonwVAuRC0T2Dg==", + "dev": true, + "dependencies": { + "@types/express": "*" + } + }, + "node_modules/@types/serve-static": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.0.tgz", + "integrity": "sha512-z5xyF6uh8CbjAu9760KDKsH2FcDxZ2tFCsA4HIMWE6IkiYMXfVoa+4f9KX+FN0ZLsaMw1WNG2ETLA6N+/YA+cg==", + "dev": true, + "dependencies": { + "@types/mime": "*", + "@types/node": "*" + } + }, + "node_modules/@types/sockjs": { + "version": "0.3.33", + "resolved": "https://registry.npmjs.org/@types/sockjs/-/sockjs-0.3.33.tgz", + "integrity": "sha512-f0KEEe05NvUnat+boPTZ0dgaLZ4SfSouXUgv5noUiefG2ajgKjmETo9ZJyuqsl7dfl2aHlLJUiki6B4ZYldiiw==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/ws": { + "version": "8.5.3", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.3.tgz", + "integrity": "sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@webassemblyjs/ast": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", + "integrity": "sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw==", + "dev": true, + "dependencies": { + "@webassemblyjs/helper-numbers": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1" + } + }, + "node_modules/@webassemblyjs/floating-point-hex-parser": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz", + "integrity": "sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ==", + "dev": true + }, + "node_modules/@webassemblyjs/helper-api-error": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz", + "integrity": "sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg==", + "dev": true + }, + "node_modules/@webassemblyjs/helper-buffer": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz", + "integrity": "sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA==", + "dev": true + }, + "node_modules/@webassemblyjs/helper-numbers": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz", + "integrity": "sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ==", + "dev": true, + "dependencies": { + "@webassemblyjs/floating-point-hex-parser": "1.11.1", + "@webassemblyjs/helper-api-error": "1.11.1", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/helper-wasm-bytecode": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz", + "integrity": "sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q==", + "dev": true + }, + "node_modules/@webassemblyjs/helper-wasm-section": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz", + "integrity": "sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-buffer": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/wasm-gen": "1.11.1" + } + }, + "node_modules/@webassemblyjs/ieee754": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz", + "integrity": "sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ==", + "dev": true, + "dependencies": { + "@xtuc/ieee754": "^1.2.0" + } + }, + "node_modules/@webassemblyjs/leb128": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.1.tgz", + "integrity": "sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw==", + "dev": true, + "dependencies": { + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/utf8": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.1.tgz", + "integrity": "sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ==", + "dev": true + }, + "node_modules/@webassemblyjs/wasm-edit": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz", + "integrity": "sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-buffer": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/helper-wasm-section": "1.11.1", + "@webassemblyjs/wasm-gen": "1.11.1", + "@webassemblyjs/wasm-opt": "1.11.1", + "@webassemblyjs/wasm-parser": "1.11.1", + "@webassemblyjs/wast-printer": "1.11.1" + } + }, + "node_modules/@webassemblyjs/wasm-gen": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz", + "integrity": "sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/ieee754": "1.11.1", + "@webassemblyjs/leb128": "1.11.1", + "@webassemblyjs/utf8": "1.11.1" + } + }, + "node_modules/@webassemblyjs/wasm-opt": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz", + "integrity": "sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-buffer": "1.11.1", + "@webassemblyjs/wasm-gen": "1.11.1", + "@webassemblyjs/wasm-parser": "1.11.1" + } + }, + "node_modules/@webassemblyjs/wasm-parser": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz", + "integrity": "sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-api-error": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/ieee754": "1.11.1", + "@webassemblyjs/leb128": "1.11.1", + "@webassemblyjs/utf8": "1.11.1" + } + }, + "node_modules/@webassemblyjs/wast-printer": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz", + "integrity": "sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.11.1", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@xtuc/ieee754": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", + "dev": true + }, + "node_modules/@xtuc/long": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", + "dev": true + }, + "node_modules/@yarnpkg/lockfile": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz", + "integrity": "sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==", + "dev": true + }, + "node_modules/abab": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", + "integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==", + "dev": true + }, + "node_modules/abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "dev": true, + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/acorn": { + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.1.tgz", + "integrity": "sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-import-assertions": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz", + "integrity": "sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==", + "dev": true, + "peerDependencies": { + "acorn": "^8" + } + }, + "node_modules/acorn-walk": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", + "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/adjust-sourcemap-loader": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/adjust-sourcemap-loader/-/adjust-sourcemap-loader-4.0.0.tgz", + "integrity": "sha512-OXwN5b9pCUXNQHJpwwD2qP40byEmSgzj8B4ydSN0uMNYWiFmJ6x6KwUllMmfk8Rwu/HJDFR7U8ubsWBoN0Xp0A==", + "dev": true, + "dependencies": { + "loader-utils": "^2.0.0", + "regex-parser": "^2.2.11" + }, + "engines": { + "node": ">=8.9" + } + }, + "node_modules/adjust-sourcemap-loader/node_modules/loader-utils": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", + "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", + "dev": true, + "dependencies": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + }, + "engines": { + "node": ">=8.9.0" + } + }, + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dev": true, + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/agentkeepalive": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.2.1.tgz", + "integrity": "sha512-Zn4cw2NEqd+9fiSVWMscnjyQ1a8Yfoc5oBajLeo5w+YBHgDUcEBY2hS4YpTz6iN5f/2zQiktcuM6tS8x1p9dpA==", + "dev": true, + "dependencies": { + "debug": "^4.1.0", + "depd": "^1.1.2", + "humanize-ms": "^1.2.1" + }, + "engines": { + "node": ">= 8.0.0" + } + }, + "node_modules/agentkeepalive/node_modules/depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/aggregate-error": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", + "dev": true, + "dependencies": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ajv": { + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", + "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ajv-formats": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", + "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", + "dev": true, + "dependencies": { + "ajv": "^8.0.0" + }, + "peerDependencies": { + "ajv": "^8.0.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, + "node_modules/ajv-keywords": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", + "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.3" + }, + "peerDependencies": { + "ajv": "^8.8.2" + } + }, + "node_modules/ansi-colors": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-html-community": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/ansi-html-community/-/ansi-html-community-0.0.8.tgz", + "integrity": "sha512-1APHAyr3+PCamwNw3bXCPp4HFLONZt/yIH0sZp0/469KWNTEy+qN5jQ3GVX6DMZ1UXAi34yVwtTeaG/HpBuuzw==", + "dev": true, + "engines": [ + "node >= 0.8.0" + ], + "bin": { + "ansi-html": "bin/ansi-html" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/app-root-path": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/app-root-path/-/app-root-path-3.1.0.tgz", + "integrity": "sha512-biN3PwB2gUtjaYy/isrU3aNWI5w+fAfvHkSvCKeQGxhmYpwKFUxudR3Yya+KqVRHBmEDYh+/lTozYCFbmzX4nA==", + "dev": true, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/aproba": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", + "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==", + "dev": true + }, + "node_modules/are-we-there-yet": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-3.0.1.tgz", + "integrity": "sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg==", + "dev": true, + "dependencies": { + "delegates": "^1.0.0", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true + }, + "node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/argparse/node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true + }, + "node_modules/aria-query": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-3.0.0.tgz", + "integrity": "sha512-majUxHgLehQTeSA+hClx+DY09OVUqG3GtezWkF1krgLGNdlDu9l9V8DaqNMWbq4Eddc8wsyDA0hpDUtnYxQEXw==", + "dev": true, + "dependencies": { + "ast-types-flow": "0.0.7", + "commander": "^2.11.0" + } + }, + "node_modules/array-flatten": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.2.tgz", + "integrity": "sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ==", + "dev": true + }, + "node_modules/ast-types-flow": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.7.tgz", + "integrity": "sha512-eBvWn1lvIApYMhzQMsu9ciLfkBY499mFZlNqG+/9WR7PVlroQw0vG30cOQQbaKz3sCEc44TAOu2ykzqXSNnwag==", + "dev": true + }, + "node_modules/autoprefixer": { + "version": "10.4.13", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.13.tgz", + "integrity": "sha512-49vKpMqcZYsJjwotvt4+h/BCjJVnhGwcLpDt5xkcaOG3eLrG/HUYLagrihYsQ+qrIBgIzX1Rw7a6L8I/ZA1Atg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/autoprefixer" + } + ], + "dependencies": { + "browserslist": "^4.21.4", + "caniuse-lite": "^1.0.30001426", + "fraction.js": "^4.2.0", + "normalize-range": "^0.1.2", + "picocolors": "^1.0.0", + "postcss-value-parser": "^4.2.0" + }, + "bin": { + "autoprefixer": "bin/autoprefixer" + }, + "engines": { + "node": "^10 || ^12 || >=14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/axobject-query": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-2.0.2.tgz", + "integrity": "sha512-MCeek8ZH7hKyO1rWUbKNQBbl4l2eY0ntk7OGi+q0RlafrCnfPxC06WZA+uebCfmYp4mNU9jRBP1AhGyf8+W3ww==", + "dev": true, + "dependencies": { + "ast-types-flow": "0.0.7" + } + }, + "node_modules/babel-loader": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-9.1.0.tgz", + "integrity": "sha512-Antt61KJPinUMwHwIIz9T5zfMgevnfZkEVWYDWlG888fgdvRRGD0JTuf/fFozQnfT+uq64sk1bmdHDy/mOEWnA==", + "dev": true, + "dependencies": { + "find-cache-dir": "^3.3.2", + "schema-utils": "^4.0.0" + }, + "engines": { + "node": ">= 14.15.0" + }, + "peerDependencies": { + "@babel/core": "^7.12.0", + "webpack": ">=5" + } + }, + "node_modules/babel-plugin-istanbul": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", + "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.0.0", + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-instrument": "^5.0.4", + "test-exclude": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/babel-plugin-polyfill-corejs2": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.3.tgz", + "integrity": "sha512-8hOdmFYFSZhqg2C/JgLUQ+t52o5nirNwaWM2B9LWteozwIvM14VSwdsCAUET10qT+kmySAlseadmfeeSWFCy+Q==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.17.7", + "@babel/helper-define-polyfill-provider": "^0.3.3", + "semver": "^6.1.1" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/babel-plugin-polyfill-corejs2/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/babel-plugin-polyfill-corejs3": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.6.0.tgz", + "integrity": "sha512-+eHqR6OPcBhJOGgsIar7xoAB1GcSwVUA3XjAd7HJNzOXT4wv6/H7KIdA/Nc60cvUlDbKApmqNvD1B1bzOt4nyA==", + "dev": true, + "dependencies": { + "@babel/helper-define-polyfill-provider": "^0.3.3", + "core-js-compat": "^3.25.1" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/babel-plugin-polyfill-regenerator": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.4.1.tgz", + "integrity": "sha512-NtQGmyQDXjQqQ+IzRkBVwEOz9lQ4zxAQZgoAYEtU9dJjnl1Oc98qnN7jcp+bE7O7aYzVpavXE3/VKXNzUbh7aw==", + "dev": true, + "dependencies": { + "@babel/helper-define-polyfill-provider": "^0.3.3" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/base64id": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/base64id/-/base64id-2.0.0.tgz", + "integrity": "sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog==", + "dev": true, + "engines": { + "node": "^4.5.0 || >= 5.9" + } + }, + "node_modules/batch": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", + "integrity": "sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw==", + "dev": true + }, + "node_modules/big.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dev": true, + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/body-parser": { + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", + "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", + "dev": true, + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.11.0", + "raw-body": "2.5.1", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/body-parser/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/body-parser/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + }, + "node_modules/bonjour-service": { + "version": "1.0.14", + "resolved": "https://registry.npmjs.org/bonjour-service/-/bonjour-service-1.0.14.tgz", + "integrity": "sha512-HIMbgLnk1Vqvs6B4Wq5ep7mxvj9sGz5d1JJyDNSGNIdA/w2MCz6GTjWTdjqOJV1bEPj+6IkxDvWNFKEBxNt4kQ==", + "dev": true, + "dependencies": { + "array-flatten": "^2.1.2", + "dns-equal": "^1.0.0", + "fast-deep-equal": "^3.1.3", + "multicast-dns": "^7.2.5" + } + }, + "node_modules/boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", + "dev": true + }, + "node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browserslist": { + "version": "4.21.4", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.4.tgz", + "integrity": "sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + } + ], + "dependencies": { + "caniuse-lite": "^1.0.30001400", + "electron-to-chromium": "^1.4.251", + "node-releases": "^2.0.6", + "update-browserslist-db": "^1.0.9" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true + }, + "node_modules/builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha512-wxXCdllwGhI2kCC0MnvTGYTMvnVZTvqgypkiTI8Pa5tcz2i6VqsqwYGgqwXji+4RgCzms6EajE4IxiUH6HH8nQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/builtins": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/builtins/-/builtins-5.0.1.tgz", + "integrity": "sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==", + "dev": true, + "dependencies": { + "semver": "^7.0.0" + } + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/cacache": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-17.0.2.tgz", + "integrity": "sha512-rYUs2x4OjSgCQND7nTrh21AHIBFgd7s/ctAYvU3a8u+nK+R5YaX/SFPDYz4Azz7SGL6+6L9ZZWI4Kawpb7grzQ==", + "dev": true, + "dependencies": { + "@npmcli/fs": "^3.1.0", + "fs-minipass": "^2.1.0", + "glob": "^8.0.1", + "lru-cache": "^7.7.1", + "minipass": "^3.1.6", + "minipass-collect": "^1.0.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "p-map": "^4.0.0", + "promise-inflight": "^1.0.1", + "ssri": "^10.0.0", + "tar": "^6.1.11", + "unique-filename": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001439", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001439.tgz", + "integrity": "sha512-1MgUzEkoMO6gKfXflStpYgZDlFM7M/ck/bgfVCACO5vnAf0fXoNVHdWtqGU+MYca+4bL9Z5bpOVmR33cWW9G2A==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + } + ] + }, + "node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true + }, + "node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/chownr": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/chrome-trace-event": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", + "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", + "dev": true, + "engines": { + "node": ">=6.0" + } + }, + "node_modules/clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dev": true, + "dependencies": { + "restore-cursor": "^3.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cli-spinners": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.7.0.tgz", + "integrity": "sha512-qu3pN8Y3qHNgE2AFweciB1IfMnmZ/fsNTEE+NOFjmGB2F/7rLhnhzppvpCnN4FovtP26k8lHyy9ptEbNwWFLzw==", + "dev": true, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-width": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", + "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==", + "dev": true, + "engines": { + "node": ">= 10" + } + }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", + "dev": true, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/clone-deep": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", + "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", + "dev": true, + "dependencies": { + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.2", + "shallow-clone": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/codelyzer": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/codelyzer/-/codelyzer-6.0.2.tgz", + "integrity": "sha512-v3+E0Ucu2xWJMOJ2fA/q9pDT/hlxHftHGPUay1/1cTgyPV5JTHFdO9hqo837Sx2s9vKBMTt5gO+lhF95PO6J+g==", + "dev": true, + "dependencies": { + "@angular/compiler": "9.0.0", + "@angular/core": "9.0.0", + "app-root-path": "^3.0.0", + "aria-query": "^3.0.0", + "axobject-query": "2.0.2", + "css-selector-tokenizer": "^0.7.1", + "cssauron": "^1.4.0", + "damerau-levenshtein": "^1.0.4", + "rxjs": "^6.5.3", + "semver-dsl": "^1.0.1", + "source-map": "^0.5.7", + "sprintf-js": "^1.1.2", + "tslib": "^1.10.0", + "zone.js": "~0.10.3" + }, + "peerDependencies": { + "@angular/compiler": ">=2.3.1 <13.0.0 || ^12.0.0-next || ^12.1.0-next || ^12.2.0-next", + "@angular/core": ">=2.3.1 <13.0.0 || ^12.0.0-next || ^12.1.0-next || ^12.2.0-next", + "tslint": "^5.0.0 || ^6.0.0" + } + }, + "node_modules/codelyzer/node_modules/@angular/compiler": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-9.0.0.tgz", + "integrity": "sha512-ctjwuntPfZZT2mNj2NDIVu51t9cvbhl/16epc5xEwyzyDt76pX9UgwvY+MbXrf/C/FWwdtmNtfP698BKI+9leQ==", + "dev": true, + "peerDependencies": { + "tslib": "^1.10.0" + } + }, + "node_modules/codelyzer/node_modules/@angular/core": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/@angular/core/-/core-9.0.0.tgz", + "integrity": "sha512-6Pxgsrf0qF9iFFqmIcWmjJGkkCaCm6V5QNnxMy2KloO3SDq6QuMVRbN9RtC8Urmo25LP+eZ6ZgYqFYpdD8Hd9w==", + "dev": true, + "peerDependencies": { + "rxjs": "^6.5.3", + "tslib": "^1.10.0", + "zone.js": "~0.10.2" + } + }, + "node_modules/codelyzer/node_modules/rxjs": { + "version": "6.6.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", + "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "dev": true, + "dependencies": { + "tslib": "^1.9.0" + }, + "engines": { + "npm": ">=2.0.0" + } + }, + "node_modules/codelyzer/node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/codelyzer/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "node_modules/codelyzer/node_modules/zone.js": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.10.3.tgz", + "integrity": "sha512-LXVLVEq0NNOqK/fLJo3d0kfzd4sxwn2/h67/02pjCjfKDxgx1i9QqpvtHD8CrBnSSwMw5+dy11O7FRX5mkO7Cg==", + "dev": true + }, + "node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "node_modules/color-support": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", + "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", + "dev": true, + "bin": { + "color-support": "bin.js" + } + }, + "node_modules/colorette": { + "version": "2.0.19", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.19.tgz", + "integrity": "sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==", + "dev": true + }, + "node_modules/colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", + "dev": true, + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, + "node_modules/commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", + "dev": true + }, + "node_modules/compressible": { + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", + "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==", + "dev": true, + "dependencies": { + "mime-db": ">= 1.43.0 < 2" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/compression": { + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz", + "integrity": "sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==", + "dev": true, + "dependencies": { + "accepts": "~1.3.5", + "bytes": "3.0.0", + "compressible": "~2.0.16", + "debug": "2.6.9", + "on-headers": "~1.0.2", + "safe-buffer": "5.1.2", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/compression/node_modules/bytes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/compression/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/compression/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + }, + "node_modules/compression/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/connect": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz", + "integrity": "sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==", + "dev": true, + "dependencies": { + "debug": "2.6.9", + "finalhandler": "1.1.2", + "parseurl": "~1.3.3", + "utils-merge": "1.0.1" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/connect-history-api-fallback": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-2.0.0.tgz", + "integrity": "sha512-U73+6lQFmfiNPrYbXqr6kZ1i1wiRqXnp2nhMsINseWXO8lDau0LGEffJ8kQi4EjLZympVgRdvqjAgiZ1tgzDDA==", + "dev": true, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/connect/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/connect/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + }, + "node_modules/console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==", + "dev": true + }, + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "dev": true, + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/convert-source-map": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", + "dev": true + }, + "node_modules/cookie": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", + "integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", + "dev": true + }, + "node_modules/copy-anything": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/copy-anything/-/copy-anything-2.0.6.tgz", + "integrity": "sha512-1j20GZTsvKNkc4BY3NpMOM8tt///wY3FpIzozTOFO2ffuZcV61nojHXVKIy3WM+7ADCy5FVhdZYHYDdgTU0yJw==", + "dev": true, + "dependencies": { + "is-what": "^3.14.1" + }, + "funding": { + "url": "https://github.com/sponsors/mesqueeb" + } + }, + "node_modules/copy-webpack-plugin": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-11.0.0.tgz", + "integrity": "sha512-fX2MWpamkW0hZxMEg0+mYnA40LTosOSa5TqZ9GYIBzyJa9C3QUaMPSE2xAi/buNr8u89SfD9wHSQVBzrRa/SOQ==", + "dev": true, + "dependencies": { + "fast-glob": "^3.2.11", + "glob-parent": "^6.0.1", + "globby": "^13.1.1", + "normalize-path": "^3.0.0", + "schema-utils": "^4.0.0", + "serialize-javascript": "^6.0.0" + }, + "engines": { + "node": ">= 14.15.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.1.0" + } + }, + "node_modules/copy-webpack-plugin/node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/core-js": { + "version": "2.6.12", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz", + "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==", + "deprecated": "core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.", + "hasInstallScript": true + }, + "node_modules/core-js-compat": { + "version": "3.26.1", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.26.1.tgz", + "integrity": "sha512-622/KzTudvXCDLRw70iHW4KKs1aGpcRcowGWyYJr2DEBfRrd6hNJybxSWJFuZYD4ma86xhrwDDHxmDaIq4EA8A==", + "dev": true, + "dependencies": { + "browserslist": "^4.21.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" + } + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "dev": true + }, + "node_modules/cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "dev": true, + "dependencies": { + "object-assign": "^4", + "vary": "^1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/cosmiconfig": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.1.0.tgz", + "integrity": "sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==", + "dev": true, + "dependencies": { + "@types/parse-json": "^4.0.0", + "import-fresh": "^3.2.1", + "parse-json": "^5.0.0", + "path-type": "^4.0.0", + "yaml": "^1.10.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true + }, + "node_modules/critters": { + "version": "0.0.16", + "resolved": "https://registry.npmjs.org/critters/-/critters-0.0.16.tgz", + "integrity": "sha512-JwjgmO6i3y6RWtLYmXwO5jMd+maZt8Tnfu7VVISmEWyQqfLpB8soBswf8/2bu6SBXxtKA68Al3c+qIG1ApT68A==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "css-select": "^4.2.0", + "parse5": "^6.0.1", + "parse5-htmlparser2-tree-adapter": "^6.0.1", + "postcss": "^8.3.7", + "pretty-bytes": "^5.3.0" + } + }, + "node_modules/critters/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/critters/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/critters/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/critters/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/critters/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/critters/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/cross-spawn/node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/css-loader": { + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-6.7.1.tgz", + "integrity": "sha512-yB5CNFa14MbPJcomwNh3wLThtkZgcNyI2bNMRt8iE5Z8Vwl7f8vQXFAzn2HDOJvtDq2NTZBUGMSUNNyrv3/+cw==", + "dev": true, + "dependencies": { + "icss-utils": "^5.1.0", + "postcss": "^8.4.7", + "postcss-modules-extract-imports": "^3.0.0", + "postcss-modules-local-by-default": "^4.0.0", + "postcss-modules-scope": "^3.0.0", + "postcss-modules-values": "^4.0.0", + "postcss-value-parser": "^4.2.0", + "semver": "^7.3.5" + }, + "engines": { + "node": ">= 12.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.0.0" + } + }, + "node_modules/css-select": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.3.0.tgz", + "integrity": "sha512-wPpOYtnsVontu2mODhA19JrqWxNsfdatRKd64kmpRbQgh1KtItko5sTnEpPdpSaJszTOhEMlF/RPz28qj4HqhQ==", + "dev": true, + "dependencies": { + "boolbase": "^1.0.0", + "css-what": "^6.0.1", + "domhandler": "^4.3.1", + "domutils": "^2.8.0", + "nth-check": "^2.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/css-selector-tokenizer": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/css-selector-tokenizer/-/css-selector-tokenizer-0.7.3.tgz", + "integrity": "sha512-jWQv3oCEL5kMErj4wRnK/OPoBi0D+P1FR2cDCKYPaMeD2eW3/mttav8HT4hT1CKopiJI/psEULjkClhvJo4Lvg==", + "dev": true, + "dependencies": { + "cssesc": "^3.0.0", + "fastparse": "^1.1.2" + } + }, + "node_modules/css-what": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz", + "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==", + "dev": true, + "engines": { + "node": ">= 6" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/cssauron": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/cssauron/-/cssauron-1.4.0.tgz", + "integrity": "sha512-Ht70DcFBh+/ekjVrYS2PlDMdSQEl3OFNmjK6lcn49HptBgilXf/Zwg4uFh9Xn0pX3Q8YOkSjIFOfK2osvdqpBw==", + "dev": true, + "dependencies": { + "through": "X.X.X" + } + }, + "node_modules/cssesc": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", + "dev": true, + "bin": { + "cssesc": "bin/cssesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/custom-event": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/custom-event/-/custom-event-1.0.1.tgz", + "integrity": "sha512-GAj5FOq0Hd+RsCGVJxZuKaIDXDf3h6GQoNEjFgbLLI/trgtavwUbSnZ5pVfg27DVCaWjIohryS0JFwIJyT2cMg==", + "dev": true + }, + "node_modules/damerau-levenshtein": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz", + "integrity": "sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==", + "dev": true + }, + "node_modules/date-format": { + "version": "4.0.14", + "resolved": "https://registry.npmjs.org/date-format/-/date-format-4.0.14.tgz", + "integrity": "sha512-39BOQLs9ZjKh0/patS9nrT8wc3ioX3/eA/zgbKNopnF2wCqJEoxywwwElATYvRsXdnOxA/OQeQoFZ3rFjVajhg==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/default-gateway": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-6.0.3.tgz", + "integrity": "sha512-fwSOJsbbNzZ/CUFpqFBqYfYNLj1NbMPm8MMCIzHjC83iSJRBEGmDUxU+WP661BaBQImeC2yHwXtz+P/O9o+XEg==", + "dev": true, + "dependencies": { + "execa": "^5.0.0" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/defaults": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", + "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", + "dev": true, + "dependencies": { + "clone": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/define-lazy-prop": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", + "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==", + "dev": true + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/dependency-graph": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/dependency-graph/-/dependency-graph-0.11.0.tgz", + "integrity": "sha512-JeMq7fEshyepOWDfcfHK06N3MhyPhz++vtqWhMT5O9A3K42rdsEDpfdVqjaqaAhsw6a+ZqeDvQVtD0hFHQWrzg==", + "dev": true, + "engines": { + "node": ">= 0.6.0" + } + }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "dev": true, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/detect-node": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.1.0.tgz", + "integrity": "sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==", + "dev": true + }, + "node_modules/di": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/di/-/di-0.0.1.tgz", + "integrity": "sha512-uJaamHkagcZtHPqCIHZxnFrXlunQXgBOsZSUOWwFw31QJCAbyTBoHMW75YOTur5ZNx8pIeAKgf6GWIgaqqiLhA==", + "dev": true + }, + "node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/dns-equal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz", + "integrity": "sha512-z+paD6YUQsk+AbGCEM4PrOXSss5gd66QfcVBFTKR/HpFL9jCqikS94HYwKww6fQyO7IxrIIyUu+g0Ka9tUS2Cg==", + "dev": true + }, + "node_modules/dns-packet": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-5.4.0.tgz", + "integrity": "sha512-EgqGeaBB8hLiHLZtp/IbaDQTL8pZ0+IvwzSHA6d7VyMDM+B9hgddEMa9xjK5oYnw0ci0JQ6g2XCD7/f6cafU6g==", + "dev": true, + "dependencies": { + "@leichtgewicht/ip-codec": "^2.0.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/dom-serialize": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/dom-serialize/-/dom-serialize-2.2.1.tgz", + "integrity": "sha512-Yra4DbvoW7/Z6LBN560ZwXMjoNOSAN2wRsKFGc4iBeso+mpIA6qj1vfdf9HpMaKAqG6wXTy+1SYEzmNpKXOSsQ==", + "dev": true, + "dependencies": { + "custom-event": "~1.0.0", + "ent": "~2.2.0", + "extend": "^3.0.0", + "void-elements": "^2.0.0" + } + }, + "node_modules/dom-serializer": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.4.1.tgz", + "integrity": "sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag==", + "dev": true, + "dependencies": { + "domelementtype": "^2.0.1", + "domhandler": "^4.2.0", + "entities": "^2.0.0" + }, + "funding": { + "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" + } + }, + "node_modules/domelementtype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ] + }, + "node_modules/domhandler": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.3.1.tgz", + "integrity": "sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ==", + "dev": true, + "dependencies": { + "domelementtype": "^2.2.0" + }, + "engines": { + "node": ">= 4" + }, + "funding": { + "url": "https://github.com/fb55/domhandler?sponsor=1" + } + }, + "node_modules/domutils": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz", + "integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==", + "dev": true, + "dependencies": { + "dom-serializer": "^1.0.1", + "domelementtype": "^2.2.0", + "domhandler": "^4.2.0" + }, + "funding": { + "url": "https://github.com/fb55/domutils?sponsor=1" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", + "dev": true + }, + "node_modules/electron-to-chromium": { + "version": "1.4.284", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.284.tgz", + "integrity": "sha512-M8WEXFuKXMYMVr45fo8mq0wUrrJHheiKZf6BArTKk9ZBYCKJEOU5H8cdWgDT+qCVZf7Na4lVUaZsA+h6uA9+PA==", + "dev": true + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/emojis-list": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", + "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/encoding": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", + "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", + "dev": true, + "optional": true, + "dependencies": { + "iconv-lite": "^0.6.2" + } + }, + "node_modules/encoding/node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "optional": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/engine.io": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.2.1.tgz", + "integrity": "sha512-ECceEFcAaNRybd3lsGQKas3ZlMVjN3cyWwMP25D2i0zWfyiytVbTpRPa34qrr+FHddtpBVOmq4H/DCv1O0lZRA==", + "dev": true, + "dependencies": { + "@types/cookie": "^0.4.1", + "@types/cors": "^2.8.12", + "@types/node": ">=10.0.0", + "accepts": "~1.3.4", + "base64id": "2.0.0", + "cookie": "~0.4.1", + "cors": "~2.8.5", + "debug": "~4.3.1", + "engine.io-parser": "~5.0.3", + "ws": "~8.2.3" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/engine.io-parser": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.0.4.tgz", + "integrity": "sha512-+nVFp+5z1E3HcToEnO7ZIj3g+3k9389DvWtvJZz0T6/eOCPIyyxehFcedoYrZQrp0LgQbD9pPXhpMBKMd5QURg==", + "dev": true, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/enhanced-resolve": { + "version": "5.12.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.12.0.tgz", + "integrity": "sha512-QHTXI/sZQmko1cbDoNAa3mJ5qhWUUNAq3vR0/YiD379fWQrcfuoX1+HW2S0MTt7XmoPLapdaDKUtelUSPic7hQ==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/ent": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/ent/-/ent-2.2.0.tgz", + "integrity": "sha512-GHrMyVZQWvTIdDtpiEXdHZnFQKzeO09apj8Cbl4pKWy4i0Oprcq17usfDt5aO63swf0JOeMWjWQE/LzgSRuWpA==", + "dev": true + }, + "node_modules/entities": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", + "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", + "dev": true, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/env-paths": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", + "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/err-code": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz", + "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==", + "dev": true + }, + "node_modules/errno": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz", + "integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==", + "dev": true, + "optional": true, + "dependencies": { + "prr": "~1.0.1" + }, + "bin": { + "errno": "cli.js" + } + }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/es-module-lexer": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.9.3.tgz", + "integrity": "sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==", + "dev": true + }, + "node_modules/esbuild": { + "version": "0.15.13", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.15.13.tgz", + "integrity": "sha512-Cu3SC84oyzzhrK/YyN4iEVy2jZu5t2fz66HEOShHURcjSkOSAVL8C/gfUT+lDJxkVHpg8GZ10DD0rMHRPqMFaQ==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/android-arm": "0.15.13", + "@esbuild/linux-loong64": "0.15.13", + "esbuild-android-64": "0.15.13", + "esbuild-android-arm64": "0.15.13", + "esbuild-darwin-64": "0.15.13", + "esbuild-darwin-arm64": "0.15.13", + "esbuild-freebsd-64": "0.15.13", + "esbuild-freebsd-arm64": "0.15.13", + "esbuild-linux-32": "0.15.13", + "esbuild-linux-64": "0.15.13", + "esbuild-linux-arm": "0.15.13", + "esbuild-linux-arm64": "0.15.13", + "esbuild-linux-mips64le": "0.15.13", + "esbuild-linux-ppc64le": "0.15.13", + "esbuild-linux-riscv64": "0.15.13", + "esbuild-linux-s390x": "0.15.13", + "esbuild-netbsd-64": "0.15.13", + "esbuild-openbsd-64": "0.15.13", + "esbuild-sunos-64": "0.15.13", + "esbuild-windows-32": "0.15.13", + "esbuild-windows-64": "0.15.13", + "esbuild-windows-arm64": "0.15.13" + } + }, + "node_modules/esbuild-android-64": { + "version": "0.15.13", + "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.15.13.tgz", + "integrity": "sha512-yRorukXBlokwTip+Sy4MYskLhJsO0Kn0/Fj43s1krVblfwP+hMD37a4Wmg139GEsMLl+vh8WXp2mq/cTA9J97g==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-android-arm64": { + "version": "0.15.13", + "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.15.13.tgz", + "integrity": "sha512-TKzyymLD6PiVeyYa4c5wdPw87BeAiTXNtK6amWUcXZxkV51gOk5u5qzmDaYSwiWeecSNHamFsaFjLoi32QR5/w==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-darwin-64": { + "version": "0.15.13", + "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.15.13.tgz", + "integrity": "sha512-WAx7c2DaOS6CrRcoYCgXgkXDliLnFv3pQLV6GeW1YcGEZq2Gnl8s9Pg7ahValZkpOa0iE/ojRVQ87sbUhF1Cbg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-darwin-arm64": { + "version": "0.15.13", + "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.15.13.tgz", + "integrity": "sha512-U6jFsPfSSxC3V1CLiQqwvDuj3GGrtQNB3P3nNC3+q99EKf94UGpsG9l4CQ83zBs1NHrk1rtCSYT0+KfK5LsD8A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-freebsd-64": { + "version": "0.15.13", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.15.13.tgz", + "integrity": "sha512-whItJgDiOXaDG/idy75qqevIpZjnReZkMGCgQaBWZuKHoElDJC1rh7MpoUgupMcdfOd+PgdEwNQW9DAE6i8wyA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-freebsd-arm64": { + "version": "0.15.13", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.15.13.tgz", + "integrity": "sha512-6pCSWt8mLUbPtygv7cufV0sZLeylaMwS5Fznj6Rsx9G2AJJsAjQ9ifA+0rQEIg7DwJmi9it+WjzNTEAzzdoM3Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-32": { + "version": "0.15.13", + "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.15.13.tgz", + "integrity": "sha512-VbZdWOEdrJiYApm2kkxoTOgsoCO1krBZ3quHdYk3g3ivWaMwNIVPIfEE0f0XQQ0u5pJtBsnk2/7OPiCFIPOe/w==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-64": { + "version": "0.15.13", + "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.15.13.tgz", + "integrity": "sha512-rXmnArVNio6yANSqDQlIO4WiP+Cv7+9EuAHNnag7rByAqFVuRusLbGi2697A5dFPNXoO//IiogVwi3AdcfPC6A==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-arm": { + "version": "0.15.13", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.15.13.tgz", + "integrity": "sha512-Ac6LpfmJO8WhCMQmO253xX2IU2B3wPDbl4IvR0hnqcPrdfCaUa2j/lLMGTjmQ4W5JsJIdHEdW12dG8lFS0MbxQ==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-arm64": { + "version": "0.15.13", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.15.13.tgz", + "integrity": "sha512-alEMGU4Z+d17U7KQQw2IV8tQycO6T+rOrgW8OS22Ua25x6kHxoG6Ngry6Aq6uranC+pNWNMB6aHFPh7aTQdORQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-mips64le": { + "version": "0.15.13", + "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.15.13.tgz", + "integrity": "sha512-47PgmyYEu+yN5rD/MbwS6DxP2FSGPo4Uxg5LwIdxTiyGC2XKwHhHyW7YYEDlSuXLQXEdTO7mYe8zQ74czP7W8A==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-ppc64le": { + "version": "0.15.13", + "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.15.13.tgz", + "integrity": "sha512-z6n28h2+PC1Ayle9DjKoBRcx/4cxHoOa2e689e2aDJSaKug3jXcQw7mM+GLg+9ydYoNzj8QxNL8ihOv/OnezhA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-riscv64": { + "version": "0.15.13", + "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.15.13.tgz", + "integrity": "sha512-+Lu4zuuXuQhgLUGyZloWCqTslcCAjMZH1k3Xc9MSEJEpEFdpsSU0sRDXAnk18FKOfEjhu4YMGaykx9xjtpA6ow==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-linux-s390x": { + "version": "0.15.13", + "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.15.13.tgz", + "integrity": "sha512-BMeXRljruf7J0TMxD5CIXS65y7puiZkAh+s4XFV9qy16SxOuMhxhVIXYLnbdfLrsYGFzx7U9mcdpFWkkvy/Uag==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-netbsd-64": { + "version": "0.15.13", + "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.15.13.tgz", + "integrity": "sha512-EHj9QZOTel581JPj7UO3xYbltFTYnHy+SIqJVq6yd3KkCrsHRbapiPb0Lx3EOOtybBEE9EyqbmfW1NlSDsSzvQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-openbsd-64": { + "version": "0.15.13", + "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.15.13.tgz", + "integrity": "sha512-nkuDlIjF/sfUhfx8SKq0+U+Fgx5K9JcPq1mUodnxI0x4kBdCv46rOGWbuJ6eof2n3wdoCLccOoJAbg9ba/bT2w==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-sunos-64": { + "version": "0.15.13", + "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.15.13.tgz", + "integrity": "sha512-jVeu2GfxZQ++6lRdY43CS0Tm/r4WuQQ0Pdsrxbw+aOrHQPHV0+LNOLnvbN28M7BSUGnJnHkHm2HozGgNGyeIRw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-wasm": { + "version": "0.15.13", + "resolved": "https://registry.npmjs.org/esbuild-wasm/-/esbuild-wasm-0.15.13.tgz", + "integrity": "sha512-0am8fvHKACwofWQxtZLTMv4mDiDwUrdt0DyRaQ2r7YWIpkmpg4GWYy0EyW+gPjiPHzkZKqN9d3UYsZGgvaAASw==", + "dev": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-windows-32": { + "version": "0.15.13", + "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.15.13.tgz", + "integrity": "sha512-XoF2iBf0wnqo16SDq+aDGi/+QbaLFpkiRarPVssMh9KYbFNCqPLlGAWwDvxEVz+ywX6Si37J2AKm+AXq1kC0JA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-windows-64": { + "version": "0.15.13", + "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.15.13.tgz", + "integrity": "sha512-Et6htEfGycjDrtqb2ng6nT+baesZPYQIW+HUEHK4D1ncggNrDNk3yoboYQ5KtiVrw/JaDMNttz8rrPubV/fvPQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild-windows-arm64": { + "version": "0.15.13", + "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.15.13.tgz", + "integrity": "sha512-3bv7tqntThQC9SWLRouMDmZnlOukBhOCTlkzNqzGCmrkCJI7io5LLjwJBOVY6kOUlIvdxbooNZwjtBvj+7uuVg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "dev": true + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esrecurse/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/eventemitter-asyncresource": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/eventemitter-asyncresource/-/eventemitter-asyncresource-1.0.0.tgz", + "integrity": "sha512-39F7TBIV0G7gTelxwbEqnwhp90eqCPON1k0NwNfwhgKn4Co4ybUbj2pECcXT0B3ztRKZ7Pw1JujUUgmQJHcVAQ==", + "dev": true + }, + "node_modules/eventemitter3": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", + "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", + "dev": true + }, + "node_modules/events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "dev": true, + "engines": { + "node": ">=0.8.x" + } + }, + "node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/express": { + "version": "4.18.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", + "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", + "dev": true, + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.1", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.5.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.2.0", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.7", + "qs": "6.11.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.18.0", + "serve-static": "1.15.0", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/express/node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", + "dev": true + }, + "node_modules/express/node_modules/cookie": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", + "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/express/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/express/node_modules/finalhandler": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", + "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", + "dev": true, + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/express/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + }, + "node_modules/express/node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, + "node_modules/external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dev": true, + "dependencies": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "node_modules/fast-glob": { + "version": "3.2.12", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", + "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "node_modules/fastparse": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/fastparse/-/fastparse-1.1.2.tgz", + "integrity": "sha512-483XLLxTVIwWK3QTrMGRqUfUpoOs/0hbQrl2oz4J0pAcm3A3bu84wxTFqGqkJzewCLdME38xJLJAxBABfQT8sQ==", + "dev": true + }, + "node_modules/fastq": { + "version": "1.14.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.14.0.tgz", + "integrity": "sha512-eR2D+V9/ExcbF9ls441yIuN6TI2ED1Y2ZcA5BmMtJsOkWOFRJQ0Jt0g1UwqXJJVAb+V+umH5Dfr8oh4EVP7VVg==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/faye-websocket": { + "version": "0.11.4", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.4.tgz", + "integrity": "sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g==", + "dev": true, + "dependencies": { + "websocket-driver": ">=0.5.1" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/figures": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "dev": true, + "dependencies": { + "escape-string-regexp": "^1.0.5" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/finalhandler": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", + "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "dev": true, + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "statuses": "~1.5.0", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/finalhandler/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/finalhandler/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + }, + "node_modules/finalhandler/node_modules/on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==", + "dev": true, + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/find-cache-dir": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", + "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", + "dev": true, + "dependencies": { + "commondir": "^1.0.1", + "make-dir": "^3.0.2", + "pkg-dir": "^4.1.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/avajs/find-cache-dir?sponsor=1" + } + }, + "node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/flatted": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", + "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", + "dev": true + }, + "node_modules/follow-redirects": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", + "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fraction.js": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.2.0.tgz", + "integrity": "sha512-MhLuK+2gUcnZe8ZHlaaINnQLl0xRIGRfcGk2yl8xoQAfHrSsL3rYu6FCmBdkdbhc9EPlwyGHewaRsvwRMJtAlA==", + "dev": true, + "engines": { + "node": "*" + }, + "funding": { + "type": "patreon", + "url": "https://www.patreon.com/infusion" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "dev": true, + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/fs-monkey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/fs-monkey/-/fs-monkey-1.0.3.tgz", + "integrity": "sha512-cybjIfiiE+pTWicSCLFHSrXZ6EilF30oh91FDP9S2B051prEa7QWfrVTQm10/dDpswBDXZugPa1Ogu8Yh+HV0Q==", + "dev": true + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "node_modules/gauge": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.4.tgz", + "integrity": "sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg==", + "dev": true, + "dependencies": { + "aproba": "^1.0.3 || ^2.0.0", + "color-support": "^1.1.3", + "console-control-strings": "^1.1.0", + "has-unicode": "^2.0.1", + "signal-exit": "^3.0.7", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wide-align": "^1.1.5" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-intrinsic": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz", + "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", + "dev": true, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/glob": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.0.3.tgz", + "integrity": "sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/glob-to-regexp": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", + "dev": true + }, + "node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/globby": { + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/globby/-/globby-13.1.2.tgz", + "integrity": "sha512-LKSDZXToac40u8Q1PQtZihbNdTYSNMuWe+K5l+oa6KgDzSvVrHXlJy40hUP522RjAIoNLJYBJi7ow+rbFpIhHQ==", + "dev": true, + "dependencies": { + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.11", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", + "dev": true + }, + "node_modules/handle-thing": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.1.tgz", + "integrity": "sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg==", + "dev": true + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==", + "dev": true + }, + "node_modules/hdr-histogram-js": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/hdr-histogram-js/-/hdr-histogram-js-2.0.3.tgz", + "integrity": "sha512-Hkn78wwzWHNCp2uarhzQ2SGFLU3JY8SBDDd3TAABK4fc30wm+MuPOrg5QVFVfkKOQd6Bfz3ukJEI+q9sXEkK1g==", + "dev": true, + "dependencies": { + "@assemblyscript/loader": "^0.10.1", + "base64-js": "^1.2.0", + "pako": "^1.0.3" + } + }, + "node_modules/hdr-histogram-percentiles-obj": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/hdr-histogram-percentiles-obj/-/hdr-histogram-percentiles-obj-3.0.0.tgz", + "integrity": "sha512-7kIufnBqdsBGcSZLPJwqHT3yhk1QTsSlFsVD3kx5ixH/AlgBs9yM1q6DPhXZ8f8gtdqgh7N7/5btRLpQsS2gHw==", + "dev": true + }, + "node_modules/hosted-git-info": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-5.2.1.tgz", + "integrity": "sha512-xIcQYMnhcx2Nr4JTjsFmwwnr9vldugPy9uVm0o87bjqqWMv9GaqsTeT+i99wTl0mk1uLxJtHxLb8kymqTENQsw==", + "dev": true, + "dependencies": { + "lru-cache": "^7.5.1" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/hpack.js": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz", + "integrity": "sha512-zJxVehUdMGIKsRaNt7apO2Gqp0BdqW5yaiGHXXmbpvxgBYVZnAql+BJb4RO5ad2MgpbZKn5G6nMnegrH1FcNYQ==", + "dev": true, + "dependencies": { + "inherits": "^2.0.1", + "obuf": "^1.0.0", + "readable-stream": "^2.0.1", + "wbuf": "^1.1.0" + } + }, + "node_modules/hpack.js/node_modules/readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/hpack.js/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/hpack.js/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/html-entities": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-2.3.3.tgz", + "integrity": "sha512-DV5Ln36z34NNTDgnz0EWGBLZENelNAtkiFA4kyNOG2tDI6Mz1uSWiq1wAKdyjnJwyDiDO7Fa2SO1CTxPXL8VxA==", + "dev": true + }, + "node_modules/html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true + }, + "node_modules/http-cache-semantics": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", + "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==", + "dev": true + }, + "node_modules/http-deceiver": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz", + "integrity": "sha512-LmpOGxTfbpgtGVxJrj5k7asXHCgNZp5nLfp+hWc8QQRqtb7fUy6kRY3BO1h9ddF6yIPYUARgxGOwB42DnxIaNw==", + "dev": true + }, + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "dev": true, + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/http-errors/node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/http-parser-js": { + "version": "0.5.8", + "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.8.tgz", + "integrity": "sha512-SGeBX54F94Wgu5RH3X5jsDtf4eHyRogWX1XGT3b4HuW3tQPM4AaBzoUji/4AAJNXCEOWZ5O0DgZmJw1947gD5Q==", + "dev": true + }, + "node_modules/http-proxy": { + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz", + "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==", + "dev": true, + "dependencies": { + "eventemitter3": "^4.0.0", + "follow-redirects": "^1.0.0", + "requires-port": "^1.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/http-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", + "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", + "dev": true, + "dependencies": { + "@tootallnate/once": "2", + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/http-proxy-middleware": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.6.tgz", + "integrity": "sha512-ya/UeJ6HVBYxrgYotAZo1KvPWlgB48kUJLDePFeneHsVujFaW5WNj2NgWCAE//B1Dl02BIfYlpNgBy8Kf8Rjmw==", + "dev": true, + "dependencies": { + "@types/http-proxy": "^1.17.8", + "http-proxy": "^1.18.1", + "is-glob": "^4.0.1", + "is-plain-obj": "^3.0.0", + "micromatch": "^4.0.2" + }, + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "@types/express": "^4.17.13" + }, + "peerDependenciesMeta": { + "@types/express": { + "optional": true + } + } + }, + "node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "dev": true, + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true, + "engines": { + "node": ">=10.17.0" + } + }, + "node_modules/humanize-ms": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", + "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==", + "dev": true, + "dependencies": { + "ms": "^2.0.0" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/icss-utils": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz", + "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==", + "dev": true, + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/ignore": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.1.tgz", + "integrity": "sha512-d2qQLzTJ9WxQftPAuEQpSPmKqzxePjzVbpAVv62AQ64NTL+wR4JkrVqR/LqFsFEUsHDAiId52mJteHDFuDkElA==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/ignore-walk": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-6.0.0.tgz", + "integrity": "sha512-bTf9UWe/UP1yxG3QUrj/KOvEhTAUWPcv+WvbFZ28LcqznXabp7Xu6o9y1JEC18+oqODuS7VhTpekV5XvFwsxJg==", + "dev": true, + "dependencies": { + "minimatch": "^5.0.1" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/image-size": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz", + "integrity": "sha512-6TDAlDPZxUFCv+fuOkIoXT/V/f3Qbq8e37p+YOiYrUv3v9cc3/6x78VdfPgFVaB9dZYeLUfKgHRebpkm/oP2VQ==", + "dev": true, + "optional": true, + "bin": { + "image-size": "bin/image-size.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/immutable": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.1.0.tgz", + "integrity": "sha512-oNkuqVTA8jqG1Q6c+UglTOD1xhC1BtjKI7XkCXRkZHrN5m18/XsnUp8Q89GkQO/z+0WjonSvl0FLhDYftp46nQ==", + "dev": true + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/import-fresh/node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/infer-owner": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", + "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==", + "dev": true + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/ini": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ini/-/ini-3.0.1.tgz", + "integrity": "sha512-it4HyVAUTKBc6m8e1iXWvXSTdndF7HbdN713+kvLrymxTaU4AUBWrJ4vEooP+V7fexnVD3LKcBshjGGPefSMUQ==", + "dev": true, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/inquirer": { + "version": "8.2.4", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.4.tgz", + "integrity": "sha512-nn4F01dxU8VeKfq192IjLsxu0/OmMZ4Lg3xKAns148rCaXP6ntAoEkVYZThWjwON8AlzdZZi6oqnhNbxUG9hVg==", + "dev": true, + "dependencies": { + "ansi-escapes": "^4.2.1", + "chalk": "^4.1.1", + "cli-cursor": "^3.1.0", + "cli-width": "^3.0.0", + "external-editor": "^3.0.3", + "figures": "^3.0.0", + "lodash": "^4.17.21", + "mute-stream": "0.0.8", + "ora": "^5.4.1", + "run-async": "^2.4.0", + "rxjs": "^7.5.5", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "through": "^2.3.6", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/inquirer/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/inquirer/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/inquirer/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/inquirer/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/inquirer/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/inquirer/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ip": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz", + "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==", + "dev": true + }, + "node_modules/ipaddr.js": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.0.1.tgz", + "integrity": "sha512-1qTgH9NG+IIJ4yfKs2e6Pp1bZg8wbDbKHT21HrLIeYBTRLgMYKnMTPAuI3Lcs61nfx5h1xlXnbJtH1kX5/d/ng==", + "dev": true, + "engines": { + "node": ">= 10" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-core-module": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", + "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", + "dev": true, + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", + "dev": true, + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-interactive": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", + "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-lambda": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz", + "integrity": "sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==", + "dev": true + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-plain-obj": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-3.0.0.tgz", + "integrity": "sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-what": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/is-what/-/is-what-3.14.1.tgz", + "integrity": "sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==", + "dev": true + }, + "node_modules/is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dev": true, + "dependencies": { + "is-docker": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true + }, + "node_modules/isbinaryfile": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-4.0.10.tgz", + "integrity": "sha512-iHrqe5shvBUcFbmZq9zOQHBoeOhZJu6RQGrDpBgenUm/Am+F3JM2MgQj+rK3Z601fzrL5gLZWtAPH2OBaSVcyw==", + "dev": true, + "engines": { + "node": ">= 8.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/gjtorikian/" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/istanbul-lib-coverage": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", + "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-instrument": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", + "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", + "dev": true, + "dependencies": { + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-instrument/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/istanbul-lib-report": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", + "dev": true, + "dependencies": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^3.0.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-report/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-report/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-source-maps": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-3.0.6.tgz", + "integrity": "sha512-R47KzMtDJH6X4/YW9XTx+jrLnZnscW4VpNN+1PViSYTejLVPWv7oov+Duf8YQSPyVRUvueQqz1TcsC6mooZTXw==", + "dev": true, + "dependencies": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^2.0.5", + "make-dir": "^2.1.0", + "rimraf": "^2.6.3", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/istanbul-lib-source-maps/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/istanbul-lib-source-maps/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/istanbul-lib-source-maps/node_modules/istanbul-lib-coverage": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz", + "integrity": "sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/istanbul-lib-source-maps/node_modules/make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, + "dependencies": { + "pify": "^4.0.1", + "semver": "^5.6.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/istanbul-lib-source-maps/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/istanbul-lib-source-maps/node_modules/rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } + }, + "node_modules/istanbul-lib-source-maps/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/istanbul-lib-source-maps/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/istanbul-reports": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.5.tgz", + "integrity": "sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==", + "dev": true, + "dependencies": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jasmine-core": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-4.5.0.tgz", + "integrity": "sha512-9PMzyvhtocxb3aXJVOPqBDswdgyAeSB81QnLop4npOpbqnheaTEwPc9ZloQeVswugPManznQBjD8kWDTjlnHuw==", + "dev": true + }, + "node_modules/jasmine-spec-reporter": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/jasmine-spec-reporter/-/jasmine-spec-reporter-7.0.0.tgz", + "integrity": "sha512-OtC7JRasiTcjsaCBPtMO0Tl8glCejM4J4/dNuOJdA8lBjz4PmWjYQ6pzb0uzpBNAWJMDudYuj9OdXJWqM2QTJg==", + "dev": true, + "dependencies": { + "colors": "1.4.0" + } + }, + "node_modules/jest-worker": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", + "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", + "dev": true, + "dependencies": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/jest-worker/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-worker/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true + }, + "node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + }, + "node_modules/json5": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", + "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "dev": true, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/jsonc-parser": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", + "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==", + "dev": true + }, + "node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "dev": true, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==", + "dev": true, + "engines": [ + "node >= 0.2.0" + ] + }, + "node_modules/karma": { + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/karma/-/karma-6.4.1.tgz", + "integrity": "sha512-Cj57NKOskK7wtFWSlMvZf459iX+kpYIPXmkNUzP2WAFcA7nhr/ALn5R7sw3w+1udFDcpMx/tuB8d5amgm3ijaA==", + "dev": true, + "dependencies": { + "@colors/colors": "1.5.0", + "body-parser": "^1.19.0", + "braces": "^3.0.2", + "chokidar": "^3.5.1", + "connect": "^3.7.0", + "di": "^0.0.1", + "dom-serialize": "^2.2.1", + "glob": "^7.1.7", + "graceful-fs": "^4.2.6", + "http-proxy": "^1.18.1", + "isbinaryfile": "^4.0.8", + "lodash": "^4.17.21", + "log4js": "^6.4.1", + "mime": "^2.5.2", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.5", + "qjobs": "^1.2.0", + "range-parser": "^1.2.1", + "rimraf": "^3.0.2", + "socket.io": "^4.4.1", + "source-map": "^0.6.1", + "tmp": "^0.2.1", + "ua-parser-js": "^0.7.30", + "yargs": "^16.1.1" + }, + "bin": { + "karma": "bin/karma" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/karma-chrome-launcher": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/karma-chrome-launcher/-/karma-chrome-launcher-3.1.1.tgz", + "integrity": "sha512-hsIglcq1vtboGPAN+DGCISCFOxW+ZVnIqhDQcCMqqCp+4dmJ0Qpq5QAjkbA0X2L9Mi6OBkHi2Srrbmm7pUKkzQ==", + "dev": true, + "dependencies": { + "which": "^1.2.1" + } + }, + "node_modules/karma-coverage-istanbul-reporter": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/karma-coverage-istanbul-reporter/-/karma-coverage-istanbul-reporter-3.0.3.tgz", + "integrity": "sha512-wE4VFhG/QZv2Y4CdAYWDbMmcAHeS926ZIji4z+FkB2aF/EposRb6DP6G5ncT/wXhqUfAb/d7kZrNKPonbvsATw==", + "dev": true, + "dependencies": { + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^3.0.6", + "istanbul-reports": "^3.0.2", + "minimatch": "^3.0.4" + }, + "funding": { + "url": "https://github.com/sponsors/mattlewis92" + } + }, + "node_modules/karma-coverage-istanbul-reporter/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/karma-coverage-istanbul-reporter/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/karma-jasmine": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/karma-jasmine/-/karma-jasmine-5.1.0.tgz", + "integrity": "sha512-i/zQLFrfEpRyQoJF9fsCdTMOF5c2dK7C7OmsuKg2D0YSsuZSfQDiLuaiktbuio6F2wiCsZSnSnieIQ0ant/uzQ==", + "dev": true, + "dependencies": { + "jasmine-core": "^4.1.0" + }, + "engines": { + "node": ">=12" + }, + "peerDependencies": { + "karma": "^6.0.0" + } + }, + "node_modules/karma-jasmine-html-reporter": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/karma-jasmine-html-reporter/-/karma-jasmine-html-reporter-2.0.0.tgz", + "integrity": "sha512-SB8HNNiazAHXM1vGEzf8/tSyEhkfxuDdhYdPBX2Mwgzt0OuF2gicApQ+uvXLID/gXyJQgvrM9+1/2SxZFUUDIA==", + "dev": true, + "peerDependencies": { + "jasmine-core": "^4.0.0", + "karma": "^6.0.0", + "karma-jasmine": "^5.0.0" + } + }, + "node_modules/karma-source-map-support": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/karma-source-map-support/-/karma-source-map-support-1.4.0.tgz", + "integrity": "sha512-RsBECncGO17KAoJCYXjv+ckIz+Ii9NCi+9enk+rq6XC81ezYkb4/RHE6CTXdA7IOJqoF3wcaLfVG0CPmE5ca6A==", + "dev": true, + "dependencies": { + "source-map-support": "^0.5.5" + } + }, + "node_modules/karma/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/karma/node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/karma/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/karma/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/karma/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/karma/node_modules/tmp": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", + "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==", + "dev": true, + "dependencies": { + "rimraf": "^3.0.0" + }, + "engines": { + "node": ">=8.17.0" + } + }, + "node_modules/karma/node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/karma/node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/klona": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/klona/-/klona-2.0.5.tgz", + "integrity": "sha512-pJiBpiXMbt7dkzXe8Ghj/u4FfXOOa98fPW+bihOJ4SjnoijweJrNThJfd3ifXpXhREjpoF2mZVH1GfS9LV3kHQ==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/less": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/less/-/less-4.1.3.tgz", + "integrity": "sha512-w16Xk/Ta9Hhyei0Gpz9m7VS8F28nieJaL/VyShID7cYvP6IL5oHeL6p4TXSDJqZE/lNv0oJ2pGVjJsRkfwm5FA==", + "dev": true, + "dependencies": { + "copy-anything": "^2.0.1", + "parse-node-version": "^1.0.1", + "tslib": "^2.3.0" + }, + "bin": { + "lessc": "bin/lessc" + }, + "engines": { + "node": ">=6" + }, + "optionalDependencies": { + "errno": "^0.1.1", + "graceful-fs": "^4.1.2", + "image-size": "~0.5.0", + "make-dir": "^2.1.0", + "mime": "^1.4.1", + "needle": "^3.1.0", + "source-map": "~0.6.0" + } + }, + "node_modules/less-loader": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/less-loader/-/less-loader-11.1.0.tgz", + "integrity": "sha512-C+uDBV7kS7W5fJlUjq5mPBeBVhYpTIm5gB09APT9o3n/ILeaXVsiSFTbZpTJCJwQ/Crczfn3DmfQFwxYusWFug==", + "dev": true, + "dependencies": { + "klona": "^2.0.4" + }, + "engines": { + "node": ">= 14.15.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "less": "^3.5.0 || ^4.0.0", + "webpack": "^5.0.0" + } + }, + "node_modules/less/node_modules/make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, + "optional": true, + "dependencies": { + "pify": "^4.0.1", + "semver": "^5.6.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/less/node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "dev": true, + "optional": true, + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/less/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "optional": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/less/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/license-webpack-plugin": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/license-webpack-plugin/-/license-webpack-plugin-4.0.2.tgz", + "integrity": "sha512-771TFWFD70G1wLTC4oU2Cw4qvtmNrIw+wRvBtn+okgHl7slJVi7zfNcdmqDL72BojM30VNJ2UHylr1o77U37Jw==", + "dev": true, + "dependencies": { + "webpack-sources": "^3.0.0" + }, + "peerDependenciesMeta": { + "webpack": { + "optional": true + }, + "webpack-sources": { + "optional": true + } + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true + }, + "node_modules/loader-runner": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", + "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", + "dev": true, + "engines": { + "node": ">=6.11.5" + } + }, + "node_modules/loader-utils": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-3.2.1.tgz", + "integrity": "sha512-ZvFw1KWS3GVyYBYb7qkmRM/WwL2TQQBxgCK62rlvm4WpVQ23Nb4tYjApUlfjrEGvOs7KHEsmyUn75OHZrJMWPw==", + "dev": true, + "engines": { + "node": ">= 12.13.0" + } + }, + "node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "node_modules/lodash.debounce": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==", + "dev": true + }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-symbols/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/log-symbols/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/log-symbols/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/log-symbols/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/log-symbols/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/log-symbols/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/log4js": { + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/log4js/-/log4js-6.7.1.tgz", + "integrity": "sha512-lzbd0Eq1HRdWM2abSD7mk6YIVY0AogGJzb/z+lqzRk+8+XJP+M6L1MS5FUSc3jjGru4dbKjEMJmqlsoYYpuivQ==", + "dev": true, + "dependencies": { + "date-format": "^4.0.14", + "debug": "^4.3.4", + "flatted": "^3.2.7", + "rfdc": "^1.3.0", + "streamroller": "^3.1.3" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/lru-cache": { + "version": "7.14.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.14.1.tgz", + "integrity": "sha512-ysxwsnTKdAx96aTRdhDOCQfDgbHnt8SK0KY8SEjO0wHinhWOFTESbjVCMPbU1uGXg/ch4lifqx0wfjOawU2+WA==", + "dev": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/magic-string": { + "version": "0.26.7", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.26.7.tgz", + "integrity": "sha512-hX9XH3ziStPoPhJxLq1syWuZMxbDvGNbVchfrdCtanC7D13888bMFow61x8axrx+GfHLtVeAx2kxL7tTGRl+Ow==", + "dev": true, + "dependencies": { + "sourcemap-codec": "^1.4.8" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "dependencies": { + "semver": "^6.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/make-dir/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true + }, + "node_modules/make-fetch-happen": { + "version": "10.2.1", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.2.1.tgz", + "integrity": "sha512-NgOPbRiaQM10DYXvN3/hhGVI2M5MtITFryzBGxHM5p4wnFxsVCbxkrBrDsk+EZ5OB4jEOT7AjDxtdF+KVEFT7w==", + "dev": true, + "dependencies": { + "agentkeepalive": "^4.2.1", + "cacache": "^16.1.0", + "http-cache-semantics": "^4.1.0", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0", + "is-lambda": "^1.0.1", + "lru-cache": "^7.7.1", + "minipass": "^3.1.6", + "minipass-collect": "^1.0.2", + "minipass-fetch": "^2.0.3", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.3", + "promise-retry": "^2.0.1", + "socks-proxy-agent": "^7.0.0", + "ssri": "^9.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/make-fetch-happen/node_modules/@npmcli/fs": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-2.1.2.tgz", + "integrity": "sha512-yOJKRvohFOaLqipNtwYB9WugyZKhC/DZC4VYPmpaCzDBrA8YpK3qHZ8/HGscMnE4GqbkLNuVcCnxkeQEdGt6LQ==", + "dev": true, + "dependencies": { + "@gar/promisify": "^1.1.3", + "semver": "^7.3.5" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/make-fetch-happen/node_modules/cacache": { + "version": "16.1.3", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-16.1.3.tgz", + "integrity": "sha512-/+Emcj9DAXxX4cwlLmRI9c166RuL3w30zp4R7Joiv2cQTtTtA+jeuCAjH3ZlGnYS3tKENSrKhAzVVP9GVyzeYQ==", + "dev": true, + "dependencies": { + "@npmcli/fs": "^2.1.0", + "@npmcli/move-file": "^2.0.0", + "chownr": "^2.0.0", + "fs-minipass": "^2.1.0", + "glob": "^8.0.1", + "infer-owner": "^1.0.4", + "lru-cache": "^7.7.1", + "minipass": "^3.1.6", + "minipass-collect": "^1.0.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "mkdirp": "^1.0.4", + "p-map": "^4.0.0", + "promise-inflight": "^1.0.1", + "rimraf": "^3.0.2", + "ssri": "^9.0.0", + "tar": "^6.1.11", + "unique-filename": "^2.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/make-fetch-happen/node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/make-fetch-happen/node_modules/ssri": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-9.0.1.tgz", + "integrity": "sha512-o57Wcn66jMQvfHG1FlYbWeZWW/dHZhJXjpIcTfXldXEk5nz5lStPo3mK0OJQfGR3RbZUlbISexbljkJzuEj/8Q==", + "dev": true, + "dependencies": { + "minipass": "^3.1.1" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/make-fetch-happen/node_modules/unique-filename": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-2.0.1.tgz", + "integrity": "sha512-ODWHtkkdx3IAR+veKxFV+VBkUMcN+FaqzUUd7IZzt+0zhDZFPFxhlqwPF3YQvMHx1TD0tdgYl+kuPnJ8E6ql7A==", + "dev": true, + "dependencies": { + "unique-slug": "^3.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/make-fetch-happen/node_modules/unique-slug": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-3.0.0.tgz", + "integrity": "sha512-8EyMynh679x/0gqE9fT9oilG+qEt+ibFyqjuVTsZn1+CMxH+XLlpvr2UZx4nVcCwTpx81nICr2JQFkM+HPLq4w==", + "dev": true, + "dependencies": { + "imurmurhash": "^0.1.4" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/memfs": { + "version": "3.4.12", + "resolved": "https://registry.npmjs.org/memfs/-/memfs-3.4.12.tgz", + "integrity": "sha512-BcjuQn6vfqP+k100e0E9m61Hyqa//Brp+I3f0OBmN0ATHlFA8vx3Lt8z57R3u2bPqe3WGDBC+nF72fTH7isyEw==", + "dev": true, + "dependencies": { + "fs-monkey": "^1.0.3" + }, + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==", + "dev": true + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mime": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz", + "integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==", + "dev": true, + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/mini-css-extract-plugin": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.6.1.tgz", + "integrity": "sha512-wd+SD57/K6DiV7jIR34P+s3uckTRuQvx0tKPcvjFlrEylk6P4mQ2KSWk1hblj1Kxaqok7LogKOieygXqBczNlg==", + "dev": true, + "dependencies": { + "schema-utils": "^4.0.0" + }, + "engines": { + "node": ">= 12.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.0.0" + } + }, + "node_modules/minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", + "dev": true + }, + "node_modules/minimatch": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.1.tgz", + "integrity": "sha512-362NP+zlprccbEt/SkxKfRMHnNY85V74mVnpUpNyr3F35covl09Kec7/sEFLt3RA4oXmewtoaanoIf67SE5Y5g==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/minimist": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz", + "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-collect": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz", + "integrity": "sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==", + "dev": true, + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minipass-fetch": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-2.1.2.tgz", + "integrity": "sha512-LT49Zi2/WMROHYoqGgdlQIZh8mLPZmOrN2NdJjMXxYe4nkN6FUyuPuOAOedNJDrx0IRGg9+4guZewtp8hE6TxA==", + "dev": true, + "dependencies": { + "minipass": "^3.1.6", + "minipass-sized": "^1.0.3", + "minizlib": "^2.1.2" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + }, + "optionalDependencies": { + "encoding": "^0.1.13" + } + }, + "node_modules/minipass-flush": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", + "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", + "dev": true, + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minipass-json-stream": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minipass-json-stream/-/minipass-json-stream-1.0.1.tgz", + "integrity": "sha512-ODqY18UZt/I8k+b7rl2AENgbWE8IDYam+undIJONvigAz8KR5GWblsFTEfQs0WODsjbSXWlm+JHEv8Gr6Tfdbg==", + "dev": true, + "dependencies": { + "jsonparse": "^1.3.1", + "minipass": "^3.0.0" + } + }, + "node_modules/minipass-pipeline": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", + "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==", + "dev": true, + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-sized": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz", + "integrity": "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==", + "dev": true, + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minizlib": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", + "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", + "dev": true, + "dependencies": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "dev": true, + "dependencies": { + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/multicast-dns": { + "version": "7.2.5", + "resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-7.2.5.tgz", + "integrity": "sha512-2eznPJP8z2BFLX50tf0LuODrpINqP1RVIm/CObbTcBRITQgmC/TjcREF1NeTBzIcR5XO/ukWo+YHOjBbFwIupg==", + "dev": true, + "dependencies": { + "dns-packet": "^5.2.2", + "thunky": "^1.0.2" + }, + "bin": { + "multicast-dns": "cli.js" + } + }, + "node_modules/mute-stream": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", + "dev": true + }, + "node_modules/nanoid": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz", + "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==", + "dev": true, + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/needle": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/needle/-/needle-3.2.0.tgz", + "integrity": "sha512-oUvzXnyLiVyVGoianLijF9O/RecZUf7TkBfimjGrLM4eQhXyeJwM6GeAWccwfQ9aa4gMCZKqhAOuLaMIcQxajQ==", + "dev": true, + "optional": true, + "dependencies": { + "debug": "^3.2.6", + "iconv-lite": "^0.6.3", + "sax": "^1.2.4" + }, + "bin": { + "needle": "bin/needle" + }, + "engines": { + "node": ">= 4.4.x" + } + }, + "node_modules/needle/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "optional": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/needle/node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "optional": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true + }, + "node_modules/nice-napi": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/nice-napi/-/nice-napi-1.0.2.tgz", + "integrity": "sha512-px/KnJAJZf5RuBGcfD+Sp2pAKq0ytz8j+1NehvgIGFkvtvFrDM3T8E4x/JJODXK9WZow8RRGrbA9QQ3hs+pDhA==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "!win32" + ], + "dependencies": { + "node-addon-api": "^3.0.0", + "node-gyp-build": "^4.2.2" + } + }, + "node_modules/node-addon-api": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.2.1.tgz", + "integrity": "sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==", + "dev": true, + "optional": true + }, + "node_modules/node-forge": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz", + "integrity": "sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==", + "dev": true, + "engines": { + "node": ">= 6.13.0" + } + }, + "node_modules/node-gyp": { + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-9.3.0.tgz", + "integrity": "sha512-A6rJWfXFz7TQNjpldJ915WFb1LnhO4lIve3ANPbWreuEoLoKlFT3sxIepPBkLhM27crW8YmN+pjlgbasH6cH/Q==", + "dev": true, + "dependencies": { + "env-paths": "^2.2.0", + "glob": "^7.1.4", + "graceful-fs": "^4.2.6", + "make-fetch-happen": "^10.0.3", + "nopt": "^6.0.0", + "npmlog": "^6.0.0", + "rimraf": "^3.0.2", + "semver": "^7.3.5", + "tar": "^6.1.2", + "which": "^2.0.2" + }, + "bin": { + "node-gyp": "bin/node-gyp.js" + }, + "engines": { + "node": "^12.22 || ^14.13 || >=16" + } + }, + "node_modules/node-gyp-build": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.5.0.tgz", + "integrity": "sha512-2iGbaQBV+ITgCz76ZEjmhUKAKVf7xfY1sRl4UiKQspfZMH2h06SyhNsnSVy50cwkFQDGLyif6m/6uFXHkOZ6rg==", + "dev": true, + "optional": true, + "bin": { + "node-gyp-build": "bin.js", + "node-gyp-build-optional": "optional.js", + "node-gyp-build-test": "build-test.js" + } + }, + "node_modules/node-gyp/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/node-gyp/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/node-gyp/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/node-gyp/node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/node-releases": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz", + "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==", + "dev": true + }, + "node_modules/nopt": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-6.0.0.tgz", + "integrity": "sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g==", + "dev": true, + "dependencies": { + "abbrev": "^1.0.0" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/normalize-package-data": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-5.0.0.tgz", + "integrity": "sha512-h9iPVIfrVZ9wVYQnxFgtw1ugSvGEMOlyPWWtm8BMJhnwyEL/FLbYbTY3V3PpjI/BUK67n9PEWDu6eHzu1fB15Q==", + "dev": true, + "dependencies": { + "hosted-git-info": "^6.0.0", + "is-core-module": "^2.8.1", + "semver": "^7.3.5", + "validate-npm-package-license": "^3.0.4" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/normalize-package-data/node_modules/hosted-git-info": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-6.1.1.tgz", + "integrity": "sha512-r0EI+HBMcXadMrugk0GCQ+6BQV39PiWAZVfq7oIckeGiN7sjRGyQxPdft3nQekFTCQbYxLBH+/axZMeH8UX6+w==", + "dev": true, + "dependencies": { + "lru-cache": "^7.5.1" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/normalize-range": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", + "integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-bundled": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-3.0.0.tgz", + "integrity": "sha512-Vq0eyEQy+elFpzsKjMss9kxqb9tG3YHg4dsyWuUENuzvSUWe1TCnW/vV9FkhvBk/brEDoDiVd+M1Btosa6ImdQ==", + "dev": true, + "dependencies": { + "npm-normalize-package-bin": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm-install-checks": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-6.0.0.tgz", + "integrity": "sha512-SBU9oFglRVZnfElwAtF14NivyulDqF1VKqqwNsFW9HDcbHMAPHpRSsVFgKuwFGq/hVvWZExz62Th0kvxn/XE7Q==", + "dev": true, + "dependencies": { + "semver": "^7.1.1" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm-normalize-package-bin": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-3.0.0.tgz", + "integrity": "sha512-g+DPQSkusnk7HYXr75NtzkIP4+N81i3RPsGFidF3DzHd9MT9wWngmqoeg/fnHFz5MNdtG4w03s+QnhewSLTT2Q==", + "dev": true, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm-package-arg": { + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-9.1.2.tgz", + "integrity": "sha512-pzd9rLEx4TfNJkovvlBSLGhq31gGu2QDexFPWT19yCDh0JgnRhlBLNo5759N0AJmBk+kQ9Y/hXoLnlgFD+ukmg==", + "dev": true, + "dependencies": { + "hosted-git-info": "^5.0.0", + "proc-log": "^2.0.1", + "semver": "^7.3.5", + "validate-npm-package-name": "^4.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/npm-packlist": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-7.0.4.tgz", + "integrity": "sha512-d6RGEuRrNS5/N84iglPivjaJPxhDbZmlbTwTDX2IbcRHG5bZCdtysYMhwiPvcF4GisXHGn7xsxv+GQ7T/02M5Q==", + "dev": true, + "dependencies": { + "ignore-walk": "^6.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm-pick-manifest": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-8.0.1.tgz", + "integrity": "sha512-mRtvlBjTsJvfCCdmPtiu2bdlx8d/KXtF7yNXNWe7G0Z36qWA9Ny5zXsI2PfBZEv7SXgoxTmNaTzGSbbzDZChoA==", + "dev": true, + "dependencies": { + "npm-install-checks": "^6.0.0", + "npm-normalize-package-bin": "^3.0.0", + "npm-package-arg": "^10.0.0", + "semver": "^7.3.5" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm-pick-manifest/node_modules/hosted-git-info": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-6.1.1.tgz", + "integrity": "sha512-r0EI+HBMcXadMrugk0GCQ+6BQV39PiWAZVfq7oIckeGiN7sjRGyQxPdft3nQekFTCQbYxLBH+/axZMeH8UX6+w==", + "dev": true, + "dependencies": { + "lru-cache": "^7.5.1" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm-pick-manifest/node_modules/npm-package-arg": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-10.1.0.tgz", + "integrity": "sha512-uFyyCEmgBfZTtrKk/5xDfHp6+MdrqGotX/VoOyEEl3mBwiEE5FlBaePanazJSVMPT7vKepcjYBY2ztg9A3yPIA==", + "dev": true, + "dependencies": { + "hosted-git-info": "^6.0.0", + "proc-log": "^3.0.0", + "semver": "^7.3.5", + "validate-npm-package-name": "^5.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm-pick-manifest/node_modules/proc-log": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-3.0.0.tgz", + "integrity": "sha512-++Vn7NS4Xf9NacaU9Xq3URUuqZETPsf8L4j5/ckhaRYsfPeRyzGw+iDjFhV/Jr3uNmTvvddEJFWh5R1gRgUH8A==", + "dev": true, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm-pick-manifest/node_modules/validate-npm-package-name": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-5.0.0.tgz", + "integrity": "sha512-YuKoXDAhBYxY7SfOKxHBDoSyENFeW5VvIIQp2TGQuit8gpK6MnWaQelBKxso72DoxTZfZdcP3W90LqpSkgPzLQ==", + "dev": true, + "dependencies": { + "builtins": "^5.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm-registry-fetch": { + "version": "14.0.3", + "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-14.0.3.tgz", + "integrity": "sha512-YaeRbVNpnWvsGOjX2wk5s85XJ7l1qQBGAp724h8e2CZFFhMSuw9enom7K1mWVUtvXO1uUSFIAPofQK0pPN0ZcA==", + "dev": true, + "dependencies": { + "make-fetch-happen": "^11.0.0", + "minipass": "^4.0.0", + "minipass-fetch": "^3.0.0", + "minipass-json-stream": "^1.0.1", + "minizlib": "^2.1.2", + "npm-package-arg": "^10.0.0", + "proc-log": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm-registry-fetch/node_modules/hosted-git-info": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-6.1.1.tgz", + "integrity": "sha512-r0EI+HBMcXadMrugk0GCQ+6BQV39PiWAZVfq7oIckeGiN7sjRGyQxPdft3nQekFTCQbYxLBH+/axZMeH8UX6+w==", + "dev": true, + "dependencies": { + "lru-cache": "^7.5.1" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm-registry-fetch/node_modules/make-fetch-happen": { + "version": "11.0.2", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-11.0.2.tgz", + "integrity": "sha512-5n/Pq41w/uZghpdlXAY5kIM85RgJThtTH/NYBRAZ9VUOBWV90USaQjwGrw76fZP3Lj5hl/VZjpVvOaRBMoL/2w==", + "dev": true, + "dependencies": { + "agentkeepalive": "^4.2.1", + "cacache": "^17.0.0", + "http-cache-semantics": "^4.1.0", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0", + "is-lambda": "^1.0.1", + "lru-cache": "^7.7.1", + "minipass": "^4.0.0", + "minipass-collect": "^1.0.2", + "minipass-fetch": "^3.0.0", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.3", + "promise-retry": "^2.0.1", + "socks-proxy-agent": "^7.0.0", + "ssri": "^10.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm-registry-fetch/node_modules/minipass": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.0.0.tgz", + "integrity": "sha512-g2Uuh2jEKoht+zvO6vJqXmYpflPqzRBT+Th2h01DKh5z7wbY/AZ2gCQ78cP70YoHPyFdY30YBV5WxgLOEwOykw==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm-registry-fetch/node_modules/minipass-fetch": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-3.0.1.tgz", + "integrity": "sha512-t9/wowtf7DYkwz8cfMSt0rMwiyNIBXf5CKZ3S5ZMqRqMYT0oLTp0x1WorMI9WTwvaPg21r1JbFxJMum8JrLGfw==", + "dev": true, + "dependencies": { + "minipass": "^4.0.0", + "minipass-sized": "^1.0.3", + "minizlib": "^2.1.2" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + }, + "optionalDependencies": { + "encoding": "^0.1.13" + } + }, + "node_modules/npm-registry-fetch/node_modules/npm-package-arg": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-10.1.0.tgz", + "integrity": "sha512-uFyyCEmgBfZTtrKk/5xDfHp6+MdrqGotX/VoOyEEl3mBwiEE5FlBaePanazJSVMPT7vKepcjYBY2ztg9A3yPIA==", + "dev": true, + "dependencies": { + "hosted-git-info": "^6.0.0", + "proc-log": "^3.0.0", + "semver": "^7.3.5", + "validate-npm-package-name": "^5.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm-registry-fetch/node_modules/proc-log": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-3.0.0.tgz", + "integrity": "sha512-++Vn7NS4Xf9NacaU9Xq3URUuqZETPsf8L4j5/ckhaRYsfPeRyzGw+iDjFhV/Jr3uNmTvvddEJFWh5R1gRgUH8A==", + "dev": true, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm-registry-fetch/node_modules/validate-npm-package-name": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-5.0.0.tgz", + "integrity": "sha512-YuKoXDAhBYxY7SfOKxHBDoSyENFeW5VvIIQp2TGQuit8gpK6MnWaQelBKxso72DoxTZfZdcP3W90LqpSkgPzLQ==", + "dev": true, + "dependencies": { + "builtins": "^5.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/npmlog": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.2.tgz", + "integrity": "sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg==", + "dev": true, + "dependencies": { + "are-we-there-yet": "^3.0.0", + "console-control-strings": "^1.1.0", + "gauge": "^4.0.3", + "set-blocking": "^2.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/nth-check": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", + "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", + "dev": true, + "dependencies": { + "boolbase": "^1.0.0" + }, + "funding": { + "url": "https://github.com/fb55/nth-check?sponsor=1" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", + "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/obuf": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz", + "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==", + "dev": true + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "dev": true, + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/on-headers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", + "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/open": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/open/-/open-8.4.0.tgz", + "integrity": "sha512-XgFPPM+B28FtCCgSb9I+s9szOC1vZRSwgWsRUA5ylIxRTgKozqjOCrVOqGsYABPYK5qnfqClxZTFBa8PKt2v6Q==", + "dev": true, + "dependencies": { + "define-lazy-prop": "^2.0.0", + "is-docker": "^2.1.1", + "is-wsl": "^2.2.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", + "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", + "dev": true, + "dependencies": { + "bl": "^4.1.0", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-spinners": "^2.5.0", + "is-interactive": "^1.0.0", + "is-unicode-supported": "^0.1.0", + "log-symbols": "^4.1.0", + "strip-ansi": "^6.0.0", + "wcwidth": "^1.0.1" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/ora/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/ora/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/ora/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/ora/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ora/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-map": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "dev": true, + "dependencies": { + "aggregate-error": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-retry": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-4.6.2.tgz", + "integrity": "sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ==", + "dev": true, + "dependencies": { + "@types/retry": "0.12.0", + "retry": "^0.13.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-retry/node_modules/retry": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz", + "integrity": "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/pacote": { + "version": "15.0.6", + "resolved": "https://registry.npmjs.org/pacote/-/pacote-15.0.6.tgz", + "integrity": "sha512-dQwcz/sME7QIL+cdrw/jftQfMMXxSo17i2kJ/gnhBhUvvBAsxoBu1lw9B5IzCH/Ce8CvEkG/QYZ6txzKfn0bTw==", + "dev": true, + "dependencies": { + "@npmcli/git": "^4.0.0", + "@npmcli/installed-package-contents": "^2.0.1", + "@npmcli/promise-spawn": "^6.0.1", + "@npmcli/run-script": "^6.0.0", + "cacache": "^17.0.0", + "fs-minipass": "^2.1.0", + "minipass": "^3.1.6", + "npm-package-arg": "^10.0.0", + "npm-packlist": "^7.0.0", + "npm-pick-manifest": "^8.0.0", + "npm-registry-fetch": "^14.0.0", + "proc-log": "^3.0.0", + "promise-retry": "^2.0.1", + "read-package-json": "^6.0.0", + "read-package-json-fast": "^3.0.0", + "ssri": "^10.0.0", + "tar": "^6.1.11" + }, + "bin": { + "pacote": "lib/bin.js" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/pacote/node_modules/hosted-git-info": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-6.1.1.tgz", + "integrity": "sha512-r0EI+HBMcXadMrugk0GCQ+6BQV39PiWAZVfq7oIckeGiN7sjRGyQxPdft3nQekFTCQbYxLBH+/axZMeH8UX6+w==", + "dev": true, + "dependencies": { + "lru-cache": "^7.5.1" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/pacote/node_modules/npm-package-arg": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-10.1.0.tgz", + "integrity": "sha512-uFyyCEmgBfZTtrKk/5xDfHp6+MdrqGotX/VoOyEEl3mBwiEE5FlBaePanazJSVMPT7vKepcjYBY2ztg9A3yPIA==", + "dev": true, + "dependencies": { + "hosted-git-info": "^6.0.0", + "proc-log": "^3.0.0", + "semver": "^7.3.5", + "validate-npm-package-name": "^5.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/pacote/node_modules/proc-log": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-3.0.0.tgz", + "integrity": "sha512-++Vn7NS4Xf9NacaU9Xq3URUuqZETPsf8L4j5/ckhaRYsfPeRyzGw+iDjFhV/Jr3uNmTvvddEJFWh5R1gRgUH8A==", + "dev": true, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/pacote/node_modules/validate-npm-package-name": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-5.0.0.tgz", + "integrity": "sha512-YuKoXDAhBYxY7SfOKxHBDoSyENFeW5VvIIQp2TGQuit8gpK6MnWaQelBKxso72DoxTZfZdcP3W90LqpSkgPzLQ==", + "dev": true, + "dependencies": { + "builtins": "^5.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", + "dev": true + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parse-node-version": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parse-node-version/-/parse-node-version-1.0.1.tgz", + "integrity": "sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==", + "dev": true, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/parse5": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", + "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", + "dev": true + }, + "node_modules/parse5-html-rewriting-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5-html-rewriting-stream/-/parse5-html-rewriting-stream-6.0.1.tgz", + "integrity": "sha512-vwLQzynJVEfUlURxgnf51yAJDQTtVpNyGD8tKi2Za7m+akukNHxCcUQMAa/mUGLhCeicFdpy7Tlvj8ZNKadprg==", + "dev": true, + "dependencies": { + "parse5": "^6.0.1", + "parse5-sax-parser": "^6.0.1" + } + }, + "node_modules/parse5-htmlparser2-tree-adapter": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz", + "integrity": "sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA==", + "dev": true, + "dependencies": { + "parse5": "^6.0.1" + } + }, + "node_modules/parse5-sax-parser": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5-sax-parser/-/parse5-sax-parser-6.0.1.tgz", + "integrity": "sha512-kXX+5S81lgESA0LsDuGjAlBybImAChYRMT+/uKCEXFBFOeEhS52qUCydGhU3qLRD8D9DVjaUo821WK7DM4iCeg==", + "dev": true, + "dependencies": { + "parse5": "^6.0.1" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "node_modules/path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==", + "dev": true + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/piscina": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/piscina/-/piscina-3.2.0.tgz", + "integrity": "sha512-yn/jMdHRw+q2ZJhFhyqsmANcbF6V2QwmD84c6xRau+QpQOmtrBCoRGdvTfeuFDYXB5W2m6MfLkjkvQa9lUSmIA==", + "dev": true, + "dependencies": { + "eventemitter-asyncresource": "^1.0.0", + "hdr-histogram-js": "^2.0.1", + "hdr-histogram-percentiles-obj": "^3.0.0" + }, + "optionalDependencies": { + "nice-napi": "^1.0.2" + } + }, + "node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/postcss": { + "version": "8.4.19", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.19.tgz", + "integrity": "sha512-h+pbPsyhlYj6N2ozBmHhHrs9DzGmbaarbLvWipMRO7RLS+v4onj26MPFXA5OBYFxyqYhUJK456SwDcY9H2/zsA==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + } + ], + "dependencies": { + "nanoid": "^3.3.4", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/postcss-loader": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-7.0.1.tgz", + "integrity": "sha512-VRviFEyYlLjctSM93gAZtcJJ/iSkPZ79zWbN/1fSH+NisBByEiVLqpdVDrPLVSi8DX0oJo12kL/GppTBdKVXiQ==", + "dev": true, + "dependencies": { + "cosmiconfig": "^7.0.0", + "klona": "^2.0.5", + "semver": "^7.3.7" + }, + "engines": { + "node": ">= 14.15.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "postcss": "^7.0.0 || ^8.0.1", + "webpack": "^5.0.0" + } + }, + "node_modules/postcss-modules-extract-imports": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz", + "integrity": "sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==", + "dev": true, + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/postcss-modules-local-by-default": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.0.tgz", + "integrity": "sha512-sT7ihtmGSF9yhm6ggikHdV0hlziDTX7oFoXtuVWeDd3hHObNkcHRo9V3yg7vCAY7cONyxJC/XXCmmiHHcvX7bQ==", + "dev": true, + "dependencies": { + "icss-utils": "^5.0.0", + "postcss-selector-parser": "^6.0.2", + "postcss-value-parser": "^4.1.0" + }, + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/postcss-modules-scope": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.0.0.tgz", + "integrity": "sha512-hncihwFA2yPath8oZ15PZqvWGkWf+XUfQgUGamS4LqoP1anQLOsOJw0vr7J7IwLpoY9fatA2qiGUGmuZL0Iqlg==", + "dev": true, + "dependencies": { + "postcss-selector-parser": "^6.0.4" + }, + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/postcss-modules-values": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-4.0.0.tgz", + "integrity": "sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ==", + "dev": true, + "dependencies": { + "icss-utils": "^5.0.0" + }, + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/postcss-selector-parser": { + "version": "6.0.11", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.11.tgz", + "integrity": "sha512-zbARubNdogI9j7WY4nQJBiNqQf3sLS3wCP4WfOidu+p28LofJqDH1tcXypGrcmMHhDk2t9wGhCsYe/+szLTy1g==", + "dev": true, + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss-value-parser": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", + "dev": true + }, + "node_modules/pretty-bytes": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz", + "integrity": "sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==", + "dev": true, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/proc-log": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-2.0.1.tgz", + "integrity": "sha512-Kcmo2FhfDTXdcbfDH76N7uBYHINxc/8GW7UAVuVP9I+Va3uHSerrnKV6dLooga/gh7GlgzuCCr/eoldnL1muGw==", + "dev": true, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true + }, + "node_modules/promise-inflight": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", + "integrity": "sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==", + "dev": true + }, + "node_modules/promise-retry": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz", + "integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==", + "dev": true, + "dependencies": { + "err-code": "^2.0.2", + "retry": "^0.12.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "dev": true, + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/proxy-addr/node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "dev": true, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/prr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", + "integrity": "sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==", + "dev": true, + "optional": true + }, + "node_modules/punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/qjobs": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/qjobs/-/qjobs-1.2.0.tgz", + "integrity": "sha512-8YOJEHtxpySA3fFDyCRxA+UUV+fA+rTWnuWvylOK/NCjhY+b4ocCtmu8TtsWb+mYeU+GCHf/S66KZF/AsteKHg==", + "dev": true, + "engines": { + "node": ">=0.9" + } + }, + "node_modules/qs": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "dev": true, + "dependencies": { + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", + "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", + "dev": true, + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/read-package-json": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-6.0.0.tgz", + "integrity": "sha512-b/9jxWJ8EwogJPpv99ma+QwtqB7FSl3+V6UXS7Aaay8/5VwMY50oIFooY1UKXMWpfNCM6T/PoGqa5GD1g9xf9w==", + "dev": true, + "dependencies": { + "glob": "^8.0.1", + "json-parse-even-better-errors": "^3.0.0", + "normalize-package-data": "^5.0.0", + "npm-normalize-package-bin": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/read-package-json-fast": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/read-package-json-fast/-/read-package-json-fast-3.0.1.tgz", + "integrity": "sha512-8+HW7Yo+cjfF+md8DqsZHgats2mxf7gGYow/+2JjxrftoHFZz9v4dzd0EubzYbkNaLxrTVcnllHwklXN2+7aTQ==", + "dev": true, + "dependencies": { + "json-parse-even-better-errors": "^3.0.0", + "npm-normalize-package-bin": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/read-package-json-fast/node_modules/json-parse-even-better-errors": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.0.tgz", + "integrity": "sha512-iZbGHafX/59r39gPwVPRBGw0QQKnA7tte5pSMrhWOW7swGsVvVTjmfyAV9pNqk8YGT7tRCdxRu8uzcgZwoDooA==", + "dev": true, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/read-package-json/node_modules/json-parse-even-better-errors": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.0.tgz", + "integrity": "sha512-iZbGHafX/59r39gPwVPRBGw0QQKnA7tte5pSMrhWOW7swGsVvVTjmfyAV9pNqk8YGT7tRCdxRu8uzcgZwoDooA==", + "dev": true, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/reflect-metadata": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz", + "integrity": "sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg==", + "dev": true + }, + "node_modules/regenerate": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", + "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", + "dev": true + }, + "node_modules/regenerate-unicode-properties": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.0.tgz", + "integrity": "sha512-d1VudCLoIGitcU/hEg2QqvyGZQmdC0Lf8BqdOMXGFSvJP4bNV1+XqbPQeHHLD51Jh4QJJ225dlIFvY4Ly6MXmQ==", + "dev": true, + "dependencies": { + "regenerate": "^1.4.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/regenerator-runtime": { + "version": "0.13.11", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", + "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==", + "dev": true + }, + "node_modules/regenerator-transform": { + "version": "0.15.1", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.15.1.tgz", + "integrity": "sha512-knzmNAcuyxV+gQCufkYcvOqX/qIIfHLv0u5x79kRxuGojfYVky1f15TzZEu2Avte8QGepvUNTnLskf8E6X6Vyg==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.8.4" + } + }, + "node_modules/regex-parser": { + "version": "2.2.11", + "resolved": "https://registry.npmjs.org/regex-parser/-/regex-parser-2.2.11.tgz", + "integrity": "sha512-jbD/FT0+9MBU2XAZluI7w2OBs1RBi6p9M83nkoZayQXXU9e8Robt69FcZc7wU4eJD/YFTjn1JdCk3rbMJajz8Q==", + "dev": true + }, + "node_modules/regexpu-core": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.2.2.tgz", + "integrity": "sha512-T0+1Zp2wjF/juXMrMxHxidqGYn8U4R+zleSJhX9tQ1PUsS8a9UtYfbsF9LdiVgNX3kiX8RNaKM42nfSgvFJjmw==", + "dev": true, + "dependencies": { + "regenerate": "^1.4.2", + "regenerate-unicode-properties": "^10.1.0", + "regjsgen": "^0.7.1", + "regjsparser": "^0.9.1", + "unicode-match-property-ecmascript": "^2.0.0", + "unicode-match-property-value-ecmascript": "^2.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/regjsgen": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.7.1.tgz", + "integrity": "sha512-RAt+8H2ZEzHeYWxZ3H2z6tF18zyyOnlcdaafLrm21Bguj7uZy6ULibiAFdXEtKQY4Sy7wDTwDiOazasMLc4KPA==", + "dev": true + }, + "node_modules/regjsparser": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.9.1.tgz", + "integrity": "sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ==", + "dev": true, + "dependencies": { + "jsesc": "~0.5.0" + }, + "bin": { + "regjsparser": "bin/parser" + } + }, + "node_modules/regjsparser/node_modules/jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==", + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", + "dev": true + }, + "node_modules/resolve": { + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "dev": true, + "dependencies": { + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve-url-loader": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-url-loader/-/resolve-url-loader-5.0.0.tgz", + "integrity": "sha512-uZtduh8/8srhBoMx//5bwqjQ+rfYOUq8zC9NrMUGtjBiGTtFJM42s58/36+hTqeqINcnYe08Nj3LkK9lW4N8Xg==", + "dev": true, + "dependencies": { + "adjust-sourcemap-loader": "^4.0.0", + "convert-source-map": "^1.7.0", + "loader-utils": "^2.0.0", + "postcss": "^8.2.14", + "source-map": "0.6.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/resolve-url-loader/node_modules/loader-utils": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", + "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", + "dev": true, + "dependencies": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + }, + "engines": { + "node": ">=8.9.0" + } + }, + "node_modules/resolve-url-loader/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/retry": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", + "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rfdc": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.0.tgz", + "integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==", + "dev": true + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/rimraf/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/run-async": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", + "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/rxjs": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.6.0.tgz", + "integrity": "sha512-DDa7d8TFNUalGC9VqXvQ1euWNN7sc63TrUCuM9J998+ViviahMIjKSOU7rfcgFOF+FCD71BhDRv4hrFz+ImDLQ==", + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "node_modules/sass": { + "version": "1.56.1", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.56.1.tgz", + "integrity": "sha512-VpEyKpyBPCxE7qGDtOcdJ6fFbcpOM+Emu7uZLxVrkX8KVU/Dp5UF7WLvzqRuUhB6mqqQt1xffLoG+AndxTZrCQ==", + "dev": true, + "dependencies": { + "chokidar": ">=3.0.0 <4.0.0", + "immutable": "^4.0.0", + "source-map-js": ">=0.6.2 <2.0.0" + }, + "bin": { + "sass": "sass.js" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/sass-loader": { + "version": "13.2.0", + "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-13.2.0.tgz", + "integrity": "sha512-JWEp48djQA4nbZxmgC02/Wh0eroSUutulROUusYJO9P9zltRbNN80JCBHqRGzjd4cmZCa/r88xgfkjGD0TXsHg==", + "dev": true, + "dependencies": { + "klona": "^2.0.4", + "neo-async": "^2.6.2" + }, + "engines": { + "node": ">= 14.15.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "fibers": ">= 3.1.0", + "node-sass": "^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0", + "sass": "^1.3.0", + "sass-embedded": "*", + "webpack": "^5.0.0" + }, + "peerDependenciesMeta": { + "fibers": { + "optional": true + }, + "node-sass": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + } + } + }, + "node_modules/sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "dev": true, + "optional": true + }, + "node_modules/schema-utils": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.0.0.tgz", + "integrity": "sha512-1edyXKgh6XnJsJSQ8mKWXnN/BVaIbFMLpouRUrXgVq7WYne5kw3MW7UPhO44uRXQSIpTSXoJbmrR2X0w9kUTyg==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.9", + "ajv": "^8.8.0", + "ajv-formats": "^2.1.1", + "ajv-keywords": "^5.0.0" + }, + "engines": { + "node": ">= 12.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/select-hose": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", + "integrity": "sha512-mEugaLK+YfkijB4fx0e6kImuJdCIt2LxCRcbEYPqRGCs4F2ogyfZU5IAZRdjCP8JPq2AtdNoC/Dux63d9Kiryg==", + "dev": true + }, + "node_modules/selfsigned": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-2.1.1.tgz", + "integrity": "sha512-GSL3aowiF7wa/WtSFwnUrludWFoNhftq8bUkH9pkzjpN2XSPOAYEgg6e0sS9s0rZwgJzJiQRPU18A6clnoW5wQ==", + "dev": true, + "dependencies": { + "node-forge": "^1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/semver": { + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/semver-dsl": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/semver-dsl/-/semver-dsl-1.0.1.tgz", + "integrity": "sha512-e8BOaTo007E3dMuQQTnPdalbKTABKNS7UxoBIDnwOqRa+QwMrCPjynB8zAlPF6xlqUfdLPPLIJ13hJNmhtq8Ng==", + "dev": true, + "dependencies": { + "semver": "^5.3.0" + } + }, + "node_modules/semver-dsl/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/semver/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/send": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "dev": true, + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/send/node_modules/debug/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + }, + "node_modules/send/node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "dev": true, + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/send/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "node_modules/send/node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/serialize-javascript": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", + "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "dev": true, + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "node_modules/serve-index": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", + "integrity": "sha512-pXHfKNP4qujrtteMrSBb0rc8HJ9Ms/GrXwcUtUtD5s4ewDJI8bT3Cz2zTVRMKtri49pLx2e0Ya8ziP5Ya2pZZw==", + "dev": true, + "dependencies": { + "accepts": "~1.3.4", + "batch": "0.6.1", + "debug": "2.6.9", + "escape-html": "~1.0.3", + "http-errors": "~1.6.2", + "mime-types": "~2.1.17", + "parseurl": "~1.3.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/serve-index/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/serve-index/node_modules/depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/serve-index/node_modules/http-errors": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "integrity": "sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A==", + "dev": true, + "dependencies": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": ">= 1.4.0 < 2" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/serve-index/node_modules/inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==", + "dev": true + }, + "node_modules/serve-index/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + }, + "node_modules/serve-index/node_modules/setprototypeof": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", + "dev": true + }, + "node_modules/serve-static": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", + "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", + "dev": true, + "dependencies": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.18.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", + "dev": true + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "dev": true + }, + "node_modules/shallow-clone": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", + "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", + "dev": true, + "dependencies": { + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, + "node_modules/slash": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz", + "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/smart-buffer": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "dev": true, + "engines": { + "node": ">= 6.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socket.io": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.5.4.tgz", + "integrity": "sha512-m3GC94iK9MfIEeIBfbhJs5BqFibMtkRk8ZpKwG2QwxV0m/eEhPIV4ara6XCF1LWNAus7z58RodiZlAH71U3EhQ==", + "dev": true, + "dependencies": { + "accepts": "~1.3.4", + "base64id": "~2.0.0", + "debug": "~4.3.2", + "engine.io": "~6.2.1", + "socket.io-adapter": "~2.4.0", + "socket.io-parser": "~4.2.1" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/socket.io-adapter": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.4.0.tgz", + "integrity": "sha512-W4N+o69rkMEGVuk2D/cvca3uYsvGlMwsySWV447y99gUPghxq42BxqLNMndb+a1mm/5/7NeXVQS7RLa2XyXvYg==", + "dev": true + }, + "node_modules/socket.io-parser": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.1.tgz", + "integrity": "sha512-V4GrkLy+HeF1F/en3SpUaM+7XxYXpuMUWLGde1kSSh5nQMN4hLrbPIkD+otwh6q9R6NOQBN4AMaOZ2zVjui82g==", + "dev": true, + "dependencies": { + "@socket.io/component-emitter": "~3.1.0", + "debug": "~4.3.1" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/sockjs": { + "version": "0.3.24", + "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.24.tgz", + "integrity": "sha512-GJgLTZ7vYb/JtPSSZ10hsOYIvEYsjbNU+zPdIHcUaWVNUEPivzxku31865sSSud0Da0W4lEeOPlmw93zLQchuQ==", + "dev": true, + "dependencies": { + "faye-websocket": "^0.11.3", + "uuid": "^8.3.2", + "websocket-driver": "^0.7.4" + } + }, + "node_modules/socks": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.1.tgz", + "integrity": "sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==", + "dev": true, + "dependencies": { + "ip": "^2.0.0", + "smart-buffer": "^4.2.0" + }, + "engines": { + "node": ">= 10.13.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks-proxy-agent": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-7.0.0.tgz", + "integrity": "sha512-Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww==", + "dev": true, + "dependencies": { + "agent-base": "^6.0.2", + "debug": "^4.3.3", + "socks": "^2.6.2" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/source-map": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", + "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/source-map-js": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-loader": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/source-map-loader/-/source-map-loader-4.0.1.tgz", + "integrity": "sha512-oqXpzDIByKONVY8g1NUPOTQhe0UTU5bWUl32GSkqK2LjJj0HmwTMVKxcUip0RgAYhY1mqgOxjbQM48a0mmeNfA==", + "dev": true, + "dependencies": { + "abab": "^2.0.6", + "iconv-lite": "^0.6.3", + "source-map-js": "^1.0.2" + }, + "engines": { + "node": ">= 14.15.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.72.1" + } + }, + "node_modules/source-map-loader/node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/source-map-support/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sourcemap-codec": { + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", + "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", + "deprecated": "Please use @jridgewell/sourcemap-codec instead", + "dev": true + }, + "node_modules/spdx-correct": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", + "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", + "dev": true, + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", + "dev": true + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.12", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.12.tgz", + "integrity": "sha512-rr+VVSXtRhO4OHbXUiAF7xW3Bo9DuuF6C5jH+q/x15j2jniycgKbxU09Hr0WqlSLUs4i4ltHGXqTe7VHclYWyA==", + "dev": true + }, + "node_modules/spdy": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/spdy/-/spdy-4.0.2.tgz", + "integrity": "sha512-r46gZQZQV+Kl9oItvl1JZZqJKGr+oEkB08A6BzkiR7593/7IbtuncXHd2YoYeTsG4157ZssMu9KYvUHLcjcDoA==", + "dev": true, + "dependencies": { + "debug": "^4.1.0", + "handle-thing": "^2.0.0", + "http-deceiver": "^1.2.7", + "select-hose": "^2.0.0", + "spdy-transport": "^3.0.0" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/spdy-transport": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-3.0.0.tgz", + "integrity": "sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw==", + "dev": true, + "dependencies": { + "debug": "^4.1.0", + "detect-node": "^2.0.4", + "hpack.js": "^2.1.6", + "obuf": "^1.1.2", + "readable-stream": "^3.0.6", + "wbuf": "^1.7.3" + } + }, + "node_modules/sprintf-js": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz", + "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==", + "dev": true + }, + "node_modules/ssri": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.1.tgz", + "integrity": "sha512-WVy6di9DlPOeBWEjMScpNipeSX2jIZBGEn5Uuo8Q7aIuFEuDX0pw8RxcOjlD1TWP4obi24ki7m/13+nFpcbXrw==", + "dev": true, + "dependencies": { + "minipass": "^4.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/ssri/node_modules/minipass": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.0.0.tgz", + "integrity": "sha512-g2Uuh2jEKoht+zvO6vJqXmYpflPqzRBT+Th2h01DKh5z7wbY/AZ2gCQ78cP70YoHPyFdY30YBV5WxgLOEwOykw==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/streamroller": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-3.1.3.tgz", + "integrity": "sha512-CphIJyFx2SALGHeINanjFRKQ4l7x2c+rXYJ4BMq0gd+ZK0gi4VT8b+eHe2wi58x4UayBAKx4xtHpXT/ea1cz8w==", + "dev": true, + "dependencies": { + "date-format": "^4.0.14", + "debug": "^4.3.4", + "fs-extra": "^8.1.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/symbol-observable": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-4.0.0.tgz", + "integrity": "sha512-b19dMThMV4HVFynSAM1++gBHAbk2Tc/osgLIBZMKsyqh34jb2e8Os7T6ZW/Bt3pJFdBTd2JwAnAAEQV7rSNvcQ==", + "dev": true, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/tapable": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/tar": { + "version": "6.1.13", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.13.tgz", + "integrity": "sha512-jdIBIN6LTIe2jqzay/2vtYLlBHa3JF42ot3h1dW8Q0PaAG4v8rm0cvpVePtau5C6OKXGGcgO9q2AMNSWxiLqKw==", + "dev": true, + "dependencies": { + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^4.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/tar/node_modules/minipass": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.0.0.tgz", + "integrity": "sha512-g2Uuh2jEKoht+zvO6vJqXmYpflPqzRBT+Th2h01DKh5z7wbY/AZ2gCQ78cP70YoHPyFdY30YBV5WxgLOEwOykw==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tar/node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/terser": { + "version": "5.15.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.15.1.tgz", + "integrity": "sha512-K1faMUvpm/FBxjBXud0LWVAGxmvoPbZbfTCYbSgaaYQaIXI3/TdI7a7ZGA73Zrou6Q8Zmz3oeUTsp/dj+ag2Xw==", + "dev": true, + "dependencies": { + "@jridgewell/source-map": "^0.3.2", + "acorn": "^8.5.0", + "commander": "^2.20.0", + "source-map-support": "~0.5.20" + }, + "bin": { + "terser": "bin/terser" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/terser-webpack-plugin": { + "version": "5.3.6", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.6.tgz", + "integrity": "sha512-kfLFk+PoLUQIbLmB1+PZDMRSZS99Mp+/MHqDNmMA6tOItzRt+Npe3E+fsMs5mfcM0wCtrrdU387UnV+vnSffXQ==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.14", + "jest-worker": "^27.4.5", + "schema-utils": "^3.1.1", + "serialize-javascript": "^6.0.0", + "terser": "^5.14.1" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.1.0" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "uglify-js": { + "optional": true + } + } + }, + "node_modules/terser-webpack-plugin/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/terser-webpack-plugin/node_modules/ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "dev": true, + "peerDependencies": { + "ajv": "^6.9.1" + } + }, + "node_modules/terser-webpack-plugin/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/terser-webpack-plugin/node_modules/schema-utils": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", + "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "dependencies": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/test-exclude/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/test-exclude/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/test-exclude/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true + }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "dev": true + }, + "node_modules/thunky": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz", + "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==", + "dev": true + }, + "node_modules/tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "dependencies": { + "os-tmpdir": "~1.0.2" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "dev": true, + "engines": { + "node": ">=0.6" + } + }, + "node_modules/tree-kill": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", + "dev": true, + "bin": { + "tree-kill": "cli.js" + } + }, + "node_modules/ts-node": { + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", + "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", + "dev": true, + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } + } + }, + "node_modules/tslib": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", + "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==" + }, + "node_modules/tslint": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-6.1.3.tgz", + "integrity": "sha512-IbR4nkT96EQOvKE2PW/djGz8iGNeJ4rF2mBfiYaR/nvUWYKJhLwimoJKgjIFEIDibBtOevj7BqCRL4oHeWWUCg==", + "deprecated": "TSLint has been deprecated in favor of ESLint. Please see https://github.com/palantir/tslint/issues/4534 for more information.", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.0.0", + "builtin-modules": "^1.1.1", + "chalk": "^2.3.0", + "commander": "^2.12.1", + "diff": "^4.0.1", + "glob": "^7.1.1", + "js-yaml": "^3.13.1", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.3", + "resolve": "^1.3.2", + "semver": "^5.3.0", + "tslib": "^1.13.0", + "tsutils": "^2.29.0" + }, + "bin": { + "tslint": "bin/tslint" + }, + "engines": { + "node": ">=4.8.0" + }, + "peerDependencies": { + "typescript": ">=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >=3.0.0-dev || >= 3.1.0-dev || >= 3.2.0-dev || >= 4.0.0-dev" + } + }, + "node_modules/tslint/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/tslint/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/tslint/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/tslint/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/tslint/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "node_modules/tsutils": { + "version": "2.29.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", + "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", + "dev": true, + "dependencies": { + "tslib": "^1.8.1" + }, + "peerDependencies": { + "typescript": ">=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >= 3.0.0-dev || >= 3.1.0-dev" + } + }, + "node_modules/tsutils/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "dev": true, + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/typed-assert": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/typed-assert/-/typed-assert-1.0.9.tgz", + "integrity": "sha512-KNNZtayBCtmnNmbo5mG47p1XsCyrx6iVqomjcZnec/1Y5GGARaxPs6r49RnSPeUP3YjNYiU9sQHAtY4BBvnZwg==", + "dev": true + }, + "node_modules/typescript": { + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz", + "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/ua-parser-js": { + "version": "0.7.32", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.32.tgz", + "integrity": "sha512-f9BESNVhzlhEFf2CHMSj40NWOjYPl1YKYbrvIr/hFTDEmLq7SRbWvm7FcdcpCYT95zrOhC7gZSxjdnnTpBcwVw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/ua-parser-js" + }, + { + "type": "paypal", + "url": "https://paypal.me/faisalman" + } + ], + "engines": { + "node": "*" + } + }, + "node_modules/unicode-canonical-property-names-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", + "integrity": "sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-match-property-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz", + "integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==", + "dev": true, + "dependencies": { + "unicode-canonical-property-names-ecmascript": "^2.0.0", + "unicode-property-aliases-ecmascript": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-match-property-value-ecmascript": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.1.0.tgz", + "integrity": "sha512-qxkjQt6qjg/mYscYMC0XKRn3Rh0wFPlfxB0xkt9CfyTvpX1Ra0+rAmdX2QyAobptSEvuy4RtpPRui6XkV+8wjA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-property-aliases-ecmascript": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.1.0.tgz", + "integrity": "sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/unique-filename": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-3.0.0.tgz", + "integrity": "sha512-afXhuC55wkAmZ0P18QsVE6kp8JaxrEokN2HGIoIVv2ijHQd419H0+6EigAFcIzXeMIkcIkNBpB3L/DXB3cTS/g==", + "dev": true, + "dependencies": { + "unique-slug": "^4.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/unique-slug": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-4.0.0.tgz", + "integrity": "sha512-WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ==", + "dev": true, + "dependencies": { + "imurmurhash": "^0.1.4" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true, + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz", + "integrity": "sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + } + ], + "dependencies": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + }, + "bin": { + "browserslist-lint": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "dev": true, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true, + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true + }, + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "node_modules/validate-npm-package-name": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-4.0.0.tgz", + "integrity": "sha512-mzR0L8ZDktZjpX4OB46KT+56MAhl4EIazWP/+G/HPGuvfdaqg4YsCdtOm6U9+LOFyYDoh4dpnpxZRB9MQQns5Q==", + "dev": true, + "dependencies": { + "builtins": "^5.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/void-elements": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-2.0.1.tgz", + "integrity": "sha512-qZKX4RnBzH2ugr8Lxa7x+0V6XD9Sb/ouARtiasEQCHB1EVU4NXtmHsDDrx1dO4ne5fc3J6EW05BP1Dl0z0iung==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/watchpack": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", + "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", + "dev": true, + "dependencies": { + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.1.2" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/wbuf": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz", + "integrity": "sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==", + "dev": true, + "dependencies": { + "minimalistic-assert": "^1.0.0" + } + }, + "node_modules/wcwidth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", + "dev": true, + "dependencies": { + "defaults": "^1.0.3" + } + }, + "node_modules/webpack": { + "version": "5.75.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.75.0.tgz", + "integrity": "sha512-piaIaoVJlqMsPtX/+3KTTO6jfvrSYgauFVdt8cr9LTHKmcq/AMd4mhzsiP7ZF/PGRNPGA8336jldh9l2Kt2ogQ==", + "dev": true, + "dependencies": { + "@types/eslint-scope": "^3.7.3", + "@types/estree": "^0.0.51", + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/wasm-edit": "1.11.1", + "@webassemblyjs/wasm-parser": "1.11.1", + "acorn": "^8.7.1", + "acorn-import-assertions": "^1.7.6", + "browserslist": "^4.14.5", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^5.10.0", + "es-module-lexer": "^0.9.0", + "eslint-scope": "5.1.1", + "events": "^3.2.0", + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.2.9", + "json-parse-even-better-errors": "^2.3.1", + "loader-runner": "^4.2.0", + "mime-types": "^2.1.27", + "neo-async": "^2.6.2", + "schema-utils": "^3.1.0", + "tapable": "^2.1.1", + "terser-webpack-plugin": "^5.1.3", + "watchpack": "^2.4.0", + "webpack-sources": "^3.2.3" + }, + "bin": { + "webpack": "bin/webpack.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependenciesMeta": { + "webpack-cli": { + "optional": true + } + } + }, + "node_modules/webpack-dev-middleware": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-5.3.3.tgz", + "integrity": "sha512-hj5CYrY0bZLB+eTO+x/j67Pkrquiy7kWepMHmUMoPsmcUaeEnQJqFzHJOyxgWlq746/wUuA64p9ta34Kyb01pA==", + "dev": true, + "dependencies": { + "colorette": "^2.0.10", + "memfs": "^3.4.3", + "mime-types": "^2.1.31", + "range-parser": "^1.2.1", + "schema-utils": "^4.0.0" + }, + "engines": { + "node": ">= 12.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^4.0.0 || ^5.0.0" + } + }, + "node_modules/webpack-dev-server": { + "version": "4.11.1", + "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-4.11.1.tgz", + "integrity": "sha512-lILVz9tAUy1zGFwieuaQtYiadImb5M3d+H+L1zDYalYoDl0cksAB1UNyuE5MMWJrG6zR1tXkCP2fitl7yoUJiw==", + "dev": true, + "dependencies": { + "@types/bonjour": "^3.5.9", + "@types/connect-history-api-fallback": "^1.3.5", + "@types/express": "^4.17.13", + "@types/serve-index": "^1.9.1", + "@types/serve-static": "^1.13.10", + "@types/sockjs": "^0.3.33", + "@types/ws": "^8.5.1", + "ansi-html-community": "^0.0.8", + "bonjour-service": "^1.0.11", + "chokidar": "^3.5.3", + "colorette": "^2.0.10", + "compression": "^1.7.4", + "connect-history-api-fallback": "^2.0.0", + "default-gateway": "^6.0.3", + "express": "^4.17.3", + "graceful-fs": "^4.2.6", + "html-entities": "^2.3.2", + "http-proxy-middleware": "^2.0.3", + "ipaddr.js": "^2.0.1", + "open": "^8.0.9", + "p-retry": "^4.5.0", + "rimraf": "^3.0.2", + "schema-utils": "^4.0.0", + "selfsigned": "^2.1.1", + "serve-index": "^1.9.1", + "sockjs": "^0.3.24", + "spdy": "^4.0.2", + "webpack-dev-middleware": "^5.3.1", + "ws": "^8.4.2" + }, + "bin": { + "webpack-dev-server": "bin/webpack-dev-server.js" + }, + "engines": { + "node": ">= 12.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^4.37.0 || ^5.0.0" + }, + "peerDependenciesMeta": { + "webpack-cli": { + "optional": true + } + } + }, + "node_modules/webpack-dev-server/node_modules/ws": { + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz", + "integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==", + "dev": true, + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/webpack-merge": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.8.0.tgz", + "integrity": "sha512-/SaI7xY0831XwP6kzuwhKWVKDP9t1QY1h65lAFLbZqMPIuYcD9QAW4u9STIbU9kaJbPBB/geU/gLr1wDjOhQ+Q==", + "dev": true, + "dependencies": { + "clone-deep": "^4.0.1", + "wildcard": "^2.0.0" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/webpack-sources": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", + "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", + "dev": true, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/webpack-subresource-integrity": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/webpack-subresource-integrity/-/webpack-subresource-integrity-5.1.0.tgz", + "integrity": "sha512-sacXoX+xd8r4WKsy9MvH/q/vBtEHr86cpImXwyg74pFIpERKt6FmB8cXpeuh0ZLgclOlHI4Wcll7+R5L02xk9Q==", + "dev": true, + "dependencies": { + "typed-assert": "^1.0.8" + }, + "engines": { + "node": ">= 12" + }, + "peerDependencies": { + "html-webpack-plugin": ">= 5.0.0-beta.1 < 6", + "webpack": "^5.12.0" + }, + "peerDependenciesMeta": { + "html-webpack-plugin": { + "optional": true + } + } + }, + "node_modules/webpack/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/webpack/node_modules/ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "dev": true, + "peerDependencies": { + "ajv": "^6.9.1" + } + }, + "node_modules/webpack/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/webpack/node_modules/schema-utils": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", + "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/websocket-driver": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz", + "integrity": "sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==", + "dev": true, + "dependencies": { + "http-parser-js": ">=0.5.1", + "safe-buffer": ">=5.1.0", + "websocket-extensions": ">=0.1.1" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/websocket-extensions": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz", + "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/wide-align": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", + "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", + "dev": true, + "dependencies": { + "string-width": "^1.0.2 || 2 || 3 || 4" + } + }, + "node_modules/wildcard": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.0.tgz", + "integrity": "sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==", + "dev": true + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/wrap-ansi/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true + }, + "node_modules/ws": { + "version": "8.2.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.2.3.tgz", + "integrity": "sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA==", + "dev": true, + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/yargs": { + "version": "17.6.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.6.2.tgz", + "integrity": "sha512-1/9UrdHjDZc0eOU0HxOHoS78C69UD3JRMvzlJ7S79S2nTaWRA/whGCTV8o9e/N/1Va9YIV7Q4sOxD8VV4pCWOw==", + "dev": true, + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/zone.js": { + "version": "0.11.8", + "resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.11.8.tgz", + "integrity": "sha512-82bctBg2hKcEJ21humWIkXRlLBBmrc3nN7DFh5LGGhcyycO2S7FN8NmdvlcKaGFDNVL4/9kFLmwmInTavdJERA==", + "dependencies": { + "tslib": "^2.3.0" + } + } + }, + "dependencies": { + "@ampproject/remapping": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", + "integrity": "sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==", + "dev": true, + "requires": { + "@jridgewell/gen-mapping": "^0.1.0", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, + "@angular-devkit/architect": { + "version": "0.1500.3", + "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1500.3.tgz", + "integrity": "sha512-LNVCyxMz5T9Fib7H3zT2sCE9fhvCUgJoCdT9nN/onDi6LoJx2uGdkVq3IgIsrxAR86pk2ZAR/1d5HdwohxbM8g==", + "dev": true, + "requires": { + "@angular-devkit/core": "15.0.3", + "rxjs": "6.6.7" + }, + "dependencies": { + "rxjs": { + "version": "6.6.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", + "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + }, + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + } + } + }, + "@angular-devkit/build-angular": { + "version": "15.0.3", + "resolved": "https://registry.npmjs.org/@angular-devkit/build-angular/-/build-angular-15.0.3.tgz", + "integrity": "sha512-I1/88tCzsqxHl85JrjbKLwHj++ohE9s8UHqmFguIULoh9+FCCQNGpccXLL+wEXtIFfLzugddiS8GO9WNE8T6Ig==", + "dev": true, + "requires": { + "@ampproject/remapping": "2.2.0", + "@angular-devkit/architect": "0.1500.3", + "@angular-devkit/build-webpack": "0.1500.3", + "@angular-devkit/core": "15.0.3", + "@babel/core": "7.20.2", + "@babel/generator": "7.20.4", + "@babel/helper-annotate-as-pure": "7.18.6", + "@babel/plugin-proposal-async-generator-functions": "7.20.1", + "@babel/plugin-transform-async-to-generator": "7.18.6", + "@babel/plugin-transform-runtime": "7.19.6", + "@babel/preset-env": "7.20.2", + "@babel/runtime": "7.20.1", + "@babel/template": "7.18.10", + "@discoveryjs/json-ext": "0.5.7", + "@ngtools/webpack": "15.0.3", + "ansi-colors": "4.1.3", + "autoprefixer": "10.4.13", + "babel-loader": "9.1.0", + "babel-plugin-istanbul": "6.1.1", + "browserslist": "4.21.4", + "cacache": "17.0.2", + "chokidar": "3.5.3", + "copy-webpack-plugin": "11.0.0", + "critters": "0.0.16", + "css-loader": "6.7.1", + "esbuild": "0.15.13", + "esbuild-wasm": "0.15.13", + "glob": "8.0.3", + "https-proxy-agent": "5.0.1", + "inquirer": "8.2.4", + "jsonc-parser": "3.2.0", + "karma-source-map-support": "1.4.0", + "less": "4.1.3", + "less-loader": "11.1.0", + "license-webpack-plugin": "4.0.2", + "loader-utils": "3.2.1", + "magic-string": "0.26.7", + "mini-css-extract-plugin": "2.6.1", + "open": "8.4.0", + "ora": "5.4.1", + "parse5-html-rewriting-stream": "6.0.1", + "piscina": "3.2.0", + "postcss": "8.4.19", + "postcss-loader": "7.0.1", + "resolve-url-loader": "5.0.0", + "rxjs": "6.6.7", + "sass": "1.56.1", + "sass-loader": "13.2.0", + "semver": "7.3.8", + "source-map-loader": "4.0.1", + "source-map-support": "0.5.21", + "terser": "5.15.1", + "text-table": "0.2.0", + "tree-kill": "1.2.2", + "tslib": "2.4.1", + "webpack": "5.75.0", + "webpack-dev-middleware": "5.3.3", + "webpack-dev-server": "4.11.1", + "webpack-merge": "5.8.0", + "webpack-subresource-integrity": "5.1.0" + }, + "dependencies": { + "rxjs": { + "version": "6.6.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", + "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + }, + "dependencies": { + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + } + } + } + } + }, + "@angular-devkit/build-webpack": { + "version": "0.1500.3", + "resolved": "https://registry.npmjs.org/@angular-devkit/build-webpack/-/build-webpack-0.1500.3.tgz", + "integrity": "sha512-PUkYJFFl7hUwi+rm47xVSXwbWabogZVU0ipbncZPO/QrsX2yEuFT8rRvkplmSt1Y45rGTI58lcKj5aM4N3+Meg==", + "dev": true, + "requires": { + "@angular-devkit/architect": "0.1500.3", + "rxjs": "6.6.7" + }, + "dependencies": { + "rxjs": { + "version": "6.6.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", + "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + }, + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + } + } + }, + "@angular-devkit/core": { + "version": "15.0.3", + "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-15.0.3.tgz", + "integrity": "sha512-sJsC1uZnOs66uTEGS6E/FlMInERvChIC1oUwfgP4NMYFy4KLkzTDYZ+JAtK5/k418N+j0aS+DndfrRT3n7WNUw==", + "dev": true, + "requires": { + "ajv": "8.11.0", + "ajv-formats": "2.1.1", + "jsonc-parser": "3.2.0", + "rxjs": "6.6.7", + "source-map": "0.7.4" + }, + "dependencies": { + "rxjs": { + "version": "6.6.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", + "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + }, + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + } + } + }, + "@angular-devkit/schematics": { + "version": "15.0.3", + "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-15.0.3.tgz", + "integrity": "sha512-vIS8XaH3pyWql1G4Nux7EplQsph3FiMXd6U/YV9YK0g1U0k0Rh8w+9zM4yrRbrNf2BKrx1VObS0n6ibGrm1TwA==", + "dev": true, + "requires": { + "@angular-devkit/core": "15.0.3", + "jsonc-parser": "3.2.0", + "magic-string": "0.26.7", + "ora": "5.4.1", + "rxjs": "6.6.7" + }, + "dependencies": { + "rxjs": { + "version": "6.6.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", + "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + }, + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + } + } + }, + "@angular/animations": { + "version": "15.0.3", + "resolved": "https://registry.npmjs.org/@angular/animations/-/animations-15.0.3.tgz", + "integrity": "sha512-kwUprQMjMvMawpyd5aLzW9DWLd7grlzm4ut4YIqXRf1UJm35KsTjwhvQWNj481u2gUjKxD2rBfkVakyzW5Na3A==", + "requires": { + "tslib": "^2.3.0" + } + }, + "@angular/cli": { + "version": "15.0.3", + "resolved": "https://registry.npmjs.org/@angular/cli/-/cli-15.0.3.tgz", + "integrity": "sha512-xLmsSkGeTxkHYHmsThT3mnethXt3VN71e+lOGs+GobJb3R2Lh8FrU07bsr5at/ixaSC/Ejvvt9dhuwZonysDEQ==", + "dev": true, + "requires": { + "@angular-devkit/architect": "0.1500.3", + "@angular-devkit/core": "15.0.3", + "@angular-devkit/schematics": "15.0.3", + "@schematics/angular": "15.0.3", + "@yarnpkg/lockfile": "1.1.0", + "ansi-colors": "4.1.3", + "ini": "3.0.1", + "inquirer": "8.2.4", + "jsonc-parser": "3.2.0", + "npm-package-arg": "9.1.2", + "npm-pick-manifest": "8.0.1", + "open": "8.4.0", + "ora": "5.4.1", + "pacote": "15.0.6", + "resolve": "1.22.1", + "semver": "7.3.8", + "symbol-observable": "4.0.0", + "yargs": "17.6.2" + } + }, + "@angular/common": { + "version": "15.0.3", + "resolved": "https://registry.npmjs.org/@angular/common/-/common-15.0.3.tgz", + "integrity": "sha512-TYpNnP6f7+x+FqyFCjl+D7rqJojMJT3QURwbnKsZYO7gsfoKashgrLxd9f3lQpa9EHvdMsVZWGZuPmoerGQ5qg==", + "requires": { + "tslib": "^2.3.0" + } + }, + "@angular/compiler": { + "version": "15.0.3", + "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-15.0.3.tgz", + "integrity": "sha512-LNQkQgjAy43ZbQcoUzbzwaCokl6LQHhnTnGIO8s8ZWFT9cTRORsLb/ziMKPPIWlSUImHUG4NH0dK7fVe7/eAng==", + "requires": { + "tslib": "^2.3.0" + } + }, + "@angular/compiler-cli": { + "version": "15.0.3", + "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-15.0.3.tgz", + "integrity": "sha512-3IH1Ns4Ed/VFQlNNtgIcorht7JK7SoBzpbxrbqjogoHZwUR3OTn+dvX87N7zMn0yxAL0T6Jv0UTILcGY0EP9HQ==", + "dev": true, + "requires": { + "@babel/core": "^7.17.2", + "chokidar": "^3.0.0", + "convert-source-map": "^1.5.1", + "dependency-graph": "^0.11.0", + "magic-string": "^0.27.0", + "reflect-metadata": "^0.1.2", + "semver": "^7.0.0", + "sourcemap-codec": "^1.4.8", + "tslib": "^2.3.0", + "yargs": "^17.2.1" + }, + "dependencies": { + "magic-string": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.27.0.tgz", + "integrity": "sha512-8UnnX2PeRAPZuN12svgR9j7M1uWMovg/CEnIwIG0LFkXSJJe4PdfUGiTGl8V9bsBHFUtfVINcSyYxd7q+kx9fA==", + "dev": true, + "requires": { + "@jridgewell/sourcemap-codec": "^1.4.13" + } + } + } + }, + "@angular/core": { + "version": "15.0.3", + "resolved": "https://registry.npmjs.org/@angular/core/-/core-15.0.3.tgz", + "integrity": "sha512-tYQszxkk32RZkMA7Czv9l5apiDIsoqVO2taIuPKfesAcwsQ7z/x3JTu3JkwUnB9c9nq2c18wIzjzMs4iElxdVQ==", + "requires": { + "tslib": "^2.3.0" + } + }, + "@angular/forms": { + "version": "15.0.3", + "resolved": "https://registry.npmjs.org/@angular/forms/-/forms-15.0.3.tgz", + "integrity": "sha512-oPc1lpXvwFM1QHPxsayIlZ9C4/mmFrvdnSV/x/IzHDZpgqZyLT2rnDJxqpxn7KCcn71bPdU94fKTI6Fbnkj/dQ==", + "requires": { + "tslib": "^2.3.0" + } + }, + "@angular/language-service": { + "version": "15.0.3", + "resolved": "https://registry.npmjs.org/@angular/language-service/-/language-service-15.0.3.tgz", + "integrity": "sha512-Sa/gIzJKYC0Zb5LpR3HMLhbNlV/7kZQk99TVp0CREBxmHcjw01TC4+HIzgIgEq2Q1iO2qVUbpkClNf8q6Q/Ocw==", + "dev": true + }, + "@angular/platform-browser": { + "version": "15.0.3", + "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-15.0.3.tgz", + "integrity": "sha512-XIgAh6/SI4m2JfFdtKWmh8BVPzs3gV8VuOVYdykWrYrhDCVz5X3J7AXGxn9AX1S+dMuQPi91lM1icErunVrCZQ==", + "requires": { + "tslib": "^2.3.0" + } + }, + "@angular/platform-browser-dynamic": { + "version": "15.0.3", + "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-15.0.3.tgz", + "integrity": "sha512-+hdywxDegUGftq+teqQDmQ22seyR25qSPna60PxZIpQxi4D8+sNm9PxSGIn4pZtxN9gpg78j69yUM0E2OwVbjQ==", + "requires": { + "tslib": "^2.3.0" + } + }, + "@angular/router": { + "version": "15.0.3", + "resolved": "https://registry.npmjs.org/@angular/router/-/router-15.0.3.tgz", + "integrity": "sha512-Mym1qasRBLTwlwFHlWamrgvTXl09Uej2LTgqCD6Jg9uFQ/F+16qsSqTy107WkeJbsBzL95+rx66VtvwB//M45w==", + "requires": { + "tslib": "^2.3.0" + } + }, + "@assemblyscript/loader": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/@assemblyscript/loader/-/loader-0.10.1.tgz", + "integrity": "sha512-H71nDOOL8Y7kWRLqf6Sums+01Q5msqBW2KhDUTemh1tvY04eSkSXrK0uj/4mmY0Xr16/3zyZmsrxN7CKuRbNRg==", + "dev": true + }, + "@babel/code-frame": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", + "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", + "dev": true, + "requires": { + "@babel/highlight": "^7.18.6" + } + }, + "@babel/compat-data": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.20.5.tgz", + "integrity": "sha512-KZXo2t10+/jxmkhNXc7pZTqRvSOIvVv/+lJwHS+B2rErwOyjuVRh60yVpb7liQ1U5t7lLJ1bz+t8tSypUZdm0g==", + "dev": true + }, + "@babel/core": { + "version": "7.20.2", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.20.2.tgz", + "integrity": "sha512-w7DbG8DtMrJcFOi4VrLm+8QM4az8Mo+PuLBKLp2zrYRCow8W/f9xiXm5sN53C8HksCyDQwCKha9JiDoIyPjT2g==", + "dev": true, + "requires": { + "@ampproject/remapping": "^2.1.0", + "@babel/code-frame": "^7.18.6", + "@babel/generator": "^7.20.2", + "@babel/helper-compilation-targets": "^7.20.0", + "@babel/helper-module-transforms": "^7.20.2", + "@babel/helpers": "^7.20.1", + "@babel/parser": "^7.20.2", + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.20.1", + "@babel/types": "^7.20.2", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.1", + "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, + "@babel/generator": { + "version": "7.20.4", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.20.4.tgz", + "integrity": "sha512-luCf7yk/cm7yab6CAW1aiFnmEfBJplb/JojV56MYEK7ziWfGmFlTfmL9Ehwfy4gFhbjBfWO1wj7/TuSbVNEEtA==", + "dev": true, + "requires": { + "@babel/types": "^7.20.2", + "@jridgewell/gen-mapping": "^0.3.2", + "jsesc": "^2.5.1" + }, + "dependencies": { + "@jridgewell/gen-mapping": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", + "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "dev": true, + "requires": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + } + } + } + }, + "@babel/helper-annotate-as-pure": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz", + "integrity": "sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA==", + "dev": true, + "requires": { + "@babel/types": "^7.18.6" + } + }, + "@babel/helper-builder-binary-assignment-operator-visitor": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.18.9.tgz", + "integrity": "sha512-yFQ0YCHoIqarl8BCRwBL8ulYUaZpz3bNsA7oFepAzee+8/+ImtADXNOmO5vJvsPff3qi+hvpkY/NYBTrBQgdNw==", + "dev": true, + "requires": { + "@babel/helper-explode-assignable-expression": "^7.18.6", + "@babel/types": "^7.18.9" + } + }, + "@babel/helper-compilation-targets": { + "version": "7.20.0", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.0.tgz", + "integrity": "sha512-0jp//vDGp9e8hZzBc6N/KwA5ZK3Wsm/pfm4CrY7vzegkVxc65SgSn6wYOnwHe9Js9HRQ1YTCKLGPzDtaS3RoLQ==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.20.0", + "@babel/helper-validator-option": "^7.18.6", + "browserslist": "^4.21.3", + "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, + "@babel/helper-create-class-features-plugin": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.20.5.tgz", + "integrity": "sha512-3RCdA/EmEaikrhayahwToF0fpweU/8o2p8vhc1c/1kftHOdTKuC65kik/TLc+qfbS8JKw4qqJbne4ovICDhmww==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-function-name": "^7.19.0", + "@babel/helper-member-expression-to-functions": "^7.18.9", + "@babel/helper-optimise-call-expression": "^7.18.6", + "@babel/helper-replace-supers": "^7.19.1", + "@babel/helper-split-export-declaration": "^7.18.6" + } + }, + "@babel/helper-create-regexp-features-plugin": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.20.5.tgz", + "integrity": "sha512-m68B1lkg3XDGX5yCvGO0kPx3v9WIYLnzjKfPcQiwntEQa5ZeRkPmo2X/ISJc8qxWGfwUr+kvZAeEzAwLec2r2w==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.18.6", + "regexpu-core": "^5.2.1" + } + }, + "@babel/helper-define-polyfill-provider": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.3.tgz", + "integrity": "sha512-z5aQKU4IzbqCC1XH0nAqfsFLMVSo22SBKUc0BxGrLkolTdPTructy0ToNnlO2zA4j9Q/7pjMZf0DSY+DSTYzww==", + "dev": true, + "requires": { + "@babel/helper-compilation-targets": "^7.17.7", + "@babel/helper-plugin-utils": "^7.16.7", + "debug": "^4.1.1", + "lodash.debounce": "^4.0.8", + "resolve": "^1.14.2", + "semver": "^6.1.2" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, + "@babel/helper-environment-visitor": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz", + "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==", + "dev": true + }, + "@babel/helper-explode-assignable-expression": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.18.6.tgz", + "integrity": "sha512-eyAYAsQmB80jNfg4baAtLeWAQHfHFiR483rzFK+BhETlGZaQC9bsfrugfXDCbRHLQbIA7U5NxhhOxN7p/dWIcg==", + "dev": true, + "requires": { + "@babel/types": "^7.18.6" + } + }, + "@babel/helper-function-name": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz", + "integrity": "sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w==", + "dev": true, + "requires": { + "@babel/template": "^7.18.10", + "@babel/types": "^7.19.0" + } + }, + "@babel/helper-hoist-variables": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", + "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", + "dev": true, + "requires": { + "@babel/types": "^7.18.6" + } + }, + "@babel/helper-member-expression-to-functions": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.18.9.tgz", + "integrity": "sha512-RxifAh2ZoVU67PyKIO4AMi1wTenGfMR/O/ae0CCRqwgBAt5v7xjdtRw7UoSbsreKrQn5t7r89eruK/9JjYHuDg==", + "dev": true, + "requires": { + "@babel/types": "^7.18.9" + } + }, + "@babel/helper-module-imports": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz", + "integrity": "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==", + "dev": true, + "requires": { + "@babel/types": "^7.18.6" + } + }, + "@babel/helper-module-transforms": { + "version": "7.20.2", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.20.2.tgz", + "integrity": "sha512-zvBKyJXRbmK07XhMuujYoJ48B5yvvmM6+wcpv6Ivj4Yg6qO7NOZOSnvZN9CRl1zz1Z4cKf8YejmCMh8clOoOeA==", + "dev": true, + "requires": { + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-module-imports": "^7.18.6", + "@babel/helper-simple-access": "^7.20.2", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/helper-validator-identifier": "^7.19.1", + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.20.1", + "@babel/types": "^7.20.2" + } + }, + "@babel/helper-optimise-call-expression": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz", + "integrity": "sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA==", + "dev": true, + "requires": { + "@babel/types": "^7.18.6" + } + }, + "@babel/helper-plugin-utils": { + "version": "7.20.2", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.20.2.tgz", + "integrity": "sha512-8RvlJG2mj4huQ4pZ+rU9lqKi9ZKiRmuvGuM2HlWmkmgOhbs6zEAw6IEiJ5cQqGbDzGZOhwuOQNtZMi/ENLjZoQ==", + "dev": true + }, + "@babel/helper-remap-async-to-generator": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.18.9.tgz", + "integrity": "sha512-dI7q50YKd8BAv3VEfgg7PS7yD3Rtbi2J1XMXaalXO0W0164hYLnh8zpjRS0mte9MfVp/tltvr/cfdXPvJr1opA==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-wrap-function": "^7.18.9", + "@babel/types": "^7.18.9" + } + }, + "@babel/helper-replace-supers": { + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.19.1.tgz", + "integrity": "sha512-T7ahH7wV0Hfs46SFh5Jz3s0B6+o8g3c+7TMxu7xKfmHikg7EAZ3I2Qk9LFhjxXq8sL7UkP5JflezNwoZa8WvWw==", + "dev": true, + "requires": { + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-member-expression-to-functions": "^7.18.9", + "@babel/helper-optimise-call-expression": "^7.18.6", + "@babel/traverse": "^7.19.1", + "@babel/types": "^7.19.0" + } + }, + "@babel/helper-simple-access": { + "version": "7.20.2", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.20.2.tgz", + "integrity": "sha512-+0woI/WPq59IrqDYbVGfshjT5Dmk/nnbdpcF8SnMhhXObpTq2KNBdLFRFrkVdbDOyUmHBCxzm5FHV1rACIkIbA==", + "dev": true, + "requires": { + "@babel/types": "^7.20.2" + } + }, + "@babel/helper-skip-transparent-expression-wrappers": { + "version": "7.20.0", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.20.0.tgz", + "integrity": "sha512-5y1JYeNKfvnT8sZcK9DVRtpTbGiomYIHviSP3OQWmDPU3DeH4a1ZlT/N2lyQ5P8egjcRaT/Y9aNqUxK0WsnIIg==", + "dev": true, + "requires": { + "@babel/types": "^7.20.0" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", + "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", + "dev": true, + "requires": { + "@babel/types": "^7.18.6" + } + }, + "@babel/helper-string-parser": { + "version": "7.19.4", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz", + "integrity": "sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw==", + "dev": true + }, + "@babel/helper-validator-identifier": { + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", + "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", + "dev": true + }, + "@babel/helper-validator-option": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz", + "integrity": "sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==", + "dev": true + }, + "@babel/helper-wrap-function": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.20.5.tgz", + "integrity": "sha512-bYMxIWK5mh+TgXGVqAtnu5Yn1un+v8DDZtqyzKRLUzrh70Eal2O3aZ7aPYiMADO4uKlkzOiRiZ6GX5q3qxvW9Q==", + "dev": true, + "requires": { + "@babel/helper-function-name": "^7.19.0", + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.20.5", + "@babel/types": "^7.20.5" + } + }, + "@babel/helpers": { + "version": "7.20.6", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.20.6.tgz", + "integrity": "sha512-Pf/OjgfgFRW5bApskEz5pvidpim7tEDPlFtKcNRXWmfHGn9IEI2W2flqRQXTFb7gIPTyK++N6rVHuwKut4XK6w==", + "dev": true, + "requires": { + "@babel/template": "^7.18.10", + "@babel/traverse": "^7.20.5", + "@babel/types": "^7.20.5" + } + }, + "@babel/highlight": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", + "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.18.6", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + } + }, + "@babel/parser": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.5.tgz", + "integrity": "sha512-r27t/cy/m9uKLXQNWWebeCUHgnAZq0CpG1OwKRxzJMP1vpSU4bSIK2hq+/cp0bQxetkXx38n09rNu8jVkcK/zA==", + "dev": true + }, + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.18.6.tgz", + "integrity": "sha512-Dgxsyg54Fx1d4Nge8UnvTrED63vrwOdPmyvPzlNN/boaliRP54pm3pGzZD1SJUwrBA+Cs/xdG8kXX6Mn/RfISQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.18.9.tgz", + "integrity": "sha512-AHrP9jadvH7qlOj6PINbgSuphjQUAK7AOT7DPjBo9EHoLhQTnnK5u45e1Hd4DbSQEO9nqPWtQ89r+XEOWFScKg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.9", + "@babel/helper-skip-transparent-expression-wrappers": "^7.18.9", + "@babel/plugin-proposal-optional-chaining": "^7.18.9" + } + }, + "@babel/plugin-proposal-async-generator-functions": { + "version": "7.20.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.20.1.tgz", + "integrity": "sha512-Gh5rchzSwE4kC+o/6T8waD0WHEQIsDmjltY8WnWRXHUdH8axZhuH86Ov9M72YhJfDrZseQwuuWaaIT/TmePp3g==", + "dev": true, + "requires": { + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-plugin-utils": "^7.19.0", + "@babel/helper-remap-async-to-generator": "^7.18.9", + "@babel/plugin-syntax-async-generators": "^7.8.4" + } + }, + "@babel/plugin-proposal-class-properties": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.18.6.tgz", + "integrity": "sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ==", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-proposal-class-static-block": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.18.6.tgz", + "integrity": "sha512-+I3oIiNxrCpup3Gi8n5IGMwj0gOCAjcJUSQEcotNnCCPMEnixawOQ+KeJPlgfjzx+FKQ1QSyZOWe7wmoJp7vhw==", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-class-static-block": "^7.14.5" + } + }, + "@babel/plugin-proposal-dynamic-import": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.18.6.tgz", + "integrity": "sha512-1auuwmK+Rz13SJj36R+jqFPMJWyKEDd7lLSdOj4oJK0UTgGueSAtkrCvz9ewmgyU/P941Rv2fQwZJN8s6QruXw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-dynamic-import": "^7.8.3" + } + }, + "@babel/plugin-proposal-export-namespace-from": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.18.9.tgz", + "integrity": "sha512-k1NtHyOMvlDDFeb9G5PhUXuGj8m/wiwojgQVEhJ/fsVsMCpLyOP4h0uGEjYJKrRI+EVPlb5Jk+Gt9P97lOGwtA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.9", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3" + } + }, + "@babel/plugin-proposal-json-strings": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.18.6.tgz", + "integrity": "sha512-lr1peyn9kOdbYc0xr0OdHTZ5FMqS6Di+H0Fz2I/JwMzGmzJETNeOFq2pBySw6X/KFL5EWDjlJuMsUGRFb8fQgQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-json-strings": "^7.8.3" + } + }, + "@babel/plugin-proposal-logical-assignment-operators": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.18.9.tgz", + "integrity": "sha512-128YbMpjCrP35IOExw2Fq+x55LMP42DzhOhX2aNNIdI9avSWl2PI0yuBWarr3RYpZBSPtabfadkH2yeRiMD61Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.9", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" + } + }, + "@babel/plugin-proposal-nullish-coalescing-operator": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.18.6.tgz", + "integrity": "sha512-wQxQzxYeJqHcfppzBDnm1yAY0jSRkUXR2z8RePZYrKwMKgMlE8+Z6LUno+bd6LvbGh8Gltvy74+9pIYkr+XkKA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" + } + }, + "@babel/plugin-proposal-numeric-separator": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.18.6.tgz", + "integrity": "sha512-ozlZFogPqoLm8WBr5Z8UckIoE4YQ5KESVcNudyXOR8uqIkliTEgJ3RoketfG6pmzLdeZF0H/wjE9/cCEitBl7Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-numeric-separator": "^7.10.4" + } + }, + "@babel/plugin-proposal-object-rest-spread": { + "version": "7.20.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.20.2.tgz", + "integrity": "sha512-Ks6uej9WFK+fvIMesSqbAto5dD8Dz4VuuFvGJFKgIGSkJuRGcrwGECPA1fDgQK3/DbExBJpEkTeYeB8geIFCSQ==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.20.1", + "@babel/helper-compilation-targets": "^7.20.0", + "@babel/helper-plugin-utils": "^7.20.2", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-transform-parameters": "^7.20.1" + } + }, + "@babel/plugin-proposal-optional-catch-binding": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.18.6.tgz", + "integrity": "sha512-Q40HEhs9DJQyaZfUjjn6vE8Cv4GmMHCYuMGIWUnlxH6400VGxOuwWsPt4FxXxJkC/5eOzgn0z21M9gMT4MOhbw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" + } + }, + "@babel/plugin-proposal-optional-chaining": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.18.9.tgz", + "integrity": "sha512-v5nwt4IqBXihxGsW2QmCWMDS3B3bzGIk/EQVZz2ei7f3NJl8NzAJVvUmpDW5q1CRNY+Beb/k58UAH1Km1N411w==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.9", + "@babel/helper-skip-transparent-expression-wrappers": "^7.18.9", + "@babel/plugin-syntax-optional-chaining": "^7.8.3" + } + }, + "@babel/plugin-proposal-private-methods": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.18.6.tgz", + "integrity": "sha512-nutsvktDItsNn4rpGItSNV2sz1XwS+nfU0Rg8aCx3W3NOKVzdMjJRu0O5OkgDp3ZGICSTbgRpxZoWsxoKRvbeA==", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-proposal-private-property-in-object": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.20.5.tgz", + "integrity": "sha512-Vq7b9dUA12ByzB4EjQTPo25sFhY+08pQDBSZRtUAkj7lb7jahaHR5igera16QZ+3my1nYR4dKsNdYj5IjPHilQ==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-create-class-features-plugin": "^7.20.5", + "@babel/helper-plugin-utils": "^7.20.2", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5" + } + }, + "@babel/plugin-proposal-unicode-property-regex": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.18.6.tgz", + "integrity": "sha512-2BShG/d5yoZyXZfVePH91urL5wTG6ASZU9M4o03lKK8u8UW1y08OMttBSOADTcJrnPMpvDXRG3G8fyLh4ovs8w==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-syntax-class-static-block": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", + "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-syntax-dynamic-import": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", + "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-export-namespace-from": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", + "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-syntax-import-assertions": { + "version": "7.20.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.20.0.tgz", + "integrity": "sha512-IUh1vakzNoWalR8ch/areW7qFopR2AEw03JlG7BbrDqmQ4X3q9uuipQwSGrUn7oGiemKjtSLDhNtQHzMHr1JdQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.19.0" + } + }, + "@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-private-property-in-object": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", + "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-arrow-functions": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.18.6.tgz", + "integrity": "sha512-9S9X9RUefzrsHZmKMbDXxweEH+YlE8JJEuat9FdvW9Qh1cw7W64jELCtWNkPBPX5En45uy28KGvA/AySqUh8CQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-async-to-generator": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.18.6.tgz", + "integrity": "sha512-ARE5wZLKnTgPW7/1ftQmSi1CmkqqHo2DNmtztFhvgtOWSDfq0Cq9/9L+KnZNYSNrydBekhW3rwShduf59RoXag==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-remap-async-to-generator": "^7.18.6" + } + }, + "@babel/plugin-transform-block-scoped-functions": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.18.6.tgz", + "integrity": "sha512-ExUcOqpPWnliRcPqves5HJcJOvHvIIWfuS4sroBUenPuMdmW+SMHDakmtS7qOo13sVppmUijqeTv7qqGsvURpQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-block-scoping": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.20.5.tgz", + "integrity": "sha512-WvpEIW9Cbj9ApF3yJCjIEEf1EiNJLtXagOrL5LNWEZOo3jv8pmPoYTSNJQvqej8OavVlgOoOPw6/htGZro6IkA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.20.2" + } + }, + "@babel/plugin-transform-classes": { + "version": "7.20.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.20.2.tgz", + "integrity": "sha512-9rbPp0lCVVoagvtEyQKSo5L8oo0nQS/iif+lwlAz29MccX2642vWDlSZK+2T2buxbopotId2ld7zZAzRfz9j1g==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-compilation-targets": "^7.20.0", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-function-name": "^7.19.0", + "@babel/helper-optimise-call-expression": "^7.18.6", + "@babel/helper-plugin-utils": "^7.20.2", + "@babel/helper-replace-supers": "^7.19.1", + "@babel/helper-split-export-declaration": "^7.18.6", + "globals": "^11.1.0" + } + }, + "@babel/plugin-transform-computed-properties": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.18.9.tgz", + "integrity": "sha512-+i0ZU1bCDymKakLxn5srGHrsAPRELC2WIbzwjLhHW9SIE1cPYkLCL0NlnXMZaM1vhfgA2+M7hySk42VBvrkBRw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.9" + } + }, + "@babel/plugin-transform-destructuring": { + "version": "7.20.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.20.2.tgz", + "integrity": "sha512-mENM+ZHrvEgxLTBXUiQ621rRXZes3KWUv6NdQlrnr1TkWVw+hUjQBZuP2X32qKlrlG2BzgR95gkuCRSkJl8vIw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.20.2" + } + }, + "@babel/plugin-transform-dotall-regex": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.18.6.tgz", + "integrity": "sha512-6S3jpun1eEbAxq7TdjLotAsl4WpQI9DxfkycRcKrjhQYzU87qpXdknpBg/e+TdcMehqGnLFi7tnFUBR02Vq6wg==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-duplicate-keys": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.18.9.tgz", + "integrity": "sha512-d2bmXCtZXYc59/0SanQKbiWINadaJXqtvIQIzd4+hNwkWBgyCd5F/2t1kXoUdvPMrxzPvhK6EMQRROxsue+mfw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.9" + } + }, + "@babel/plugin-transform-exponentiation-operator": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.18.6.tgz", + "integrity": "sha512-wzEtc0+2c88FVR34aQmiz56dxEkxr2g8DQb/KfaFa1JYXOFVsbhvAonFN6PwVWj++fKmku8NP80plJ5Et4wqHw==", + "dev": true, + "requires": { + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-for-of": { + "version": "7.18.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.18.8.tgz", + "integrity": "sha512-yEfTRnjuskWYo0k1mHUqrVWaZwrdq8AYbfrpqULOJOaucGSp4mNMVps+YtA8byoevxS/urwU75vyhQIxcCgiBQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-function-name": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.18.9.tgz", + "integrity": "sha512-WvIBoRPaJQ5yVHzcnJFor7oS5Ls0PYixlTYE63lCj2RtdQEl15M68FXQlxnG6wdraJIXRdR7KI+hQ7q/9QjrCQ==", + "dev": true, + "requires": { + "@babel/helper-compilation-targets": "^7.18.9", + "@babel/helper-function-name": "^7.18.9", + "@babel/helper-plugin-utils": "^7.18.9" + } + }, + "@babel/plugin-transform-literals": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.18.9.tgz", + "integrity": "sha512-IFQDSRoTPnrAIrI5zoZv73IFeZu2dhu6irxQjY9rNjTT53VmKg9fenjvoiOWOkJ6mm4jKVPtdMzBY98Fp4Z4cg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.9" + } + }, + "@babel/plugin-transform-member-expression-literals": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.18.6.tgz", + "integrity": "sha512-qSF1ihLGO3q+/g48k85tUjD033C29TNTVB2paCwZPVmOsjn9pClvYYrM2VeJpBY2bcNkuny0YUyTNRyRxJ54KA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-modules-amd": { + "version": "7.19.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.19.6.tgz", + "integrity": "sha512-uG3od2mXvAtIFQIh0xrpLH6r5fpSQN04gIVovl+ODLdUMANokxQLZnPBHcjmv3GxRjnqwLuHvppjjcelqUFZvg==", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.19.6", + "@babel/helper-plugin-utils": "^7.19.0" + } + }, + "@babel/plugin-transform-modules-commonjs": { + "version": "7.19.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.19.6.tgz", + "integrity": "sha512-8PIa1ym4XRTKuSsOUXqDG0YaOlEuTVvHMe5JCfgBMOtHvJKw/4NGovEGN33viISshG/rZNVrACiBmPQLvWN8xQ==", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.19.6", + "@babel/helper-plugin-utils": "^7.19.0", + "@babel/helper-simple-access": "^7.19.4" + } + }, + "@babel/plugin-transform-modules-systemjs": { + "version": "7.19.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.19.6.tgz", + "integrity": "sha512-fqGLBepcc3kErfR9R3DnVpURmckXP7gj7bAlrTQyBxrigFqszZCkFkcoxzCp2v32XmwXLvbw+8Yq9/b+QqksjQ==", + "dev": true, + "requires": { + "@babel/helper-hoist-variables": "^7.18.6", + "@babel/helper-module-transforms": "^7.19.6", + "@babel/helper-plugin-utils": "^7.19.0", + "@babel/helper-validator-identifier": "^7.19.1" + } + }, + "@babel/plugin-transform-modules-umd": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.18.6.tgz", + "integrity": "sha512-dcegErExVeXcRqNtkRU/z8WlBLnvD4MRnHgNs3MytRO1Mn1sHRyhbcpYbVMGclAqOjdW+9cfkdZno9dFdfKLfQ==", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-named-capturing-groups-regex": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.20.5.tgz", + "integrity": "sha512-mOW4tTzi5iTLnw+78iEq3gr8Aoq4WNRGpmSlrogqaiCBoR1HFhpU4JkpQFOHfeYx3ReVIFWOQJS4aZBRvuZ6mA==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.20.5", + "@babel/helper-plugin-utils": "^7.20.2" + } + }, + "@babel/plugin-transform-new-target": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.18.6.tgz", + "integrity": "sha512-DjwFA/9Iu3Z+vrAn+8pBUGcjhxKguSMlsFqeCKbhb9BAV756v0krzVK04CRDi/4aqmk8BsHb4a/gFcaA5joXRw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-object-super": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.18.6.tgz", + "integrity": "sha512-uvGz6zk+pZoS1aTZrOvrbj6Pp/kK2mp45t2B+bTDre2UgsZZ8EZLSJtUg7m/no0zOJUWgFONpB7Zv9W2tSaFlA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-replace-supers": "^7.18.6" + } + }, + "@babel/plugin-transform-parameters": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.20.5.tgz", + "integrity": "sha512-h7plkOmcndIUWXZFLgpbrh2+fXAi47zcUX7IrOQuZdLD0I0KvjJ6cvo3BEcAOsDOcZhVKGJqv07mkSqK0y2isQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.20.2" + } + }, + "@babel/plugin-transform-property-literals": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.18.6.tgz", + "integrity": "sha512-cYcs6qlgafTud3PAzrrRNbQtfpQ8+y/+M5tKmksS9+M1ckbH6kzY8MrexEM9mcA6JDsukE19iIRvAyYl463sMg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-regenerator": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.20.5.tgz", + "integrity": "sha512-kW/oO7HPBtntbsahzQ0qSE3tFvkFwnbozz3NWFhLGqH75vLEg+sCGngLlhVkePlCs3Jv0dBBHDzCHxNiFAQKCQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.20.2", + "regenerator-transform": "^0.15.1" + } + }, + "@babel/plugin-transform-reserved-words": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.18.6.tgz", + "integrity": "sha512-oX/4MyMoypzHjFrT1CdivfKZ+XvIPMFXwwxHp/r0Ddy2Vuomt4HDFGmft1TAY2yiTKiNSsh3kjBAzcM8kSdsjA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-runtime": { + "version": "7.19.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.19.6.tgz", + "integrity": "sha512-PRH37lz4JU156lYFW1p8OxE5i7d6Sl/zV58ooyr+q1J1lnQPyg5tIiXlIwNVhJaY4W3TmOtdc8jqdXQcB1v5Yw==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.18.6", + "@babel/helper-plugin-utils": "^7.19.0", + "babel-plugin-polyfill-corejs2": "^0.3.3", + "babel-plugin-polyfill-corejs3": "^0.6.0", + "babel-plugin-polyfill-regenerator": "^0.4.1", + "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, + "@babel/plugin-transform-shorthand-properties": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.18.6.tgz", + "integrity": "sha512-eCLXXJqv8okzg86ywZJbRn19YJHU4XUa55oz2wbHhaQVn/MM+XhukiT7SYqp/7o00dg52Rj51Ny+Ecw4oyoygw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-spread": { + "version": "7.19.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.19.0.tgz", + "integrity": "sha512-RsuMk7j6n+r752EtzyScnWkQyuJdli6LdO5Klv8Yx0OfPVTcQkIUfS8clx5e9yHXzlnhOZF3CbQ8C2uP5j074w==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.19.0", + "@babel/helper-skip-transparent-expression-wrappers": "^7.18.9" + } + }, + "@babel/plugin-transform-sticky-regex": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.18.6.tgz", + "integrity": "sha512-kfiDrDQ+PBsQDO85yj1icueWMfGfJFKN1KCkndygtu/C9+XUfydLC8Iv5UYJqRwy4zk8EcplRxEOeLyjq1gm6Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/plugin-transform-template-literals": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.18.9.tgz", + "integrity": "sha512-S8cOWfT82gTezpYOiVaGHrCbhlHgKhQt8XH5ES46P2XWmX92yisoZywf5km75wv5sYcXDUCLMmMxOLCtthDgMA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.9" + } + }, + "@babel/plugin-transform-typeof-symbol": { + "version": "7.18.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.18.9.tgz", + "integrity": "sha512-SRfwTtF11G2aemAZWivL7PD+C9z52v9EvMqH9BuYbabyPuKUvSWks3oCg6041pT925L4zVFqaVBeECwsmlguEw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.9" + } + }, + "@babel/plugin-transform-unicode-escapes": { + "version": "7.18.10", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.18.10.tgz", + "integrity": "sha512-kKAdAI+YzPgGY/ftStBFXTI1LZFju38rYThnfMykS+IXy8BVx+res7s2fxf1l8I35DV2T97ezo6+SGrXz6B3iQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.18.9" + } + }, + "@babel/plugin-transform-unicode-regex": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.18.6.tgz", + "integrity": "sha512-gE7A6Lt7YLnNOL3Pb9BNeZvi+d8l7tcRrG4+pwJjK9hD2xX4mEvjlQW60G9EEmfXVYRPv9VRQcyegIVHCql/AA==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + } + }, + "@babel/preset-env": { + "version": "7.20.2", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.20.2.tgz", + "integrity": "sha512-1G0efQEWR1EHkKvKHqbG+IN/QdgwfByUpM5V5QroDzGV2t3S/WXNQd693cHiHTlCFMpr9B6FkPFXDA2lQcKoDg==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.20.1", + "@babel/helper-compilation-targets": "^7.20.0", + "@babel/helper-plugin-utils": "^7.20.2", + "@babel/helper-validator-option": "^7.18.6", + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.18.6", + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.18.9", + "@babel/plugin-proposal-async-generator-functions": "^7.20.1", + "@babel/plugin-proposal-class-properties": "^7.18.6", + "@babel/plugin-proposal-class-static-block": "^7.18.6", + "@babel/plugin-proposal-dynamic-import": "^7.18.6", + "@babel/plugin-proposal-export-namespace-from": "^7.18.9", + "@babel/plugin-proposal-json-strings": "^7.18.6", + "@babel/plugin-proposal-logical-assignment-operators": "^7.18.9", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6", + "@babel/plugin-proposal-numeric-separator": "^7.18.6", + "@babel/plugin-proposal-object-rest-spread": "^7.20.2", + "@babel/plugin-proposal-optional-catch-binding": "^7.18.6", + "@babel/plugin-proposal-optional-chaining": "^7.18.9", + "@babel/plugin-proposal-private-methods": "^7.18.6", + "@babel/plugin-proposal-private-property-in-object": "^7.18.6", + "@babel/plugin-proposal-unicode-property-regex": "^7.18.6", + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-class-static-block": "^7.14.5", + "@babel/plugin-syntax-dynamic-import": "^7.8.3", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3", + "@babel/plugin-syntax-import-assertions": "^7.20.0", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5", + "@babel/plugin-syntax-top-level-await": "^7.14.5", + "@babel/plugin-transform-arrow-functions": "^7.18.6", + "@babel/plugin-transform-async-to-generator": "^7.18.6", + "@babel/plugin-transform-block-scoped-functions": "^7.18.6", + "@babel/plugin-transform-block-scoping": "^7.20.2", + "@babel/plugin-transform-classes": "^7.20.2", + "@babel/plugin-transform-computed-properties": "^7.18.9", + "@babel/plugin-transform-destructuring": "^7.20.2", + "@babel/plugin-transform-dotall-regex": "^7.18.6", + "@babel/plugin-transform-duplicate-keys": "^7.18.9", + "@babel/plugin-transform-exponentiation-operator": "^7.18.6", + "@babel/plugin-transform-for-of": "^7.18.8", + "@babel/plugin-transform-function-name": "^7.18.9", + "@babel/plugin-transform-literals": "^7.18.9", + "@babel/plugin-transform-member-expression-literals": "^7.18.6", + "@babel/plugin-transform-modules-amd": "^7.19.6", + "@babel/plugin-transform-modules-commonjs": "^7.19.6", + "@babel/plugin-transform-modules-systemjs": "^7.19.6", + "@babel/plugin-transform-modules-umd": "^7.18.6", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.19.1", + "@babel/plugin-transform-new-target": "^7.18.6", + "@babel/plugin-transform-object-super": "^7.18.6", + "@babel/plugin-transform-parameters": "^7.20.1", + "@babel/plugin-transform-property-literals": "^7.18.6", + "@babel/plugin-transform-regenerator": "^7.18.6", + "@babel/plugin-transform-reserved-words": "^7.18.6", + "@babel/plugin-transform-shorthand-properties": "^7.18.6", + "@babel/plugin-transform-spread": "^7.19.0", + "@babel/plugin-transform-sticky-regex": "^7.18.6", + "@babel/plugin-transform-template-literals": "^7.18.9", + "@babel/plugin-transform-typeof-symbol": "^7.18.9", + "@babel/plugin-transform-unicode-escapes": "^7.18.10", + "@babel/plugin-transform-unicode-regex": "^7.18.6", + "@babel/preset-modules": "^0.1.5", + "@babel/types": "^7.20.2", + "babel-plugin-polyfill-corejs2": "^0.3.3", + "babel-plugin-polyfill-corejs3": "^0.6.0", + "babel-plugin-polyfill-regenerator": "^0.4.1", + "core-js-compat": "^3.25.1", + "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, + "@babel/preset-modules": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.5.tgz", + "integrity": "sha512-A57th6YRG7oR3cq/yt/Y84MvGgE0eJG2F1JLhKuyG+jFxEgrd/HAMJatiFtmOiZurz+0DkrvbheCLaV5f2JfjA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", + "@babel/plugin-transform-dotall-regex": "^7.4.4", + "@babel/types": "^7.4.4", + "esutils": "^2.0.2" + } + }, + "@babel/runtime": { + "version": "7.20.1", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.20.1.tgz", + "integrity": "sha512-mrzLkl6U9YLF8qpqI7TB82PESyEGjm/0Ly91jG575eVxMMlb8fYfOXFZIJ8XfLrJZQbm7dlKry2bJmXBUEkdFg==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.13.10" + } + }, + "@babel/template": { + "version": "7.18.10", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.10.tgz", + "integrity": "sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.18.6", + "@babel/parser": "^7.18.10", + "@babel/types": "^7.18.10" + } + }, + "@babel/traverse": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.20.5.tgz", + "integrity": "sha512-WM5ZNN3JITQIq9tFZaw1ojLU3WgWdtkxnhM1AegMS+PvHjkM5IXjmYEGY7yukz5XS4sJyEf2VzWjI8uAavhxBQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.18.6", + "@babel/generator": "^7.20.5", + "@babel/helper-environment-visitor": "^7.18.9", + "@babel/helper-function-name": "^7.19.0", + "@babel/helper-hoist-variables": "^7.18.6", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/parser": "^7.20.5", + "@babel/types": "^7.20.5", + "debug": "^4.1.0", + "globals": "^11.1.0" + }, + "dependencies": { + "@babel/generator": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.20.5.tgz", + "integrity": "sha512-jl7JY2Ykn9S0yj4DQP82sYvPU+T3g0HFcWTqDLqiuA9tGRNIj9VfbtXGAYTTkyNEnQk1jkMGOdYka8aG/lulCA==", + "dev": true, + "requires": { + "@babel/types": "^7.20.5", + "@jridgewell/gen-mapping": "^0.3.2", + "jsesc": "^2.5.1" + } + }, + "@jridgewell/gen-mapping": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", + "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "dev": true, + "requires": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + } + } + } + }, + "@babel/types": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.20.5.tgz", + "integrity": "sha512-c9fst/h2/dcF7H+MJKZ2T0KjEQ8hY/BNnDk/H3XY8C4Aw/eWQXWn/lWntHF9ooUBnGmEvbfGrTgLWc+um0YDUg==", + "dev": true, + "requires": { + "@babel/helper-string-parser": "^7.19.4", + "@babel/helper-validator-identifier": "^7.19.1", + "to-fast-properties": "^2.0.0" + } + }, + "@colors/colors": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", + "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", + "dev": true + }, + "@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "requires": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "dependencies": { + "@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "requires": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + } + } + }, + "@discoveryjs/json-ext": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", + "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", + "dev": true + }, + "@esbuild/android-arm": { + "version": "0.15.13", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.15.13.tgz", + "integrity": "sha512-RY2fVI8O0iFUNvZirXaQ1vMvK0xhCcl0gqRj74Z6yEiO1zAUa7hbsdwZM1kzqbxHK7LFyMizipfXT3JME+12Hw==", + "dev": true, + "optional": true + }, + "@esbuild/linux-loong64": { + "version": "0.15.13", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.15.13.tgz", + "integrity": "sha512-+BoyIm4I8uJmH/QDIH0fu7MG0AEx9OXEDXnqptXCwKOlOqZiS4iraH1Nr7/ObLMokW3sOCeBNyD68ATcV9b9Ag==", + "dev": true, + "optional": true + }, + "@gar/promisify": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz", + "integrity": "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==", + "dev": true + }, + "@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "dev": true, + "requires": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + } + }, + "@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true + }, + "@jridgewell/gen-mapping": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz", + "integrity": "sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==", + "dev": true, + "requires": { + "@jridgewell/set-array": "^1.0.0", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "@jridgewell/resolve-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "dev": true + }, + "@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "dev": true + }, + "@jridgewell/source-map": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz", + "integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==", + "dev": true, + "requires": { + "@jridgewell/gen-mapping": "^0.3.0", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "dependencies": { + "@jridgewell/gen-mapping": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", + "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "dev": true, + "requires": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + } + } + } + }, + "@jridgewell/sourcemap-codec": { + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", + "dev": true + }, + "@jridgewell/trace-mapping": { + "version": "0.3.17", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz", + "integrity": "sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==", + "dev": true, + "requires": { + "@jridgewell/resolve-uri": "3.1.0", + "@jridgewell/sourcemap-codec": "1.4.14" + } + }, + "@leichtgewicht/ip-codec": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz", + "integrity": "sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A==", + "dev": true + }, + "@ngtools/webpack": { + "version": "15.0.3", + "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-15.0.3.tgz", + "integrity": "sha512-LGiIpljdQnA3V2/eJUA4q8Idvh39dlgEISD+fyen+iASOsiwY00JCTAcJN/J5A0Gr/Vp4oVP9kC+I/Z27whBKA==", + "dev": true, + "requires": {} + }, + "@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + } + }, + "@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true + }, + "@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "requires": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + } + }, + "@npmcli/fs": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-3.1.0.tgz", + "integrity": "sha512-7kZUAaLscfgbwBQRbvdMYaZOWyMEcPTH/tJjnyAWJ/dvvs9Ef+CERx/qJb9GExJpl1qipaDGn7KqHnFGGixd0w==", + "dev": true, + "requires": { + "semver": "^7.3.5" + } + }, + "@npmcli/git": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-4.0.3.tgz", + "integrity": "sha512-8cXNkDIbnXPVbhXMmQ7/bklCAjtmPaXfI9aEM4iH+xSuEHINLMHhlfESvVwdqmHJRJkR48vNJTSUvoF6GRPSFA==", + "dev": true, + "requires": { + "@npmcli/promise-spawn": "^6.0.0", + "lru-cache": "^7.4.4", + "mkdirp": "^1.0.4", + "npm-pick-manifest": "^8.0.0", + "proc-log": "^3.0.0", + "promise-inflight": "^1.0.1", + "promise-retry": "^2.0.1", + "semver": "^7.3.5", + "which": "^3.0.0" + }, + "dependencies": { + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true + }, + "proc-log": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-3.0.0.tgz", + "integrity": "sha512-++Vn7NS4Xf9NacaU9Xq3URUuqZETPsf8L4j5/ckhaRYsfPeRyzGw+iDjFhV/Jr3uNmTvvddEJFWh5R1gRgUH8A==", + "dev": true + }, + "which": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-3.0.0.tgz", + "integrity": "sha512-nla//68K9NU6yRiwDY/Q8aU6siKlSs64aEC7+IV56QoAuyQT2ovsJcgGYGyqMOmI/CGN1BOR6mM5EN0FBO+zyQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, + "@npmcli/installed-package-contents": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@npmcli/installed-package-contents/-/installed-package-contents-2.0.1.tgz", + "integrity": "sha512-GIykAFdOVK31Q1/zAtT5MbxqQL2vyl9mvFJv+OGu01zxbhL3p0xc8gJjdNGX1mWmUT43aEKVO2L6V/2j4TOsAA==", + "dev": true, + "requires": { + "npm-bundled": "^3.0.0", + "npm-normalize-package-bin": "^3.0.0" + } + }, + "@npmcli/move-file": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-2.0.1.tgz", + "integrity": "sha512-mJd2Z5TjYWq/ttPLLGqArdtnC74J6bOzg4rMDnN+p1xTacZ2yPRCk2y0oSWQtygLR9YVQXgOcONrwtnk3JupxQ==", + "dev": true, + "requires": { + "mkdirp": "^1.0.4", + "rimraf": "^3.0.2" + }, + "dependencies": { + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true + } + } + }, + "@npmcli/node-gyp": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/node-gyp/-/node-gyp-3.0.0.tgz", + "integrity": "sha512-gp8pRXC2oOxu0DUE1/M3bYtb1b3/DbJ5aM113+XJBgfXdussRAsX0YOrOhdd8WvnAR6auDBvJomGAkLKA5ydxA==", + "dev": true + }, + "@npmcli/promise-spawn": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-6.0.1.tgz", + "integrity": "sha512-+hcUpxgx0vEpDJI9Cn+lkTdKLoqKBXFCVps5H7FujEU2vLOp6KwqjLlxbnz8Wzgm8oEqW/u5FeNAXSFjLdCD0A==", + "dev": true, + "requires": { + "which": "^3.0.0" + }, + "dependencies": { + "which": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-3.0.0.tgz", + "integrity": "sha512-nla//68K9NU6yRiwDY/Q8aU6siKlSs64aEC7+IV56QoAuyQT2ovsJcgGYGyqMOmI/CGN1BOR6mM5EN0FBO+zyQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, + "@npmcli/run-script": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-6.0.0.tgz", + "integrity": "sha512-ql+AbRur1TeOdl1FY+RAwGW9fcr4ZwiVKabdvm93mujGREVuVLbdkXRJDrkTXSdCjaxYydr1wlA2v67jxWG5BQ==", + "dev": true, + "requires": { + "@npmcli/node-gyp": "^3.0.0", + "@npmcli/promise-spawn": "^6.0.0", + "node-gyp": "^9.0.0", + "read-package-json-fast": "^3.0.0", + "which": "^3.0.0" + }, + "dependencies": { + "which": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/which/-/which-3.0.0.tgz", + "integrity": "sha512-nla//68K9NU6yRiwDY/Q8aU6siKlSs64aEC7+IV56QoAuyQT2ovsJcgGYGyqMOmI/CGN1BOR6mM5EN0FBO+zyQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, + "@schematics/angular": { + "version": "15.0.3", + "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-15.0.3.tgz", + "integrity": "sha512-JVodVQNZBAd9TOUjbf19udH9Odu5bJ1g4cVbRnKfZ6V01Qw7iGVL9KrytNWGo/kR3cK2kXAxH0i2MU3WQNcA3A==", + "dev": true, + "requires": { + "@angular-devkit/core": "15.0.3", + "@angular-devkit/schematics": "15.0.3", + "jsonc-parser": "3.2.0" + } + }, + "@socket.io/component-emitter": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz", + "integrity": "sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg==", + "dev": true + }, + "@tootallnate/once": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", + "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", + "dev": true + }, + "@tsconfig/node10": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", + "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", + "dev": true + }, + "@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true + }, + "@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true + }, + "@tsconfig/node16": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz", + "integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==", + "dev": true + }, + "@types/body-parser": { + "version": "1.19.2", + "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz", + "integrity": "sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==", + "dev": true, + "requires": { + "@types/connect": "*", + "@types/node": "*" + } + }, + "@types/bonjour": { + "version": "3.5.10", + "resolved": "https://registry.npmjs.org/@types/bonjour/-/bonjour-3.5.10.tgz", + "integrity": "sha512-p7ienRMiS41Nu2/igbJxxLDWrSZ0WxM8UQgCeO9KhoVF7cOVFkrKsiDr1EsJIla8vV3oEEjGcz11jc5yimhzZw==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/connect": { + "version": "3.4.35", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz", + "integrity": "sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/connect-history-api-fallback": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/@types/connect-history-api-fallback/-/connect-history-api-fallback-1.3.5.tgz", + "integrity": "sha512-h8QJa8xSb1WD4fpKBDcATDNGXghFj6/3GRWG6dhmRcu0RX1Ubasur2Uvx5aeEwlf0MwblEC2bMzzMQntxnw/Cw==", + "dev": true, + "requires": { + "@types/express-serve-static-core": "*", + "@types/node": "*" + } + }, + "@types/cookie": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.4.1.tgz", + "integrity": "sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q==", + "dev": true + }, + "@types/cors": { + "version": "2.8.13", + "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.13.tgz", + "integrity": "sha512-RG8AStHlUiV5ysZQKq97copd2UmVYw3/pRMLefISZ3S1hK104Cwm7iLQ3fTKx+lsUH2CE8FlLaYeEA2LSeqYUA==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/eslint": { + "version": "8.4.10", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.4.10.tgz", + "integrity": "sha512-Sl/HOqN8NKPmhWo2VBEPm0nvHnu2LL3v9vKo8MEq0EtbJ4eVzGPl41VNPvn5E1i5poMk4/XD8UriLHpJvEP/Nw==", + "dev": true, + "requires": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "@types/eslint-scope": { + "version": "3.7.4", + "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.4.tgz", + "integrity": "sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==", + "dev": true, + "requires": { + "@types/eslint": "*", + "@types/estree": "*" + } + }, + "@types/estree": { + "version": "0.0.51", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.51.tgz", + "integrity": "sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==", + "dev": true + }, + "@types/express": { + "version": "4.17.14", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.14.tgz", + "integrity": "sha512-TEbt+vaPFQ+xpxFLFssxUDXj5cWCxZJjIcB7Yg0k0GMHGtgtQgpvx/MUQUeAkNbA9AAGrwkAsoeItdTgS7FMyg==", + "dev": true, + "requires": { + "@types/body-parser": "*", + "@types/express-serve-static-core": "^4.17.18", + "@types/qs": "*", + "@types/serve-static": "*" + } + }, + "@types/express-serve-static-core": { + "version": "4.17.31", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.31.tgz", + "integrity": "sha512-DxMhY+NAsTwMMFHBTtJFNp5qiHKJ7TeqOo23zVEM9alT1Ml27Q3xcTH0xwxn7Q0BbMcVEJOs/7aQtUWupUQN3Q==", + "dev": true, + "requires": { + "@types/node": "*", + "@types/qs": "*", + "@types/range-parser": "*" + } + }, + "@types/http-proxy": { + "version": "1.17.9", + "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.9.tgz", + "integrity": "sha512-QsbSjA/fSk7xB+UXlCT3wHBy5ai9wOcNDWwZAtud+jXhwOM3l+EYZh8Lng4+/6n8uar0J7xILzqftJdJ/Wdfkw==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/jasmine": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@types/jasmine/-/jasmine-4.3.1.tgz", + "integrity": "sha512-Vu8l+UGcshYmV1VWwULgnV/2RDbBaO6i2Ptx7nd//oJPIZGhoI1YLST4VKagD2Pq/Bc2/7zvtvhM7F3p4SN7kQ==", + "dev": true + }, + "@types/jasminewd2": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/jasminewd2/-/jasminewd2-2.0.10.tgz", + "integrity": "sha512-J7mDz7ovjwjc+Y9rR9rY53hFWKATcIkrr9DwQWmOas4/pnIPJTXawnzjwpHm3RSxz/e3ZVUvQ7cRbd5UQLo10g==", + "dev": true, + "requires": { + "@types/jasmine": "*" + } + }, + "@types/json-schema": { + "version": "7.0.11", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", + "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", + "dev": true + }, + "@types/mime": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@types/mime/-/mime-3.0.1.tgz", + "integrity": "sha512-Y4XFY5VJAuw0FgAqPNd6NNoV44jbq9Bz2L7Rh/J6jLTiHBSBJa9fxqQIvkIld4GsoDOcCbvzOUAbLPsSKKg+uA==", + "dev": true + }, + "@types/node": { + "version": "12.20.55", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", + "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==", + "dev": true + }, + "@types/parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", + "dev": true + }, + "@types/qs": { + "version": "6.9.7", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz", + "integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==", + "dev": true + }, + "@types/range-parser": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.4.tgz", + "integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==", + "dev": true + }, + "@types/retry": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.0.tgz", + "integrity": "sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==", + "dev": true + }, + "@types/serve-index": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/@types/serve-index/-/serve-index-1.9.1.tgz", + "integrity": "sha512-d/Hs3nWDxNL2xAczmOVZNj92YZCS6RGxfBPjKzuu/XirCgXdpKEb88dYNbrYGint6IVWLNP+yonwVAuRC0T2Dg==", + "dev": true, + "requires": { + "@types/express": "*" + } + }, + "@types/serve-static": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.0.tgz", + "integrity": "sha512-z5xyF6uh8CbjAu9760KDKsH2FcDxZ2tFCsA4HIMWE6IkiYMXfVoa+4f9KX+FN0ZLsaMw1WNG2ETLA6N+/YA+cg==", + "dev": true, + "requires": { + "@types/mime": "*", + "@types/node": "*" + } + }, + "@types/sockjs": { + "version": "0.3.33", + "resolved": "https://registry.npmjs.org/@types/sockjs/-/sockjs-0.3.33.tgz", + "integrity": "sha512-f0KEEe05NvUnat+boPTZ0dgaLZ4SfSouXUgv5noUiefG2ajgKjmETo9ZJyuqsl7dfl2aHlLJUiki6B4ZYldiiw==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/ws": { + "version": "8.5.3", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.3.tgz", + "integrity": "sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@webassemblyjs/ast": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", + "integrity": "sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw==", + "dev": true, + "requires": { + "@webassemblyjs/helper-numbers": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1" + } + }, + "@webassemblyjs/floating-point-hex-parser": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz", + "integrity": "sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ==", + "dev": true + }, + "@webassemblyjs/helper-api-error": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz", + "integrity": "sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg==", + "dev": true + }, + "@webassemblyjs/helper-buffer": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz", + "integrity": "sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA==", + "dev": true + }, + "@webassemblyjs/helper-numbers": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz", + "integrity": "sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ==", + "dev": true, + "requires": { + "@webassemblyjs/floating-point-hex-parser": "1.11.1", + "@webassemblyjs/helper-api-error": "1.11.1", + "@xtuc/long": "4.2.2" + } + }, + "@webassemblyjs/helper-wasm-bytecode": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz", + "integrity": "sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q==", + "dev": true + }, + "@webassemblyjs/helper-wasm-section": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz", + "integrity": "sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-buffer": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/wasm-gen": "1.11.1" + } + }, + "@webassemblyjs/ieee754": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz", + "integrity": "sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ==", + "dev": true, + "requires": { + "@xtuc/ieee754": "^1.2.0" + } + }, + "@webassemblyjs/leb128": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.1.tgz", + "integrity": "sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw==", + "dev": true, + "requires": { + "@xtuc/long": "4.2.2" + } + }, + "@webassemblyjs/utf8": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.1.tgz", + "integrity": "sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ==", + "dev": true + }, + "@webassemblyjs/wasm-edit": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz", + "integrity": "sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-buffer": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/helper-wasm-section": "1.11.1", + "@webassemblyjs/wasm-gen": "1.11.1", + "@webassemblyjs/wasm-opt": "1.11.1", + "@webassemblyjs/wasm-parser": "1.11.1", + "@webassemblyjs/wast-printer": "1.11.1" + } + }, + "@webassemblyjs/wasm-gen": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz", + "integrity": "sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/ieee754": "1.11.1", + "@webassemblyjs/leb128": "1.11.1", + "@webassemblyjs/utf8": "1.11.1" + } + }, + "@webassemblyjs/wasm-opt": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz", + "integrity": "sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-buffer": "1.11.1", + "@webassemblyjs/wasm-gen": "1.11.1", + "@webassemblyjs/wasm-parser": "1.11.1" + } + }, + "@webassemblyjs/wasm-parser": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz", + "integrity": "sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-api-error": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/ieee754": "1.11.1", + "@webassemblyjs/leb128": "1.11.1", + "@webassemblyjs/utf8": "1.11.1" + } + }, + "@webassemblyjs/wast-printer": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz", + "integrity": "sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.11.1", + "@xtuc/long": "4.2.2" + } + }, + "@xtuc/ieee754": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", + "dev": true + }, + "@xtuc/long": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", + "dev": true + }, + "@yarnpkg/lockfile": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz", + "integrity": "sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==", + "dev": true + }, + "abab": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", + "integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==", + "dev": true + }, + "abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true + }, + "accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "dev": true, + "requires": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + } + }, + "acorn": { + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.1.tgz", + "integrity": "sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA==", + "dev": true + }, + "acorn-import-assertions": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz", + "integrity": "sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==", + "dev": true, + "requires": {} + }, + "acorn-walk": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", + "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", + "dev": true + }, + "adjust-sourcemap-loader": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/adjust-sourcemap-loader/-/adjust-sourcemap-loader-4.0.0.tgz", + "integrity": "sha512-OXwN5b9pCUXNQHJpwwD2qP40byEmSgzj8B4ydSN0uMNYWiFmJ6x6KwUllMmfk8Rwu/HJDFR7U8ubsWBoN0Xp0A==", + "dev": true, + "requires": { + "loader-utils": "^2.0.0", + "regex-parser": "^2.2.11" + }, + "dependencies": { + "loader-utils": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", + "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", + "dev": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + } + } + } + }, + "agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dev": true, + "requires": { + "debug": "4" + } + }, + "agentkeepalive": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.2.1.tgz", + "integrity": "sha512-Zn4cw2NEqd+9fiSVWMscnjyQ1a8Yfoc5oBajLeo5w+YBHgDUcEBY2hS4YpTz6iN5f/2zQiktcuM6tS8x1p9dpA==", + "dev": true, + "requires": { + "debug": "^4.1.0", + "depd": "^1.1.2", + "humanize-ms": "^1.2.1" + }, + "dependencies": { + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", + "dev": true + } + } + }, + "aggregate-error": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", + "dev": true, + "requires": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + } + }, + "ajv": { + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", + "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + } + }, + "ajv-formats": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", + "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", + "dev": true, + "requires": { + "ajv": "^8.0.0" + } + }, + "ajv-keywords": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", + "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.3" + } + }, + "ansi-colors": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "dev": true + }, + "ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "requires": { + "type-fest": "^0.21.3" + } + }, + "ansi-html-community": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/ansi-html-community/-/ansi-html-community-0.0.8.tgz", + "integrity": "sha512-1APHAyr3+PCamwNw3bXCPp4HFLONZt/yIH0sZp0/469KWNTEy+qN5jQ3GVX6DMZ1UXAi34yVwtTeaG/HpBuuzw==", + "dev": true + }, + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "app-root-path": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/app-root-path/-/app-root-path-3.1.0.tgz", + "integrity": "sha512-biN3PwB2gUtjaYy/isrU3aNWI5w+fAfvHkSvCKeQGxhmYpwKFUxudR3Yya+KqVRHBmEDYh+/lTozYCFbmzX4nA==", + "dev": true + }, + "aproba": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", + "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==", + "dev": true + }, + "are-we-there-yet": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-3.0.1.tgz", + "integrity": "sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg==", + "dev": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^3.6.0" + } + }, + "arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + }, + "dependencies": { + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true + } + } + }, + "aria-query": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-3.0.0.tgz", + "integrity": "sha512-majUxHgLehQTeSA+hClx+DY09OVUqG3GtezWkF1krgLGNdlDu9l9V8DaqNMWbq4Eddc8wsyDA0hpDUtnYxQEXw==", + "dev": true, + "requires": { + "ast-types-flow": "0.0.7", + "commander": "^2.11.0" + } + }, + "array-flatten": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.2.tgz", + "integrity": "sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ==", + "dev": true + }, + "ast-types-flow": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.7.tgz", + "integrity": "sha512-eBvWn1lvIApYMhzQMsu9ciLfkBY499mFZlNqG+/9WR7PVlroQw0vG30cOQQbaKz3sCEc44TAOu2ykzqXSNnwag==", + "dev": true + }, + "autoprefixer": { + "version": "10.4.13", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.13.tgz", + "integrity": "sha512-49vKpMqcZYsJjwotvt4+h/BCjJVnhGwcLpDt5xkcaOG3eLrG/HUYLagrihYsQ+qrIBgIzX1Rw7a6L8I/ZA1Atg==", + "dev": true, + "requires": { + "browserslist": "^4.21.4", + "caniuse-lite": "^1.0.30001426", + "fraction.js": "^4.2.0", + "normalize-range": "^0.1.2", + "picocolors": "^1.0.0", + "postcss-value-parser": "^4.2.0" + } + }, + "axobject-query": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-2.0.2.tgz", + "integrity": "sha512-MCeek8ZH7hKyO1rWUbKNQBbl4l2eY0ntk7OGi+q0RlafrCnfPxC06WZA+uebCfmYp4mNU9jRBP1AhGyf8+W3ww==", + "dev": true, + "requires": { + "ast-types-flow": "0.0.7" + } + }, + "babel-loader": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-9.1.0.tgz", + "integrity": "sha512-Antt61KJPinUMwHwIIz9T5zfMgevnfZkEVWYDWlG888fgdvRRGD0JTuf/fFozQnfT+uq64sk1bmdHDy/mOEWnA==", + "dev": true, + "requires": { + "find-cache-dir": "^3.3.2", + "schema-utils": "^4.0.0" + } + }, + "babel-plugin-istanbul": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", + "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-instrument": "^5.0.4", + "test-exclude": "^6.0.0" + } + }, + "babel-plugin-polyfill-corejs2": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.3.tgz", + "integrity": "sha512-8hOdmFYFSZhqg2C/JgLUQ+t52o5nirNwaWM2B9LWteozwIvM14VSwdsCAUET10qT+kmySAlseadmfeeSWFCy+Q==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.17.7", + "@babel/helper-define-polyfill-provider": "^0.3.3", + "semver": "^6.1.1" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, + "babel-plugin-polyfill-corejs3": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.6.0.tgz", + "integrity": "sha512-+eHqR6OPcBhJOGgsIar7xoAB1GcSwVUA3XjAd7HJNzOXT4wv6/H7KIdA/Nc60cvUlDbKApmqNvD1B1bzOt4nyA==", + "dev": true, + "requires": { + "@babel/helper-define-polyfill-provider": "^0.3.3", + "core-js-compat": "^3.25.1" + } + }, + "babel-plugin-polyfill-regenerator": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.4.1.tgz", + "integrity": "sha512-NtQGmyQDXjQqQ+IzRkBVwEOz9lQ4zxAQZgoAYEtU9dJjnl1Oc98qnN7jcp+bE7O7aYzVpavXE3/VKXNzUbh7aw==", + "dev": true, + "requires": { + "@babel/helper-define-polyfill-provider": "^0.3.3" + } + }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true + }, + "base64id": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/base64id/-/base64id-2.0.0.tgz", + "integrity": "sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog==", + "dev": true + }, + "batch": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", + "integrity": "sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw==", + "dev": true + }, + "big.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", + "dev": true + }, + "binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true + }, + "bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dev": true, + "requires": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "body-parser": { + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", + "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", + "dev": true, + "requires": { + "bytes": "3.1.2", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.11.0", + "raw-body": "2.5.1", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + } + } + }, + "bonjour-service": { + "version": "1.0.14", + "resolved": "https://registry.npmjs.org/bonjour-service/-/bonjour-service-1.0.14.tgz", + "integrity": "sha512-HIMbgLnk1Vqvs6B4Wq5ep7mxvj9sGz5d1JJyDNSGNIdA/w2MCz6GTjWTdjqOJV1bEPj+6IkxDvWNFKEBxNt4kQ==", + "dev": true, + "requires": { + "array-flatten": "^2.1.2", + "dns-equal": "^1.0.0", + "fast-deep-equal": "^3.1.3", + "multicast-dns": "^7.2.5" + } + }, + "boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", + "dev": true + }, + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0" + } + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "browserslist": { + "version": "4.21.4", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.4.tgz", + "integrity": "sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30001400", + "electron-to-chromium": "^1.4.251", + "node-releases": "^2.0.6", + "update-browserslist-db": "^1.0.9" + } + }, + "buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true + }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha512-wxXCdllwGhI2kCC0MnvTGYTMvnVZTvqgypkiTI8Pa5tcz2i6VqsqwYGgqwXji+4RgCzms6EajE4IxiUH6HH8nQ==", + "dev": true + }, + "builtins": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/builtins/-/builtins-5.0.1.tgz", + "integrity": "sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==", + "dev": true, + "requires": { + "semver": "^7.0.0" + } + }, + "bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "dev": true + }, + "cacache": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-17.0.2.tgz", + "integrity": "sha512-rYUs2x4OjSgCQND7nTrh21AHIBFgd7s/ctAYvU3a8u+nK+R5YaX/SFPDYz4Azz7SGL6+6L9ZZWI4Kawpb7grzQ==", + "dev": true, + "requires": { + "@npmcli/fs": "^3.1.0", + "fs-minipass": "^2.1.0", + "glob": "^8.0.1", + "lru-cache": "^7.7.1", + "minipass": "^3.1.6", + "minipass-collect": "^1.0.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "p-map": "^4.0.0", + "promise-inflight": "^1.0.1", + "ssri": "^10.0.0", + "tar": "^6.1.11", + "unique-filename": "^3.0.0" + } + }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true + }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, + "caniuse-lite": { + "version": "1.0.30001439", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001439.tgz", + "integrity": "sha512-1MgUzEkoMO6gKfXflStpYgZDlFM7M/ck/bgfVCACO5vnAf0fXoNVHdWtqGU+MYca+4bL9Z5bpOVmR33cWW9G2A==", + "dev": true + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true + }, + "chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "dev": true, + "requires": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "fsevents": "~2.3.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + } + }, + "chownr": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", + "dev": true + }, + "chrome-trace-event": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", + "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", + "dev": true + }, + "clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "dev": true + }, + "cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dev": true, + "requires": { + "restore-cursor": "^3.1.0" + } + }, + "cli-spinners": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.7.0.tgz", + "integrity": "sha512-qu3pN8Y3qHNgE2AFweciB1IfMnmZ/fsNTEE+NOFjmGB2F/7rLhnhzppvpCnN4FovtP26k8lHyy9ptEbNwWFLzw==", + "dev": true + }, + "cli-width": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", + "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==", + "dev": true + }, + "cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + } + }, + "clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", + "dev": true + }, + "clone-deep": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", + "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.2", + "shallow-clone": "^3.0.0" + } + }, + "codelyzer": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/codelyzer/-/codelyzer-6.0.2.tgz", + "integrity": "sha512-v3+E0Ucu2xWJMOJ2fA/q9pDT/hlxHftHGPUay1/1cTgyPV5JTHFdO9hqo837Sx2s9vKBMTt5gO+lhF95PO6J+g==", + "dev": true, + "requires": { + "@angular/compiler": "9.0.0", + "@angular/core": "9.0.0", + "app-root-path": "^3.0.0", + "aria-query": "^3.0.0", + "axobject-query": "2.0.2", + "css-selector-tokenizer": "^0.7.1", + "cssauron": "^1.4.0", + "damerau-levenshtein": "^1.0.4", + "rxjs": "^6.5.3", + "semver-dsl": "^1.0.1", + "source-map": "^0.5.7", + "sprintf-js": "^1.1.2", + "tslib": "^1.10.0", + "zone.js": "~0.10.3" + }, + "dependencies": { + "@angular/compiler": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-9.0.0.tgz", + "integrity": "sha512-ctjwuntPfZZT2mNj2NDIVu51t9cvbhl/16epc5xEwyzyDt76pX9UgwvY+MbXrf/C/FWwdtmNtfP698BKI+9leQ==", + "dev": true, + "requires": {} + }, + "@angular/core": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/@angular/core/-/core-9.0.0.tgz", + "integrity": "sha512-6Pxgsrf0qF9iFFqmIcWmjJGkkCaCm6V5QNnxMy2KloO3SDq6QuMVRbN9RtC8Urmo25LP+eZ6ZgYqFYpdD8Hd9w==", + "dev": true, + "requires": {} + }, + "rxjs": { + "version": "6.6.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", + "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "dev": true + }, + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "zone.js": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.10.3.tgz", + "integrity": "sha512-LXVLVEq0NNOqK/fLJo3d0kfzd4sxwn2/h67/02pjCjfKDxgx1i9QqpvtHD8CrBnSSwMw5+dy11O7FRX5mkO7Cg==", + "dev": true + } + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "color-support": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", + "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", + "dev": true + }, + "colorette": { + "version": "2.0.19", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.19.tgz", + "integrity": "sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==", + "dev": true + }, + "colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", + "dev": true + }, + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, + "commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", + "dev": true + }, + "compressible": { + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", + "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==", + "dev": true, + "requires": { + "mime-db": ">= 1.43.0 < 2" + } + }, + "compression": { + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz", + "integrity": "sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==", + "dev": true, + "requires": { + "accepts": "~1.3.5", + "bytes": "3.0.0", + "compressible": "~2.0.16", + "debug": "2.6.9", + "on-headers": "~1.0.2", + "safe-buffer": "5.1.2", + "vary": "~1.1.2" + }, + "dependencies": { + "bytes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==", + "dev": true + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + } + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "connect": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz", + "integrity": "sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==", + "dev": true, + "requires": { + "debug": "2.6.9", + "finalhandler": "1.1.2", + "parseurl": "~1.3.3", + "utils-merge": "1.0.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + } + } + }, + "connect-history-api-fallback": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-2.0.0.tgz", + "integrity": "sha512-U73+6lQFmfiNPrYbXqr6kZ1i1wiRqXnp2nhMsINseWXO8lDau0LGEffJ8kQi4EjLZympVgRdvqjAgiZ1tgzDDA==", + "dev": true + }, + "console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==", + "dev": true + }, + "content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "dev": true, + "requires": { + "safe-buffer": "5.2.1" + } + }, + "content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", + "dev": true + }, + "convert-source-map": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", + "dev": true + }, + "cookie": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", + "integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==", + "dev": true + }, + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", + "dev": true + }, + "copy-anything": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/copy-anything/-/copy-anything-2.0.6.tgz", + "integrity": "sha512-1j20GZTsvKNkc4BY3NpMOM8tt///wY3FpIzozTOFO2ffuZcV61nojHXVKIy3WM+7ADCy5FVhdZYHYDdgTU0yJw==", + "dev": true, + "requires": { + "is-what": "^3.14.1" + } + }, + "copy-webpack-plugin": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-11.0.0.tgz", + "integrity": "sha512-fX2MWpamkW0hZxMEg0+mYnA40LTosOSa5TqZ9GYIBzyJa9C3QUaMPSE2xAi/buNr8u89SfD9wHSQVBzrRa/SOQ==", + "dev": true, + "requires": { + "fast-glob": "^3.2.11", + "glob-parent": "^6.0.1", + "globby": "^13.1.1", + "normalize-path": "^3.0.0", + "schema-utils": "^4.0.0", + "serialize-javascript": "^6.0.0" + }, + "dependencies": { + "glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "requires": { + "is-glob": "^4.0.3" + } + } + } + }, + "core-js": { + "version": "2.6.12", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz", + "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==" + }, + "core-js-compat": { + "version": "3.26.1", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.26.1.tgz", + "integrity": "sha512-622/KzTudvXCDLRw70iHW4KKs1aGpcRcowGWyYJr2DEBfRrd6hNJybxSWJFuZYD4ma86xhrwDDHxmDaIq4EA8A==", + "dev": true, + "requires": { + "browserslist": "^4.21.4" + } + }, + "core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "dev": true + }, + "cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "dev": true, + "requires": { + "object-assign": "^4", + "vary": "^1" + } + }, + "cosmiconfig": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.1.0.tgz", + "integrity": "sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==", + "dev": true, + "requires": { + "@types/parse-json": "^4.0.0", + "import-fresh": "^3.2.1", + "parse-json": "^5.0.0", + "path-type": "^4.0.0", + "yaml": "^1.10.0" + } + }, + "create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true + }, + "critters": { + "version": "0.0.16", + "resolved": "https://registry.npmjs.org/critters/-/critters-0.0.16.tgz", + "integrity": "sha512-JwjgmO6i3y6RWtLYmXwO5jMd+maZt8Tnfu7VVISmEWyQqfLpB8soBswf8/2bu6SBXxtKA68Al3c+qIG1ApT68A==", + "dev": true, + "requires": { + "chalk": "^4.1.0", + "css-select": "^4.2.0", + "parse5": "^6.0.1", + "parse5-htmlparser2-tree-adapter": "^6.0.1", + "postcss": "^8.3.7", + "pretty-bytes": "^5.3.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "dependencies": { + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, + "css-loader": { + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-6.7.1.tgz", + "integrity": "sha512-yB5CNFa14MbPJcomwNh3wLThtkZgcNyI2bNMRt8iE5Z8Vwl7f8vQXFAzn2HDOJvtDq2NTZBUGMSUNNyrv3/+cw==", + "dev": true, + "requires": { + "icss-utils": "^5.1.0", + "postcss": "^8.4.7", + "postcss-modules-extract-imports": "^3.0.0", + "postcss-modules-local-by-default": "^4.0.0", + "postcss-modules-scope": "^3.0.0", + "postcss-modules-values": "^4.0.0", + "postcss-value-parser": "^4.2.0", + "semver": "^7.3.5" + } + }, + "css-select": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.3.0.tgz", + "integrity": "sha512-wPpOYtnsVontu2mODhA19JrqWxNsfdatRKd64kmpRbQgh1KtItko5sTnEpPdpSaJszTOhEMlF/RPz28qj4HqhQ==", + "dev": true, + "requires": { + "boolbase": "^1.0.0", + "css-what": "^6.0.1", + "domhandler": "^4.3.1", + "domutils": "^2.8.0", + "nth-check": "^2.0.1" + } + }, + "css-selector-tokenizer": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/css-selector-tokenizer/-/css-selector-tokenizer-0.7.3.tgz", + "integrity": "sha512-jWQv3oCEL5kMErj4wRnK/OPoBi0D+P1FR2cDCKYPaMeD2eW3/mttav8HT4hT1CKopiJI/psEULjkClhvJo4Lvg==", + "dev": true, + "requires": { + "cssesc": "^3.0.0", + "fastparse": "^1.1.2" + } + }, + "css-what": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz", + "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==", + "dev": true + }, + "cssauron": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/cssauron/-/cssauron-1.4.0.tgz", + "integrity": "sha512-Ht70DcFBh+/ekjVrYS2PlDMdSQEl3OFNmjK6lcn49HptBgilXf/Zwg4uFh9Xn0pX3Q8YOkSjIFOfK2osvdqpBw==", + "dev": true, + "requires": { + "through": "X.X.X" + } + }, + "cssesc": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", + "dev": true + }, + "custom-event": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/custom-event/-/custom-event-1.0.1.tgz", + "integrity": "sha512-GAj5FOq0Hd+RsCGVJxZuKaIDXDf3h6GQoNEjFgbLLI/trgtavwUbSnZ5pVfg27DVCaWjIohryS0JFwIJyT2cMg==", + "dev": true + }, + "damerau-levenshtein": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz", + "integrity": "sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==", + "dev": true + }, + "date-format": { + "version": "4.0.14", + "resolved": "https://registry.npmjs.org/date-format/-/date-format-4.0.14.tgz", + "integrity": "sha512-39BOQLs9ZjKh0/patS9nrT8wc3ioX3/eA/zgbKNopnF2wCqJEoxywwwElATYvRsXdnOxA/OQeQoFZ3rFjVajhg==", + "dev": true + }, + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "default-gateway": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-6.0.3.tgz", + "integrity": "sha512-fwSOJsbbNzZ/CUFpqFBqYfYNLj1NbMPm8MMCIzHjC83iSJRBEGmDUxU+WP661BaBQImeC2yHwXtz+P/O9o+XEg==", + "dev": true, + "requires": { + "execa": "^5.0.0" + } + }, + "defaults": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", + "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", + "dev": true, + "requires": { + "clone": "^1.0.2" + } + }, + "define-lazy-prop": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", + "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==", + "dev": true + }, + "delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==", + "dev": true + }, + "depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "dev": true + }, + "dependency-graph": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/dependency-graph/-/dependency-graph-0.11.0.tgz", + "integrity": "sha512-JeMq7fEshyepOWDfcfHK06N3MhyPhz++vtqWhMT5O9A3K42rdsEDpfdVqjaqaAhsw6a+ZqeDvQVtD0hFHQWrzg==", + "dev": true + }, + "destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "dev": true + }, + "detect-node": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.1.0.tgz", + "integrity": "sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==", + "dev": true + }, + "di": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/di/-/di-0.0.1.tgz", + "integrity": "sha512-uJaamHkagcZtHPqCIHZxnFrXlunQXgBOsZSUOWwFw31QJCAbyTBoHMW75YOTur5ZNx8pIeAKgf6GWIgaqqiLhA==", + "dev": true + }, + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true + }, + "dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "requires": { + "path-type": "^4.0.0" + } + }, + "dns-equal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz", + "integrity": "sha512-z+paD6YUQsk+AbGCEM4PrOXSss5gd66QfcVBFTKR/HpFL9jCqikS94HYwKww6fQyO7IxrIIyUu+g0Ka9tUS2Cg==", + "dev": true + }, + "dns-packet": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-5.4.0.tgz", + "integrity": "sha512-EgqGeaBB8hLiHLZtp/IbaDQTL8pZ0+IvwzSHA6d7VyMDM+B9hgddEMa9xjK5oYnw0ci0JQ6g2XCD7/f6cafU6g==", + "dev": true, + "requires": { + "@leichtgewicht/ip-codec": "^2.0.1" + } + }, + "dom-serialize": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/dom-serialize/-/dom-serialize-2.2.1.tgz", + "integrity": "sha512-Yra4DbvoW7/Z6LBN560ZwXMjoNOSAN2wRsKFGc4iBeso+mpIA6qj1vfdf9HpMaKAqG6wXTy+1SYEzmNpKXOSsQ==", + "dev": true, + "requires": { + "custom-event": "~1.0.0", + "ent": "~2.2.0", + "extend": "^3.0.0", + "void-elements": "^2.0.0" + } + }, + "dom-serializer": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.4.1.tgz", + "integrity": "sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag==", + "dev": true, + "requires": { + "domelementtype": "^2.0.1", + "domhandler": "^4.2.0", + "entities": "^2.0.0" + } + }, + "domelementtype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", + "dev": true + }, + "domhandler": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.3.1.tgz", + "integrity": "sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ==", + "dev": true, + "requires": { + "domelementtype": "^2.2.0" + } + }, + "domutils": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz", + "integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==", + "dev": true, + "requires": { + "dom-serializer": "^1.0.1", + "domelementtype": "^2.2.0", + "domhandler": "^4.2.0" + } + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", + "dev": true + }, + "electron-to-chromium": { + "version": "1.4.284", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.284.tgz", + "integrity": "sha512-M8WEXFuKXMYMVr45fo8mq0wUrrJHheiKZf6BArTKk9ZBYCKJEOU5H8cdWgDT+qCVZf7Na4lVUaZsA+h6uA9+PA==", + "dev": true + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "emojis-list": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", + "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", + "dev": true + }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "dev": true + }, + "encoding": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", + "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", + "dev": true, + "optional": true, + "requires": { + "iconv-lite": "^0.6.2" + }, + "dependencies": { + "iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "optional": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + } + } + } + }, + "engine.io": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.2.1.tgz", + "integrity": "sha512-ECceEFcAaNRybd3lsGQKas3ZlMVjN3cyWwMP25D2i0zWfyiytVbTpRPa34qrr+FHddtpBVOmq4H/DCv1O0lZRA==", + "dev": true, + "requires": { + "@types/cookie": "^0.4.1", + "@types/cors": "^2.8.12", + "@types/node": ">=10.0.0", + "accepts": "~1.3.4", + "base64id": "2.0.0", + "cookie": "~0.4.1", + "cors": "~2.8.5", + "debug": "~4.3.1", + "engine.io-parser": "~5.0.3", + "ws": "~8.2.3" + } + }, + "engine.io-parser": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.0.4.tgz", + "integrity": "sha512-+nVFp+5z1E3HcToEnO7ZIj3g+3k9389DvWtvJZz0T6/eOCPIyyxehFcedoYrZQrp0LgQbD9pPXhpMBKMd5QURg==", + "dev": true + }, + "enhanced-resolve": { + "version": "5.12.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.12.0.tgz", + "integrity": "sha512-QHTXI/sZQmko1cbDoNAa3mJ5qhWUUNAq3vR0/YiD379fWQrcfuoX1+HW2S0MTt7XmoPLapdaDKUtelUSPic7hQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + } + }, + "ent": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/ent/-/ent-2.2.0.tgz", + "integrity": "sha512-GHrMyVZQWvTIdDtpiEXdHZnFQKzeO09apj8Cbl4pKWy4i0Oprcq17usfDt5aO63swf0JOeMWjWQE/LzgSRuWpA==", + "dev": true + }, + "entities": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", + "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", + "dev": true + }, + "env-paths": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", + "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", + "dev": true + }, + "err-code": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz", + "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==", + "dev": true + }, + "errno": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz", + "integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==", + "dev": true, + "optional": true, + "requires": { + "prr": "~1.0.1" + } + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "es-module-lexer": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.9.3.tgz", + "integrity": "sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==", + "dev": true + }, + "esbuild": { + "version": "0.15.13", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.15.13.tgz", + "integrity": "sha512-Cu3SC84oyzzhrK/YyN4iEVy2jZu5t2fz66HEOShHURcjSkOSAVL8C/gfUT+lDJxkVHpg8GZ10DD0rMHRPqMFaQ==", + "dev": true, + "optional": true, + "requires": { + "@esbuild/android-arm": "0.15.13", + "@esbuild/linux-loong64": "0.15.13", + "esbuild-android-64": "0.15.13", + "esbuild-android-arm64": "0.15.13", + "esbuild-darwin-64": "0.15.13", + "esbuild-darwin-arm64": "0.15.13", + "esbuild-freebsd-64": "0.15.13", + "esbuild-freebsd-arm64": "0.15.13", + "esbuild-linux-32": "0.15.13", + "esbuild-linux-64": "0.15.13", + "esbuild-linux-arm": "0.15.13", + "esbuild-linux-arm64": "0.15.13", + "esbuild-linux-mips64le": "0.15.13", + "esbuild-linux-ppc64le": "0.15.13", + "esbuild-linux-riscv64": "0.15.13", + "esbuild-linux-s390x": "0.15.13", + "esbuild-netbsd-64": "0.15.13", + "esbuild-openbsd-64": "0.15.13", + "esbuild-sunos-64": "0.15.13", + "esbuild-windows-32": "0.15.13", + "esbuild-windows-64": "0.15.13", + "esbuild-windows-arm64": "0.15.13" + } + }, + "esbuild-android-64": { + "version": "0.15.13", + "resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.15.13.tgz", + "integrity": "sha512-yRorukXBlokwTip+Sy4MYskLhJsO0Kn0/Fj43s1krVblfwP+hMD37a4Wmg139GEsMLl+vh8WXp2mq/cTA9J97g==", + "dev": true, + "optional": true + }, + "esbuild-android-arm64": { + "version": "0.15.13", + "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.15.13.tgz", + "integrity": "sha512-TKzyymLD6PiVeyYa4c5wdPw87BeAiTXNtK6amWUcXZxkV51gOk5u5qzmDaYSwiWeecSNHamFsaFjLoi32QR5/w==", + "dev": true, + "optional": true + }, + "esbuild-darwin-64": { + "version": "0.15.13", + "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.15.13.tgz", + "integrity": "sha512-WAx7c2DaOS6CrRcoYCgXgkXDliLnFv3pQLV6GeW1YcGEZq2Gnl8s9Pg7ahValZkpOa0iE/ojRVQ87sbUhF1Cbg==", + "dev": true, + "optional": true + }, + "esbuild-darwin-arm64": { + "version": "0.15.13", + "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.15.13.tgz", + "integrity": "sha512-U6jFsPfSSxC3V1CLiQqwvDuj3GGrtQNB3P3nNC3+q99EKf94UGpsG9l4CQ83zBs1NHrk1rtCSYT0+KfK5LsD8A==", + "dev": true, + "optional": true + }, + "esbuild-freebsd-64": { + "version": "0.15.13", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.15.13.tgz", + "integrity": "sha512-whItJgDiOXaDG/idy75qqevIpZjnReZkMGCgQaBWZuKHoElDJC1rh7MpoUgupMcdfOd+PgdEwNQW9DAE6i8wyA==", + "dev": true, + "optional": true + }, + "esbuild-freebsd-arm64": { + "version": "0.15.13", + "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.15.13.tgz", + "integrity": "sha512-6pCSWt8mLUbPtygv7cufV0sZLeylaMwS5Fznj6Rsx9G2AJJsAjQ9ifA+0rQEIg7DwJmi9it+WjzNTEAzzdoM3Q==", + "dev": true, + "optional": true + }, + "esbuild-linux-32": { + "version": "0.15.13", + "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.15.13.tgz", + "integrity": "sha512-VbZdWOEdrJiYApm2kkxoTOgsoCO1krBZ3quHdYk3g3ivWaMwNIVPIfEE0f0XQQ0u5pJtBsnk2/7OPiCFIPOe/w==", + "dev": true, + "optional": true + }, + "esbuild-linux-64": { + "version": "0.15.13", + "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.15.13.tgz", + "integrity": "sha512-rXmnArVNio6yANSqDQlIO4WiP+Cv7+9EuAHNnag7rByAqFVuRusLbGi2697A5dFPNXoO//IiogVwi3AdcfPC6A==", + "dev": true, + "optional": true + }, + "esbuild-linux-arm": { + "version": "0.15.13", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.15.13.tgz", + "integrity": "sha512-Ac6LpfmJO8WhCMQmO253xX2IU2B3wPDbl4IvR0hnqcPrdfCaUa2j/lLMGTjmQ4W5JsJIdHEdW12dG8lFS0MbxQ==", + "dev": true, + "optional": true + }, + "esbuild-linux-arm64": { + "version": "0.15.13", + "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.15.13.tgz", + "integrity": "sha512-alEMGU4Z+d17U7KQQw2IV8tQycO6T+rOrgW8OS22Ua25x6kHxoG6Ngry6Aq6uranC+pNWNMB6aHFPh7aTQdORQ==", + "dev": true, + "optional": true + }, + "esbuild-linux-mips64le": { + "version": "0.15.13", + "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.15.13.tgz", + "integrity": "sha512-47PgmyYEu+yN5rD/MbwS6DxP2FSGPo4Uxg5LwIdxTiyGC2XKwHhHyW7YYEDlSuXLQXEdTO7mYe8zQ74czP7W8A==", + "dev": true, + "optional": true + }, + "esbuild-linux-ppc64le": { + "version": "0.15.13", + "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.15.13.tgz", + "integrity": "sha512-z6n28h2+PC1Ayle9DjKoBRcx/4cxHoOa2e689e2aDJSaKug3jXcQw7mM+GLg+9ydYoNzj8QxNL8ihOv/OnezhA==", + "dev": true, + "optional": true + }, + "esbuild-linux-riscv64": { + "version": "0.15.13", + "resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.15.13.tgz", + "integrity": "sha512-+Lu4zuuXuQhgLUGyZloWCqTslcCAjMZH1k3Xc9MSEJEpEFdpsSU0sRDXAnk18FKOfEjhu4YMGaykx9xjtpA6ow==", + "dev": true, + "optional": true + }, + "esbuild-linux-s390x": { + "version": "0.15.13", + "resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.15.13.tgz", + "integrity": "sha512-BMeXRljruf7J0TMxD5CIXS65y7puiZkAh+s4XFV9qy16SxOuMhxhVIXYLnbdfLrsYGFzx7U9mcdpFWkkvy/Uag==", + "dev": true, + "optional": true + }, + "esbuild-netbsd-64": { + "version": "0.15.13", + "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.15.13.tgz", + "integrity": "sha512-EHj9QZOTel581JPj7UO3xYbltFTYnHy+SIqJVq6yd3KkCrsHRbapiPb0Lx3EOOtybBEE9EyqbmfW1NlSDsSzvQ==", + "dev": true, + "optional": true + }, + "esbuild-openbsd-64": { + "version": "0.15.13", + "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.15.13.tgz", + "integrity": "sha512-nkuDlIjF/sfUhfx8SKq0+U+Fgx5K9JcPq1mUodnxI0x4kBdCv46rOGWbuJ6eof2n3wdoCLccOoJAbg9ba/bT2w==", + "dev": true, + "optional": true + }, + "esbuild-sunos-64": { + "version": "0.15.13", + "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.15.13.tgz", + "integrity": "sha512-jVeu2GfxZQ++6lRdY43CS0Tm/r4WuQQ0Pdsrxbw+aOrHQPHV0+LNOLnvbN28M7BSUGnJnHkHm2HozGgNGyeIRw==", + "dev": true, + "optional": true + }, + "esbuild-wasm": { + "version": "0.15.13", + "resolved": "https://registry.npmjs.org/esbuild-wasm/-/esbuild-wasm-0.15.13.tgz", + "integrity": "sha512-0am8fvHKACwofWQxtZLTMv4mDiDwUrdt0DyRaQ2r7YWIpkmpg4GWYy0EyW+gPjiPHzkZKqN9d3UYsZGgvaAASw==", + "dev": true + }, + "esbuild-windows-32": { + "version": "0.15.13", + "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.15.13.tgz", + "integrity": "sha512-XoF2iBf0wnqo16SDq+aDGi/+QbaLFpkiRarPVssMh9KYbFNCqPLlGAWwDvxEVz+ywX6Si37J2AKm+AXq1kC0JA==", + "dev": true, + "optional": true + }, + "esbuild-windows-64": { + "version": "0.15.13", + "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.15.13.tgz", + "integrity": "sha512-Et6htEfGycjDrtqb2ng6nT+baesZPYQIW+HUEHK4D1ncggNrDNk3yoboYQ5KtiVrw/JaDMNttz8rrPubV/fvPQ==", + "dev": true, + "optional": true + }, + "esbuild-windows-arm64": { + "version": "0.15.13", + "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.15.13.tgz", + "integrity": "sha512-3bv7tqntThQC9SWLRouMDmZnlOukBhOCTlkzNqzGCmrkCJI7io5LLjwJBOVY6kOUlIvdxbooNZwjtBvj+7uuVg==", + "dev": true, + "optional": true + }, + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true + }, + "eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + } + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "requires": { + "estraverse": "^5.2.0" + }, + "dependencies": { + "estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true + } + } + }, + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true + }, + "etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "dev": true + }, + "eventemitter-asyncresource": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/eventemitter-asyncresource/-/eventemitter-asyncresource-1.0.0.tgz", + "integrity": "sha512-39F7TBIV0G7gTelxwbEqnwhp90eqCPON1k0NwNfwhgKn4Co4ybUbj2pECcXT0B3ztRKZ7Pw1JujUUgmQJHcVAQ==", + "dev": true + }, + "eventemitter3": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", + "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", + "dev": true + }, + "events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "dev": true + }, + "execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + } + }, + "express": { + "version": "4.18.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", + "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", + "dev": true, + "requires": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.1", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.5.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.2.0", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.7", + "qs": "6.11.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.18.0", + "serve-static": "1.15.0", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "dependencies": { + "array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", + "dev": true + }, + "cookie": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", + "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", + "dev": true + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "finalhandler": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", + "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", + "dev": true, + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + }, + "statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "dev": true + } + } + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, + "external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dev": true, + "requires": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + } + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "fast-glob": { + "version": "3.2.12", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", + "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + } + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "fastparse": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/fastparse/-/fastparse-1.1.2.tgz", + "integrity": "sha512-483XLLxTVIwWK3QTrMGRqUfUpoOs/0hbQrl2oz4J0pAcm3A3bu84wxTFqGqkJzewCLdME38xJLJAxBABfQT8sQ==", + "dev": true + }, + "fastq": { + "version": "1.14.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.14.0.tgz", + "integrity": "sha512-eR2D+V9/ExcbF9ls441yIuN6TI2ED1Y2ZcA5BmMtJsOkWOFRJQ0Jt0g1UwqXJJVAb+V+umH5Dfr8oh4EVP7VVg==", + "dev": true, + "requires": { + "reusify": "^1.0.4" + } + }, + "faye-websocket": { + "version": "0.11.4", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.4.tgz", + "integrity": "sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g==", + "dev": true, + "requires": { + "websocket-driver": ">=0.5.1" + } + }, + "figures": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "finalhandler": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", + "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "dev": true, + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "statuses": "~1.5.0", + "unpipe": "~1.0.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==", + "dev": true, + "requires": { + "ee-first": "1.1.1" + } + } + } + }, + "find-cache-dir": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", + "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", + "dev": true, + "requires": { + "commondir": "^1.0.1", + "make-dir": "^3.0.2", + "pkg-dir": "^4.1.0" + } + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "flatted": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", + "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", + "dev": true + }, + "follow-redirects": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", + "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "dev": true + }, + "forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "dev": true + }, + "fraction.js": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.2.0.tgz", + "integrity": "sha512-MhLuK+2gUcnZe8ZHlaaINnQLl0xRIGRfcGk2yl8xoQAfHrSsL3rYu6FCmBdkdbhc9EPlwyGHewaRsvwRMJtAlA==", + "dev": true + }, + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "dev": true + }, + "fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "dev": true, + "requires": { + "minipass": "^3.0.0" + } + }, + "fs-monkey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/fs-monkey/-/fs-monkey-1.0.3.tgz", + "integrity": "sha512-cybjIfiiE+pTWicSCLFHSrXZ6EilF30oh91FDP9S2B051prEa7QWfrVTQm10/dDpswBDXZugPa1Ogu8Yh+HV0Q==", + "dev": true + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "optional": true + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "gauge": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.4.tgz", + "integrity": "sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg==", + "dev": true, + "requires": { + "aproba": "^1.0.3 || ^2.0.0", + "color-support": "^1.1.3", + "console-control-strings": "^1.1.0", + "has-unicode": "^2.0.1", + "signal-exit": "^3.0.7", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wide-align": "^1.1.5" + } + }, + "gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, + "get-intrinsic": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz", + "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.3" + } + }, + "get-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", + "dev": true + }, + "get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true + }, + "glob": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.0.3.tgz", + "integrity": "sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + } + }, + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "glob-to-regexp": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", + "dev": true + }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + }, + "globby": { + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/globby/-/globby-13.1.2.tgz", + "integrity": "sha512-LKSDZXToac40u8Q1PQtZihbNdTYSNMuWe+K5l+oa6KgDzSvVrHXlJy40hUP522RjAIoNLJYBJi7ow+rbFpIhHQ==", + "dev": true, + "requires": { + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.11", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^4.0.0" + } + }, + "graceful-fs": { + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", + "dev": true + }, + "handle-thing": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.1.tgz", + "integrity": "sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg==", + "dev": true + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true + }, + "has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true + }, + "has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==", + "dev": true + }, + "hdr-histogram-js": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/hdr-histogram-js/-/hdr-histogram-js-2.0.3.tgz", + "integrity": "sha512-Hkn78wwzWHNCp2uarhzQ2SGFLU3JY8SBDDd3TAABK4fc30wm+MuPOrg5QVFVfkKOQd6Bfz3ukJEI+q9sXEkK1g==", + "dev": true, + "requires": { + "@assemblyscript/loader": "^0.10.1", + "base64-js": "^1.2.0", + "pako": "^1.0.3" + } + }, + "hdr-histogram-percentiles-obj": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/hdr-histogram-percentiles-obj/-/hdr-histogram-percentiles-obj-3.0.0.tgz", + "integrity": "sha512-7kIufnBqdsBGcSZLPJwqHT3yhk1QTsSlFsVD3kx5ixH/AlgBs9yM1q6DPhXZ8f8gtdqgh7N7/5btRLpQsS2gHw==", + "dev": true + }, + "hosted-git-info": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-5.2.1.tgz", + "integrity": "sha512-xIcQYMnhcx2Nr4JTjsFmwwnr9vldugPy9uVm0o87bjqqWMv9GaqsTeT+i99wTl0mk1uLxJtHxLb8kymqTENQsw==", + "dev": true, + "requires": { + "lru-cache": "^7.5.1" + } + }, + "hpack.js": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz", + "integrity": "sha512-zJxVehUdMGIKsRaNt7apO2Gqp0BdqW5yaiGHXXmbpvxgBYVZnAql+BJb4RO5ad2MgpbZKn5G6nMnegrH1FcNYQ==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "obuf": "^1.0.0", + "readable-stream": "^2.0.1", + "wbuf": "^1.1.0" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "html-entities": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-2.3.3.tgz", + "integrity": "sha512-DV5Ln36z34NNTDgnz0EWGBLZENelNAtkiFA4kyNOG2tDI6Mz1uSWiq1wAKdyjnJwyDiDO7Fa2SO1CTxPXL8VxA==", + "dev": true + }, + "html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true + }, + "http-cache-semantics": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", + "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==", + "dev": true + }, + "http-deceiver": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz", + "integrity": "sha512-LmpOGxTfbpgtGVxJrj5k7asXHCgNZp5nLfp+hWc8QQRqtb7fUy6kRY3BO1h9ddF6yIPYUARgxGOwB42DnxIaNw==", + "dev": true + }, + "http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "dev": true, + "requires": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "dependencies": { + "statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "dev": true + } + } + }, + "http-parser-js": { + "version": "0.5.8", + "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.8.tgz", + "integrity": "sha512-SGeBX54F94Wgu5RH3X5jsDtf4eHyRogWX1XGT3b4HuW3tQPM4AaBzoUji/4AAJNXCEOWZ5O0DgZmJw1947gD5Q==", + "dev": true + }, + "http-proxy": { + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz", + "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==", + "dev": true, + "requires": { + "eventemitter3": "^4.0.0", + "follow-redirects": "^1.0.0", + "requires-port": "^1.0.0" + } + }, + "http-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", + "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", + "dev": true, + "requires": { + "@tootallnate/once": "2", + "agent-base": "6", + "debug": "4" + } + }, + "http-proxy-middleware": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.6.tgz", + "integrity": "sha512-ya/UeJ6HVBYxrgYotAZo1KvPWlgB48kUJLDePFeneHsVujFaW5WNj2NgWCAE//B1Dl02BIfYlpNgBy8Kf8Rjmw==", + "dev": true, + "requires": { + "@types/http-proxy": "^1.17.8", + "http-proxy": "^1.18.1", + "is-glob": "^4.0.1", + "is-plain-obj": "^3.0.0", + "micromatch": "^4.0.2" + } + }, + "https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "dev": true, + "requires": { + "agent-base": "6", + "debug": "4" + } + }, + "human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true + }, + "humanize-ms": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", + "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==", + "dev": true, + "requires": { + "ms": "^2.0.0" + } + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "icss-utils": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz", + "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==", + "dev": true, + "requires": {} + }, + "ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true + }, + "ignore": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.1.tgz", + "integrity": "sha512-d2qQLzTJ9WxQftPAuEQpSPmKqzxePjzVbpAVv62AQ64NTL+wR4JkrVqR/LqFsFEUsHDAiId52mJteHDFuDkElA==", + "dev": true + }, + "ignore-walk": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-6.0.0.tgz", + "integrity": "sha512-bTf9UWe/UP1yxG3QUrj/KOvEhTAUWPcv+WvbFZ28LcqznXabp7Xu6o9y1JEC18+oqODuS7VhTpekV5XvFwsxJg==", + "dev": true, + "requires": { + "minimatch": "^5.0.1" + } + }, + "image-size": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz", + "integrity": "sha512-6TDAlDPZxUFCv+fuOkIoXT/V/f3Qbq8e37p+YOiYrUv3v9cc3/6x78VdfPgFVaB9dZYeLUfKgHRebpkm/oP2VQ==", + "dev": true, + "optional": true + }, + "immutable": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.1.0.tgz", + "integrity": "sha512-oNkuqVTA8jqG1Q6c+UglTOD1xhC1BtjKI7XkCXRkZHrN5m18/XsnUp8Q89GkQO/z+0WjonSvl0FLhDYftp46nQ==", + "dev": true + }, + "import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "dependencies": { + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + } + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true + }, + "indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true + }, + "infer-owner": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", + "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "ini": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ini/-/ini-3.0.1.tgz", + "integrity": "sha512-it4HyVAUTKBc6m8e1iXWvXSTdndF7HbdN713+kvLrymxTaU4AUBWrJ4vEooP+V7fexnVD3LKcBshjGGPefSMUQ==", + "dev": true + }, + "inquirer": { + "version": "8.2.4", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.4.tgz", + "integrity": "sha512-nn4F01dxU8VeKfq192IjLsxu0/OmMZ4Lg3xKAns148rCaXP6ntAoEkVYZThWjwON8AlzdZZi6oqnhNbxUG9hVg==", + "dev": true, + "requires": { + "ansi-escapes": "^4.2.1", + "chalk": "^4.1.1", + "cli-cursor": "^3.1.0", + "cli-width": "^3.0.0", + "external-editor": "^3.0.3", + "figures": "^3.0.0", + "lodash": "^4.17.21", + "mute-stream": "0.0.8", + "ora": "^5.4.1", + "run-async": "^2.4.0", + "rxjs": "^7.5.5", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "through": "^2.3.6", + "wrap-ansi": "^7.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "ip": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz", + "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==", + "dev": true + }, + "ipaddr.js": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.0.1.tgz", + "integrity": "sha512-1qTgH9NG+IIJ4yfKs2e6Pp1bZg8wbDbKHT21HrLIeYBTRLgMYKnMTPAuI3Lcs61nfx5h1xlXnbJtH1kX5/d/ng==", + "dev": true + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true + }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "requires": { + "binary-extensions": "^2.0.0" + } + }, + "is-core-module": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", + "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, + "is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", + "dev": true + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-interactive": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", + "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", + "dev": true + }, + "is-lambda": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz", + "integrity": "sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==", + "dev": true + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "is-plain-obj": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-3.0.0.tgz", + "integrity": "sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA==", + "dev": true + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true + }, + "is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true + }, + "is-what": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/is-what/-/is-what-3.14.1.tgz", + "integrity": "sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==", + "dev": true + }, + "is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dev": true, + "requires": { + "is-docker": "^2.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true + }, + "isbinaryfile": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-4.0.10.tgz", + "integrity": "sha512-iHrqe5shvBUcFbmZq9zOQHBoeOhZJu6RQGrDpBgenUm/Am+F3JM2MgQj+rK3Z601fzrL5gLZWtAPH2OBaSVcyw==", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true + }, + "istanbul-lib-coverage": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", + "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", + "dev": true + }, + "istanbul-lib-instrument": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", + "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", + "dev": true, + "requires": { + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, + "istanbul-lib-report": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", + "dev": true, + "requires": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^3.0.0", + "supports-color": "^7.1.0" + }, + "dependencies": { + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "istanbul-lib-source-maps": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-3.0.6.tgz", + "integrity": "sha512-R47KzMtDJH6X4/YW9XTx+jrLnZnscW4VpNN+1PViSYTejLVPWv7oov+Duf8YQSPyVRUvueQqz1TcsC6mooZTXw==", + "dev": true, + "requires": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^2.0.5", + "make-dir": "^2.1.0", + "rimraf": "^2.6.3", + "source-map": "^0.6.1" + }, + "dependencies": { + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "istanbul-lib-coverage": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz", + "integrity": "sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA==", + "dev": true + }, + "make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, + "requires": { + "pify": "^4.0.1", + "semver": "^5.6.0" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "istanbul-reports": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.5.tgz", + "integrity": "sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==", + "dev": true, + "requires": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + } + }, + "jasmine-core": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-4.5.0.tgz", + "integrity": "sha512-9PMzyvhtocxb3aXJVOPqBDswdgyAeSB81QnLop4npOpbqnheaTEwPc9ZloQeVswugPManznQBjD8kWDTjlnHuw==", + "dev": true + }, + "jasmine-spec-reporter": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/jasmine-spec-reporter/-/jasmine-spec-reporter-7.0.0.tgz", + "integrity": "sha512-OtC7JRasiTcjsaCBPtMO0Tl8glCejM4J4/dNuOJdA8lBjz4PmWjYQ6pzb0uzpBNAWJMDudYuj9OdXJWqM2QTJg==", + "dev": true, + "requires": { + "colors": "1.4.0" + } + }, + "jest-worker": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", + "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", + "dev": true, + "requires": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "dependencies": { + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true + }, + "json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true + }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + }, + "json5": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", + "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "dev": true + }, + "jsonc-parser": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", + "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==", + "dev": true + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==", + "dev": true + }, + "karma": { + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/karma/-/karma-6.4.1.tgz", + "integrity": "sha512-Cj57NKOskK7wtFWSlMvZf459iX+kpYIPXmkNUzP2WAFcA7nhr/ALn5R7sw3w+1udFDcpMx/tuB8d5amgm3ijaA==", + "dev": true, + "requires": { + "@colors/colors": "1.5.0", + "body-parser": "^1.19.0", + "braces": "^3.0.2", + "chokidar": "^3.5.1", + "connect": "^3.7.0", + "di": "^0.0.1", + "dom-serialize": "^2.2.1", + "glob": "^7.1.7", + "graceful-fs": "^4.2.6", + "http-proxy": "^1.18.1", + "isbinaryfile": "^4.0.8", + "lodash": "^4.17.21", + "log4js": "^6.4.1", + "mime": "^2.5.2", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.5", + "qjobs": "^1.2.0", + "range-parser": "^1.2.1", + "rimraf": "^3.0.2", + "socket.io": "^4.4.1", + "source-map": "^0.6.1", + "tmp": "^0.2.1", + "ua-parser-js": "^0.7.30", + "yargs": "^16.1.1" + }, + "dependencies": { + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "tmp": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", + "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==", + "dev": true, + "requires": { + "rimraf": "^3.0.0" + } + }, + "yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "requires": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + } + }, + "yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true + } + } + }, + "karma-chrome-launcher": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/karma-chrome-launcher/-/karma-chrome-launcher-3.1.1.tgz", + "integrity": "sha512-hsIglcq1vtboGPAN+DGCISCFOxW+ZVnIqhDQcCMqqCp+4dmJ0Qpq5QAjkbA0X2L9Mi6OBkHi2Srrbmm7pUKkzQ==", + "dev": true, + "requires": { + "which": "^1.2.1" + } + }, + "karma-coverage-istanbul-reporter": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/karma-coverage-istanbul-reporter/-/karma-coverage-istanbul-reporter-3.0.3.tgz", + "integrity": "sha512-wE4VFhG/QZv2Y4CdAYWDbMmcAHeS926ZIji4z+FkB2aF/EposRb6DP6G5ncT/wXhqUfAb/d7kZrNKPonbvsATw==", + "dev": true, + "requires": { + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^3.0.6", + "istanbul-reports": "^3.0.2", + "minimatch": "^3.0.4" + }, + "dependencies": { + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + } + } + }, + "karma-jasmine": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/karma-jasmine/-/karma-jasmine-5.1.0.tgz", + "integrity": "sha512-i/zQLFrfEpRyQoJF9fsCdTMOF5c2dK7C7OmsuKg2D0YSsuZSfQDiLuaiktbuio6F2wiCsZSnSnieIQ0ant/uzQ==", + "dev": true, + "requires": { + "jasmine-core": "^4.1.0" + } + }, + "karma-jasmine-html-reporter": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/karma-jasmine-html-reporter/-/karma-jasmine-html-reporter-2.0.0.tgz", + "integrity": "sha512-SB8HNNiazAHXM1vGEzf8/tSyEhkfxuDdhYdPBX2Mwgzt0OuF2gicApQ+uvXLID/gXyJQgvrM9+1/2SxZFUUDIA==", + "dev": true, + "requires": {} + }, + "karma-source-map-support": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/karma-source-map-support/-/karma-source-map-support-1.4.0.tgz", + "integrity": "sha512-RsBECncGO17KAoJCYXjv+ckIz+Ii9NCi+9enk+rq6XC81ezYkb4/RHE6CTXdA7IOJqoF3wcaLfVG0CPmE5ca6A==", + "dev": true, + "requires": { + "source-map-support": "^0.5.5" + } + }, + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true + }, + "klona": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/klona/-/klona-2.0.5.tgz", + "integrity": "sha512-pJiBpiXMbt7dkzXe8Ghj/u4FfXOOa98fPW+bihOJ4SjnoijweJrNThJfd3ifXpXhREjpoF2mZVH1GfS9LV3kHQ==", + "dev": true + }, + "less": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/less/-/less-4.1.3.tgz", + "integrity": "sha512-w16Xk/Ta9Hhyei0Gpz9m7VS8F28nieJaL/VyShID7cYvP6IL5oHeL6p4TXSDJqZE/lNv0oJ2pGVjJsRkfwm5FA==", + "dev": true, + "requires": { + "copy-anything": "^2.0.1", + "errno": "^0.1.1", + "graceful-fs": "^4.1.2", + "image-size": "~0.5.0", + "make-dir": "^2.1.0", + "mime": "^1.4.1", + "needle": "^3.1.0", + "parse-node-version": "^1.0.1", + "source-map": "~0.6.0", + "tslib": "^2.3.0" + }, + "dependencies": { + "make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, + "optional": true, + "requires": { + "pify": "^4.0.1", + "semver": "^5.6.0" + } + }, + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "dev": true, + "optional": true + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "optional": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "optional": true + } + } + }, + "less-loader": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/less-loader/-/less-loader-11.1.0.tgz", + "integrity": "sha512-C+uDBV7kS7W5fJlUjq5mPBeBVhYpTIm5gB09APT9o3n/ILeaXVsiSFTbZpTJCJwQ/Crczfn3DmfQFwxYusWFug==", + "dev": true, + "requires": { + "klona": "^2.0.4" + } + }, + "license-webpack-plugin": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/license-webpack-plugin/-/license-webpack-plugin-4.0.2.tgz", + "integrity": "sha512-771TFWFD70G1wLTC4oU2Cw4qvtmNrIw+wRvBtn+okgHl7slJVi7zfNcdmqDL72BojM30VNJ2UHylr1o77U37Jw==", + "dev": true, + "requires": { + "webpack-sources": "^3.0.0" + } + }, + "lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true + }, + "loader-runner": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", + "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", + "dev": true + }, + "loader-utils": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-3.2.1.tgz", + "integrity": "sha512-ZvFw1KWS3GVyYBYb7qkmRM/WwL2TQQBxgCK62rlvm4WpVQ23Nb4tYjApUlfjrEGvOs7KHEsmyUn75OHZrJMWPw==", + "dev": true + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "lodash.debounce": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==", + "dev": true + }, + "log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "requires": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "log4js": { + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/log4js/-/log4js-6.7.1.tgz", + "integrity": "sha512-lzbd0Eq1HRdWM2abSD7mk6YIVY0AogGJzb/z+lqzRk+8+XJP+M6L1MS5FUSc3jjGru4dbKjEMJmqlsoYYpuivQ==", + "dev": true, + "requires": { + "date-format": "^4.0.14", + "debug": "^4.3.4", + "flatted": "^3.2.7", + "rfdc": "^1.3.0", + "streamroller": "^3.1.3" + } + }, + "lru-cache": { + "version": "7.14.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.14.1.tgz", + "integrity": "sha512-ysxwsnTKdAx96aTRdhDOCQfDgbHnt8SK0KY8SEjO0wHinhWOFTESbjVCMPbU1uGXg/ch4lifqx0wfjOawU2+WA==", + "dev": true + }, + "magic-string": { + "version": "0.26.7", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.26.7.tgz", + "integrity": "sha512-hX9XH3ziStPoPhJxLq1syWuZMxbDvGNbVchfrdCtanC7D13888bMFow61x8axrx+GfHLtVeAx2kxL7tTGRl+Ow==", + "dev": true, + "requires": { + "sourcemap-codec": "^1.4.8" + } + }, + "make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "requires": { + "semver": "^6.0.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, + "make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true + }, + "make-fetch-happen": { + "version": "10.2.1", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.2.1.tgz", + "integrity": "sha512-NgOPbRiaQM10DYXvN3/hhGVI2M5MtITFryzBGxHM5p4wnFxsVCbxkrBrDsk+EZ5OB4jEOT7AjDxtdF+KVEFT7w==", + "dev": true, + "requires": { + "agentkeepalive": "^4.2.1", + "cacache": "^16.1.0", + "http-cache-semantics": "^4.1.0", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0", + "is-lambda": "^1.0.1", + "lru-cache": "^7.7.1", + "minipass": "^3.1.6", + "minipass-collect": "^1.0.2", + "minipass-fetch": "^2.0.3", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.3", + "promise-retry": "^2.0.1", + "socks-proxy-agent": "^7.0.0", + "ssri": "^9.0.0" + }, + "dependencies": { + "@npmcli/fs": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-2.1.2.tgz", + "integrity": "sha512-yOJKRvohFOaLqipNtwYB9WugyZKhC/DZC4VYPmpaCzDBrA8YpK3qHZ8/HGscMnE4GqbkLNuVcCnxkeQEdGt6LQ==", + "dev": true, + "requires": { + "@gar/promisify": "^1.1.3", + "semver": "^7.3.5" + } + }, + "cacache": { + "version": "16.1.3", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-16.1.3.tgz", + "integrity": "sha512-/+Emcj9DAXxX4cwlLmRI9c166RuL3w30zp4R7Joiv2cQTtTtA+jeuCAjH3ZlGnYS3tKENSrKhAzVVP9GVyzeYQ==", + "dev": true, + "requires": { + "@npmcli/fs": "^2.1.0", + "@npmcli/move-file": "^2.0.0", + "chownr": "^2.0.0", + "fs-minipass": "^2.1.0", + "glob": "^8.0.1", + "infer-owner": "^1.0.4", + "lru-cache": "^7.7.1", + "minipass": "^3.1.6", + "minipass-collect": "^1.0.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "mkdirp": "^1.0.4", + "p-map": "^4.0.0", + "promise-inflight": "^1.0.1", + "rimraf": "^3.0.2", + "ssri": "^9.0.0", + "tar": "^6.1.11", + "unique-filename": "^2.0.0" + } + }, + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true + }, + "ssri": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-9.0.1.tgz", + "integrity": "sha512-o57Wcn66jMQvfHG1FlYbWeZWW/dHZhJXjpIcTfXldXEk5nz5lStPo3mK0OJQfGR3RbZUlbISexbljkJzuEj/8Q==", + "dev": true, + "requires": { + "minipass": "^3.1.1" + } + }, + "unique-filename": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-2.0.1.tgz", + "integrity": "sha512-ODWHtkkdx3IAR+veKxFV+VBkUMcN+FaqzUUd7IZzt+0zhDZFPFxhlqwPF3YQvMHx1TD0tdgYl+kuPnJ8E6ql7A==", + "dev": true, + "requires": { + "unique-slug": "^3.0.0" + } + }, + "unique-slug": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-3.0.0.tgz", + "integrity": "sha512-8EyMynh679x/0gqE9fT9oilG+qEt+ibFyqjuVTsZn1+CMxH+XLlpvr2UZx4nVcCwTpx81nICr2JQFkM+HPLq4w==", + "dev": true, + "requires": { + "imurmurhash": "^0.1.4" + } + } + } + }, + "media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "dev": true + }, + "memfs": { + "version": "3.4.12", + "resolved": "https://registry.npmjs.org/memfs/-/memfs-3.4.12.tgz", + "integrity": "sha512-BcjuQn6vfqP+k100e0E9m61Hyqa//Brp+I3f0OBmN0ATHlFA8vx3Lt8z57R3u2bPqe3WGDBC+nF72fTH7isyEw==", + "dev": true, + "requires": { + "fs-monkey": "^1.0.3" + } + }, + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==", + "dev": true + }, + "merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true + }, + "methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "dev": true + }, + "micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "requires": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + } + }, + "mime": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz", + "integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==", + "dev": true + }, + "mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true + }, + "mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "requires": { + "mime-db": "1.52.0" + } + }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true + }, + "mini-css-extract-plugin": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.6.1.tgz", + "integrity": "sha512-wd+SD57/K6DiV7jIR34P+s3uckTRuQvx0tKPcvjFlrEylk6P4mQ2KSWk1hblj1Kxaqok7LogKOieygXqBczNlg==", + "dev": true, + "requires": { + "schema-utils": "^4.0.0" + } + }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", + "dev": true + }, + "minimatch": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.1.tgz", + "integrity": "sha512-362NP+zlprccbEt/SkxKfRMHnNY85V74mVnpUpNyr3F35covl09Kec7/sEFLt3RA4oXmewtoaanoIf67SE5Y5g==", + "dev": true, + "requires": { + "brace-expansion": "^2.0.1" + } + }, + "minimist": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz", + "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==", + "dev": true + }, + "minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "minipass-collect": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz", + "integrity": "sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==", + "dev": true, + "requires": { + "minipass": "^3.0.0" + } + }, + "minipass-fetch": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-2.1.2.tgz", + "integrity": "sha512-LT49Zi2/WMROHYoqGgdlQIZh8mLPZmOrN2NdJjMXxYe4nkN6FUyuPuOAOedNJDrx0IRGg9+4guZewtp8hE6TxA==", + "dev": true, + "requires": { + "encoding": "^0.1.13", + "minipass": "^3.1.6", + "minipass-sized": "^1.0.3", + "minizlib": "^2.1.2" + } + }, + "minipass-flush": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", + "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", + "dev": true, + "requires": { + "minipass": "^3.0.0" + } + }, + "minipass-json-stream": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minipass-json-stream/-/minipass-json-stream-1.0.1.tgz", + "integrity": "sha512-ODqY18UZt/I8k+b7rl2AENgbWE8IDYam+undIJONvigAz8KR5GWblsFTEfQs0WODsjbSXWlm+JHEv8Gr6Tfdbg==", + "dev": true, + "requires": { + "jsonparse": "^1.3.1", + "minipass": "^3.0.0" + } + }, + "minipass-pipeline": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", + "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==", + "dev": true, + "requires": { + "minipass": "^3.0.0" + } + }, + "minipass-sized": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz", + "integrity": "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==", + "dev": true, + "requires": { + "minipass": "^3.0.0" + } + }, + "minizlib": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", + "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", + "dev": true, + "requires": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + } + }, + "mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "dev": true, + "requires": { + "minimist": "^1.2.6" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "multicast-dns": { + "version": "7.2.5", + "resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-7.2.5.tgz", + "integrity": "sha512-2eznPJP8z2BFLX50tf0LuODrpINqP1RVIm/CObbTcBRITQgmC/TjcREF1NeTBzIcR5XO/ukWo+YHOjBbFwIupg==", + "dev": true, + "requires": { + "dns-packet": "^5.2.2", + "thunky": "^1.0.2" + } + }, + "mute-stream": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", + "dev": true + }, + "nanoid": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz", + "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==", + "dev": true + }, + "needle": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/needle/-/needle-3.2.0.tgz", + "integrity": "sha512-oUvzXnyLiVyVGoianLijF9O/RecZUf7TkBfimjGrLM4eQhXyeJwM6GeAWccwfQ9aa4gMCZKqhAOuLaMIcQxajQ==", + "dev": true, + "optional": true, + "requires": { + "debug": "^3.2.6", + "iconv-lite": "^0.6.3", + "sax": "^1.2.4" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "optional": true, + "requires": { + "ms": "^2.1.1" + } + }, + "iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "optional": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + } + } + } + }, + "negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "dev": true + }, + "neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true + }, + "nice-napi": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/nice-napi/-/nice-napi-1.0.2.tgz", + "integrity": "sha512-px/KnJAJZf5RuBGcfD+Sp2pAKq0ytz8j+1NehvgIGFkvtvFrDM3T8E4x/JJODXK9WZow8RRGrbA9QQ3hs+pDhA==", + "dev": true, + "optional": true, + "requires": { + "node-addon-api": "^3.0.0", + "node-gyp-build": "^4.2.2" + } + }, + "node-addon-api": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.2.1.tgz", + "integrity": "sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==", + "dev": true, + "optional": true + }, + "node-forge": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz", + "integrity": "sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==", + "dev": true + }, + "node-gyp": { + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-9.3.0.tgz", + "integrity": "sha512-A6rJWfXFz7TQNjpldJ915WFb1LnhO4lIve3ANPbWreuEoLoKlFT3sxIepPBkLhM27crW8YmN+pjlgbasH6cH/Q==", + "dev": true, + "requires": { + "env-paths": "^2.2.0", + "glob": "^7.1.4", + "graceful-fs": "^4.2.6", + "make-fetch-happen": "^10.0.3", + "nopt": "^6.0.0", + "npmlog": "^6.0.0", + "rimraf": "^3.0.2", + "semver": "^7.3.5", + "tar": "^6.1.2", + "which": "^2.0.2" + }, + "dependencies": { + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, + "node-gyp-build": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.5.0.tgz", + "integrity": "sha512-2iGbaQBV+ITgCz76ZEjmhUKAKVf7xfY1sRl4UiKQspfZMH2h06SyhNsnSVy50cwkFQDGLyif6m/6uFXHkOZ6rg==", + "dev": true, + "optional": true + }, + "node-releases": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz", + "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==", + "dev": true + }, + "nopt": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-6.0.0.tgz", + "integrity": "sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g==", + "dev": true, + "requires": { + "abbrev": "^1.0.0" + } + }, + "normalize-package-data": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-5.0.0.tgz", + "integrity": "sha512-h9iPVIfrVZ9wVYQnxFgtw1ugSvGEMOlyPWWtm8BMJhnwyEL/FLbYbTY3V3PpjI/BUK67n9PEWDu6eHzu1fB15Q==", + "dev": true, + "requires": { + "hosted-git-info": "^6.0.0", + "is-core-module": "^2.8.1", + "semver": "^7.3.5", + "validate-npm-package-license": "^3.0.4" + }, + "dependencies": { + "hosted-git-info": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-6.1.1.tgz", + "integrity": "sha512-r0EI+HBMcXadMrugk0GCQ+6BQV39PiWAZVfq7oIckeGiN7sjRGyQxPdft3nQekFTCQbYxLBH+/axZMeH8UX6+w==", + "dev": true, + "requires": { + "lru-cache": "^7.5.1" + } + } + } + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + }, + "normalize-range": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", + "integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==", + "dev": true + }, + "npm-bundled": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-3.0.0.tgz", + "integrity": "sha512-Vq0eyEQy+elFpzsKjMss9kxqb9tG3YHg4dsyWuUENuzvSUWe1TCnW/vV9FkhvBk/brEDoDiVd+M1Btosa6ImdQ==", + "dev": true, + "requires": { + "npm-normalize-package-bin": "^3.0.0" + } + }, + "npm-install-checks": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-6.0.0.tgz", + "integrity": "sha512-SBU9oFglRVZnfElwAtF14NivyulDqF1VKqqwNsFW9HDcbHMAPHpRSsVFgKuwFGq/hVvWZExz62Th0kvxn/XE7Q==", + "dev": true, + "requires": { + "semver": "^7.1.1" + } + }, + "npm-normalize-package-bin": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-3.0.0.tgz", + "integrity": "sha512-g+DPQSkusnk7HYXr75NtzkIP4+N81i3RPsGFidF3DzHd9MT9wWngmqoeg/fnHFz5MNdtG4w03s+QnhewSLTT2Q==", + "dev": true + }, + "npm-package-arg": { + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-9.1.2.tgz", + "integrity": "sha512-pzd9rLEx4TfNJkovvlBSLGhq31gGu2QDexFPWT19yCDh0JgnRhlBLNo5759N0AJmBk+kQ9Y/hXoLnlgFD+ukmg==", + "dev": true, + "requires": { + "hosted-git-info": "^5.0.0", + "proc-log": "^2.0.1", + "semver": "^7.3.5", + "validate-npm-package-name": "^4.0.0" + } + }, + "npm-packlist": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-7.0.4.tgz", + "integrity": "sha512-d6RGEuRrNS5/N84iglPivjaJPxhDbZmlbTwTDX2IbcRHG5bZCdtysYMhwiPvcF4GisXHGn7xsxv+GQ7T/02M5Q==", + "dev": true, + "requires": { + "ignore-walk": "^6.0.0" + } + }, + "npm-pick-manifest": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-8.0.1.tgz", + "integrity": "sha512-mRtvlBjTsJvfCCdmPtiu2bdlx8d/KXtF7yNXNWe7G0Z36qWA9Ny5zXsI2PfBZEv7SXgoxTmNaTzGSbbzDZChoA==", + "dev": true, + "requires": { + "npm-install-checks": "^6.0.0", + "npm-normalize-package-bin": "^3.0.0", + "npm-package-arg": "^10.0.0", + "semver": "^7.3.5" + }, + "dependencies": { + "hosted-git-info": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-6.1.1.tgz", + "integrity": "sha512-r0EI+HBMcXadMrugk0GCQ+6BQV39PiWAZVfq7oIckeGiN7sjRGyQxPdft3nQekFTCQbYxLBH+/axZMeH8UX6+w==", + "dev": true, + "requires": { + "lru-cache": "^7.5.1" + } + }, + "npm-package-arg": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-10.1.0.tgz", + "integrity": "sha512-uFyyCEmgBfZTtrKk/5xDfHp6+MdrqGotX/VoOyEEl3mBwiEE5FlBaePanazJSVMPT7vKepcjYBY2ztg9A3yPIA==", + "dev": true, + "requires": { + "hosted-git-info": "^6.0.0", + "proc-log": "^3.0.0", + "semver": "^7.3.5", + "validate-npm-package-name": "^5.0.0" + } + }, + "proc-log": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-3.0.0.tgz", + "integrity": "sha512-++Vn7NS4Xf9NacaU9Xq3URUuqZETPsf8L4j5/ckhaRYsfPeRyzGw+iDjFhV/Jr3uNmTvvddEJFWh5R1gRgUH8A==", + "dev": true + }, + "validate-npm-package-name": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-5.0.0.tgz", + "integrity": "sha512-YuKoXDAhBYxY7SfOKxHBDoSyENFeW5VvIIQp2TGQuit8gpK6MnWaQelBKxso72DoxTZfZdcP3W90LqpSkgPzLQ==", + "dev": true, + "requires": { + "builtins": "^5.0.0" + } + } + } + }, + "npm-registry-fetch": { + "version": "14.0.3", + "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-14.0.3.tgz", + "integrity": "sha512-YaeRbVNpnWvsGOjX2wk5s85XJ7l1qQBGAp724h8e2CZFFhMSuw9enom7K1mWVUtvXO1uUSFIAPofQK0pPN0ZcA==", + "dev": true, + "requires": { + "make-fetch-happen": "^11.0.0", + "minipass": "^4.0.0", + "minipass-fetch": "^3.0.0", + "minipass-json-stream": "^1.0.1", + "minizlib": "^2.1.2", + "npm-package-arg": "^10.0.0", + "proc-log": "^3.0.0" + }, + "dependencies": { + "hosted-git-info": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-6.1.1.tgz", + "integrity": "sha512-r0EI+HBMcXadMrugk0GCQ+6BQV39PiWAZVfq7oIckeGiN7sjRGyQxPdft3nQekFTCQbYxLBH+/axZMeH8UX6+w==", + "dev": true, + "requires": { + "lru-cache": "^7.5.1" + } + }, + "make-fetch-happen": { + "version": "11.0.2", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-11.0.2.tgz", + "integrity": "sha512-5n/Pq41w/uZghpdlXAY5kIM85RgJThtTH/NYBRAZ9VUOBWV90USaQjwGrw76fZP3Lj5hl/VZjpVvOaRBMoL/2w==", + "dev": true, + "requires": { + "agentkeepalive": "^4.2.1", + "cacache": "^17.0.0", + "http-cache-semantics": "^4.1.0", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0", + "is-lambda": "^1.0.1", + "lru-cache": "^7.7.1", + "minipass": "^4.0.0", + "minipass-collect": "^1.0.2", + "minipass-fetch": "^3.0.0", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.3", + "promise-retry": "^2.0.1", + "socks-proxy-agent": "^7.0.0", + "ssri": "^10.0.0" + } + }, + "minipass": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.0.0.tgz", + "integrity": "sha512-g2Uuh2jEKoht+zvO6vJqXmYpflPqzRBT+Th2h01DKh5z7wbY/AZ2gCQ78cP70YoHPyFdY30YBV5WxgLOEwOykw==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "minipass-fetch": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-3.0.1.tgz", + "integrity": "sha512-t9/wowtf7DYkwz8cfMSt0rMwiyNIBXf5CKZ3S5ZMqRqMYT0oLTp0x1WorMI9WTwvaPg21r1JbFxJMum8JrLGfw==", + "dev": true, + "requires": { + "encoding": "^0.1.13", + "minipass": "^4.0.0", + "minipass-sized": "^1.0.3", + "minizlib": "^2.1.2" + } + }, + "npm-package-arg": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-10.1.0.tgz", + "integrity": "sha512-uFyyCEmgBfZTtrKk/5xDfHp6+MdrqGotX/VoOyEEl3mBwiEE5FlBaePanazJSVMPT7vKepcjYBY2ztg9A3yPIA==", + "dev": true, + "requires": { + "hosted-git-info": "^6.0.0", + "proc-log": "^3.0.0", + "semver": "^7.3.5", + "validate-npm-package-name": "^5.0.0" + } + }, + "proc-log": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-3.0.0.tgz", + "integrity": "sha512-++Vn7NS4Xf9NacaU9Xq3URUuqZETPsf8L4j5/ckhaRYsfPeRyzGw+iDjFhV/Jr3uNmTvvddEJFWh5R1gRgUH8A==", + "dev": true + }, + "validate-npm-package-name": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-5.0.0.tgz", + "integrity": "sha512-YuKoXDAhBYxY7SfOKxHBDoSyENFeW5VvIIQp2TGQuit8gpK6MnWaQelBKxso72DoxTZfZdcP3W90LqpSkgPzLQ==", + "dev": true, + "requires": { + "builtins": "^5.0.0" + } + } + } + }, + "npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "requires": { + "path-key": "^3.0.0" + } + }, + "npmlog": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.2.tgz", + "integrity": "sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg==", + "dev": true, + "requires": { + "are-we-there-yet": "^3.0.0", + "console-control-strings": "^1.1.0", + "gauge": "^4.0.3", + "set-blocking": "^2.0.0" + } + }, + "nth-check": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", + "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", + "dev": true, + "requires": { + "boolbase": "^1.0.0" + } + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true + }, + "object-inspect": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", + "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==", + "dev": true + }, + "obuf": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz", + "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==", + "dev": true + }, + "on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "dev": true, + "requires": { + "ee-first": "1.1.1" + } + }, + "on-headers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", + "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", + "dev": true + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "requires": { + "mimic-fn": "^2.1.0" + } + }, + "open": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/open/-/open-8.4.0.tgz", + "integrity": "sha512-XgFPPM+B28FtCCgSb9I+s9szOC1vZRSwgWsRUA5ylIxRTgKozqjOCrVOqGsYABPYK5qnfqClxZTFBa8PKt2v6Q==", + "dev": true, + "requires": { + "define-lazy-prop": "^2.0.0", + "is-docker": "^2.1.1", + "is-wsl": "^2.2.0" + } + }, + "ora": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", + "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", + "dev": true, + "requires": { + "bl": "^4.1.0", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-spinners": "^2.5.0", + "is-interactive": "^1.0.0", + "is-unicode-supported": "^0.1.0", + "log-symbols": "^4.1.0", + "strip-ansi": "^6.0.0", + "wcwidth": "^1.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "dev": true + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "p-map": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "dev": true, + "requires": { + "aggregate-error": "^3.0.0" + } + }, + "p-retry": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-4.6.2.tgz", + "integrity": "sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ==", + "dev": true, + "requires": { + "@types/retry": "0.12.0", + "retry": "^0.13.1" + }, + "dependencies": { + "retry": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz", + "integrity": "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==", + "dev": true + } + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "pacote": { + "version": "15.0.6", + "resolved": "https://registry.npmjs.org/pacote/-/pacote-15.0.6.tgz", + "integrity": "sha512-dQwcz/sME7QIL+cdrw/jftQfMMXxSo17i2kJ/gnhBhUvvBAsxoBu1lw9B5IzCH/Ce8CvEkG/QYZ6txzKfn0bTw==", + "dev": true, + "requires": { + "@npmcli/git": "^4.0.0", + "@npmcli/installed-package-contents": "^2.0.1", + "@npmcli/promise-spawn": "^6.0.1", + "@npmcli/run-script": "^6.0.0", + "cacache": "^17.0.0", + "fs-minipass": "^2.1.0", + "minipass": "^3.1.6", + "npm-package-arg": "^10.0.0", + "npm-packlist": "^7.0.0", + "npm-pick-manifest": "^8.0.0", + "npm-registry-fetch": "^14.0.0", + "proc-log": "^3.0.0", + "promise-retry": "^2.0.1", + "read-package-json": "^6.0.0", + "read-package-json-fast": "^3.0.0", + "ssri": "^10.0.0", + "tar": "^6.1.11" + }, + "dependencies": { + "hosted-git-info": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-6.1.1.tgz", + "integrity": "sha512-r0EI+HBMcXadMrugk0GCQ+6BQV39PiWAZVfq7oIckeGiN7sjRGyQxPdft3nQekFTCQbYxLBH+/axZMeH8UX6+w==", + "dev": true, + "requires": { + "lru-cache": "^7.5.1" + } + }, + "npm-package-arg": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-10.1.0.tgz", + "integrity": "sha512-uFyyCEmgBfZTtrKk/5xDfHp6+MdrqGotX/VoOyEEl3mBwiEE5FlBaePanazJSVMPT7vKepcjYBY2ztg9A3yPIA==", + "dev": true, + "requires": { + "hosted-git-info": "^6.0.0", + "proc-log": "^3.0.0", + "semver": "^7.3.5", + "validate-npm-package-name": "^5.0.0" + } + }, + "proc-log": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-3.0.0.tgz", + "integrity": "sha512-++Vn7NS4Xf9NacaU9Xq3URUuqZETPsf8L4j5/ckhaRYsfPeRyzGw+iDjFhV/Jr3uNmTvvddEJFWh5R1gRgUH8A==", + "dev": true + }, + "validate-npm-package-name": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-5.0.0.tgz", + "integrity": "sha512-YuKoXDAhBYxY7SfOKxHBDoSyENFeW5VvIIQp2TGQuit8gpK6MnWaQelBKxso72DoxTZfZdcP3W90LqpSkgPzLQ==", + "dev": true, + "requires": { + "builtins": "^5.0.0" + } + } + } + }, + "pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", + "dev": true + }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, + "parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + } + }, + "parse-node-version": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parse-node-version/-/parse-node-version-1.0.1.tgz", + "integrity": "sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==", + "dev": true + }, + "parse5": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", + "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", + "dev": true + }, + "parse5-html-rewriting-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5-html-rewriting-stream/-/parse5-html-rewriting-stream-6.0.1.tgz", + "integrity": "sha512-vwLQzynJVEfUlURxgnf51yAJDQTtVpNyGD8tKi2Za7m+akukNHxCcUQMAa/mUGLhCeicFdpy7Tlvj8ZNKadprg==", + "dev": true, + "requires": { + "parse5": "^6.0.1", + "parse5-sax-parser": "^6.0.1" + } + }, + "parse5-htmlparser2-tree-adapter": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz", + "integrity": "sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA==", + "dev": true, + "requires": { + "parse5": "^6.0.1" + } + }, + "parse5-sax-parser": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5-sax-parser/-/parse5-sax-parser-6.0.1.tgz", + "integrity": "sha512-kXX+5S81lgESA0LsDuGjAlBybImAChYRMT+/uKCEXFBFOeEhS52qUCydGhU3qLRD8D9DVjaUo821WK7DM4iCeg==", + "dev": true, + "requires": { + "parse5": "^6.0.1" + } + }, + "parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "dev": true + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==", + "dev": true + }, + "path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true + }, + "picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, + "picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true + }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true + }, + "piscina": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/piscina/-/piscina-3.2.0.tgz", + "integrity": "sha512-yn/jMdHRw+q2ZJhFhyqsmANcbF6V2QwmD84c6xRau+QpQOmtrBCoRGdvTfeuFDYXB5W2m6MfLkjkvQa9lUSmIA==", + "dev": true, + "requires": { + "eventemitter-asyncresource": "^1.0.0", + "hdr-histogram-js": "^2.0.1", + "hdr-histogram-percentiles-obj": "^3.0.0", + "nice-napi": "^1.0.2" + } + }, + "pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "requires": { + "find-up": "^4.0.0" + } + }, + "postcss": { + "version": "8.4.19", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.19.tgz", + "integrity": "sha512-h+pbPsyhlYj6N2ozBmHhHrs9DzGmbaarbLvWipMRO7RLS+v4onj26MPFXA5OBYFxyqYhUJK456SwDcY9H2/zsA==", + "dev": true, + "requires": { + "nanoid": "^3.3.4", + "picocolors": "^1.0.0", + "source-map-js": "^1.0.2" + } + }, + "postcss-loader": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-7.0.1.tgz", + "integrity": "sha512-VRviFEyYlLjctSM93gAZtcJJ/iSkPZ79zWbN/1fSH+NisBByEiVLqpdVDrPLVSi8DX0oJo12kL/GppTBdKVXiQ==", + "dev": true, + "requires": { + "cosmiconfig": "^7.0.0", + "klona": "^2.0.5", + "semver": "^7.3.7" + } + }, + "postcss-modules-extract-imports": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz", + "integrity": "sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==", + "dev": true, + "requires": {} + }, + "postcss-modules-local-by-default": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.0.tgz", + "integrity": "sha512-sT7ihtmGSF9yhm6ggikHdV0hlziDTX7oFoXtuVWeDd3hHObNkcHRo9V3yg7vCAY7cONyxJC/XXCmmiHHcvX7bQ==", + "dev": true, + "requires": { + "icss-utils": "^5.0.0", + "postcss-selector-parser": "^6.0.2", + "postcss-value-parser": "^4.1.0" + } + }, + "postcss-modules-scope": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.0.0.tgz", + "integrity": "sha512-hncihwFA2yPath8oZ15PZqvWGkWf+XUfQgUGamS4LqoP1anQLOsOJw0vr7J7IwLpoY9fatA2qiGUGmuZL0Iqlg==", + "dev": true, + "requires": { + "postcss-selector-parser": "^6.0.4" + } + }, + "postcss-modules-values": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-4.0.0.tgz", + "integrity": "sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ==", + "dev": true, + "requires": { + "icss-utils": "^5.0.0" + } + }, + "postcss-selector-parser": { + "version": "6.0.11", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.11.tgz", + "integrity": "sha512-zbARubNdogI9j7WY4nQJBiNqQf3sLS3wCP4WfOidu+p28LofJqDH1tcXypGrcmMHhDk2t9wGhCsYe/+szLTy1g==", + "dev": true, + "requires": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + } + }, + "postcss-value-parser": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", + "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", + "dev": true + }, + "pretty-bytes": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz", + "integrity": "sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==", + "dev": true + }, + "proc-log": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-2.0.1.tgz", + "integrity": "sha512-Kcmo2FhfDTXdcbfDH76N7uBYHINxc/8GW7UAVuVP9I+Va3uHSerrnKV6dLooga/gh7GlgzuCCr/eoldnL1muGw==", + "dev": true + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true + }, + "promise-inflight": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", + "integrity": "sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==", + "dev": true + }, + "promise-retry": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz", + "integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==", + "dev": true, + "requires": { + "err-code": "^2.0.2", + "retry": "^0.12.0" + } + }, + "proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "dev": true, + "requires": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "dependencies": { + "ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "dev": true + } + } + }, + "prr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", + "integrity": "sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==", + "dev": true, + "optional": true + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, + "qjobs": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/qjobs/-/qjobs-1.2.0.tgz", + "integrity": "sha512-8YOJEHtxpySA3fFDyCRxA+UUV+fA+rTWnuWvylOK/NCjhY+b4ocCtmu8TtsWb+mYeU+GCHf/S66KZF/AsteKHg==", + "dev": true + }, + "qs": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "dev": true, + "requires": { + "side-channel": "^1.0.4" + } + }, + "queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true + }, + "randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "requires": { + "safe-buffer": "^5.1.0" + } + }, + "range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "dev": true + }, + "raw-body": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", + "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", + "dev": true, + "requires": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + } + }, + "read-package-json": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-6.0.0.tgz", + "integrity": "sha512-b/9jxWJ8EwogJPpv99ma+QwtqB7FSl3+V6UXS7Aaay8/5VwMY50oIFooY1UKXMWpfNCM6T/PoGqa5GD1g9xf9w==", + "dev": true, + "requires": { + "glob": "^8.0.1", + "json-parse-even-better-errors": "^3.0.0", + "normalize-package-data": "^5.0.0", + "npm-normalize-package-bin": "^3.0.0" + }, + "dependencies": { + "json-parse-even-better-errors": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.0.tgz", + "integrity": "sha512-iZbGHafX/59r39gPwVPRBGw0QQKnA7tte5pSMrhWOW7swGsVvVTjmfyAV9pNqk8YGT7tRCdxRu8uzcgZwoDooA==", + "dev": true + } + } + }, + "read-package-json-fast": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/read-package-json-fast/-/read-package-json-fast-3.0.1.tgz", + "integrity": "sha512-8+HW7Yo+cjfF+md8DqsZHgats2mxf7gGYow/+2JjxrftoHFZz9v4dzd0EubzYbkNaLxrTVcnllHwklXN2+7aTQ==", + "dev": true, + "requires": { + "json-parse-even-better-errors": "^3.0.0", + "npm-normalize-package-bin": "^3.0.0" + }, + "dependencies": { + "json-parse-even-better-errors": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.0.tgz", + "integrity": "sha512-iZbGHafX/59r39gPwVPRBGw0QQKnA7tte5pSMrhWOW7swGsVvVTjmfyAV9pNqk8YGT7tRCdxRu8uzcgZwoDooA==", + "dev": true + } + } + }, + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "requires": { + "picomatch": "^2.2.1" + } + }, + "reflect-metadata": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz", + "integrity": "sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg==", + "dev": true + }, + "regenerate": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", + "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", + "dev": true + }, + "regenerate-unicode-properties": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.0.tgz", + "integrity": "sha512-d1VudCLoIGitcU/hEg2QqvyGZQmdC0Lf8BqdOMXGFSvJP4bNV1+XqbPQeHHLD51Jh4QJJ225dlIFvY4Ly6MXmQ==", + "dev": true, + "requires": { + "regenerate": "^1.4.2" + } + }, + "regenerator-runtime": { + "version": "0.13.11", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", + "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==", + "dev": true + }, + "regenerator-transform": { + "version": "0.15.1", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.15.1.tgz", + "integrity": "sha512-knzmNAcuyxV+gQCufkYcvOqX/qIIfHLv0u5x79kRxuGojfYVky1f15TzZEu2Avte8QGepvUNTnLskf8E6X6Vyg==", + "dev": true, + "requires": { + "@babel/runtime": "^7.8.4" + } + }, + "regex-parser": { + "version": "2.2.11", + "resolved": "https://registry.npmjs.org/regex-parser/-/regex-parser-2.2.11.tgz", + "integrity": "sha512-jbD/FT0+9MBU2XAZluI7w2OBs1RBi6p9M83nkoZayQXXU9e8Robt69FcZc7wU4eJD/YFTjn1JdCk3rbMJajz8Q==", + "dev": true + }, + "regexpu-core": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.2.2.tgz", + "integrity": "sha512-T0+1Zp2wjF/juXMrMxHxidqGYn8U4R+zleSJhX9tQ1PUsS8a9UtYfbsF9LdiVgNX3kiX8RNaKM42nfSgvFJjmw==", + "dev": true, + "requires": { + "regenerate": "^1.4.2", + "regenerate-unicode-properties": "^10.1.0", + "regjsgen": "^0.7.1", + "regjsparser": "^0.9.1", + "unicode-match-property-ecmascript": "^2.0.0", + "unicode-match-property-value-ecmascript": "^2.1.0" + } + }, + "regjsgen": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.7.1.tgz", + "integrity": "sha512-RAt+8H2ZEzHeYWxZ3H2z6tF18zyyOnlcdaafLrm21Bguj7uZy6ULibiAFdXEtKQY4Sy7wDTwDiOazasMLc4KPA==", + "dev": true + }, + "regjsparser": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.9.1.tgz", + "integrity": "sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ==", + "dev": true, + "requires": { + "jsesc": "~0.5.0" + }, + "dependencies": { + "jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==", + "dev": true + } + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true + }, + "require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true + }, + "requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", + "dev": true + }, + "resolve": { + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "dev": true, + "requires": { + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + } + }, + "resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true + }, + "resolve-url-loader": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-url-loader/-/resolve-url-loader-5.0.0.tgz", + "integrity": "sha512-uZtduh8/8srhBoMx//5bwqjQ+rfYOUq8zC9NrMUGtjBiGTtFJM42s58/36+hTqeqINcnYe08Nj3LkK9lW4N8Xg==", + "dev": true, + "requires": { + "adjust-sourcemap-loader": "^4.0.0", + "convert-source-map": "^1.7.0", + "loader-utils": "^2.0.0", + "postcss": "^8.2.14", + "source-map": "0.6.1" + }, + "dependencies": { + "loader-utils": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", + "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", + "dev": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, + "requires": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + } + }, + "retry": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", + "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", + "dev": true + }, + "reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true + }, + "rfdc": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.0.tgz", + "integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==", + "dev": true + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + }, + "dependencies": { + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + } + } + }, + "run-async": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", + "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", + "dev": true + }, + "run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "requires": { + "queue-microtask": "^1.2.2" + } + }, + "rxjs": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.6.0.tgz", + "integrity": "sha512-DDa7d8TFNUalGC9VqXvQ1euWNN7sc63TrUCuM9J998+ViviahMIjKSOU7rfcgFOF+FCD71BhDRv4hrFz+ImDLQ==", + "requires": { + "tslib": "^2.1.0" + } + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "sass": { + "version": "1.56.1", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.56.1.tgz", + "integrity": "sha512-VpEyKpyBPCxE7qGDtOcdJ6fFbcpOM+Emu7uZLxVrkX8KVU/Dp5UF7WLvzqRuUhB6mqqQt1xffLoG+AndxTZrCQ==", + "dev": true, + "requires": { + "chokidar": ">=3.0.0 <4.0.0", + "immutable": "^4.0.0", + "source-map-js": ">=0.6.2 <2.0.0" + } + }, + "sass-loader": { + "version": "13.2.0", + "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-13.2.0.tgz", + "integrity": "sha512-JWEp48djQA4nbZxmgC02/Wh0eroSUutulROUusYJO9P9zltRbNN80JCBHqRGzjd4cmZCa/r88xgfkjGD0TXsHg==", + "dev": true, + "requires": { + "klona": "^2.0.4", + "neo-async": "^2.6.2" + } + }, + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "dev": true, + "optional": true + }, + "schema-utils": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.0.0.tgz", + "integrity": "sha512-1edyXKgh6XnJsJSQ8mKWXnN/BVaIbFMLpouRUrXgVq7WYne5kw3MW7UPhO44uRXQSIpTSXoJbmrR2X0w9kUTyg==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.9", + "ajv": "^8.8.0", + "ajv-formats": "^2.1.1", + "ajv-keywords": "^5.0.0" + } + }, + "select-hose": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", + "integrity": "sha512-mEugaLK+YfkijB4fx0e6kImuJdCIt2LxCRcbEYPqRGCs4F2ogyfZU5IAZRdjCP8JPq2AtdNoC/Dux63d9Kiryg==", + "dev": true + }, + "selfsigned": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-2.1.1.tgz", + "integrity": "sha512-GSL3aowiF7wa/WtSFwnUrludWFoNhftq8bUkH9pkzjpN2XSPOAYEgg6e0sS9s0rZwgJzJiQRPU18A6clnoW5wQ==", + "dev": true, + "requires": { + "node-forge": "^1" + } + }, + "semver": { + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + }, + "dependencies": { + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + } + } + }, + "semver-dsl": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/semver-dsl/-/semver-dsl-1.0.1.tgz", + "integrity": "sha512-e8BOaTo007E3dMuQQTnPdalbKTABKNS7UxoBIDnwOqRa+QwMrCPjynB8zAlPF6xlqUfdLPPLIJ13hJNmhtq8Ng==", + "dev": true, + "requires": { + "semver": "^5.3.0" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "send": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "dev": true, + "requires": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + }, + "dependencies": { + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + } + } + }, + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "dev": true + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "dev": true + } + } + }, + "serialize-javascript": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", + "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "dev": true, + "requires": { + "randombytes": "^2.1.0" + } + }, + "serve-index": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", + "integrity": "sha512-pXHfKNP4qujrtteMrSBb0rc8HJ9Ms/GrXwcUtUtD5s4ewDJI8bT3Cz2zTVRMKtri49pLx2e0Ya8ziP5Ya2pZZw==", + "dev": true, + "requires": { + "accepts": "~1.3.4", + "batch": "0.6.1", + "debug": "2.6.9", + "escape-html": "~1.0.3", + "http-errors": "~1.6.2", + "mime-types": "~2.1.17", + "parseurl": "~1.3.2" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", + "dev": true + }, + "http-errors": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "integrity": "sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A==", + "dev": true, + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": ">= 1.4.0 < 2" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==", + "dev": true + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + }, + "setprototypeof": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", + "dev": true + } + } + }, + "serve-static": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", + "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", + "dev": true, + "requires": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.18.0" + } + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", + "dev": true + }, + "setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "dev": true + }, + "shallow-clone": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", + "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", + "dev": true, + "requires": { + "kind-of": "^6.0.2" + } + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + } + }, + "signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, + "slash": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz", + "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==", + "dev": true + }, + "smart-buffer": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "dev": true + }, + "socket.io": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.5.4.tgz", + "integrity": "sha512-m3GC94iK9MfIEeIBfbhJs5BqFibMtkRk8ZpKwG2QwxV0m/eEhPIV4ara6XCF1LWNAus7z58RodiZlAH71U3EhQ==", + "dev": true, + "requires": { + "accepts": "~1.3.4", + "base64id": "~2.0.0", + "debug": "~4.3.2", + "engine.io": "~6.2.1", + "socket.io-adapter": "~2.4.0", + "socket.io-parser": "~4.2.1" + } + }, + "socket.io-adapter": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.4.0.tgz", + "integrity": "sha512-W4N+o69rkMEGVuk2D/cvca3uYsvGlMwsySWV447y99gUPghxq42BxqLNMndb+a1mm/5/7NeXVQS7RLa2XyXvYg==", + "dev": true + }, + "socket.io-parser": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.1.tgz", + "integrity": "sha512-V4GrkLy+HeF1F/en3SpUaM+7XxYXpuMUWLGde1kSSh5nQMN4hLrbPIkD+otwh6q9R6NOQBN4AMaOZ2zVjui82g==", + "dev": true, + "requires": { + "@socket.io/component-emitter": "~3.1.0", + "debug": "~4.3.1" + } + }, + "sockjs": { + "version": "0.3.24", + "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.24.tgz", + "integrity": "sha512-GJgLTZ7vYb/JtPSSZ10hsOYIvEYsjbNU+zPdIHcUaWVNUEPivzxku31865sSSud0Da0W4lEeOPlmw93zLQchuQ==", + "dev": true, + "requires": { + "faye-websocket": "^0.11.3", + "uuid": "^8.3.2", + "websocket-driver": "^0.7.4" + } + }, + "socks": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.1.tgz", + "integrity": "sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==", + "dev": true, + "requires": { + "ip": "^2.0.0", + "smart-buffer": "^4.2.0" + } + }, + "socks-proxy-agent": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-7.0.0.tgz", + "integrity": "sha512-Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww==", + "dev": true, + "requires": { + "agent-base": "^6.0.2", + "debug": "^4.3.3", + "socks": "^2.6.2" + } + }, + "source-map": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", + "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==", + "dev": true + }, + "source-map-js": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "dev": true + }, + "source-map-loader": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/source-map-loader/-/source-map-loader-4.0.1.tgz", + "integrity": "sha512-oqXpzDIByKONVY8g1NUPOTQhe0UTU5bWUl32GSkqK2LjJj0HmwTMVKxcUip0RgAYhY1mqgOxjbQM48a0mmeNfA==", + "dev": true, + "requires": { + "abab": "^2.0.6", + "iconv-lite": "^0.6.3", + "source-map-js": "^1.0.2" + }, + "dependencies": { + "iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + } + } + } + }, + "source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "sourcemap-codec": { + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", + "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", + "dev": true + }, + "spdx-correct": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", + "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", + "dev": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.12", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.12.tgz", + "integrity": "sha512-rr+VVSXtRhO4OHbXUiAF7xW3Bo9DuuF6C5jH+q/x15j2jniycgKbxU09Hr0WqlSLUs4i4ltHGXqTe7VHclYWyA==", + "dev": true + }, + "spdy": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/spdy/-/spdy-4.0.2.tgz", + "integrity": "sha512-r46gZQZQV+Kl9oItvl1JZZqJKGr+oEkB08A6BzkiR7593/7IbtuncXHd2YoYeTsG4157ZssMu9KYvUHLcjcDoA==", + "dev": true, + "requires": { + "debug": "^4.1.0", + "handle-thing": "^2.0.0", + "http-deceiver": "^1.2.7", + "select-hose": "^2.0.0", + "spdy-transport": "^3.0.0" + } + }, + "spdy-transport": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-3.0.0.tgz", + "integrity": "sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw==", + "dev": true, + "requires": { + "debug": "^4.1.0", + "detect-node": "^2.0.4", + "hpack.js": "^2.1.6", + "obuf": "^1.1.2", + "readable-stream": "^3.0.6", + "wbuf": "^1.7.3" + } + }, + "sprintf-js": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz", + "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==", + "dev": true + }, + "ssri": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.1.tgz", + "integrity": "sha512-WVy6di9DlPOeBWEjMScpNipeSX2jIZBGEn5Uuo8Q7aIuFEuDX0pw8RxcOjlD1TWP4obi24ki7m/13+nFpcbXrw==", + "dev": true, + "requires": { + "minipass": "^4.0.0" + }, + "dependencies": { + "minipass": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.0.0.tgz", + "integrity": "sha512-g2Uuh2jEKoht+zvO6vJqXmYpflPqzRBT+Th2h01DKh5z7wbY/AZ2gCQ78cP70YoHPyFdY30YBV5WxgLOEwOykw==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + } + } + }, + "statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==", + "dev": true + }, + "streamroller": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-3.1.3.tgz", + "integrity": "sha512-CphIJyFx2SALGHeINanjFRKQ4l7x2c+rXYJ4BMq0gd+ZK0gi4VT8b+eHe2wi58x4UayBAKx4xtHpXT/ea1cz8w==", + "dev": true, + "requires": { + "date-format": "^4.0.14", + "debug": "^4.3.4", + "fs-extra": "^8.1.0" + } + }, + "string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "requires": { + "safe-buffer": "~5.2.0" + } + }, + "string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.1" + } + }, + "strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true + }, + "symbol-observable": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-4.0.0.tgz", + "integrity": "sha512-b19dMThMV4HVFynSAM1++gBHAbk2Tc/osgLIBZMKsyqh34jb2e8Os7T6ZW/Bt3pJFdBTd2JwAnAAEQV7rSNvcQ==", + "dev": true + }, + "tapable": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "dev": true + }, + "tar": { + "version": "6.1.13", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.13.tgz", + "integrity": "sha512-jdIBIN6LTIe2jqzay/2vtYLlBHa3JF42ot3h1dW8Q0PaAG4v8rm0cvpVePtau5C6OKXGGcgO9q2AMNSWxiLqKw==", + "dev": true, + "requires": { + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^4.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" + }, + "dependencies": { + "minipass": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.0.0.tgz", + "integrity": "sha512-g2Uuh2jEKoht+zvO6vJqXmYpflPqzRBT+Th2h01DKh5z7wbY/AZ2gCQ78cP70YoHPyFdY30YBV5WxgLOEwOykw==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true + } + } + }, + "terser": { + "version": "5.15.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.15.1.tgz", + "integrity": "sha512-K1faMUvpm/FBxjBXud0LWVAGxmvoPbZbfTCYbSgaaYQaIXI3/TdI7a7ZGA73Zrou6Q8Zmz3oeUTsp/dj+ag2Xw==", + "dev": true, + "requires": { + "@jridgewell/source-map": "^0.3.2", + "acorn": "^8.5.0", + "commander": "^2.20.0", + "source-map-support": "~0.5.20" + } + }, + "terser-webpack-plugin": { + "version": "5.3.6", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.6.tgz", + "integrity": "sha512-kfLFk+PoLUQIbLmB1+PZDMRSZS99Mp+/MHqDNmMA6tOItzRt+Npe3E+fsMs5mfcM0wCtrrdU387UnV+vnSffXQ==", + "dev": true, + "requires": { + "@jridgewell/trace-mapping": "^0.3.14", + "jest-worker": "^27.4.5", + "schema-utils": "^3.1.1", + "serialize-javascript": "^6.0.0", + "terser": "^5.14.1" + }, + "dependencies": { + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "dev": true, + "requires": {} + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "schema-utils": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", + "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + } + } + } + }, + "test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "requires": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + }, + "dependencies": { + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + } + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "dev": true + }, + "thunky": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz", + "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==", + "dev": true + }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "requires": { + "os-tmpdir": "~1.0.2" + } + }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "dev": true + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + }, + "toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "dev": true + }, + "tree-kill": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", + "dev": true + }, + "ts-node": { + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", + "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", + "dev": true, + "requires": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + } + }, + "tslib": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", + "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==" + }, + "tslint": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-6.1.3.tgz", + "integrity": "sha512-IbR4nkT96EQOvKE2PW/djGz8iGNeJ4rF2mBfiYaR/nvUWYKJhLwimoJKgjIFEIDibBtOevj7BqCRL4oHeWWUCg==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "builtin-modules": "^1.1.1", + "chalk": "^2.3.0", + "commander": "^2.12.1", + "diff": "^4.0.1", + "glob": "^7.1.1", + "js-yaml": "^3.13.1", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.3", + "resolve": "^1.3.2", + "semver": "^5.3.0", + "tslib": "^1.13.0", + "tsutils": "^2.29.0" + }, + "dependencies": { + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + } + } + }, + "tsutils": { + "version": "2.29.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", + "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + }, + "dependencies": { + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + } + } + }, + "type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true + }, + "type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "dev": true, + "requires": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + } + }, + "typed-assert": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/typed-assert/-/typed-assert-1.0.9.tgz", + "integrity": "sha512-KNNZtayBCtmnNmbo5mG47p1XsCyrx6iVqomjcZnec/1Y5GGARaxPs6r49RnSPeUP3YjNYiU9sQHAtY4BBvnZwg==", + "dev": true + }, + "typescript": { + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz", + "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==", + "dev": true + }, + "ua-parser-js": { + "version": "0.7.32", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.32.tgz", + "integrity": "sha512-f9BESNVhzlhEFf2CHMSj40NWOjYPl1YKYbrvIr/hFTDEmLq7SRbWvm7FcdcpCYT95zrOhC7gZSxjdnnTpBcwVw==", + "dev": true + }, + "unicode-canonical-property-names-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", + "integrity": "sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==", + "dev": true + }, + "unicode-match-property-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz", + "integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==", + "dev": true, + "requires": { + "unicode-canonical-property-names-ecmascript": "^2.0.0", + "unicode-property-aliases-ecmascript": "^2.0.0" + } + }, + "unicode-match-property-value-ecmascript": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.1.0.tgz", + "integrity": "sha512-qxkjQt6qjg/mYscYMC0XKRn3Rh0wFPlfxB0xkt9CfyTvpX1Ra0+rAmdX2QyAobptSEvuy4RtpPRui6XkV+8wjA==", + "dev": true + }, + "unicode-property-aliases-ecmascript": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.1.0.tgz", + "integrity": "sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w==", + "dev": true + }, + "unique-filename": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-3.0.0.tgz", + "integrity": "sha512-afXhuC55wkAmZ0P18QsVE6kp8JaxrEokN2HGIoIVv2ijHQd419H0+6EigAFcIzXeMIkcIkNBpB3L/DXB3cTS/g==", + "dev": true, + "requires": { + "unique-slug": "^4.0.0" + } + }, + "unique-slug": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-4.0.0.tgz", + "integrity": "sha512-WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ==", + "dev": true, + "requires": { + "imurmurhash": "^0.1.4" + } + }, + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "dev": true + }, + "update-browserslist-db": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz", + "integrity": "sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==", + "dev": true, + "requires": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + } + }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true + }, + "utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "dev": true + }, + "uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true + }, + "v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true + }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "validate-npm-package-name": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-4.0.0.tgz", + "integrity": "sha512-mzR0L8ZDktZjpX4OB46KT+56MAhl4EIazWP/+G/HPGuvfdaqg4YsCdtOm6U9+LOFyYDoh4dpnpxZRB9MQQns5Q==", + "dev": true, + "requires": { + "builtins": "^5.0.0" + } + }, + "vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "dev": true + }, + "void-elements": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-2.0.1.tgz", + "integrity": "sha512-qZKX4RnBzH2ugr8Lxa7x+0V6XD9Sb/ouARtiasEQCHB1EVU4NXtmHsDDrx1dO4ne5fc3J6EW05BP1Dl0z0iung==", + "dev": true + }, + "watchpack": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", + "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", + "dev": true, + "requires": { + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.1.2" + } + }, + "wbuf": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz", + "integrity": "sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==", + "dev": true, + "requires": { + "minimalistic-assert": "^1.0.0" + } + }, + "wcwidth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", + "dev": true, + "requires": { + "defaults": "^1.0.3" + } + }, + "webpack": { + "version": "5.75.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.75.0.tgz", + "integrity": "sha512-piaIaoVJlqMsPtX/+3KTTO6jfvrSYgauFVdt8cr9LTHKmcq/AMd4mhzsiP7ZF/PGRNPGA8336jldh9l2Kt2ogQ==", + "dev": true, + "requires": { + "@types/eslint-scope": "^3.7.3", + "@types/estree": "^0.0.51", + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/wasm-edit": "1.11.1", + "@webassemblyjs/wasm-parser": "1.11.1", + "acorn": "^8.7.1", + "acorn-import-assertions": "^1.7.6", + "browserslist": "^4.14.5", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^5.10.0", + "es-module-lexer": "^0.9.0", + "eslint-scope": "5.1.1", + "events": "^3.2.0", + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.2.9", + "json-parse-even-better-errors": "^2.3.1", + "loader-runner": "^4.2.0", + "mime-types": "^2.1.27", + "neo-async": "^2.6.2", + "schema-utils": "^3.1.0", + "tapable": "^2.1.1", + "terser-webpack-plugin": "^5.1.3", + "watchpack": "^2.4.0", + "webpack-sources": "^3.2.3" + }, + "dependencies": { + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "dev": true, + "requires": {} + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "schema-utils": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", + "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + } + } + } + }, + "webpack-dev-middleware": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-5.3.3.tgz", + "integrity": "sha512-hj5CYrY0bZLB+eTO+x/j67Pkrquiy7kWepMHmUMoPsmcUaeEnQJqFzHJOyxgWlq746/wUuA64p9ta34Kyb01pA==", + "dev": true, + "requires": { + "colorette": "^2.0.10", + "memfs": "^3.4.3", + "mime-types": "^2.1.31", + "range-parser": "^1.2.1", + "schema-utils": "^4.0.0" + } + }, + "webpack-dev-server": { + "version": "4.11.1", + "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-4.11.1.tgz", + "integrity": "sha512-lILVz9tAUy1zGFwieuaQtYiadImb5M3d+H+L1zDYalYoDl0cksAB1UNyuE5MMWJrG6zR1tXkCP2fitl7yoUJiw==", + "dev": true, + "requires": { + "@types/bonjour": "^3.5.9", + "@types/connect-history-api-fallback": "^1.3.5", + "@types/express": "^4.17.13", + "@types/serve-index": "^1.9.1", + "@types/serve-static": "^1.13.10", + "@types/sockjs": "^0.3.33", + "@types/ws": "^8.5.1", + "ansi-html-community": "^0.0.8", + "bonjour-service": "^1.0.11", + "chokidar": "^3.5.3", + "colorette": "^2.0.10", + "compression": "^1.7.4", + "connect-history-api-fallback": "^2.0.0", + "default-gateway": "^6.0.3", + "express": "^4.17.3", + "graceful-fs": "^4.2.6", + "html-entities": "^2.3.2", + "http-proxy-middleware": "^2.0.3", + "ipaddr.js": "^2.0.1", + "open": "^8.0.9", + "p-retry": "^4.5.0", + "rimraf": "^3.0.2", + "schema-utils": "^4.0.0", + "selfsigned": "^2.1.1", + "serve-index": "^1.9.1", + "sockjs": "^0.3.24", + "spdy": "^4.0.2", + "webpack-dev-middleware": "^5.3.1", + "ws": "^8.4.2" + }, + "dependencies": { + "ws": { + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz", + "integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==", + "dev": true, + "requires": {} + } + } + }, + "webpack-merge": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.8.0.tgz", + "integrity": "sha512-/SaI7xY0831XwP6kzuwhKWVKDP9t1QY1h65lAFLbZqMPIuYcD9QAW4u9STIbU9kaJbPBB/geU/gLr1wDjOhQ+Q==", + "dev": true, + "requires": { + "clone-deep": "^4.0.1", + "wildcard": "^2.0.0" + } + }, + "webpack-sources": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", + "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", + "dev": true + }, + "webpack-subresource-integrity": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/webpack-subresource-integrity/-/webpack-subresource-integrity-5.1.0.tgz", + "integrity": "sha512-sacXoX+xd8r4WKsy9MvH/q/vBtEHr86cpImXwyg74pFIpERKt6FmB8cXpeuh0ZLgclOlHI4Wcll7+R5L02xk9Q==", + "dev": true, + "requires": { + "typed-assert": "^1.0.8" + } + }, + "websocket-driver": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz", + "integrity": "sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==", + "dev": true, + "requires": { + "http-parser-js": ">=0.5.1", + "safe-buffer": ">=5.1.0", + "websocket-extensions": ">=0.1.1" + } + }, + "websocket-extensions": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz", + "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==", + "dev": true + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "wide-align": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", + "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", + "dev": true, + "requires": { + "string-width": "^1.0.2 || 2 || 3 || 4" + } + }, + "wildcard": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.0.tgz", + "integrity": "sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==", + "dev": true + }, + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + } + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true + }, + "ws": { + "version": "8.2.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.2.3.tgz", + "integrity": "sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA==", + "dev": true, + "requires": {} + }, + "y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "dev": true + }, + "yargs": { + "version": "17.6.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.6.2.tgz", + "integrity": "sha512-1/9UrdHjDZc0eOU0HxOHoS78C69UD3JRMvzlJ7S79S2nTaWRA/whGCTV8o9e/N/1Va9YIV7Q4sOxD8VV4pCWOw==", + "dev": true, + "requires": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + } + }, + "yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true + }, + "yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true + }, + "zone.js": { + "version": "0.11.8", + "resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.11.8.tgz", + "integrity": "sha512-82bctBg2hKcEJ21humWIkXRlLBBmrc3nN7DFh5LGGhcyycO2S7FN8NmdvlcKaGFDNVL4/9kFLmwmInTavdJERA==", + "requires": { + "tslib": "^2.3.0" + } + } + } +} diff --git a/samples/client/petstore/typescript-angular-v15-provided-in-root/package.json b/samples/client/petstore/typescript-angular-v15-provided-in-root/package.json new file mode 100644 index 0000000000..00b2b2c29b --- /dev/null +++ b/samples/client/petstore/typescript-angular-v15-provided-in-root/package.json @@ -0,0 +1,47 @@ +{ + "name": "typescript-angular-v15-unit-tests", + "version": "0.0.0", + "scripts": { + "ng": "ng", + "start": "ng serve", + "build": "ng build", + "test": "ng test", + "lint": "ng lint", + "update": "ng update" + }, + "private": true, + "dependencies": { + "@angular/animations": "^15.0.3", + "@angular/common": "^15.0.3", + "@angular/compiler": "^15.0.3", + "@angular/core": "^15.0.3", + "@angular/forms": "^15.0.3", + "@angular/platform-browser": "^15.0.3", + "@angular/platform-browser-dynamic": "^15.0.3", + "@angular/router": "^15.0.3", + "core-js": "^2.5.4", + "rxjs": "^7.5.5", + "tslib": "^2.0.0", + "zone.js": "~0.11.5" + }, + "devDependencies": { + "@angular-devkit/build-angular": "^15.0.3", + "@angular/cli": "^15.0.3", + "@angular/compiler-cli": "^15.0.3", + "@angular/language-service": "^15.0.3", + "@types/jasmine": "~4.3.1", + "@types/jasminewd2": "~2.0.3", + "@types/node": "^12.11.1", + "codelyzer": "^6.0.0", + "jasmine-core": "~4.5.0", + "jasmine-spec-reporter": "~7.0.0", + "karma": "~6.4.1", + "karma-chrome-launcher": "~3.1.0", + "karma-coverage-istanbul-reporter": "~3.0.2", + "karma-jasmine": "~5.1.0", + "karma-jasmine-html-reporter": "^2.0.0", + "ts-node": "~10.9.1", + "tslint": "~6.1.0", + "typescript": "~4.8.4" + } +} \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v15-provided-in-root/pom.xml b/samples/client/petstore/typescript-angular-v15-provided-in-root/pom.xml new file mode 100644 index 0000000000..4bd60e31e0 --- /dev/null +++ b/samples/client/petstore/typescript-angular-v15-provided-in-root/pom.xml @@ -0,0 +1,140 @@ + + 4.0.0 + org.openapitools + typescript-angular-v15-provided-in-root-tests + pom + 1.0-SNAPSHOT + + Typescript-Angular v15 Petstore Client + + + + + org.codehaus.mojo + exec-maven-plugin + 1.2.1 + + + + withnpmm-npm-install + pre-integration-test + + exec + + + npm + builds/with-npm + + --legacy-peer-deps + install + + + + + + withnpmm-npm-run-build + pre-integration-test + + exec + + + npm + builds/with-npm + + run + build + + + + + + + + + + org.apache.maven.plugins + maven-clean-plugin + 3.1.0 + + + + clean-typescript-angular-v15-test-outputs + + clean + + post-integration-test + + true + + + builds/with-npm + false + false + + dist/** + node_modules/** + package-lock.json + + + + + + + + + + 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 + -- + --progress=false + --no-watch + --browsers + ChromeHeadless + + + + + + + + diff --git a/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/app/app.component.css b/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/app/app.component.css new file mode 100644 index 0000000000..e69de29bb2 diff --git a/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/app/app.component.html b/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/app/app.component.html new file mode 100644 index 0000000000..b843d662b6 --- /dev/null +++ b/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/app/app.component.html @@ -0,0 +1,44 @@ +
+

+ Welcome to {{ title }}! +

+
+
+

Pet API

+ + + + + + + +
+
+

Pet

+
+

Name: {{ pet.name }}

+

ID: {{ pet.id }}

+
+ +
+
+

Store API

+ +
+
+

Store

+
    +
  • {{item.key}}: {{item.number}}
  • +
+ +
diff --git a/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/app/app.component.spec.ts b/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/app/app.component.spec.ts new file mode 100644 index 0000000000..ff9cfe00a8 --- /dev/null +++ b/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/app/app.component.spec.ts @@ -0,0 +1,94 @@ +import { TestBed, waitForAsync } from '@angular/core/testing'; +import { HttpClientModule } from '@angular/common/http'; +import { + ApiModule, + Configuration, + ConfigurationParameters, + PetService, + StoreService, + UserService, +} from '@swagger/typescript-angular-petstore'; +import { AppComponent } from './app.component'; +import {fakePetstoreBackendProviders} from "../test/fakeBackend"; + +describe('AppComponent', () => { + + const apiConfigurationParams: ConfigurationParameters = { + // add configuration params here + apiKeys: { api_key: 'foobar' }, + }; + + const apiConfig = new Configuration(apiConfigurationParams); + + const getApiConfig: () => Configuration = () => { + return apiConfig; + }; + + + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + imports: [ + HttpClientModule, + ApiModule.forRoot(getApiConfig), + ], + providers: [ + PetService, + StoreService, + UserService, + ...fakePetstoreBackendProviders, + ], + declarations: [ + AppComponent, + ], + }).compileComponents(); + })); + + it('should create the app', waitForAsync(() => { + const fixture = TestBed.createComponent(AppComponent); + const app = fixture.debugElement.componentInstance; + expect(app).toBeTruthy(); + })); + + it('should render title in a h1 tag', waitForAsync(() => { + const fixture = TestBed.createComponent(AppComponent); + fixture.detectChanges(); + const compiled = fixture.debugElement.nativeElement; + expect(compiled.querySelector('h1').textContent).toContain('Welcome to Typescript Angular v15 (provided in root)!'); + })); + + describe(`constructor()`, () => { + it(`should have a petService provided`, () => { + const petService = TestBed.inject(PetService); + expect(petService).toBeTruthy(); + }); + + it(`should have a storeService provided`, () => { + const storeService = TestBed.inject(StoreService); + expect(storeService).toBeTruthy(); + }); + + it(`should have a userService provided`, () => { + const userService = TestBed.inject(UserService); + expect(userService).toBeTruthy(); + }); + }); + + describe('addPet()', () => { + it(`should add a new pet`, () => { + const fixture = TestBed.createComponent(AppComponent); + const instance = fixture.componentInstance; + const petService = TestBed.inject(PetService); + + spyOn(petService, 'addPet').and.callThrough(); + + fixture.detectChanges(); + instance.addPet(); + + expect(petService.addPet).toHaveBeenCalledWith({ + name: `pet`, + photoUrls: [] + }); + }); + }); + +}); diff --git a/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/app/app.component.ts b/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/app/app.component.ts new file mode 100644 index 0000000000..3e6f103533 --- /dev/null +++ b/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/app/app.component.ts @@ -0,0 +1,71 @@ +import { Component } from '@angular/core'; +import { + PetService, + StoreService, + UserService, + Pet +} from '@swagger/typescript-angular-petstore'; + +@Component({ + selector: 'app-root', + templateUrl: './app.component.html', + styleUrls: ['./app.component.css'] +}) +export class AppComponent { + title = 'Typescript Angular v15 (provided in root)'; + pet: Pet; + store: { key: string, number: number }[]; + + constructor(private petService: PetService, + private storeService: StoreService, + private userService: UserService, + ) { + this.pet = { + name: `pet`, + photoUrls: [] + }; + } + + public addPet() { + this.petService.addPet(this.pet) + .subscribe((result) => { + this.pet = result; + } + ); + } + + public getPetByID() { + this.petService.getPetById(this.pet.id) + .subscribe((result) => { + this.pet = result; + } + ); + } + + public updatePet() { + this.petService.updatePet(this.pet) + .subscribe((result) => { + this.pet = result; + } + ); + } + + public deletePet() { + this.petService.deletePet(this.pet.id) + .subscribe((result) => { + this.pet = result; + } + ); + } + + public getStoreInventory() { + this.storeService.getInventory() + .subscribe((result) => { + this.store = []; + for(let item in result) { + const number = result[item]; + this.store.push({ key: item, number: number}); + } + }) + } +} diff --git a/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/app/app.module.ts b/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/app/app.module.ts new file mode 100644 index 0000000000..2e86cf1923 --- /dev/null +++ b/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/app/app.module.ts @@ -0,0 +1,36 @@ +import { BrowserModule } from '@angular/platform-browser'; +import { NgModule } from '@angular/core'; +import { HttpClientModule } from '@angular/common/http'; +import { + ApiModule, + Configuration, + ConfigurationParameters +} from '@swagger/typescript-angular-petstore' + +import { AppComponent } from './app.component'; + +export const apiConfigurationParams: ConfigurationParameters = { + credentials: { "api_key": "foobar" }, +}; + +export const apiConfig = new Configuration(apiConfigurationParams); + +export function getApiConfig() { + return apiConfig; +} + +@NgModule({ + declarations: [ + AppComponent, + ], + imports: [ + BrowserModule, + HttpClientModule, + ApiModule.forRoot(getApiConfig), + ], + providers: [ + ], + bootstrap: [AppComponent] +}) +export class AppModule { } + diff --git a/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/environments/environment.prod.ts b/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/environments/environment.prod.ts new file mode 100644 index 0000000000..3612073bc3 --- /dev/null +++ b/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/environments/environment.prod.ts @@ -0,0 +1,3 @@ +export const environment = { + production: true +}; diff --git a/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/environments/environment.ts b/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/environments/environment.ts new file mode 100644 index 0000000000..012182efa3 --- /dev/null +++ b/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/environments/environment.ts @@ -0,0 +1,15 @@ +// This file can be replaced during build by using the `fileReplacements` array. +// `ng build ---prod` replaces `environment.ts` with `environment.prod.ts`. +// The list of file replacements can be found in `angular.json`. + +export const environment = { + production: false +}; + +/* + * In development mode, to ignore zone related error stack frames such as + * `zone.run`, `zoneDelegate.invokeTask` for easier debugging, you can + * import the following file, but please comment it out in production mode + * because it will have performance impact when throw error + */ +// import 'zone.js/dist/zone-error'; // Included with Angular CLI. diff --git a/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/favicon.ico b/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..8081c7ceaf2be08bf59010158c586170d9d2d517 GIT binary patch literal 5430 zcmc(je{54#6vvCoAI3i*G5%$U7!sA3wtMZ$fH6V9C`=eXGJb@R1%(I_{vnZtpD{6n z5Pl{DmxzBDbrB>}`90e12m8T*36WoeDLA&SD_hw{H^wM!cl_RWcVA!I+x87ee975; z@4kD^=bYPn&pmG@(+JZ`rqQEKxW<}RzhW}I!|ulN=fmjVi@x{p$cC`)5$a!)X&U+blKNvN5tg=uLvuLnuqRM;Yc*swiexsoh#XPNu{9F#c`G zQLe{yWA(Y6(;>y|-efAy11k<09(@Oo1B2@0`PtZSkqK&${ zgEY}`W@t{%?9u5rF?}Y7OL{338l*JY#P!%MVQY@oqnItpZ}?s z!r?*kwuR{A@jg2Chlf0^{q*>8n5Ir~YWf*wmsh7B5&EpHfd5@xVaj&gqsdui^spyL zB|kUoblGoO7G(MuKTfa9?pGH0@QP^b#!lM1yHWLh*2iq#`C1TdrnO-d#?Oh@XV2HK zKA{`eo{--^K&MW66Lgsktfvn#cCAc*(}qsfhrvOjMGLE?`dHVipu1J3Kgr%g?cNa8 z)pkmC8DGH~fG+dlrp(5^-QBeEvkOvv#q7MBVLtm2oD^$lJZx--_=K&Ttd=-krx(Bb zcEoKJda@S!%%@`P-##$>*u%T*mh+QjV@)Qa=Mk1?#zLk+M4tIt%}wagT{5J%!tXAE;r{@=bb%nNVxvI+C+$t?!VJ@0d@HIyMJTI{vEw0Ul ze(ha!e&qANbTL1ZneNl45t=#Ot??C0MHjjgY8%*mGisN|S6%g3;Hlx#fMNcL<87MW zZ>6moo1YD?P!fJ#Jb(4)_cc50X5n0KoDYfdPoL^iV`k&o{LPyaoqMqk92wVM#_O0l z09$(A-D+gVIlq4TA&{1T@BsUH`Bm=r#l$Z51J-U&F32+hfUP-iLo=jg7Xmy+WLq6_tWv&`wDlz#`&)Jp~iQf zZP)tu>}pIIJKuw+$&t}GQuqMd%Z>0?t%&BM&Wo^4P^Y z)c6h^f2R>X8*}q|bblAF?@;%?2>$y+cMQbN{X$)^R>vtNq_5AB|0N5U*d^T?X9{xQnJYeU{ zoZL#obI;~Pp95f1`%X3D$Mh*4^?O?IT~7HqlWguezmg?Ybq|7>qQ(@pPHbE9V?f|( z+0xo!#m@Np9PljsyxBY-UA*{U*la#8Wz2sO|48_-5t8%_!n?S$zlGe+NA%?vmxjS- zHE5O3ZarU=X}$7>;Okp(UWXJxI%G_J-@IH;%5#Rt$(WUX?6*Ux!IRd$dLP6+SmPn= z8zjm4jGjN772R{FGkXwcNv8GBcZI#@Y2m{RNF_w8(Z%^A*!bS*!}s6sh*NnURytky humW;*g7R+&|Ledvc- + + + + Cli + + + + + + + + + diff --git a/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/karma.conf.js b/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/karma.conf.js new file mode 100644 index 0000000000..4a9730b9b6 --- /dev/null +++ b/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/karma.conf.js @@ -0,0 +1,31 @@ +// Karma configuration file, see link for more information +// https://karma-runner.github.io/1.0/config/configuration-file.html + +module.exports = function (config) { + config.set({ + basePath: '', + frameworks: ['jasmine', '@angular-devkit/build-angular'], + plugins: [ + require('karma-jasmine'), + require('karma-chrome-launcher'), + require('karma-jasmine-html-reporter'), + require('karma-coverage-istanbul-reporter'), + require('@angular-devkit/build-angular/plugins/karma') + ], + client: { + clearContext: false // leave Jasmine Spec Runner output visible in browser + }, + coverageIstanbulReporter: { + dir: require('path').join(__dirname, '../coverage'), + reports: ['html', 'lcovonly'], + fixWebpackSourcePaths: true + }, + reporters: ['progress', 'kjhtml'], + port: 9876, + colors: true, + logLevel: config.LOG_INFO, + autoWatch: true, + browsers: ['Chrome'], + singleRun: false + }); +}; diff --git a/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/main.ts b/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/main.ts new file mode 100644 index 0000000000..91ec6da5f0 --- /dev/null +++ b/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/main.ts @@ -0,0 +1,12 @@ +import { enableProdMode } from '@angular/core'; +import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; + +import { AppModule } from './app/app.module'; +import { environment } from './environments/environment'; + +if (environment.production) { + enableProdMode(); +} + +platformBrowserDynamic().bootstrapModule(AppModule) + .catch(err => console.log(err)); diff --git a/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/polyfills.ts b/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/polyfills.ts new file mode 100644 index 0000000000..aa665d6b87 --- /dev/null +++ b/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/polyfills.ts @@ -0,0 +1,63 @@ +/** + * This file includes polyfills needed by Angular and is loaded before the app. + * You can add your own extra polyfills to this file. + * + * This file is divided into 2 sections: + * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. + * 2. Application imports. Files imported after ZoneJS that should be loaded before your main + * file. + * + * The current setup is for so-called "evergreen" browsers; the last versions of browsers that + * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), + * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. + * + * Learn more in https://angular.io/guide/browser-support + */ + +/*************************************************************************************************** + * BROWSER POLYFILLS + */ + +/** IE10 and IE11 requires the following for NgClass support on SVG elements */ +// import 'classlist.js'; // Run `npm install --save classlist.js`. + +/** + * Web Animations `@angular/platform-browser/animations` + * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari. + * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0). + */ +// import 'web-animations-js'; // Run `npm install --save web-animations-js`. + +/** + * By default, zone.js will patch all possible macroTask and DomEvents + * user can disable parts of macroTask/DomEvents patch by setting following flags + * because those flags need to be set before `zone.js` being loaded, and webpack + * will put import in the top of bundle, so user need to create a separate file + * in this directory (for example: zone-flags.ts), and put the following flags + * into that file, and then add the following code before importing zone.js. + * import './zone-flags.ts'; + * + * The flags allowed in zone-flags.ts are listed here. + * + * The following flags will work for all browsers. + * + * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame + * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick + * (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames + * + * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js + * with the following flag, it will bypass `zone.js` patch for IE/Edge + * + * (window as any).__Zone_enable_cross_context_check = true; + * + */ + +/*************************************************************************************************** + * Zone JS is required by default for Angular itself. + */ +import 'zone.js/dist/zone'; // Included with Angular CLI. + + +/*************************************************************************************************** + * APPLICATION IMPORTS + */ diff --git a/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/styles.css b/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/styles.css new file mode 100644 index 0000000000..90d4ee0072 --- /dev/null +++ b/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/styles.css @@ -0,0 +1 @@ +/* You can add global styles to this file, and also import other style files */ diff --git a/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/test.ts b/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/test.ts new file mode 100644 index 0000000000..b89efa0623 --- /dev/null +++ b/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/test.ts @@ -0,0 +1,16 @@ +// This file is required by karma.conf.js and loads recursively all the .spec and framework files + +import 'zone.js/dist/zone-testing'; +import { getTestBed } from '@angular/core/testing'; +import { + BrowserDynamicTestingModule, + platformBrowserDynamicTesting +} from '@angular/platform-browser-dynamic/testing'; + +declare const require: any; + +// First, initialize the Angular testing environment. +getTestBed().initTestEnvironment( + BrowserDynamicTestingModule, + platformBrowserDynamicTesting() +); diff --git a/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/test/api.spec.ts b/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/test/api.spec.ts new file mode 100644 index 0000000000..225414c0d5 --- /dev/null +++ b/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/test/api.spec.ts @@ -0,0 +1,152 @@ +import { TestBed, waitForAsync } from '@angular/core/testing'; +import {HttpClientModule} from '@angular/common/http'; +import { + ApiModule, + Configuration, + ConfigurationParameters, + PetService, + StoreService, + UserService, + Pet, + User, +} from '@swagger/typescript-angular-petstore'; +import {fakePetstoreBackendProviders} from "./fakeBackend"; +import {switchMap} from "rxjs/operators"; + + +describe(`API (functionality)`, () => { + + const getUser: () => User = () => { + const time = Date.now(); + return { + username: `user-${time}`, + } + }; + + const getPet: () => Pet = () => { + const time = Date.now(); + return { + name: `pet-${time}`, + photoUrls: [], + } + }; + + const newPet: Pet = getPet(); + + const newUser: User = getUser(); + + const apiConfigurationParams: ConfigurationParameters = { + // add configuration params here + apiKeys: { api_key: 'foobar' } + }; + + const apiConfig = new Configuration(apiConfigurationParams); + + const getApiConfig = () => { + return apiConfig; + }; + + beforeEach(() => { + TestBed.configureTestingModule({ + imports: [ + HttpClientModule, + ApiModule.forRoot(getApiConfig) + ], + providers: [ + PetService, + StoreService, + UserService, + ...fakePetstoreBackendProviders, + ] + }); + }); + + describe(`PetService`, () => { + it(`should be provided`, () => { + const petService = TestBed.inject(PetService); + expect(petService).toBeTruthy(); + }); + + it(`should add a pet`, waitForAsync(() => { + const petService = TestBed.inject(PetService); + + return petService.addPet(newPet).subscribe( + (result) => { + expect(result.id).toBeGreaterThan(0); + expect(result.name).toBe(newPet.name); + }, + ); + })); + + it(`should get the pet data by id`, waitForAsync(() => { + const petService = TestBed.inject(PetService); + return petService.addPet(newPet).pipe( + switchMap((addedPet: Pet) => petService.getPetById(addedPet.id)) + ).subscribe( + result => { + return expect(result.name).toBe(newPet.name); + }, + ); + })); + + it(`should update the pet name by pet object`, waitForAsync(() => { + const petService = TestBed.inject(PetService); + + + return petService.addPet(newPet).pipe( + switchMap((addedPet: Pet) => petService.updatePet({ + ...addedPet, + name: 'something else' + })) + ).subscribe( + result => expect(result.name).toBe('something else'), + error => fail(`expected a result, not the error: ${error.message}`), + ); + })); + + it(`should delete the pet`, waitForAsync(() => { + const petService = TestBed.inject(PetService); + + return petService.addPet(newPet).pipe( + switchMap((addedPet: Pet) => petService.deletePet(addedPet.id, undefined, 'response')), + ).subscribe( + result => expect(result.status).toEqual(200), + ); + })); + + }); + + describe(`StoreService`, () => { + it(`should be provided`, () => { + const storeService = TestBed.inject(StoreService); + expect(storeService).toBeTruthy(); + }); + + it(`should get the inventory`, waitForAsync(() => { + const storeService = TestBed.inject(StoreService); + + return storeService.getInventory().subscribe( + result => expect(result.mega).toBe(42), + error => fail(`expected a result, not the error: ${error.message}`), + ); + + })); + + }); + + describe(`UserService`, () => { + it(`should be provided`, () => { + const userService = TestBed.inject(UserService); + expect(userService).toBeTruthy(); + }); + + it(`should create the user`, waitForAsync(() => { + const userService = TestBed.inject(UserService); + + return userService.createUser(newUser, 'response').subscribe( + result => expect(result.status).toEqual(200), + ); + })); + + }); +}); diff --git a/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/test/basePath.spec.ts b/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/test/basePath.spec.ts new file mode 100644 index 0000000000..c6357cc16f --- /dev/null +++ b/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/test/basePath.spec.ts @@ -0,0 +1,63 @@ +import { TestBed, waitForAsync } from '@angular/core/testing'; +import { HttpClient } from '@angular/common/http'; +import { HttpClientTestingModule, HttpTestingController} from '@angular/common/http/testing'; +import { + ApiModule, + PetService, + Pet, +} from '@swagger/typescript-angular-petstore'; +import {BASE_PATH} from "../../../../builds/default/variables"; + +describe(`API (basePath)`, () => { + let httpClient: HttpClient; + let httpTestingController: HttpTestingController; + + const pet: Pet = { + name: `pet`, + photoUrls: [] + }; + + beforeEach(() => { + TestBed.configureTestingModule({ + imports: [ + HttpClientTestingModule , + ApiModule, + ], + providers: [ + PetService, + { provide: BASE_PATH, useValue: '//test'} + ] + }); + + // Inject the http service and test controller for each test + httpClient = TestBed.inject(HttpClient); + httpTestingController = TestBed.inject(HttpTestingController); + }); + + afterEach(() => { + // After every test, assert that there are no more pending requests. + httpTestingController.verify(); + }); + + describe(`PetService`, () => { + it(`should be provided`, () => { + const petService = TestBed.inject(PetService); + expect(petService).toBeTruthy(); + }); + + it(`should call to the injected basePath //test/pet`, waitForAsync(() => { + const petService = TestBed.inject(PetService); + + petService.addPet(pet).subscribe( + result => expect(result).toEqual(pet), + error => fail(`expected a result, not the error: ${error.message}`), + ); + + const req = httpTestingController.expectOne('//test/pet'); + expect(req.request.method).toEqual('POST'); + req.flush(pet); + })); + + }); + +}); diff --git a/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/test/configuration.spec.ts b/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/test/configuration.spec.ts new file mode 100644 index 0000000000..19e983c790 --- /dev/null +++ b/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/test/configuration.spec.ts @@ -0,0 +1,140 @@ +import { TestBed, waitForAsync } from '@angular/core/testing'; +import { HttpClient } from '@angular/common/http'; +import { HttpClientTestingModule, HttpTestingController} from '@angular/common/http/testing'; +import { + ApiModule, + Configuration, + ConfigurationParameters, + PetService, + Pet, +} from '@swagger/typescript-angular-petstore'; + +describe(`API (with ConfigurationFactory)`, () => { + let httpClient: HttpClient; + let httpTestingController: HttpTestingController; + + const pet: Pet = { + name: `pet`, + photoUrls: [] + }; + + let apiConfigurationParams: ConfigurationParameters = { + // add configuration params here + basePath: '//test-initial' + }; + + let apiConfig: Configuration = new Configuration(apiConfigurationParams); + + const getApiConfig = () => { + return apiConfig; + }; + + beforeEach(() => { + TestBed.configureTestingModule({ + imports: [ + HttpClientTestingModule , + ApiModule.forRoot(getApiConfig) + ], + providers: [ + PetService, + ] + }); + + // Inject the http service and test controller for each test + httpClient = TestBed.inject(HttpClient); + httpTestingController = TestBed.inject(HttpTestingController); + }); + + afterEach(() => { + // After every test, assert that there are no more pending requests. + httpTestingController.verify(); + }); + + describe(`PetService`, () => { + it(`should be provided`, () => { + const petService = TestBed.inject(PetService); + expect(petService).toBeTruthy(); + }); + + it(`should call initially configured basePath //test-initial/pet`, waitForAsync(() => { + const petService = TestBed.inject(PetService); + + petService.addPet(pet).subscribe( + result => expect(result).toEqual(pet), + error => fail(`expected a result, not the error: ${error.message}`), + ); + + const req = httpTestingController.expectOne('//test-initial/pet'); + + expect(req.request.method).toEqual('POST'); + + req.flush(pet); + })); + }); + +}); + +describe(`API (with ConfigurationFactory and empty basePath)`, () => { + let httpClient: HttpClient; + let httpTestingController: HttpTestingController; + + const pet: Pet = { + name: `pet`, + photoUrls: [] + }; + + let apiConfigurationParams: ConfigurationParameters = { + // add configuration params here + basePath: '' + }; + + let apiConfig: Configuration = new Configuration(apiConfigurationParams); + + const getApiConfig = () => { + return apiConfig; + }; + + beforeEach(() => { + TestBed.configureTestingModule({ + imports: [ + HttpClientTestingModule , + ApiModule.forRoot(getApiConfig) + ], + providers: [ + PetService, + ] + }); + + // Inject the http service and test controller for each test + httpClient = TestBed.inject(HttpClient); + httpTestingController = TestBed.inject(HttpTestingController); + }); + + afterEach(() => { + // After every test, assert that there are no more pending requests. + httpTestingController.verify(); + }); + + describe(`PetService`, () => { + it(`should be provided`, () => { + const petService = TestBed.inject(PetService); + expect(petService).toBeTruthy(); + }); + + it(`should call initially configured empty basePath /pet`, waitForAsync(() => { + const petService = TestBed.inject(PetService); + + petService.addPet(pet).subscribe( + result => expect(result).toEqual(pet), + error => fail(`expected a result, not the error: ${error.message}`), + ); + + const req = httpTestingController.expectOne('/pet'); + + expect(req.request.method).toEqual('POST'); + + req.flush(pet); + })); + }); + +}); diff --git a/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/test/fakeBackend.ts b/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/test/fakeBackend.ts new file mode 100644 index 0000000000..2ea690270c --- /dev/null +++ b/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/test/fakeBackend.ts @@ -0,0 +1,92 @@ +import {Injectable, Provider} from '@angular/core'; +import {Observable, Observer} from 'rxjs'; +import { + HTTP_INTERCEPTORS, + HttpEvent, + HttpEventType, + HttpHandler, + HttpInterceptor, + HttpRequest +} from '@angular/common/http'; +import { TestRequest } from "@angular/common/http/testing"; +import { Pet } from "@swagger/typescript-angular-petstore"; + +@Injectable() +export class FakePetstoreBackendInterceptor implements HttpInterceptor { + private fakePetstoreBackend = new FakePetstoreBackend() + + constructor() { + + } + + intercept(req: HttpRequest, next: HttpHandler): Observable> { + const parsedUrl = new URL(req.url); + if (parsedUrl.pathname.indexOf('/v2/pet') === 0) { + if (req.method === 'GET') { + const pathParts = parsedUrl.pathname.split('/'); + const petId = parseInt(pathParts[pathParts.length-1], 10); + return this.respond(req, this.fakePetstoreBackend.getPet(petId)); + } else if (req.method === 'POST') { + return this.respond(req, this.fakePetstoreBackend.addPet(req.body)); + } else if (req.method === 'PUT') { + return this.respond(req, this.fakePetstoreBackend.updatePet(req.body)); + } else if (req.method === 'DELETE') { + const pathParts = parsedUrl.pathname.split('/'); + const petId = parseInt(pathParts[pathParts.length-1], 10); + this.fakePetstoreBackend.deletePet(petId); + return this.respond(req, {}); + } + } else if (parsedUrl.pathname.indexOf('/v2/store/inventory') === 0) { + if (req.method === 'GET') { + return this.respond(req, {mega: 42}); + } + } else if (parsedUrl.pathname.indexOf('/v2/user') === 0) { + if (req.method === 'POST') { + return this.respond(req, {mega: 42}); + } + } + throw new Error('Http call not implemented in fake backend. ' + req.url); + } + + private respond(request: HttpRequest, response: any): Observable> { + return new Observable((observer: Observer) => { + const testReq = new TestRequest(request, observer); + observer.next({ type: HttpEventType.Sent } as HttpEvent); + testReq.flush(response); + return () => { }; + }); + } +} + +@Injectable() +class FakePetstoreBackend { + private nextId = 1; + private pets: Map = new Map(); + + public getPet(id: number): Pet { + return this.pets.get(String(id)); + } + + public addPet(pet: Pet): Pet { + const id = this.nextId++; + this.pets.set(String(id), { + ...pet, + id + }); + return this.getPet(id); + } + + public updatePet(pet: Pet): Pet { + this.pets.set(String(pet.id), pet); + return pet; + } + + public deletePet(id: number): void { + this.pets.delete(String(id)); + } +} + + +export const fakePetstoreBackendProviders: Provider[] = [ + {provide: HTTP_INTERCEPTORS, useClass: FakePetstoreBackendInterceptor, multi: true}, +]; diff --git a/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/test/no-configuration.spec.ts b/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/test/no-configuration.spec.ts new file mode 100644 index 0000000000..a1f624ea29 --- /dev/null +++ b/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/test/no-configuration.spec.ts @@ -0,0 +1,61 @@ +import { TestBed, waitForAsync } from '@angular/core/testing'; +import { HttpClient } from '@angular/common/http'; +import { HttpClientTestingModule, HttpTestingController} from '@angular/common/http/testing'; +import { + ApiModule, + PetService, + Pet, +} from '@swagger/typescript-angular-petstore'; + +describe(`API (no configuration)`, () => { + let httpClient: HttpClient; + let httpTestingController: HttpTestingController; + + const pet: Pet = { + name: `pet`, + photoUrls: [] + }; + + beforeEach(() => { + TestBed.configureTestingModule({ + imports: [ + HttpClientTestingModule , + ApiModule, + ], + providers: [ + PetService, + ] + }); + + // Inject the http service and test controller for each test + httpClient = TestBed.inject(HttpClient); + httpTestingController = TestBed.inject(HttpTestingController); + }); + + afterEach(() => { + // After every test, assert that there are no more pending requests. + httpTestingController.verify(); + }); + + describe(`PetService`, () => { + it(`should be provided`, () => { + const petService = TestBed.inject(PetService); + expect(petService).toBeTruthy(); + }); + + it(`should call to the default basePath http://petstore.swagger.io/v2/pet`, waitForAsync(() => { + const petService = TestBed.inject(PetService); + + petService.addPet(pet).subscribe( + result => expect(result).toEqual(pet), + error => fail(`expected a result, not the error: ${error.message}`), + ); + + const req = httpTestingController.expectOne('http://petstore.swagger.io/v2/pet'); + expect(req.request.method).toEqual('POST'); + req.flush(pet); + })); + + }); + +}); diff --git a/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/tsconfig.app.json b/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/tsconfig.app.json new file mode 100644 index 0000000000..be37b0474d --- /dev/null +++ b/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/tsconfig.app.json @@ -0,0 +1,14 @@ +{ + "extends": "../../../tsconfig.json", + "compilerOptions": { + "outDir": "../out-tsc/app", + "types": [] + }, + "files": [ + "main.ts", + "polyfills.ts" + ], + "include": [ + "tests/default/src/**/*.d.ts" + ] +} diff --git a/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/tsconfig.spec.json b/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/tsconfig.spec.json new file mode 100644 index 0000000000..2b5ebf4ad4 --- /dev/null +++ b/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/tsconfig.spec.json @@ -0,0 +1,18 @@ +{ + "extends": "../../../tsconfig.json", + "compilerOptions": { + "outDir": "../out-tsc/spec", + "types": [ + "jasmine", + "node" + ] + }, + "files": [ + "test.ts", + "polyfills.ts" + ], + "include": [ + "**/*.spec.ts", + "**/*.d.ts" + ] +} diff --git a/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/tslint.json b/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/tslint.json new file mode 100644 index 0000000000..78a62a0db6 --- /dev/null +++ b/samples/client/petstore/typescript-angular-v15-provided-in-root/tests/default/src/tslint.json @@ -0,0 +1,17 @@ +{ + "extends": "../../../tslint.json", + "rules": { + "directive-selector": [ + true, + "attribute", + "app", + "camelCase" + ], + "component-selector": [ + true, + "element", + "app", + "kebab-case" + ] + } +} diff --git a/samples/client/petstore/typescript-angular-v15-provided-in-root/tsconfig.json b/samples/client/petstore/typescript-angular-v15-provided-in-root/tsconfig.json new file mode 100644 index 0000000000..f3ec5dc066 --- /dev/null +++ b/samples/client/petstore/typescript-angular-v15-provided-in-root/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compileOnSave": false, + "compilerOptions": { + "baseUrl": "./", + "downlevelIteration": true, + "module": "es2020", + "outDir": "./dist/out-tsc", + "sourceMap": true, + "declaration": false, + "moduleResolution": "node", + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "target": "es2015", + "typeRoots": [ + "node_modules/@types" + ], + "paths": { + "@swagger/typescript-angular-petstore": ["builds/default"] + }, + "lib": [ + "es2017", + "dom" + ] + } +} diff --git a/samples/client/petstore/typescript-angular-v15-provided-in-root/tslint.json b/samples/client/petstore/typescript-angular-v15-provided-in-root/tslint.json new file mode 100644 index 0000000000..5065137af3 --- /dev/null +++ b/samples/client/petstore/typescript-angular-v15-provided-in-root/tslint.json @@ -0,0 +1,129 @@ +{ + "rulesDirectory": [ + "node_modules/codelyzer" + ], + "rules": { + "arrow-return-shorthand": true, + "callable-types": true, + "class-name": true, + "comment-format": [ + true, + "check-space" + ], + "curly": true, + "deprecation": { + "severity": "warn" + }, + "eofline": true, + "forin": true, + "import-blacklist": [ + true, + "rxjs/Rx" + ], + "import-spacing": true, + "indent": [ + true, + "spaces" + ], + "interface-over-type-literal": true, + "label-position": true, + "max-line-length": [ + true, + 140 + ], + "member-access": false, + "member-ordering": [ + true, + { + "order": [ + "static-field", + "instance-field", + "static-method", + "instance-method" + ] + } + ], + "no-arg": true, + "no-bitwise": true, + "no-console": [ + true, + "debug", + "info", + "time", + "timeEnd", + "trace" + ], + "no-construct": true, + "no-debugger": true, + "no-duplicate-super": true, + "no-empty": false, + "no-empty-interface": true, + "no-eval": true, + "no-inferrable-types": [ + true, + "ignore-params" + ], + "no-misused-new": true, + "no-non-null-assertion": true, + "no-shadowed-variable": true, + "no-string-literal": false, + "no-string-throw": true, + "no-switch-case-fall-through": true, + "no-trailing-whitespace": true, + "no-unnecessary-initializer": true, + "no-unused-expression": true, + "no-var-keyword": true, + "object-literal-sort-keys": false, + "one-line": [ + true, + "check-open-brace", + "check-catch", + "check-else", + "check-whitespace" + ], + "prefer-const": true, + "quotemark": [ + true, + "single" + ], + "radix": true, + "semicolon": [ + true, + "always" + ], + "triple-equals": [ + true, + "allow-null-check" + ], + "typedef-whitespace": [ + true, + { + "call-signature": "nospace", + "index-signature": "nospace", + "parameter": "nospace", + "property-declaration": "nospace", + "variable-declaration": "nospace" + } + ], + "unified-signatures": true, + "variable-name": false, + "whitespace": [ + true, + "check-branch", + "check-decl", + "check-operator", + "check-separator", + "check-type" + ], + "no-output-on-prefix": true, + "no-inputs-metadata-property": true, + "no-outputs-metadata-property": true, + "no-host-metadata-property": true, + "no-input-rename": true, + "no-output-rename": true, + "use-lifecycle-interface": true, + "use-pipe-transform-interface": true, + "component-class-suffix": true, + "directive-class-suffix": true + } +} From 081a6ef46699fb4cc954b663781f3374e9300153 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Fri, 16 Dec 2022 14:54:19 +0800 Subject: [PATCH 096/189] add back mavenLocal in gradle plugin build (#14265) --- modules/openapi-generator-gradle-plugin/build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/openapi-generator-gradle-plugin/build.gradle b/modules/openapi-generator-gradle-plugin/build.gradle index 61be1d2540..17cefb745a 100644 --- a/modules/openapi-generator-gradle-plugin/build.gradle +++ b/modules/openapi-generator-gradle-plugin/build.gradle @@ -31,6 +31,7 @@ java { } repositories { + mavenLocal() mavenCentral() maven { name = "Sonatype Snapshots" From 2a33229158c9151470dc693d6487a514109f7cc3 Mon Sep 17 00:00:00 2001 From: John Mitchell <38718205+jfmitchell@users.noreply.github.com> Date: Sat, 17 Dec 2022 07:40:14 +0000 Subject: [PATCH 097/189] Support for GSON Decoder in Java Feign Generator (#14254) * Supporting Gson decoder in Feign * Supporting Gson decoder in Feign * Fixing test failures - and ensuring Jackson is used as the default if nothing selected (back compatible) * Adding in sample files * Updating docs * Switching to echo server version * Adding feign-gson to the github workflow * Empty-Commit --- .../samples-java-client-echo-api-jdk11.yaml | 1 + bin/configs/java-feign-gson-echo-api.yaml | 9 + docs/generators/java.md | 2 +- .../codegen/languages/JavaClientCodegen.java | 13 +- .../Java/libraries/feign/ApiClient.mustache | 34 +- .../Java/libraries/feign/pom.mustache | 25 ++ .../feign-gson/.github/workflows/maven.yml | 30 ++ .../echo_api/java/feign-gson/.gitignore | 21 ++ .../java/feign-gson/.openapi-generator-ignore | 23 ++ .../java/feign-gson/.openapi-generator/FILES | 33 ++ .../feign-gson/.openapi-generator/VERSION | 1 + .../echo_api/java/feign-gson/.travis.yml | 22 ++ .../client/echo_api/java/feign-gson/README.md | 77 +++++ .../echo_api/java/feign-gson/api/openapi.yaml | 242 +++++++++++++ .../echo_api/java/feign-gson/build.gradle | 139 ++++++++ .../client/echo_api/java/feign-gson/build.sbt | 34 ++ .../echo_api/java/feign-gson/git_push.sh | 57 ++++ .../java/feign-gson/gradle.properties | 6 + .../gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 59536 bytes .../gradle/wrapper/gradle-wrapper.properties | 5 + .../client/echo_api/java/feign-gson/gradlew | 234 +++++++++++++ .../echo_api/java/feign-gson/gradlew.bat | 89 +++++ .../client/echo_api/java/feign-gson/pom.xml | 320 ++++++++++++++++++ .../echo_api/java/feign-gson/settings.gradle | 1 + .../feign-gson/src/main/AndroidManifest.xml | 3 + .../org/openapitools/client/ApiClient.java | 196 +++++++++++ .../openapitools/client/EncodingUtils.java | 86 +++++ .../client/ServerConfiguration.java | 58 ++++ .../openapitools/client/ServerVariable.java | 23 ++ .../org/openapitools/client/StringUtil.java | 83 +++++ .../org/openapitools/client/api/BodyApi.java | 47 +++ .../org/openapitools/client/api/PathApi.java | 46 +++ .../org/openapitools/client/api/QueryApi.java | 266 +++++++++++++++ .../openapitools/client/auth/ApiKeyAuth.java | 43 +++ .../client/auth/DefaultApi20Impl.java | 47 +++ .../client/auth/HttpBasicAuth.java | 41 +++ .../client/auth/HttpBearerAuth.java | 43 +++ .../client/model/ApiResponse.java | 43 +++ .../openapitools/client/model/Category.java | 125 +++++++ .../org/openapitools/client/model/Pet.java | 303 +++++++++++++++++ .../org/openapitools/client/model/Tag.java | 125 +++++++ ...deTrueArrayStringQueryObjectParameter.java | 107 ++++++ .../openapitools/client/api/BodyApiTest.java | 42 +++ .../openapitools/client/api/PathApiTest.java | 42 +++ .../openapitools/client/api/QueryApiTest.java | 123 +++++++ .../client/model/CategoryTest.java | 55 +++ .../openapitools/client/model/PetTest.java | 91 +++++ .../openapitools/client/model/TagTest.java | 55 +++ ...ueArrayStringQueryObjectParameterTest.java | 49 +++ .../org/openapitools/client/ApiClient.java | 4 +- .../org/openapitools/client/ApiClient.java | 4 +- 51 files changed, 3557 insertions(+), 11 deletions(-) create mode 100644 bin/configs/java-feign-gson-echo-api.yaml create mode 100644 samples/client/echo_api/java/feign-gson/.github/workflows/maven.yml create mode 100644 samples/client/echo_api/java/feign-gson/.gitignore create mode 100644 samples/client/echo_api/java/feign-gson/.openapi-generator-ignore create mode 100644 samples/client/echo_api/java/feign-gson/.openapi-generator/FILES create mode 100644 samples/client/echo_api/java/feign-gson/.openapi-generator/VERSION create mode 100644 samples/client/echo_api/java/feign-gson/.travis.yml create mode 100644 samples/client/echo_api/java/feign-gson/README.md create mode 100644 samples/client/echo_api/java/feign-gson/api/openapi.yaml create mode 100644 samples/client/echo_api/java/feign-gson/build.gradle create mode 100644 samples/client/echo_api/java/feign-gson/build.sbt create mode 100644 samples/client/echo_api/java/feign-gson/git_push.sh create mode 100644 samples/client/echo_api/java/feign-gson/gradle.properties create mode 100644 samples/client/echo_api/java/feign-gson/gradle/wrapper/gradle-wrapper.jar create mode 100644 samples/client/echo_api/java/feign-gson/gradle/wrapper/gradle-wrapper.properties create mode 100644 samples/client/echo_api/java/feign-gson/gradlew create mode 100644 samples/client/echo_api/java/feign-gson/gradlew.bat create mode 100644 samples/client/echo_api/java/feign-gson/pom.xml create mode 100644 samples/client/echo_api/java/feign-gson/settings.gradle create mode 100644 samples/client/echo_api/java/feign-gson/src/main/AndroidManifest.xml create mode 100644 samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/ApiClient.java create mode 100644 samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/EncodingUtils.java create mode 100644 samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/ServerConfiguration.java create mode 100644 samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/ServerVariable.java create mode 100644 samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/StringUtil.java create mode 100644 samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/api/BodyApi.java create mode 100644 samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/api/PathApi.java create mode 100644 samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/api/QueryApi.java create mode 100644 samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java create mode 100644 samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/auth/DefaultApi20Impl.java create mode 100644 samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java create mode 100644 samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java create mode 100644 samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/model/ApiResponse.java create mode 100644 samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/model/Category.java create mode 100644 samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/model/Pet.java create mode 100644 samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/model/Tag.java create mode 100644 samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.java create mode 100644 samples/client/echo_api/java/feign-gson/src/test/java/org/openapitools/client/api/BodyApiTest.java create mode 100644 samples/client/echo_api/java/feign-gson/src/test/java/org/openapitools/client/api/PathApiTest.java create mode 100644 samples/client/echo_api/java/feign-gson/src/test/java/org/openapitools/client/api/QueryApiTest.java create mode 100644 samples/client/echo_api/java/feign-gson/src/test/java/org/openapitools/client/model/CategoryTest.java create mode 100644 samples/client/echo_api/java/feign-gson/src/test/java/org/openapitools/client/model/PetTest.java create mode 100644 samples/client/echo_api/java/feign-gson/src/test/java/org/openapitools/client/model/TagTest.java create mode 100644 samples/client/echo_api/java/feign-gson/src/test/java/org/openapitools/client/model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameterTest.java diff --git a/.github/workflows/samples-java-client-echo-api-jdk11.yaml b/.github/workflows/samples-java-client-echo-api-jdk11.yaml index b165d677d5..12813b6350 100644 --- a/.github/workflows/samples-java-client-echo-api-jdk11.yaml +++ b/.github/workflows/samples-java-client-echo-api-jdk11.yaml @@ -18,6 +18,7 @@ jobs: # clients - samples/client/echo_api/java/apache-httpclient - samples/client/echo_api/java/native + - samples/client/echo_api/java/feign-gson steps: - uses: actions/checkout@v3 - uses: actions/setup-java@v3 diff --git a/bin/configs/java-feign-gson-echo-api.yaml b/bin/configs/java-feign-gson-echo-api.yaml new file mode 100644 index 0000000000..d765eb41c0 --- /dev/null +++ b/bin/configs/java-feign-gson-echo-api.yaml @@ -0,0 +1,9 @@ +generatorName: java +outputDir: samples/client/echo_api/java/feign-gson +library: feign +inputSpec: modules/openapi-generator/src/test/resources/3_0/echo_api.yaml +templateDir: modules/openapi-generator/src/main/resources/Java +additionalProperties: + serializationLibrary: gson + artifactId: echo-api-feign-json + hideGenerationTimestamp: "true" diff --git a/docs/generators/java.md b/docs/generators/java.md index 43a723d2ed..89cc2f2c33 100644 --- a/docs/generators/java.md +++ b/docs/generators/java.md @@ -56,7 +56,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null| |invokerPackage|root package for generated code| |org.openapitools.client| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| -|library|library template (sub-template) to use|
**jersey1**
HTTP client: Jersey client 1.19.x. JSON processing: Jackson 2.9.x. Enable gzip request encoding using '-DuseGzipFeature=true'. IMPORTANT NOTE: jersey 1.x is no longer actively maintained so please upgrade to 'jersey3' or other HTTP libraries instead.
**jersey2**
HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.9.x
**jersey3**
HTTP client: Jersey client 3.x. JSON processing: Jackson 2.x
**feign**
HTTP client: OpenFeign 10.x. JSON processing: Jackson 2.9.x.
**okhttp-gson**
[DEFAULT] HTTP client: OkHttp 3.x. JSON processing: Gson 2.8.x. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.
**retrofit2**
HTTP client: OkHttp 3.x. JSON processing: Gson 2.x (Retrofit 2.3.0). Enable the RxJava adapter using '-DuseRxJava[2/3]=true'. (RxJava 1.x or 2.x or 3.x)
**resttemplate**
HTTP client: Spring RestTemplate 4.x. JSON processing: Jackson 2.9.x
**webclient**
HTTP client: Spring WebClient 5.x. JSON processing: Jackson 2.9.x
**resteasy**
HTTP client: Resteasy client 3.x. JSON processing: Jackson 2.9.x
**vertx**
HTTP client: VertX client 3.x. JSON processing: Jackson 2.9.x
**google-api-client**
HTTP client: Google API client 1.x. JSON processing: Jackson 2.9.x
**rest-assured**
HTTP client: rest-assured : 4.x. JSON processing: Gson 2.x or Jackson 2.10.x. Only for Java 8
**native**
HTTP client: Java native HttpClient. JSON processing: Jackson 2.9.x. Only for Java11+
**microprofile**
HTTP client: Microprofile client 1.x. JSON processing: JSON-B
**apache-httpclient**
HTTP client: Apache httpclient 4.x
|okhttp-gson| +|library|library template (sub-template) to use|
**jersey1**
HTTP client: Jersey client 1.19.x. JSON processing: Jackson 2.9.x. Enable gzip request encoding using '-DuseGzipFeature=true'. IMPORTANT NOTE: jersey 1.x is no longer actively maintained so please upgrade to 'jersey3' or other HTTP libraries instead.
**jersey2**
HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.9.x
**jersey3**
HTTP client: Jersey client 3.x. JSON processing: Jackson 2.x
**feign**
HTTP client: OpenFeign 10.x. JSON processing: Jackson 2.9.x. or Gson 2.x
**okhttp-gson**
[DEFAULT] HTTP client: OkHttp 3.x. JSON processing: Gson 2.8.x. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.
**retrofit2**
HTTP client: OkHttp 3.x. JSON processing: Gson 2.x (Retrofit 2.3.0). Enable the RxJava adapter using '-DuseRxJava[2/3]=true'. (RxJava 1.x or 2.x or 3.x)
**resttemplate**
HTTP client: Spring RestTemplate 4.x. JSON processing: Jackson 2.9.x
**webclient**
HTTP client: Spring WebClient 5.x. JSON processing: Jackson 2.9.x
**resteasy**
HTTP client: Resteasy client 3.x. JSON processing: Jackson 2.9.x
**vertx**
HTTP client: VertX client 3.x. JSON processing: Jackson 2.9.x
**google-api-client**
HTTP client: Google API client 1.x. JSON processing: Jackson 2.9.x
**rest-assured**
HTTP client: rest-assured : 4.x. JSON processing: Gson 2.x or Jackson 2.10.x. Only for Java 8
**native**
HTTP client: Java native HttpClient. JSON processing: Jackson 2.9.x. Only for Java11+
**microprofile**
HTTP client: Microprofile client 1.x. JSON processing: JSON-B
**apache-httpclient**
HTTP client: Apache httpclient 4.x
|okhttp-gson| |licenseName|The name of the license| |Unlicense| |licenseUrl|The URL of the license| |http://unlicense.org| |microprofileFramework|Framework for microprofile. Possible values "kumuluzee"| |null| diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java index fba5de02c1..33498a66bb 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaClientCodegen.java @@ -211,7 +211,7 @@ public class JavaClientCodegen extends AbstractJavaCodegen supportedLibraries.put(JERSEY1, "HTTP client: Jersey client 1.19.x. JSON processing: Jackson 2.9.x. Enable gzip request encoding using '-DuseGzipFeature=true'. IMPORTANT NOTE: jersey 1.x is no longer actively maintained so please upgrade to 'jersey3' or other HTTP libraries instead."); supportedLibraries.put(JERSEY2, "HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.9.x"); supportedLibraries.put(JERSEY3, "HTTP client: Jersey client 3.x. JSON processing: Jackson 2.x"); - supportedLibraries.put(FEIGN, "HTTP client: OpenFeign 10.x. JSON processing: Jackson 2.9.x."); + supportedLibraries.put(FEIGN, "HTTP client: OpenFeign 10.x. JSON processing: Jackson 2.9.x. or Gson 2.x"); supportedLibraries.put(OKHTTP_GSON, "[DEFAULT] HTTP client: OkHttp 3.x. JSON processing: Gson 2.8.x. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'."); supportedLibraries.put(RETROFIT_2, "HTTP client: OkHttp 3.x. JSON processing: Gson 2.x (Retrofit 2.3.0). Enable the RxJava adapter using '-DuseRxJava[2/3]=true'. (RxJava 1.x or 2.x or 3.x)"); supportedLibraries.put(RESTTEMPLATE, "HTTP client: Spring RestTemplate 4.x. JSON processing: Jackson 2.9.x"); @@ -485,7 +485,6 @@ public class JavaClientCodegen extends AbstractJavaCodegen apiDocTemplateFiles.remove("api_doc.mustache"); //Templates to decode response headers supportingFiles.add(new SupportingFile("model/ApiResponse.mustache", modelsFolder, "ApiResponse.java")); - supportingFiles.add(new SupportingFile("ApiResponseDecoder.mustache", invokerFolder, "ApiResponseDecoder.java")); // TODO remove "file" from reserved word list as feign client doesn't support using `baseName` // as the parameter name yet @@ -503,8 +502,14 @@ public class JavaClientCodegen extends AbstractJavaCodegen } if (FEIGN.equals(getLibrary())) { - forceSerializationLibrary(SERIALIZATION_LIBRARY_JACKSON); - supportingFiles.add(new SupportingFile("ParamExpander.mustache", invokerFolder, "ParamExpander.java")); + if (getSerializationLibrary() == null) { + LOGGER.info("No serializationLibrary configured, using '{}' as fallback", SERIALIZATION_LIBRARY_JACKSON); + setSerializationLibrary(SERIALIZATION_LIBRARY_JACKSON); + } + if (SERIALIZATION_LIBRARY_JACKSON.equals(getSerializationLibrary())) { + supportingFiles.add(new SupportingFile("ApiResponseDecoder.mustache", invokerFolder, "ApiResponseDecoder.java")); + supportingFiles.add(new SupportingFile("ParamExpander.mustache", invokerFolder, "ParamExpander.java")); + } supportingFiles.add(new SupportingFile("EncodingUtils.mustache", invokerFolder, "EncodingUtils.java")); supportingFiles.add(new SupportingFile("auth/DefaultApi20Impl.mustache", authFolder, "DefaultApi20Impl.java")); } else if (OKHTTP_GSON.equals(getLibrary()) || StringUtils.isEmpty(getLibrary())) { diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/feign/ApiClient.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/feign/ApiClient.mustache index cc9599940f..74ab1d0275 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/feign/ApiClient.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/feign/ApiClient.mustache @@ -5,29 +5,40 @@ import java.util.Map; import java.util.logging.Level; import java.util.logging.Logger; +{{#jackson}} import feign.okhttp.OkHttpClient; - import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; {{#openApiNullable}} import org.openapitools.jackson.nullable.JsonNullableModule; {{/openApiNullable}} +{{/jackson}} {{#joda}} import com.fasterxml.jackson.datatype.joda.JodaModule; {{/joda}} +{{#jackson}} import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +{{/jackson}} import feign.Feign; import feign.RequestInterceptor; import feign.form.FormEncoder; +{{#jackson}} import feign.jackson.JacksonDecoder; import feign.jackson.JacksonEncoder; +{{/jackson}} +{{#gson}} +import feign.gson.GsonDecoder; +import feign.gson.GsonEncoder; +{{/gson}} import feign.slf4j.Slf4jLogger; import {{invokerPackage}}.auth.HttpBasicAuth; import {{invokerPackage}}.auth.HttpBearerAuth; import {{invokerPackage}}.auth.ApiKeyAuth; +{{#jackson}} import {{invokerPackage}}.ApiResponseDecoder; +{{/jackson}} {{#hasOAuthMethods}} import {{invokerPackage}}.auth.ApiErrorDecoder; @@ -45,14 +56,17 @@ public class ApiClient { public interface Api {} + {{#jackson}} protected ObjectMapper objectMapper; + {{/jackson}} private String basePath = "{{{basePath}}}"; private Map apiAuthorizations; private Feign.Builder feignBuilder; public ApiClient() { - objectMapper = createObjectMapper(); apiAuthorizations = new LinkedHashMap(); + {{#jackson}} + objectMapper = createObjectMapper(); feignBuilder = Feign.builder() .client(new OkHttpClient()) .encoder(new FormEncoder(new JacksonEncoder(objectMapper))) @@ -62,6 +76,17 @@ public class ApiClient { .retryer(new Retryer.Default(0, 0, 2)) {{/hasOAuthMethods}} .logger(new Slf4jLogger()); + {{/jackson}} + {{#gson}} + feignBuilder = Feign.builder() + .encoder(new FormEncoder(new GsonEncoder())) + .decoder(new GsonDecoder()) + {{#hasOAuthMethods}} + .errorDecoder(new ApiErrorDecoder()) + .retryer(new Retryer.Default(0, 0, 2)) + {{/hasOAuthMethods}} + .logger(new Slf4jLogger()); + {{/gson}} } public ApiClient(String[] authNames) { @@ -140,6 +165,7 @@ public class ApiClient { return this; } + {{#jackson}} private ObjectMapper createObjectMapper() { ObjectMapper objectMapper = new ObjectMapper(); objectMapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); @@ -158,6 +184,7 @@ public class ApiClient { {{/openApiNullable}} return objectMapper; } + {{/jackson}} {{#hasOAuthMethods}} private RequestInterceptor buildOauthRequestInterceptor(OAuthFlow flow, String authorizationUrl, String tokenUrl, String scopes) { @@ -172,6 +199,8 @@ public class ApiClient { } {{/hasOAuthMethods}} + + {{#jackson}} public ObjectMapper getObjectMapper(){ return objectMapper; } @@ -179,6 +208,7 @@ public class ApiClient { public void setObjectMapper(ObjectMapper objectMapper) { this.objectMapper = objectMapper; } + {{/jackson}} /** * Creates a feign client for given API interface. diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/feign/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/feign/pom.mustache index 5a122b3211..be8b951bb7 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/feign/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/feign/pom.mustache @@ -234,11 +234,20 @@ feign-core ${feign-version} + {{#jackson}} io.github.openfeign feign-jackson ${feign-version} + {{/jackson}} + {{#gson}} + + io.github.openfeign + feign-gson + ${feign-version} + + {{/gson}} io.github.openfeign feign-slf4j @@ -255,6 +264,7 @@ ${feign-version} + {{#jackson}} com.fasterxml.jackson.core @@ -271,6 +281,14 @@ jackson-databind ${jackson-databind-version} + {{/jackson}} + {{#gson}} + + com.google.code.gson + gson + ${gson-version} + + {{/gson}} {{#openApiNullable}} org.openapitools @@ -293,11 +311,13 @@ ${jackson-version} {{/joda}} + {{#jackson}} com.fasterxml.jackson.datatype jackson-datatype-jsr310 ${jackson-version} + {{/jackson}} com.github.scribejava scribejava-core @@ -356,7 +376,12 @@ 1.6.6 10.11 3.8.0 + {{#jackson}} 2.13.4 + {{/jackson}} + {{#gson}} + 2.8.6 + {{/gson}} {{#openApiNullable}} 0.2.4 {{/openApiNullable}} diff --git a/samples/client/echo_api/java/feign-gson/.github/workflows/maven.yml b/samples/client/echo_api/java/feign-gson/.github/workflows/maven.yml new file mode 100644 index 0000000000..aa75c11642 --- /dev/null +++ b/samples/client/echo_api/java/feign-gson/.github/workflows/maven.yml @@ -0,0 +1,30 @@ +# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven +# +# This file is auto-generated by OpenAPI Generator (https://openapi-generator.tech) + +name: Java CI with Maven + +on: + push: + branches: [ main, master ] + pull_request: + branches: [ main, master ] + +jobs: + build: + name: Build Echo Server API + runs-on: ubuntu-latest + strategy: + matrix: + java: [ '8' ] + steps: + - uses: actions/checkout@v2 + - name: Set up JDK + uses: actions/setup-java@v2 + with: + java-version: ${{ matrix.java }} + distribution: 'temurin' + cache: maven + - name: Build with Maven + run: mvn -B package --no-transfer-progress --file pom.xml diff --git a/samples/client/echo_api/java/feign-gson/.gitignore b/samples/client/echo_api/java/feign-gson/.gitignore new file mode 100644 index 0000000000..a530464afa --- /dev/null +++ b/samples/client/echo_api/java/feign-gson/.gitignore @@ -0,0 +1,21 @@ +*.class + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.ear + +# exclude jar for gradle wrapper +!gradle/wrapper/*.jar + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* + +# build files +**/target +target +.gradle +build diff --git a/samples/client/echo_api/java/feign-gson/.openapi-generator-ignore b/samples/client/echo_api/java/feign-gson/.openapi-generator-ignore new file mode 100644 index 0000000000..7484ee590a --- /dev/null +++ b/samples/client/echo_api/java/feign-gson/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/samples/client/echo_api/java/feign-gson/.openapi-generator/FILES b/samples/client/echo_api/java/feign-gson/.openapi-generator/FILES new file mode 100644 index 0000000000..abf25d9240 --- /dev/null +++ b/samples/client/echo_api/java/feign-gson/.openapi-generator/FILES @@ -0,0 +1,33 @@ +.github/workflows/maven.yml +.gitignore +.travis.yml +README.md +api/openapi.yaml +build.gradle +build.sbt +git_push.sh +gradle.properties +gradle/wrapper/gradle-wrapper.jar +gradle/wrapper/gradle-wrapper.properties +gradlew +gradlew.bat +pom.xml +settings.gradle +src/main/AndroidManifest.xml +src/main/java/org/openapitools/client/ApiClient.java +src/main/java/org/openapitools/client/EncodingUtils.java +src/main/java/org/openapitools/client/ServerConfiguration.java +src/main/java/org/openapitools/client/ServerVariable.java +src/main/java/org/openapitools/client/StringUtil.java +src/main/java/org/openapitools/client/api/BodyApi.java +src/main/java/org/openapitools/client/api/PathApi.java +src/main/java/org/openapitools/client/api/QueryApi.java +src/main/java/org/openapitools/client/auth/ApiKeyAuth.java +src/main/java/org/openapitools/client/auth/DefaultApi20Impl.java +src/main/java/org/openapitools/client/auth/HttpBasicAuth.java +src/main/java/org/openapitools/client/auth/HttpBearerAuth.java +src/main/java/org/openapitools/client/model/ApiResponse.java +src/main/java/org/openapitools/client/model/Category.java +src/main/java/org/openapitools/client/model/Pet.java +src/main/java/org/openapitools/client/model/Tag.java +src/main/java/org/openapitools/client/model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.java diff --git a/samples/client/echo_api/java/feign-gson/.openapi-generator/VERSION b/samples/client/echo_api/java/feign-gson/.openapi-generator/VERSION new file mode 100644 index 0000000000..d6b4ec4aa7 --- /dev/null +++ b/samples/client/echo_api/java/feign-gson/.openapi-generator/VERSION @@ -0,0 +1 @@ +6.3.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/echo_api/java/feign-gson/.travis.yml b/samples/client/echo_api/java/feign-gson/.travis.yml new file mode 100644 index 0000000000..1b6741c083 --- /dev/null +++ b/samples/client/echo_api/java/feign-gson/.travis.yml @@ -0,0 +1,22 @@ +# +# Generated by OpenAPI Generator: https://openapi-generator.tech +# +# Ref: https://docs.travis-ci.com/user/languages/java/ +# +language: java +jdk: + - openjdk12 + - openjdk11 + - openjdk10 + - openjdk9 + - openjdk8 +before_install: + # ensure gradlew has proper permission + - chmod a+x ./gradlew +script: + # test using maven + #- mvn test + # test using gradle + - gradle test + # test using sbt + # - sbt test diff --git a/samples/client/echo_api/java/feign-gson/README.md b/samples/client/echo_api/java/feign-gson/README.md new file mode 100644 index 0000000000..8ef3327601 --- /dev/null +++ b/samples/client/echo_api/java/feign-gson/README.md @@ -0,0 +1,77 @@ +# echo-api-feign-json + +## Requirements + +Building the API client library requires [Maven](https://maven.apache.org/) to be installed. + +## Installation & Usage + +To install the API client library to your local Maven repository, simply execute: + +```shell +mvn install +``` + +To deploy it to a remote Maven repository instead, configure the settings of the repository and execute: + +```shell +mvn deploy +``` + +Refer to the [official documentation](https://maven.apache.org/plugins/maven-deploy-plugin/usage.html) for more information. + +After the client library is installed/deployed, you can use it in your Maven project by adding the following to your *pom.xml*: + +```xml + + org.openapitools + echo-api-feign-json + 0.1.0 + compile + + +``` + +And to use the api you can follow the examples bellow: + +```java + + //Set bearer token manually + ApiClient apiClient = new ApiClient("petstore_auth_client"); + apiClient.setBasePath("https://localhost:8243/petstore/1/"); + apiClient.setAccessToken("TOKEN", 10000); + + //Use api key + ApiClient apiClient = new ApiClient("api_key", "API KEY"); + apiClient.setBasePath("https://localhost:8243/petstore/1/"); + + //Use http basic authentication + ApiClient apiClient = new ApiClient("basicAuth"); + apiClient.setBasePath("https://localhost:8243/petstore/1/"); + apiClient.setCredentials("username", "password"); + + //Oauth password + ApiClient apiClient = new ApiClient("oauth_password"); + apiClient.setBasePath("https://localhost:8243/petstore/1/"); + apiClient.setOauthPassword("username", "password", "client_id", "client_secret"); + + //Oauth client credentials flow + ApiClient apiClient = new ApiClient("oauth_client_credentials"); + apiClient.setBasePath("https://localhost:8243/petstore/1/"); + apiClient.setClientCredentials("client_id", "client_secret"); + + PetApi petApi = apiClient.buildClient(PetApi.class); + Pet petById = petApi.getPetById(12345L); + + System.out.println(petById); + } +``` + +## Recommendation + +It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues. + +## Author + +team@openapitools.org + diff --git a/samples/client/echo_api/java/feign-gson/api/openapi.yaml b/samples/client/echo_api/java/feign-gson/api/openapi.yaml new file mode 100644 index 0000000000..4dd00e1631 --- /dev/null +++ b/samples/client/echo_api/java/feign-gson/api/openapi.yaml @@ -0,0 +1,242 @@ +openapi: 3.0.3 +info: + contact: + email: team@openapitools.org + description: Echo Server API + license: + name: Apache 2.0 + url: http://www.apache.org/licenses/LICENSE-2.0.html + title: Echo Server API + version: 0.1.0 +servers: +- url: http://localhost:3000/ +paths: + /path/string/{path_string}/integer/{path_integer}: + get: + description: Test path parameter(s) + operationId: "tests/path/string/{path_string}/integer/{path_integer}" + parameters: + - explode: false + in: path + name: path_string + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: path_integer + required: true + schema: + type: integer + style: simple + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test path parameter(s) + tags: + - path + x-accepts: text/plain + /query/integer/boolean/string: + get: + description: Test query parameter(s) + operationId: test/query/integer/boolean/string + parameters: + - explode: true + in: query + name: integer_query + required: false + schema: + type: integer + style: form + - explode: true + in: query + name: boolean_query + required: false + schema: + type: boolean + style: form + - explode: true + in: query + name: string_query + required: false + schema: + type: string + style: form + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test query parameter(s) + tags: + - query + x-accepts: text/plain + /query/style_form/explode_true/array_string: + get: + description: Test query parameter(s) + operationId: test/query/style_form/explode_true/array_string + parameters: + - explode: true + in: query + name: query_object + required: false + schema: + $ref: '#/components/schemas/test_query_style_form_explode_true_array_string_query_object_parameter' + style: form + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test query parameter(s) + tags: + - query + x-accepts: text/plain + /query/style_form/explode_true/object: + get: + description: Test query parameter(s) + operationId: test/query/style_form/explode_true/object + parameters: + - explode: true + in: query + name: query_object + required: false + schema: + $ref: '#/components/schemas/Pet' + style: form + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test query parameter(s) + tags: + - query + x-accepts: text/plain + /echo/body/Pet: + post: + description: Test body parameter(s) + operationId: test/echo/body/Pet + requestBody: + $ref: '#/components/requestBodies/Pet' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + description: Successful operation + summary: Test body parameter(s) + tags: + - body + x-content-type: application/json + x-accepts: application/json +components: + requestBodies: + Pet: + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store + schemas: + Category: + example: + name: Dogs + id: 1 + properties: + id: + example: 1 + format: int64 + type: integer + name: + example: Dogs + type: string + type: object + xml: + name: category + Tag: + example: + name: name + id: 0 + properties: + id: + format: int64 + type: integer + name: + type: string + type: object + xml: + name: tag + Pet: + example: + photoUrls: + - photoUrls + - photoUrls + name: doggie + id: 10 + category: + name: Dogs + id: 1 + tags: + - name: name + id: 0 + - name: name + id: 0 + status: available + properties: + id: + example: 10 + format: int64 + type: integer + name: + example: doggie + type: string + category: + $ref: '#/components/schemas/Category' + photoUrls: + items: + type: string + xml: + name: photoUrl + type: array + xml: + wrapped: true + tags: + items: + $ref: '#/components/schemas/Tag' + type: array + xml: + wrapped: true + status: + description: pet status in the store + enum: + - available + - pending + - sold + type: string + required: + - name + - photoUrls + type: object + xml: + name: pet + test_query_style_form_explode_true_array_string_query_object_parameter: + properties: + values: + items: + type: string + type: array + type: object + diff --git a/samples/client/echo_api/java/feign-gson/build.gradle b/samples/client/echo_api/java/feign-gson/build.gradle new file mode 100644 index 0000000000..81c595e534 --- /dev/null +++ b/samples/client/echo_api/java/feign-gson/build.gradle @@ -0,0 +1,139 @@ +apply plugin: 'idea' +apply plugin: 'eclipse' + +group = 'org.openapitools' +version = '0.1.0' + +buildscript { + repositories { + mavenCentral() + } + dependencies { + classpath 'com.android.tools.build:gradle:2.3.+' + classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' + } +} + +repositories { + mavenCentral() +} + + +if(hasProperty('target') && target == 'android') { + + apply plugin: 'com.android.library' + apply plugin: 'com.github.dcendents.android-maven' + + android { + compileSdkVersion 25 + buildToolsVersion '25.0.2' + defaultConfig { + minSdkVersion 14 + targetSdkVersion 25 + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + // Rename the aar correctly + libraryVariants.all { variant -> + variant.outputs.each { output -> + def outputFile = output.outputFile + if (outputFile != null && outputFile.name.endsWith('.aar')) { + def fileName = "${project.name}-${variant.baseName}-${version}.aar" + output.outputFile = new File(outputFile.parent, fileName) + } + } + } + + dependencies { + provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + } + } + + 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-publish' + + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + + publishing { + publications { + maven(MavenPublication) { + artifactId = 'echo-api-feign-json' + from components.java + } + } + } + + task execute(type:JavaExec) { + main = System.getProperty('mainClass') + classpath = sourceSets.main.runtimeClasspath + } +} + +test { + useJUnitPlatform() +} + +ext { + swagger_annotations_version = "1.5.24" + jackson_version = "2.13.4" + jackson_databind_version = "2.13.4.2" + jackson_databind_nullable_version = "0.2.4" + jakarta_annotation_version = "1.3.5" + feign_version = "10.11" + feign_form_version = "3.8.0" + junit_version = "5.7.0" + scribejava_version = "8.0.0" +} + +dependencies { + implementation "io.swagger:swagger-annotations:$swagger_annotations_version" + implementation "com.google.code.findbugs:jsr305:3.0.2" + implementation "io.github.openfeign:feign-core:$feign_version" + implementation "io.github.openfeign:feign-jackson:$feign_version" + implementation "io.github.openfeign:feign-slf4j:$feign_version" + implementation "io.github.openfeign:feign-okhttp:$feign_version" + implementation "io.github.openfeign.form:feign-form:$feign_form_version" + implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version" + implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" + implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" + implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" + implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" + implementation "com.brsanthu:migbase64:2.2" + implementation "com.github.scribejava:scribejava-core:$scribejava_version" + implementation "com.brsanthu:migbase64:2.2" + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + testImplementation "org.junit.jupiter:junit-jupiter:$junit_version" + testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_version" + testImplementation "org.junit.jupiter:junit-jupiter-params:$junit_version" + testImplementation "com.github.tomakehurst:wiremock-jre8:2.27.2" + testImplementation "org.hamcrest:hamcrest:2.2" + testImplementation "commons-io:commons-io:2.8.0" + testImplementation "ch.qos.logback:logback-classic:1.2.3" +} diff --git a/samples/client/echo_api/java/feign-gson/build.sbt b/samples/client/echo_api/java/feign-gson/build.sbt new file mode 100644 index 0000000000..99e885e78c --- /dev/null +++ b/samples/client/echo_api/java/feign-gson/build.sbt @@ -0,0 +1,34 @@ +lazy val root = (project in file(".")). + settings( + organization := "org.openapitools", + name := "echo-api-feign-json", + version := "0.1.0", + scalaVersion := "2.11.4", + scalacOptions ++= Seq("-feature"), + javacOptions in compile ++= Seq("-Xlint:deprecation"), + publishArtifact in (Compile, packageDoc) := false, + resolvers += Resolver.mavenLocal, + libraryDependencies ++= Seq( + "io.swagger" % "swagger-annotations" % "1.5.24" % "compile", + "com.google.code.findbugs" % "jsr305" % "3.0.2" % "compile", + "io.github.openfeign" % "feign-core" % "10.11" % "compile", + "io.github.openfeign" % "feign-jackson" % "10.11" % "compile", + "io.github.openfeign" % "feign-slf4j" % "10.11" % "compile", + "io.github.openfeign.form" % "feign-form" % "3.8.0" % "compile", + "io.github.openfeign" % "feign-okhttp" % "10.11" % "compile", + "com.fasterxml.jackson.core" % "jackson-core" % "2.13.4" % "compile", + "com.fasterxml.jackson.core" % "jackson-annotations" % "2.13.4" % "compile", + "com.fasterxml.jackson.core" % "jackson-databind" % "2.13.4.2" % "compile", + "com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % "2.9.10" % "compile", + "com.github.joschi.jackson" % "jackson-datatype-threetenbp" % "2.9.10" % "compile", + "com.github.scribejava" % "scribejava-core" % "8.0.0" % "compile", + "com.brsanthu" % "migbase64" % "2.2" % "compile", + "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", + "org.junit.jupiter" % "junit-jupiter" % "5.7.0" % "test", + "org.junit.jupiter" % "junit-jupiter-params" % "5.7.0" % "test", + "com.github.tomakehurst" % "wiremock-jre8" % "2.27.2" % "test", + "org.hamcrest" % "hamcrest" % "2.2" % "test", + "commons-io" % "commons-io" % "2.8.0" % "test", + "com.novocode" % "junit-interface" % "0.10" % "test" + ) + ) diff --git a/samples/client/echo_api/java/feign-gson/git_push.sh b/samples/client/echo_api/java/feign-gson/git_push.sh new file mode 100644 index 0000000000..f53a75d4fa --- /dev/null +++ b/samples/client/echo_api/java/feign-gson/git_push.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/samples/client/echo_api/java/feign-gson/gradle.properties b/samples/client/echo_api/java/feign-gson/gradle.properties new file mode 100644 index 0000000000..a340857827 --- /dev/null +++ b/samples/client/echo_api/java/feign-gson/gradle.properties @@ -0,0 +1,6 @@ +# This file is automatically generated by OpenAPI Generator (https://github.com/openAPITools/openapi-generator). +# To include other gradle properties as part of the code generation process, please use the `gradleProperties` option. +# +# Gradle properties reference: https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_configuration_properties +# For example, uncomment below to build for Android +#target = android diff --git a/samples/client/echo_api/java/feign-gson/gradle/wrapper/gradle-wrapper.jar b/samples/client/echo_api/java/feign-gson/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000000000000000000000000000000000000..7454180f2ae8848c63b8b4dea2cb829da983f2fa GIT binary patch literal 59536 zcma&NbC71ylI~qywr$(CZQJHswz}-9F59+k+g;UV+cs{`J?GrGXYR~=-ydruB3JCa zB64N^cILAcWk5iofq)<(fq;O7{th4@;QxID0)qN`mJ?GIqLY#rX8-|G{5M0pdVW5^ zzXk$-2kQTAC?_N@B`&6-N-rmVFE=$QD?>*=4<|!MJu@}isLc4AW#{m2if&A5T5g&~ ziuMQeS*U5sL6J698wOd)K@oK@1{peP5&Esut<#VH^u)gp`9H4)`uE!2$>RTctN+^u z=ASkePDZA-X8)rp%D;p*~P?*a_=*Kwc<^>QSH|^<0>o37lt^+Mj1;4YvJ(JR-Y+?%Nu}JAYj5 z_Qc5%Ao#F?q32i?ZaN2OSNhWL;2oDEw_({7ZbgUjna!Fqn3NzLM@-EWFPZVmc>(fZ z0&bF-Ch#p9C{YJT9Rcr3+Y_uR^At1^BxZ#eo>$PLJF3=;t_$2|t+_6gg5(j{TmjYU zK12c&lE?Eh+2u2&6Gf*IdKS&6?rYbSEKBN!rv{YCm|Rt=UlPcW9j`0o6{66#y5t9C zruFA2iKd=H%jHf%ypOkxLnO8#H}#Zt{8p!oi6)7#NqoF({t6|J^?1e*oxqng9Q2Cc zg%5Vu!em)}Yuj?kaP!D?b?(C*w!1;>R=j90+RTkyEXz+9CufZ$C^umX^+4|JYaO<5 zmIM3#dv`DGM;@F6;(t!WngZSYzHx?9&$xEF70D1BvfVj<%+b#)vz)2iLCrTeYzUcL z(OBnNoG6Le%M+@2oo)&jdOg=iCszzv59e zDRCeaX8l1hC=8LbBt|k5?CXgep=3r9BXx1uR8!p%Z|0+4Xro=xi0G!e{c4U~1j6!) zH6adq0}#l{%*1U(Cb%4AJ}VLWKBPi0MoKFaQH6x?^hQ!6em@993xdtS%_dmevzeNl z(o?YlOI=jl(`L9^ z0O+H9k$_@`6L13eTT8ci-V0ljDMD|0ifUw|Q-Hep$xYj0hTO@0%IS^TD4b4n6EKDG z??uM;MEx`s98KYN(K0>c!C3HZdZ{+_53DO%9k5W%pr6yJusQAv_;IA}925Y%;+!tY z%2k!YQmLLOr{rF~!s<3-WEUs)`ix_mSU|cNRBIWxOox_Yb7Z=~Q45ZNe*u|m^|)d* zog=i>`=bTe!|;8F+#H>EjIMcgWcG2ORD`w0WD;YZAy5#s{65~qfI6o$+Ty&-hyMyJ z3Ra~t>R!p=5ZpxA;QkDAoPi4sYOP6>LT+}{xp}tk+<0k^CKCFdNYG(Es>p0gqD)jP zWOeX5G;9(m@?GOG7g;e74i_|SmE?`B2i;sLYwRWKLy0RLW!Hx`=!LH3&k=FuCsM=9M4|GqzA)anEHfxkB z?2iK-u(DC_T1};KaUT@3nP~LEcENT^UgPvp!QC@Dw&PVAhaEYrPey{nkcn(ro|r7XUz z%#(=$7D8uP_uU-oPHhd>>^adbCSQetgSG`e$U|7mr!`|bU0aHl_cmL)na-5x1#OsVE#m*+k84Y^+UMeSAa zbrVZHU=mFwXEaGHtXQq`2ZtjfS!B2H{5A<3(nb-6ARVV8kEmOkx6D2x7~-6hl;*-*}2Xz;J#a8Wn;_B5=m zl3dY;%krf?i-Ok^Pal-}4F`{F@TYPTwTEhxpZK5WCpfD^UmM_iYPe}wpE!Djai6_{ z*pGO=WB47#Xjb7!n2Ma)s^yeR*1rTxp`Mt4sfA+`HwZf%!7ZqGosPkw69`Ix5Ku6G z@Pa;pjzV&dn{M=QDx89t?p?d9gna*}jBly*#1!6}5K<*xDPJ{wv4& zM$17DFd~L*Te3A%yD;Dp9UGWTjRxAvMu!j^Tbc}2v~q^59d4bz zvu#!IJCy(BcWTc`;v$9tH;J%oiSJ_i7s;2`JXZF+qd4C)vY!hyCtl)sJIC{ebI*0> z@x>;EzyBv>AI-~{D6l6{ST=em*U( z(r$nuXY-#CCi^8Z2#v#UXOt`dbYN1z5jzNF2 z411?w)whZrfA20;nl&C1Gi+gk<`JSm+{|*2o<< zqM#@z_D`Cn|0H^9$|Tah)0M_X4c37|KQ*PmoT@%xHc3L1ZY6(p(sNXHa&49Frzto& zR`c~ClHpE~4Z=uKa5S(-?M8EJ$zt0&fJk~p$M#fGN1-y$7!37hld`Uw>Urri(DxLa;=#rK0g4J)pXMC zxzraOVw1+kNWpi#P=6(qxf`zSdUC?D$i`8ZI@F>k6k zz21?d+dw7b&i*>Kv5L(LH-?J%@WnqT7j#qZ9B>|Zl+=> z^U-pV@1y_ptHo4hl^cPRWewbLQ#g6XYQ@EkiP z;(=SU!yhjHp%1&MsU`FV1Z_#K1&(|5n(7IHbx&gG28HNT)*~-BQi372@|->2Aw5It z0CBpUcMA*QvsPy)#lr!lIdCi@1k4V2m!NH)%Px(vu-r(Q)HYc!p zJ^$|)j^E#q#QOgcb^pd74^JUi7fUmMiNP_o*lvx*q%_odv49Dsv$NV;6J z9GOXKomA{2Pb{w}&+yHtH?IkJJu~}Z?{Uk++2mB8zyvh*xhHKE``99>y#TdD z&(MH^^JHf;g(Tbb^&8P*;_i*2&fS$7${3WJtV7K&&(MBV2~)2KB3%cWg#1!VE~k#C z!;A;?p$s{ihyojEZz+$I1)L}&G~ml=udD9qh>Tu(ylv)?YcJT3ihapi!zgPtWb*CP zlLLJSRCj-^w?@;RU9aL2zDZY1`I3d<&OMuW=c3$o0#STpv_p3b9Wtbql>w^bBi~u4 z3D8KyF?YE?=HcKk!xcp@Cigvzy=lnFgc^9c%(^F22BWYNAYRSho@~*~S)4%AhEttv zvq>7X!!EWKG?mOd9&n>vvH1p4VzE?HCuxT-u+F&mnsfDI^}*-d00-KAauEaXqg3k@ zy#)MGX!X;&3&0s}F3q40ZmVM$(H3CLfpdL?hB6nVqMxX)q=1b}o_PG%r~hZ4gUfSp zOH4qlEOW4OMUc)_m)fMR_rl^pCfXc{$fQbI*E&mV77}kRF z&{<06AJyJ!e863o-V>FA1a9Eemx6>^F$~9ppt()ZbPGfg_NdRXBWoZnDy2;#ODgf! zgl?iOcF7Meo|{AF>KDwTgYrJLb$L2%%BEtO>T$C?|9bAB&}s;gI?lY#^tttY&hfr# zKhC+&b-rpg_?~uVK%S@mQleU#_xCsvIPK*<`E0fHE1&!J7!xD#IB|SSPW6-PyuqGn3^M^Rz%WT{e?OI^svARX&SAdU77V(C~ zM$H{Kg59op{<|8ry9ecfP%=kFm(-!W&?U0@<%z*+!*<e0XesMxRFu9QnGqun6R_%T+B%&9Dtk?*d$Q zb~>84jEAPi@&F@3wAa^Lzc(AJz5gsfZ7J53;@D<;Klpl?sK&u@gie`~vTsbOE~Cd4 z%kr56mI|#b(Jk&;p6plVwmNB0H@0SmgdmjIn5Ne@)}7Vty(yb2t3ev@22AE^s!KaN zyQ>j+F3w=wnx7w@FVCRe+`vUH)3gW%_72fxzqX!S&!dchdkRiHbXW1FMrIIBwjsai8`CB2r4mAbwp%rrO>3B$Zw;9=%fXI9B{d(UzVap7u z6piC-FQ)>}VOEuPpuqznpY`hN4dGa_1Xz9rVg(;H$5Te^F0dDv*gz9JS<|>>U0J^# z6)(4ICh+N_Q`Ft0hF|3fSHs*?a=XC;e`sJaU9&d>X4l?1W=|fr!5ShD|nv$GK;j46@BV6+{oRbWfqOBRb!ir88XD*SbC(LF}I1h#6@dvK%Toe%@ zhDyG$93H8Eu&gCYddP58iF3oQH*zLbNI;rN@E{T9%A8!=v#JLxKyUe}e}BJpB{~uN zqgxRgo0*-@-iaHPV8bTOH(rS(huwK1Xg0u+e!`(Irzu@Bld&s5&bWgVc@m7;JgELd zimVs`>vQ}B_1(2#rv#N9O`fJpVfPc7V2nv34PC);Dzbb;p!6pqHzvy?2pD&1NE)?A zt(t-ucqy@wn9`^MN5apa7K|L=9>ISC>xoc#>{@e}m#YAAa1*8-RUMKwbm|;5p>T`Z zNf*ph@tnF{gmDa3uwwN(g=`Rh)4!&)^oOy@VJaK4lMT&5#YbXkl`q?<*XtsqD z9PRK6bqb)fJw0g-^a@nu`^?71k|m3RPRjt;pIkCo1{*pdqbVs-Yl>4E>3fZx3Sv44grW=*qdSoiZ9?X0wWyO4`yDHh2E!9I!ZFi zVL8|VtW38}BOJHW(Ax#KL_KQzarbuE{(%TA)AY)@tY4%A%P%SqIU~8~-Lp3qY;U-} z`h_Gel7;K1h}7$_5ZZT0&%$Lxxr-<89V&&TCsu}LL#!xpQ1O31jaa{U34~^le*Y%L za?7$>Jk^k^pS^_M&cDs}NgXlR>16AHkSK-4TRaJSh#h&p!-!vQY%f+bmn6x`4fwTp z$727L^y`~!exvmE^W&#@uY!NxJi`g!i#(++!)?iJ(1)2Wk;RN zFK&O4eTkP$Xn~4bB|q8y(btx$R#D`O@epi4ofcETrx!IM(kWNEe42Qh(8*KqfP(c0 zouBl6>Fc_zM+V;F3znbo{x#%!?mH3`_ANJ?y7ppxS@glg#S9^MXu|FM&ynpz3o&Qh z2ujAHLF3($pH}0jXQsa#?t--TnF1P73b?4`KeJ9^qK-USHE)4!IYgMn-7z|=ALF5SNGkrtPG@Y~niUQV2?g$vzJN3nZ{7;HZHzWAeQ;5P|@Tl3YHpyznGG4-f4=XflwSJY+58-+wf?~Fg@1p1wkzuu-RF3j2JX37SQUc? zQ4v%`V8z9ZVZVqS8h|@@RpD?n0W<=hk=3Cf8R?d^9YK&e9ZybFY%jdnA)PeHvtBe- zhMLD+SSteHBq*q)d6x{)s1UrsO!byyLS$58WK;sqip$Mk{l)Y(_6hEIBsIjCr5t>( z7CdKUrJTrW%qZ#1z^n*Lb8#VdfzPw~OIL76aC+Rhr<~;4Tl!sw?Rj6hXj4XWa#6Tp z@)kJ~qOV)^Rh*-?aG>ic2*NlC2M7&LUzc9RT6WM%Cpe78`iAowe!>(T0jo&ivn8-7 zs{Qa@cGy$rE-3AY0V(l8wjI^uB8Lchj@?L}fYal^>T9z;8juH@?rG&g-t+R2dVDBe zq!K%{e-rT5jX19`(bP23LUN4+_zh2KD~EAYzhpEO3MUG8@}uBHH@4J zd`>_(K4q&>*k82(dDuC)X6JuPrBBubOg7qZ{?x!r@{%0);*`h*^F|%o?&1wX?Wr4b z1~&cy#PUuES{C#xJ84!z<1tp9sfrR(i%Tu^jnXy;4`Xk;AQCdFC@?V%|; zySdC7qS|uQRcH}EFZH%mMB~7gi}a0utE}ZE_}8PQH8f;H%PN41Cb9R%w5Oi5el^fd z$n{3SqLCnrF##x?4sa^r!O$7NX!}&}V;0ZGQ&K&i%6$3C_dR%I7%gdQ;KT6YZiQrW zk%q<74oVBV>@}CvJ4Wj!d^?#Zwq(b$E1ze4$99DuNg?6t9H}k_|D7KWD7i0-g*EO7 z;5{hSIYE4DMOK3H%|f5Edx+S0VI0Yw!tsaRS2&Il2)ea^8R5TG72BrJue|f_{2UHa z@w;^c|K3da#$TB0P3;MPlF7RuQeXT$ zS<<|C0OF(k)>fr&wOB=gP8!Qm>F41u;3esv7_0l%QHt(~+n; zf!G6%hp;Gfa9L9=AceiZs~tK+Tf*Wof=4!u{nIO90jH@iS0l+#%8=~%ASzFv7zqSB^?!@N7)kp0t&tCGLmzXSRMRyxCmCYUD2!B`? zhs$4%KO~m=VFk3Buv9osha{v+mAEq=ik3RdK@;WWTV_g&-$U4IM{1IhGX{pAu%Z&H zFfwCpUsX%RKg);B@7OUzZ{Hn{q6Vv!3#8fAg!P$IEx<0vAx;GU%}0{VIsmFBPq_mb zpe^BChDK>sc-WLKl<6 zwbW|e&d&dv9Wu0goueyu>(JyPx1mz0v4E?cJjFuKF71Q1)AL8jHO$!fYT3(;U3Re* zPPOe%*O+@JYt1bW`!W_1!mN&=w3G9ru1XsmwfS~BJ))PhD(+_J_^N6j)sx5VwbWK| zwRyC?W<`pOCY)b#AS?rluxuuGf-AJ=D!M36l{ua?@SJ5>e!IBr3CXIxWw5xUZ@Xrw z_R@%?{>d%Ld4p}nEsiA@v*nc6Ah!MUs?GA7e5Q5lPpp0@`%5xY$C;{%rz24$;vR#* zBP=a{)K#CwIY%p} zXVdxTQ^HS@O&~eIftU+Qt^~(DGxrdi3k}DdT^I7Iy5SMOp$QuD8s;+93YQ!OY{eB24%xY7ml@|M7I(Nb@K_-?F;2?et|CKkuZK_>+>Lvg!>JE~wN`BI|_h6$qi!P)+K-1Hh(1;a`os z55)4Q{oJiA(lQM#;w#Ta%T0jDNXIPM_bgESMCDEg6rM33anEr}=|Fn6)|jBP6Y}u{ zv9@%7*#RI9;fv;Yii5CI+KrRdr0DKh=L>)eO4q$1zmcSmglsV`*N(x=&Wx`*v!!hn6X-l0 zP_m;X??O(skcj+oS$cIdKhfT%ABAzz3w^la-Ucw?yBPEC+=Pe_vU8nd-HV5YX6X8r zZih&j^eLU=%*;VzhUyoLF;#8QsEfmByk+Y~caBqSvQaaWf2a{JKB9B>V&r?l^rXaC z8)6AdR@Qy_BxQrE2Fk?ewD!SwLuMj@&d_n5RZFf7=>O>hzVE*seW3U?_p|R^CfoY`?|#x9)-*yjv#lo&zP=uI`M?J zbzC<^3x7GfXA4{FZ72{PE*-mNHyy59Q;kYG@BB~NhTd6pm2Oj=_ zizmD?MKVRkT^KmXuhsk?eRQllPo2Ubk=uCKiZ&u3Xjj~<(!M94c)Tez@9M1Gfs5JV z->@II)CDJOXTtPrQudNjE}Eltbjq>6KiwAwqvAKd^|g!exgLG3;wP+#mZYr`cy3#39e653d=jrR-ulW|h#ddHu(m9mFoW~2yE zz5?dB%6vF}+`-&-W8vy^OCxm3_{02royjvmwjlp+eQDzFVEUiyO#gLv%QdDSI#3W* z?3!lL8clTaNo-DVJw@ynq?q!%6hTQi35&^>P85G$TqNt78%9_sSJt2RThO|JzM$iL zg|wjxdMC2|Icc5rX*qPL(coL!u>-xxz-rFiC!6hD1IR%|HSRsV3>Kq~&vJ=s3M5y8SG%YBQ|{^l#LGlg!D?E>2yR*eV%9m$_J6VGQ~AIh&P$_aFbh zULr0Z$QE!QpkP=aAeR4ny<#3Fwyw@rZf4?Ewq`;mCVv}xaz+3ni+}a=k~P+yaWt^L z@w67!DqVf7D%7XtXX5xBW;Co|HvQ8WR1k?r2cZD%U;2$bsM%u8{JUJ5Z0k= zZJARv^vFkmWx15CB=rb=D4${+#DVqy5$C%bf`!T0+epLJLnh1jwCdb*zuCL}eEFvE z{rO1%gxg>1!W(I!owu*mJZ0@6FM(?C+d*CeceZRW_4id*D9p5nzMY&{mWqrJomjIZ z97ZNnZ3_%Hx8dn;H>p8m7F#^2;T%yZ3H;a&N7tm=Lvs&lgJLW{V1@h&6Vy~!+Ffbb zv(n3+v)_D$}dqd!2>Y2B)#<+o}LH#%ogGi2-?xRIH)1!SD)u-L65B&bsJTC=LiaF+YOCif2dUX6uAA|#+vNR z>U+KQekVGon)Yi<93(d!(yw1h3&X0N(PxN2{%vn}cnV?rYw z$N^}_o!XUB!mckL`yO1rnUaI4wrOeQ(+&k?2mi47hzxSD`N#-byqd1IhEoh!PGq>t z_MRy{5B0eKY>;Ao3z$RUU7U+i?iX^&r739F)itdrTpAi-NN0=?^m%?{A9Ly2pVv>Lqs6moTP?T2-AHqFD-o_ znVr|7OAS#AEH}h8SRPQ@NGG47dO}l=t07__+iK8nHw^(AHx&Wb<%jPc$$jl6_p(b$ z)!pi(0fQodCHfM)KMEMUR&UID>}m^(!{C^U7sBDOA)$VThRCI0_+2=( zV8mMq0R(#z;C|7$m>$>`tX+T|xGt(+Y48@ZYu#z;0pCgYgmMVbFb!$?%yhZqP_nhn zy4<#3P1oQ#2b51NU1mGnHP$cf0j-YOgAA}A$QoL6JVLcmExs(kU{4z;PBHJD%_=0F z>+sQV`mzijSIT7xn%PiDKHOujX;n|M&qr1T@rOxTdxtZ!&u&3HHFLYD5$RLQ=heur zb>+AFokUVQeJy-#LP*^)spt{mb@Mqe=A~-4p0b+Bt|pZ+@CY+%x}9f}izU5;4&QFE zO1bhg&A4uC1)Zb67kuowWY4xbo&J=%yoXlFB)&$d*-}kjBu|w!^zbD1YPc0-#XTJr z)pm2RDy%J3jlqSMq|o%xGS$bPwn4AqitC6&e?pqWcjWPt{3I{>CBy;hg0Umh#c;hU3RhCUX=8aR>rmd` z7Orw(5tcM{|-^J?ZAA9KP|)X6n9$-kvr#j5YDecTM6n z&07(nD^qb8hpF0B^z^pQ*%5ePYkv&FabrlI61ntiVp!!C8y^}|<2xgAd#FY=8b*y( zuQOuvy2`Ii^`VBNJB&R!0{hABYX55ooCAJSSevl4RPqEGb)iy_0H}v@vFwFzD%>#I>)3PsouQ+_Kkbqy*kKdHdfkN7NBcq%V{x^fSxgXpg7$bF& zj!6AQbDY(1u#1_A#1UO9AxiZaCVN2F0wGXdY*g@x$ByvUA?ePdide0dmr#}udE%K| z3*k}Vv2Ew2u1FXBaVA6aerI36R&rzEZeDDCl5!t0J=ug6kuNZzH>3i_VN`%BsaVB3 zQYw|Xub_SGf{)F{$ZX5`Jc!X!;eybjP+o$I{Z^Hsj@D=E{MnnL+TbC@HEU2DjG{3-LDGIbq()U87x4eS;JXnSh;lRlJ z>EL3D>wHt-+wTjQF$fGyDO$>d+(fq@bPpLBS~xA~R=3JPbS{tzN(u~m#Po!?H;IYv zE;?8%^vle|%#oux(Lj!YzBKv+Fd}*Ur-dCBoX*t{KeNM*n~ZPYJ4NNKkI^MFbz9!v z4(Bvm*Kc!-$%VFEewYJKz-CQN{`2}KX4*CeJEs+Q(!kI%hN1!1P6iOq?ovz}X0IOi z)YfWpwW@pK08^69#wSyCZkX9?uZD?C^@rw^Y?gLS_xmFKkooyx$*^5#cPqntNTtSG zlP>XLMj2!VF^0k#ole7`-c~*~+_T5ls?x4)ah(j8vo_ zwb%S8qoaZqY0-$ZI+ViIA_1~~rAH7K_+yFS{0rT@eQtTAdz#8E5VpwnW!zJ_^{Utv zlW5Iar3V5t&H4D6A=>?mq;G92;1cg9a2sf;gY9pJDVKn$DYdQlvfXq}zz8#LyPGq@ z+`YUMD;^-6w&r-82JL7mA8&M~Pj@aK!m{0+^v<|t%APYf7`}jGEhdYLqsHW-Le9TL z_hZZ1gbrz7$f9^fAzVIP30^KIz!!#+DRLL+qMszvI_BpOSmjtl$hh;&UeM{ER@INV zcI}VbiVTPoN|iSna@=7XkP&-4#06C};8ajbxJ4Gcq8(vWv4*&X8bM^T$mBk75Q92j z1v&%a;OSKc8EIrodmIiw$lOES2hzGDcjjB`kEDfJe{r}yE6`eZL zEB`9u>Cl0IsQ+t}`-cx}{6jqcANucqIB>Qmga_&<+80E2Q|VHHQ$YlAt{6`Qu`HA3 z03s0-sSlwbvgi&_R8s={6<~M^pGvBNjKOa>tWenzS8s zR>L7R5aZ=mSU{f?ib4Grx$AeFvtO5N|D>9#)ChH#Fny2maHWHOf2G=#<9Myot#+4u zWVa6d^Vseq_0=#AYS(-m$Lp;*8nC_6jXIjEM`omUmtH@QDs3|G)i4j*#_?#UYVZvJ z?YjT-?!4Q{BNun;dKBWLEw2C-VeAz`%?A>p;)PL}TAZn5j~HK>v1W&anteARlE+~+ zj>c(F;?qO3pXBb|#OZdQnm<4xWmn~;DR5SDMxt0UK_F^&eD|KZ=O;tO3vy4@4h^;2 zUL~-z`-P1aOe?|ZC1BgVsL)2^J-&vIFI%q@40w0{jjEfeVl)i9(~bt2z#2Vm)p`V_ z1;6$Ae7=YXk#=Qkd24Y23t&GvRxaOoad~NbJ+6pxqzJ>FY#Td7@`N5xp!n(c!=RE& z&<<@^a$_Ys8jqz4|5Nk#FY$~|FPC0`*a5HH!|Gssa9=~66&xG9)|=pOOJ2KE5|YrR zw!w6K2aC=J$t?L-;}5hn6mHd%hC;p8P|Dgh6D>hGnXPgi;6r+eA=?f72y9(Cf_ho{ zH6#)uD&R=73^$$NE;5piWX2bzR67fQ)`b=85o0eOLGI4c-Tb@-KNi2pz=Ke@SDcPn za$AxXib84`!Sf;Z3B@TSo`Dz7GM5Kf(@PR>Ghzi=BBxK8wRp>YQoXm+iL>H*Jo9M3 z6w&E?BC8AFTFT&Tv8zf+m9<&S&%dIaZ)Aoqkak_$r-2{$d~0g2oLETx9Y`eOAf14QXEQw3tJne;fdzl@wV#TFXSLXM2428F-Q}t+n2g%vPRMUzYPvzQ9f# zu(liiJem9P*?0%V@RwA7F53r~|I!Ty)<*AsMX3J{_4&}{6pT%Tpw>)^|DJ)>gpS~1rNEh z0$D?uO8mG?H;2BwM5a*26^7YO$XjUm40XmBsb63MoR;bJh63J;OngS5sSI+o2HA;W zdZV#8pDpC9Oez&L8loZO)MClRz!_!WD&QRtQxnazhT%Vj6Wl4G11nUk8*vSeVab@N#oJ}`KyJv+8Mo@T1-pqZ1t|?cnaVOd;1(h9 z!$DrN=jcGsVYE-0-n?oCJ^4x)F}E;UaD-LZUIzcD?W^ficqJWM%QLy6QikrM1aKZC zi{?;oKwq^Vsr|&`i{jIphA8S6G4)$KGvpULjH%9u(Dq247;R#l&I0{IhcC|oBF*Al zvLo7Xte=C{aIt*otJD}BUq)|_pdR>{zBMT< z(^1RpZv*l*m*OV^8>9&asGBo8h*_4q*)-eCv*|Pq=XNGrZE)^(SF7^{QE_~4VDB(o zVcPA_!G+2CAtLbl+`=Q~9iW`4ZRLku!uB?;tWqVjB0lEOf}2RD7dJ=BExy=<9wkb- z9&7{XFA%n#JsHYN8t5d~=T~5DcW4$B%3M+nNvC2`0!#@sckqlzo5;hhGi(D9=*A4` z5ynobawSPRtWn&CDLEs3Xf`(8^zDP=NdF~F^s&={l7(aw&EG}KWpMjtmz7j_VLO;@ zM2NVLDxZ@GIv7*gzl1 zjq78tv*8#WSY`}Su0&C;2F$Ze(q>F(@Wm^Gw!)(j;dk9Ad{STaxn)IV9FZhm*n+U} zi;4y*3v%A`_c7a__DJ8D1b@dl0Std3F||4Wtvi)fCcBRh!X9$1x!_VzUh>*S5s!oq z;qd{J_r79EL2wIeiGAqFstWtkfIJpjVh%zFo*=55B9Zq~y0=^iqHWfQl@O!Ak;(o*m!pZqe9 z%U2oDOhR)BvW8&F70L;2TpkzIutIvNQaTjjs5V#8mV4!NQ}zN=i`i@WI1z0eN-iCS z;vL-Wxc^Vc_qK<5RPh(}*8dLT{~GzE{w2o$2kMFaEl&q zP{V=>&3kW7tWaK-Exy{~`v4J0U#OZBk{a9{&)&QG18L@6=bsZ1zC_d{{pKZ-Ey>I> z;8H0t4bwyQqgu4hmO`3|4K{R*5>qnQ&gOfdy?z`XD%e5+pTDzUt3`k^u~SaL&XMe= z9*h#kT(*Q9jO#w2Hd|Mr-%DV8i_1{J1MU~XJ3!WUplhXDYBpJH><0OU`**nIvPIof z|N8@I=wA)sf45SAvx||f?Z5uB$kz1qL3Ky_{%RPdP5iN-D2!p5scq}buuC00C@jom zhfGKm3|f?Z0iQ|K$Z~!`8{nmAS1r+fp6r#YDOS8V*;K&Gs7Lc&f^$RC66O|)28oh`NHy&vq zJh+hAw8+ybTB0@VhWN^0iiTnLsCWbS_y`^gs!LX!Lw{yE``!UVzrV24tP8o;I6-65 z1MUiHw^{bB15tmrVT*7-#sj6cs~z`wk52YQJ*TG{SE;KTm#Hf#a~|<(|ImHH17nNM z`Ub{+J3dMD!)mzC8b(2tZtokKW5pAwHa?NFiso~# z1*iaNh4lQ4TS)|@G)H4dZV@l*Vd;Rw;-;odDhW2&lJ%m@jz+Panv7LQm~2Js6rOW3 z0_&2cW^b^MYW3)@o;neZ<{B4c#m48dAl$GCc=$>ErDe|?y@z`$uq3xd(%aAsX)D%l z>y*SQ%My`yDP*zof|3@_w#cjaW_YW4BdA;#Glg1RQcJGY*CJ9`H{@|D+*e~*457kd z73p<%fB^PV!Ybw@)Dr%(ZJbX}xmCStCYv#K3O32ej{$9IzM^I{6FJ8!(=azt7RWf4 z7ib0UOPqN40X!wOnFOoddd8`!_IN~9O)#HRTyjfc#&MCZ zZAMzOVB=;qwt8gV?{Y2?b=iSZG~RF~uyx18K)IDFLl})G1v@$(s{O4@RJ%OTJyF+Cpcx4jmy|F3euCnMK!P2WTDu5j z{{gD$=M*pH!GGzL%P)V2*ROm>!$Y=z|D`!_yY6e7SU$~a5q8?hZGgaYqaiLnkK%?0 zs#oI%;zOxF@g*@(V4p!$7dS1rOr6GVs6uYCTt2h)eB4?(&w8{#o)s#%gN@BBosRUe z)@P@8_Zm89pr~)b>e{tbPC~&_MR--iB{=)y;INU5#)@Gix-YpgP<-c2Ms{9zuCX|3 z!p(?VaXww&(w&uBHzoT%!A2=3HAP>SDxcljrego7rY|%hxy3XlODWffO_%g|l+7Y_ zqV(xbu)s4lV=l7M;f>vJl{`6qBm>#ZeMA}kXb97Z)?R97EkoI?x6Lp0yu1Z>PS?2{ z0QQ(8D)|lc9CO3B~e(pQM&5(1y&y=e>C^X$`)_&XuaI!IgDTVqt31wX#n+@!a_A0ZQkA zCJ2@M_4Gb5MfCrm5UPggeyh)8 zO9?`B0J#rkoCx(R0I!ko_2?iO@|oRf1;3r+i)w-2&j?=;NVIdPFsB)`|IC0zk6r9c zRrkfxWsiJ(#8QndNJj@{@WP2Ackr|r1VxV{7S&rSU(^)-M8gV>@UzOLXu9K<{6e{T zXJ6b92r$!|lwjhmgqkdswY&}c)KW4A)-ac%sU;2^fvq7gfUW4Bw$b!i@duy1CAxSn z(pyh$^Z=&O-q<{bZUP+$U}=*#M9uVc>CQVgDs4swy5&8RAHZ~$)hrTF4W zPsSa~qYv_0mJnF89RnnJTH`3}w4?~epFl=D(35$ zWa07ON$`OMBOHgCmfO(9RFc<)?$x)N}Jd2A(<*Ll7+4jrRt9w zwGxExUXd9VB#I|DwfxvJ;HZ8Q{37^wDhaZ%O!oO(HpcqfLH%#a#!~;Jl7F5>EX_=8 z{()l2NqPz>La3qJR;_v+wlK>GsHl;uRA8%j`A|yH@k5r%55S9{*Cp%uw6t`qc1!*T za2OeqtQj7sAp#Q~=5Fs&aCR9v>5V+s&RdNvo&H~6FJOjvaj--2sYYBvMq;55%z8^o z|BJDA4vzfow#DO#ZQHh;Oq_{r+qP{R9ox2TOgwQiv7Ow!zjN+A@BN;0tA2lUb#+zO z(^b89eV)D7UVE+h{mcNc6&GtpOqDn_?VAQ)Vob$hlFwW%xh>D#wml{t&Ofmm_d_+; zKDxzdr}`n2Rw`DtyIjrG)eD0vut$}dJAZ0AohZ+ZQdWXn_Z@dI_y=7t3q8x#pDI-K z2VVc&EGq445Rq-j0=U=Zx`oBaBjsefY;%)Co>J3v4l8V(T8H?49_@;K6q#r~Wwppc z4XW0(4k}cP=5ex>-Xt3oATZ~bBWKv)aw|I|Lx=9C1s~&b77idz({&q3T(Y(KbWO?+ zmcZ6?WeUsGk6>km*~234YC+2e6Zxdl~<_g2J|IE`GH%n<%PRv-50; zH{tnVts*S5*_RxFT9eM0z-pksIb^drUq4>QSww=u;UFCv2AhOuXE*V4z?MM`|ABOC4P;OfhS(M{1|c%QZ=!%rQTDFx`+}?Kdx$&FU?Y<$x;j7z=(;Lyz+?EE>ov!8vvMtSzG!nMie zsBa9t8as#2nH}n8xzN%W%U$#MHNXmDUVr@GX{?(=yI=4vks|V)!-W5jHsU|h_&+kY zS_8^kd3jlYqOoiI`ZqBVY!(UfnAGny!FowZWY_@YR0z!nG7m{{)4OS$q&YDyw6vC$ zm4!$h>*|!2LbMbxS+VM6&DIrL*X4DeMO!@#EzMVfr)e4Tagn~AQHIU8?e61TuhcKD zr!F4(kEebk(Wdk-?4oXM(rJwanS>Jc%<>R(siF+>+5*CqJLecP_we33iTFTXr6W^G z7M?LPC-qFHK;E!fxCP)`8rkxZyFk{EV;G-|kwf4b$c1k0atD?85+|4V%YATWMG|?K zLyLrws36p%Qz6{}>7b>)$pe>mR+=IWuGrX{3ZPZXF3plvuv5Huax86}KX*lbPVr}L z{C#lDjdDeHr~?l|)Vp_}T|%$qF&q#U;ClHEPVuS+Jg~NjC1RP=17=aQKGOcJ6B3mp z8?4*-fAD~}sX*=E6!}^u8)+m2j<&FSW%pYr_d|p_{28DZ#Cz0@NF=gC-o$MY?8Ca8 zr5Y8DSR^*urS~rhpX^05r30Ik#2>*dIOGxRm0#0YX@YQ%Mg5b6dXlS!4{7O_kdaW8PFSdj1=ryI-=5$fiieGK{LZ+SX(1b=MNL!q#lN zv98?fqqTUH8r8C7v(cx#BQ5P9W>- zmW93;eH6T`vuJ~rqtIBg%A6>q>gnWb3X!r0wh_q;211+Om&?nvYzL1hhtjB zK_7G3!n7PL>d!kj){HQE zE8(%J%dWLh1_k%gVXTZt zEdT09XSKAx27Ncaq|(vzL3gm83q>6CAw<$fTnMU05*xAe&rDfCiu`u^1)CD<>sx0i z*hr^N_TeN89G(nunZoLBf^81#pmM}>JgD@Nn1l*lN#a=B=9pN%tmvYFjFIoKe_(GF z-26x{(KXdfsQL7Uv6UtDuYwV`;8V3w>oT_I<`Ccz3QqK9tYT5ZQzbop{=I=!pMOCb zCU68`n?^DT%^&m>A%+-~#lvF!7`L7a{z<3JqIlk1$<||_J}vW1U9Y&eX<}l8##6i( zZcTT@2`9(Mecptm@{3A_Y(X`w9K0EwtPq~O!16bq{7c0f7#(3wn-^)h zxV&M~iiF!{-6A@>o;$RzQ5A50kxXYj!tcgme=Qjrbje~;5X2xryU;vH|6bE(8z^<7 zQ>BG7_c*JG8~K7Oe68i#0~C$v?-t@~@r3t2inUnLT(c=URpA9kA8uq9PKU(Ps(LVH zqgcqW>Gm?6oV#AldDPKVRcEyQIdTT`Qa1j~vS{<;SwyTdr&3*t?J)y=M7q*CzucZ&B0M=joT zBbj@*SY;o2^_h*>R0e({!QHF0=)0hOj^B^d*m>SnRrwq>MolNSgl^~r8GR#mDWGYEIJA8B<|{{j?-7p zVnV$zancW3&JVDtVpIlI|5djKq0(w$KxEFzEiiL=h5Jw~4Le23@s(mYyXWL9SX6Ot zmb)sZaly_P%BeX_9 zw&{yBef8tFm+%=--m*J|o~+Xg3N+$IH)t)=fqD+|fEk4AAZ&!wcN5=mi~Vvo^i`}> z#_3ahR}Ju)(Px7kev#JGcSwPXJ2id9%Qd2A#Uc@t8~egZ8;iC{e! z%=CGJOD1}j!HW_sgbi_8suYnn4#Ou}%9u)dXd3huFIb!ytlX>Denx@pCS-Nj$`VO&j@(z!kKSP0hE4;YIP#w9ta=3DO$7f*x zc9M4&NK%IrVmZAe=r@skWD`AEWH=g+r|*13Ss$+{c_R!b?>?UaGXlw*8qDmY#xlR= z<0XFbs2t?8i^G~m?b|!Hal^ZjRjt<@a? z%({Gn14b4-a|#uY^=@iiKH+k?~~wTj5K1A&hU z2^9-HTC)7zpoWK|$JXaBL6C z#qSNYtY>65T@Zs&-0cHeu|RX(Pxz6vTITdzJdYippF zC-EB+n4}#lM7`2Ry~SO>FxhKboIAF#Z{1wqxaCb{#yEFhLuX;Rx(Lz%T`Xo1+a2M}7D+@wol2)OJs$TwtRNJ={( zD@#zTUEE}#Fz#&(EoD|SV#bayvr&E0vzmb%H?o~46|FAcx?r4$N z&67W3mdip-T1RIxwSm_&(%U|+WvtGBj*}t69XVd&ebn>KOuL(7Y8cV?THd-(+9>G7*Nt%T zcH;`p={`SOjaf7hNd(=37Lz3-51;58JffzIPgGs_7xIOsB5p2t&@v1mKS$2D$*GQ6 zM(IR*j4{nri7NMK9xlDy-hJW6sW|ZiDRaFiayj%;(%51DN!ZCCCXz+0Vm#};70nOx zJ#yA0P3p^1DED;jGdPbQWo0WATN=&2(QybbVdhd=Vq*liDk`c7iZ?*AKEYC#SY&2g z&Q(Ci)MJ{mEat$ZdSwTjf6h~roanYh2?9j$CF@4hjj_f35kTKuGHvIs9}Re@iKMxS-OI*`0S z6s)fOtz}O$T?PLFVSeOjSO26$@u`e<>k(OSP!&YstH3ANh>)mzmKGNOwOawq-MPXe zy4xbeUAl6tamnx))-`Gi2uV5>9n(73yS)Ukma4*7fI8PaEwa)dWHs6QA6>$}7?(L8 ztN8M}?{Tf!Zu22J5?2@95&rQ|F7=FK-hihT-vDp!5JCcWrVogEnp;CHenAZ)+E+K5 z$Cffk5sNwD_?4+ymgcHR(5xgt20Z8M`2*;MzOM#>yhk{r3x=EyM226wb&!+j`W<%* zSc&|`8!>dn9D@!pYow~(DsY_naSx7(Z4i>cu#hA5=;IuI88}7f%)bRkuY2B;+9Uep zpXcvFWkJ!mQai63BgNXG26$5kyhZ2&*3Q_tk)Ii4M>@p~_~q_cE!|^A;_MHB;7s#9 zKzMzK{lIxotjc};k67^Xsl-gS!^*m*m6kn|sbdun`O?dUkJ{0cmI0-_2y=lTAfn*Y zKg*A-2sJq)CCJgY0LF-VQvl&6HIXZyxo2#!O&6fOhbHXC?%1cMc6y^*dOS{f$=137Ds1m01qs`>iUQ49JijsaQ( zksqV9@&?il$|4Ua%4!O15>Zy&%gBY&wgqB>XA3!EldQ%1CRSM(pp#k~-pkcCg4LAT zXE=puHbgsw)!xtc@P4r~Z}nTF=D2~j(6D%gTBw$(`Fc=OOQ0kiW$_RDd=hcO0t97h zb86S5r=>(@VGy1&#S$Kg_H@7G^;8Ue)X5Y+IWUi`o;mpvoV)`fcVk4FpcT|;EG!;? zHG^zrVVZOm>1KFaHlaogcWj(v!S)O(Aa|Vo?S|P z5|6b{qkH(USa*Z7-y_Uvty_Z1|B{rTS^qmEMLEYUSk03_Fg&!O3BMo{b^*`3SHvl0 zhnLTe^_vVIdcSHe)SQE}r~2dq)VZJ!aSKR?RS<(9lzkYo&dQ?mubnWmgMM37Nudwo z3Vz@R{=m2gENUE3V4NbIzAA$H1z0pagz94-PTJyX{b$yndsdKptmlKQKaaHj@3=ED zc7L?p@%ui|RegVYutK$64q4pe9+5sv34QUpo)u{1ci?)_7gXQd{PL>b0l(LI#rJmN zGuO+%GO`xneFOOr4EU(Wg}_%bhzUf;d@TU+V*2#}!2OLwg~%D;1FAu=Un>OgjPb3S z7l(riiCwgghC=Lm5hWGf5NdGp#01xQ59`HJcLXbUR3&n%P(+W2q$h2Qd z*6+-QXJ*&Kvk9ht0f0*rO_|FMBALen{j7T1l%=Q>gf#kma zQlg#I9+HB+z*5BMxdesMND`_W;q5|FaEURFk|~&{@qY32N$G$2B=&Po{=!)x5b!#n zxLzblkq{yj05#O7(GRuT39(06FJlalyv<#K4m}+vs>9@q-&31@1(QBv82{}Zkns~K ze{eHC_RDX0#^A*JQTwF`a=IkE6Ze@j#-8Q`tTT?k9`^ZhA~3eCZJ-Jr{~7Cx;H4A3 zcZ+Zj{mzFZbVvQ6U~n>$U2ZotGsERZ@}VKrgGh0xM;Jzt29%TX6_&CWzg+YYMozrM z`nutuS)_0dCM8UVaKRj804J4i%z2BA_8A4OJRQ$N(P9Mfn-gF;4#q788C@9XR0O3< zsoS4wIoyt046d+LnSCJOy@B@Uz*#GGd#+Ln1ek5Dv>(ZtD@tgZlPnZZJGBLr^JK+!$$?A_fA3LOrkoDRH&l7 zcMcD$Hsjko3`-{bn)jPL6E9Ds{WskMrivsUu5apD z?grQO@W7i5+%X&E&p|RBaEZ(sGLR@~(y^BI@lDMot^Ll?!`90KT!JXUhYS`ZgX3jnu@Ja^seA*M5R@f`=`ynQV4rc$uT1mvE?@tz)TN<=&H1%Z?5yjxcpO+6y_R z6EPuPKM5uxKpmZfT(WKjRRNHs@ib)F5WAP7QCADvmCSD#hPz$V10wiD&{NXyEwx5S z6NE`3z!IS^$s7m}PCwQutVQ#~w+V z=+~->DI*bR2j0^@dMr9`p>q^Ny~NrAVxrJtX2DUveic5vM%#N*XO|?YAWwNI$Q)_) zvE|L(L1jP@F%gOGtnlXtIv2&1i8q<)Xfz8O3G^Ea~e*HJsQgBxWL(yuLY+jqUK zRE~`-zklrGog(X}$9@ZVUw!8*=l`6mzYLtsg`AvBYz(cxmAhr^j0~(rzXdiOEeu_p zE$sf2(w(BPAvO5DlaN&uQ$4@p-b?fRs}d7&2UQ4Fh?1Hzu*YVjcndqJLw0#q@fR4u zJCJ}>_7-|QbvOfylj+e^_L`5Ep9gqd>XI3-O?Wp z-gt*P29f$Tx(mtS`0d05nHH=gm~Po_^OxxUwV294BDKT>PHVlC5bndncxGR!n(OOm znsNt@Q&N{TLrmsoKFw0&_M9$&+C24`sIXGWgQaz=kY;S{?w`z^Q0JXXBKFLj0w0U6P*+jPKyZHX9F#b0D1$&(- zrm8PJd?+SrVf^JlfTM^qGDK&-p2Kdfg?f>^%>1n8bu&byH(huaocL>l@f%c*QkX2i znl}VZ4R1en4S&Bcqw?$=Zi7ohqB$Jw9x`aM#>pHc0x z0$!q7iFu zZ`tryM70qBI6JWWTF9EjgG@>6SRzsd}3h+4D8d~@CR07P$LJ}MFsYi-*O%XVvD@yT|rJ+Mk zDllJ7$n0V&A!0flbOf)HE6P_afPWZmbhpliqJuw=-h+r;WGk|ntkWN(8tKlYpq5Ow z(@%s>IN8nHRaYb*^d;M(D$zGCv5C|uqmsDjwy4g=Lz>*OhO3z=)VD}C<65;`89Ye} zSCxrv#ILzIpEx1KdLPlM&%Cctf@FqTKvNPXC&`*H9=l=D3r!GLM?UV zOxa(8ZsB`&+76S-_xuj?G#wXBfDY@Z_tMpXJS7^mp z@YX&u0jYw2A+Z+bD#6sgVK5ZgdPSJV3>{K^4~%HV?rn~4D)*2H!67Y>0aOmzup`{D zzDp3c9yEbGCY$U<8biJ_gB*`jluz1ShUd!QUIQJ$*1;MXCMApJ^m*Fiv88RZ zFopLViw}{$Tyhh_{MLGIE2~sZ)t0VvoW%=8qKZ>h=adTe3QM$&$PO2lfqH@brt!9j ziePM8$!CgE9iz6B<6_wyTQj?qYa;eC^{x_0wuwV~W+^fZmFco-o%wsKSnjXFEx02V zF5C2t)T6Gw$Kf^_c;Ei3G~uC8SM-xyycmXyC2hAVi-IfXqhu$$-C=*|X?R0~hu z8`J6TdgflslhrmDZq1f?GXF7*ALeMmOEpRDg(s*H`4>_NAr`2uqF;k;JQ+8>A|_6ZNsNLECC%NNEb1Y1dP zbIEmNpK)#XagtL4R6BC{C5T(+=yA-(Z|Ap}U-AfZM#gwVpus3(gPn}Q$CExObJ5AC z)ff9Yk?wZ}dZ-^)?cbb9Fw#EjqQ8jxF4G3=L?Ra zg_)0QDMV1y^A^>HRI$x?Op@t;oj&H@1xt4SZ9(kifQ zb59B*`M99Td7@aZ3UWvj1rD0sE)d=BsBuW*KwkCds7ay(7*01_+L}b~7)VHI>F_!{ zyxg-&nCO?v#KOUec0{OOKy+sjWA;8rTE|Lv6I9H?CI?H(mUm8VXGwU$49LGpz&{nQp2}dinE1@lZ1iox6{ghN&v^GZv9J${7WaXj)<0S4g_uiJ&JCZ zr8-hsu`U%N;+9N^@&Q0^kVPB3)wY(rr}p7{p0qFHb3NUUHJb672+wRZs`gd1UjKPX z4o6zljKKA+Kkj?H>Ew63o%QjyBk&1!P22;MkD>sM0=z_s-G{mTixJCT9@_|*(p^bz zJ8?ZZ&;pzV+7#6Mn`_U-)k8Pjg?a;|Oe^us^PoPY$Va~yi8|?+&=y$f+lABT<*pZr zP}D{~Pq1Qyni+@|aP;ixO~mbEW9#c0OU#YbDZIaw=_&$K%Ep2f%hO^&P67hApZe`x zv8b`Mz@?M_7-)b!lkQKk)JXXUuT|B8kJlvqRmRpxtQDgvrHMXC1B$M@Y%Me!BSx3P z#2Eawl$HleZhhTS6Txm>lN_+I`>eV$&v9fOg)%zVn3O5mI*lAl>QcHuW6!Kixmq`X zBCZ*Ck6OYtDiK!N47>jxI&O2a9x7M|i^IagRr-fmrmikEQGgw%J7bO|)*$2FW95O4 zeBs>KR)izRG1gRVL;F*sr8A}aRHO0gc$$j&ds8CIO1=Gwq1%_~E)CWNn9pCtBE}+`Jelk4{>S)M)`Ll=!~gnn1yq^EX(+y*ik@3Ou0qU`IgYi3*doM+5&dU!cho$pZ zn%lhKeZkS72P?Cf68<#kll_6OAO26bIbueZx**j6o;I0cS^XiL`y+>{cD}gd%lux} z)3N>MaE24WBZ}s0ApfdM;5J_Ny}rfUyxfkC``Awo2#sgLnGPewK};dORuT?@I6(5~ z?kE)Qh$L&fwJXzK){iYx!l5$Tt|^D~MkGZPA}(o6f7w~O2G6Vvzdo*a;iXzk$B66$ zwF#;wM7A+(;uFG4+UAY(2`*3XXx|V$K8AYu#ECJYSl@S=uZW$ksfC$~qrrbQj4??z-)uz0QL}>k^?fPnJTPw% zGz)~?B4}u0CzOf@l^um}HZzbaIwPmb<)< zi_3@E9lc)Qe2_`*Z^HH;1CXOceL=CHpHS{HySy3T%<^NrWQ}G0i4e1xm_K3(+~oi$ zoHl9wzb?Z4j#90DtURtjtgvi7uw8DzHYmtPb;?%8vb9n@bszT=1qr)V_>R%s!92_` zfnHQPANx z<#hIjIMm#*(v*!OXtF+w8kLu`o?VZ5k7{`vw{Yc^qYclpUGIM_PBN1+c{#Vxv&E*@ zxg=W2W~JuV{IuRYw3>LSI1)a!thID@R=bU+cU@DbR^_SXY`MC7HOsCN z!dO4OKV7(E_Z8T#8MA1H`99?Z!r0)qKW_#|29X3#Jb+5+>qUidbeP1NJ@)(qi2S-X zao|f0_tl(O+$R|Qwd$H{_ig|~I1fbp_$NkI!0E;Y z6JrnU{1Ra6^on{9gUUB0mwzP3S%B#h0fjo>JvV~#+X0P~JV=IG=yHG$O+p5O3NUgG zEQ}z6BTp^Fie)Sg<){Z&I8NwPR(=mO4joTLHkJ>|Tnk23E(Bo`FSbPc05lF2-+)X? z6vV3*m~IBHTy*^E!<0nA(tCOJW2G4DsH7)BxLV8kICn5lu6@U*R`w)o9;Ro$i8=Q^V%uH8n3q=+Yf;SFRZu z!+F&PKcH#8cG?aSK_Tl@K9P#8o+jry@gdexz&d(Q=47<7nw@e@FFfIRNL9^)1i@;A z28+$Z#rjv-wj#heI|<&J_DiJ*s}xd-f!{J8jfqOHE`TiHHZVIA8CjkNQ_u;Ery^^t zl1I75&u^`1_q)crO+JT4rx|z2ToSC>)Or@-D zy3S>jW*sNIZR-EBsfyaJ+Jq4BQE4?SePtD2+jY8*%FsSLZ9MY>+wk?}}}AFAw)vr{ml)8LUG-y9>^t!{~|sgpxYc0Gnkg`&~R z-pilJZjr@y5$>B=VMdZ73svct%##v%wdX~9fz6i3Q-zOKJ9wso+h?VME7}SjL=!NUG{J?M&i!>ma`eoEa@IX`5G>B1(7;%}M*%-# zfhJ(W{y;>MRz!Ic8=S}VaBKqh;~7KdnGEHxcL$kA-6E~=!hrN*zw9N+_=odt<$_H_8dbo;0=42wcAETPCVGUr~v(`Uai zb{=D!Qc!dOEU6v)2eHSZq%5iqK?B(JlCq%T6av$Cb4Rko6onlG&?CqaX7Y_C_cOC3 zYZ;_oI(}=>_07}Oep&Ws7x7-R)cc8zfe!SYxJYP``pi$FDS)4Fvw5HH=FiU6xfVqIM!hJ;Rx8c0cB7~aPtNH(Nmm5Vh{ibAoU#J6 zImRCr?(iyu_4W_6AWo3*vxTPUw@vPwy@E0`(>1Qi=%>5eSIrp^`` zK*Y?fK_6F1W>-7UsB)RPC4>>Ps9)f+^MqM}8AUm@tZ->j%&h1M8s*s!LX5&WxQcAh z8mciQej@RPm?660%>{_D+7er>%zX_{s|$Z+;G7_sfNfBgY(zLB4Ey}J9F>zX#K0f6 z?dVNIeEh?EIShmP6>M+d|0wMM85Sa4diw1hrg|ITJ}JDg@o8y>(rF9mXk5M z2@D|NA)-7>wD&wF;S_$KS=eE84`BGw3g0?6wGxu8ys4rwI?9U=*^VF22t3%mbGeOh z`!O-OpF7#Vceu~F`${bW0nYVU9ecmk31V{tF%iv&5hWofC>I~cqAt@u6|R+|HLMMX zVxuSlMFOK_EQ86#E8&KwxIr8S9tj_goWtLv4f@!&h8;Ov41{J~496vp9vX=(LK#j! zAwi*21RAV-LD>9Cw3bV_9X(X3)Kr0-UaB*7Y>t82EQ%!)(&(XuAYtTsYy-dz+w=$ir)VJpe!_$ z6SGpX^i(af3{o=VlFPC);|J8#(=_8#vdxDe|Cok+ANhYwbE*FO`Su2m1~w+&9<_9~ z-|tTU_ACGN`~CNW5WYYBn^B#SwZ(t4%3aPp z;o)|L6Rk569KGxFLUPx@!6OOa+5OjQLK5w&nAmwxkC5rZ|m&HT8G%GVZxB_@ME z>>{rnXUqyiJrT(8GMj_ap#yN_!9-lO5e8mR3cJiK3NE{_UM&=*vIU`YkiL$1%kf+1 z4=jk@7EEj`u(jy$HnzE33ZVW_J4bj}K;vT?T91YlO(|Y0FU4r+VdbmQ97%(J5 zkK*Bed8+C}FcZ@HIgdCMioV%A<*4pw_n}l*{Cr4}a(lq|injK#O?$tyvyE`S%(1`H z_wwRvk#13ElkZvij2MFGOj`fhy?nC^8`Zyo%yVcUAfEr8x&J#A{|moUBAV_^f$hpaUuyQeY3da^ zS9iRgf87YBwfe}>BO+T&Fl%rfpZh#+AM?Dq-k$Bq`vG6G_b4z%Kbd&v>qFjow*mBl z-OylnqOpLg}or7_VNwRg2za3VBK6FUfFX{|TD z`Wt0Vm2H$vdlRWYQJqDmM?JUbVqL*ZQY|5&sY*?!&%P8qhA~5+Af<{MaGo(dl&C5t zE%t!J0 zh6jqANt4ABdPxSTrVV}fLsRQal*)l&_*rFq(Ez}ClEH6LHv{J#v?+H-BZ2)Wy{K@9 z+ovXHq~DiDvm>O~r$LJo!cOuwL+Oa--6;UFE2q@g3N8Qkw5E>ytz^(&($!O47+i~$ zKM+tkAd-RbmP{s_rh+ugTD;lriL~`Xwkad#;_aM?nQ7L_muEFI}U_4$phjvYgleK~`Fo`;GiC07&Hq1F<%p;9Q;tv5b?*QnR%8DYJH3P>Svmv47Y>*LPZJy8_{9H`g6kQpyZU{oJ`m%&p~D=K#KpfoJ@ zn-3cqmHsdtN!f?~w+(t+I`*7GQA#EQC^lUA9(i6=i1PqSAc|ha91I%X&nXzjYaM{8$s&wEx@aVkQ6M{E2 zfzId#&r(XwUNtPcq4Ngze^+XaJA1EK-%&C9j>^9(secqe{}z>hR5CFNveMsVA)m#S zk)_%SidkY-XmMWlVnQ(mNJ>)ooszQ#vaK;!rPmGKXV7am^_F!Lz>;~{VrIO$;!#30XRhE1QqO_~#+Ux;B_D{Nk=grn z8Y0oR^4RqtcYM)7a%@B(XdbZCOqnX#fD{BQTeLvRHd(irHKq=4*jq34`6@VAQR8WG z^%)@5CXnD_T#f%@-l${>y$tfb>2LPmc{~5A82|16mH)R?&r#KKLs7xpN-D`=&Cm^R zvMA6#Ahr<3X>Q7|-qfTY)}32HkAz$_mibYV!I)u>bmjK`qwBe(>za^0Kt*HnFbSdO z1>+ryKCNxmm^)*$XfiDOF2|{-v3KKB?&!(S_Y=Ht@|ir^hLd978xuI&N{k>?(*f8H z=ClxVJK_%_z1TH0eUwm2J+2To7FK4o+n_na)&#VLn1m;!+CX+~WC+qg1?PA~KdOlC zW)C@pw75_xoe=w7i|r9KGIvQ$+3K?L{7TGHwrQM{dCp=Z*D}3kX7E-@sZnup!BImw z*T#a=+WcTwL78exTgBn|iNE3#EsOorO z*kt)gDzHiPt07fmisA2LWN?AymkdqTgr?=loT7z@d`wnlr6oN}@o|&JX!yPzC*Y8d zu6kWlTzE1)ckyBn+0Y^HMN+GA$wUO_LN6W>mxCo!0?oiQvT`z$jbSEu&{UHRU0E8# z%B^wOc@S!yhMT49Y)ww(Xta^8pmPCe@eI5C*ed96)AX9<>))nKx0(sci8gwob_1}4 z0DIL&vsJ1_s%<@y%U*-eX z5rN&(zef-5G~?@r79oZGW1d!WaTqQn0F6RIOa9tJ=0(kdd{d1{<*tHT#cCvl*i>YY zH+L7jq8xZNcTUBqj(S)ztTU!TM!RQ}In*n&Gn<>(60G7}4%WQL!o>hbJqNDSGwl#H z`4k+twp0cj%PsS+NKaxslAEu9!#U3xT1|_KB6`h=PI0SW`P9GTa7caD1}vKEglV8# zjKZR`pluCW19c2fM&ZG)c3T3Um;ir3y(tSCJ7Agl6|b524dy5El{^EQBG?E61H0XY z`bqg!;zhGhyMFl&(o=JWEJ8n~z)xI}A@C0d2hQGvw7nGv)?POU@(kS1m=%`|+^ika zXl8zjS?xqW$WlO?Ewa;vF~XbybHBor$f<%I&*t$F5fynwZlTGj|IjZtVfGa7l&tK} zW>I<69w(cZLu)QIVG|M2xzW@S+70NinQzk&Y0+3WT*cC)rx~04O-^<{JohU_&HL5XdUKW!uFy|i$FB|EMu0eUyW;gsf`XfIc!Z0V zeK&*hPL}f_cX=@iv>K%S5kL;cl_$v?n(Q9f_cChk8Lq$glT|=e+T*8O4H2n<=NGmn z+2*h+v;kBvF>}&0RDS>)B{1!_*XuE8A$Y=G8w^qGMtfudDBsD5>T5SB;Qo}fSkkiV ze^K^M(UthkwrD!&*tTsu>Dacdj_q`~V%r_twr$(Ct&_dKeeXE?fA&4&yASJWJ*}~- zel=@W)tusynfC_YqH4ll>4Eg`Xjs5F7Tj>tTLz<0N3)X<1px_d2yUY>X~y>>93*$) z5PuNMQLf9Bu?AAGO~a_|J2akO1M*@VYN^VxvP0F$2>;Zb9;d5Yfd8P%oFCCoZE$ z4#N$^J8rxYjUE_6{T%Y>MmWfHgScpuGv59#4u6fpTF%~KB^Ae`t1TD_^Ud#DhL+Dm zbY^VAM#MrAmFj{3-BpVSWph2b_Y6gCnCAombVa|1S@DU)2r9W<> zT5L8BB^er3zxKt1v(y&OYk!^aoQisqU zH(g@_o)D~BufUXcPt!Ydom)e|aW{XiMnes2z&rE?og>7|G+tp7&^;q?Qz5S5^yd$i z8lWr4g5nctBHtigX%0%XzIAB8U|T6&JsC4&^hZBw^*aIcuNO47de?|pGXJ4t}BB`L^d8tD`H`i zqrP8?#J@8T#;{^B!KO6J=@OWKhAerih(phML`(Rg7N1XWf1TN>=Z3Do{l_!d~DND&)O)D>ta20}@Lt77qSnVsA7>)uZAaT9bsB>u&aUQl+7GiY2|dAEg@%Al3i316y;&IhQL^8fw_nwS>f60M_-m+!5)S_6EPM7Y)(Nq^8gL7(3 zOiot`6Wy6%vw~a_H?1hLVzIT^i1;HedHgW9-P#)}Y6vF%C=P70X0Tk^z9Te@kPILI z_(gk!k+0%CG)%!WnBjjw*kAKs_lf#=5HXC00s-}oM-Q1aXYLj)(1d!_a7 z*Gg4Fe6F$*ujVjI|79Z5+Pr`us%zW@ln++2l+0hsngv<{mJ%?OfSo_3HJXOCys{Ug z00*YR-(fv<=&%Q!j%b-_ppA$JsTm^_L4x`$k{VpfLI(FMCap%LFAyq;#ns5bR7V+x zO!o;c5y~DyBPqdVQX)8G^G&jWkBy2|oWTw>)?5u}SAsI$RjT#)lTV&Rf8;>u*qXnb z8F%Xb=7#$m)83z%`E;49)t3fHInhtc#kx4wSLLms!*~Z$V?bTyUGiS&m>1P(952(H zuHdv=;o*{;5#X-uAyon`hP}d#U{uDlV?W?_5UjJvf%11hKwe&(&9_~{W)*y1nR5f_ z!N(R74nNK`y8>B!0Bt_Vr!;nc3W>~RiKtGSBkNlsR#-t^&;$W#)f9tTlZz>n*+Fjz z3zXZ;jf(sTM(oDzJt4FJS*8c&;PLTW(IQDFs_5QPy+7yhi1syPCarvqrHFcf&yTy)^O<1EBx;Ir`5W{TIM>{8w&PB>ro4;YD<5LF^TjTb0!zAP|QijA+1Vg>{Afv^% zmrkc4o6rvBI;Q8rj4*=AZacy*n8B{&G3VJc)so4$XUoie0)vr;qzPZVbb<#Fc=j+8CGBWe$n|3K& z_@%?{l|TzKSlUEO{U{{%Fz_pVDxs7i9H#bnbCw7@4DR=}r_qV!Zo~CvD4ZI*+j3kO zW6_=|S`)(*gM0Z;;}nj`73OigF4p6_NPZQ-Od~e$c_);;4-7sR>+2u$6m$Gf%T{aq zle>e3(*Rt(TPD}03n5)!Ca8Pu!V}m6v0o1;5<1h$*|7z|^(3$Y&;KHKTT}hV056wuF0Xo@mK-52~r=6^SI1NC%c~CC?n>yX6wPTgiWYVz!Sx^atLby9YNn1Rk{g?|pJaxD4|9cUf|V1_I*w zzxK)hRh9%zOl=*$?XUjly5z8?jPMy%vEN)f%T*|WO|bp5NWv@B(K3D6LMl!-6dQg0 zXNE&O>Oyf%K@`ngCvbGPR>HRg5!1IV$_}m@3dWB7x3t&KFyOJn9pxRXCAzFr&%37wXG;z^xaO$ekR=LJG ztIHpY8F5xBP{mtQidqNRoz= z@){+N3(VO5bD+VrmS^YjG@+JO{EOIW)9=F4v_$Ed8rZtHvjpiEp{r^c4F6Ic#ChlC zJX^DtSK+v(YdCW)^EFcs=XP7S>Y!4=xgmv>{S$~@h=xW-G4FF9?I@zYN$e5oF9g$# zb!eVU#J+NjLyX;yb)%SY)xJdvGhsnE*JEkuOVo^k5PyS=o#vq!KD46UTW_%R=Y&0G zFj6bV{`Y6)YoKgqnir2&+sl+i6foAn-**Zd1{_;Zb7Ki=u394C5J{l^H@XN`_6XTKY%X1AgQM6KycJ+= zYO=&t#5oSKB^pYhNdzPgH~aEGW2=ec1O#s-KG z71}LOg@4UEFtp3GY1PBemXpNs6UK-ax*)#$J^pC_me;Z$Je(OqLoh|ZrW*mAMBFn< zHttjwC&fkVfMnQeen8`Rvy^$pNRFVaiEN4Pih*Y3@jo!T0nsClN)pdrr9AYLcZxZ| zJ5Wlj+4q~($hbtuY zVQ7hl>4-+@6g1i`1a)rvtp-;b0>^`Dloy(#{z~ytgv=j4q^Kl}wD>K_Y!l~ zp(_&7sh`vfO(1*MO!B%<6E_bx1)&s+Ae`O)a|X=J9y~XDa@UB`m)`tSG4AUhoM=5& znWoHlA-(z@3n0=l{E)R-p8sB9XkV zZ#D8wietfHL?J5X0%&fGg@MH~(rNS2`GHS4xTo7L$>TPme+Is~!|79=^}QbPF>m%J zFMkGzSndiPO|E~hrhCeo@&Ea{M(ieIgRWMf)E}qeTxT8Q#g-!Lu*x$v8W^M^>?-g= zwMJ$dThI|~M06rG$Sv@C@tWR>_YgaG&!BAbkGggVQa#KdtDB)lMLNVLN|51C@F^y8 zCRvMB^{GO@j=cHfmy}_pCGbP%xb{pNN>? z?7tBz$1^zVaP|uaatYaIN+#xEN4jBzwZ|YI_)p(4CUAz1ZEbDk>J~Y|63SZaak~#0 zoYKruYsWHoOlC1(MhTnsdUOwQfz5p6-D0}4;DO$B;7#M{3lSE^jnTT;ns`>!G%i*F?@pR1JO{QTuD0U+~SlZxcc8~>IB{)@8p`P&+nDxNj`*gh|u?yrv$phpQcW)Us)bi`kT%qLj(fi{dWRZ%Es2!=3mI~UxiW0$-v3vUl?#g{p6eF zMEUAqo5-L0Ar(s{VlR9g=j7+lt!gP!UN2ICMokAZ5(Agd>})#gkA2w|5+<%-CuEP# zqgcM}u@3(QIC^Gx<2dbLj?cFSws_f3e%f4jeR?4M^M3cx1f+Qr6ydQ>n)kz1s##2w zk}UyQc+Z5G-d-1}{WzjkLXgS-2P7auWSJ%pSnD|Uivj5u!xk0 z_^-N9r9o;(rFDt~q1PvE#iJZ_f>J3gcP$)SOqhE~pD2|$=GvpL^d!r z6u=sp-CrMoF7;)}Zd7XO4XihC4ji?>V&(t^?@3Q&t9Mx=qex6C9d%{FE6dvU6%d94 zIE;hJ1J)cCqjv?F``7I*6bc#X)JW2b4f$L^>j{*$R`%5VHFi*+Q$2;nyieduE}qdS{L8y8F08yLs?w}{>8>$3236T-VMh@B zq-nujsb_1aUv_7g#)*rf9h%sFj*^mIcImRV*k~Vmw;%;YH(&ylYpy!&UjUVqqtfG` zox3esju?`unJJA_zKXRJP)rA3nXc$m^{S&-p|v|-0x9LHJm;XIww7C#R$?00l&Yyj z=e}gKUOpsImwW?N)+E(awoF@HyP^EhL+GlNB#k?R<2>95hz!h9sF@U20DHSB3~WMa zk90+858r@-+vWwkawJ)8ougd(i#1m3GLN{iSTylYz$brAsP%=&m$mQQrH$g%3-^VR zE%B`Vi&m8f3T~&myTEK28BDWCVzfWir1I?03;pX))|kY5ClO^+bae z*7E?g=3g7EiisYOrE+lA)2?Ln6q2*HLNpZEWMB|O-JI_oaHZB%CvYB(%=tU= zE*OY%QY58fW#RG5=gm0NR#iMB=EuNF@)%oZJ}nmm=tsJ?eGjia{e{yuU0l3{d^D@)kVDt=1PE)&tf_hHC%0MB znL|CRCPC}SeuVTdf>-QV70`0(EHizc21s^sU>y%hW0t!0&y<7}Wi-wGy>m%(-jsDj zP?mF|>p_K>liZ6ZP(w5(|9Ga%>tLgb$|doDDfkdW>Z z`)>V2XC?NJT26mL^@ zf+IKr27TfM!UbZ@?zRddC7#6ss1sw%CXJ4FWC+t3lHZupzM77m^=9 z&(a?-LxIq}*nvv)y?27lZ{j zifdl9hyJudyP2LpU$-kXctshbJDKS{WfulP5Dk~xU4Le4c#h^(YjJit4#R8_khheS z|8(>2ibaHES4+J|DBM7I#QF5u-*EdN{n=Kt@4Zt?@Tv{JZA{`4 zU#kYOv{#A&gGPwT+$Ud}AXlK3K7hYzo$(fBSFjrP{QQ zeaKg--L&jh$9N}`pu{Bs>?eDFPaWY4|9|foN%}i;3%;@4{dc+iw>m}{3rELqH21G! z`8@;w-zsJ1H(N3%|1B@#ioLOjib)j`EiJqPQVSbPSPVHCj6t5J&(NcWzBrzCiDt{4 zdlPAUKldz%6x5II1H_+jv)(xVL+a;P+-1hv_pM>gMRr%04@k;DTokASSKKhU1Qms| zrWh3a!b(J3n0>-tipg{a?UaKsP7?+|@A+1WPDiQIW1Sf@qDU~M_P65_s}7(gjTn0X zucyEm)o;f8UyshMy&>^SC3I|C6jR*R_GFwGranWZe*I>K+0k}pBuET&M~ z;Odo*ZcT?ZpduHyrf8E%IBFtv;JQ!N_m>!sV6ly$_1D{(&nO~w)G~Y`7sD3#hQk%^ zp}ucDF_$!6DAz*PM8yE(&~;%|=+h(Rn-=1Wykas_-@d&z#=S}rDf`4w(rVlcF&lF! z=1)M3YVz7orwk^BXhslJ8jR);sh^knJW(Qmm(QdSgIAIdlN4Te5KJisifjr?eB{FjAX1a0AB>d?qY4Wx>BZ8&}5K0fA+d{l8 z?^s&l8#j7pR&ijD?0b%;lL9l$P_mi2^*_OL+b}4kuLR$GAf85sOo02?Y#90}CCDiS zZ%rbCw>=H~CBO=C_JVV=xgDe%b4FaEFtuS7Q1##y686r%F6I)s-~2(}PWK|Z8M+Gu zl$y~5@#0Ka%$M<&Cv%L`a8X^@tY&T7<0|(6dNT=EsRe0%kp1Qyq!^43VAKYnr*A5~ zsI%lK1ewqO;0TpLrT9v}!@vJK{QoVa_+N4FYT#h?Y8rS1S&-G+m$FNMP?(8N`MZP zels(*?kK{{^g9DOzkuZXJ2;SrOQsp9T$hwRB1(phw1c7`!Q!by?Q#YsSM#I12RhU{$Q+{xj83axHcftEc$mNJ8_T7A-BQc*k(sZ+~NsO~xAA zxnbb%dam_fZlHvW7fKXrB~F&jS<4FD2FqY?VG?ix*r~MDXCE^WQ|W|WM;gsIA4lQP zJ2hAK@CF*3*VqPr2eeg6GzWFlICi8S>nO>5HvWzyZTE)hlkdC_>pBej*>o0EOHR|) z$?};&I4+_?wvL*g#PJ9)!bc#9BJu1(*RdNEn>#Oxta(VWeM40ola<0aOe2kSS~{^P zDJBd}0L-P#O-CzX*%+$#v;(x%<*SPgAje=F{Zh-@ucd2DA(yC|N_|ocs*|-!H%wEw z@Q!>siv2W;C^^j^59OAX03&}&D*W4EjCvfi(ygcL#~t8XGa#|NPO+*M@Y-)ctFA@I z-p7npT1#5zOLo>7q?aZpCZ=iecn3QYklP;gF0bq@>oyBq94f6C=;Csw3PkZ|5q=(c zfs`aw?II0e(h=|7o&T+hq&m$; zBrE09Twxd9BJ2P+QPN}*OdZ-JZV7%av@OM7v!!NL8R;%WFq*?{9T3{ct@2EKgc8h) zMxoM$SaF#p<`65BwIDfmXG6+OiK0e)`I=!A3E`+K@61f}0e z!2a*FOaDrOe>U`q%K!QN`&=&0C~)CaL3R4VY(NDt{Xz(Xpqru5=r#uQN1L$Je1*dkdqQ*=lofQaN%lO!<5z9ZlHgxt|`THd>2 zsWfU$9=p;yLyJyM^t zS2w9w?Bpto`@H^xJpZDKR1@~^30Il6oFGfk5%g6w*C+VM)+%R@gfIwNprOV5{F^M2 zO?n3DEzpT+EoSV-%OdvZvNF+pDd-ZVZ&d8 zKeIyrrfPN=EcFRCPEDCVflX#3-)Ik_HCkL(ejmY8vzcf-MTA{oHk!R2*36`O68$7J zf}zJC+bbQk--9Xm!u#lgLvx8TXx2J258E5^*IZ(FXMpq$2LUUvhWQPs((z1+2{Op% z?J}9k5^N=z;7ja~zi8a_-exIqWUBJwohe#4QJ`|FF*$C{lM18z^#hX6!5B8KAkLUX ziP=oti-gpV(BsLD{0(3*dw}4JxK23Y7M{BeFPucw!sHpY&l%Ws4pSm`+~V7;bZ%Dx zeI)MK=4vC&5#;2MT7fS?^ch9?2;%<8Jlu-IB&N~gg8t;6S-#C@!NU{`p7M8@2iGc& zg|JPg%@gCoCQ&s6JvDU&`X2S<57f(k8nJ1wvBu{8r?;q3_kpZZ${?|( z+^)UvR33sjSd)aT!UPkA;ylO6{aE3MQa{g%Mcf$1KONcjO@&g5zPHWtzM1rYC{_K> zgQNcs<{&X{OA=cEWw5JGqpr0O>x*Tfak2PE9?FuWtz^DDNI}rwAaT0(bdo-<+SJ6A z&}S%boGMWIS0L}=S>|-#kRX;e^sUsotry(MjE|3_9duvfc|nwF#NHuM-w7ZU!5ei8 z6Mkf>2)WunY2eU@C-Uj-A zG(z0Tz2YoBk>zCz_9-)4a>T46$(~kF+Y{#sA9MWH%5z#zNoz)sdXq7ZR_+`RZ%0(q zC7&GyS_|BGHNFl8Xa%@>iWh%Gr?=J5<(!OEjauj5jyrA-QXBjn0OAhJJ9+v=!LK`` z@g(`^*84Q4jcDL`OA&ZV60djgwG`|bcD*i50O}Q{9_noRg|~?dj%VtKOnyRs$Uzqg z191aWoR^rDX#@iSq0n z?9Sg$WSRPqSeI<}&n1T3!6%Wj@5iw5`*`Btni~G=&;J+4`7g#OQTa>u`{4ZZ(c@s$ zK0y;ySOGD-UTjREKbru{QaS>HjN<2)R%Nn-TZiQ(Twe4p@-saNa3~p{?^V9Nixz@a zykPv~<@lu6-Ng9i$Lrk(xi2Tri3q=RW`BJYOPC;S0Yly%77c727Yj-d1vF!Fuk{Xh z)lMbA69y7*5ufET>P*gXQrxsW+ zz)*MbHZv*eJPEXYE<6g6_M7N%#%mR{#awV3i^PafNv(zyI)&bH?F}2s8_rR(6%!V4SOWlup`TKAb@ee>!9JKPM=&8g#BeYRH9FpFybxBXQI2|g}FGJfJ+ zY-*2hB?o{TVL;Wt_ek;AP5PBqfDR4@Z->_182W z{P@Mc27j6jE*9xG{R$>6_;i=y{qf(c`5w9fa*`rEzX6t!KJ(p1H|>J1pC-2zqWENF zmm=Z5B4u{cY2XYl(PfrInB*~WGWik3@1oRhiMOS|D;acnf-Bs(QCm#wR;@Vf!hOPJ zgjhDCfDj$HcyVLJ=AaTbQ{@vIv14LWWF$=i-BDoC11}V;2V8A`S>_x)vIq44-VB-v z*w-d}$G+Ql?En8j!~ZkCpQ$|cA0|+rrY>tiCeWxkRGPoarxlGU2?7%k#F693RHT24 z-?JsiXlT2PTqZqNb&sSc>$d;O4V@|b6VKSWQb~bUaWn1Cf0+K%`Q&Wc<>mQ>*iEGB zbZ;aYOotBZ{vH3y<0A*L0QVM|#rf*LIsGx(O*-7)r@yyBIzJnBFSKBUSl1e|8lxU* zzFL+YDVVkIuzFWeJ8AbgN&w(4-7zbiaMn{5!JQXu)SELk*CNL+Fro|2v|YO)1l15t zs(0^&EB6DPMyaqvY>=KL>)tEpsn;N5Q#yJj<9}ImL((SqErWN3Q=;tBO~ExTCs9hB z2E$7eN#5wX4<3m^5pdjm#5o>s#eS_Q^P)tm$@SawTqF*1dj_i#)3};JslbLKHXl_N z)Fxzf>FN)EK&Rz&*|6&%Hs-^f{V|+_vL1S;-1K-l$5xiC@}%uDuwHYhmsV?YcOUlk zOYkG5v2+`+UWqpn0aaaqrD3lYdh0*!L`3FAsNKu=Q!vJu?Yc8n|CoYyDo_`r0mPoo z8>XCo$W4>l(==h?2~PoRR*kEe)&IH{1sM41mO#-36`02m#nTX{r*r`Q5rZ2-sE|nA zhnn5T#s#v`52T5|?GNS`%HgS2;R(*|^egNPDzzH_z^W)-Q98~$#YAe)cEZ%vge965AS_am#DK#pjPRr-!^za8>`kksCAUj(Xr*1NW5~e zpypt_eJpD&4_bl_y?G%>^L}=>xAaV>KR6;^aBytqpiHe%!j;&MzI_>Sx7O%F%D*8s zSN}cS^<{iiK)=Ji`FpO#^zY!_|D)qeRNAtgmH)m;qC|mq^j(|hL`7uBz+ULUj37gj zksdbnU+LSVo35riSX_4z{UX=%n&}7s0{WuZYoSfwAP`8aKN9P@%e=~1`~1ASL-z%# zw>DO&ixr}c9%4InGc*_y42bdEk)ZdG7-mTu0bD@_vGAr*NcFoMW;@r?@LUhRI zCUJgHb`O?M3!w)|CPu~ej%fddw20lod?Ufp8Dmt0PbnA0J%KE^2~AIcnKP()025V> zG>noSM3$5Btmc$GZoyP^v1@Poz0FD(6YSTH@aD0}BXva?LphAiSz9f&Y(aDAzBnUh z?d2m``~{z;{}kZJ>a^wYI?ry(V9hIoh;|EFc0*-#*`$T0DRQ1;WsqInG;YPS+I4{g zJGpKk%%Sdc5xBa$Q^_I~(F97eqDO7AN3EN0u)PNBAb+n+ zWBTxQx^;O9o0`=g+Zrt_{lP!sgWZHW?8bLYS$;1a@&7w9rD9|Ge;Gb?sEjFoF9-6v z#!2)t{DMHZ2@0W*fCx;62d#;jouz`R5Y(t{BT=$N4yr^^o$ON8d{PQ=!O zX17^CrdM~7D-;ZrC!||<+FEOxI_WI3CA<35va%4v>gc zEX-@h8esj=a4szW7x{0g$hwoWRQG$yK{@3mqd-jYiVofJE!Wok1* znV7Gm&Ssq#hFuvj1sRyHg(6PFA5U*Q8Rx>-blOs=lb`qa{zFy&n4xY;sd$fE+<3EI z##W$P9M{B3c3Si9gw^jlPU-JqD~Cye;wr=XkV7BSv#6}DrsXWFJ3eUNrc%7{=^sP> zrp)BWKA9<}^R9g!0q7yWlh;gr_TEOD|#BmGq<@IV;ueg+D2}cjpp+dPf&Q(36sFU&K8}hA85U61faW&{ zlB`9HUl-WWCG|<1XANN3JVAkRYvr5U4q6;!G*MTdSUt*Mi=z_y3B1A9j-@aK{lNvx zK%p23>M&=KTCgR!Ee8c?DAO2_R?B zkaqr6^BSP!8dHXxj%N1l+V$_%vzHjqvu7p@%Nl6;>y*S}M!B=pz=aqUV#`;h%M0rU zHfcog>kv3UZAEB*g7Er@t6CF8kHDmKTjO@rejA^ULqn!`LwrEwOVmHx^;g|5PHm#B zZ+jjWgjJ!043F+&#_;D*mz%Q60=L9Ove|$gU&~As5^uz@2-BfQ!bW)Khn}G+Wyjw- z19qI#oB(RSNydn0t~;tAmK!P-d{b-@@E5|cdgOS#!>%#Rj6ynkMvaW@37E>@hJP^8 z2zk8VXx|>#R^JCcWdBCy{0nPmYFOxN55#^-rlqobe0#L6)bi?E?SPymF*a5oDDeSd zO0gx?#KMoOd&G(2O@*W)HgX6y_aa6iMCl^~`{@UR`nMQE`>n_{_aY5nA}vqU8mt8H z`oa=g0SyiLd~BxAj2~l$zRSDHxvDs;I4>+M$W`HbJ|g&P+$!U7-PHX4RAcR0szJ*( ze-417=bO2q{492SWrqDK+L3#ChUHtz*@MP)e^%@>_&#Yk^1|tv@j4%3T)diEX zATx4K*hcO`sY$jk#jN5WD<=C3nvuVsRh||qDHnc~;Kf59zr0;c7VkVSUPD%NnnJC_ zl3F^#f_rDu8l}l8qcAz0FFa)EAt32IUy_JLIhU_J^l~FRH&6-ivSpG2PRqzDdMWft>Zc(c)#tb%wgmWN%>IOPm zZi-noqS!^Ftb81pRcQi`X#UhWK70hy4tGW1mz|+vI8c*h@ zfFGJtW3r>qV>1Z0r|L>7I3un^gcep$AAWfZHRvB|E*kktY$qQP_$YG60C@X~tTQjB3%@`uz!qxtxF+LE!+=nrS^07hn` zEgAp!h|r03h7B!$#OZW#ACD+M;-5J!W+{h|6I;5cNnE(Y863%1(oH}_FTW})8zYb$7czP zg~Szk1+_NTm6SJ0MS_|oSz%e(S~P-&SFp;!k?uFayytV$8HPwuyELSXOs^27XvK-D zOx-Dl!P|28DK6iX>p#Yb%3`A&CG0X2S43FjN%IB}q(!hC$fG}yl1y9W&W&I@KTg6@ zK^kpH8=yFuP+vI^+59|3%Zqnb5lTDAykf z9S#X`3N(X^SpdMyWQGOQRjhiwlj!0W-yD<3aEj^&X%=?`6lCy~?`&WSWt z?U~EKFcCG_RJ(Qp7j=$I%H8t)Z@6VjA#>1f@EYiS8MRHZphp zMA_5`znM=pzUpBPO)pXGYpQ6gkine{6u_o!P@Q+NKJ}k!_X7u|qfpAyIJb$_#3@wJ z<1SE2Edkfk9C!0t%}8Yio09^F`YGzpaJHGk*-ffsn85@)%4@`;Fv^8q(-Wk7r=Q8p zT&hD`5(f?M{gfzGbbwh8(}G#|#fDuk7v1W)5H9wkorE0ZZjL0Q1=NRGY>zwgfm81DdoaVwNH;or{{eSyybt)m<=zXoA^RALYG-2t zouH|L*BLvmm9cdMmn+KGopyR@4*=&0&4g|FLoreZOhRmh=)R0bg~ zT2(8V_q7~42-zvb)+y959OAv!V$u(O3)%Es0M@CRFmG{5sovIq4%8Ahjk#*5w{+)+ zMWQoJI_r$HxL5km1#6(e@{lK3Udc~n0@g`g$s?VrnQJ$!oPnb?IHh-1qA`Rz$)Ai< z6w$-MJW-gKNvOhL+XMbE7&mFt`x1KY>k4(!KbbpZ`>`K@1J<(#vVbjx@Z@(6Q}MF# zMnbr-f55(cTa^q4+#)=s+ThMaV~E`B8V=|W_fZWDwiso8tNMTNse)RNBGi=gVwgg% zbOg8>mbRN%7^Um-7oj4=6`$|(K7!+t^90a{$18Z>}<#!bm%ZEFQ{X(yBZMc>lCz0f1I2w9Sq zuGh<9<=AO&g6BZte6hn>Qmvv;Rt)*cJfTr2=~EnGD8P$v3R|&1RCl&7)b+`=QGapi zPbLg_pxm`+HZurtFZ;wZ=`Vk*do~$wB zxoW&=j0OTbQ=Q%S8XJ%~qoa3Ea|au5o}_(P;=!y-AjFrERh%8la!z6Fn@lR?^E~H12D?8#ht=1F;7@o4$Q8GDj;sSC%Jfn01xgL&%F2 zwG1|5ikb^qHv&9hT8w83+yv&BQXOQyMVJSBL(Ky~p)gU3#%|blG?IR9rP^zUbs7rOA0X52Ao=GRt@C&zlyjNLv-} z9?*x{y(`509qhCV*B47f2hLrGl^<@SuRGR!KwHei?!CM10Tq*YDIoBNyRuO*>3FU? zHjipIE#B~y3FSfOsMfj~F9PNr*H?0oHyYB^G(YyNh{SxcE(Y-`x5jFMKb~HO*m+R% zrq|ic4fzJ#USpTm;X7K+E%xsT_3VHKe?*uc4-FsILUH;kL>_okY(w`VU*8+l>o>Jm ziU#?2^`>arnsl#)*R&nf_%>A+qwl%o{l(u)M?DK1^mf260_oteV3#E_>6Y4!_hhVD zM8AI6MM2V*^_M^sQ0dmHu11fy^kOqXqzpr?K$`}BKWG`=Es(9&S@K@)ZjA{lj3ea7_MBP zk(|hBFRjHVMN!sNUkrB;(cTP)T97M$0Dtc&UXSec<+q?y>5=)}S~{Z@ua;1xt@=T5 zI7{`Z=z_X*no8s>mY;>BvEXK%b`a6(DTS6t&b!vf_z#HM{Uoy_5fiB(zpkF{})ruka$iX*~pq1ZxD?q68dIo zIZSVls9kFGsTwvr4{T_LidcWtt$u{kJlW7moRaH6+A5hW&;;2O#$oKyEN8kx`LmG)Wfq4ykh+q{I3|RfVpkR&QH_x;t41Uw z`P+tft^E2B$domKT@|nNW`EHwyj>&}K;eDpe z1bNOh=fvIfk`&B61+S8ND<(KC%>y&?>opCnY*r5M+!UrWKxv0_QvTlJc>X#AaI^xo zaRXL}t5Ej_Z$y*|w*$6D+A?Lw-CO-$itm^{2Ct82-<0IW)0KMNvJHgBrdsIR0v~=H z?n6^}l{D``Me90`^o|q!olsF?UX3YSq^6Vu>Ijm>>PaZI8G@<^NGw{Cx&%|PwYrfw zR!gX_%AR=L3BFsf8LxI|K^J}deh0ZdV?$3r--FEX`#INxsOG6_=!v)DI>0q|BxT)z z-G6kzA01M?rba+G_mwNMQD1mbVbNTWmBi*{s_v_Ft9m2Avg!^78(QFu&n6mbRJ2bA zv!b;%yo{g*9l2)>tsZJOOp}U~8VUH`}$ z8p_}t*XIOehezolNa-a2x0BS})Y9}&*TPgua{Ewn-=wVrmJUeU39EKx+%w%=ixQWK zDLpwaNJs65#6o7Ln7~~X+p_o2BR1g~VCfxLzxA{HlWAI6^H;`juI=&r1jQrUv_q0Z z1Ja-tjdktrrP>GOC*#p?*xfQU5MqjMsBe!9lh(u8)w$e@Z|>aUHI5o;MGw*|Myiz3 z-f0;pHg~Q#%*Kx8MxH%AluVXjG2C$)WL-K63@Q`#y9_k_+}eR(x4~dp7oV-ek0H>I zgy8p#i4GN{>#v=pFYUQT(g&b$OeTy-X_#FDgNF8XyfGY6R!>inYn8IR2RDa&O!(6< znXs{W!bkP|s_YI*Yx%4stI`=ZO45IK6rBs`g7sP40ic}GZ58s?Mc$&i`kq_tfci>N zIHrC0H+Qpam1bNa=(`SRKjixBTtm&e`j9porEci!zdlg1RI0Jw#b(_Tb@RQK1Zxr_ z%7SUeH6=TrXt3J@js`4iDD0=IoHhK~I7^W8^Rcp~Yaf>2wVe|Hh1bUpX9ATD#moByY57-f2Ef1TP^lBi&p5_s7WGG9|0T}dlfxOx zXvScJO1Cnq`c`~{Dp;{;l<-KkCDE+pmexJkd}zCgE{eF=)K``-qC~IT6GcRog_)!X z?fK^F8UDz$(zFUrwuR$qro5>qqn>+Z%<5>;_*3pZ8QM|yv9CAtrAx;($>4l^_$_-L z*&?(77!-=zvnCVW&kUcZMb6;2!83si518Y%R*A3JZ8Is|kUCMu`!vxDgaWjs7^0j( ziTaS4HhQ)ldR=r)_7vYFUr%THE}cPF{0H45FJ5MQW^+W>P+eEX2kLp3zzFe*-pFVA zdDZRybv?H|>`9f$AKVjFWJ=wegO7hOOIYCtd?Vj{EYLT*^gl35|HQ`R=ti+ADm{jyQE7K@kdjuqJhWVSks>b^ zxha88-h3s;%3_5b1TqFCPTxVjvuB5U>v=HyZ$?JSk+&I%)M7KE*wOg<)1-Iy)8-K! z^XpIt|0ibmk9RtMmlUd7#Ap3Q!q9N4atQy)TmrhrFhfx1DAN`^vq@Q_SRl|V z#lU<~n67$mT)NvHh`%als+G-)x1`Y%4Bp*6Un5Ri9h=_Db zA-AdP!f>f0m@~>7X#uBM?diI@)Egjuz@jXKvm zJo+==juc9_<;CqeRaU9_Mz@;3e=E4=6TK+c`|uu#pIqhSyNm`G(X)&)B`8q0RBv#> z`gGlw(Q=1Xmf55VHj%C#^1lpc>LY8kfA@|rlC1EA<1#`iuyNO z(=;irt{_&K=i4)^x%;U(Xv<)+o=dczC5H3W~+e|f~{*ucxj@{Yi-cw^MqYr3fN zF5D+~!wd$#al?UfMnz(@K#wn`_5na@rRr8XqN@&M&FGEC@`+OEv}sI1hw>Up0qAWf zL#e4~&oM;TVfjRE+10B_gFlLEP9?Q-dARr3xi6nQqnw>k-S;~b z;!0s2VS4}W8b&pGuK=7im+t(`nz@FnT#VD|!)eQNp-W6)@>aA+j~K*H{$G`y2|QHY z|Hmy+CR@#jWY4~)lr1qBJB_RfHJFfP<}pK5(#ZZGSqcpyS&}01LnTWk5fzmXMGHkJ zTP6L^B+uj;lmB_W<~4=${+v0>z31M!-_O@o-O9GyW)j_mjx}!0@br_LE-7SIuPP84 z;5=O(U*g_um0tyG|61N@d9lEuOeiRd+#NY^{nd5;-CVlw&Ap7J?qwM^?E29wvS}2d zbzar4Fz&RSR(-|s!Z6+za&Z zY#D<5q_JUktIzvL0)yq_kLWG6DO{ri=?c!y!f(Dk%G{8)k`Gym%j#!OgXVDD3;$&v@qy#ISJfp=Vm>pls@9-mapVQChAHHd-x+OGx)(*Yr zC1qDUTZ6mM(b_hi!TuFF2k#8uI2;kD70AQ&di$L*4P*Y-@p`jdm%_c3f)XhYD^6M8&#Y$ZpzQMcR|6nsH>b=*R_Von!$BTRj7yGCXokoAQ z&ANvx0-Epw`QIEPgI(^cS2f(Y85yV@ygI{ewyv5Frng)e}KCZF7JbR(&W618_dcEh(#+^zZFY;o<815<5sOHQdeax9_!PyM&;{P zkBa5xymca0#)c#tke@3KNEM8a_mT&1gm;p&&JlMGH(cL(b)BckgMQ^9&vRwj!~3@l zY?L5}=Jzr080OGKb|y`ee(+`flQg|!lo6>=H)X4`$Gz~hLmu2a%kYW_Uu8x09Pa0J zKZ`E$BKJ=2GPj_3l*TEcZ*uYRr<*J^#5pILTT;k_cgto1ZL-%slyc16J~OH-(RgDA z%;EjEnoUkZ&acS{Q8`{i6T5^nywgqQI5bDIymoa7CSZG|WWVk>GM9)zy*bNih|QIm z%0+(Nnc*a_xo;$=!HQYaapLms>J1ToyjtFByY`C2H1wT#178#4+|{H0BBqtCdd$L% z_3Hc60j@{t9~MjM@LBalR&6@>B;9?r<7J~F+WXyYu*y3?px*=8MAK@EA+jRX8{CG?GI-< z54?Dc9CAh>QTAvyOEm0^+x;r2BWX|{3$Y7)L5l*qVE*y0`7J>l2wCmW zL1?|a`pJ-l{fb_N;R(Z9UMiSj6pQjOvQ^%DvhIJF!+Th7jO2~1f1N+(-TyCFYQZYw z4)>7caf^Ki_KJ^Zx2JUb z&$3zJy!*+rCV4%jqwyuNY3j1ZEiltS0xTzd+=itTb;IPYpaf?8Y+RSdVdpacB(bVQ zC(JupLfFp8y43%PMj2}T|VS@%LVp>hv4Y!RPMF?pp8U_$xCJ)S zQx!69>bphNTIb9yn*_yfj{N%bY)t{L1cs8<8|!f$;UQ*}IN=2<6lA;x^(`8t?;+ST zh)z4qeYYgZkIy{$4x28O-pugO&gauRh3;lti9)9Pvw+^)0!h~%m&8Q!AKX%urEMnl z?yEz?g#ODn$UM`+Q#$Q!6|zsq_`dLO5YK-6bJM6ya>}H+vnW^h?o$z;V&wvuM$dR& zeEq;uUUh$XR`TWeC$$c&Jjau2it3#%J-y}Qm>nW*s?En?R&6w@sDXMEr#8~$=b(gk zwDC3)NtAP;M2BW_lL^5ShpK$D%@|BnD{=!Tq)o(5@z3i7Z){} zGr}Exom_qDO{kAVkZ*MbLNHE666Kina#D{&>Jy%~w7yX$oj;cYCd^p9zy z8*+wgSEcj$4{WxKmCF(5o7U4jqwEvO&dm1H#7z}%VXAbW&W24v-tS6N3}qrm1OnE)fUkoE8yMMn9S$?IswS88tQWm4#Oid#ckgr6 zRtHm!mfNl-`d>O*1~d7%;~n+{Rph6BBy^95zqI{K((E!iFQ+h*C3EsbxNo_aRm5gj zKYug($r*Q#W9`p%Bf{bi6;IY0v`pB^^qu)gbg9QHQ7 zWBj(a1YSu)~2RK8Pi#C>{DMlrqFb9e_RehEHyI{n?e3vL_}L>kYJC z_ly$$)zFi*SFyNrnOt(B*7E$??s67EO%DgoZL2XNk8iVx~X_)o++4oaK1M|ou73vA0K^503j@uuVmLcHH4ya-kOIDfM%5%(E z+Xpt~#7y2!KB&)PoyCA+$~DXqxPxxALy!g-O?<9+9KTk4Pgq4AIdUkl`1<1#j^cJg zgU3`0hkHj_jxV>`Y~%LAZl^3o0}`Sm@iw7kwff{M%VwtN)|~!p{AsfA6vB5UolF~d zHWS%*uBDt<9y!9v2Xe|au&1j&iR1HXCdyCjxSgG*L{wmTD4(NQ=mFjpa~xooc6kju z`~+d{j7$h-;HAB04H!Zscu^hZffL#9!p$)9>sRI|Yovm)g@F>ZnosF2EgkU3ln0bR zTA}|+E(tt)!SG)-bEJi_0m{l+(cAz^pi}`9=~n?y&;2eG;d9{M6nj>BHGn(KA2n|O zt}$=FPq!j`p&kQ8>cirSzkU0c08%8{^Qyqi-w2LoO8)^E7;;I1;HQ6B$u0nNaX2CY zSmfi)F`m94zL8>#zu;8|{aBui@RzRKBlP1&mfFxEC@%cjl?NBs`cr^nm){>;$g?rhKr$AO&6qV_Wbn^}5tfFBry^e1`%du2~o zs$~dN;S_#%iwwA_QvmMjh%Qo?0?rR~6liyN5Xmej8(*V9ym*T`xAhHih-v$7U}8=dfXi2i*aAB!xM(Xekg*ix@r|ymDw*{*s0?dlVys2e)z62u1 z+k3esbJE=-P5S$&KdFp+2H7_2e=}OKDrf( z9-207?6$@f4m4B+9E*e((Y89!q?zH|mz_vM>kp*HGXldO0Hg#!EtFhRuOm$u8e~a9 z5(roy7m$Kh+zjW6@zw{&20u?1f2uP&boD}$#Zy)4o&T;vyBoqFiF2t;*g=|1=)PxB z8eM3Mp=l_obbc?I^xyLz?4Y1YDWPa+nm;O<$Cn;@ane616`J9OO2r=rZr{I_Kizyc zP#^^WCdIEp*()rRT+*YZK>V@^Zs=ht32x>Kwe zab)@ZEffz;VM4{XA6e421^h~`ji5r%)B{wZu#hD}f3$y@L0JV9f3g{-RK!A?vBUA}${YF(vO4)@`6f1 z-A|}e#LN{)(eXloDnX4Vs7eH|<@{r#LodP@Nz--$Dg_Par%DCpu2>2jUnqy~|J?eZ zBG4FVsz_A+ibdwv>mLp>P!(t}E>$JGaK$R~;fb{O3($y1ssQQo|5M;^JqC?7qe|hg zu0ZOqeFcp?qVn&Qu7FQJ4hcFi&|nR!*j)MF#b}QO^lN%5)4p*D^H+B){n8%VPUzi! zDihoGcP71a6!ab`l^hK&*dYrVYzJ0)#}xVrp!e;lI!+x+bfCN0KXwUAPU9@#l7@0& QuEJmfE|#`Dqx|px0L@K;Y5)KL literal 0 HcmV?d00001 diff --git a/samples/client/echo_api/java/feign-gson/gradle/wrapper/gradle-wrapper.properties b/samples/client/echo_api/java/feign-gson/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000000..ffed3a254e --- /dev/null +++ b/samples/client/echo_api/java/feign-gson/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/samples/client/echo_api/java/feign-gson/gradlew b/samples/client/echo_api/java/feign-gson/gradlew new file mode 100644 index 0000000000..005bcde042 --- /dev/null +++ b/samples/client/echo_api/java/feign-gson/gradlew @@ -0,0 +1,234 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit + +APP_NAME="Gradle" +APP_BASE_NAME=${0##*/} + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='-Dfile.encoding=UTF-8 "-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/samples/client/echo_api/java/feign-gson/gradlew.bat b/samples/client/echo_api/java/feign-gson/gradlew.bat new file mode 100644 index 0000000000..6a68175eb7 --- /dev/null +++ b/samples/client/echo_api/java/feign-gson/gradlew.bat @@ -0,0 +1,89 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS=-Dfile.encoding=UTF-8 "-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/samples/client/echo_api/java/feign-gson/pom.xml b/samples/client/echo_api/java/feign-gson/pom.xml new file mode 100644 index 0000000000..4a36787dd0 --- /dev/null +++ b/samples/client/echo_api/java/feign-gson/pom.xml @@ -0,0 +1,320 @@ + + 4.0.0 + org.openapitools + echo-api-feign-json + jar + echo-api-feign-json + 0.1.0 + https://github.com/openapitools/openapi-generator + OpenAPI Java + + scm:git:git@github.com:openapitools/openapi-generator.git + scm:git:git@github.com:openapitools/openapi-generator.git + https://github.com/openapitools/openapi-generator + + + + + Unlicense + http://www.apache.org/licenses/LICENSE-2.0.html + repo + + + + + + OpenAPI-Generator Contributors + team@openapitools.org + OpenAPITools.org + http://openapitools.org + + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.0.0-M1 + + + enforce-maven + + enforce + + + + + 2.2.0 + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.0.0-M4 + + + + loggerPath + conf/log4j.properties + + + -Xms512m -Xmx1500m + methods + 10 + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory}/lib + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 2.2 + + + + jar + test-jar + + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 1.10 + + + add_sources + generate-sources + + add-source + + + + src/main/java + + + + + add_test_sources + generate-test-sources + + add-test-source + + + + src/test/java + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + 1.8 + 1.8 + true + 128m + 512m + + -Xlint:all + -J-Xss4m + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.3.2 + + none + 1.8 + + + + attach-javadocs + + jar + + + + + + org.apache.maven.plugins + maven-source-plugin + 2.2.1 + + + attach-sources + + jar-no-fork + + + + + + + + + + sign-artifacts + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.5 + + + sign-artifacts + verify + + sign + + + + + + + + + + + + + + com.google.code.findbugs + jsr305 + 3.0.2 + + + + + io.github.openfeign + feign-core + ${feign-version} + + + io.github.openfeign + feign-gson + ${feign-version} + + + io.github.openfeign + feign-slf4j + ${feign-version} + + + io.github.openfeign.form + feign-form + ${feign-form-version} + + + io.github.openfeign + feign-okhttp + ${feign-version} + + + + com.google.code.gson + gson + ${gson-version} + + + org.openapitools + jackson-databind-nullable + ${jackson-databind-nullable-version} + + + com.github.scribejava + scribejava-core + ${scribejava-version} + + + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} + provided + + + + + ch.qos.logback + logback-classic + 1.2.10 + test + + + org.junit.jupiter + junit-jupiter + ${junit-version} + test + + + org.junit.jupiter + junit-jupiter-params + ${junit-version} + test + + + org.hamcrest + hamcrest + 2.2 + test + + + com.github.tomakehurst + wiremock-jre8 + 2.27.2 + test + + + commons-io + commons-io + 2.8.0 + test + + + + UTF-8 + 1.8 + ${java.version} + ${java.version} + 1.6.6 + 10.11 + 3.8.0 + 2.8.6 + 0.2.4 + 2.13.4.2 + 1.3.5 + 5.7.0 + 1.0.0 + 8.0.0 + + diff --git a/samples/client/echo_api/java/feign-gson/settings.gradle b/samples/client/echo_api/java/feign-gson/settings.gradle new file mode 100644 index 0000000000..83d1d03203 --- /dev/null +++ b/samples/client/echo_api/java/feign-gson/settings.gradle @@ -0,0 +1 @@ +rootProject.name = "echo-api-feign-json" \ No newline at end of file diff --git a/samples/client/echo_api/java/feign-gson/src/main/AndroidManifest.xml b/samples/client/echo_api/java/feign-gson/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..54fbcb3da1 --- /dev/null +++ b/samples/client/echo_api/java/feign-gson/src/main/AndroidManifest.xml @@ -0,0 +1,3 @@ + + + diff --git a/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/ApiClient.java new file mode 100644 index 0000000000..b122f0e05e --- /dev/null +++ b/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/ApiClient.java @@ -0,0 +1,196 @@ +package org.openapitools.client; + +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.logging.Level; +import java.util.logging.Logger; + + +import feign.Feign; +import feign.RequestInterceptor; +import feign.form.FormEncoder; +import feign.gson.GsonDecoder; +import feign.gson.GsonEncoder; +import feign.slf4j.Slf4jLogger; +import org.openapitools.client.auth.HttpBasicAuth; +import org.openapitools.client.auth.HttpBearerAuth; +import org.openapitools.client.auth.ApiKeyAuth; + + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ApiClient { + private static final Logger log = Logger.getLogger(ApiClient.class.getName()); + + public interface Api {} + + private String basePath = "http://localhost:3000"; + private Map apiAuthorizations; + private Feign.Builder feignBuilder; + + public ApiClient() { + apiAuthorizations = new LinkedHashMap(); + feignBuilder = Feign.builder() + .encoder(new FormEncoder(new GsonEncoder())) + .decoder(new GsonDecoder()) + .logger(new Slf4jLogger()); + } + + public ApiClient(String[] authNames) { + this(); + for(String authName : authNames) { + log.log(Level.FINE, "Creating authentication {0}", authName); + throw new RuntimeException("auth name \"" + authName + "\" not found in available auth names"); + } + } + + /** + * Basic constructor for single auth name + * @param authName + */ + public ApiClient(String authName) { + this(new String[]{authName}); + } + + /** + * Helper constructor for single api key + * @param authName + * @param apiKey + */ + public ApiClient(String authName, String apiKey) { + this(authName); + this.setApiKey(apiKey); + } + + public String getBasePath() { + return basePath; + } + + public ApiClient setBasePath(String basePath) { + this.basePath = basePath; + return this; + } + + public Map getApiAuthorizations() { + return apiAuthorizations; + } + + public void setApiAuthorizations(Map apiAuthorizations) { + this.apiAuthorizations = apiAuthorizations; + } + + public Feign.Builder getFeignBuilder() { + return feignBuilder; + } + + public ApiClient setFeignBuilder(Feign.Builder feignBuilder) { + this.feignBuilder = feignBuilder; + return this; + } + + + + + /** + * Creates a feign client for given API interface. + * + * Usage: + * ApiClient apiClient = new ApiClient(); + * apiClient.setBasePath("http://localhost:8080"); + * XYZApi api = apiClient.buildClient(XYZApi.class); + * XYZResponse response = api.someMethod(...); + * @param Type + * @param clientClass Client class + * @return The Client + */ + public T buildClient(Class clientClass) { + return feignBuilder.target(clientClass, basePath); + } + + /** + * Select the Accept header's value from the given accepts array: + * if JSON exists in the given array, use it; + * otherwise use all of them (joining into a string) + * + * @param accepts The accepts array to select from + * @return The Accept header to use. If the given array is empty, + * null will be returned (not to set the Accept header explicitly). + */ + public String selectHeaderAccept(String[] accepts) { + if (accepts.length == 0) return null; + if (StringUtil.containsIgnoreCase(accepts, "application/json")) return "application/json"; + return StringUtil.join(accepts, ","); + } + + /** + * Select the Content-Type header's value from the given array: + * if JSON exists in the given array, use it; + * otherwise use the first one of the array. + * + * @param contentTypes The Content-Type array to select from + * @return The Content-Type header to use. If the given array is empty, + * JSON will be used. + */ + public String selectHeaderContentType(String[] contentTypes) { + if (contentTypes.length == 0) return "application/json"; + if (StringUtil.containsIgnoreCase(contentTypes, "application/json")) return "application/json"; + return contentTypes[0]; + } + + /** + * Helper method to configure the bearer token. + * @param bearerToken the bearer token. + */ + public void setBearerToken(String bearerToken) { + HttpBearerAuth apiAuthorization = getAuthorization(HttpBearerAuth.class); + apiAuthorization.setBearerToken(bearerToken); + } + + /** + * Helper method to configure the first api key found + * @param apiKey API key + */ + public void setApiKey(String apiKey) { + ApiKeyAuth apiAuthorization = getAuthorization(ApiKeyAuth.class); + apiAuthorization.setApiKey(apiKey); + } + + /** + * Helper method to configure the username/password for basic auth + * @param username Username + * @param password Password + */ + public void setCredentials(String username, String password) { + HttpBasicAuth apiAuthorization = getAuthorization(HttpBasicAuth.class); + apiAuthorization.setCredentials(username, password); + } + + /** + * Gets request interceptor based on authentication name + * @param authName Authentication name + * @return Request Interceptor + */ + public RequestInterceptor getAuthorization(String authName) { + return apiAuthorizations.get(authName); + } + + /** + * Adds an authorization to be used by the client + * @param authName Authentication name + * @param authorization Request interceptor + */ + public void addAuthorization(String authName, RequestInterceptor authorization) { + if (apiAuthorizations.containsKey(authName)) { + throw new RuntimeException("auth name \"" + authName + "\" already in api authorizations"); + } + apiAuthorizations.put(authName, authorization); + feignBuilder.requestInterceptor(authorization); + } + + private T getAuthorization(Class type) { + return (T) apiAuthorizations.values() + .stream() + .filter(requestInterceptor -> type.isAssignableFrom(requestInterceptor.getClass())) + .findFirst() + .orElseThrow(() -> new RuntimeException("No Oauth authentication or OAuth configured!")); + } +} diff --git a/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/EncodingUtils.java b/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/EncodingUtils.java new file mode 100644 index 0000000000..c5a76a9785 --- /dev/null +++ b/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/EncodingUtils.java @@ -0,0 +1,86 @@ +package org.openapitools.client; + +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +/** +* Utilities to support Swagger encoding formats in Feign. +*/ +public final class EncodingUtils { + + /** + * Private constructor. Do not construct this class. + */ + private EncodingUtils() {} + + /** + *

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

+ * + *

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

+ * + *

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

+ * @param parameters The collection object to be formatted. This object will + * not be changed. + * @param collectionFormat The Swagger collection format (eg, "csv", "tsv", + * "pipes"). See the + *
+ * OpenAPI Spec for more details. + * @return An object that will be correctly formatted by Feign. + */ + public static Object encodeCollection(Collection parameters, + String collectionFormat) { + if (parameters == null) { + return parameters; + } + List stringValues = new ArrayList<>(parameters.size()); + for (Object parameter : parameters) { + // ignore null values (same behavior as Feign) + if (parameter != null) { + stringValues.add(encode(parameter)); + } + } + // Feign natively handles single-element lists and the "multi" format. + if (stringValues.size() < 2 || "multi".equals(collectionFormat)) { + return stringValues; + } + // Otherwise return a formatted String + String[] stringArray = stringValues.toArray(new String[0]); + switch (collectionFormat) { + case "csv": + default: + return StringUtil.join(stringArray, ","); + case "ssv": + return StringUtil.join(stringArray, " "); + case "tsv": + return StringUtil.join(stringArray, "\t"); + case "pipes": + return StringUtil.join(stringArray, "|"); + } + } + + /** + * URL encode a single query parameter. + * @param parameter The query parameter to encode. This object will not be + * changed. + * @return The URL encoded string representation of the parameter. If the + * parameter is null, returns null. + */ + public static String encode(Object parameter) { + if (parameter == null) { + return null; + } + try { + return URLEncoder.encode(parameter.toString(), "UTF-8").replaceAll("\\+", "%20"); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } +} diff --git a/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/ServerConfiguration.java b/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/ServerConfiguration.java new file mode 100644 index 0000000000..59edc528a4 --- /dev/null +++ b/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/ServerConfiguration.java @@ -0,0 +1,58 @@ +package org.openapitools.client; + +import java.util.Map; + +/** + * Representing a Server configuration. + */ +public class ServerConfiguration { + public String URL; + public String description; + public Map variables; + + /** + * @param URL A URL to the target host. + * @param description A description of the host designated by the URL. + * @param variables A map between a variable name and its value. The value is used for substitution in the server's URL template. + */ + public ServerConfiguration(String URL, String description, Map variables) { + this.URL = URL; + this.description = description; + this.variables = variables; + } + + /** + * Format URL template using given variables. + * + * @param variables A map between a variable name and its value. + * @return Formatted URL. + */ + public String URL(Map variables) { + String url = this.URL; + + // go through variables and replace placeholders + for (Map.Entry variable: this.variables.entrySet()) { + String name = variable.getKey(); + ServerVariable serverVariable = variable.getValue(); + String value = serverVariable.defaultValue; + + if (variables != null && variables.containsKey(name)) { + value = variables.get(name); + if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { + throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + "."); + } + } + url = url.replace("{" + name + "}", value); + } + return url; + } + + /** + * Format URL template using default server variables. + * + * @return Formatted URL. + */ + public String URL() { + return URL(null); + } +} diff --git a/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/ServerVariable.java b/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/ServerVariable.java new file mode 100644 index 0000000000..c2f13e2166 --- /dev/null +++ b/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/ServerVariable.java @@ -0,0 +1,23 @@ +package org.openapitools.client; + +import java.util.HashSet; + +/** + * Representing a Server Variable for server URL template substitution. + */ +public class ServerVariable { + public String description; + public String defaultValue; + public HashSet enumValues = null; + + /** + * @param description A description for the server variable. + * @param defaultValue The default value to use for substitution. + * @param enumValues An enumeration of string values to be used if the substitution options are from a limited set. + */ + public ServerVariable(String description, String defaultValue, HashSet enumValues) { + this.description = description; + this.defaultValue = defaultValue; + this.enumValues = enumValues; + } +} diff --git a/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/StringUtil.java b/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/StringUtil.java new file mode 100644 index 0000000000..d6c3fc8a96 --- /dev/null +++ b/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/StringUtil.java @@ -0,0 +1,83 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client; + +import java.util.Collection; +import java.util.Iterator; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class StringUtil { + /** + * Check if the given array contains the given value (with case-insensitive comparison). + * + * @param array The array + * @param value The value to search + * @return true if the array contains the value + */ + public static boolean containsIgnoreCase(String[] array, String value) { + for (String str : array) { + if (value == null && str == null) { + return true; + } + if (value != null && value.equalsIgnoreCase(str)) { + return true; + } + } + return false; + } + + /** + * Join an array of strings with the given separator. + *

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

+ * + * @param array The array of strings + * @param separator The separator + * @return the resulting string + */ + public static String join(String[] array, String separator) { + int len = array.length; + if (len == 0) { + return ""; + } + + StringBuilder out = new StringBuilder(); + out.append(array[0]); + for (int i = 1; i < len; i++) { + out.append(separator).append(array[i]); + } + return out.toString(); + } + + /** + * Join a list of strings with the given separator. + * + * @param list The list of strings + * @param separator The separator + * @return the resulting string + */ + public static String join(Collection list, String separator) { + Iterator iterator = list.iterator(); + StringBuilder out = new StringBuilder(); + if (iterator.hasNext()) { + out.append(iterator.next()); + } + while (iterator.hasNext()) { + out.append(separator).append(iterator.next()); + } + return out.toString(); + } +} diff --git a/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/api/BodyApi.java b/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/api/BodyApi.java new file mode 100644 index 0000000000..c975038736 --- /dev/null +++ b/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/api/BodyApi.java @@ -0,0 +1,47 @@ +package org.openapitools.client.api; + +import org.openapitools.client.ApiClient; +import org.openapitools.client.EncodingUtils; +import org.openapitools.client.model.ApiResponse; + +import org.openapitools.client.model.Pet; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import feign.*; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public interface BodyApi extends ApiClient.Api { + + + /** + * Test body parameter(s) + * Test body parameter(s) + * @param pet Pet object that needs to be added to the store (optional) + * @return Pet + */ + @RequestLine("POST /echo/body/Pet") + @Headers({ + "Content-Type: application/json", + "Accept: application/json", + }) + Pet testEchoBodyPet(Pet pet); + + /** + * Test body parameter(s) + * Similar to testEchoBodyPet but it also returns the http response headers . + * Test body parameter(s) + * @param pet Pet object that needs to be added to the store (optional) + * @return A ApiResponse that wraps the response boyd and the http headers. + */ + @RequestLine("POST /echo/body/Pet") + @Headers({ + "Content-Type: application/json", + "Accept: application/json", + }) + ApiResponse testEchoBodyPetWithHttpInfo(Pet pet); + + +} diff --git a/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/api/PathApi.java b/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/api/PathApi.java new file mode 100644 index 0000000000..94d6038547 --- /dev/null +++ b/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/api/PathApi.java @@ -0,0 +1,46 @@ +package org.openapitools.client.api; + +import org.openapitools.client.ApiClient; +import org.openapitools.client.EncodingUtils; +import org.openapitools.client.model.ApiResponse; + + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import feign.*; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public interface PathApi extends ApiClient.Api { + + + /** + * Test path parameter(s) + * Test path parameter(s) + * @param pathString (required) + * @param pathInteger (required) + * @return String + */ + @RequestLine("GET /path/string/{pathString}/integer/{pathInteger}") + @Headers({ + "Accept: text/plain", + }) + String testsPathStringPathStringIntegerPathInteger(@Param("pathString") String pathString, @Param("pathInteger") Integer pathInteger); + + /** + * Test path parameter(s) + * Similar to testsPathStringPathStringIntegerPathInteger but it also returns the http response headers . + * Test path parameter(s) + * @param pathString (required) + * @param pathInteger (required) + * @return A ApiResponse that wraps the response boyd and the http headers. + */ + @RequestLine("GET /path/string/{pathString}/integer/{pathInteger}") + @Headers({ + "Accept: text/plain", + }) + ApiResponse testsPathStringPathStringIntegerPathIntegerWithHttpInfo(@Param("pathString") String pathString, @Param("pathInteger") Integer pathInteger); + + +} diff --git a/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/api/QueryApi.java b/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/api/QueryApi.java new file mode 100644 index 0000000000..c4daf6833b --- /dev/null +++ b/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/api/QueryApi.java @@ -0,0 +1,266 @@ +package org.openapitools.client.api; + +import org.openapitools.client.ApiClient; +import org.openapitools.client.EncodingUtils; +import org.openapitools.client.model.ApiResponse; + +import org.openapitools.client.model.Pet; +import org.openapitools.client.model.TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import feign.*; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public interface QueryApi extends ApiClient.Api { + + + /** + * Test query parameter(s) + * Test query parameter(s) + * @param integerQuery (optional) + * @param booleanQuery (optional) + * @param stringQuery (optional) + * @return String + */ + @RequestLine("GET /query/integer/boolean/string?integer_query={integerQuery}&boolean_query={booleanQuery}&string_query={stringQuery}") + @Headers({ + "Accept: text/plain", + }) + String testQueryIntegerBooleanString(@Param("integerQuery") Integer integerQuery, @Param("booleanQuery") Boolean booleanQuery, @Param("stringQuery") String stringQuery); + + /** + * Test query parameter(s) + * Similar to testQueryIntegerBooleanString but it also returns the http response headers . + * Test query parameter(s) + * @param integerQuery (optional) + * @param booleanQuery (optional) + * @param stringQuery (optional) + * @return A ApiResponse that wraps the response boyd and the http headers. + */ + @RequestLine("GET /query/integer/boolean/string?integer_query={integerQuery}&boolean_query={booleanQuery}&string_query={stringQuery}") + @Headers({ + "Accept: text/plain", + }) + ApiResponse testQueryIntegerBooleanStringWithHttpInfo(@Param("integerQuery") Integer integerQuery, @Param("booleanQuery") Boolean booleanQuery, @Param("stringQuery") String stringQuery); + + + /** + * Test query parameter(s) + * Test query parameter(s) + * Note, this is equivalent to the other testQueryIntegerBooleanString method, + * but with the query parameters collected into a single Map parameter. This + * is convenient for services with optional query parameters, especially when + * used with the {@link TestQueryIntegerBooleanStringQueryParams} class that allows for + * building up this map in a fluent style. + * @param queryParams Map of query parameters as name-value pairs + *

The following elements may be specified in the query map:

+ *
    + *
  • integerQuery - (optional)
  • + *
  • booleanQuery - (optional)
  • + *
  • stringQuery - (optional)
  • + *
+ * @return String + */ + @RequestLine("GET /query/integer/boolean/string?integer_query={integerQuery}&boolean_query={booleanQuery}&string_query={stringQuery}") + @Headers({ + "Accept: text/plain", + }) + String testQueryIntegerBooleanString(@QueryMap(encoded=true) Map queryParams); + + /** + * Test query parameter(s) + * Test query parameter(s) + * Note, this is equivalent to the other testQueryIntegerBooleanString that receives the query parameters as a map, + * but this one also exposes the Http response headers + * @param queryParams Map of query parameters as name-value pairs + *

The following elements may be specified in the query map:

+ *
    + *
  • integerQuery - (optional)
  • + *
  • booleanQuery - (optional)
  • + *
  • stringQuery - (optional)
  • + *
+ * @return String + */ + @RequestLine("GET /query/integer/boolean/string?integer_query={integerQuery}&boolean_query={booleanQuery}&string_query={stringQuery}") + @Headers({ + "Accept: text/plain", + }) + ApiResponse testQueryIntegerBooleanStringWithHttpInfo(@QueryMap(encoded=true) Map queryParams); + + + /** + * A convenience class for generating query parameters for the + * testQueryIntegerBooleanString method in a fluent style. + */ + public static class TestQueryIntegerBooleanStringQueryParams extends HashMap { + public TestQueryIntegerBooleanStringQueryParams integerQuery(final Integer value) { + put("integer_query", EncodingUtils.encode(value)); + return this; + } + public TestQueryIntegerBooleanStringQueryParams booleanQuery(final Boolean value) { + put("boolean_query", EncodingUtils.encode(value)); + return this; + } + public TestQueryIntegerBooleanStringQueryParams stringQuery(final String value) { + put("string_query", EncodingUtils.encode(value)); + return this; + } + } + + /** + * Test query parameter(s) + * Test query parameter(s) + * @param queryObject (optional) + * @return String + */ + @RequestLine("GET /query/style_form/explode_true/array_string?query_object={queryObject}") + @Headers({ + "Accept: text/plain", + }) + String testQueryStyleFormExplodeTrueArrayString(@Param("queryObject") TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter queryObject); + + /** + * Test query parameter(s) + * Similar to testQueryStyleFormExplodeTrueArrayString but it also returns the http response headers . + * Test query parameter(s) + * @param queryObject (optional) + * @return A ApiResponse that wraps the response boyd and the http headers. + */ + @RequestLine("GET /query/style_form/explode_true/array_string?query_object={queryObject}") + @Headers({ + "Accept: text/plain", + }) + ApiResponse testQueryStyleFormExplodeTrueArrayStringWithHttpInfo(@Param("queryObject") TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter queryObject); + + + /** + * Test query parameter(s) + * Test query parameter(s) + * Note, this is equivalent to the other testQueryStyleFormExplodeTrueArrayString method, + * but with the query parameters collected into a single Map parameter. This + * is convenient for services with optional query parameters, especially when + * used with the {@link TestQueryStyleFormExplodeTrueArrayStringQueryParams} class that allows for + * building up this map in a fluent style. + * @param queryParams Map of query parameters as name-value pairs + *

The following elements may be specified in the query map:

+ *
    + *
  • queryObject - (optional)
  • + *
+ * @return String + */ + @RequestLine("GET /query/style_form/explode_true/array_string?query_object={queryObject}") + @Headers({ + "Accept: text/plain", + }) + String testQueryStyleFormExplodeTrueArrayString(@QueryMap(encoded=true) Map queryParams); + + /** + * Test query parameter(s) + * Test query parameter(s) + * Note, this is equivalent to the other testQueryStyleFormExplodeTrueArrayString that receives the query parameters as a map, + * but this one also exposes the Http response headers + * @param queryParams Map of query parameters as name-value pairs + *

The following elements may be specified in the query map:

+ *
    + *
  • queryObject - (optional)
  • + *
+ * @return String + */ + @RequestLine("GET /query/style_form/explode_true/array_string?query_object={queryObject}") + @Headers({ + "Accept: text/plain", + }) + ApiResponse testQueryStyleFormExplodeTrueArrayStringWithHttpInfo(@QueryMap(encoded=true) Map queryParams); + + + /** + * A convenience class for generating query parameters for the + * testQueryStyleFormExplodeTrueArrayString method in a fluent style. + */ + public static class TestQueryStyleFormExplodeTrueArrayStringQueryParams extends HashMap { + public TestQueryStyleFormExplodeTrueArrayStringQueryParams queryObject(final TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter value) { + put("query_object", EncodingUtils.encode(value)); + return this; + } + } + + /** + * Test query parameter(s) + * Test query parameter(s) + * @param queryObject (optional) + * @return String + */ + @RequestLine("GET /query/style_form/explode_true/object?query_object={queryObject}") + @Headers({ + "Accept: text/plain", + }) + String testQueryStyleFormExplodeTrueObject(@Param("queryObject") Pet queryObject); + + /** + * Test query parameter(s) + * Similar to testQueryStyleFormExplodeTrueObject but it also returns the http response headers . + * Test query parameter(s) + * @param queryObject (optional) + * @return A ApiResponse that wraps the response boyd and the http headers. + */ + @RequestLine("GET /query/style_form/explode_true/object?query_object={queryObject}") + @Headers({ + "Accept: text/plain", + }) + ApiResponse testQueryStyleFormExplodeTrueObjectWithHttpInfo(@Param("queryObject") Pet queryObject); + + + /** + * Test query parameter(s) + * Test query parameter(s) + * Note, this is equivalent to the other testQueryStyleFormExplodeTrueObject method, + * but with the query parameters collected into a single Map parameter. This + * is convenient for services with optional query parameters, especially when + * used with the {@link TestQueryStyleFormExplodeTrueObjectQueryParams} class that allows for + * building up this map in a fluent style. + * @param queryParams Map of query parameters as name-value pairs + *

The following elements may be specified in the query map:

+ *
    + *
  • queryObject - (optional)
  • + *
+ * @return String + */ + @RequestLine("GET /query/style_form/explode_true/object?query_object={queryObject}") + @Headers({ + "Accept: text/plain", + }) + String testQueryStyleFormExplodeTrueObject(@QueryMap(encoded=true) Map queryParams); + + /** + * Test query parameter(s) + * Test query parameter(s) + * Note, this is equivalent to the other testQueryStyleFormExplodeTrueObject that receives the query parameters as a map, + * but this one also exposes the Http response headers + * @param queryParams Map of query parameters as name-value pairs + *

The following elements may be specified in the query map:

+ *
    + *
  • queryObject - (optional)
  • + *
+ * @return String + */ + @RequestLine("GET /query/style_form/explode_true/object?query_object={queryObject}") + @Headers({ + "Accept: text/plain", + }) + ApiResponse testQueryStyleFormExplodeTrueObjectWithHttpInfo(@QueryMap(encoded=true) Map queryParams); + + + /** + * A convenience class for generating query parameters for the + * testQueryStyleFormExplodeTrueObject method in a fluent style. + */ + public static class TestQueryStyleFormExplodeTrueObjectQueryParams extends HashMap { + public TestQueryStyleFormExplodeTrueObjectQueryParams queryObject(final Pet value) { + put("query_object", EncodingUtils.encode(value)); + return this; + } + } +} diff --git a/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java b/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java new file mode 100644 index 0000000000..44511e4641 --- /dev/null +++ b/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java @@ -0,0 +1,43 @@ +package org.openapitools.client.auth; + +import feign.RequestInterceptor; +import feign.RequestTemplate; + +public class ApiKeyAuth implements RequestInterceptor { + private final String location; + private final String paramName; + + private String apiKey; + + public ApiKeyAuth(String location, String paramName) { + this.location = location; + this.paramName = paramName; + } + + public String getLocation() { + return location; + } + + public String getParamName() { + return paramName; + } + + public String getApiKey() { + return apiKey; + } + + public void setApiKey(String apiKey) { + this.apiKey = apiKey; + } + + @Override + public void apply(RequestTemplate template) { + if ("query".equals(location)) { + template.query(paramName, apiKey); + } else if ("header".equals(location)) { + template.header(paramName, apiKey); + } else if ("cookie".equals(location)) { + template.header("Cookie", String.format("%s=%s", paramName, apiKey)); + } + } +} diff --git a/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/auth/DefaultApi20Impl.java b/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/auth/DefaultApi20Impl.java new file mode 100644 index 0000000000..80db21111f --- /dev/null +++ b/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/auth/DefaultApi20Impl.java @@ -0,0 +1,47 @@ +package org.openapitools.client.auth; + +import com.github.scribejava.core.builder.api.DefaultApi20; +import com.github.scribejava.core.extractors.OAuth2AccessTokenJsonExtractor; +import com.github.scribejava.core.extractors.TokenExtractor; +import com.github.scribejava.core.model.OAuth2AccessToken; +import com.github.scribejava.core.oauth2.bearersignature.BearerSignature; +import com.github.scribejava.core.oauth2.bearersignature.BearerSignatureURIQueryParameter; +import com.github.scribejava.core.oauth2.clientauthentication.ClientAuthentication; +import com.github.scribejava.core.oauth2.clientauthentication.RequestBodyAuthenticationScheme; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DefaultApi20Impl extends DefaultApi20 { + + private final String accessTokenEndpoint; + private final String authorizationBaseUrl; + + protected DefaultApi20Impl(String authorizationBaseUrl, String accessTokenEndpoint) { + this.authorizationBaseUrl = authorizationBaseUrl; + this.accessTokenEndpoint = accessTokenEndpoint; + } + + @Override + public String getAccessTokenEndpoint() { + return accessTokenEndpoint; + } + + @Override + protected String getAuthorizationBaseUrl() { + return authorizationBaseUrl; + } + + @Override + public BearerSignature getBearerSignature() { + return BearerSignatureURIQueryParameter.instance(); + } + + @Override + public ClientAuthentication getClientAuthentication() { + return RequestBodyAuthenticationScheme.instance(); + } + + @Override + public TokenExtractor getAccessTokenExtractor() { + return OAuth2AccessTokenJsonExtractor.instance(); + } +} \ No newline at end of file diff --git a/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java b/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java new file mode 100644 index 0000000000..9fc0358f10 --- /dev/null +++ b/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java @@ -0,0 +1,41 @@ +package org.openapitools.client.auth; + +import feign.RequestInterceptor; +import feign.RequestTemplate; +import feign.auth.BasicAuthRequestInterceptor; + +/** + * An interceptor that adds the request header needed to use HTTP basic authentication. + */ +public class HttpBasicAuth implements RequestInterceptor { + + private String username; + private String password; + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public void setCredentials(String username, String password) { + this.username = username; + this.password = password; + } + + @Override + public void apply(RequestTemplate template) { + RequestInterceptor requestInterceptor = new BasicAuthRequestInterceptor(username, password); + requestInterceptor.apply(template); + } +} diff --git a/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java b/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java new file mode 100644 index 0000000000..d4c9cbe636 --- /dev/null +++ b/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java @@ -0,0 +1,43 @@ +package org.openapitools.client.auth; + +import feign.RequestInterceptor; +import feign.RequestTemplate; + +/** + * An interceptor that adds the request header needed to use HTTP bearer authentication. + */ +public class HttpBearerAuth implements RequestInterceptor { + private final String scheme; + private String bearerToken; + + public HttpBearerAuth(String scheme) { + this.scheme = scheme; + } + + /** + * Gets the token, which together with the scheme, will be sent as the value of the Authorization header. + */ + public String getBearerToken() { + return bearerToken; + } + + /** + * Sets the token, which together with the scheme, will be sent as the value of the Authorization header. + */ + public void setBearerToken(String bearerToken) { + this.bearerToken = bearerToken; + } + + @Override + public void apply(RequestTemplate template) { + if(bearerToken == null) { + return; + } + + template.header("Authorization", (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken); + } + + private static String upperCaseBearer(String scheme) { + return ("bearer".equalsIgnoreCase(scheme)) ? "Bearer" : scheme; + } +} diff --git a/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/model/ApiResponse.java b/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/model/ApiResponse.java new file mode 100644 index 0000000000..a0d44e724c --- /dev/null +++ b/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/model/ApiResponse.java @@ -0,0 +1,43 @@ +package org.openapitools.client.model; + +import java.util.Map; +import java.util.List; + +public class ApiResponse{ + + final private int statusCode; + final private Map> headers; + final private T data; + + /** + * @param statusCode The status code of HTTP response + * @param headers The headers of HTTP response + */ + public ApiResponse(int statusCode, Map> headers) { + this(statusCode, headers, null); + } + + /** + * @param statusCode The status code of HTTP response + * @param headers The headers of HTTP response + * @param data The object deserialized from response bod + */ + public ApiResponse(int statusCode, Map> headers, T data) { + this.statusCode = statusCode; + this.headers = headers; + this.data = data; + } + + public int getStatusCode() { + return statusCode; + } + + public Map> getHeaders() { + return headers; + } + + public T getData() { + return data; + } + +} \ No newline at end of file diff --git a/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/model/Category.java b/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/model/Category.java new file mode 100644 index 0000000000..236c8190bb --- /dev/null +++ b/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/model/Category.java @@ -0,0 +1,125 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +/** + * Category + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Category { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private Long id; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public Category() { + } + + public Category id(Long id) { + + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @javax.annotation.Nullable + + public Long getId() { + return id; + } + + + public void setId(Long id) { + this.id = id; + } + + + public Category name(String name) { + + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @javax.annotation.Nullable + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Category category = (Category) o; + return Objects.equals(this.id, category.id) && + Objects.equals(this.name, category.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Category {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/model/Pet.java new file mode 100644 index 0000000000..0f511d550b --- /dev/null +++ b/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/model/Pet.java @@ -0,0 +1,303 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.client.model.Category; +import org.openapitools.client.model.Tag; + +/** + * Pet + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Pet { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private Long id; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_CATEGORY = "category"; + @SerializedName(SERIALIZED_NAME_CATEGORY) + private Category category; + + public static final String SERIALIZED_NAME_PHOTO_URLS = "photoUrls"; + @SerializedName(SERIALIZED_NAME_PHOTO_URLS) + private List photoUrls = new ArrayList<>(); + + public static final String SERIALIZED_NAME_TAGS = "tags"; + @SerializedName(SERIALIZED_NAME_TAGS) + private List tags = null; + + /** + * pet status in the store + */ + @JsonAdapter(StatusEnum.Adapter.class) + public enum StatusEnum { + AVAILABLE("available"), + + PENDING("pending"), + + SOLD("sold"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StatusEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private StatusEnum status; + + public Pet() { + } + + public Pet id(Long id) { + + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @javax.annotation.Nullable + + public Long getId() { + return id; + } + + + public void setId(Long id) { + this.id = id; + } + + + public Pet name(String name) { + + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @javax.annotation.Nonnull + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + public Pet category(Category category) { + + this.category = category; + return this; + } + + /** + * Get category + * @return category + **/ + @javax.annotation.Nullable + + public Category getCategory() { + return category; + } + + + public void setCategory(Category category) { + this.category = category; + } + + + public Pet photoUrls(List photoUrls) { + + this.photoUrls = photoUrls; + return this; + } + + public Pet addPhotoUrlsItem(String photoUrlsItem) { + this.photoUrls.add(photoUrlsItem); + return this; + } + + /** + * Get photoUrls + * @return photoUrls + **/ + @javax.annotation.Nonnull + + public List getPhotoUrls() { + return photoUrls; + } + + + public void setPhotoUrls(List photoUrls) { + this.photoUrls = photoUrls; + } + + + public Pet tags(List tags) { + + this.tags = tags; + return this; + } + + public Pet addTagsItem(Tag tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Get tags + * @return tags + **/ + @javax.annotation.Nullable + + public List getTags() { + return tags; + } + + + public void setTags(List tags) { + this.tags = tags; + } + + + public Pet status(StatusEnum status) { + + this.status = status; + return this; + } + + /** + * pet status in the store + * @return status + **/ + @javax.annotation.Nullable + + public StatusEnum getStatus() { + return status; + } + + + public void setStatus(StatusEnum status) { + this.status = status; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Pet pet = (Pet) o; + return Objects.equals(this.id, pet.id) && + Objects.equals(this.name, pet.name) && + Objects.equals(this.category, pet.category) && + Objects.equals(this.photoUrls, pet.photoUrls) && + Objects.equals(this.tags, pet.tags) && + Objects.equals(this.status, pet.status); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, category, photoUrls, tags, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Pet {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/model/Tag.java new file mode 100644 index 0000000000..7bfaa5ea05 --- /dev/null +++ b/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/model/Tag.java @@ -0,0 +1,125 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +/** + * Tag + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Tag { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private Long id; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public Tag() { + } + + public Tag id(Long id) { + + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @javax.annotation.Nullable + + public Long getId() { + return id; + } + + + public void setId(Long id) { + this.id = id; + } + + + public Tag name(String name) { + + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @javax.annotation.Nullable + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Tag tag = (Tag) o; + return Objects.equals(this.id, tag.id) && + Objects.equals(this.name, tag.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Tag {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.java b/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.java new file mode 100644 index 0000000000..433e40e137 --- /dev/null +++ b/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.java @@ -0,0 +1,107 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter { + public static final String SERIALIZED_NAME_VALUES = "values"; + @SerializedName(SERIALIZED_NAME_VALUES) + private List values = null; + + public TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter() { + } + + public TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter values(List values) { + + this.values = values; + return this; + } + + public TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter addValuesItem(String valuesItem) { + if (this.values == null) { + this.values = new ArrayList<>(); + } + this.values.add(valuesItem); + return this; + } + + /** + * Get values + * @return values + **/ + @javax.annotation.Nullable + + public List getValues() { + return values; + } + + + public void setValues(List values) { + this.values = values; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter testQueryStyleFormExplodeTrueArrayStringQueryObjectParameter = (TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter) o; + return Objects.equals(this.values, testQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.values); + } + + @Override + public int hashCode() { + return Objects.hash(values); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter {\n"); + sb.append(" values: ").append(toIndentedString(values)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/echo_api/java/feign-gson/src/test/java/org/openapitools/client/api/BodyApiTest.java b/samples/client/echo_api/java/feign-gson/src/test/java/org/openapitools/client/api/BodyApiTest.java new file mode 100644 index 0000000000..24c71b3607 --- /dev/null +++ b/samples/client/echo_api/java/feign-gson/src/test/java/org/openapitools/client/api/BodyApiTest.java @@ -0,0 +1,42 @@ +package org.openapitools.client.api; + +import org.openapitools.client.ApiClient; +import org.openapitools.client.model.Pet; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.BeforeEach; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for BodyApi + */ +class BodyApiTest { + + private BodyApi api; + + @BeforeEach + public void setup() { + api = new ApiClient().buildClient(BodyApi.class); + } + + + /** + * Test body parameter(s) + * + * Test body parameter(s) + */ + @Test + void testEchoBodyPetTest() { + Pet pet = null; + // Pet response = api.testEchoBodyPet(pet); + + // TODO: test validations + } + + +} diff --git a/samples/client/echo_api/java/feign-gson/src/test/java/org/openapitools/client/api/PathApiTest.java b/samples/client/echo_api/java/feign-gson/src/test/java/org/openapitools/client/api/PathApiTest.java new file mode 100644 index 0000000000..8f39b053aa --- /dev/null +++ b/samples/client/echo_api/java/feign-gson/src/test/java/org/openapitools/client/api/PathApiTest.java @@ -0,0 +1,42 @@ +package org.openapitools.client.api; + +import org.openapitools.client.ApiClient; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.BeforeEach; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for PathApi + */ +class PathApiTest { + + private PathApi api; + + @BeforeEach + public void setup() { + api = new ApiClient().buildClient(PathApi.class); + } + + + /** + * Test path parameter(s) + * + * Test path parameter(s) + */ + @Test + void testsPathStringPathStringIntegerPathIntegerTest() { + String pathString = null; + Integer pathInteger = null; + // String response = api.testsPathStringPathStringIntegerPathInteger(pathString, pathInteger); + + // TODO: test validations + } + + +} diff --git a/samples/client/echo_api/java/feign-gson/src/test/java/org/openapitools/client/api/QueryApiTest.java b/samples/client/echo_api/java/feign-gson/src/test/java/org/openapitools/client/api/QueryApiTest.java new file mode 100644 index 0000000000..b55588a040 --- /dev/null +++ b/samples/client/echo_api/java/feign-gson/src/test/java/org/openapitools/client/api/QueryApiTest.java @@ -0,0 +1,123 @@ +package org.openapitools.client.api; + +import org.openapitools.client.ApiClient; +import org.openapitools.client.model.Pet; +import org.openapitools.client.model.TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.BeforeEach; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for QueryApi + */ +class QueryApiTest { + + private QueryApi api; + + @BeforeEach + public void setup() { + api = new ApiClient().buildClient(QueryApi.class); + } + + + /** + * Test query parameter(s) + * + * Test query parameter(s) + */ + @Test + void testQueryIntegerBooleanStringTest() { + Integer integerQuery = null; + Boolean booleanQuery = null; + String stringQuery = null; + // String response = api.testQueryIntegerBooleanString(integerQuery, booleanQuery, stringQuery); + + // TODO: test validations + } + + /** + * Test query parameter(s) + * + * Test query parameter(s) + * + * This tests the overload of the method that uses a Map for query parameters instead of + * listing them out individually. + */ + @Test + void testQueryIntegerBooleanStringTestQueryMap() { + QueryApi.TestQueryIntegerBooleanStringQueryParams queryParams = new QueryApi.TestQueryIntegerBooleanStringQueryParams() + .integerQuery(null) + .booleanQuery(null) + .stringQuery(null); + // String response = api.testQueryIntegerBooleanString(queryParams); + + // TODO: test validations + } + + /** + * Test query parameter(s) + * + * Test query parameter(s) + */ + @Test + void testQueryStyleFormExplodeTrueArrayStringTest() { + TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter queryObject = null; + // String response = api.testQueryStyleFormExplodeTrueArrayString(queryObject); + + // TODO: test validations + } + + /** + * Test query parameter(s) + * + * Test query parameter(s) + * + * This tests the overload of the method that uses a Map for query parameters instead of + * listing them out individually. + */ + @Test + void testQueryStyleFormExplodeTrueArrayStringTestQueryMap() { + QueryApi.TestQueryStyleFormExplodeTrueArrayStringQueryParams queryParams = new QueryApi.TestQueryStyleFormExplodeTrueArrayStringQueryParams() + .queryObject(null); + // String response = api.testQueryStyleFormExplodeTrueArrayString(queryParams); + + // TODO: test validations + } + + /** + * Test query parameter(s) + * + * Test query parameter(s) + */ + @Test + void testQueryStyleFormExplodeTrueObjectTest() { + Pet queryObject = null; + // String response = api.testQueryStyleFormExplodeTrueObject(queryObject); + + // TODO: test validations + } + + /** + * Test query parameter(s) + * + * Test query parameter(s) + * + * This tests the overload of the method that uses a Map for query parameters instead of + * listing them out individually. + */ + @Test + void testQueryStyleFormExplodeTrueObjectTestQueryMap() { + QueryApi.TestQueryStyleFormExplodeTrueObjectQueryParams queryParams = new QueryApi.TestQueryStyleFormExplodeTrueObjectQueryParams() + .queryObject(null); + // String response = api.testQueryStyleFormExplodeTrueObject(queryParams); + + // TODO: test validations + } + +} diff --git a/samples/client/echo_api/java/feign-gson/src/test/java/org/openapitools/client/model/CategoryTest.java b/samples/client/echo_api/java/feign-gson/src/test/java/org/openapitools/client/model/CategoryTest.java new file mode 100644 index 0000000000..ab5409ab27 --- /dev/null +++ b/samples/client/echo_api/java/feign-gson/src/test/java/org/openapitools/client/model/CategoryTest.java @@ -0,0 +1,55 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * 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 java.io.IOException; +import org.junit.jupiter.api.Test; + + +/** + * Model tests for Category + */ +class CategoryTest { + private final Category model = new Category(); + + /** + * Model tests for Category + */ + @Test + void testCategory() { + // TODO: test Category + } + + /** + * Test the property 'id' + */ + @Test + void idTest() { + // TODO: test id + } + + /** + * Test the property 'name' + */ + @Test + void nameTest() { + // TODO: test name + } + +} diff --git a/samples/client/echo_api/java/feign-gson/src/test/java/org/openapitools/client/model/PetTest.java b/samples/client/echo_api/java/feign-gson/src/test/java/org/openapitools/client/model/PetTest.java new file mode 100644 index 0000000000..886e8dee6c --- /dev/null +++ b/samples/client/echo_api/java/feign-gson/src/test/java/org/openapitools/client/model/PetTest.java @@ -0,0 +1,91 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * 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 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.jupiter.api.Test; + + +/** + * Model tests for Pet + */ +class PetTest { + private final Pet model = new Pet(); + + /** + * Model tests for Pet + */ + @Test + void testPet() { + // TODO: test Pet + } + + /** + * Test the property 'id' + */ + @Test + void idTest() { + // TODO: test id + } + + /** + * Test the property 'name' + */ + @Test + void nameTest() { + // TODO: test name + } + + /** + * Test the property 'category' + */ + @Test + void categoryTest() { + // TODO: test category + } + + /** + * Test the property 'photoUrls' + */ + @Test + void photoUrlsTest() { + // TODO: test photoUrls + } + + /** + * Test the property 'tags' + */ + @Test + void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'status' + */ + @Test + void statusTest() { + // TODO: test status + } + +} diff --git a/samples/client/echo_api/java/feign-gson/src/test/java/org/openapitools/client/model/TagTest.java b/samples/client/echo_api/java/feign-gson/src/test/java/org/openapitools/client/model/TagTest.java new file mode 100644 index 0000000000..033deaceb7 --- /dev/null +++ b/samples/client/echo_api/java/feign-gson/src/test/java/org/openapitools/client/model/TagTest.java @@ -0,0 +1,55 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * 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 java.io.IOException; +import org.junit.jupiter.api.Test; + + +/** + * Model tests for Tag + */ +class TagTest { + private final Tag model = new Tag(); + + /** + * Model tests for Tag + */ + @Test + void testTag() { + // TODO: test Tag + } + + /** + * Test the property 'id' + */ + @Test + void idTest() { + // TODO: test id + } + + /** + * Test the property 'name' + */ + @Test + void nameTest() { + // TODO: test name + } + +} diff --git a/samples/client/echo_api/java/feign-gson/src/test/java/org/openapitools/client/model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameterTest.java b/samples/client/echo_api/java/feign-gson/src/test/java/org/openapitools/client/model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameterTest.java new file mode 100644 index 0000000000..3633d8e2ce --- /dev/null +++ b/samples/client/echo_api/java/feign-gson/src/test/java/org/openapitools/client/model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameterTest.java @@ -0,0 +1,49 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * 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 java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.junit.jupiter.api.Test; + + +/** + * Model tests for TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter + */ +class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameterTest { + private final TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter model = new TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter(); + + /** + * Model tests for TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter + */ + @Test + void testTestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter() { + // TODO: test TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter + } + + /** + * Test the property 'values' + */ + @Test + void valuesTest() { + // TODO: test values + } + +} diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/ApiClient.java index 8930598490..41b1d1e5cf 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/ApiClient.java @@ -6,7 +6,6 @@ import java.util.logging.Level; import java.util.logging.Logger; import feign.okhttp.OkHttpClient; - import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; @@ -43,8 +42,8 @@ public class ApiClient { private Feign.Builder feignBuilder; public ApiClient() { - objectMapper = createObjectMapper(); apiAuthorizations = new LinkedHashMap(); + objectMapper = createObjectMapper(); feignBuilder = Feign.builder() .client(new OkHttpClient()) .encoder(new FormEncoder(new JacksonEncoder(objectMapper))) @@ -141,6 +140,7 @@ public class ApiClient { } } + public ObjectMapper getObjectMapper(){ return objectMapper; } diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/ApiClient.java index b7116f494f..0923b7f67d 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/ApiClient.java @@ -6,7 +6,6 @@ import java.util.logging.Level; import java.util.logging.Logger; import feign.okhttp.OkHttpClient; - import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; @@ -44,8 +43,8 @@ public class ApiClient { private Feign.Builder feignBuilder; public ApiClient() { - objectMapper = createObjectMapper(); apiAuthorizations = new LinkedHashMap(); + objectMapper = createObjectMapper(); feignBuilder = Feign.builder() .client(new OkHttpClient()) .encoder(new FormEncoder(new JacksonEncoder(objectMapper))) @@ -148,6 +147,7 @@ public class ApiClient { } } + public ObjectMapper getObjectMapper(){ return objectMapper; } From 1cda5462f97fa382635fcc0899954998bf84762e Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sat, 17 Dec 2022 15:53:51 +0800 Subject: [PATCH 098/189] update resttemplate spring web to latest 5.x (#14275) --- .../resources/Java/libraries/resttemplate/build.gradle.mustache | 2 +- .../src/main/resources/Java/libraries/resttemplate/pom.mustache | 2 +- samples/client/petstore/java/resttemplate-swagger1/build.gradle | 2 +- samples/client/petstore/java/resttemplate-swagger1/pom.xml | 2 +- samples/client/petstore/java/resttemplate-withXml/build.gradle | 2 +- samples/client/petstore/java/resttemplate-withXml/pom.xml | 2 +- samples/client/petstore/java/resttemplate/build.gradle | 2 +- samples/client/petstore/java/resttemplate/pom.xml | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/build.gradle.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/build.gradle.mustache index 19dfe6d117..349ef54ab8 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/build.gradle.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/build.gradle.mustache @@ -104,7 +104,7 @@ ext { jackson_databind_nullable_version = "0.2.4" {{/openApiNullable}} jakarta_annotation_version = "1.3.5" - spring_web_version = "5.3.18" + spring_web_version = "5.3.24" jodatime_version = "2.9.9" junit_version = "4.13.2" } diff --git a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/pom.mustache b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/pom.mustache index 325bcef4f3..bd082fb430 100644 --- a/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/pom.mustache +++ b/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/pom.mustache @@ -309,7 +309,7 @@ UTF-8 1.6.9 - 5.3.18 + 5.3.24 2.14.1 2.14.1 {{#openApiNullable}} diff --git a/samples/client/petstore/java/resttemplate-swagger1/build.gradle b/samples/client/petstore/java/resttemplate-swagger1/build.gradle index fad7db2df9..4d8abb1c3e 100644 --- a/samples/client/petstore/java/resttemplate-swagger1/build.gradle +++ b/samples/client/petstore/java/resttemplate-swagger1/build.gradle @@ -102,7 +102,7 @@ ext { jackson_databind_version = "2.14.1" jackson_databind_nullable_version = "0.2.4" jakarta_annotation_version = "1.3.5" - spring_web_version = "5.3.18" + spring_web_version = "5.3.24" jodatime_version = "2.9.9" junit_version = "4.13.2" } diff --git a/samples/client/petstore/java/resttemplate-swagger1/pom.xml b/samples/client/petstore/java/resttemplate-swagger1/pom.xml index 9f99df0f36..d0df05cc6d 100644 --- a/samples/client/petstore/java/resttemplate-swagger1/pom.xml +++ b/samples/client/petstore/java/resttemplate-swagger1/pom.xml @@ -272,7 +272,7 @@ UTF-8 1.6.9 - 5.3.18 + 5.3.24 2.14.1 2.14.1 0.2.4 diff --git a/samples/client/petstore/java/resttemplate-withXml/build.gradle b/samples/client/petstore/java/resttemplate-withXml/build.gradle index 9f675fe177..5706757001 100644 --- a/samples/client/petstore/java/resttemplate-withXml/build.gradle +++ b/samples/client/petstore/java/resttemplate-withXml/build.gradle @@ -102,7 +102,7 @@ ext { jackson_databind_version = "2.14.1" jackson_databind_nullable_version = "0.2.4" jakarta_annotation_version = "1.3.5" - spring_web_version = "5.3.18" + spring_web_version = "5.3.24" jodatime_version = "2.9.9" junit_version = "4.13.2" } diff --git a/samples/client/petstore/java/resttemplate-withXml/pom.xml b/samples/client/petstore/java/resttemplate-withXml/pom.xml index 1fea82ac76..d7a171c4f9 100644 --- a/samples/client/petstore/java/resttemplate-withXml/pom.xml +++ b/samples/client/petstore/java/resttemplate-withXml/pom.xml @@ -279,7 +279,7 @@ UTF-8 1.6.9 - 5.3.18 + 5.3.24 2.14.1 2.14.1 0.2.4 diff --git a/samples/client/petstore/java/resttemplate/build.gradle b/samples/client/petstore/java/resttemplate/build.gradle index fad7db2df9..4d8abb1c3e 100644 --- a/samples/client/petstore/java/resttemplate/build.gradle +++ b/samples/client/petstore/java/resttemplate/build.gradle @@ -102,7 +102,7 @@ ext { jackson_databind_version = "2.14.1" jackson_databind_nullable_version = "0.2.4" jakarta_annotation_version = "1.3.5" - spring_web_version = "5.3.18" + spring_web_version = "5.3.24" jodatime_version = "2.9.9" junit_version = "4.13.2" } diff --git a/samples/client/petstore/java/resttemplate/pom.xml b/samples/client/petstore/java/resttemplate/pom.xml index 922f7528c4..bcfec498cd 100644 --- a/samples/client/petstore/java/resttemplate/pom.xml +++ b/samples/client/petstore/java/resttemplate/pom.xml @@ -267,7 +267,7 @@ UTF-8 1.6.9 - 5.3.18 + 5.3.24 2.14.1 2.14.1 0.2.4 From 680090512369c5a00f9f301dfc75e22d83a129c1 Mon Sep 17 00:00:00 2001 From: Yohei Kitamura Date: Sat, 17 Dec 2022 02:58:04 -0500 Subject: [PATCH 099/189] [ruby] Fix api_error.mustache to initialize message-only errors properly (#14264) --- .../src/main/resources/ruby-client/api_error.mustache | 1 + samples/client/petstore/ruby-autoload/lib/petstore/api_error.rb | 1 + samples/client/petstore/ruby-faraday/lib/petstore/api_error.rb | 1 + samples/client/petstore/ruby/lib/petstore/api_error.rb | 1 + .../x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api_error.rb | 1 + .../dynamic-servers/ruby/lib/dynamic_servers/api_error.rb | 1 + .../ruby-client/lib/petstore/api_error.rb | 1 + 7 files changed, 7 insertions(+) diff --git a/modules/openapi-generator/src/main/resources/ruby-client/api_error.mustache b/modules/openapi-generator/src/main/resources/ruby-client/api_error.mustache index 6d1967b7ba..304d55db4b 100644 --- a/modules/openapi-generator/src/main/resources/ruby-client/api_error.mustache +++ b/modules/openapi-generator/src/main/resources/ruby-client/api_error.mustache @@ -24,6 +24,7 @@ module {{moduleName}} end else super arg + @message = arg end end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/api_error.rb b/samples/client/petstore/ruby-autoload/lib/petstore/api_error.rb index 08048f68e3..9ea6651dff 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/api_error.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/api_error.rb @@ -32,6 +32,7 @@ module Petstore end else super arg + @message = arg end end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api_error.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api_error.rb index 08048f68e3..9ea6651dff 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api_error.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api_error.rb @@ -32,6 +32,7 @@ module Petstore end else super arg + @message = arg end end diff --git a/samples/client/petstore/ruby/lib/petstore/api_error.rb b/samples/client/petstore/ruby/lib/petstore/api_error.rb index 08048f68e3..9ea6651dff 100644 --- a/samples/client/petstore/ruby/lib/petstore/api_error.rb +++ b/samples/client/petstore/ruby/lib/petstore/api_error.rb @@ -32,6 +32,7 @@ module Petstore end else super arg + @message = arg end end diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api_error.rb b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api_error.rb index 7bedb990d0..22ba8538d0 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api_error.rb +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api_error.rb @@ -32,6 +32,7 @@ module XAuthIDAlias end else super arg + @message = arg end end diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api_error.rb b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api_error.rb index 28dbdeeb09..d7e0d30b70 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api_error.rb +++ b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api_error.rb @@ -32,6 +32,7 @@ module DynamicServers end else super arg + @message = arg end end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api_error.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api_error.rb index 2d9b7b1229..7716ddd44e 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api_error.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api_error.rb @@ -32,6 +32,7 @@ module Petstore end else super arg + @message = arg end end From 0cf5ed619dbe61058a1ea4cdc68fe2be42777757 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sat, 17 Dec 2022 16:05:47 +0800 Subject: [PATCH 100/189] Add a new Python client generator - python-nextgen (#14157) * add python-nextgen generator * remove client_side_validation from model * remove configuraiton import from models * add inheritance support * update test requirements, tox * add typings, pydanic to models * add test model * minor improvements * add enum support * add typing for parameters, remove validations * add oneof, anyof support * fix default value * fix deserialization, api tests passed * private variable naming, update tests, all tests passed * remove six * remove nose * update doc * remove sortParamsByRequiredFlag option * add parameter validation * add validation tests * simplify Field() * remove previous required parameter validation * improve parameter handling * support discriminator mapping * better typing discriminator mapping * format test code * fix tests * fix oneOf from_dict, add test * add set validation test * fix nested oneof serialization, add tests * add model import * remove models. prefix * remove import models * remove model import from api * simplify from_dict * add typing for return * skip pydantic import in return type * fix tests, fix enum * restore more enum schema tests * uncomment enum integer test * clean up getfullargspec import in model * clean up getfullargspec import * fix deserilizatoin for nested oneof * minor fixes, add tests * fix regular expression * add aiohttp samples, add tests * remove default content type to json * update template * fix select accept, content-type * move tests * move tests * fix url query parameters * fix list * fix samples * fix param pydantic, add list as reserved word * fix auto-generated doc * fix readme * fix list, fix special variable name with var_ * fix Literal in python 3.7 * fix default configuration * fix aiohttp tests * set default api client instance * deprecate get_default_copy method * fix enum model * fix enum serializatio/deserialization * add github workflow support * add regular expression validator * add enum validator * better model import * fix file, remove x-py-import-models * rename local var * better model example * fix regular expression warning, add special_name test, whitelist schema * skip self import * update samples * various fixes * add base64, json as reserved word * add http signature support * add http signature test * add additioanl properties support in python client * add decimal support * use strictstr instead of constr * fix test with virtualenv * add nullable support * add readonly support * add model name caching * fix circular reference import * add onelook discriminator lookup * add tests * update samples * fix locale * Fix client legacy generator asyncio README code example * test python-nextgen in circleci * fix pom.xml * update python to 3.7.15 * test with python 3.7.12 * various updates * fix python legacy --- CI/circle_parallel.sh | 4 +- bin/configs/python-nextgen-aiohttp.yaml | 7 + bin/configs/python-nextgen.yaml | 8 + docs/generators.md | 1 + docs/generators/python-legacy.md | 2 + docs/generators/python-nextgen.md | 225 ++ docs/generators/python-prior.md | 2 + docs/generators/python.md | 2 + .../openapitools/codegen/DefaultCodegen.java | 25 +- .../languages/AbstractPythonCodegen.java | 30 +- .../languages/PythonLegacyClientCodegen.java | 17 + .../languages/PythonNextgenClientCodegen.java | 1314 +++++++++ .../org.openapitools.codegen.CodegenConfig | 1 + .../python-legacy/api_client.mustache | 4 +- .../resources/python-nextgen/README.mustache | 55 + .../README_onlypackage.mustache | 44 + .../python-nextgen/__init__.mustache | 0 .../python-nextgen/__init__api.mustache | 7 + .../python-nextgen/__init__model.mustache | 13 + .../python-nextgen/__init__package.mustache | 32 + .../resources/python-nextgen/api.mustache | 264 ++ .../python-nextgen/api_client.mustache | 778 +++++ .../resources/python-nextgen/api_doc.mustache | 76 + .../python-nextgen/api_doc_example.mustache | 33 + .../python-nextgen/api_test.mustache | 37 + .../python-nextgen/asyncio/rest.mustache | 241 ++ .../python-nextgen/common_README.mustache | 83 + .../python-nextgen/configuration.mustache | 651 +++++ .../python-nextgen/exceptions.mustache | 152 + .../python-nextgen/git_push.sh.mustache | 57 + .../python-nextgen/github-workflow.mustache | 38 + .../python-nextgen/gitignore.mustache | 66 + .../python-nextgen/gitlab-ci.mustache | 25 + .../resources/python-nextgen/model.mustache | 14 + .../python-nextgen/model_anyof.mustache | 95 + .../python-nextgen/model_doc.mustache | 33 + .../python-nextgen/model_enum.mustache | 32 + .../python-nextgen/model_generic.mustache | 258 ++ .../python-nextgen/model_oneof.mustache | 131 + .../python-nextgen/model_test.mustache | 64 + .../python-nextgen/partial_header.mustache | 17 + .../python_doc_auth_partial.mustache | 105 + .../python-nextgen/requirements.mustache | 8 + .../resources/python-nextgen/rest.mustache | 288 ++ .../resources/python-nextgen/setup.mustache | 55 + .../python-nextgen/setup_cfg.mustache | 2 + .../resources/python-nextgen/signing.mustache | 408 +++ .../python-nextgen/test-requirements.mustache | 6 + .../python-nextgen/tornado/rest.mustache | 223 ++ .../resources/python-nextgen/tox.mustache | 9 + .../resources/python-nextgen/travis.mustache | 17 + .../python/PythonLegacyClientCodegenTest.java | 4 +- .../PythonNextgenClientCodegenTest.java | 385 +++ ...ith-fake-endpoints-models-for-testing.yaml | 2018 +++++++++++++ pom.xml | 2 + .../docs/AdditionalPropertiesClass.md | 16 +- .../petstore/python-asyncio/docs/FakeApi.md | 4 +- .../petstore/python-asyncio/docs/MapTest.md | 8 +- ...dPropertiesAndAdditionalPropertiesClass.md | 2 +- .../petstore/python-asyncio/docs/StoreApi.md | 4 +- .../petstore_api/api/fake_api.py | 4 +- .../petstore_api/api/store_api.py | 6 +- .../python-asyncio/petstore_api/api_client.py | 4 +- .../models/additional_properties_class.py | 48 +- .../petstore_api/models/map_test.py | 24 +- ...perties_and_additional_properties_class.py | 6 +- .../docs/AdditionalPropertiesClass.md | 16 +- .../petstore/python-legacy/docs/FakeApi.md | 4 +- .../petstore/python-legacy/docs/MapTest.md | 8 +- ...dPropertiesAndAdditionalPropertiesClass.md | 2 +- .../petstore/python-legacy/docs/StoreApi.md | 4 +- .../petstore_api/api/fake_api.py | 4 +- .../petstore_api/api/store_api.py | 6 +- .../python-legacy/petstore_api/api_client.py | 4 +- .../models/additional_properties_class.py | 48 +- .../petstore_api/models/map_test.py | 24 +- ...perties_and_additional_properties_class.py | 6 +- .../tests/test_deserialization.py | 10 +- .../docs/AdditionalPropertiesClass.md | 16 +- .../petstore/python-tornado/docs/FakeApi.md | 4 +- .../petstore/python-tornado/docs/MapTest.md | 8 +- ...dPropertiesAndAdditionalPropertiesClass.md | 2 +- .../petstore/python-tornado/docs/StoreApi.md | 4 +- .../petstore_api/api/fake_api.py | 4 +- .../petstore_api/api/store_api.py | 6 +- .../python-tornado/petstore_api/api_client.py | 4 +- .../models/additional_properties_class.py | 48 +- .../petstore_api/models/map_test.py | 24 +- ...perties_and_additional_properties_class.py | 6 +- .../docs/AdditionalPropertiesClass.md | 4 +- .../petstore/python-legacy/docs/FakeApi.md | 8 +- .../petstore/python-legacy/docs/MapTest.md | 8 +- ...dPropertiesAndAdditionalPropertiesClass.md | 2 +- .../python-legacy/docs/NullableClass.md | 6 +- .../petstore/python-legacy/docs/StoreApi.md | 4 +- .../petstore_api/api/fake_api.py | 8 +- .../petstore_api/api/store_api.py | 6 +- .../python-legacy/petstore_api/api_client.py | 4 +- .../models/additional_properties_class.py | 12 +- .../petstore_api/models/map_test.py | 24 +- ...perties_and_additional_properties_class.py | 6 +- .../petstore_api/models/nullable_class.py | 18 +- .../.github/workflows/python.yml | 37 + .../python-nextgen-aiohttp/.gitignore | 66 + .../python-nextgen-aiohttp/.gitlab-ci.yml | 25 + .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 146 + .../.openapi-generator/VERSION | 1 + .../python-nextgen-aiohttp/.travis.yml | 17 + .../petstore/python-nextgen-aiohttp/README.md | 232 ++ .../dev-requirements.txt | 2 + .../docs/AdditionalPropertiesClass.md | 29 + .../docs/AllOfWithSingleRef.md | 29 + .../python-nextgen-aiohttp/docs/Animal.md | 29 + .../docs/AnotherFakeApi.md | 73 + .../python-nextgen-aiohttp/docs/AnyOfPig.md | 30 + .../docs/ApiResponse.md | 30 + .../docs/ArrayOfArrayOfNumberOnly.md | 28 + .../docs/ArrayOfNumberOnly.md | 28 + .../python-nextgen-aiohttp/docs/ArrayTest.md | 30 + .../python-nextgen-aiohttp/docs/BasquePig.md | 29 + .../docs/Capitalization.md | 33 + .../python-nextgen-aiohttp/docs/Cat.md | 28 + .../python-nextgen-aiohttp/docs/CatAllOf.md | 28 + .../python-nextgen-aiohttp/docs/Category.md | 29 + .../python-nextgen-aiohttp/docs/ClassModel.md | 29 + .../python-nextgen-aiohttp/docs/Client.md | 28 + .../python-nextgen-aiohttp/docs/DanishPig.md | 29 + .../python-nextgen-aiohttp/docs/DefaultApi.md | 66 + .../docs/DeprecatedObject.md | 28 + .../python-nextgen-aiohttp/docs/Dog.md | 28 + .../python-nextgen-aiohttp/docs/DogAllOf.md | 28 + .../python-nextgen-aiohttp/docs/DummyModel.md | 29 + .../python-nextgen-aiohttp/docs/EnumArrays.md | 29 + .../python-nextgen-aiohttp/docs/EnumClass.md | 10 + .../python-nextgen-aiohttp/docs/EnumTest.md | 35 + .../python-nextgen-aiohttp/docs/FakeApi.md | 1153 ++++++++ .../docs/FakeClassnameTags123Api.md | 84 + .../python-nextgen-aiohttp/docs/File.md | 29 + .../docs/FileSchemaTestClass.md | 29 + .../python-nextgen-aiohttp/docs/Foo.md | 28 + .../docs/FooGetDefaultResponse.md | 28 + .../python-nextgen-aiohttp/docs/FormatTest.md | 43 + .../docs/HasOnlyReadOnly.md | 29 + .../docs/HealthCheckResult.md | 29 + .../python-nextgen-aiohttp/docs/List.md | 28 + .../python-nextgen-aiohttp/docs/MapTest.md | 31 + ...dPropertiesAndAdditionalPropertiesClass.md | 30 + .../docs/Model200Response.md | 30 + .../docs/ModelReturn.md | 29 + .../python-nextgen-aiohttp/docs/Name.md | 32 + .../docs/NullableClass.md | 40 + .../python-nextgen-aiohttp/docs/NumberOnly.md | 28 + .../docs/ObjectWithDeprecatedFields.md | 31 + .../python-nextgen-aiohttp/docs/Order.md | 33 + .../docs/OuterComposite.md | 30 + .../python-nextgen-aiohttp/docs/OuterEnum.md | 10 + .../docs/OuterEnumDefaultValue.md | 10 + .../docs/OuterEnumInteger.md | 10 + .../docs/OuterEnumIntegerDefaultValue.md | 10 + .../docs/OuterObjectWithEnumProperty.md | 29 + .../python-nextgen-aiohttp/docs/Pet.md | 33 + .../python-nextgen-aiohttp/docs/PetApi.md | 1292 +++++++++ .../python-nextgen-aiohttp/docs/Pig.md | 30 + .../docs/ReadOnlyFirst.md | 29 + .../docs/SelfReferenceModel.md | 29 + .../docs/SingleRefType.md | 10 + .../docs/SpecialModelName.md | 28 + .../docs/SpecialName.md | 30 + .../python-nextgen-aiohttp/docs/StoreApi.md | 277 ++ .../python-nextgen-aiohttp/docs/Tag.md | 29 + .../python-nextgen-aiohttp/docs/User.md | 35 + .../python-nextgen-aiohttp/docs/UserApi.md | 521 ++++ .../docs/WithNestedOneOf.md | 29 + .../python-nextgen-aiohttp/git_push.sh | 57 + .../petstore_api/__init__.py | 93 + .../petstore_api/api/__init__.py | 12 + .../petstore_api/api/another_fake_api.py | 191 ++ .../petstore_api/api/default_api.py | 172 ++ .../petstore_api/api/fake_api.py | 2564 +++++++++++++++++ .../api/fake_classname_tags123_api.py | 191 ++ .../petstore_api/api/pet_api.py | 1397 +++++++++ .../petstore_api/api/store_api.py | 612 ++++ .../petstore_api/api/user_api.py | 1204 ++++++++ .../petstore_api/api_client.py | 753 +++++ .../petstore_api/configuration.py | 626 ++++ .../petstore_api/exceptions.py | 160 + .../petstore_api/models/__init__.py | 72 + .../models/additional_properties_class.py | 72 + .../models/all_of_with_single_ref.py | 75 + .../petstore_api/models/animal.py | 89 + .../petstore_api/models/any_of_pig.py | 105 + .../petstore_api/models/api_response.py | 74 + .../models/array_of_array_of_number_only.py | 70 + .../models/array_of_number_only.py | 70 + .../petstore_api/models/array_test.py | 82 + .../petstore_api/models/basque_pig.py | 72 + .../petstore_api/models/capitalization.py | 80 + .../petstore_api/models/cat.py | 73 + .../petstore_api/models/cat_all_of.py | 70 + .../petstore_api/models/category.py | 72 + .../petstore_api/models/class_model.py | 70 + .../petstore_api/models/client.py | 70 + .../petstore_api/models/danish_pig.py | 72 + .../petstore_api/models/deprecated_object.py | 70 + .../petstore_api/models/dog.py | 73 + .../petstore_api/models/dog_all_of.py | 70 + .../petstore_api/models/dummy_model.py | 75 + .../petstore_api/models/enum_arrays.py | 90 + .../petstore_api/models/enum_class.py | 36 + .../petstore_api/models/enum_test.py | 125 + .../petstore_api/models/file.py | 70 + .../models/file_schema_test_class.py | 83 + .../petstore_api/models/foo.py | 70 + .../models/foo_get_default_response.py | 74 + .../petstore_api/models/format_test.py | 118 + .../petstore_api/models/has_only_read_only.py | 74 + .../models/health_check_result.py | 74 + .../petstore_api/models/list.py | 70 + .../petstore_api/models/map_test.py | 85 + ...perties_and_additional_properties_class.py | 82 + .../petstore_api/models/model200_response.py | 72 + .../petstore_api/models/model_return.py | 70 + .../petstore_api/models/name.py | 78 + .../petstore_api/models/nullable_class.py | 138 + .../petstore_api/models/number_only.py | 70 + .../models/object_with_deprecated_fields.py | 80 + .../petstore_api/models/order.py | 89 + .../petstore_api/models/outer_composite.py | 74 + .../petstore_api/models/outer_enum.py | 36 + .../models/outer_enum_default_value.py | 36 + .../petstore_api/models/outer_enum_integer.py | 36 + .../outer_enum_integer_default_value.py | 36 + .../models/outer_object_with_enum_property.py | 78 + .../petstore_api/models/pet.py | 101 + .../petstore_api/models/pig.py | 126 + .../petstore_api/models/read_only_first.py | 73 + .../models/self_reference_model.py | 75 + .../petstore_api/models/single_ref_type.py | 35 + .../petstore_api/models/special_model_name.py | 70 + .../petstore_api/models/special_name.py | 87 + .../petstore_api/models/tag.py | 72 + .../petstore_api/models/user.py | 84 + .../petstore_api/models/with_nested_one_of.py | 76 + .../petstore_api/rest.py | 249 ++ .../petstore_api/signing.py | 416 +++ .../petstore/python-nextgen-aiohttp/pom.xml | 46 + .../python-nextgen-aiohttp/requirements.txt | 6 + .../petstore/python-nextgen-aiohttp/setup.cfg | 2 + .../petstore/python-nextgen-aiohttp/setup.py | 50 + .../test-requirements.txt | 4 + .../python-nextgen-aiohttp/test/__init__.py | 0 .../test/test_additional_properties_class.py | 58 + .../test/test_all_of_with_single_ref.py | 52 + .../test/test_animal.py | 53 + .../test/test_another_fake_api.py | 40 + .../test/test_any_of_pig.py | 56 + .../test/test_api_response.py | 53 + .../test_array_of_array_of_number_only.py | 55 + .../test/test_array_of_number_only.py | 53 + .../test/test_array_test.py | 65 + .../test/test_basque_pig.py | 54 + .../test/test_capitalization.py | 56 + .../python-nextgen-aiohttp/test/test_cat.py | 51 + .../test/test_cat_all_of.py | 51 + .../test/test_category.py | 53 + .../test/test_class_model.py | 51 + .../test/test_client.py | 51 + .../test/test_danish_pig.py | 54 + .../test/test_default_api.py | 39 + .../test/test_deprecated_object.py | 51 + .../python-nextgen-aiohttp/test/test_dog.py | 51 + .../test/test_dog_all_of.py | 51 + .../test/test_dummy_model.py | 58 + .../test/test_enum_arrays.py | 54 + .../test/test_enum_class.py | 36 + .../test/test_enum_test.py | 55 + .../test/test_fake_api.py | 136 + .../test/test_fake_classname_tags123_api.py | 40 + .../python-nextgen-aiohttp/test/test_file.py | 51 + .../test/test_file_schema_test_class.py | 56 + .../python-nextgen-aiohttp/test/test_foo.py | 51 + .../test/test_foo_get_default_response.py | 52 + .../test/test_format_test.py | 69 + .../test/test_has_only_read_only.py | 52 + .../test/test_health_check_result.py | 51 + .../python-nextgen-aiohttp/test/test_list.py | 51 + .../test/test_map_test.py | 64 + ...perties_and_additional_properties_class.py | 57 + .../test/test_model200_response.py | 52 + .../test/test_model_return.py | 51 + .../python-nextgen-aiohttp/test/test_name.py | 55 + .../test/test_nullable_class.py | 76 + .../test/test_number_only.py | 51 + .../test_object_with_deprecated_fields.py | 57 + .../python-nextgen-aiohttp/test/test_order.py | 56 + .../test/test_outer_composite.py | 53 + .../test/test_outer_enum.py | 36 + .../test/test_outer_enum_default_value.py | 36 + .../test/test_outer_enum_integer.py | 36 + .../test_outer_enum_integer_default_value.py | 36 + .../test_outer_object_with_enum_property.py | 52 + .../python-nextgen-aiohttp/test/test_pet.py | 68 + .../test/test_pet_api.py | 96 + .../python-nextgen-aiohttp/test/test_pig.py | 56 + .../test/test_read_only_first.py | 52 + .../test/test_self_reference_model.py | 60 + .../test/test_single_ref_type.py | 36 + .../test/test_special_model_name.py | 51 + .../test/test_special_name.py | 58 + .../test/test_store_api.py | 61 + .../python-nextgen-aiohttp/test/test_tag.py | 52 + .../python-nextgen-aiohttp/test/test_user.py | 58 + .../test/test_user_api.py | 89 + .../test/test_with_nested_one_of.py | 52 + .../python-nextgen-aiohttp/test_python3.sh | 31 + .../python-nextgen-aiohttp/testfiles/foo.png | Bin 0 -> 43280 bytes .../python-nextgen-aiohttp/tests/__init__.py | 0 .../tests/test_api_client.py | 27 + .../tests/test_model.py | 228 ++ .../tests/test_pet_api.py | 203 ++ .../tests/test_pet_model.py | 114 + .../python-nextgen-aiohttp/tests/util.py | 18 + .../petstore/python-nextgen-aiohttp/tox.ini | 9 + .../.github/workflows/python.yml | 37 + .../client/petstore/python-nextgen/.gitignore | 66 + .../petstore/python-nextgen/.gitlab-ci.yml | 25 + .../python-nextgen/.openapi-generator-ignore | 24 + .../python-nextgen/.openapi-generator/FILES | 145 + .../python-nextgen/.openapi-generator/VERSION | 1 + .../petstore/python-nextgen/.travis.yml | 17 + .../client/petstore/python-nextgen/Makefile | 21 + .../client/petstore/python-nextgen/README.md | 232 ++ .../python-nextgen/dev-requirements.txt | 2 + .../docs/AdditionalPropertiesClass.md | 29 + .../python-nextgen/docs/AllOfWithSingleRef.md | 29 + .../petstore/python-nextgen/docs/Animal.md | 29 + .../python-nextgen/docs/AnotherFakeApi.md | 73 + .../petstore/python-nextgen/docs/AnyOfPig.md | 30 + .../python-nextgen/docs/ApiResponse.md | 30 + .../docs/ArrayOfArrayOfNumberOnly.md | 28 + .../python-nextgen/docs/ArrayOfNumberOnly.md | 28 + .../petstore/python-nextgen/docs/ArrayTest.md | 30 + .../petstore/python-nextgen/docs/BasquePig.md | 29 + .../python-nextgen/docs/Capitalization.md | 33 + .../petstore/python-nextgen/docs/Cat.md | 28 + .../petstore/python-nextgen/docs/CatAllOf.md | 28 + .../petstore/python-nextgen/docs/Category.md | 29 + .../python-nextgen/docs/ClassModel.md | 29 + .../petstore/python-nextgen/docs/Client.md | 28 + .../petstore/python-nextgen/docs/DanishPig.md | 29 + .../python-nextgen/docs/DefaultApi.md | 66 + .../python-nextgen/docs/DeprecatedObject.md | 28 + .../petstore/python-nextgen/docs/Dog.md | 28 + .../petstore/python-nextgen/docs/DogAllOf.md | 28 + .../python-nextgen/docs/DummyModel.md | 29 + .../python-nextgen/docs/EnumArrays.md | 29 + .../petstore/python-nextgen/docs/EnumClass.md | 10 + .../petstore/python-nextgen/docs/EnumTest.md | 35 + .../petstore/python-nextgen/docs/FakeApi.md | 1153 ++++++++ .../docs/FakeClassnameTags123Api.md | 84 + .../petstore/python-nextgen/docs/File.md | 29 + .../docs/FileSchemaTestClass.md | 29 + .../petstore/python-nextgen/docs/Foo.md | 28 + .../docs/FooGetDefaultResponse.md | 28 + .../python-nextgen/docs/FormatTest.md | 43 + .../python-nextgen/docs/HasOnlyReadOnly.md | 29 + .../python-nextgen/docs/HealthCheckResult.md | 29 + .../python-nextgen/docs/InlineObject.md | 11 + .../python-nextgen/docs/InlineObject1.md | 11 + .../python-nextgen/docs/InlineObject2.md | 11 + .../python-nextgen/docs/InlineObject3.md | 23 + .../python-nextgen/docs/InlineObject4.md | 11 + .../python-nextgen/docs/InlineObject5.md | 11 + .../docs/InlineResponseDefault.md | 11 + .../petstore/python-nextgen/docs/List.md | 28 + .../petstore/python-nextgen/docs/MapTest.md | 31 + ...dPropertiesAndAdditionalPropertiesClass.md | 30 + .../python-nextgen/docs/Model200Response.md | 30 + .../python-nextgen/docs/ModelReturn.md | 29 + .../python-nextgen/docs/Model_200Response.md | 13 + .../python-nextgen/docs/Model_Return.md | 12 + .../petstore/python-nextgen/docs/Name.md | 32 + .../python-nextgen/docs/NestedOneOf.md | 12 + .../python-nextgen/docs/NullableClass.md | 40 + .../python-nextgen/docs/NumberOnly.md | 28 + .../docs/ObjectWithDeprecatedFields.md | 31 + .../petstore/python-nextgen/docs/Order.md | 33 + .../python-nextgen/docs/OuterComposite.md | 30 + .../petstore/python-nextgen/docs/OuterEnum.md | 10 + .../docs/OuterEnumDefaultValue.md | 10 + .../python-nextgen/docs/OuterEnumInteger.md | 10 + .../docs/OuterEnumIntegerDefaultValue.md | 10 + .../docs/OuterObjectWithEnumProperty.md | 29 + .../petstore/python-nextgen/docs/Pet.md | 33 + .../petstore/python-nextgen/docs/PetApi.md | 1292 +++++++++ .../petstore/python-nextgen/docs/Pig.md | 30 + .../python-nextgen/docs/ReadOnlyFirst.md | 29 + .../python-nextgen/docs/SelfReferenceModel.md | 29 + .../python-nextgen/docs/SingleRefType.md | 10 + .../python-nextgen/docs/SpecialModelName.md | 28 + .../python-nextgen/docs/SpecialName.md | 30 + .../petstore/python-nextgen/docs/StoreApi.md | 277 ++ .../petstore/python-nextgen/docs/Tag.md | 29 + .../petstore/python-nextgen/docs/User.md | 35 + .../petstore/python-nextgen/docs/UserApi.md | 521 ++++ .../python-nextgen/docs/WithNestedOneOf.md | 29 + .../petstore/python-nextgen/git_push.sh | 57 + .../python-nextgen/petstore_api/__init__.py | 93 + .../petstore_api/api/__init__.py | 12 + .../petstore_api/api/another_fake_api.py | 191 ++ .../petstore_api/api/default_api.py | 172 ++ .../petstore_api/api/fake_api.py | 2564 +++++++++++++++++ .../api/fake_classname_tags123_api.py | 191 ++ .../api/fake_classname_tags_123_api.py | 181 ++ .../petstore_api/api/pet_api.py | 1397 +++++++++ .../petstore_api/api/store_api.py | 612 ++++ .../petstore_api/api/user_api.py | 1204 ++++++++ .../python-nextgen/petstore_api/api_client.py | 752 +++++ .../petstore_api/configuration.py | 630 ++++ .../python-nextgen/petstore_api/exceptions.py | 160 + .../petstore_api/models/__init__.py | 72 + .../models/additional_properties_class.py | 84 + .../models/all_of_with_single_ref.py | 87 + .../petstore_api/models/animal.py | 96 + .../petstore_api/models/any_of_pig.py | 105 + .../petstore_api/models/api_response.py | 86 + .../models/array_of_array_of_number_only.py | 82 + .../models/array_of_number_only.py | 82 + .../petstore_api/models/array_test.py | 94 + .../petstore_api/models/basque_pig.py | 84 + .../petstore_api/models/capitalization.py | 92 + .../python-nextgen/petstore_api/models/cat.py | 85 + .../petstore_api/models/cat_all_of.py | 82 + .../petstore_api/models/category.py | 84 + .../petstore_api/models/class_model.py | 82 + .../petstore_api/models/client.py | 82 + .../petstore_api/models/danish_pig.py | 84 + .../petstore_api/models/deprecated_object.py | 82 + .../python-nextgen/petstore_api/models/dog.py | 85 + .../petstore_api/models/dog_all_of.py | 82 + .../petstore_api/models/dummy_model.py | 87 + .../petstore_api/models/enum_arrays.py | 102 + .../petstore_api/models/enum_class.py | 36 + .../petstore_api/models/enum_test.py | 137 + .../petstore_api/models/file.py | 82 + .../models/file_schema_test_class.py | 95 + .../python-nextgen/petstore_api/models/foo.py | 82 + .../models/foo_get_default_response.py | 86 + .../petstore_api/models/format_test.py | 130 + .../petstore_api/models/has_only_read_only.py | 86 + .../models/health_check_result.py | 86 + .../petstore_api/models/list.py | 82 + .../petstore_api/models/map_test.py | 97 + ...perties_and_additional_properties_class.py | 94 + .../petstore_api/models/model200_response.py | 84 + .../petstore_api/models/model_return.py | 82 + .../petstore_api/models/name.py | 90 + .../petstore_api/models/nullable_class.py | 138 + .../petstore_api/models/number_only.py | 82 + .../models/object_with_deprecated_fields.py | 92 + .../petstore_api/models/order.py | 101 + .../petstore_api/models/outer_composite.py | 86 + .../petstore_api/models/outer_enum.py | 36 + .../models/outer_enum_default_value.py | 36 + .../petstore_api/models/outer_enum_integer.py | 36 + .../outer_enum_integer_default_value.py | 36 + .../models/outer_object_with_enum_property.py | 90 + .../python-nextgen/petstore_api/models/pet.py | 113 + .../python-nextgen/petstore_api/models/pig.py | 141 + .../petstore_api/models/read_only_first.py | 85 + .../models/self_reference_model.py | 87 + .../petstore_api/models/single_ref_type.py | 35 + .../petstore_api/models/special_model_name.py | 82 + .../petstore_api/models/special_name.py | 99 + .../python-nextgen/petstore_api/models/tag.py | 84 + .../petstore_api/models/user.py | 96 + .../petstore_api/models/with_nested_one_of.py | 88 + .../python-nextgen/petstore_api/rest.py | 296 ++ .../python-nextgen/petstore_api/signing.py | 416 +++ .../client/petstore/python-nextgen/pom.xml | 46 + .../petstore/python-nextgen/requirements.txt | 5 + .../client/petstore/python-nextgen/setup.cfg | 2 + .../client/petstore/python-nextgen/setup.py | 49 + .../python-nextgen/test-requirements.txt | 4 + .../petstore/python-nextgen/test/__init__.py | 0 .../test/test_additional_properties_class.py | 58 + .../test/test_all_of_with_single_ref.py | 52 + .../python-nextgen/test/test_animal.py | 53 + .../test/test_another_fake_api.py | 40 + .../python-nextgen/test/test_any_of_pig.py | 37 + .../python-nextgen/test/test_api_response.py | 53 + .../test_array_of_array_of_number_only.py | 55 + .../test/test_array_of_number_only.py | 53 + .../python-nextgen/test/test_array_test.py | 65 + .../python-nextgen/test/test_basque_pig.py | 54 + .../test/test_capitalization.py | 56 + .../petstore/python-nextgen/test/test_cat.py | 37 + .../python-nextgen/test/test_cat_all_of.py | 51 + .../python-nextgen/test/test_category.py | 53 + .../python-nextgen/test/test_class_model.py | 51 + .../python-nextgen/test/test_client.py | 51 + .../python-nextgen/test/test_configuration.py | 54 + .../python-nextgen/test/test_danish_pig.py | 54 + .../python-nextgen/test/test_default_api.py | 39 + .../test/test_deprecated_object.py | 51 + .../petstore/python-nextgen/test/test_dog.py | 37 + .../python-nextgen/test/test_dog_all_of.py | 51 + .../python-nextgen/test/test_dummy_model.py | 58 + .../python-nextgen/test/test_enum_arrays.py | 54 + .../python-nextgen/test/test_enum_class.py | 36 + .../python-nextgen/test/test_enum_test.py | 59 + .../python-nextgen/test/test_fake_api.py | 146 + .../test/test_fake_classname_tags123_api.py | 40 + .../test/test_fake_classname_tags_123_api.py | 40 + .../petstore/python-nextgen/test/test_file.py | 51 + .../test/test_file_schema_test_class.py | 56 + .../petstore/python-nextgen/test/test_foo.py | 51 + .../test/test_foo_get_default_response.py | 52 + .../python-nextgen/test/test_format_test.py | 71 + .../test/test_has_only_read_only.py | 52 + .../test/test_health_check_result.py | 51 + .../petstore/python-nextgen/test/test_list.py | 51 + .../python-nextgen/test/test_map_test.py | 65 + ...perties_and_additional_properties_class.py | 57 + .../test/test_model200_response.py | 52 + .../python-nextgen/test/test_model_return.py | 51 + .../petstore/python-nextgen/test/test_name.py | 55 + .../test/test_nullable_class.py | 77 + .../python-nextgen/test/test_number_only.py | 51 + .../test_object_with_deprecated_fields.py | 57 + .../python-nextgen/test/test_order.py | 56 + .../test/test_outer_composite.py | 53 + .../python-nextgen/test/test_outer_enum.py | 36 + .../test/test_outer_enum_default_value.py | 36 + .../test/test_outer_enum_integer.py | 36 + .../test_outer_enum_integer_default_value.py | 50 + .../test_outer_object_with_enum_property.py | 52 + .../petstore/python-nextgen/test/test_pet.py | 68 + .../python-nextgen/test/test_pet_api.py | 96 + .../petstore/python-nextgen/test/test_pig.py | 37 + .../test/test_read_only_first.py | 52 + .../test/test_self_reference_model.py | 60 + .../test/test_single_ref_type.py | 50 + .../test/test_special_model_name.py | 51 + .../python-nextgen/test/test_special_name.py | 58 + .../python-nextgen/test/test_store_api.py | 61 + .../petstore/python-nextgen/test/test_tag.py | 52 + .../petstore/python-nextgen/test/test_user.py | 58 + .../python-nextgen/test/test_user_api.py | 89 + .../test/test_with_nested_one_of.py | 52 + .../petstore/python-nextgen/test_python3.sh | 31 + .../petstore/python-nextgen/testfiles/pix.gif | Bin 0 -> 42 bytes .../petstore/python-nextgen/tests/__init__.py | 0 .../python-nextgen/tests/test_api_client.py | 214 ++ .../tests/test_api_exception.py | 82 + .../tests/test_api_validation.py | 79 + .../tests/test_configuration.py | 58 + .../tests/test_deserialization.py | 295 ++ .../tests/test_http_signature.py | 521 ++++ .../python-nextgen/tests/test_map_test.py | 117 + .../python-nextgen/tests/test_model.py | 297 ++ .../python-nextgen/tests/test_order_model.py | 20 + .../python-nextgen/tests/test_pet_api.py | 272 ++ .../python-nextgen/tests/test_pet_model.py | 115 + .../python-nextgen/tests/test_store_api.py | 32 + .../petstore/python-nextgen/tests/util.py | 8 + .../client/petstore/python-nextgen/tox.ini | 9 + 568 files changed, 56832 insertions(+), 272 deletions(-) create mode 100644 bin/configs/python-nextgen-aiohttp.yaml create mode 100644 bin/configs/python-nextgen.yaml create mode 100644 docs/generators/python-nextgen.md create mode 100644 modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonNextgenClientCodegen.java create mode 100644 modules/openapi-generator/src/main/resources/python-nextgen/README.mustache create mode 100644 modules/openapi-generator/src/main/resources/python-nextgen/README_onlypackage.mustache create mode 100644 modules/openapi-generator/src/main/resources/python-nextgen/__init__.mustache create mode 100644 modules/openapi-generator/src/main/resources/python-nextgen/__init__api.mustache create mode 100644 modules/openapi-generator/src/main/resources/python-nextgen/__init__model.mustache create mode 100644 modules/openapi-generator/src/main/resources/python-nextgen/__init__package.mustache create mode 100644 modules/openapi-generator/src/main/resources/python-nextgen/api.mustache create mode 100644 modules/openapi-generator/src/main/resources/python-nextgen/api_client.mustache create mode 100644 modules/openapi-generator/src/main/resources/python-nextgen/api_doc.mustache create mode 100644 modules/openapi-generator/src/main/resources/python-nextgen/api_doc_example.mustache create mode 100644 modules/openapi-generator/src/main/resources/python-nextgen/api_test.mustache create mode 100644 modules/openapi-generator/src/main/resources/python-nextgen/asyncio/rest.mustache create mode 100644 modules/openapi-generator/src/main/resources/python-nextgen/common_README.mustache create mode 100644 modules/openapi-generator/src/main/resources/python-nextgen/configuration.mustache create mode 100644 modules/openapi-generator/src/main/resources/python-nextgen/exceptions.mustache create mode 100755 modules/openapi-generator/src/main/resources/python-nextgen/git_push.sh.mustache create mode 100644 modules/openapi-generator/src/main/resources/python-nextgen/github-workflow.mustache create mode 100644 modules/openapi-generator/src/main/resources/python-nextgen/gitignore.mustache create mode 100644 modules/openapi-generator/src/main/resources/python-nextgen/gitlab-ci.mustache create mode 100644 modules/openapi-generator/src/main/resources/python-nextgen/model.mustache create mode 100644 modules/openapi-generator/src/main/resources/python-nextgen/model_anyof.mustache create mode 100644 modules/openapi-generator/src/main/resources/python-nextgen/model_doc.mustache create mode 100644 modules/openapi-generator/src/main/resources/python-nextgen/model_enum.mustache create mode 100644 modules/openapi-generator/src/main/resources/python-nextgen/model_generic.mustache create mode 100644 modules/openapi-generator/src/main/resources/python-nextgen/model_oneof.mustache create mode 100644 modules/openapi-generator/src/main/resources/python-nextgen/model_test.mustache create mode 100644 modules/openapi-generator/src/main/resources/python-nextgen/partial_header.mustache create mode 100644 modules/openapi-generator/src/main/resources/python-nextgen/python_doc_auth_partial.mustache create mode 100644 modules/openapi-generator/src/main/resources/python-nextgen/requirements.mustache create mode 100644 modules/openapi-generator/src/main/resources/python-nextgen/rest.mustache create mode 100644 modules/openapi-generator/src/main/resources/python-nextgen/setup.mustache create mode 100644 modules/openapi-generator/src/main/resources/python-nextgen/setup_cfg.mustache create mode 100644 modules/openapi-generator/src/main/resources/python-nextgen/signing.mustache create mode 100644 modules/openapi-generator/src/main/resources/python-nextgen/test-requirements.mustache create mode 100644 modules/openapi-generator/src/main/resources/python-nextgen/tornado/rest.mustache create mode 100644 modules/openapi-generator/src/main/resources/python-nextgen/tox.mustache create mode 100644 modules/openapi-generator/src/main/resources/python-nextgen/travis.mustache create mode 100644 modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonNextgenClientCodegenTest.java create mode 100644 modules/openapi-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing.yaml create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/.github/workflows/python.yml create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/.gitignore create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/.gitlab-ci.yml create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/.openapi-generator-ignore create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/.openapi-generator/FILES create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/.openapi-generator/VERSION create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/.travis.yml create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/README.md create mode 100755 samples/openapi3/client/petstore/python-nextgen-aiohttp/dev-requirements.txt create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/AdditionalPropertiesClass.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/AllOfWithSingleRef.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/Animal.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/AnotherFakeApi.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/AnyOfPig.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/ApiResponse.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/ArrayOfArrayOfNumberOnly.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/ArrayOfNumberOnly.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/ArrayTest.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/BasquePig.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/Capitalization.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/Cat.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/CatAllOf.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/Category.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/ClassModel.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/Client.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/DanishPig.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/DefaultApi.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/DeprecatedObject.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/Dog.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/DogAllOf.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/DummyModel.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/EnumArrays.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/EnumClass.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/EnumTest.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/FakeApi.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/FakeClassnameTags123Api.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/File.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/FileSchemaTestClass.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/Foo.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/FooGetDefaultResponse.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/FormatTest.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/HasOnlyReadOnly.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/HealthCheckResult.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/List.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/MapTest.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/MixedPropertiesAndAdditionalPropertiesClass.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/Model200Response.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/ModelReturn.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/Name.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/NullableClass.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/NumberOnly.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/ObjectWithDeprecatedFields.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/Order.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/OuterComposite.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/OuterEnum.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/OuterEnumDefaultValue.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/OuterEnumInteger.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/OuterEnumIntegerDefaultValue.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/OuterObjectWithEnumProperty.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/Pet.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/PetApi.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/Pig.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/ReadOnlyFirst.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/SelfReferenceModel.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/SingleRefType.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/SpecialModelName.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/SpecialName.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/StoreApi.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/Tag.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/User.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/UserApi.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/docs/WithNestedOneOf.md create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/git_push.sh create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/__init__.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/api/__init__.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/api/another_fake_api.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/api/default_api.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/api/fake_api.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/api/fake_classname_tags123_api.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/api/pet_api.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/api/store_api.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/api/user_api.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/api_client.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/configuration.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/exceptions.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/models/__init__.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/models/additional_properties_class.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/models/all_of_with_single_ref.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/models/animal.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/models/any_of_pig.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/models/api_response.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/models/array_of_array_of_number_only.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/models/array_of_number_only.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/models/array_test.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/models/basque_pig.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/models/capitalization.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/models/cat.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/models/cat_all_of.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/models/category.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/models/class_model.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/models/client.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/models/danish_pig.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/models/deprecated_object.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/models/dog.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/models/dog_all_of.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/models/dummy_model.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/models/enum_arrays.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/models/enum_class.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/models/enum_test.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/models/file.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/models/file_schema_test_class.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/models/foo.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/models/foo_get_default_response.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/models/format_test.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/models/has_only_read_only.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/models/health_check_result.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/models/list.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/models/map_test.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/models/mixed_properties_and_additional_properties_class.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/models/model200_response.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/models/model_return.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/models/name.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/models/nullable_class.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/models/number_only.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/models/object_with_deprecated_fields.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/models/order.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/models/outer_composite.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/models/outer_enum.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/models/outer_enum_default_value.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/models/outer_enum_integer.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/models/outer_enum_integer_default_value.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/models/outer_object_with_enum_property.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/models/pet.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/models/pig.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/models/read_only_first.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/models/self_reference_model.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/models/single_ref_type.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/models/special_model_name.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/models/special_name.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/models/tag.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/models/user.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/models/with_nested_one_of.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/rest.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/petstore_api/signing.py create mode 100755 samples/openapi3/client/petstore/python-nextgen-aiohttp/pom.xml create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/requirements.txt create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/setup.cfg create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/setup.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test-requirements.txt create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/__init__.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_additional_properties_class.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_all_of_with_single_ref.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_animal.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_another_fake_api.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_any_of_pig.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_api_response.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_array_of_array_of_number_only.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_array_of_number_only.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_array_test.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_basque_pig.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_capitalization.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_cat.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_cat_all_of.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_category.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_class_model.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_client.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_danish_pig.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_default_api.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_deprecated_object.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_dog.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_dog_all_of.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_dummy_model.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_enum_arrays.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_enum_class.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_enum_test.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_fake_api.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_fake_classname_tags123_api.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_file.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_file_schema_test_class.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_foo.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_foo_get_default_response.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_format_test.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_has_only_read_only.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_health_check_result.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_list.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_map_test.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_mixed_properties_and_additional_properties_class.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_model200_response.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_model_return.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_name.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_nullable_class.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_number_only.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_object_with_deprecated_fields.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_order.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_outer_composite.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_outer_enum.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_outer_enum_default_value.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_outer_enum_integer.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_outer_enum_integer_default_value.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_outer_object_with_enum_property.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_pet.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_pet_api.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_pig.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_read_only_first.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_self_reference_model.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_single_ref_type.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_special_model_name.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_special_name.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_store_api.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_tag.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_user.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_user_api.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/test/test_with_nested_one_of.py create mode 100755 samples/openapi3/client/petstore/python-nextgen-aiohttp/test_python3.sh create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/testfiles/foo.png create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/tests/__init__.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/tests/test_api_client.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/tests/test_model.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/tests/test_pet_api.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/tests/test_pet_model.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/tests/util.py create mode 100644 samples/openapi3/client/petstore/python-nextgen-aiohttp/tox.ini create mode 100644 samples/openapi3/client/petstore/python-nextgen/.github/workflows/python.yml create mode 100755 samples/openapi3/client/petstore/python-nextgen/.gitignore create mode 100755 samples/openapi3/client/petstore/python-nextgen/.gitlab-ci.yml create mode 100755 samples/openapi3/client/petstore/python-nextgen/.openapi-generator-ignore create mode 100755 samples/openapi3/client/petstore/python-nextgen/.openapi-generator/FILES create mode 100755 samples/openapi3/client/petstore/python-nextgen/.openapi-generator/VERSION create mode 100755 samples/openapi3/client/petstore/python-nextgen/.travis.yml create mode 100755 samples/openapi3/client/petstore/python-nextgen/Makefile create mode 100755 samples/openapi3/client/petstore/python-nextgen/README.md create mode 100755 samples/openapi3/client/petstore/python-nextgen/dev-requirements.txt create mode 100755 samples/openapi3/client/petstore/python-nextgen/docs/AdditionalPropertiesClass.md create mode 100644 samples/openapi3/client/petstore/python-nextgen/docs/AllOfWithSingleRef.md create mode 100755 samples/openapi3/client/petstore/python-nextgen/docs/Animal.md create mode 100755 samples/openapi3/client/petstore/python-nextgen/docs/AnotherFakeApi.md create mode 100644 samples/openapi3/client/petstore/python-nextgen/docs/AnyOfPig.md create mode 100755 samples/openapi3/client/petstore/python-nextgen/docs/ApiResponse.md create mode 100755 samples/openapi3/client/petstore/python-nextgen/docs/ArrayOfArrayOfNumberOnly.md create mode 100755 samples/openapi3/client/petstore/python-nextgen/docs/ArrayOfNumberOnly.md create mode 100755 samples/openapi3/client/petstore/python-nextgen/docs/ArrayTest.md create mode 100644 samples/openapi3/client/petstore/python-nextgen/docs/BasquePig.md create mode 100755 samples/openapi3/client/petstore/python-nextgen/docs/Capitalization.md create mode 100755 samples/openapi3/client/petstore/python-nextgen/docs/Cat.md create mode 100755 samples/openapi3/client/petstore/python-nextgen/docs/CatAllOf.md create mode 100755 samples/openapi3/client/petstore/python-nextgen/docs/Category.md create mode 100755 samples/openapi3/client/petstore/python-nextgen/docs/ClassModel.md create mode 100755 samples/openapi3/client/petstore/python-nextgen/docs/Client.md create mode 100644 samples/openapi3/client/petstore/python-nextgen/docs/DanishPig.md create mode 100755 samples/openapi3/client/petstore/python-nextgen/docs/DefaultApi.md create mode 100644 samples/openapi3/client/petstore/python-nextgen/docs/DeprecatedObject.md create mode 100755 samples/openapi3/client/petstore/python-nextgen/docs/Dog.md create mode 100755 samples/openapi3/client/petstore/python-nextgen/docs/DogAllOf.md create mode 100644 samples/openapi3/client/petstore/python-nextgen/docs/DummyModel.md create mode 100755 samples/openapi3/client/petstore/python-nextgen/docs/EnumArrays.md create mode 100755 samples/openapi3/client/petstore/python-nextgen/docs/EnumClass.md create mode 100755 samples/openapi3/client/petstore/python-nextgen/docs/EnumTest.md create mode 100755 samples/openapi3/client/petstore/python-nextgen/docs/FakeApi.md create mode 100755 samples/openapi3/client/petstore/python-nextgen/docs/FakeClassnameTags123Api.md create mode 100755 samples/openapi3/client/petstore/python-nextgen/docs/File.md create mode 100755 samples/openapi3/client/petstore/python-nextgen/docs/FileSchemaTestClass.md create mode 100755 samples/openapi3/client/petstore/python-nextgen/docs/Foo.md create mode 100644 samples/openapi3/client/petstore/python-nextgen/docs/FooGetDefaultResponse.md create mode 100755 samples/openapi3/client/petstore/python-nextgen/docs/FormatTest.md create mode 100755 samples/openapi3/client/petstore/python-nextgen/docs/HasOnlyReadOnly.md create mode 100755 samples/openapi3/client/petstore/python-nextgen/docs/HealthCheckResult.md create mode 100755 samples/openapi3/client/petstore/python-nextgen/docs/InlineObject.md create mode 100755 samples/openapi3/client/petstore/python-nextgen/docs/InlineObject1.md create mode 100755 samples/openapi3/client/petstore/python-nextgen/docs/InlineObject2.md create mode 100755 samples/openapi3/client/petstore/python-nextgen/docs/InlineObject3.md create mode 100755 samples/openapi3/client/petstore/python-nextgen/docs/InlineObject4.md create mode 100755 samples/openapi3/client/petstore/python-nextgen/docs/InlineObject5.md create mode 100755 samples/openapi3/client/petstore/python-nextgen/docs/InlineResponseDefault.md create mode 100755 samples/openapi3/client/petstore/python-nextgen/docs/List.md create mode 100755 samples/openapi3/client/petstore/python-nextgen/docs/MapTest.md create mode 100755 samples/openapi3/client/petstore/python-nextgen/docs/MixedPropertiesAndAdditionalPropertiesClass.md create mode 100755 samples/openapi3/client/petstore/python-nextgen/docs/Model200Response.md create mode 100755 samples/openapi3/client/petstore/python-nextgen/docs/ModelReturn.md create mode 100644 samples/openapi3/client/petstore/python-nextgen/docs/Model_200Response.md create mode 100644 samples/openapi3/client/petstore/python-nextgen/docs/Model_Return.md create mode 100755 samples/openapi3/client/petstore/python-nextgen/docs/Name.md create mode 100644 samples/openapi3/client/petstore/python-nextgen/docs/NestedOneOf.md create mode 100755 samples/openapi3/client/petstore/python-nextgen/docs/NullableClass.md create mode 100755 samples/openapi3/client/petstore/python-nextgen/docs/NumberOnly.md create mode 100644 samples/openapi3/client/petstore/python-nextgen/docs/ObjectWithDeprecatedFields.md create mode 100755 samples/openapi3/client/petstore/python-nextgen/docs/Order.md create mode 100755 samples/openapi3/client/petstore/python-nextgen/docs/OuterComposite.md create mode 100755 samples/openapi3/client/petstore/python-nextgen/docs/OuterEnum.md create mode 100755 samples/openapi3/client/petstore/python-nextgen/docs/OuterEnumDefaultValue.md create mode 100755 samples/openapi3/client/petstore/python-nextgen/docs/OuterEnumInteger.md create mode 100755 samples/openapi3/client/petstore/python-nextgen/docs/OuterEnumIntegerDefaultValue.md create mode 100644 samples/openapi3/client/petstore/python-nextgen/docs/OuterObjectWithEnumProperty.md create mode 100755 samples/openapi3/client/petstore/python-nextgen/docs/Pet.md create mode 100755 samples/openapi3/client/petstore/python-nextgen/docs/PetApi.md create mode 100644 samples/openapi3/client/petstore/python-nextgen/docs/Pig.md create mode 100755 samples/openapi3/client/petstore/python-nextgen/docs/ReadOnlyFirst.md create mode 100644 samples/openapi3/client/petstore/python-nextgen/docs/SelfReferenceModel.md create mode 100644 samples/openapi3/client/petstore/python-nextgen/docs/SingleRefType.md create mode 100755 samples/openapi3/client/petstore/python-nextgen/docs/SpecialModelName.md create mode 100644 samples/openapi3/client/petstore/python-nextgen/docs/SpecialName.md create mode 100755 samples/openapi3/client/petstore/python-nextgen/docs/StoreApi.md create mode 100755 samples/openapi3/client/petstore/python-nextgen/docs/Tag.md create mode 100755 samples/openapi3/client/petstore/python-nextgen/docs/User.md create mode 100755 samples/openapi3/client/petstore/python-nextgen/docs/UserApi.md create mode 100644 samples/openapi3/client/petstore/python-nextgen/docs/WithNestedOneOf.md create mode 100755 samples/openapi3/client/petstore/python-nextgen/git_push.sh create mode 100755 samples/openapi3/client/petstore/python-nextgen/petstore_api/__init__.py create mode 100755 samples/openapi3/client/petstore/python-nextgen/petstore_api/api/__init__.py create mode 100755 samples/openapi3/client/petstore/python-nextgen/petstore_api/api/another_fake_api.py create mode 100755 samples/openapi3/client/petstore/python-nextgen/petstore_api/api/default_api.py create mode 100755 samples/openapi3/client/petstore/python-nextgen/petstore_api/api/fake_api.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/petstore_api/api/fake_classname_tags123_api.py create mode 100755 samples/openapi3/client/petstore/python-nextgen/petstore_api/api/fake_classname_tags_123_api.py create mode 100755 samples/openapi3/client/petstore/python-nextgen/petstore_api/api/pet_api.py create mode 100755 samples/openapi3/client/petstore/python-nextgen/petstore_api/api/store_api.py create mode 100755 samples/openapi3/client/petstore/python-nextgen/petstore_api/api/user_api.py create mode 100755 samples/openapi3/client/petstore/python-nextgen/petstore_api/api_client.py create mode 100755 samples/openapi3/client/petstore/python-nextgen/petstore_api/configuration.py create mode 100755 samples/openapi3/client/petstore/python-nextgen/petstore_api/exceptions.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/petstore_api/models/__init__.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/petstore_api/models/additional_properties_class.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/petstore_api/models/all_of_with_single_ref.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/petstore_api/models/animal.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/petstore_api/models/any_of_pig.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/petstore_api/models/api_response.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/petstore_api/models/array_of_array_of_number_only.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/petstore_api/models/array_of_number_only.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/petstore_api/models/array_test.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/petstore_api/models/basque_pig.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/petstore_api/models/capitalization.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/petstore_api/models/cat.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/petstore_api/models/cat_all_of.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/petstore_api/models/category.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/petstore_api/models/class_model.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/petstore_api/models/client.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/petstore_api/models/danish_pig.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/petstore_api/models/deprecated_object.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/petstore_api/models/dog.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/petstore_api/models/dog_all_of.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/petstore_api/models/dummy_model.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/petstore_api/models/enum_arrays.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/petstore_api/models/enum_class.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/petstore_api/models/enum_test.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/petstore_api/models/file.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/petstore_api/models/file_schema_test_class.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/petstore_api/models/foo.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/petstore_api/models/foo_get_default_response.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/petstore_api/models/format_test.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/petstore_api/models/has_only_read_only.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/petstore_api/models/health_check_result.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/petstore_api/models/list.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/petstore_api/models/map_test.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/petstore_api/models/mixed_properties_and_additional_properties_class.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/petstore_api/models/model200_response.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/petstore_api/models/model_return.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/petstore_api/models/name.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/petstore_api/models/nullable_class.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/petstore_api/models/number_only.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/petstore_api/models/object_with_deprecated_fields.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/petstore_api/models/order.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/petstore_api/models/outer_composite.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/petstore_api/models/outer_enum.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/petstore_api/models/outer_enum_default_value.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/petstore_api/models/outer_enum_integer.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/petstore_api/models/outer_enum_integer_default_value.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/petstore_api/models/outer_object_with_enum_property.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/petstore_api/models/pet.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/petstore_api/models/pig.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/petstore_api/models/read_only_first.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/petstore_api/models/self_reference_model.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/petstore_api/models/single_ref_type.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/petstore_api/models/special_model_name.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/petstore_api/models/special_name.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/petstore_api/models/tag.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/petstore_api/models/user.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/petstore_api/models/with_nested_one_of.py create mode 100755 samples/openapi3/client/petstore/python-nextgen/petstore_api/rest.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/petstore_api/signing.py create mode 100755 samples/openapi3/client/petstore/python-nextgen/pom.xml create mode 100755 samples/openapi3/client/petstore/python-nextgen/requirements.txt create mode 100755 samples/openapi3/client/petstore/python-nextgen/setup.cfg create mode 100755 samples/openapi3/client/petstore/python-nextgen/setup.py create mode 100755 samples/openapi3/client/petstore/python-nextgen/test-requirements.txt create mode 100755 samples/openapi3/client/petstore/python-nextgen/test/__init__.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_additional_properties_class.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_all_of_with_single_ref.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_animal.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_another_fake_api.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_any_of_pig.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_api_response.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_array_of_array_of_number_only.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_array_of_number_only.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_array_test.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_basque_pig.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_capitalization.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_cat.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_cat_all_of.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_category.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_class_model.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_client.py create mode 100755 samples/openapi3/client/petstore/python-nextgen/test/test_configuration.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_danish_pig.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_default_api.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_deprecated_object.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_dog.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_dog_all_of.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_dummy_model.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_enum_arrays.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_enum_class.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_enum_test.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_fake_api.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_fake_classname_tags123_api.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_fake_classname_tags_123_api.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_file.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_file_schema_test_class.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_foo.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_foo_get_default_response.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_format_test.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_has_only_read_only.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_health_check_result.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_list.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_map_test.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_mixed_properties_and_additional_properties_class.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_model200_response.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_model_return.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_name.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_nullable_class.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_number_only.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_object_with_deprecated_fields.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_order.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_outer_composite.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_outer_enum.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_outer_enum_default_value.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_outer_enum_integer.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_outer_enum_integer_default_value.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_outer_object_with_enum_property.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_pet.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_pet_api.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_pig.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_read_only_first.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_self_reference_model.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_single_ref_type.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_special_model_name.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_special_name.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_store_api.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_tag.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_user.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_user_api.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/test/test_with_nested_one_of.py create mode 100755 samples/openapi3/client/petstore/python-nextgen/test_python3.sh create mode 100644 samples/openapi3/client/petstore/python-nextgen/testfiles/pix.gif create mode 100644 samples/openapi3/client/petstore/python-nextgen/tests/__init__.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/tests/test_api_client.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/tests/test_api_exception.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/tests/test_api_validation.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/tests/test_configuration.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/tests/test_deserialization.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/tests/test_http_signature.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/tests/test_map_test.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/tests/test_model.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/tests/test_order_model.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/tests/test_pet_api.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/tests/test_pet_model.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/tests/test_store_api.py create mode 100644 samples/openapi3/client/petstore/python-nextgen/tests/util.py create mode 100755 samples/openapi3/client/petstore/python-nextgen/tox.ini diff --git a/CI/circle_parallel.sh b/CI/circle_parallel.sh index 6cba564ffb..962a13584a 100755 --- a/CI/circle_parallel.sh +++ b/CI/circle_parallel.sh @@ -53,9 +53,9 @@ elif [ "$NODE_INDEX" = "3" ]; then #./configure --enable-optimizations #sudo make altinstall pyenv install --list - pyenv install 3.6.3 + pyenv install 3.7.12 pyenv install 2.7.14 - pyenv global 3.6.3 + pyenv global 3.7.12 # Install node@stable (for angular 6) set +e diff --git a/bin/configs/python-nextgen-aiohttp.yaml b/bin/configs/python-nextgen-aiohttp.yaml new file mode 100644 index 0000000000..4d71a6d3d6 --- /dev/null +++ b/bin/configs/python-nextgen-aiohttp.yaml @@ -0,0 +1,7 @@ +generatorName: python-nextgen +outputDir: samples/openapi3/client/petstore/python-nextgen-aiohttp +inputSpec: modules/openapi-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/python-nextgen +library: asyncio +additionalProperties: + packageName: petstore_api diff --git a/bin/configs/python-nextgen.yaml b/bin/configs/python-nextgen.yaml new file mode 100644 index 0000000000..c2c09ee014 --- /dev/null +++ b/bin/configs/python-nextgen.yaml @@ -0,0 +1,8 @@ +generatorName: python-nextgen +outputDir: samples/openapi3/client/petstore/python-nextgen +inputSpec: modules/openapi-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/python-nextgen +additionalProperties: + packageName: petstore_api + useOneOfDiscriminatorLookup: "true" + disallowAdditionalPropertiesIfNotPresent: false diff --git a/docs/generators.md b/docs/generators.md index cd0466f9ad..f05f73224e 100644 --- a/docs/generators.md +++ b/docs/generators.md @@ -52,6 +52,7 @@ The following generators are available: * [powershell (beta)](generators/powershell.md) * [python](generators/python.md) * [python-legacy](generators/python-legacy.md) +* [python-nextgen (beta)](generators/python-nextgen.md) * [python-prior](generators/python-prior.md) * [r](generators/r.md) * [ruby](generators/ruby.md) diff --git a/docs/generators/python-legacy.md b/docs/generators/python-legacy.md index 0af42bd30b..3d0b1165a6 100644 --- a/docs/generators/python-legacy.md +++ b/docs/generators/python-legacy.md @@ -45,6 +45,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl ## LANGUAGE PRIMITIVES